Remove camera device list functions from camera drivers
- Those will come in a future PR instead
This commit is contained in:
parent
63d965753f
commit
dd49f8fa0d
|
@ -35,8 +35,6 @@ static bool nullcamera_start(void *data) { return true; }
|
||||||
static bool nullcamera_poll(void *a,
|
static bool nullcamera_poll(void *a,
|
||||||
retro_camera_frame_raw_framebuffer_t b,
|
retro_camera_frame_raw_framebuffer_t b,
|
||||||
retro_camera_frame_opengl_texture_t c) { return true; }
|
retro_camera_frame_opengl_texture_t c) { return true; }
|
||||||
static struct string_list *nullcamera_device_list_new() { return NULL; }
|
|
||||||
static void nullcamera_device_list_free(struct string_list *devices) {}
|
|
||||||
|
|
||||||
static camera_driver_t camera_null = {
|
static camera_driver_t camera_null = {
|
||||||
nullcamera_init,
|
nullcamera_init,
|
||||||
|
@ -44,8 +42,6 @@ static camera_driver_t camera_null = {
|
||||||
nullcamera_start,
|
nullcamera_start,
|
||||||
nullcamera_stop,
|
nullcamera_stop,
|
||||||
nullcamera_poll,
|
nullcamera_poll,
|
||||||
nullcamera_device_list_new,
|
|
||||||
nullcamera_device_list_free,
|
|
||||||
"null",
|
"null",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -49,9 +49,6 @@ typedef struct camera_driver
|
||||||
retro_camera_frame_raw_framebuffer_t frame_raw_cb,
|
retro_camera_frame_raw_framebuffer_t frame_raw_cb,
|
||||||
retro_camera_frame_opengl_texture_t frame_gl_cb);
|
retro_camera_frame_opengl_texture_t frame_gl_cb);
|
||||||
|
|
||||||
struct string_list *(*device_list_new)(void);
|
|
||||||
void (*device_list_free)(struct string_list *devices);
|
|
||||||
|
|
||||||
const char *ident;
|
const char *ident;
|
||||||
} camera_driver_t;
|
} camera_driver_t;
|
||||||
|
|
||||||
|
|
|
@ -202,7 +202,5 @@ camera_driver_t camera_android = {
|
||||||
android_camera_start,
|
android_camera_start,
|
||||||
android_camera_stop,
|
android_camera_stop,
|
||||||
android_camera_poll,
|
android_camera_poll,
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
"android",
|
"android",
|
||||||
};
|
};
|
||||||
|
|
|
@ -663,38 +663,11 @@ static bool ffmpeg_camera_poll(
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct string_list *ffmpeg_camera_device_list_new(void)
|
|
||||||
{
|
|
||||||
const AVInputFormat *input = NULL;
|
|
||||||
struct string_list *list = string_list_new();
|
|
||||||
|
|
||||||
if (!list)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
for (input = av_input_video_device_next(NULL); input != NULL; input = av_input_video_device_next(input))
|
|
||||||
{
|
|
||||||
// if (input->priv_class && input->priv_class->category == AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT)
|
|
||||||
RARCH_LOG("[FFMPEG]: Found input device: %s (%s, %x)\n", input->name, input->long_name, input->flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ffmpeg_camera_device_list_free(struct string_list *devices)
|
|
||||||
{
|
|
||||||
struct string_list *sl = (struct string_list*)devices;
|
|
||||||
|
|
||||||
if (sl)
|
|
||||||
string_list_free(sl);
|
|
||||||
}
|
|
||||||
|
|
||||||
camera_driver_t camera_ffmpeg = {
|
camera_driver_t camera_ffmpeg = {
|
||||||
ffmpeg_camera_init,
|
ffmpeg_camera_init,
|
||||||
ffmpeg_camera_free,
|
ffmpeg_camera_free,
|
||||||
ffmpeg_camera_start,
|
ffmpeg_camera_start,
|
||||||
ffmpeg_camera_stop,
|
ffmpeg_camera_stop,
|
||||||
ffmpeg_camera_poll,
|
ffmpeg_camera_poll,
|
||||||
ffmpeg_camera_device_list_new,
|
|
||||||
ffmpeg_camera_device_list_free,
|
|
||||||
"ffmpeg",
|
"ffmpeg",
|
||||||
};
|
};
|
||||||
|
|
|
@ -65,7 +65,5 @@ camera_driver_t camera_rwebcam = {
|
||||||
rwebcam_start,
|
rwebcam_start,
|
||||||
rwebcam_stop,
|
rwebcam_stop,
|
||||||
rwebcam_poll,
|
rwebcam_poll,
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
"rwebcam",
|
"rwebcam",
|
||||||
};
|
};
|
||||||
|
|
|
@ -415,7 +415,5 @@ camera_driver_t camera_v4l2 = {
|
||||||
v4l_start,
|
v4l_start,
|
||||||
v4l_stop,
|
v4l_stop,
|
||||||
v4l_poll,
|
v4l_poll,
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
"video4linux2",
|
"video4linux2",
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue