From: Thiago Santos Date: Wed, 5 Oct 2011 00:17:37 +0000 (-0300) Subject: encodebin: Re-enable parsers X-Git-Tag: RELEASE-0.10.36~260 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=59f0b29c3f0c14c75faf9d0027eb36a85460da70;p=platform%2Fupstream%2Fgst-plugins-base.git encodebin: Re-enable parsers Re-enable parsers in encodebin to allow more passthrough scenarios to work. Specially the ones that require changing 'stream formats'. i.e. h264 in mkv to mpegts. --- diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c index 3ce67ff..d34d806 100644 --- a/gst/encoding/gstencodebin.c +++ b/gst/encoding/gstencodebin.c @@ -1095,45 +1095,6 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof, last = sgroup->outfilter; - /* FIXME : - * - * The usage of parsers in encoding/muxing scenarios is - * just too undefined to just use as-is. - * - * Take the use-case where you want to re-mux a stream of type - * "my/media". You create a StreamEncodingProfile with that type - * as the target (as-is). And you use decodebin2/uridecodebin - * upstream. - * - * * demuxer exposes "my/media" - * * a parser is available for "my/media" which has a source pad - * caps of "my/media,parsed=True" - * * decodebin2/uridecodebin exposes a new pad with the parsed caps - * * You request a new stream from encodebin, which will match the - * streamprofile and creates a group (i.e. going through this method) - * There is a matching parser (the same used in the decoder) whose - * source pad caps intersects with the stream profile caps, you - * therefore use it... - * * ... but that parser has a "my/media,parsed=False" sink pad caps - * * ... and you can't link your decodebin pad to encodebin. - * - * In the end, it comes down to parsers only taking into account the - * decoding use-cases. - * - * One way to solve that might be to : - * * Make parsers sink pad caps be "framed={False,True}" and the - * source pad caps be "framed=True" - * * Modify decodebin2 accordingly to avoid looping and chaining - * an infinite number of parsers - * - * Another way would be to have "well-known" caps properties to specify - * whether a stream has been parsed or not. - * * currently we fail. aacparse uses 'framed' and mp3parse uses 'parsed' - */ - /* FIXME : Re-enable once parser situation is un-$#*@(%$#ed */ -#if 0 - /* Parser. - * FIXME : identify smart parsers (used for re-encoding) */ sgroup->parser = _get_parser (ebin, sprof); if (sgroup->parser != NULL) { @@ -1144,7 +1105,6 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof, goto parser_link_failure; last = sgroup->parser; } -#endif /* Stream combiner */ sgroup->combiner = g_object_new (GST_TYPE_STREAM_COMBINER, NULL); @@ -1462,11 +1422,9 @@ combiner_link_failure: GST_ERROR_OBJECT (ebin, "Failure linking to the combiner"); goto cleanup; -#if 0 parser_link_failure: GST_ERROR_OBJECT (ebin, "Failure linking the parser"); goto cleanup; -#endif converter_link_failure: GST_ERROR_OBJECT (ebin, "Failure linking the video converters");