PeterBee97 commented on code in PR #7798: URL: https://github.com/apache/nuttx/pull/7798#discussion_r1041017170
########## arch/sim/Kconfig: ########## @@ -265,6 +265,33 @@ endchoice endif +config SIM_VIDEO + bool "Simulated video support" + depends on VIDEO + default y + +if SIM_VIDEO + +choice + prompt "Simulated video device type" + default SIM_VIDEO_V4L2 + +config SIM_VIDEO_V4L2 + bool "V4L2 camera support on sim" + depends on HOST_LINUX + +endchoice + +config HOST_VIDEO_DEV_PATH + string "Host video device path" + default "/dev/video0" + +config VIDEO_DEV_PATH Review Comment: fixed ########## arch/sim/src/sim/sim_video_host.h: ########## @@ -0,0 +1,50 @@ +/**************************************************************************** + * arch/sim/src/sim/sim_video_host.h + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +#ifndef __ARCH_SIM_SRC_SIM_UP_VIDEO_HOST_H +#define __ARCH_SIM_SRC_SIM_UP_VIDEO_HOST_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include <errno.h> +#include <stdbool.h> +#include <stdint.h> +#include <linux/videodev2.h> + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +bool video_host_is_available(const char *video_host_dev_path); +int video_host_init(const char *video_host_dev_path); Review Comment: done ########## arch/sim/src/Makefile: ########## @@ -204,6 +204,12 @@ ifeq ($(CONFIG_SIM_SOUND_ALSA),y) STDLIBS += -lmad endif +ifeq ($(CONFIG_SIM_VIDEO_V4L2),y) + HOSTSRCS += sim_video_host.c 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-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org