opencv and g_main_loop_run(loop) render problem
Erickson.LU
ericksonlushan at gmail.com
Sun Apr 22 03:43:24 UTC 2018
I'm sorry, i'm a little confused. I think you said i use gst_bus_add_watch
wrong, cause give it NULL at the third parameter.
How can i chage to that?
static GMainLoop* loop;
void RunMainLoop()
{
loop = g_main_loop_new(NULL, FALSE);
g_print("RunningMainLoop thread lwpid = %u\n", syscall(SYS_gettid));
g_print("RunningMainLoop thread tid = %u\n", pthread_self());
g_main_loop_run(loop);
}
int
main (int argc, char *argv[])
{...
bus=gst_pipeline_get_bus(GST_PIPELINE(pipeline));
gst_bus_add_watch(bus, (GstBusFunc)GstMessageParser, loop);
g_main_loop_thread_ = boost::thread(RunMainLoop);
...
}
I still get only one frame and it block there.
I think i use the loop at wrong way, it conflict with opencv.
The log is
*main thread lwpid = 24974
main thread tid = 2439948864
RunningMainLoop thread lwpid = 24976
RunningMainLoop thread tid = 2018526976
Element APP_SINK0 changed state from NULL to READY.
Element capsfilter1 changed state from NULL to READY.
Element videoconvert0 changed state from NULL to READY.
Element capsfilter0 changed state from NULL to READY.
Element v4l2src0 changed state from NULL to READY.
Element pipeline0 changed state from NULL to READY.
Element capsfilter1 changed state from READY to PAUSED.
Element videoconvert0 changed state from READY to PAUSED.
Element capsfilter0 changed state from READY to PAUSED.
STREAM STATUS received from element v4l2src0: CREATE
Element v4l2src0 changed state from READY to PAUSED.
Element pipeline0 changed state from READY to PAUSED.
Unparsed message received of type: new-clock
Element capsfilter1 changed state from PAUSED to PLAYING.
Element videoconvert0 changed state from PAUSED to PLAYING.
Element capsfilter0 changed state from PAUSED to PLAYING.
Element v4l2src0 changed state from PAUSED to PLAYING.
Process_frame thread lwpid = 24978
Process_frame thread tid = 2001741568
STREAM STATUS received from element v4l2src0: ENTER
Unparsed message received of type: stream-start
Element APP_SINK0 changed state from READY to PAUSED.
Unparsed message received of type: async-done
frame count = 1
Element APP_SINK0 changed state from PAUSED to PLAYING.
Element pipeline0 changed state from PAUSED to PLAYING.
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not
been called
[xcb] Aborting, sorry about that.
test_now: ../../src/xcb_io.c:274: poll_for_event: Assertion
`!xcb_xlib_threads_sequence_lost' failed.*
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list