Commit Graph

4136 Commits

Author SHA1 Message Date
David Sutton 5c896ea24f codec/wav: Add unit tests for wav encoder 2023-12-04 10:58:31 +10:30
David Sutton 3229954424 codec/wav: Implement a wav encoder
A wav encoder will be useful for returning easily playable audio files to users of vidgrind that are not familiar with PCM audio. Currently the encoder only support PCM data, but can be updated with other types. The encoder implements the writer interface.
2023-12-04 10:58:31 +10:30
Trek Hopton 19b696683b cmd: add program for unwrapping MTS media to a local file
This is useful in the case that we want to playback media using players that don't support MPEG-TS eg. audacity for audio.

Approved-by: Saxon Milton
2023-11-30 03:52:25 +00:00
Alan Noble 59bf9d15a8 Include PID in mts.FindPid error
Approved-by: Trek Hopton
Approved-by: David Sutton
2023-11-12 06:42:45 +00:00
David Sutton d9301fe40c file_test.go: Update Tests (#421)
(b *Broadcast) UnmarshalJSON no longer starts revid (see PR #510).

(m *BroadcastManager) MarshalJSON no longer needs to worry about slate exit signals due to broadcast status (see PR #511).

Merged in 421-fix-JSON-marshalling (pull request #528)
Approved-by: Saxon Milton
2023-10-20 08:27:06 +00:00
Trek Hopton d0cca977f5 scripts/wifi-off-delay: turn wifi off after 20 minutes regardless of connection
This is done so that a SCUHU users can see the pi IP address has connected to their hotspot without having to then log in via SSH to turn the wifi off before deployment.


Approved-by: David Sutton
2023-10-20 06:25:10 +00:00
Trek Hopton ba550e286a SCUHU: configure SCUHU and add services and scripts to run at startup on pi
This is so that the software required for SCUHU will run at startup on the pi.

Approved-by: Alan Noble
Approved-by: Saxon Milton
2023-10-20 03:49:55 +00:00
Trek Hopton a266587397 revid: added basic disk and file size checking
* revid: reordered the file write method to exit earlier and remove a flag that wasn't needed
* revid: add comments to MaxFileSize to specify that it is in bytes

Approved-by: Alan Noble
Approved-by: Saxon Milton
2023-10-20 03:29:36 +00:00
Alan Noble a2aaa605fd Merged in enable-mts-timestamps (pull request #522)
Enable MTS timestamps with audio input

* Enable MTS timestamps with audio input.


Approved-by: Saxon Milton
2023-10-19 23:11:20 +00:00
Trek Hopton 3bb8d0bde2 exp/rvcl: remove nil option from netsender
This was a programmer's mistake.

Approved-by: Alan Noble
2023-10-18 07:49:11 +00:00
Trek H 9131409d08 exp/rvcl: remove nil option from netsender 2023-10-17 20:12:58 +10:30
Saxon Milton 524e010fe1 * vidforward: actually set revid pipeline
We need to actually get the returned value from
initOrStartPipeline and set the pipeline.

* vidforward: add some logging to config load

* vidforward: update utils version

Approved-by: Alan Noble
Approved-by: Trek Hopton
2023-10-14 00:49:42 +00:00
Saxon Milton c98fffe722 revid: fix manual input reader and writer
The reader and writer pipes should be created on call to Start
and not in NewManualInput. This is so that if Close is called,
which will close the reader and the writer, a call to start will
create them again.

Approved-by: Alan Noble
Approved-by: David Sutton
2023-10-14 00:34:08 +00:00
Saxon Milton 072f069d1a Merged in init-or-start (pull request #514)
vidforward: initOrStartPipeline

This function checks whether a revid pipeline has been created,
and if not creates it. It then also checks to see if it has been
started, and if not, starts the pipeline.
2023-10-14 00:32:10 +00:00
David Sutton 5761f81315 Skip senders tests in CI - Resolves #413
Using a env var in CircleCI, these tests will be skipped when commits are pushed to bitbucket.
NOTE: this is a temporary patch, and these tests should be properly reviewed.

Approved-by: Trek Hopton
2023-10-09 08:02:38 +00:00
Trek Hopton 14482e8945 init: check if build tags exist before running go build
Resolves issue #415
2023-10-03 07:52:52 +00:00
Saxon Nelson-Milton 4587f31c42 vidforward: remove run_script from create_service.sh
We no longer use a run script; the vidforward executable is started
directly from the service.
2023-09-20 21:59:35 +00:00
Saxon Nelson-Milton 79d3e7280b vidforward: Remove RUN_SCRIPT_DIR parameter from Makefile
This is no longer needed considering there's no longer a run
script; instead we call the binary directly in the service file.
2023-09-20 21:57:36 +00:00
Saxon Nelson-Milton e4263464ef vidforward: remove reference to non-existent run.sh file
This file used to be used for startup, but now we just start the
process directly in the service. It probably existed in the dir
last time this was tested so no errors were thrown, but on a clean
install this was a problem.
2023-09-20 21:57:18 +00:00
Saxon Milton 19eafa3228 vidforward: save manager state at end of process request
As added redundancy, let's save the manager state at the end of
the process request method as well.
2023-09-20 21:25:04 +00:00
Saxon Nelson-Milton 1621dc709b vidforward: add SIGKILL to signal.Notify for term callback
Just for further redundancy, let's also call the termination
callback (which saves the manager state in our case) for SIGKILL.
2023-09-19 10:47:10 +00:00
Saxon Milton da9ed6d689 vidforward: getPipeline handles revid creation and start
It simplifies things if getPipeline handles creation and starting
of the revid pipeline. We don't need to be doing this in multiple
places.

Approved-by: Trek Hopton
2023-09-18 23:28:51 +00:00
Saxon Milton 4087be907a vidforward: simplify manager file save/load
When saving and loading manager state to and from file, we don't
need to worry about the slate exit signals. Now that we have
broadcast status i.e. "play" or "slate", we can derive whether we
need an exit signal based only on that.

Approved-by: Trek Hopton
2023-09-18 23:25:28 +00:00
Saxon Nelson-Milton db84c5bfcf Use correct log level global variable 2023-09-17 23:16:30 +00:00
Saxon Nelson-Milton 16df4ed2aa Add more logging to createOrUpdate function
It'd be useful to see more of what's going on in here.
2023-09-17 11:03:30 +00:00
Trek Hopton a978e27e4f Merged in withcv-fix (pull request #509)
filter: change build tags to allow build withcv

Resolves Issue #412
2023-09-06 09:00:14 +00:00
Trek H 0ab1e7c38f filter: change build tags to allow build withcv 2023-09-06 18:27:55 +09:30
Saxon Milton a3c526b2e0 Merged in fix-rtmpurl-variable-load (pull request #508)
revid: Don't append Config.RTMPURL

Resolves issue #409
2023-07-24 22:57:14 +00:00
Saxon Nelson-Milton 79b0a49994 revid: don't append Config.RTMPURL
Config.RTMPURL was being appended when updated, which means that
it would just continue to grow, and by the time we actually try
to use the RTMP URLs that are stored, we end up using old ones.
Instead this should just be completely replaced.
2023-07-16 06:49:49 +00:00
David Sutton 47b2b1576f Merged in issue-399-software-channels (pull request #502)
Software Channels

Approved-by: Trek Hopton
2023-07-10 01:30:31 +00:00
David Sutton bbbd6baecb Better handle errors in setChannels 2023-07-10 10:35:17 +09:30
David Sutton 701b1f6c3a Add speakerMode checking for treatment. 2023-07-10 10:35:17 +09:30
Saxon Nelson-Milton ee7cb57fe5 vidforward: global logger returns underlying logger
The globalLogger type wraps a logger.Logger. If you use GetLogger
which gets the global logger (which provides an interface
logger.Logger) a type assertion to JSONLogger will fail, because
the type is actually globalLogger. We need to provide the
underlying logger instead when we return from GetLogger.
2023-06-23 23:40:30 +00:00
Saxon Milton 452d25ac0c Merged in non-active (pull request #507)
vidforward: improve non-active mechanism

Resolves issue #404

Approved-by: Trek Hopton
Approved-by: David Sutton
2023-06-21 10:50:27 +00:00
Saxon Nelson-Milton 9080a5d2c1 vidforward: improve non-active mechanism
This change improves the mechanism that deals with recv requests
from non active macs. We're no only logging every minute so that
we don't clutter the logs. We're also dealing with both non active
and slate recvs with the same mechanism using a switch.
2023-06-21 20:19:33 +09:30
Saxon Milton d232734d50 Merged in modify-update (pull request #506)
vidforward: only update broadcast if changed

Resolves issues #405 and #406

Approved-by: Trek Hopton
Approved-by: David Sutton
2023-06-21 10:34:37 +00:00
Saxon Nelson-Milton 26e77709aa vidforward: only update broadcast if changed
For control requests, we only update aspects of the broadcast if
they have changed. Therefore, if the urls list has not changed
the revid pipeline is not updated, similarly if the status has
not changed, we don't do anything there.
2023-06-21 20:03:39 +09:30
Saxon Milton 41fd1e345b Merged in config-watcher (pull request #505)
vidforward: add config file watcher

Resolves issue #407

Approved-by: Trek Hopton
2023-06-21 10:21:20 +00:00
Saxon Nelson-Milton bcbb187bef vidforward: add config file watcher
This change adds a file watcher and then uses this file watcher
to perform updates based on changes in a configuration file. This
configuration file contains logging parameters for the time being
in the hope that it will help with debugging.

Testing was also added for this functionality.
2023-06-21 19:48:02 +09:30
Saxon Milton 853aa31260 Merged in handle-slate-upload (pull request #503)
Add slate request handler

Resolves issue #385

Approved-by: Trek Hopton
Approved-by: David Sutton
2023-06-14 21:23:43 +00:00
Trek Hopton 05c570063b Merged in remove-nocv-make (pull request #504)
removed nocv tag from Makefiles

Approved-by: Saxon Nelson-Milton
2023-05-29 06:03:13 +00:00
Trek H 8eb407e918 removed nocv tag from Makefiles 2023-05-29 15:19:05 +09:30
Saxon Nelson-Milton 382f202bb0 Add slate request handler
This change adds a request handler for /slate. This endpoint can
now be used to upload a new slate file.
2023-05-27 09:42:46 +09:30
David Sutton e078d9f2bc Merged in local-looper (pull request #500)
local-looper

Approved-by: Saxon Milton
Approved-by: Trek Hopton
2023-05-11 05:43:54 +00:00
David Sutton dafb51d34e local-looper: Utilise service watchdog. 2023-05-11 15:13:18 +09:30
David Sutton 6b8b72ccfd local-looper: Add a simplified looper system that is not dependent on network connectivity. 2023-05-11 15:13:18 +09:30
David Sutton 9b64f7bc0e Merged in issue-396-circleci-failing (pull request #501)
Fix CircleCi issues

Approved-by: Trek Hopton
2023-05-05 05:58:55 +00:00
David Sutton f0fedd852d Update go version in .circleci/config.yml 2023-05-01 13:16:55 +09:30
Saxon Milton 05a0ba79df Merged in check-urls-len (pull request #499)
vidforward/file.go: check length of urls on load

Approved-by: David Sutton
2023-03-20 08:09:21 +00:00
Saxon Milton 336784027a Merged in new-revid-function (pull request #498)
vidforward: use consistent revid construction function

Approved-by: David Sutton
2023-03-20 08:07:59 +00:00