From: Thibault Saunier Date: Fri, 14 Mar 2014 17:48:44 +0000 (+0100) Subject: pipeline: Always set the encoding profile presence to 1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a903cdd35b35662463eb289e5c46f0a0121056c;p=platform%2Fupstream%2Fgst-editing-services.git 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. --- diff --git a/ges/ges-pipeline.c b/ges/ges-pipeline.c index 226867e..ae65a84 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. */