X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=gst-plugins-base-subtitles0.10%2Fdebian%2Fpatches%2F0002-playback-make-uridecodebin-and-decodebin2-implement-.patch;fp=gst-plugins-base-subtitles0.10%2Fdebian%2Fpatches%2F0002-playback-make-uridecodebin-and-decodebin2-implement-.patch;h=3c4a8233287abb8e93f008beb9f7d3ab0b5b656f;hb=57ba96e291a055f69dbfd4ae9f1ae2390e36986e;hp=0000000000000000000000000000000000000000;hpb=be2c98fb83895d10ac44af7b9a9c3e00ca54bf49;p=mafwsubrenderer diff --git a/gst-plugins-base-subtitles0.10/debian/patches/0002-playback-make-uridecodebin-and-decodebin2-implement-.patch b/gst-plugins-base-subtitles0.10/debian/patches/0002-playback-make-uridecodebin-and-decodebin2-implement-.patch new file mode 100644 index 0000000..3c4a823 --- /dev/null +++ b/gst-plugins-base-subtitles0.10/debian/patches/0002-playback-make-uridecodebin-and-decodebin2-implement-.patch @@ -0,0 +1,133 @@ +From 43667763dd6e5aa95fea97651a3355981d3bce8e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= +Date: Fri, 22 May 2009 20:10:00 +0100 +Subject: [PATCH] playback: make uridecodebin and decodebin2 implement the + tagreader interface + +.. so they can proxy the configured tag reading mode to any elements they +auto-plug. Tagreadbin will use this. +--- + gst/playback/Makefile.am | 1 + + gst/playback/gstdecodebin2.c | 16 ++++++++++++++++ + gst/playback/gsturidecodebin.c | 13 ++++++++++++- + 3 files changed, 29 insertions(+), 1 deletions(-) + +diff --git a/gst/playback/Makefile.am b/gst/playback/Makefile.am +index 3adb56d..2c336f3 100644 +--- a/gst/playback/Makefile.am ++++ b/gst/playback/Makefile.am +@@ -44,6 +44,7 @@ nodist_libgstdecodebin2_la_SOURCES = $(built_sources) + libgstdecodebin2_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) + libgstdecodebin2_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) + libgstdecodebin2_la_LIBADD = \ ++ $(top_builddir)/gst-libs/gst/tag/libgsttag-@GST_MAJORMINOR@.la \ + $(top_builddir)/gst-libs/gst/pbutils/libgstpbutils-@GST_MAJORMINOR@.la \ + $(GST_LIBS) + libgstdecodebin2_la_LIBTOOLFLAGS = --tag=disable-static +diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c +index 31b5ebb..e73d3b7 100644 +--- a/gst/playback/gstdecodebin2.c ++++ b/gst/playback/gstdecodebin2.c +@@ -88,6 +88,7 @@ + #include + #include + #include ++#include + + #include "gstplay-marshal.h" + #include "gstplay-enum.h" +@@ -170,6 +171,7 @@ struct _GstDecodeBin + GList *blocked_pads; /* pads that have set to block */ + + gboolean expose_allstreams; /* Whether to expose unknow type streams or not */ ++ GstTagReadingMode tag_mode; + }; + + struct _GstDecodeBinClass +@@ -510,6 +512,8 @@ gst_decode_bin_get_type (void) + gst_decode_bin_type = + g_type_register_static (GST_TYPE_BIN, "GstDecodeBin2", + &gst_decode_bin_info, 0); ++ ++ gst_tag_reader_add_interface_to_type (gst_decode_bin_type); + } + + return gst_decode_bin_type; +@@ -1742,6 +1746,15 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstDecodePad * dpad, + continue; + } + ++ /* if it's a tag reader, configure the tag reading mode */ ++ if (dbin->tag_mode != GST_TAG_READING_MODE_DEFAULT && ++ GST_IS_TAG_READER (element)) { ++ GST_DEBUG_OBJECT (dbin, "setting tag reading mode %d on element %s", ++ dbin->tag_mode, GST_ELEMENT_NAME (element)); ++ gst_tag_reader_set_tag_reading_mode (GST_TAG_READER (element), ++ dbin->tag_mode); ++ } ++ + /* ... activate it ... We do this before adding it to the bin so that we + * don't accidentally make it post error messages that will stop + * everything. */ +@@ -3645,6 +3658,9 @@ gst_decode_bin_change_state (GstElement * element, GstStateChange transition) + + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: ++ dbin->tag_mode = ++ gst_tag_reader_get_tag_reading_mode (GST_TAG_READER (dbin)); ++ GST_LOG_OBJECT (dbin, "tag reading mode: %d", dbin->tag_mode); + if (dbin->typefind == NULL) + goto missing_typefind; + break; +diff --git a/gst/playback/gsturidecodebin.c b/gst/playback/gsturidecodebin.c +index bf10583..8c4e3f2 100644 +--- a/gst/playback/gsturidecodebin.c ++++ b/gst/playback/gsturidecodebin.c +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + #include "gstplay-marshal.h" + #include "gstplay-enum.h" +@@ -104,6 +105,8 @@ struct _GstURIDecodeBin + gboolean expose_allstreams; /* Whether to expose unknow type streams or not */ + + guint64 ring_buffer_max_size; /* 0 means disabled */ ++ ++ GstTagReadingMode tag_mode; + }; + + struct _GstURIDecodeBinClass +@@ -186,7 +189,8 @@ enum + static guint gst_uri_decode_bin_signals[LAST_SIGNAL] = { 0 }; + + GType gst_uri_decode_bin_get_type (void); +-GST_BOILERPLATE (GstURIDecodeBin, gst_uri_decode_bin, GstBin, GST_TYPE_BIN); ++GST_BOILERPLATE_FULL (GstURIDecodeBin, gst_uri_decode_bin, GstBin, ++ GST_TYPE_BIN, gst_tag_reader_add_interface_to_type); + + static void remove_decoders (GstURIDecodeBin * bin, gboolean force); + static void gst_uri_decode_bin_set_property (GObject * object, guint prop_id, +@@ -1544,6 +1548,10 @@ make_decoder (GstURIDecodeBin * decoder) + if (decodebin->numsinkpads == 0) + goto no_typefind; + ++ /* configure tag reading mode */ ++ gst_tag_reader_set_tag_reading_mode (GST_TAG_READER (decodebin), ++ decoder->tag_mode); ++ + /* connect signals to proxy */ + g_signal_connect (decodebin, "unknown-type", + G_CALLBACK (proxy_unknown_type_signal), decoder); +@@ -2385,6 +2393,9 @@ gst_uri_decode_bin_change_state (GstElement * element, + + switch (transition) { + case GST_STATE_CHANGE_READY_TO_PAUSED: ++ decoder->tag_mode = ++ gst_tag_reader_get_tag_reading_mode (GST_TAG_READER (decoder)); ++ GST_LOG_OBJECT (decoder, "tag reading mode: %d", decoder->tag_mode); + if (!setup_source (decoder)) + goto source_failed; + break;