我现在用IMX6Q+linux3.0.15 +PCIE+TW6865 做四个摄像头的采集,用的明远智睿的开发板,并参考明远智睿开发板的patch和飞思卡尔的四路环视的方案的patch打了补丁。在运行gst-launch v4l2src device=/dev/video0 ! 'video/x-raw-yuv, format=(fourcc)UYVY' ! mfw_isink disp-width=720 disp-height=480 & 命令式,可以正常的采集显示。但是用飞思卡尔提供的./mxc_v4l2_tvin.out -x 0 -ot 0 -ol 512 -ow 512 -oh 384 -m 2 & 命令执行时,出现错误。(注:mxc_v4l2_tvin.out 是飞思卡尔提供的经过修改的程序)。大侠帮忙分析一下是什么原因?我自己看打印出来的提示信息,mxc_v4l2_tvin.out命令执行时,分配用户内存出错。那么这两种命令在驱动调用方面有什么机制性的区别吗?能不能用gst-launch实现mxc_v4l2_tvin的功能?我的主要目的是得到四副图像的信息,放到buffer里进行后续图像处理。附一,gst-launch可执行的提示信息:
gst-launch v4l2src device=/dev/video0 ! 'video/x-raw-
<launch v4l2src device=/dev/video0 ! 'video/x-raw-y uv, format=(fourcc)UYVY'
</video0 ! 'video/x-raw-yuv, format=(fourcc)UYVY' ! mfw_isink disp-width=720
<v, format=(fourcc)UYVY' ! mfw_isink disp-width=720 disp-height=480 &
[1] 3225
root@myzr /unit_tests$ [1;34mMAX resolution 1024x600
[0m[1;32mMFW_GST_ISINK_PLUGIN 3.0.7 build on Jan 22 2015 12:41:31.
[0mSetting pipeline to PAUSED ... @@@@@ video_open minor=0 type=vid-cap openned:0
video_open ID:1 dmaCH 0 request 1
fh kzalloc successful!
60HZ VideoStandardDetect DMA_nCH 0 regDW 0x68 dwReg7
&&&&&&&&&&&&&&& 0Xe9fed000 open /dev/video0 minor0 type=vid-cap video_opened=0x1 k:1 tvnorm::NTSC 0
????????????????????? CHECK fourcc
open minor=0 fh->DMA_nCH= 0x0 type=vid-cap
v4l2_prio_open () successful!
videobuf_queue_sg_init () successful!
TW68__querycap QP CALLED !
TW68_s__querycap GO !
TW68_enum_input i=e231be48 n:0 CALLED !
TW68_enum_input i=e231be48 n:1 CALLED !
TW68_enum_input i=e231be48 n:2 CALLED !
TW68_enum_input i=e231be48 n:3 CALLED !
TW68_enum_input i=e231be48 n:4 CALLED !
TW68_g_std, _g_std v4l2_std_id =255
========TW68__enum_fmt_vid_cap description 15 bpp RGB, le
========TW68__enum_fmt_vid_cap description 16 bpp RGB, le
========TW68__enum_fmt_vid_cap description 4:2:2 packed, YUYV
========TW68__enum_fmt_vid_cap description 4:2:2 packed, UYVY
????????????????????? CHECK fourcc
TW68 input nId:0 try_fmt:: 56595559
TW68 _try_fmt_vid_cap tvnormf 0 ->name PAL id FF maxh 480
????????????????????? CHECK fourcc
TW68 input nId:0 try_fmt:: 56595559
TW68 _try_fmt_vid_cap tvnormf 0 ->name PAL id FF maxh 480
TW68 _try_fmt_vid_cap fmt::pixelformat 56595559 field: 4 _fmt: width 1 height 1
TW68 _try_fmt_vid_cap: width 48 height 32 720 480
????????????????????? CHECK fourcc
TW68 input nId:0 try_fmt:: 56595559
TW68 _try_fmt_vid_cap tvnormf 0 ->name PAL id FF maxh 480
????????????????????? CHECK fourcc
TW68 input nId:0 try_fmt:: 56595559
TW68 _try_fmt_vid_cap tvnormf 0 ->name PAL id FF maxh 480
TW68 _try_fmt_vid_cap fmt::pixelformat 56595559 field: 4 _fmt: width 32768 height 32768
TW68 _try_fmt_vid_cap: width 720 height 480 720 480
????????????????????? CHECK fourcc
TW68 input nId:0 try_fmt:: 59565955
TW68 _try_fmt_vid_cap tvnormf 0 ->name PAL id FF maxh 480
????????????????????? CHECK fourcc
Pipeline is live and does not neeTW68 input nId:0 try_fmt:: 59565955
TW68 _try_fmt_vid_cap tvnormf 0 ->name PAL id FF maxh 480
d PREROLL ...
TW68 _try_fmt_vid_cap fmt::pixelformat 59565955 field: 4 _fmt: width 1 height 1
TW68 _try_fmt_vid_cap: width 48 height 32 720 480
????????????????????? CHECK fourcc
Setting pipeline to PLAYING ...TW68 input nId:0 try_fmt:: 59565955
TW68 _try_fmt_vid_cap tvnormf 0 ->name PAL id FF maxh 480
????????????????????? CHECK fourcc
New clock: GstSystemClockTW68 input nId:0 try_fmt:: 59565955
TW68 _try_fmt_vid_cap tvnormf 0 ->name PAL id FF maxh 480
TW68 _try_fmt_vid_cap fmt::pixelformat 59565955 field: 4 _fmt: width 32768 height 32768
TW68 _try_fmt_vid_cap: width 720 height 480 720 480
????????????????????? CHECK fourcc
TW68 input nId:0 try_fmt:: 50424752
TW68 fmt:: not YUV422 !!!!!!!!!!!!!!!!!!!
????????????????????? CHECK fourcc
TW68 input nId:0 try_fmt:: 50424752
TW68 fmt:: not YUV422 !!!!!!!!!!!!!!!!!!!
????????????????????? CHECK fourcc
TW68 input nId:0 try_fmt:: 50424752
TW68 fmt:: not YUV422 !!!!!!!!!!!!!!!!!!!
????????????????????? CHECK fourcc
TW68 input nId:0 try_fmt:: 50424752
TW68 fmt:: not YUV422 !!!!!!!!!!!!!!!!!!!
????????????????????? CHECK fourcc
TW68 input nId:0 try_fmt:: 4f424752
TW68 fmt:: not YUV422 !!!!!!!!!!!!!!!!!!!
????????????????????? CHECK fourcc
TW68 input nId:0 try_fmt:: 4f424752
TW68 fmt:: not YUV422 !!!!!!!!!!!!!!!!!!!
????????????????????? CHECK fourcc
TW68 input nId:0 try_fmt:: 4f424752
TW68 fmt:: not YUV422 !!!!!!!!!!!!!!!!!!!
????????????????????? CHECK fourcc
TW68 input nId:0 try_fmt:: 4f424752
TW68 fmt:: not YUV422 !!!!!!!!!!!!!!!!!!!
_g_fmt_vid_cap: width 704 height 480
~~~~~~~~~~~~~TW68_s_fmt_vid_cap: 59565955 W:704 H:480 field:4
????????????????????? CHECK fourcc
TW68 input nId:0 try_fmt:: 59565955
TW68 _try_fmt_vid_cap tvnormf 0 ->name PAL id FF maxh 480
TW68 _try_fmt_vid_cap fmt::pixelformat 59565955 field: 4 _fmt: width 720 height 480
TW68 _try_fmt_vid_cap: width 720 height 480 720 480
????????????????????? CHECK fourcc
~~~~~~~~~~~~~TW68_s_fmt_vid_cap: fh->fmt W:720 H:480 field:4
******** buffer_setup #### CH0:: dwReg2: 0x8055500 deReg 0x8015400
DecoderResize() :: nId:0, HDELAY=0xE, H:240 W:720 HW 80F002D0 HDELAY0 E
********#### FM CH0:: dwReg2: 0x8055500 deReg 0x8015400 H:240 W:1440
#### buffer_setup:: W:720 H:480 frame size: 691200, gbuffers: 2, ChannelOffset: 128 field pgn: 85 m_StartIdx 0 m_EndIdx 85
********#### buffer_setup CH0:: m_StartIdx 0X0 pgn85 m_dwCHConfig: 0x8015400 dwReg: 0x8015400
#### buffer_setup:: VIDEO_SIZE_REG: 0x41, 0x80F002D0
********#### buffer_setup CH0:: dwReg2: 0x8055500 deReg 0x8015400
res: get 2
TW6869[0]: videobuf_streamon(TW68_queue(fh)) DMA 0 q->streaming:1 streaming:0.
hwbuf allocator zone(692224) created
[1;34mVS0 created. in fmt[UYVY] win(0,0-720,480:720x480) out win(0,0-720,480:720x480)
[0m[1;34mset deinterlace mode 0
附录2 mxc_v4l2_tvin.out 命令错误的提示信息:
./mxc_v4l2_tvin_liyq.out -x 0 -ot 0 -ol 0 -ow 512 -oh
<c_v4l2_tvin_liyq.out -x 0 -ot 0 -ol 0 -ow 512 -oh 3 84 -m 2 &
[1] 3186
root@myzr /unit_tests$ @@@@@ video_open minor=0 type=vid-cap openned:0
video_open ID:1 dmaCH 0 request 1
fh kzalloc successful!
60HZ VideoStandardDetect DMA_nCH 0 regDW 0x68 dwReg7
&&&&&&&&&&&&&&& 0Xe9fed000 open /dev/video0 minor0 type=vid-cap video_opened=0x1 k:1 tvnorm::NTSC 0
????????????????????? CHECK fourcc
open minor=0 fh->DMA_nCH= 0x0 type=vid-cap
v4l2_prio_open () successful!
videobuf_queue_sg_init () successful!
TW68__querycap QP CALLED !
TW68_s__querycap GO !
TW68_enum_input i=e2265e48 n:0 CALLED !
TW68_enum_input i=e2265e48 n:1 CALLED !
TW68_enum_input i=e2265e48 n:2 CALLED !
TW68_enum_input i=e2265e48 n:3 CALLED !
TW68_enum_input i=e2265e48 n:4 CALLED !
TW68_g_std, _g_std v4l2_std_id =255
~~~~~~~~~~~~~TW68_s_fmt_vid_cap: 59565955 W:704 H:480 field:4
????????????????????? CHECK fourcc
TW68 input nId:0 try_fmt:: 59565955
TW68 _try_fmt_vid_cap tvnormf 0 ->name PAL id FF maxh 480
TW68 _try_fmt_vid_cap fmt::pixelformat 59565955 field: 4 _fmt: width 720 height 480
TW68 _try_fmt_vid_cap: width 720 height 480 720 480
????????????????????? CHECK fourcc
~~~~~~~~~~~~~TW68_s_fmt_vid_cap: fh->fmt W:720 H:480 field:4
_g_fmt_vid_cap: width 720 height 480
VIDIOC_G_FMT failed ******** buffer_setup #### CH0:: dwReg2: 0x8055500 deReg 0x8015400
DecoderResize() :: nId:0, HDELAY=0xE, H:240 W:720 HW 80F002D0 HDELAY0 E
********#### FM CH0:: dwReg2: 0x8055500 deReg 0x8015400 H:240 W:1440
#### buffer_setup:: W:720 H:480 frame size: 691200, gbuffers: 4, ChannelOffset: 128 field pgn: 85 m_StartIdx 0 m_EndIdx 85
********#### buffer_setup CH0:: m_StartIdx 0X0 pgn85 m_dwCHConfig: 0x8015400 dwReg: 0x8015400
#### buffer_setup:: VIDEO_SIZE_REG: 0x41, 0x80F002D0
VIDIOC_QBUF error ********#### buffer_setup CH0:: dwReg2: 0x8055500 deReg 0x8015400
USERPTR is currently not supported
buffer_prepare OOPS
free_buffer, state: 0
TW6869[0]: DMA_nCH:0 videobuf_streamoff delete video timeout
res_free res: put 2
TW6869[0]:0 videobuf_streamoff q->streaming:0 return err:ffffffea
start_capturing failed
video_release () CALLED minor:0 DMA_nCH: 0 video_fieldcount 0x0 !
video_release CALLED ! dev->video_opened: 0x0
kfree(fh->cap.read_buf); CALLED !
videobuf_mmap_free CALLED !
v4l2_prio_close CALLED HZ:100 !
video_release kfree(fh); CALLED !
|