[gst-devel] Prblm: link error when X overlaying using gst_x_overlay_set_xwindow_id (undefined reference)?

Julien Moutte julien at moutte.net
Sun Nov 20 14:02:00 CET 2005


Make sure you use pkgconfig macros in your configure script to
detect/use the gstreamer-interfaces package.

The XOverlay interface is provided by that library and if your
application is not linked with it, you will see those problems.

Best regards,

Julien Moutte

On Sun, 2005-11-20 at 12:13 +0100, Ola Theander wrote:
> Dear subscribers
> 
> I'm currently working on an application which needs basic video playback
> capabilities and GStreamer seems to suite my needs perfectly. Right now I'm
> only at the stage where I play around a little to get a feel for how to work
> with GStreamer.
> 
> My current problem concerns the X overlay feature where you can redirect the
> playback of e.g. the xvimagesink to you own widget i.e. the playback is
> embedded in your application. To enable the overlay I use the
> gst_x_overlay_set_xwindow_id() method where I provide the winId of the
> target window as a parameter. The problem is that the gcc linker complains
> about an "undefined reference" for gst_x_overlay_set_xwindow_id() and
> gst_x_overlay_get_type() as soon as I include any function calls related to
> X overlaying in my code.
> 
> If I skip overlaying and let the xvimagesink play the movie in its own
> window it works perfectly, so it seems like the issue is the references to
> the X overlay functions in GST.
> 
> I assume that it some lib that I need to include in the linking process but
> I haven't managed to find which one it is. I have looked at the source and
> makefiles of several media players e.g. KMPlayer, Kaffeine etc. which all
> optionally use GStreamer as their backend but I haven't managed to find out
> what they do that I miss. They all use the overlay feature so it's obviously
> works if you know how to do it.
> 
> Any help with this problem would be greatly appreciated. I've attached the
> output of the make process below. Ignore the warnings at the beginning of
> the compile, they don't have anything to do with the particular problem as
> far as I know.
> 
> Kind regards, Ola Theander
> 
> c0003-gentoo test X overlay # make
> g++ -c -pipe -Wall -W -pthread -march=i686 -O2 -pipe -g  -DQT_NO_DEBUG
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pthread
> -I/usr/qt/3/mkspecs/linux-g++ -I. -I/usr/kde/3.4/include -I/usr/qt/3/include
> -I/usr/include/gstreamer-0.8 -I/usr/include/glib-2.0
> -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -o main.o main.cpp
> main.cpp: In function `gboolean idle_eos(void*)':
> main.cpp:10: warning: unused parameter `void*data'
> main.cpp: In function `void cb_eos(GstElement*, void*)':
> main.cpp:27: warning: unused parameter `GstElement*thread'
> main.cpp:27: warning: unused parameter `void*data'
> main.cpp: In function `void cb_error(GstElement*, GstElement*, GError*,
> gchar*,
>    void*)':
> main.cpp:43: warning: unused parameter `GstElement*thread'
> main.cpp:43: warning: unused parameter `GstElement*source'
> main.cpp:43: warning: unused parameter `gchar*debug'
> main.cpp:43: warning: unused parameter `void*data'
> main.cpp: In function `void cb_newpad(GstElement*, GstPad*, int, void*)':
> main.cpp:58: warning: unused parameter `GstElement*decodebin'
> main.cpp:58: warning: unused parameter `gboolean last'
> main.cpp:58: warning: unused parameter `void*data'
> g++ -c -pipe -Wall -W -pthread -march=i686 -O2 -pipe -g  -DQT_NO_DEBUG
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pthread
> -I/usr/qt/3/mkspecs/linux-g++ -I. -I/usr/kde/3.4/include -I/usr/qt/3/include
> -I/usr/include/gstreamer-0.8 -I/usr/include/glib-2.0
> -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -o p3.o p3.cpp
> p3.cpp: In member function `long unsigned int MainWindow::getWinId()':
> p3.cpp:49: warning: control reaches end of non-void function
> g++  -o test main.o p3.o moc_p3.o   -L/usr/qt/3/lib -L/usr/kde/3.4/lib
> -L/usr/X11R6/lib -lXext -lX11 -lm -lkdecore -lkdeui -lkio -lgstreamer-0.8
> -lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lxml2 -lpthread -lz
> -lglib-2.0
> main.o(.text+0x2fa): In function `main':
> /root/my_kdeapps/test X overlay/main.cpp:105: undefined reference to
> `gst_x_overlay_get_type'
> main.o(.text+0x31c):/root/my_kdeapps/test X overlay/main.cpp:105: undefined
> reference to `gst_x_overlay_set_xwindow_id'
> collect2: ld returned 1 exit status
> make: *** [test] Error 1
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
> Register for a JBoss Training Course.  Free Certification Exam
> for All Training Attendees Through End of 2005. For more info visit:
> http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel





More information about the gstreamer-devel mailing list