complete GStreamer 1.0 patch to cover our earlier GStreamer patch firefox20
authorWolfgang Rosenauer <wr@rosenauer.org>
Mon, 04 Mar 2013 07:35:52 +0100
branchfirefox20
changeset 627 cc7671532e60
parent 626 e3b03c331906
child 628 c94a8d7d28ae
complete GStreamer 1.0 patch to cover our earlier GStreamer patch
mozilla-gstreamer-1.patch
--- a/mozilla-gstreamer-1.patch	Mon Mar 04 07:34:56 2013 +0100
+++ b/mozilla-gstreamer-1.patch	Mon Mar 04 07:35:52 2013 +0100
@@ -1,5 +1,5 @@
 # HG changeset patch
-# Parent fb80f99ca86bacbcddaf203f7183e0456f194811
+# Parent 0559be6b60075e1a708ca90e874f922ff200c462
 # User Mike Gorse <mgorse@suse.com>
 
 Bug 806917 - support GStreamer 1.0
@@ -51,6 +51,31 @@
         _SAVE_LDFLAGS=$LDFLAGS
         LDFLAGS="$LDFLAGS $GSTREAMER_LIBS -lgstvideo-$GST_API_VERSION"
         AC_TRY_LINK(,[return 0;],_HAVE_LIBGSTVIDEO=1,_HAVE_LIBGSTVIDEO=)
+diff --git a/content/media/gstreamer/GStreamerFormatHelper.cpp b/content/media/gstreamer/GStreamerFormatHelper.cpp
+--- a/content/media/gstreamer/GStreamerFormatHelper.cpp
++++ b/content/media/gstreamer/GStreamerFormatHelper.cpp
+@@ -141,17 +141,21 @@ bool GStreamerFormatHelper::HaveElements
+     }
+     g_list_free(list);
+   }
+ 
+   return true;
+ }
+ 
+ GList* GStreamerFormatHelper::GetFactories() {
++#if GST_VERSION_MAJOR == 1
++  uint32_t cookie = gst_registry_get_feature_list_cookie(gst_registry_get());
++#else
+   uint32_t cookie = gst_default_registry_get_feature_list_cookie ();
++#endif
+   if (cookie != mCookie) {
+     g_list_free(mFactories);
+     mFactories = gst_element_factory_list_get_elements
+         (GST_ELEMENT_FACTORY_TYPE_DEMUXER | GST_ELEMENT_FACTORY_TYPE_DECODER,
+          GST_RANK_MARGINAL);
+     mCookie = cookie;
+   }
+ 
 diff --git a/content/media/gstreamer/GStreamerReader.cpp b/content/media/gstreamer/GStreamerReader.cpp
 --- a/content/media/gstreamer/GStreamerReader.cpp
 +++ b/content/media/gstreamer/GStreamerReader.cpp