~ubuntu-branches/ubuntu/saucy/phonon-backend-gstreamer/saucy-proposed

« back to all changes in this revision

Viewing changes to gstreamer/x11renderer.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2011-04-15 14:43:30 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110415144330-7uif3319lxdu4ltt
Tags: 4:4.7.0really4.5.0-0ubuntu2
* New upstream release
* Add kubuntu_02_install_codec.diff to fix codec install

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
#ifndef Q_WS_QWS
22
22
 
23
 
#include "common.h"
24
23
#include "backend.h"
25
24
#include "mediaobject.h"
26
 
#include "message.h"
27
25
#include <QtGui/QPalette>
28
26
#include <QtGui/QApplication>
29
27
#include <QtGui/QPainter>
101
99
        }
102
100
    }
103
101
    QByteArray tegraEnv = qgetenv("TEGRA_GST_OPENMAX");
104
 
    if(!tegraEnv.isEmpty())
105
 
    {
106
 
        videoSink = gst_element_factory_make ("nv_gl_videosink", NULL);    
 
102
    if (!tegraEnv.isEmpty()) {
 
103
        videoSink = gst_element_factory_make ("nv_gl_videosink", NULL);
107
104
    }
108
 
    if (!videoSink)
 
105
    if (!videoSink) {
109
106
        videoSink = gst_element_factory_make ("ximagesink", NULL);
 
107
    }
110
108
 
111
109
    gst_object_ref (GST_OBJECT (videoSink)); //Take ownership
112
110
    gst_object_sink (GST_OBJECT (videoSink));
179
177
        // Even if we have created a winId at this point, other X applications
180
178
        // need to be aware of it.
181
179
        QApplication::syncX();
182
 
        gst_x_overlay_set_xwindow_id ( GST_X_OVERLAY(m_videoSink) ,  windowId );
 
180
#if GST_VERSION >= GST_VERSION_CHECK(0,10,31,0)
 
181
        gst_x_overlay_set_window_handle(GST_X_OVERLAY(m_videoSink), windowId);
 
182
#else
 
183
        gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(m_videoSink), windowId);
 
184
#endif // GST_VERSION
183
185
    }
184
186
    windowExposed();
185
187
    m_overlaySet = true;