You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/10/29 10:59:43 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new pull request, #7467: Fix video/video.c:1458:52: error: implicit conversion from enumeration type 'enum v4l2_buf_type' to different enumeration type 'imgsensor_stream_type_t' (aka 'enum imgsensor_stream_type_e') [-Werror,-Wenum-conversion]

xiaoxiang781216 opened a new pull request, #7467:
URL: https://github.com/apache/incubator-nuttx/pull/7467

   ## Summary
   ret = g_video_sensor_ops->validate_frame_setting(type, nr_fmt, sf, &si);
          ~~~~~~~~~~~~~~~~~~                         ^~~~
   
   ## Impact
   video validation
   
   ## Testing
   Pass CI
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #7467: Fix video/video.c:1458:52: error: implicit conversion from enumeration type 'enum v4l2_buf_type' to different enumeration type 'imgsensor_stream_type_t' (aka 'enum imgsensor_stream_type_e') [-Werror,-Wenum-conversion]

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #7467:
URL: https://github.com/apache/incubator-nuttx/pull/7467#issuecomment-1295802992

   @jerpelea could you review the change?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #7467: Fix video/video.c:1458:52: error: implicit conversion from enumeration type 'enum v4l2_buf_type' to different enumeration type 'imgsensor_stream_type_t' (aka 'enum imgsensor_stream_type_e') [-Werror,-Wenum-conversion]

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #7467:
URL: https://github.com/apache/incubator-nuttx/pull/7467#issuecomment-1312630860

   https://github.com/apache/incubator-nuttx/pull/7391


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko merged pull request #7467: Fix video/video.c:1458:52: error: implicit conversion from enumeration type 'enum v4l2_buf_type' to different enumeration type 'imgsensor_stream_type_t' (aka 'enum imgsensor_stream_type_e') [-Werror,-Wenum-conversion]

Posted by GitBox <gi...@apache.org>.
pkarashchenko merged PR #7467:
URL: https://github.com/apache/incubator-nuttx/pull/7467


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7467: Fix video/video.c:1458:52: error: implicit conversion from enumeration type 'enum v4l2_buf_type' to different enumeration type 'imgsensor_stream_type_t' (aka 'enum imgsensor_stream_type_e') [-Werror,-Wenum-conversion]

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #7467:
URL: https://github.com/apache/incubator-nuttx/pull/7467#discussion_r1008749585


##########
drivers/video/video.c:
##########
@@ -1455,7 +1455,8 @@ static int validate_frame_setting(enum v4l2_buf_type type,
   convert_to_imgsensorfmt(&vfmt[VIDEO_FMT_SUB], &sf[IMGSENSOR_FMT_SUB]);
   convert_to_imgsensorinterval(interval, &si);
 
-  ret = g_video_sensor_ops->validate_frame_setting(type, nr_fmt, sf, &si);
+  ret = g_video_sensor_ops->validate_frame_setting(
+             type == V4L2_BUF_TYPE_STILL_CAPTURE, nr_fmt, sf, &si);

Review Comment:
   Let's better use
   ```
   ((type == V4L2_BUF_TYPE_VIDEO_CAPTURE) ?
        IMGSENSOR_STREAM_TYPE_VIDEO : IMGSENSOR_STREAM_TYPE_STILL
   ```
   same as in `start_capture`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7467: Fix video/video.c:1458:52: error: implicit conversion from enumeration type 'enum v4l2_buf_type' to different enumeration type 'imgsensor_stream_type_t' (aka 'enum imgsensor_stream_type_e') [-Werror,-Wenum-conversion]

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7467:
URL: https://github.com/apache/incubator-nuttx/pull/7467#discussion_r1008787498


##########
drivers/video/video.c:
##########
@@ -1455,7 +1455,8 @@ static int validate_frame_setting(enum v4l2_buf_type type,
   convert_to_imgsensorfmt(&vfmt[VIDEO_FMT_SUB], &sf[IMGSENSOR_FMT_SUB]);
   convert_to_imgsensorinterval(interval, &si);
 
-  ret = g_video_sensor_ops->validate_frame_setting(type, nr_fmt, sf, &si);
+  ret = g_video_sensor_ops->validate_frame_setting(
+             type == V4L2_BUF_TYPE_STILL_CAPTURE, nr_fmt, sf, &si);

Review Comment:
   Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org