mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
pipeline: Always set the encoding profile presence to 1
We currenty do not support multiple tracks with same type in GESPipeline and we actually need to set the presence field to avoid a scenario where we have only video in a video track, and no audio in the audio track. So audiotestsrc is used and we end up encoding the whole audio stream but no decoded video frame as reached the decodebin src pad, so the pad has not been created and thus it will not be linked to the encodebin. On the audio part, the EOS will be emitted so fast that the resulting stream will not have any video in it as the muxer will not even have a video pad created. Setting the presence will ensure that the muxer does have a video pad (because of how encodebin behaves) and thus will create a pad for it and wait for its EOS.
This commit is contained in:
parent
bffc8a1d94
commit
0a903cdd35
1 changed files with 15 additions and 0 deletions
|
@ -852,6 +852,21 @@ ges_pipeline_set_render_settings (GESPipeline * pipeline,
|
|||
|
||||
g_return_val_if_fail (GES_IS_PIPELINE (pipeline), FALSE);
|
||||
|
||||
/* FIXME Properly handle multi track, for now GESPipeline
|
||||
* only hanles single track per type, so we should just set the
|
||||
* presence to 1.
|
||||
*/
|
||||
if (GST_IS_ENCODING_CONTAINER_PROFILE (profile)) {
|
||||
const GList *tmpprofiles =
|
||||
gst_encoding_container_profile_get_profiles
|
||||
(GST_ENCODING_CONTAINER_PROFILE (profile));
|
||||
|
||||
for (; tmpprofiles; tmpprofiles = tmpprofiles->next) {
|
||||
GST_DEBUG_OBJECT (pipeline, "Setting presence to 1!");
|
||||
gst_encoding_profile_set_presence (tmpprofiles->data, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Clear previous URI sink if it existed */
|
||||
/* FIXME : We should figure out if it was added to the pipeline,
|
||||
* and if so, remove it. */
|
||||
|
|
Loading…
Reference in a new issue