Use GST_CHECK_VERSION instead of extra definition

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 8 years ago
parent 53978f4770
commit 68a765485d

@ -24,9 +24,6 @@
/* DVB headers installed */ /* DVB headers installed */
#undef HAVE_DVB #undef HAVE_DVB
/* Defined if GStreamer is 1.x */
#undef HAVE_GSTREAMER_1
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H

@ -205,7 +205,6 @@ if test "$with_gstreamer" != "no" ; then
CFLAGS_GSTREAMER=`"$PKG_CONFIG" --cflags gstreamer-1.0 gstreamer-plugins-base-1.0` 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_GSTREAMER=`"$PKG_CONFIG" --libs gstreamer-1.0 gstreamer-plugins-base-1.0`
LIB_GSTOVERLAY='-lgstvideo-1.0' LIB_GSTOVERLAY='-lgstvideo-1.0'
AC_DEFINE(HAVE_GSTREAMER_1, 1, [Defined if GStreamer is 1.x])
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
else else
if "$PKG_CONFIG" --exists "gstreamer-0.10 gstreamer-plugins-base-0.10"; then if "$PKG_CONFIG" --exists "gstreamer-0.10 gstreamer-plugins-base-0.10"; then

@ -38,7 +38,6 @@
#include <tqfile.h> #include <tqfile.h>
#include <tqtooltip.h> #include <tqtooltip.h>
#include "config.h"
#include "gstreamer_part.h" #include "gstreamer_part.h"
#include "gstreamer_part.moc" #include "gstreamer_part.moc"
#include "playlistimport.h" #include "playlistimport.h"
@ -766,7 +765,7 @@ bool GStreamerPart::initGStreamer()
/* check for visualization plugins */ /* check for visualization plugins */
GList* factories = gst_registry_get_feature_list( GList* factories = gst_registry_get_feature_list(
#ifdef HAVE_GSTREAMER_1 #if GST_CHECK_VERSION(1,0,0)
gst_registry_get (), gst_registry_get (),
#else #else
gst_registry_get_default (), gst_registry_get_default (),
@ -774,7 +773,7 @@ bool GStreamerPart::initGStreamer()
GST_TYPE_ELEMENT_FACTORY); GST_TYPE_ELEMENT_FACTORY);
TQString name, cat; TQString name, cat;
while ( factories ) { while ( factories ) {
#ifdef HAVE_GSTREAMER_1 #if GST_CHECK_VERSION(1,0,0)
name = GST_OBJECT_NAME(factories->data); name = GST_OBJECT_NAME(factories->data);
#else #else
name = GST_PLUGIN_FEATURE_NAME(factories->data); name = GST_PLUGIN_FEATURE_NAME(factories->data);

@ -133,7 +133,7 @@ void Timer::slotUpdate()
return; return;
if ( gst_element_query_duration( m_play, if ( gst_element_query_duration( m_play,
#ifdef HAVE_GSTREAMER_1 #if GST_CHECK_VERSION(1,0,0)
fmt, fmt,
#else #else
&fmt, &fmt,
@ -144,7 +144,7 @@ void Timer::slotUpdate()
} }
if ( !gst_element_query_position( m_play, if ( !gst_element_query_position( m_play,
#ifdef HAVE_GSTREAMER_1 #if GST_CHECK_VERSION(1,0,0)
fmt, fmt,
#else #else
&fmt, &fmt,

@ -34,7 +34,8 @@
#include <tdemenubar.h> #include <tdemenubar.h>
#include <kdebug.h> #include <kdebug.h>
#ifdef HAVE_GSTREAMER_1 #include <gst/gst.h>
#if GST_CHECK_VERSION(1,0,0)
#include <gst/video/videooverlay.h> #include <gst/video/videooverlay.h>
#else #else
#include <gst/interfaces/xoverlay.h> #include <gst/interfaces/xoverlay.h>
@ -71,7 +72,7 @@ void VideoWindow::setPlaybin( GstElement *play )
VideoWindow::~VideoWindow() VideoWindow::~VideoWindow()
{ {
#ifdef HAVE_GSTREAMER_1 #if GST_CHECK_VERSION(1,0,0)
if ( m_element && GST_IS_VIDEO_OVERLAY(m_element) ) { if ( m_element && GST_IS_VIDEO_OVERLAY(m_element) ) {
gst_video_overlay_set_window_handle( GST_VIDEO_OVERLAY(m_element), 0 ); gst_video_overlay_set_window_handle( GST_VIDEO_OVERLAY(m_element), 0 );
} }
@ -90,7 +91,7 @@ VideoWindow::~VideoWindow()
void VideoWindow::refresh() void VideoWindow::refresh()
{ {
/* expose overlay */ /* expose overlay */
#ifdef HAVE_GSTREAMER_1 #if GST_CHECK_VERSION(1,0,0)
if ( m_element && GST_IS_VIDEO_OVERLAY(m_element) ) { if ( m_element && GST_IS_VIDEO_OVERLAY(m_element) ) {
gst_video_overlay_set_window_handle( GST_VIDEO_OVERLAY (m_element), winId() ); gst_video_overlay_set_window_handle( GST_VIDEO_OVERLAY (m_element), winId() );
gst_video_overlay_expose( GST_VIDEO_OVERLAY (m_element) ); gst_video_overlay_expose( GST_VIDEO_OVERLAY (m_element) );
@ -183,7 +184,7 @@ void VideoWindow::newState()
GstCaps *caps; GstCaps *caps;
g_object_get( info, "object", &pad, NULL ); g_object_get( info, "object", &pad, NULL );
if ( if (
#ifdef HAVE_GSTREAMER_1 #if GST_CHECK_VERSION(1,0,0)
(caps=gst_pad_get_current_caps(pad)) (caps=gst_pad_get_current_caps(pad))
#else #else
(caps=gst_pad_get_negotiated_caps(pad)) (caps=gst_pad_get_negotiated_caps(pad))

Loading…
Cancel
Save