-
Notifications
You must be signed in to change notification settings - Fork 40
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
RolfBerger
wants to merge
15
commits into
opencast:main
Choose a base branch
from
RolfBerger:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.