diff options
author | Thibault Saunier <thibault.saunier@collabora.com> | 2014-03-14 18:48:44 +0100 |
---|---|---|
committer | Thibault Saunier <thibault.saunier@collabora.com> | 2014-03-14 18:48:44 +0100 |
commit | 0a903cdd35b35662463eb289e5c46f0a0121056c (patch) | |
tree | a49fcd0c1d4a11dc42ff01405df58a0ccaf4ac4f | |
parent | bffc8a1d94c262837c6b12a4ff05aa632f3e11e5 (diff) |
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.
-rw-r--r-- | ges/ges-pipeline.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ges/ges-pipeline.c b/ges/ges-pipeline.c index 226867e9..ae65a844 100644 --- a/ges/ges-pipeline.c +++ b/ges/ges-pipeline.c @@ -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. */ |