Not work videooverlay in debian!

Tim-Philipp Müller t.i.m at zen.co.uk
Mon Jul 16 08:02:54 PDT 2012


On Mon, 2012-07-16 at 07:44 -0700, rasnaut wrote:
> Hi,

> I need imaging xvimagesink in my window (QT Widget). So, I write:
> 
> #include <gst/video/videooverlay.h>
> 
> .....
> 
> geVideoOut = gst_element_factory_make("xvimagesink", "video out1");
> g_assert(geVideoOut);
> 
> ....
> 
> gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(geVideoOut),
> window_id);
> 
> And I have next errors:
> -- undefined reference to `gst_video_overlay_get_type'
> -- undefined reference to `gst_video_overlay_set_window_handle'

This means you did not actually link your application to libgstvideo-1.0


> When I was searching solution, I saw that body of this function been in file
> "videoverlay.c", but this file didn't install with
> "gst-plugins-base-0.11.92", only header ("videoverlay.h") installed.
> When I added "videoverlay.c" in my project, compiling completed, but
> appeared another error:
> -- GLib-GObject-WARNING **: cannot register existing type `GstVideoOverlay'
> 
> So what I do wrong?

That's not how it works. You do not have to copy any .c files into your
project. The .h file tells the compiler what functions GStreamer makes
avilable in various libraries, and how to call them. You then link to
the GStreamer libraries you need to use that functionality.

For the includes (compiler/preprocessor flags):
pkg-config --cflags gstreamer-video-1.0

For the libraries (to link against):
pkg-config --libs gstreamer-video-1.0

Cheers
 -Tim



More information about the gstreamer-devel mailing list