Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inputs added + recording start without server connection #413

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

RolfBerger
Copy link

@RolfBerger RolfBerger commented Aug 16, 2022

  • Inputs added: Definition in pyca.conf, ingest only uploads selected tracks, if no tracks are defined in pyca.conf or no inputs selected in schedule-event, all tracks are uploaded. The assignment of inputs to tracks is made with the flavor, so each inputs/track needs a unique flavor-name.

  • capture.py stays in a while-loop until the connection to the opencast-endpoint is made. If the connection is lost no recordings are started -> change in connection beaviour to exit the loop if connection is only for information and not necessary
    Remark: The changes in schedule.py will cause "Failure in test_get_schedule (test_schedule.TestPycaCapture)" in the test-run because get_schedule() returns without a database entry if the service-endpoint is not reachable. In this case get_schedule() returns before schedule.http_request (= lambda x: self.VCAL) will be executed. In my opinion this is not a fault.

New entry for Input names in pyca.conf.  Each Input belongs to one flavor and to one output file, so Input names, flavor names and output names must be unique and must have the same number. The inputs are sent to the opencast-server and should/must be selected with new schedule entries.
If inputs is not defined (default is=''), each track/flavor/output-file is added to the media package and uploaded. Flavor names must be unique because they are used to find the input behind the output file. This is a work-around because I did not want to change the database entries. It would be better to have the input name in the event.track database entry as [input, flavor, output_file], but then more changes are needed.
Added entry for inputs
- added function get_input_params(event) to extract 'capture.device.names' property from attachment,
- added function trackinput_selected(event,flavor, track) to decide if flavor/track has corresponding input to attachment
- add only tracks to mediapackage if trackinput_selected() is True
- capture.py will not start capturing if connection to opencast endpoint is not possible. In original service() will endless stay in while-loop with 5sec sleep until endpoint is connected. This is not a good idea, because events in the database will not start recording. To change this, the already installed flag 'force_update' is used. The while-loop will only wait and loop if force_update=True and return immediately if force_update=False. force_update is passed through the calling functions register_ca(), recording_state(), set_service_status_immediate(), update_agent_state()
- register_ca() is extended by the registration of the input configuration
added force_update=True to extended functions
added force_update=True in service() and check for service_enpdoint, otherwise sevice_endpoint[0] will not exist, uri= changed accordingly
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant