From 284fec1d12473ae3c7b9fab85066149f22425689 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Tue, 6 Sep 2011 20:13:30 +0200 Subject: [PATCH 01/13] docs: activate overrides file to fix make distcheck --- docs/libs/Makefile.am | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/libs/Makefile.am b/docs/libs/Makefile.am index ba92fc5212..08cf8cb012 100644 --- a/docs/libs/Makefile.am +++ b/docs/libs/Makefile.am @@ -105,8 +105,6 @@ GTKDOC_CC=$(LIBTOOL) --tag=CC --mode=compile $(CC) GTKDOC_LD=$(LIBTOOL) --tag=CC --mode=link $(CC) # If you need to override some of the declarations, place them in this file -# and uncomment this line. -#DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt -DOC_OVERRIDES = +DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt include $(top_srcdir)/common/gtk-doc.mak From f6ed715293562fa0c796acf10cab75c003471006 Mon Sep 17 00:00:00 2001 From: Christian Fredrik Kalager Schaller Date: Tue, 6 Sep 2011 19:18:27 +0100 Subject: [PATCH 02/13] Add latest files to spec file --- gst-plugins-base.spec.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst-plugins-base.spec.in b/gst-plugins-base.spec.in index 278add141a..fca3482dc9 100644 --- a/gst-plugins-base.spec.in +++ b/gst-plugins-base.spec.in @@ -223,6 +223,9 @@ GStreamer Plugins Base library development and header files. %{_includedir}/gstreamer-%{majorminor}/gst/pbutils/gstpluginsbaseversion.h %{_includedir}/gstreamer-%{majorminor}/gst/tag/xmpwriter.h %{_includedir}/gstreamer-%{majorminor}/gst/audio/gstaudioiec61937.h +%{_includedir}/gstreamer-%{majorminor}/gst/audio/gstaudiodecoder.h +%{_includedir}/gstreamer-%{majorminor}/gst/audio/gstaudioencoder.h +%{_includedir}/gstreamer-%{majorminor}/gst/tag/gsttagmux.h %{_libdir}/libgstfft-%{majorminor}.so %{_libdir}/libgstrtsp-%{majorminor}.so @@ -283,6 +286,7 @@ GStreamer Plugins Base library development and header files. # gtk-doc documentation %doc %{_datadir}/gtk-doc/html/gst-plugins-base-libs-%{majorminor} %doc %{_datadir}/gtk-doc/html/gst-plugins-base-plugins-%{majorminor} +%doc %{_datadir}/gst-plugins-base/license-translations.dict %changelog * Fri Dec 15 2006 Thomas Vander Stichele From 07e118ff240086c2532f8b5951e145b21082fa1c Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Tue, 6 Sep 2011 21:24:33 +0200 Subject: [PATCH 03/13] Automatic update of common submodule From a39eb83 to 11f0cd5 --- common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common b/common index a39eb835fb..11f0cd5a3f 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit a39eb835fb3be2a4c5a6a89b5ca5cc064e79b2e2 +Subproject commit 11f0cd5a3fba36f85cf3e434150bfe66b1bf08d4 From cea0ac790f900c79227a4df0c52efaa6b5a1efbd Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Wed, 7 Sep 2011 11:06:44 +0100 Subject: [PATCH 04/13] theoraenc: do not automatically override quality when using target bitrate If both quality and bitrate are set, libtheora will try to meet both constraints, causing it to prefer emitting a smaller number of good frames, to emitting the full number of frames that would not meet the requested quality. This causes a slideshow effect when the bitrate is low and the quality is high. And the default theoraenc is high (48/63). So only set quality when it is requested, and leave it unset otherwise. https://bugzilla.gnome.org/show_bug.cgi?id=658443 --- ext/theora/gsttheoraenc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ext/theora/gsttheoraenc.c b/ext/theora/gsttheoraenc.c index 5caf262a9b..7610e9bc47 100644 --- a/ext/theora/gsttheoraenc.c +++ b/ext/theora/gsttheoraenc.c @@ -508,7 +508,13 @@ theora_enc_reset (GstTheoraEnc * enc) GST_OBJECT_LOCK (enc); enc->info.target_bitrate = enc->video_bitrate; - enc->info.quality = enc->video_quality; + if (enc->quality_changed) { + enc->info.quality = enc->video_quality; + } else { + if (enc->video_bitrate == 0) { + enc->info.quality = enc->video_quality; + } + } enc->bitrate_changed = FALSE; enc->quality_changed = FALSE; GST_OBJECT_UNLOCK (enc); From f93748fbd496953409b8e0815ac6a27b2ad5367c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 7 Sep 2011 12:32:01 +0100 Subject: [PATCH 05/13] decodebin2: fix element factory refcounting g_value_get_object() does not give us our own ref. Fixes "Trying to dispose object "flacparse", but it still has a parent "registry0". You need to let the parent manage the object instead of unreffing the object directly." and similar warnings. https://bugzilla.gnome.org/show_bug.cgi?id=658416 --- gst/playback/gstdecodebin2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 2312230f3e..322ae285f3 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -1802,10 +1802,8 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstDecodePad * dpad, } templs = g_list_next (templs); } - if (skip) { - gst_object_unref (factory); + if (skip) continue; - } } /* If the factory is for a parser we first check if the factory From 2d1dd857aa5ef92c579de6cb4a0ba566bf1b1cbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 7 Sep 2011 14:10:46 +0200 Subject: [PATCH 06/13] audiorate: Use complete audio caps, including the endianness field --- tests/check/elements/audiorate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/check/elements/audiorate.c b/tests/check/elements/audiorate.c index 7845672fc6..55b67032fc 100644 --- a/tests/check/elements/audiorate.c +++ b/tests/check/elements/audiorate.c @@ -409,7 +409,8 @@ GST_START_TEST (test_large_discont) audiorate = gst_check_setup_element ("audiorate"); caps = gst_caps_new_simple ("audio/x-raw-float", "channels", G_TYPE_INT, 1, - "rate", G_TYPE_INT, 44100, "width", G_TYPE_INT, 32, NULL); + "rate", G_TYPE_INT, 44100, "width", G_TYPE_INT, 32, + "endianness", G_TYPE_INT, G_BYTE_ORDER, NULL); srcpad = gst_check_setup_src_pad (audiorate, &srctemplate, caps); sinkpad = gst_check_setup_sink_pad (audiorate, &sinktemplate, caps); From abc96efb2a64825113273da8717964350fbca5cd Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Wed, 7 Sep 2011 14:04:10 +0200 Subject: [PATCH 07/13] docs: add two mising enum docs --- gst/audiotestsrc/gstaudiotestsrc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/audiotestsrc/gstaudiotestsrc.h b/gst/audiotestsrc/gstaudiotestsrc.h index 529ad63c3e..2b51891220 100644 --- a/gst/audiotestsrc/gstaudiotestsrc.h +++ b/gst/audiotestsrc/gstaudiotestsrc.h @@ -51,6 +51,8 @@ G_BEGIN_DECLS * @GST_AUDIO_TEST_SRC_WAVE_TICKS: periodic ticks * @GST_AUDIO_TEST_SRC_WAVE_GAUSSIAN_WHITE_NOISE: white (zero mean) Gaussian noise; volume sets the standard deviation of the noise in units of the range of values of the sample type, e.g. volume=0.1 produces noise with a standard deviation of 0.1*32767=3277 with 16-bit integer samples, or 0.1*1.0=0.1 with floating-point samples. * @GST_AUDIO_TEST_SRC_WAVE_RED_NOISE: red (brownian) noise + * @GST_AUDIO_TEST_SRC_WAVE_BLUE_NOISE: spectraly inverted pink noise + * @GST_AUDIO_TEST_SRC_WAVE_VIOLET_NOISE: spectraly inverted red (brownian) noise * * Different types of supported sound waves. */ From 950af0438bfaf005a7d303dc0b7f8bbcbfd8eef0 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Wed, 7 Sep 2011 14:07:00 +0200 Subject: [PATCH 08/13] docs: cleanup makefiles Remove commented out parts that we don't need. Remove "the wingo addition" - no so useful after all. Narrow down file-globs for plugin docs. --- docs/libs/Makefile.am | 63 ++++++++++------------------------------ docs/plugins/Makefile.am | 40 ++++--------------------- 2 files changed, 22 insertions(+), 81 deletions(-) diff --git a/docs/libs/Makefile.am b/docs/libs/Makefile.am index 08cf8cb012..81955a1246 100644 --- a/docs/libs/Makefile.am +++ b/docs/libs/Makefile.am @@ -13,43 +13,17 @@ FORMATS=html html: html-build.stamp include $(top_srcdir)/common/upload-doc.mak -# generated basefiles -#basefiles = \ -## $(DOC_MODULE).types \ -# $(DOC_MODULE)-sections.txt \ -# $(DOC_MODULE)-docs.sgml - -# ugly hack to make -unused.sgml work -#unused-build.stamp: -# BUILDDIR=`pwd` && \ -# cd $(srcdir)/tmpl && \ -# ln -sf gstreamer-libs-unused.sgml \ -# $$BUILDDIR/tmpl/gstreamer-libs-@GST_MAJORMINOR@-unused.sgml -# touch unused-build.stamp - -# these rules are added to create parallel docs using GST_MAJORMINOR -#$(basefiles): gstreamer-libs-@GST_MAJORMINOR@%: gstreamer-libs% -# cp $< $@ - -#CLEANFILES = $(basefiles) - # The top-level SGML file. Change it if you want. DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml -# The directory containing the source code. Relative to $(top_srcdir). +# The directory containing the source code. # gtk-doc will search all .c & .h files beneath here for inline comments # documenting functions and macros. DOC_SOURCE_DIR=$(top_srcdir)/gst-libs/gst -DOC_BUILD_DIR=$(top_builddir)/gst-libs/gst # Extra options to supply to gtkdoc-scan. SCAN_OPTIONS=--deprecated-guards="GST_DISABLE_DEPRECATED" -# FIXME : -# there's something wrong with gstreamer-sections.txt not being in the dist -# maybe it doesn't resolve; we're adding it below for now -#EXTRA_DIST = gstreamer.types.in gstreamer.hierarchy $(DOC_MODULE)-sections.txt gstreamer-sections.txt $(DOC_MAIN_SGML_FILE) - # Extra options to supply to gtkdoc-mkdb. MKDB_OPTIONS=--sgml-mode --output-format=xml @@ -58,25 +32,8 @@ FIXXREF_OPTIONS=--extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html \ --extra-dir=$(GST_PREFIX)/share/gtk-doc/html # Used for dependencies. -HFILE_GLOB=$(DOC_SOURCE_DIR)/*/*.h -CFILE_GLOB=$(DOC_SOURCE_DIR)/*/*.c - -# this is a wingo addition -# thomasvs: another nice wingo addition would be an explanation on why -# this is useful ;) - -SCANOBJ_DEPS = \ - $(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-@GST_MAJORMINOR@.la \ - $(top_builddir)/gst-libs/gst/audio/libgstaudio-@GST_MAJORMINOR@.la \ - $(top_builddir)/gst-libs/gst/cdda/libgstcdda-@GST_MAJORMINOR@.la \ - $(top_builddir)/gst-libs/gst/fft/libgstfft-@GST_MAJORMINOR@.la \ - $(top_builddir)/gst-libs/gst/rtp/libgstrtp-@GST_MAJORMINOR@.la \ - $(top_builddir)/gst-libs/gst/rtsp/libgstrtsp-@GST_MAJORMINOR@.la \ - $(top_builddir)/gst-libs/gst/sdp/libgstsdp-@GST_MAJORMINOR@.la \ - $(top_builddir)/gst-libs/gst/tag/libgsttag-@GST_MAJORMINOR@.la \ - $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_MAJORMINOR@.la \ - $(top_builddir)/gst-libs/gst/app/libgstapp-@GST_MAJORMINOR@.la \ - $(top_builddir)/gst-libs/gst/pbutils/libgstpbutils-@GST_MAJORMINOR@.la +HFILE_GLOB=$(top_srcdir)/gst-libs/gst/*/*.h +CFILE_GLOB=$(top_srcdir)/gst-libs/gst/*/*.c # Header files to ignore when scanning. IGNORE_HFILES = pbutils-private.h gsttageditingprivate.h id3v2.h \ @@ -99,7 +56,19 @@ extra_files = # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib # contains GtkObjects/GObjects and you want to document signals and properties. GTKDOC_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) -GTKDOC_LIBS = $(SCANOBJ_DEPS) $(GST_BASE_LIBS) +GTKDOC_LIBS = \ + $(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-@GST_MAJORMINOR@.la \ + $(top_builddir)/gst-libs/gst/audio/libgstaudio-@GST_MAJORMINOR@.la \ + $(top_builddir)/gst-libs/gst/cdda/libgstcdda-@GST_MAJORMINOR@.la \ + $(top_builddir)/gst-libs/gst/fft/libgstfft-@GST_MAJORMINOR@.la \ + $(top_builddir)/gst-libs/gst/rtp/libgstrtp-@GST_MAJORMINOR@.la \ + $(top_builddir)/gst-libs/gst/rtsp/libgstrtsp-@GST_MAJORMINOR@.la \ + $(top_builddir)/gst-libs/gst/sdp/libgstsdp-@GST_MAJORMINOR@.la \ + $(top_builddir)/gst-libs/gst/tag/libgsttag-@GST_MAJORMINOR@.la \ + $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_MAJORMINOR@.la \ + $(top_builddir)/gst-libs/gst/app/libgstapp-@GST_MAJORMINOR@.la \ + $(top_builddir)/gst-libs/gst/pbutils/libgstpbutils-@GST_MAJORMINOR@.la \ + $(GST_BASE_LIBS) GTKDOC_CC=$(LIBTOOL) --tag=CC --mode=compile $(CC) GTKDOC_LD=$(LIBTOOL) --tag=CC --mode=link $(CC) diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am index c987b85bf3..ff418ec0b9 100644 --- a/docs/plugins/Makefile.am +++ b/docs/plugins/Makefile.am @@ -13,33 +13,13 @@ FORMATS=html html: html-build.stamp include $(top_srcdir)/common/upload-doc.mak -# generated basefiles -#basefiles = \ -## $(DOC_MODULE).types \ -# $(DOC_MODULE)-sections.txt \ -# $(DOC_MODULE)-docs.sgml - -# ugly hack to make -unused.sgml work -#unused-build.stamp: -# BUILDDIR=`pwd` && \ -# cd $(srcdir)/tmpl && \ -# ln -sf gstreamer-libs-unused.sgml \ -# $$BUILDDIR/tmpl/gstreamer-libs-@GST_MAJORMINOR@-unused.sgml -# touch unused-build.stamp - -# these rules are added to create parallel docs using GST_MAJORMINOR -#$(basefiles): gstreamer-libs-@GST_MAJORMINOR@%: gstreamer-libs% -# cp $< $@ - -#CLEANFILES = $(basefiles) - # The top-level SGML file. Change it if you want. DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml -# The directory containing the source code. Relative to $(top_srcdir). +# The directory containing the source code. # gtk-doc will search all .c & .h files beneath here for inline comments # documenting functions and macros. -DOC_SOURCE_DIR = $(top_srcdir) +DOC_SOURCE_DIR = $(top_srcdir)/gst $(top_srcdir)/ext $(top_srcdir)/sys # Extra options to supply to gtkdoc-scan. SCAN_OPTIONS= @@ -54,14 +34,8 @@ FIXXREF_OPTIONS=--extra-dir=$(top_builddir)/docs/libs/html \ --extra-dir=$(datadir)/gtk-doc/html # Used for dependencies. -HFILE_GLOB=$(DOC_SOURCE_DIR)/*/*/*.h -CFILE_GLOB=$(DOC_SOURCE_DIR)/*/*/*.c - -# this is a wingo addition -# thomasvs: another nice wingo addition would be an explanation on why -# this is useful ;) - -SCANOBJ_DEPS = +HFILE_GLOB=$(top_srcdir)/gst/*/*.h $(top_srcdir)/ext/*/*.h $(top_srcdir)/sys/*/*.h +CFILE_GLOB=$(top_srcdir)/gst/*/*.c $(top_srcdir)/ext/*/*.c $(top_srcdir)/sys/*/*.c # Header files to ignore when scanning. IGNORE_HFILES = avcodec.h gstffmpegcodecmap.h dsputil.h arch.h speex_resampler.h speex_resampler_wrapper.h fixed_arm4.h fixed_arm5e.h fixed_bfin.h fixed_debug.h fixed_generic.h resample_sse.h @@ -139,14 +113,12 @@ extra_files = # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib # contains GtkObjects/GObjects and you want to document signals and properties. GTKDOC_CFLAGS = $(GST_BASE_CFLAGS) -I$(top_builddir) -I$(top_builddir)/gst-libs -GTKDOC_LIBS = $(SCANOBJ_DEPS) $(GST_BASE_LIBS) +GTKDOC_LIBS = $(GST_BASE_LIBS) GTKDOC_CC=$(LIBTOOL) --tag=CC --mode=compile $(CC) GTKDOC_LD=$(LIBTOOL) --tag=CC --mode=link $(CC) # If you need to override some of the declarations, place them in this file -# and uncomment this line. -#DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt -DOC_OVERRIDES = +DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt include $(top_srcdir)/common/gtk-doc-plugins.mak From 46e26824d456af90d6d0a9117b38929af71414d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 7 Sep 2011 14:19:32 +0200 Subject: [PATCH 09/13] decodebin2: Intersect the factory caps with the current caps for the capsfilter Otherwise we'll include many incompatible caps in the capsfilter that will only slow down negotiation. --- gst/playback/gstdecodebin2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 322ae285f3..5c397936a8 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -1555,7 +1555,7 @@ analyze_new_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad, for (i = 0; i < factories->n_values; i++) { GstElementFactory *factory = g_value_get_object (g_value_array_get_nth (factories, i)); - GstCaps *tcaps; + GstCaps *tcaps, *intersection; const GList *tmps; GST_DEBUG ("Trying factory %s", @@ -1572,7 +1572,9 @@ analyze_new_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad, if (st->direction != GST_PAD_SINK || st->presence != GST_PAD_ALWAYS) continue; tcaps = gst_static_pad_template_get_caps (st); - gst_caps_merge (filter_caps, gst_caps_copy (tcaps)); + intersection = + gst_caps_intersect_full (tcaps, caps, GST_CAPS_INTERSECT_FIRST); + gst_caps_merge (filter_caps, intersection); gst_caps_unref (tcaps); } } From a22faad18a73a27a2a0c903748c1a355df4d8c13 Mon Sep 17 00:00:00 2001 From: Josep Torra Date: Wed, 7 Sep 2011 16:04:43 +0200 Subject: [PATCH 10/13] playsink: only add text overlay if vido sink also accepts raw caps Fixes regression, pipeline fails with not negotiated, on media containing subtitles when decoder/sink with custom caps is used. --- gst/playback/gstplaysink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c index 32d0ae79c1..78ef84f545 100644 --- a/gst/playback/gstplaysink.c +++ b/gst/playback/gstplaysink.c @@ -2114,7 +2114,8 @@ gst_play_sink_reconfigure (GstPlaySink * playsink) GST_OBJECT_UNLOCK (playsink); /* figure out which components we need */ - if (flags & GST_PLAY_FLAG_TEXT && playsink->text_pad) { + if (flags & GST_PLAY_FLAG_TEXT && playsink->video_pad_raw + && playsink->text_pad) { /* we have subtitles and we are requested to show it */ need_text = TRUE; } From 9e2ce5bbb56e3ca37652de249ccba64794db900e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 7 Sep 2011 16:43:36 +0200 Subject: [PATCH 11/13] decodebin2: Make sure to fixate Parser/Converter caps before continuing autoplugging --- gst/playback/gstdecodebin2.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 5c397936a8..cde20c2a42 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -1378,13 +1378,14 @@ analyze_new_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad, GstDecodePad *dpad; GstElementFactory *factory; const gchar *classification; - gboolean is_parser_converter; + gboolean is_parser_converter = FALSE; GST_DEBUG_OBJECT (dbin, "Pad %s:%s caps:%" GST_PTR_FORMAT, GST_DEBUG_PAD_NAME (pad), caps); if (chain->elements - && src != ((GstDecodeElement *) chain->elements->data)->element) { + && src != ((GstDecodeElement *) chain->elements->data)->element + && src != ((GstDecodeElement *) chain->elements->data)->capsfilter) { GST_ERROR_OBJECT (dbin, "New pad from not the last element in this chain"); return; } @@ -1595,6 +1596,11 @@ analyze_new_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad, p = gst_element_get_static_pad (delem->capsfilter, "src"); gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (dpad), p); pad = p; + + if (!gst_caps_is_fixed (caps)) { + g_value_array_free (factories); + goto non_fixed; + } } /* 1.h else continue autoplugging something from the list. */ @@ -1705,6 +1711,12 @@ setup_caps_delay: g_signal_connect (G_OBJECT (pad), "notify::caps", G_CALLBACK (caps_notify_cb), chain); CHAIN_MUTEX_UNLOCK (chain); + + /* If we're here because we have a Parser/Converter + * we have to unref the pad */ + if (is_parser_converter) + gst_object_unref (pad); + return; } } From 0e54d2c3438863ec871cc83d815e87fd9826fef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 7 Sep 2011 16:44:04 +0200 Subject: [PATCH 12/13] decodebin2: Don't use bufferalloc in the test elements This will cause not-linked errors that usually don't happen because normal decoders/parsers will set srcpad caps before allocating buffers from downstream. --- tests/check/elements/decodebin2.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/check/elements/decodebin2.c b/tests/check/elements/decodebin2.c index 4523fa6896..f015ef2cb4 100644 --- a/tests/check/elements/decodebin2.c +++ b/tests/check/elements/decodebin2.c @@ -444,6 +444,14 @@ gst_fake_h264_parser_set_caps (GstBaseTransform * trans, GstCaps * incaps, return TRUE; } +static GstFlowReturn +gst_fake_h264_parser_prepare_output_buffer (GstBaseTransform * trans, + GstBuffer * inbuf, gint size, GstCaps * caps, GstBuffer ** outbuf) +{ + *outbuf = gst_buffer_ref (inbuf); + return GST_FLOW_OK; +} + static void gst_fake_h264_parser_class_init (GstFakeH264ParserClass * klass) { @@ -453,6 +461,8 @@ gst_fake_h264_parser_class_init (GstFakeH264ParserClass * klass) basetrans_class->transform_caps = gst_fake_h264_parser_transform_caps; basetrans_class->get_unit_size = gst_fake_h264_parser_get_unit_size; basetrans_class->set_caps = gst_fake_h264_parser_set_caps; + basetrans_class->prepare_output_buffer = + gst_fake_h264_parser_prepare_output_buffer; } static void @@ -537,6 +547,14 @@ gst_fake_h264_decoder_set_caps (GstBaseTransform * trans, GstCaps * incaps, return TRUE; } +static GstFlowReturn +gst_fake_h264_decoder_prepare_output_buffer (GstBaseTransform * trans, + GstBuffer * inbuf, gint size, GstCaps * caps, GstBuffer ** outbuf) +{ + *outbuf = gst_buffer_ref (inbuf); + return GST_FLOW_OK; +} + static void gst_fake_h264_decoder_class_init (GstFakeH264DecoderClass * klass) { @@ -546,6 +564,8 @@ gst_fake_h264_decoder_class_init (GstFakeH264DecoderClass * klass) basetrans_class->transform_caps = gst_fake_h264_decoder_transform_caps; basetrans_class->get_unit_size = gst_fake_h264_decoder_get_unit_size; basetrans_class->set_caps = gst_fake_h264_decoder_set_caps; + basetrans_class->prepare_output_buffer = + gst_fake_h264_decoder_prepare_output_buffer; } static void From 5f5d832a3bcff0828758f164fcb13c4258aefb36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 8 Sep 2011 13:25:27 +0200 Subject: [PATCH 13/13] Revert "decodebin2: Do a subset check before actually using a factory" This reverts commit 50a88396ae6d54a83a10e7d2efd551d39033148e. See bug #658541. --- gst/playback/gstdecodebin2.c | 40 ------------------------------------ 1 file changed, 40 deletions(-) diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index cde20c2a42..17f19f8da3 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -1780,46 +1780,6 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstDecodePad * dpad, /* Remove selected factory from the list. */ g_value_array_remove (factories, 0); - /* Check if the caps are really supported by the factory. The - * factory list is non-empty-subset filtered while caps - * are only accepted by a pad if they are a subset of the - * pad caps. - * - * FIXME: Only do this for fixed caps here. Non-fixed caps - * can happen if a Parser/Converter was autoplugged before - * this. We then assume that it will be able to convert to - * everything that the decoder would want. - * - * A subset check will fail here because the parser caps - * will be generic and while the decoder will only - * support a subset of the parser caps. - */ - if (gst_caps_is_fixed (caps)) { - const GList *templs; - gboolean skip = FALSE; - - templs = gst_element_factory_get_static_pad_templates (factory); - - while (templs) { - GstStaticPadTemplate *templ = (GstStaticPadTemplate *) templs->data; - - if (templ->direction == GST_PAD_SINK) { - GstCaps *templcaps = gst_static_caps_get (&templ->static_caps); - - if (!gst_caps_is_subset (caps, templcaps)) { - gst_caps_unref (templcaps); - skip = TRUE; - break; - } - - gst_caps_unref (templcaps); - } - templs = g_list_next (templs); - } - if (skip) - continue; - } - /* If the factory is for a parser we first check if the factory * was already used for the current chain. If it was used already * we would otherwise create an infinite loop here because the