gstreamer-1.0 and opencv, is it broken? (or is it me?)

Tim Müller tim at centricular.com
Sat May 10 04:19:05 PDT 2014


On Fri, 2014-05-09 at 20:09 -0400, Luis Alberto Zarrabeitia wrote:

Hi Luis,

> I'm trying to use gstreamer to read a video file for processing in
> opencv (opencv fails to read it, gstreamer works perfectly). However,
> it seems there is a problem, at least in my system, if I try to use
> the opencv UI functions (so far, cv::namedWindow and cv::waitKey),
> subsequent gstreamer calls fail. They work with gstreamer-0.10, but
> not with 1.0, which leads me to think the problem is in the gstreamer
> side or in my local insallation. Or maybe I missed a difference
> between 0.10 and 1.0.
> 
> I'm attaching an minimalist example. I added one opencv call to the
> basic tutorial 1. Compiling & running it with gstreamer 1.0:
> 
> $ g++ main.cpp `pkg-config --cflags --libs opencv gstreamer-1.0`
> 
> fails with
> 
> $ ./a.out
> (video:28781): GLib-GObject-WARNING **: cannot register existing type
> `GstObject'
> (video:28781): GLib-CRITICAL **: g_once_init_leave: assertion `result
> != 0' failed
> (video:28781): GLib-GObject-CRITICAL **: g_type_register_static:
> assertion `parent_type > 0' failed
> (video:28781): GLib-CRITICAL **: g_once_init_leave: assertion `result
> != 0' failed

This usually happens when both GStreamer 0.10 and 1.0 are used in the
same process. That's not supported unfortunately. I suspect there's some
opencv component that uses GStreamer 0.10 that gets loaded, and that
then conflicts with your app using 1.0.

Cheers
 -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list