diff options
author | Andrzej Hajda <a.hajda@samsung.com> | 2012-08-31 11:38:58 +0200 |
---|---|---|
committer | Andrzej Hajda <a.hajda@samsung.com> | 2013-05-22 16:14:08 +0200 |
commit | 353398b2161303052df7d9dc70a89dc7cffaf8fc (patch) | |
tree | b57ffcf27c5396dc7cde18188bf5cd86ed2d0ee1 /v4l2-mfc-encoder | |
parent | 64898d2849137fdd58116851b215ccc4b49c2b7f (diff) |
Added detailed set format logging
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Diffstat (limited to 'v4l2-mfc-encoder')
-rw-r--r-- | v4l2-mfc-encoder/v4l_dev.c | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/v4l2-mfc-encoder/v4l_dev.c b/v4l2-mfc-encoder/v4l_dev.c index 4aaa3ca..7a062f2 100644 --- a/v4l2-mfc-encoder/v4l_dev.c +++ b/v4l2-mfc-encoder/v4l_dev.c @@ -254,24 +254,41 @@ int v4l_deq_event(struct io_dev *dev) int v4l_copy_fmt(struct io_dev *src, enum io_dir sdir, struct io_dev *dst, enum io_dir ddir) { - struct v4l2_format fmt; + struct v4l2_format sfmt; + struct v4l2_format dfmt; int ret; - memzero(fmt); - fmt.type = io_dir_to_type(sdir); - ret = ioctl(src->fd, VIDIOC_G_FMT, &fmt); + memzero(sfmt); + sfmt.type = io_dir_to_type(sdir); + ret = ioctl(src->fd, VIDIOC_G_FMT, &sfmt); if (ret != 0) { err("Failed to get format"); return -1; } - fmt.type = io_dir_to_type(ddir); - ret = ioctl(dst->fd, VIDIOC_S_FMT, &fmt); + dfmt = sfmt; + dfmt.type = io_dir_to_type(ddir); + ret = ioctl(dst->fd, VIDIOC_S_FMT, &dfmt); if (ret != 0) { err("Failed to set format"); return -1; } + err("sfmt(type=%d,size=%dx%d,fmt=%.4s,npl=%d,sizes=%d,%d,bpls=%d,%d)", + sfmt.type, sfmt.fmt.pix_mp.width, sfmt.fmt.pix_mp.height, + (char *)&sfmt.fmt.pix_mp.pixelformat, sfmt.fmt.pix_mp.num_planes, + sfmt.fmt.pix_mp.plane_fmt[0].sizeimage, + sfmt.fmt.pix_mp.plane_fmt[1].sizeimage, + sfmt.fmt.pix_mp.plane_fmt[0].bytesperline, + sfmt.fmt.pix_mp.plane_fmt[1].bytesperline); + err("dfmt(type=%d,size=%dx%d,fmt=%.4s,npl=%d,sizes=%d,%d,bpls=%d,%d)", + dfmt.type, dfmt.fmt.pix_mp.width, dfmt.fmt.pix_mp.height, + (char *)&dfmt.fmt.pix_mp.pixelformat, dfmt.fmt.pix_mp.num_planes, + dfmt.fmt.pix_mp.plane_fmt[0].sizeimage, + dfmt.fmt.pix_mp.plane_fmt[1].sizeimage, + dfmt.fmt.pix_mp.plane_fmt[0].bytesperline, + dfmt.fmt.pix_mp.plane_fmt[1].bytesperline); + return 0; } |