[
http://opencast.jira.com/browse/MH-7593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=26209#comment-26209
]
Micah Sutton commented on MH-7593:
----------------------------------
@Ruben You're right about the state. You can set state to NULL and all states
preceding it are moved through. The issue here is that if you set the state to
NULL immediately, then the pipeline doesn't flush out all of the data and the
file isn't muxed correctly. (as indicated by Waldemar)
@Waldemar, Your correct that the intention is to wait for the pipe to flush.
Unfortunately, the way things are being done currently this never happens. At
line 543, where the EOS message is posted to the bus, every child element of
the pipeline gets that message. So everything just stops immediately.
Furthermore, the EOS handler for the pipeline is immediately triggered, which
sets the pipeline state to null, and nulls the pipeline itself. what ends up
happening is that the code to wait for the pipeline to finish flushing never
actually executes.
If an EOSEvent is sent directly to the sources of the pipeline, that the EOS
bubbles downstream from the source to the sink, each element flushes it's
data, and when everything is done the sink emits an EOS message on the bus.
From there it is safe to set the pipeline's state to null, which will be done
in the EOS Handler.
Finally, the code for waiting to flush the pipeline should simply call
pipe.getState([nanoseconds to block]), if it returns and the state still isn't
NULL, then you can kill the pipeline directly by setState(State.NULL).
The only trick to doing any of this seems to be getting all of the sources from
the pipeline, since .getSources() doesn't recurse through the pipeline's child
bins.
> Gstreamer pipeline is not handling shutdown correctly
> -----------------------------------------------------
>
> Key: MH-7593
> URL: http://opencast.jira.com/browse/MH-7593
> Project: Matterhorn Project
> Issue Type: Bug
> Components: Capture (Devices and Software)
> Affects Versions: 1.1
> Reporter: Micah Sutton
> Assignee: Adam McKenzie
> Priority: Release Blocker
>
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
Matterhorn mailing list
[email protected]
http://lists.opencastproject.org/mailman/listinfo/matterhorn
To unsubscribe please email
[email protected]
_______________________________________________