Hi all.
I would like to know what is the best way to quickly reconfigure video source in gstreamer-0.10, I'm using a pipeline built in C (not gst-launch) witch uses a udpsnk element (rtsp) and a mfw_isink element for multi overlay.
Currently I send a stop command to the pipeline, reconfigure the rtspsnk element and then send a play command but the mfw_isink is terribly slow in its transition from READY to PLAYING (takes about 4 seconds) and, hence, the camera switching in very slow.
The code is something similar to this:
gst_element_set_state(pipeline_, GST_STATE_READY);
g_object_set (G_OBJECT (source_), "location", url.c_str(), NULL);
gst_element_set_state(pipeline_, GST_STATE_PLAYING);
// After 4 seconds the first video frame shows in the screen
The trace after those commands are:
[INFO] | bitstreamMode 1, chromaInterleave 1, mapType 0, tiled2LinearEnable 0 |
[INFO] | Product Info: i.MX6Q/D/S |
vpudec versions
plugin: 3.0.8 | |
wrapper: 1.0.38(VPUWRAPPER_ARM_LINUX Build on Oct 1 2014 16:38:10) | |
vpulib: 5.4.15 | |
firmware: 2.3.10.40778 |
0002:33:24.916 [DEBUG ] Pipeline state changed from PLAYING to PAUSED:
0002:33:24.920 [DEBUG ] Pipeline state changed from PLAYING to PAUSED:
0002:33:24.923 [DEBUG ] Pipeline state changed from PAUSED to READY:
0002:33:24.925 [DEBUG ] Pipeline state changed from PAUSED to READY:
0002:33:24.938 [DEBUG ] Pipeline state changed from READY to PAUSED:
0002:33:24.940 [DEBUG ] Pipeline state changed from READY to PAUSED:
[INFO] | bitstreamMode 1, chromaInterleave 1, mapType 0, tiled2LinearEnable 0 |
can not create threadmfw_gst_isink_setcaps:1489
0002:33:28.903 [DEBUG ] Pipeline state changed from PAUSED to PLAYING:
can not create threadmfw_gst_isink_setcaps:1489
0002:33:29.298 [DEBUG ] Pipeline state changed from PAUSED to PLAYING:
reconfig win from (0,0-400,480:400x480) to (0,0-400,480:400x480)
Any sugestion?
Thanks.
Hi Javier,
mfw_ising itself takes 4-5 seconds to show video frame. To fix this issue you need to do window binding. Check below code for the same.
QWidget window;
window.resize(320, 240);
window.show();
WId xwinid = window.winId();
gst_x_overlay_set_window_handle (GST_X_OVERLAY (sink), xwinid);
AActually it will not bind window with mfw_isink, however, you will get video streaming within a second.
Thanks and Regards,
Abhilash Dharpure.
I have the same problem with the mfw_isink hanging for 4 seconds before showing the line "can not create threadmfw_gst_isink_setcaps:1489".
I am trying to get a video feed to show up from a TW6869 video encoder using the PCI-E bus on the nitrogen6x imx6 using gstreamer and mfw_isink.
Here's my pipeline (note that the export must be entered otherwise the video feed does not show up at all):
export VSALPHA=1
gst-launch -v v4l2src device=/dev/video0 ! 'video/x-raw-yuv, format=(fourcc)UYVY' ! mfw_isink disp-width=640 disp-height=480 axis-top=0 axis-left=0
When I use the mfw_v4lsink the video feed shows up immediately, but the mfw_v4lsink cannot handle multiple feeds, so I cannot use it:
gst-launch v4l2src device=/dev/video0 ! 'video/x-raw-yuv, format=(fourcc)UYVY' ! mfw_v4lsink disp-width=640 disp-height=480 axis-top=0 axis-left=0
Did you find a solution to this problem?
Here's the output for the feed that hangs:
root@nitrogen6x:~# gst-launch -v v4l2src device=/dev/video0 ! 'video/x-raw-yuv,
format=(fourcc)UYVY' ! mfw_isink disp-width=640 disp-height=480 axis-top=0 axis
-left=0
set color key
MFW_GST_ISINK_PLUGIN 3.0.9 build on Aug 28 2014 13:01:25.
Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)UYVY, framerate=(fraction)30000/1001, width=(int)704, height=(int)480, interlaced=(boolean)true, pixel-aspect-ratio=(fraction)1/1
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)UYVY, framerate=(fraction)30000/1001, width=(int)704, height=(int)480, interlaced=(boolean)true, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)UYVY, framerate=(fraction)30000/1001, width=(int)704, height=(int)480, interlaced=(boolean)true, pixel-aspect-ratio=(fraction)1/1 <-----PAUSES HERE FOR 4s
can not create threadmfw_gst_isink_setcaps:1489
/GstPipeline:pipeline0/MfwGstISink:mfwgstisink0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)UYVY, framerate=(fraction)30000/1001, width=(int)704, height=(int)480, interlaced=(boolean)true, pixel-aspect-ratio=(fraction)1/1
hwbuf allocator zone(675840) created
VS0 created. in fmt[UYVY] win(0,0-704,480:704x480) out win(0,0-640,480:640x480)
set deinterlace mode 0
hwbuf allocator zone(614400) created
imx-ipuv3 imx-ipuv3.0: IDMAC12's EBA0 is not 8-byte aligned
hwbuf allocator zone(614400) destroied.
hwbuf allocator zone(614400) created
imx-ipuv3 imx-ipuv3.0: IDMAC12's EBA0 is not 8-byte aligned
hwbuf allocator zone(614400) destroied.
hwbuf allocator zone(614400) created
imx-ipuv3 imx-ipuv3.0: IDMAC12's EBA0 is not 8-byte aligned
hwbuf allocator zone(614400) destroied.
Thank you,
Luke
Thanks for the suggestion! Unfortunately, unless you know differently, freescale has only released v4l2src plugins for gstreamer-0.10 for the imx6, so it is not possible to test with gstreamer-1.0. I have also seen comments that mfw_isink is not fully supported on the imx6 but only on the imx51 and imx53.
If you have other suggestions, please let us know!
Thanks again,
Luke
Hi Guanqiong.
I can't test gstreamer 1.0 now because our BSP is provided by an external company. We depend on them to regenerate/update the root file system and compiler and they don't plan to publish a new version soon.