[gst-devel] gst_x_overlay_set_xwindow_id - Compiling Problem

giorgio giorgio at ketron.it
Tue Apr 27 09:45:02 CEST 2010


Hi,
I want tu use QT to create a simple GUI application to play a local
video file in a specific window o in a specific QT Widget.
I have already succeeded in implementation an GStreamer pipeline using
decodebin or playbin element.
I am able to compile my c++ program property.

My g++ command line include GStream Path and library like:

arm-linux-g++ -Wl,-rpath, .......
......
.....
Waveplayertest.o    
-L/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib
-L/home/giorgio/freescale/ltib/rootfs/usr/lib 
-lQtGui 
-L/home/giorgio/freescale/ltib/rootfs/lib
-L/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib 
-lQtNetwork -lQtCore -lts -lpthread -lasound 
-lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lxml2
-lglib-2.0 -lz 


Now I need to use a gst_x_overlay_set_xwindow_id to pass the windows
handle to GStreamer in order to show a video frame in a specific window.

Ex:

	#include <gst/gst.h>
	#include <gst/interfaces/xoverlay.h>
...
...
	gst_init (NULL, NULL);
	pipeline = gst_pipeline_new ("player");
...
...
	gst_element_set_state (GST_ELEMENT (sink), GST_STATE_READY);
	QApplication::syncX();
	gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(sink),this->winId());
...
...


Now I can't longer compile my program and I get always an link error.
This is the error message:

......
......
debug/waveplayertest.o: In function `WavePlayerTest::play_uri(char*)':
/home/giorgio/workspace/WavePlayerTest/waveplayertest.cpp:710: undefined
reference to `gst_x_overlay_get_type'
/home/giorgio/workspace/WavePlayerTest/waveplayertest.cpp:710: undefined
reference to `gst_x_overlay_set_xwindow_id'
collect2: ld returned 1 exit status
......
......

Which library (.SO) should I include in my linker to use the
gst_x_overlay_set_xwindow_id() function?
I thought that these libraries ( lgstreamer-0.10 -lgobject-2.0
-lgmodule-2.0 -lgthread-2.0 -lrt -lxml2 -lglib-2.0 -lz ) 
were sufficient but it seems that this is not true.

There may be another problem?


Thanks,
Giorgio.









More information about the gstreamer-devel mailing list