--- /dev/null
+GeneratedFiles/
+debug/
--- Description of the Qt examples ---
+- videooverlay:
+Show how to use the videooverlay interface through Qt.
+The video is displayed as normal 2D scene.
+The window is dynamically resized to have the same size as the original video.
+
- mousevideooverlay:
Show how to use the videooverlay interface through Qt.
The cube is rotating when moving the mouse (+ click maintained)
-- qglvideooverlay:
+- qglwidgetvideooverlay:
Show how to use the videooverlay interface through Qt.
The cube is rotating automatically into a QGLWidget
-- videovdieooverlay:
-Show how to use the videooverlay interface through Qt.
-The video is displayed as normal 2D scene.
-The window is dynamically resized to have the same size as the original video.
--- How to build the Qt examples ---
-sudo apt-get install g++
-sudo apt-get install libqt4-dev
+sudo apt-get install g++ libqt5-dev
+
cd qglvideooverlay
qmake
make
* Boston, MA 02110-1301, USA.
*/
-#include <QGuiApplication>
+#include <QtGui/QApplication>
+#include <QtGui/QFileDialog>
#include "qrenderer.h"
int main(int argc, char *argv[])
QApplication a(argc, argv);
a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
- QString videolcoation = QFileDialog::getOpenFileName(0, "Select a video file",
+ QString videolocation = QFileDialog::getOpenFileName(0, "Select a video file",
".", "Format (*.avi *.mkv *.ogg *.asf *.mov)");
- if (videolcoation.isEmpty())
+ if (videolocation.isEmpty())
return -1;
- QRenderer w(videolcoation);
+ QRenderer w(videolocation);
w.setWindowTitle("glimagesink implements the gstvideooverlay interface");
return a.exec();
TEMPLATE = app
TARGET = mousevideooverlay
DESTDIR = ./debug
-CONFIG += debug gui widget
-DEFINES += UNICODE
+QT += gui widgets opengl
+CONFIG += debug link_pkgconfig compile_libtool
+DEFINES += UNICODE QT_THREAD_SUPPORT QT_CORE_LIB QT_GUI_LIB
+PKGCONFIG = gstreamer-1.0 gstreamer-video-1.0
win32 {
DEFINES += WIN32
unix {
DEFINES += UNIX
INCLUDEPATH += GeneratedFiles \
- GeneratedFiles/Debug \
- /usr/include/gstreamer-1.0 \
- /usr/local/include/gstreamer-1.0 \
- /usr/include/glib-2.0 \
- /usr/lib/glib-2.0/include \
- /usr/include/libxml2
-LIBS += -lgstreamer-video \
- -lgstvideo-1.0 \
- -lglib-2.0 \
- -lgmodule-2.0 \
- -lgobject-2.0 \
- -lgthread-2.0 \
- -lGLU \
- -lGL
+ GeneratedFiles/Debug
+LIBS += -lGLU -lGL
}
DEPENDPATH += .
#include <gst/video/videooverlay.h>
#include <GL/gl.h>
+#include <GL/glu.h>
#include "pipeline.h"
Pipeline::Pipeline(const WId id, const QString videoLocation):
void Pipeline::create()
{
- qDebug("Loading video: %s", m_videoLocation.toAscii().data());
+ qDebug("Loading video: %s", m_videoLocation.toLatin1().data());
gst_init (NULL, NULL);
m_bus = gst_pipeline_get_bus (GST_PIPELINE (m_pipeline));
gst_bus_add_watch (m_bus, (GstBusFunc) bus_call, this);
- gst_bus_set_sync_handler (m_bus, (GstBusSyncHandler) create_window, this);
+ gst_bus_set_sync_handler (m_bus, (GstBusSyncHandler) create_window, this, NULL);
gst_object_unref (m_bus);
GstElement* videosrc = gst_element_factory_make ("filesrc", "filesrc0");
}
g_object_set(G_OBJECT(videosrc), "num-buffers", 800, NULL);
- g_object_set(G_OBJECT(videosrc), "location", m_videoLocation.toAscii().data(), NULL);
+ g_object_set(G_OBJECT(videosrc), "location", m_videoLocation.toLatin1().data(), NULL);
g_signal_connect(G_OBJECT(m_glimagesink), "client-reshape", G_CALLBACK (reshapeCallback), NULL);
g_signal_connect(G_OBJECT(m_glimagesink), "client-draw", G_CALLBACK (drawCallback), NULL);
gst_element_link_pads (videosrc, "src", decodebin, "sink");
- g_signal_connect (decodebin, "new-decoded-pad", G_CALLBACK (cb_new_pad), this);
+ g_signal_connect (decodebin, "pad-added", G_CALLBACK (cb_new_pad), this);
}
void Pipeline::start()
float Pipeline::m_zrot = 0;
//client reshape callback
-gboolean Pipeline::reshapeCallback (void *sink, guint width, guint height, gpointer data)
+gboolean Pipeline::reshapeCallback (void *sink, void *context, guint width, guint height, gpointer data)
{
glViewport(0, 0, width, height);
glMatrixMode(GL_PROJECTION);
}
//client draw callback
-gboolean Pipeline::drawCallback (void *sink, uint texture, uint width, uint height, gpointer data)
+gboolean Pipeline::drawCallback (void *sink, void *context, uint texture, uint width, uint height, gpointer data)
{
static GTimeVal current_time;
static glong last_sec = current_time.tv_sec;
if ((current_time.tv_sec - last_sec) >= 1)
{
- qDebug ("GRPHIC FPS = %d", nbFrames);
+ qDebug ("GRAPHIC FPS = %d", nbFrames);
nbFrames = 0;
last_sec = current_time.tv_sec;
}
glBegin(GL_QUADS);
// Front Face
- glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
+ glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
- glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f, 1.0f, 1.0f);
- glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f(-1.0f, 1.0f, 1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, 1.0f, 1.0f);
+ glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
// Back Face
glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
- glTexCoord2f(0.0f, (gfloat)height); glVertex3f(-1.0f, 1.0f, -1.0f);
- glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f( 1.0f, 1.0f, -1.0f);
- glTexCoord2f((gfloat)width, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f);
+ glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f);
+ glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
// Top Face
- glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f(-1.0f, 1.0f, -1.0f);
- glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
+ glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f);
+ glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, 1.0f, 1.0f);
- glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f, 1.0f, -1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f);
// Bottom Face
- glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
+ glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
- glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f, -1.0f, 1.0f);
- glTexCoord2f((gfloat)width,(gfloat)height); glVertex3f(-1.0f, -1.0f, 1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
+ glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
// Right face
glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
- glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f, 1.0f, -1.0f);
- glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f( 1.0f, 1.0f, 1.0f);
- glTexCoord2f((gfloat)width, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f);
+ glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, 1.0f);
+ glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
// Left Face
- glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
+ glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
- glTexCoord2f(0.0f, (gfloat)height); glVertex3f(-1.0f, 1.0f, 1.0f);
- glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f(-1.0f, 1.0f, -1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
+ glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f);
glEnd();
//return TRUE causes a postRedisplay
- return FALSE;
+ return TRUE;
}
gboolean Pipeline::bus_call (GstBus *bus, GstMessage *msg, Pipeline* p)
return TRUE;
}
-void Pipeline::cb_new_pad (GstElement* decodebin, GstPad* pad, gboolean last, Pipeline* p)
+void Pipeline::cb_new_pad (GstElement* decodebin, GstPad* pad, Pipeline* p)
{
GstElement* glimagesink = p->getVideoSink();
- GstPad* glpad = gst_element_get_pad (glimagesink, "sink");
+ GstPad* glpad = gst_element_get_static_pad (glimagesink, "sink");
//only link once
if (GST_PAD_IS_LINKED (glpad))
return;
}
- GstCaps* caps = gst_pad_get_caps (pad);
+ GstCaps* caps = gst_pad_get_current_caps (pad);
GstStructure* str = gst_caps_get_structure (caps, 0);
if (!g_strrstr (gst_structure_get_name (str), "video"))
{
#define PIPELINE_H
#include <QObject>
+#include <QtGui>
#include <gst/gst.h>
//#include <QtCore/private/qeventdispatcher_glib_p.h>
void doExpose() const;
void doRotate();
- static gboolean reshapeCallback (void *sink, guint width, guint height, gpointer data);
- static gboolean drawCallback (void *sink, guint texture, guint width, guint height, gpointer data);
+ static gboolean reshapeCallback (void *sink, void *context, guint width, guint height, gpointer data);
+ static gboolean drawCallback (void *sink, void *context, guint texture, guint width, guint height, gpointer data);
static gboolean bus_call (GstBus *bus, GstMessage *msg, Pipeline* p);
- static void cb_new_pad (GstElement* decodebin, GstPad* pad, gboolean last, Pipeline* p);
+ static void cb_new_pad (GstElement* decodebin, GstPad* pad, Pipeline* p);
static gboolean cb_expose (gpointer data);
static gboolean cb_rotate (gpointer data);
static GstBusSyncReply create_window (GstBus* bus, GstMessage* message, const Pipeline* pipeline);
#include "qrenderer.h"
-QRenderer::QRenderer(const QString videoLocation, QWidget *parent, Qt::WFlags flags)
+QRenderer::QRenderer(const QString videoLocation, QWidget *parent, Qt::WindowFlags flags)
: QWidget(parent, flags),
m_gt(winId(), videoLocation)
{
Q_OBJECT
public:
- QRenderer(const QString videoLocation, QWidget *parent = 0, Qt::WFlags flags = 0);
+ QRenderer(const QString videoLocation, QWidget *parent = 0, Qt::WindowFlags flags = 0);
~QRenderer();
void paintEvent(QPaintEvent* event);
void mouseMoveEvent(QMouseEvent* event);
*/
#include <QtGui/QApplication>
+#include <QtGui/QFileDialog>
#include "qglrenderer.h"
int main(int argc, char *argv[])
QApplication a(argc, argv);
a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
- QString videolcoation = QFileDialog::getOpenFileName(0, "Select a video file",
+ QString videolocation = QFileDialog::getOpenFileName(0, "Select a video file",
".", "Format (*.avi *.mkv *.ogg *.asf *.mov)");
- if (videolcoation.isEmpty())
+ if (videolocation.isEmpty())
return -1;
- QGLRenderer w(videolcoation);
+ QGLRenderer w(videolocation);
w.setWindowTitle("glimagesink implements the gstvideooverlay interface");
return a.exec();
#include <gst/video/videooverlay.h>
#include <GL/gl.h>
+#include <GL/glu.h>
#include "pipeline.h"
Pipeline::Pipeline(const WId id, const QString videoLocation):
void Pipeline::create()
{
- qDebug("Loading video: %s", m_videoLocation.toAscii().data());
+ qDebug("Loading video: %s", m_videoLocation.toLatin1().data());
gst_init (NULL, NULL);
m_bus = gst_pipeline_get_bus (GST_PIPELINE (m_pipeline));
gst_bus_add_watch (m_bus, (GstBusFunc) bus_call, this);
- gst_bus_set_sync_handler (m_bus, (GstBusSyncHandler) create_window, this);
+ gst_bus_set_sync_handler (m_bus, (GstBusSyncHandler) create_window, this, NULL);
gst_object_unref (m_bus);
GstElement* videosrc = gst_element_factory_make ("filesrc", "filesrc0");
GstElement* decodebin = gst_element_factory_make ("decodebin", "decodebin0");
- m_glupload = gst_element_factory_make ("glupload", "glupload0");
+ m_glupload = gst_element_factory_make ("glcolorscale", NULL);
m_glimagesink = gst_element_factory_make ("glimagesink", "sink0");
if (!videosrc || !decodebin || !m_glupload || !m_glimagesink )
NULL) ;
g_object_set(G_OBJECT(videosrc), "num-buffers", 800, NULL);
- g_object_set(G_OBJECT(videosrc), "location", m_videoLocation.toAscii().data(), NULL);
- g_object_set(G_OBJECT(m_glimagesink), "client-reshape-callback", reshapeCallback, NULL);
- g_object_set(G_OBJECT(m_glimagesink), "client-draw-callback", drawCallback, NULL);
+ g_object_set(G_OBJECT(videosrc), "location", m_videoLocation.toLatin1().data(), NULL);
+ g_signal_connect_object (G_OBJECT(m_glimagesink), "client-reshape", (GCallback) reshapeCallback, NULL, G_CONNECT_AFTER);
+ g_signal_connect_object (G_OBJECT(m_glimagesink), "client-draw", (GCallback) drawCallback, NULL, G_CONNECT_AFTER);
gst_bin_add_many (GST_BIN (m_pipeline), videosrc, decodebin, m_glupload, m_glimagesink, NULL);
gst_element_link_pads (videosrc, "src", decodebin, "sink");
- g_signal_connect (decodebin, "new-decoded-pad", G_CALLBACK (cb_new_pad), this);
+ g_signal_connect (decodebin, "pad-added", G_CALLBACK (cb_new_pad), this);
}
void Pipeline::start()
//-----------------------------------------------------------------------
//client reshape callback
-gboolean Pipeline::reshapeCallback (void *sink, guint width, guint height, gpointer data)
+gboolean Pipeline::reshapeCallback (void *sink, void *context, guint width, guint height, gpointer data)
{
glViewport(0, 0, width, height);
glMatrixMode(GL_PROJECTION);
}
//client draw callback
-gboolean Pipeline::drawCallback (void *sink, guint texture, guint width, guint height, gpointer data)
+gboolean Pipeline::drawCallback (void *sink, void *context, guint texture, guint width, guint height, gpointer data)
{
static GLfloat xrot = 0;
static GLfloat yrot = 0;
glBegin(GL_QUADS);
// Front Face
- glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
+ glTexCoord2f(1.0, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
- glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f, 1.0f, 1.0f);
- glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f(-1.0f, 1.0f, 1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, 1.0f, 1.0f);
+ glTexCoord2f(1.0, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
// Back Face
glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
- glTexCoord2f(0.0f, (gfloat)height); glVertex3f(-1.0f, 1.0f, -1.0f);
- glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f( 1.0f, 1.0f, -1.0f);
- glTexCoord2f((gfloat)width, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f);
+ glTexCoord2f(1.0, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f);
+ glTexCoord2f(1.0, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
// Top Face
- glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f(-1.0f, 1.0f, -1.0f);
- glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
+ glTexCoord2f(1.0, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f);
+ glTexCoord2f(1.0, 0.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, 1.0f, 1.0f);
- glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f, 1.0f, -1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f);
// Bottom Face
- glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
+ glTexCoord2f(1.0, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
- glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f, -1.0f, 1.0f);
- glTexCoord2f((gfloat)width,(gfloat)height); glVertex3f(-1.0f, -1.0f, 1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
+ glTexCoord2f(1.0,1.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
// Right face
glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
- glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f, 1.0f, -1.0f);
- glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f( 1.0f, 1.0f, 1.0f);
- glTexCoord2f((gfloat)width, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f);
+ glTexCoord2f(1.0, 1.0f); glVertex3f( 1.0f, 1.0f, 1.0f);
+ glTexCoord2f(1.0, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
// Left Face
- glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
+ glTexCoord2f(1.0, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
- glTexCoord2f(0.0f, (gfloat)height); glVertex3f(-1.0f, 1.0f, 1.0f);
- glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f(-1.0f, 1.0f, -1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
+ glTexCoord2f(1.0, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f);
glEnd();
xrot+=0.03f;
return TRUE;
}
-void Pipeline::cb_new_pad (GstElement* decodebin, GstPad* pad, gboolean last, Pipeline* p)
+void Pipeline::cb_new_pad (GstElement* decodebin, GstPad* pad, Pipeline* p)
{
GstElement* glupload = p->getVideoSink();
- GstPad* glpad = gst_element_get_pad (glupload, "sink");
+ GstPad* glpad = gst_element_get_static_pad (glupload, "sink");
//only link once
if (GST_PAD_IS_LINKED (glpad))
return;
}
- GstCaps* caps = gst_pad_get_caps (pad);
+ GstCaps* caps = gst_pad_get_current_caps (pad);
GstStructure* str = gst_caps_get_structure (caps, 0);
if (!g_strrstr (gst_structure_get_name (str), "video"))
{
WId winId() const { return m_winId; }
void doExpose() const;
- static gboolean reshapeCallback (void *sink, guint width, guint height, gpointer data);
- static gboolean drawCallback (void *sink, guint texture, guint width, guint height, gpointer data);
+ static gboolean reshapeCallback (void *sink, void *context, guint width, guint height, gpointer data);
+ static gboolean drawCallback (void *sink, void *context, guint texture, guint width, guint height, gpointer data);
static gboolean bus_call (GstBus *bus, GstMessage *msg, Pipeline* p);
- static void cb_new_pad (GstElement* decodebin, GstPad* pad, gboolean last, Pipeline* p);
+ static void cb_new_pad (GstElement* decodebin, GstPad* pad, Pipeline* p);
static gboolean cb_expose (gpointer data);
static GstBusSyncReply create_window (GstBus* bus, GstMessage* message, const Pipeline* pipeline);
};
DESTDIR = ./debug
QT += opengl
CONFIG += debug
+CONFIG += link_pkgconfig
+CONFIG+= compile_libtool
DEFINES += UNICODE QT_THREAD_SUPPORT QT_CORE_LIB QT_GUI_LIB
+PKGCONFIG = gstreamer-1.0 gstreamer-video-1.0
win32 {
DEFINES += WIN32
unix {
DEFINES += UNIX
INCLUDEPATH += GeneratedFiles \
- GeneratedFiles/Debug \
- /usr/include/gstreamer-1.0 \
- /usr/local/include/gstreamer-1.0 \
- /usr/include/glib-2.0 \
- /usr/lib/glib-2.0/include \
- /usr/include/libxml2
-LIBS += -lgstreamer-1.0 \
- -lgstvideo-1.0 \
- -lglib-2.0 \
- -lgmodule-2.0 \
- -lgobject-2.0 \
- -lgthread-2.0 \
+ GeneratedFiles/Debug
+LIBS += \
-lGLU \
-lGL
}
#include "qglrenderer.h"
#include "pipeline.h"
+#include <GL/glx.h>
+
#if defined(Q_WS_MAC)
extern void *qt_current_nsopengl_context();
#endif
# the console on Windows
# CONFIG += console
DEFINES += UNICODE QT_THREAD_SUPPORT QT_CORE_LIB QT_GUI_LIB
+CONFIG += link_pkgconfig compile_libtool
+PKGCONFIG=gstreamer-1.0 gstreamer-video-1.0 gstreamer-gl-1.0
win32 {
DEFINES += WIN32
}
unix:!mac {
DEFINES += UNIX
- INCLUDEPATH += /home/matt/Projects/jhbuild/native/usr/include/gstreamer-1.0 \
- /home/matt/Projects/jhbuild/native/usr/include/glib-2.0 \
- /home/matt/Projects/jhbuild/native/usr/lib/glib-2.0/include \
- /usr/include/gstreamer-1.0 \
- /usr/local/include/gstreamer-1.0 \
- /usr/include/glib-2.0 \
- /usr/lib/glib-2.0/include \
- /usr/include/libxml2
- LIBS += -L/home/matt/Projects/jhbuild/native/usr/lib \
- -lgstreamer-1.0 \
+ LIBS += \
-lgstvideo-1.0 \
- -lglib-2.0 \
- -lgmodule-2.0 \
- -lgobject-2.0 \
- -lgthread-2.0 \
-lgstgl-1.0 \
-lGLU \
-lGL
TEMPLATE = app
TARGET = videooverlay
-DESTDIR = ./Debug
-CONFIG += debug
+DESTDIR = ./debug
+CONFIG += debug link_pkgconfig compile_libtool
DEFINES += UNICODE QT_THREAD_SUPPORT QT_CORE_LIB QT_GUI_LIB
QT += gui widgets
+PKGCONFIG=gstreamer-1.0 gstreamer-video-1.0
win32 {
DEFINES += WIN32
unix {
DEFINES += UNIX
INCLUDEPATH += GeneratedFiles \
- GeneratedFiles/Debug \
- /usr/include/gstreamer-1.0 \
- /usr/local/include/gstreamer-1.0 \
- /usr/include/glib-2.0 \
- /usr/lib/glib-2.0/include \
- /usr/include/libxml2
-LIBS += -lgstreamer-1.0 \
- -lgstvideo-1.0 \
- -lglib-2.0 \
- -lgmodule-2.0 \
- -lgobject-2.0 \
- -lgthread-2.0 \
- -lGLU \
- -lGL
+ GeneratedFiles/Debug
+LIBS += -lGLU -lGL
}
DEPENDPATH += .