|
|
|
@ -34,7 +34,11 @@
|
|
|
|
|
#include <tdemenubar.h>
|
|
|
|
|
#include <kdebug.h>
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_GSTREAMER_1
|
|
|
|
|
#include <gst/video/videooverlay.h>
|
|
|
|
|
#else
|
|
|
|
|
#include <gst/interfaces/xoverlay.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include "video.h"
|
|
|
|
|
|
|
|
|
@ -67,9 +71,15 @@ void VideoWindow::setPlaybin( GstElement *play )
|
|
|
|
|
|
|
|
|
|
VideoWindow::~VideoWindow()
|
|
|
|
|
{
|
|
|
|
|
#ifdef HAVE_GSTREAMER_1
|
|
|
|
|
if ( m_element && GST_IS_VIDEO_OVERLAY(m_element) ) {
|
|
|
|
|
gst_video_overlay_set_window_handle( GST_VIDEO_OVERLAY(m_element), 0 );
|
|
|
|
|
}
|
|
|
|
|
#else
|
|
|
|
|
if ( m_element && GST_IS_X_OVERLAY(m_element) ) {
|
|
|
|
|
gst_x_overlay_set_xwindow_id( GST_X_OVERLAY(m_element), 0 );
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
gst_object_unref( GST_OBJECT(m_element) );
|
|
|
|
|
kdDebug() << "VideoWindow: destructed" << endl;
|
|
|
|
@ -80,10 +90,17 @@ VideoWindow::~VideoWindow()
|
|
|
|
|
void VideoWindow::refresh()
|
|
|
|
|
{
|
|
|
|
|
/* expose overlay */
|
|
|
|
|
#ifdef HAVE_GSTREAMER_1
|
|
|
|
|
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) );
|
|
|
|
|
}
|
|
|
|
|
#else
|
|
|
|
|
if ( m_element && GST_IS_X_OVERLAY(m_element) ) {
|
|
|
|
|
gst_x_overlay_set_xwindow_id( GST_X_OVERLAY (m_element), winId() );
|
|
|
|
|
gst_x_overlay_expose( GST_X_OVERLAY (m_element) );
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -165,7 +182,13 @@ void VideoWindow::newState()
|
|
|
|
|
if ( !g_strcasecmp(val->value_nick, "video") ) {
|
|
|
|
|
GstCaps *caps;
|
|
|
|
|
g_object_get( info, "object", &pad, NULL );
|
|
|
|
|
if ( (caps=gst_pad_get_negotiated_caps(pad)) ) {
|
|
|
|
|
if (
|
|
|
|
|
#ifdef HAVE_GSTREAMER_1
|
|
|
|
|
(caps=gst_pad_get_current_caps(pad))
|
|
|
|
|
#else
|
|
|
|
|
(caps=gst_pad_get_negotiated_caps(pad))
|
|
|
|
|
#endif
|
|
|
|
|
) {
|
|
|
|
|
newCapsset( caps );
|
|
|
|
|
gst_caps_unref (caps);
|
|
|
|
|
return;
|
|
|
|
|