Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    为什么 T113 摄像头不支持 V4L2_PIX_FMT_JPEG 输出?

    T Series
    2
    3
    852
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      li_rean LV 3 last edited by li_rean

      设置 V4L2_PIX_FMT_JPEG 此格式时 ,会返回错误,明明T113有硬件编码,为什么用不了, 硬件 JPEG 编码函数在哪里查看??

      设置分辨率和格式
         memset(&fmt,0,sizeof(struct v4l2_format));
         if (driver_type == V4L2_CAP_VIDEO_CAPTURE_MPLANE) {
             fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
             fmt.fmt.pix_mp.width = video_width;
             fmt.fmt.pix_mp.height = video_height;
             fmt.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_JPEG;
             fmt.fmt.pix_mp.field = V4L2_FIELD_NONE;
         } else {
             fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
             fmt.fmt.pix.width = video_width;
             fmt.fmt.pix.height = video_height;
             fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_JPEG;
             fmt.fmt.pix.field = V4L2_FIELD_NONE;
         }
         if (ioctl(camera_fd,VIDIOC_S_FMT,&fmt) < 0) {
             perror("VIDIOC_S_FMT failed");
             return -1;
         }
      
      1 Reply Last reply Reply Quote Share 0
      • A
        awwwwa LV 8 last edited by

        硬件编码模块没有对接v4l2,需要先获取摄像头原图再送编码

        L 1 Reply Last reply Reply Quote Share 0
        • L
          li_rean LV 3 @awwwwa last edited by

          @awwwwa 搞定了,确实要这样

          1 Reply Last reply Reply Quote Share 0
          • 1 / 1
          • First post
            Last post

          Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

          行为准则 | 用户协议 | 隐私权政策