author | Ivaylo Dimitrov <freemangordon@abv.bg> |
Wed, 13 Feb 2013 10:37:49 -0800 | |
changeset 121773 | 041328ec96515c993c3f94326c3c877ecf5b114e |
parent 121772 | b0c5ea9e93b135533a08957aded71e6b3a3e93c0 |
child 121774 | e754df01a1903b76cce9f6795940d6a00b68d969 |
push id | 24307 |
push user | emorley@mozilla.com |
push date | Thu, 14 Feb 2013 10:47:46 +0000 |
treeherder | mozilla-central@aceeea086ccb [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | alessandro.d |
bugs | 836243 |
milestone | 21.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/configure.in +++ b/configure.in @@ -5715,19 +5715,17 @@ MOZ_ARG_ENABLE_BOOL(gstreamer, [ --enable-gstreamer Enable GStreamer support], MOZ_GSTREAMER=1, MOZ_GSTREAMER=) if test "$MOZ_GSTREAMER"; then # API version, eg 0.10, 1.0 etc GST_API_VERSION=0.10 # core/base release number - # depend on >= 0.10.33 as that's when the playbin2 source-setup signal was - # introduced - GST_VERSION=0.10.33 + GST_VERSION=0.10.25 PKG_CHECK_MODULES(GSTREAMER, gstreamer-$GST_API_VERSION >= $GST_VERSION gstreamer-app-$GST_API_VERSION gstreamer-plugins-base-$GST_API_VERSION) if test -n "$GSTREAMER_LIBS"; then _SAVE_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $GSTREAMER_LIBS -lgstvideo-$GST_API_VERSION" AC_TRY_LINK(,[return 0;],_HAVE_LIBGSTVIDEO=1,_HAVE_LIBGSTVIDEO=)
--- a/content/media/gstreamer/GStreamerReader.cpp +++ b/content/media/gstreamer/GStreamerReader.cpp @@ -83,16 +83,18 @@ GStreamerReader::GStreamerReader(Abstrac GStreamerReader::~GStreamerReader() { MOZ_COUNT_DTOR(GStreamerReader); ResetDecode(); if (mPlayBin) { gst_app_src_end_of_stream(mSource); + if (mSource) + gst_object_unref(mSource); gst_element_set_state(mPlayBin, GST_STATE_NULL); gst_object_unref(mPlayBin); mPlayBin = NULL; mVideoSink = NULL; mVideoAppSink = NULL; mAudioSink = NULL; mAudioAppSink = NULL; gst_object_unref(mBus); @@ -155,28 +157,31 @@ nsresult GStreamerReader::Init(MediaDeco G_CALLBACK(&GStreamerReader::EventProbeCb), this); gst_object_unref(sinkpad); g_object_set(mPlayBin, "uri", "appsrc://", "video-sink", mVideoSink, "audio-sink", mAudioSink, NULL); - g_object_connect(mPlayBin, "signal::source-setup", - GStreamerReader::PlayBinSourceSetupCb, this, NULL); + g_signal_connect(G_OBJECT(mPlayBin), "notify::source", + G_CALLBACK(GStreamerReader::PlayBinSourceSetupCb), this); return NS_OK; } void GStreamerReader::PlayBinSourceSetupCb(GstElement *aPlayBin, - GstElement *aSource, + GParamSpec *pspec, gpointer aUserData) { + GstElement *source; GStreamerReader *reader = reinterpret_cast<GStreamerReader*>(aUserData); - reader->PlayBinSourceSetup(GST_APP_SRC(aSource)); + + g_object_get(aPlayBin, "source", &source, NULL); + reader->PlayBinSourceSetup(GST_APP_SRC(source)); } void GStreamerReader::PlayBinSourceSetup(GstAppSrc *aSource) { mSource = GST_APP_SRC(aSource); gst_app_src_set_callbacks(mSource, &mSrcCallbacks, (gpointer) this, NULL); MediaResource* resource = mDecoder->GetResource(); int64_t len = resource->GetLength();
--- a/content/media/gstreamer/GStreamerReader.h +++ b/content/media/gstreamer/GStreamerReader.h @@ -52,17 +52,17 @@ private: int64_t QueryDuration(); /* Gst callbacks */ /* Called on the source-setup signal emitted by playbin. Used to * configure appsrc . */ static void PlayBinSourceSetupCb(GstElement *aPlayBin, - GstElement *aSource, + GParamSpec *pspec, gpointer aUserData); void PlayBinSourceSetup(GstAppSrc *aSource); /* Called from appsrc when we need to read more data from the resource */ static void NeedDataCb(GstAppSrc *aSrc, guint aLength, gpointer aUserData); void NeedData(GstAppSrc *aSrc, guint aLength); /* Called when appsrc has enough data and we can stop reading */