diff options
author | Slávek Banko <[email protected]> | 2016-03-11 02:18:15 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2016-03-11 02:18:33 +0100 |
commit | d1cc150bfea709ed875cd03d15d169f922c24178 (patch) | |
tree | 044fe345830fc7e60252613f31eec9cb160cde80 | |
parent | d943a1cf86dfa179af54fc9dbbbd9c231a01fa6b (diff) | |
download | kaffeine-d1cc150bfea709ed875cd03d15d169f922c24178.tar.gz kaffeine-d1cc150bfea709ed875cd03d15d169f922c24178.zip |
Use GST_CHECK_VERSION instead of extra definition
Signed-off-by: Slávek Banko <[email protected]>
(cherry picked from commit 68a765485d7562dd85f3448996f454a3afe6915e)
-rw-r--r-- | config.h.in | 3 | ||||
-rw-r--r-- | kaffeine/configure.in.in | 1 | ||||
-rw-r--r-- | kaffeine/src/player-parts/gstreamer-part/gstreamer_part.cpp | 5 | ||||
-rw-r--r-- | kaffeine/src/player-parts/gstreamer-part/timer.cpp | 4 | ||||
-rw-r--r-- | kaffeine/src/player-parts/gstreamer-part/video.cpp | 9 |
5 files changed, 9 insertions, 13 deletions
diff --git a/config.h.in b/config.h.in index 1afeb9a..88dc36a 100644 --- a/config.h.in +++ b/config.h.in @@ -24,9 +24,6 @@ /* DVB headers installed */ #undef HAVE_DVB -/* Defined if GStreamer is 1.x */ -#undef HAVE_GSTREAMER_1 - /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H diff --git a/kaffeine/configure.in.in b/kaffeine/configure.in.in index fab9603..001ba9a 100644 --- a/kaffeine/configure.in.in +++ b/kaffeine/configure.in.in @@ -205,7 +205,6 @@ if test "$with_gstreamer" != "no" ; then CFLAGS_GSTREAMER=`"$PKG_CONFIG" --cflags gstreamer-1.0 gstreamer-plugins-base-1.0` LIB_GSTREAMER=`"$PKG_CONFIG" --libs gstreamer-1.0 gstreamer-plugins-base-1.0` LIB_GSTOVERLAY='-lgstvideo-1.0' - AC_DEFINE(HAVE_GSTREAMER_1, 1, [Defined if GStreamer is 1.x]) AC_MSG_RESULT([yes]) else if "$PKG_CONFIG" --exists "gstreamer-0.10 gstreamer-plugins-base-0.10"; then diff --git a/kaffeine/src/player-parts/gstreamer-part/gstreamer_part.cpp b/kaffeine/src/player-parts/gstreamer-part/gstreamer_part.cpp index f9ed207..28ecfbf 100644 --- a/kaffeine/src/player-parts/gstreamer-part/gstreamer_part.cpp +++ b/kaffeine/src/player-parts/gstreamer-part/gstreamer_part.cpp @@ -38,7 +38,6 @@ #include <tqfile.h> #include <tqtooltip.h> -#include "config.h" #include "gstreamer_part.h" #include "gstreamer_part.moc" #include "playlistimport.h" @@ -766,7 +765,7 @@ bool GStreamerPart::initGStreamer() /* check for visualization plugins */ GList* factories = gst_registry_get_feature_list( -#ifdef HAVE_GSTREAMER_1 +#if GST_CHECK_VERSION(1,0,0) gst_registry_get (), #else gst_registry_get_default (), @@ -774,7 +773,7 @@ bool GStreamerPart::initGStreamer() GST_TYPE_ELEMENT_FACTORY); TQString name, cat; while ( factories ) { -#ifdef HAVE_GSTREAMER_1 +#if GST_CHECK_VERSION(1,0,0) name = GST_OBJECT_NAME(factories->data); #else name = GST_PLUGIN_FEATURE_NAME(factories->data); diff --git a/kaffeine/src/player-parts/gstreamer-part/timer.cpp b/kaffeine/src/player-parts/gstreamer-part/timer.cpp index 7ef268d..2399641 100644 --- a/kaffeine/src/player-parts/gstreamer-part/timer.cpp +++ b/kaffeine/src/player-parts/gstreamer-part/timer.cpp @@ -133,7 +133,7 @@ void Timer::slotUpdate() return; if ( gst_element_query_duration( m_play, -#ifdef HAVE_GSTREAMER_1 +#if GST_CHECK_VERSION(1,0,0) fmt, #else &fmt, @@ -144,7 +144,7 @@ void Timer::slotUpdate() } if ( !gst_element_query_position( m_play, -#ifdef HAVE_GSTREAMER_1 +#if GST_CHECK_VERSION(1,0,0) fmt, #else &fmt, diff --git a/kaffeine/src/player-parts/gstreamer-part/video.cpp b/kaffeine/src/player-parts/gstreamer-part/video.cpp index dee1d14..1cb28a4 100644 --- a/kaffeine/src/player-parts/gstreamer-part/video.cpp +++ b/kaffeine/src/player-parts/gstreamer-part/video.cpp @@ -34,7 +34,8 @@ #include <tdemenubar.h> #include <kdebug.h> -#ifdef HAVE_GSTREAMER_1 +#include <gst/gst.h> +#if GST_CHECK_VERSION(1,0,0) #include <gst/video/videooverlay.h> #else #include <gst/interfaces/xoverlay.h> @@ -71,7 +72,7 @@ void VideoWindow::setPlaybin( GstElement *play ) VideoWindow::~VideoWindow() { -#ifdef HAVE_GSTREAMER_1 +#if GST_CHECK_VERSION(1,0,0) if ( m_element && GST_IS_VIDEO_OVERLAY(m_element) ) { gst_video_overlay_set_window_handle( GST_VIDEO_OVERLAY(m_element), 0 ); } @@ -90,7 +91,7 @@ VideoWindow::~VideoWindow() void VideoWindow::refresh() { /* expose overlay */ -#ifdef HAVE_GSTREAMER_1 +#if GST_CHECK_VERSION(1,0,0) if ( m_element && GST_IS_VIDEO_OVERLAY(m_element) ) { gst_video_overlay_set_window_handle( GST_VIDEO_OVERLAY (m_element), winId() ); gst_video_overlay_expose( GST_VIDEO_OVERLAY (m_element) ); @@ -183,7 +184,7 @@ void VideoWindow::newState() GstCaps *caps; g_object_get( info, "object", &pad, NULL ); if ( -#ifdef HAVE_GSTREAMER_1 +#if GST_CHECK_VERSION(1,0,0) (caps=gst_pad_get_current_caps(pad)) #else (caps=gst_pad_get_negotiated_caps(pad)) |