isomp4: Add support for GstForceKeyUnit events
@ylatuya
Submitted by Andoni Alastruey Link to original bug (#660260)
Description
Created attachment 197584
0002-Add-support-for-GstForceKeyUnit-events.patch
The flowing patch adds support for GstForceKeyUnit events to ismlmux.
I have added a new property called 'fragment-method':
- NONE: do not fragment (default value for muxers that are not the ismlmux)
- TIME: fragment by time, set in the fragment-duration property (default value for the ismlmux, keeping the old behaviour)
- EVENT: Uses the GstForceKeyUnit event to generate fragments.
This muxer is different from the other ones (webm or mpegts) in the sense that it can mux several video qualities and the audio track is packed in a separate fragment. So to make it work the audio pad should be receiving GstForceKeyUnits too.
I have tested this patch using Flumotion's smooth streamer[1] with a pipeline similar to:
vsource ! keyunitsscheduler ! tee name=t ! h264enc ! ismlmux name=mux ! streamer
t. ! h264enc ! mux.
t. ! h264enc ! mux.
asource ! keyunitsscheduler ! aacenc ! mux.
This patch relies in the new API for GstForceKeyUnit events
[1] https://code.flumotion.com/cgit/flumotion-fragmented-streaming/
Patch 197584, "0002-Add-support-for-GstForceKeyUnit-events.patch":
0002-Add-support-for-GstForceKeyUnit-events.patch