mozilla-gstreamer-1.patch
branchfirefox20
changeset 627 cc7671532e60
parent 625 9f6e14430916
child 637 73640b76d6c3
equal deleted inserted replaced
626:e3b03c331906 627:cc7671532e60
     1 # HG changeset patch
     1 # HG changeset patch
     2 # Parent fb80f99ca86bacbcddaf203f7183e0456f194811
     2 # Parent 0559be6b60075e1a708ca90e874f922ff200c462
     3 # User Mike Gorse <mgorse@suse.com>
     3 # User Mike Gorse <mgorse@suse.com>
     4 
     4 
     5 Bug 806917 - support GStreamer 1.0
     5 Bug 806917 - support GStreamer 1.0
     6 
     6 
     7 diff --git a/configure.in b/configure.in
     7 diff --git a/configure.in b/configure.in
    49                        gstreamer-plugins-base-$GST_API_VERSION)
    49                        gstreamer-plugins-base-$GST_API_VERSION)
    50      if test -n "$GSTREAMER_LIBS"; then
    50      if test -n "$GSTREAMER_LIBS"; then
    51         _SAVE_LDFLAGS=$LDFLAGS
    51         _SAVE_LDFLAGS=$LDFLAGS
    52         LDFLAGS="$LDFLAGS $GSTREAMER_LIBS -lgstvideo-$GST_API_VERSION"
    52         LDFLAGS="$LDFLAGS $GSTREAMER_LIBS -lgstvideo-$GST_API_VERSION"
    53         AC_TRY_LINK(,[return 0;],_HAVE_LIBGSTVIDEO=1,_HAVE_LIBGSTVIDEO=)
    53         AC_TRY_LINK(,[return 0;],_HAVE_LIBGSTVIDEO=1,_HAVE_LIBGSTVIDEO=)
       
    54 diff --git a/content/media/gstreamer/GStreamerFormatHelper.cpp b/content/media/gstreamer/GStreamerFormatHelper.cpp
       
    55 --- a/content/media/gstreamer/GStreamerFormatHelper.cpp
       
    56 +++ b/content/media/gstreamer/GStreamerFormatHelper.cpp
       
    57 @@ -141,17 +141,21 @@ bool GStreamerFormatHelper::HaveElements
       
    58      }
       
    59      g_list_free(list);
       
    60    }
       
    61  
       
    62    return true;
       
    63  }
       
    64  
       
    65  GList* GStreamerFormatHelper::GetFactories() {
       
    66 +#if GST_VERSION_MAJOR == 1
       
    67 +  uint32_t cookie = gst_registry_get_feature_list_cookie(gst_registry_get());
       
    68 +#else
       
    69    uint32_t cookie = gst_default_registry_get_feature_list_cookie ();
       
    70 +#endif
       
    71    if (cookie != mCookie) {
       
    72      g_list_free(mFactories);
       
    73      mFactories = gst_element_factory_list_get_elements
       
    74          (GST_ELEMENT_FACTORY_TYPE_DEMUXER | GST_ELEMENT_FACTORY_TYPE_DECODER,
       
    75           GST_RANK_MARGINAL);
       
    76      mCookie = cookie;
       
    77    }
       
    78  
    54 diff --git a/content/media/gstreamer/GStreamerReader.cpp b/content/media/gstreamer/GStreamerReader.cpp
    79 diff --git a/content/media/gstreamer/GStreamerReader.cpp b/content/media/gstreamer/GStreamerReader.cpp
    55 --- a/content/media/gstreamer/GStreamerReader.cpp
    80 --- a/content/media/gstreamer/GStreamerReader.cpp
    56 +++ b/content/media/gstreamer/GStreamerReader.cpp
    81 +++ b/content/media/gstreamer/GStreamerReader.cpp
    57 @@ -69,18 +69,22 @@ GStreamerReader::GStreamerReader(Abstrac
    82 @@ -69,18 +69,22 @@ GStreamerReader::GStreamerReader(Abstrac
    58    MOZ_COUNT_CTOR(GStreamerReader);
    83    MOZ_COUNT_CTOR(GStreamerReader);