Open topdjgod opened 6 years ago
Do you use TinkerOS? You might need update video packages from https://github.com/rockchip-linux/rk-rootfs-build/tree/master/packages/armhf/video, because i have fix some bugs in gstreamer-rockchip/mpp/gstreamer-rockchip-extra when writing this program......
And make sure your kernel have RGA enabled.
Thanks for your advice. Video test is working now. But usb camera test has a problem as below:
ard:~/gstreamer-opencv$ ./gst_opencv GStreamer V1.10.4.0 mpi: mpp version: b212d1b author: Jacob Chen [mpp]: fix mjpeg buffer leak mpi: mpp version: b212d1b author: Jacob Chen [mpp]: fix mjpeg buffer leak Enter to leave! mpp_buf_slot: new width 1280 height 720 stride hor 1280 ver 720 fmt 2 (--gst-version:914): GLib-GObject-WARNING : cannot register existing type 'GstV4l2BufferPool' (--gst-version:914): GLib-CRITICAL : g_once_init_leave: assertion 'result != 0' failed (--gst-version:914): GLib-GObject-CRITICAL : g_object_new: assertion 'G_TYPE_IS_OBJECT (object_type)' failed (--gst-version:914): GLib-GObject-CRITICAL : g_object_ref_sink: assertion 'G_IS_OBJECT (object)' failed
There are so problems in dwc2 usb port.. Could you try a lower resultion?
After changing rgaconvert to v4l2video0convert, usb camera is working. Seems that rgaconvert has a problem with usb camera?!!
Did you use output-io-mode=dmabuf-import
?
Use "v4l2video0convert output-io-mode=dmabuf capture-io-mode=dmabuf " that can work. Use "rgaconvert output-io-mode=dmabuf-import capture-io-mode=dmabuf" doesn't work.
It's due todmabuf-import
..
I'm not sure why it failed.
Using output-io-mode=dmabuf
have a bad impact on performance.
Hi wzyy2
I am user of Tinker Board. Hello... I get some problem, and more detail as below:
static std::string CreateAppSinkPipeline() { std::stringstream pipelineString;
pipelineString
<< "v4l2src device=/dev/video1"
<< LINK
<< "video/x-raw,format=(string)NV12,width=(int)1280,height=(int)720,framerate=(fraction)30/1"
// << "mppvideodec" // << LINK // << "video/x-raw,formar=(string)NV12" << LINK << "v4l2video0convert output-io-mode=dmabuf capture-io-mode=dmabuf" << LINK << "video/x-raw,format=(string)BGR,width=(int)1280,height=(int)720,framerate=(fraction)30/1" << LINK << "appsink name=" << APPSINK_NAME;
return pipelineString.str();
}
it's work, but as you said "Using output-io-mode=dmabuf have a bad impact on performance."
so, i change "v4l2video0convert output-io-mode=dmabuf capture-io-mode=dmabuf" to "rgaconvert output-io-mode=dmabuf-import capture-io-mode=dmabuf"
but i get the error message as below
0:00:00.430201724 1558 0x80850660 ERROR v4l2 gstv4l2object.c:1897:gst_v4l2_object_get_interlace_mode: Driver bug detected - check driver with v4l2-compliance from http://git.linuxtv.org/v4l-utils.git
0:00:00.430291849 1558 0x80850660 ERROR v4l2 gstv4l2object.c:1897:gst_v4l2_object_get_interlace_mode: Driver bug detected - check driver with v4l2-compliance from http://git.linuxtv.org/v4l-utils.git
(--gst-version:1558): GLib-GObject-WARNING **: cannot register existing type 'GstV4l2BufferPool'
(--gst-version:1558): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed
(--gst-version:1558): GLib-GObject-CRITICAL **: g_object_new: assertion 'G_TYPE_IS_OBJECT (object_type)' failed
(--gst-version:1558): GLib-GObject-CRITICAL **: g_object_ref_sink: assertion 'G_IS_OBJECT (object)' failed
is my config of PipeLines.h wrong? thank you.
It's fixed now, please update gstreamer-rockchip-extra. https://github.com/rockchip-linux/gstreamer-rockchip-extra/commit/11648d7e2a222c2ece0dd0e79e696606d03989ec
Hi wzyy2
after i update newest gstreamer1.0-rockchip1-extra_1.10-1_armhf.deb
I get newer message as below: 0:00:00.454539258 1250 0x80e77860 ERROR v4l2 gstv4l2object.c:1897:gst_v4l2_object_get_interlace_mode: Driver bug detected - check driver with v4l2-compliance from http://git.linuxtv.org/v4l-utils.git
requesting 4 MMAP buffersEnter to leave!
0:00:00.581030501 1250 0x80e77860 ERROR rk_v4l2allocator v4l2/gstv4l2allocator.c:1128:gst_v4l2_allocator_import_dmabuf:
kernel also had some message as below:
[ 137.300654] cif_isp10_v4l2_requeue_bufs(1274) ERR: skip state change for buf: 1, state: 6 [ 137.309725] cif_isp10_v4l2_requeue_bufs(1274) ERR: skip state change for buf: 2, state: 6 [ 137.309730] cif_isp10_v4l2_requeue_bufs(1274) ERR: skip state change for buf: 3, state: 6 [ 137.309734] cif_isp10_v4l2_requeue_bufs(1274) ERR: skip state change for buf: 4, state: 6 [ 137.309745] cif_isp10_v4l2_requeue_bufs(1274) ERR: skip state change for buf: 5, state: 6
thank you. @@
For mipi camera, you don't need to use mppvideodec, replace it with "video/x-raw,format=NV12,width=(int)1920,height=(int)1080"
okay, i don't use mppvideodec as my previous comment.
and i modify "video/x-raw,format=(string)NV12,width=(int)1280,height=(int)720,framerate=(fraction)30/1" to "video/x-raw,format=(string)NV12,width=(int)1280,height=(int)720"
there are no error message but get black content of output window.
the kernel show message: [ 1339.939032] dwhdmi-rockchip ff980000.hdmi: event 2 [ 1339.945154] dwhdmi-rockchip ff980000.hdmi: event 3 [ 1340.058097] dwhdmi-rockchip ff980000.hdmi: event 2 [ 1340.064371] dwhdmi-rockchip ff980000.hdmi: event 3 [ 1340.178367] dwhdmi-rockchip ff980000.hdmi: event 2 [ 1340.184915] dwhdmi-rockchip ff980000.hdmi: event 3
can you help on it again!
Hi wzyy2
for more information, USB camera is work fine (use rgaconvert), no more modification in PipeLine.h thank you.
Hello, I have seen "gstreamer-opencv" link which can be useful for rockchip with hardware codecs.
Can you describe me which other dependencies i have to use? Means "OpenCV version", which i have to install? Which OS, i have to use(ubuntu/armbian)?
I have Rockpro64 Board.
Thanks in advance, Regards, Kishan Patel.
Hi, Sample code doesn't work in TinkerBoard. Build OK, but run with Segmentation fault - Unable to set the pipeline to the playing stateEnter to leave! Is there anything missing?