From 77561b1a3f1f8ef20c162b0b7880694f101a4acc Mon Sep 17 00:00:00 2001
From: Haikel Guemar <hguemar@fedoraproject.org>
Date: Fri, 10 Jun 2016 14:22:24 +0200
Subject: [PATCH 1/1] Migrate to Gstreamermm 1.0 API
---
configure.ac | 2 +-
src/snd.cpp | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index a713e0a..fa2c4d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,7 +95,7 @@ AC_ARG_ENABLE(sound, [ --enable-sound Enable or disable sound usage (de
use_sound="$enableval", use_sound="yes")
if test $use_sound = yes; then
-PKG_CHECK_MODULES(GSTREAMER, gstreamermm-0.10)
+PKG_CHECK_MODULES(GSTREAMER, gstreamermm-1.0)
AC_SUBST(GSTREAMER_CFLAGS)
AC_SUBST(GSTREAMER_LIBS)
AC_DEFINE([LW_SOUND], 1, [enables sound])
diff --git a/src/snd.cpp b/src/snd.cpp
index 63279cd..aea6497 100644
--- a/src/snd.cpp
+++ b/src/snd.cpp
@@ -32,6 +32,7 @@
#ifdef LW_SOUND
#include <gstreamermm.h>
+#include <gstreamermm/playbin.h>
#endif
//#define debug(x) {std::cerr<<__FILE__<<": "<<__LINE__<<": "<<x<<std::endl<<std::flush;}
@@ -41,8 +42,8 @@ struct Snd::Impl
{
#ifdef LW_SOUND
// currently playing background and foreground piece
- Glib::RefPtr<Gst::PlayBin2> back;
- Glib::RefPtr<Gst::PlayBin2> effect;
+ Glib::RefPtr<Gst::PlayBin> back;
+ Glib::RefPtr<Gst::PlayBin> effect;
#endif
int placeholder;
};
@@ -83,8 +84,8 @@ Snd::Snd()
helper.close();
#ifdef LW_SOUND
- impl->back = Gst::PlayBin2::create();
- impl->effect = Gst::PlayBin2::create();
+ impl->back = Gst::PlayBin::create();
+ impl->effect = Gst::PlayBin::create();
impl->effect->get_bus()->add_watch(sigc::bind(sigc::hide<0>(sigc::mem_fun(*this, &Snd::on_bus_message)), 0));
impl->back->get_bus()->add_watch(sigc::bind(sigc::hide<0>(sigc::mem_fun(*this, &Snd::on_bus_message)), 1));
#endif
--
2.7.4