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