Use GST_CHECK_VERSION instead of extra definition

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

@ -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

@ -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

@ -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);

@ -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,

@ -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))

Loading…
Cancel
Save