From 1f757a2d3f8a029f22a3dfadb9be6ad99c7c747f Mon Sep 17 00:00:00 2001 From: MrDave Date: Mon, 30 Nov 2020 19:22:40 -0700 Subject: [PATCH] Call v4l2 mutex directly --- src/motionplus.cpp | 6 +++--- src/video_common.cpp | 10 ---------- src/video_common.hpp | 2 -- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/motionplus.cpp b/src/motionplus.cpp index fa43b4ba..6fa33cc7 100644 --- a/src/motionplus.cpp +++ b/src/motionplus.cpp @@ -24,7 +24,7 @@ #include "motion_loop.hpp" #include "dbse.hpp" #include "webu.hpp" -#include "video_common.hpp" +#include "video_v4l2.hpp" #include "movie.hpp" #include "netcam.hpp" #include "draw.hpp" @@ -277,7 +277,7 @@ static void motion_shutdown(struct ctx_motapp *motapp) conf_deinit(motapp); - vid_mutex_destroy(); + v4l2_mutex_destroy(); } @@ -412,7 +412,7 @@ static void motion_startup(struct ctx_motapp *motapp, int daemonize, int argc, c webu_init(motapp); - vid_mutex_init(); + v4l2_mutex_init(); } diff --git a/src/video_common.cpp b/src/video_common.cpp index e0c4c9d6..b09ff218 100644 --- a/src/video_common.cpp +++ b/src/video_common.cpp @@ -495,16 +495,6 @@ void vid_greytoyuv420p(unsigned char *map, unsigned char *cap_map, int width, in } -void vid_mutex_init(void) -{ - v4l2_mutex_init(); -} - -void vid_mutex_destroy(void) -{ - v4l2_mutex_destroy(); -} - void vid_close(struct ctx_cam *cam) { diff --git a/src/video_common.hpp b/src/video_common.hpp index b237819e..00faca8c 100644 --- a/src/video_common.hpp +++ b/src/video_common.hpp @@ -62,8 +62,6 @@ struct video_dev { int vid_start(struct ctx_cam *cam); int vid_next(struct ctx_cam *cam, struct ctx_image_data *img_data); void vid_close(struct ctx_cam *cam); -void vid_mutex_destroy(void); -void vid_mutex_init(void); void vid_yuv422to420p(unsigned char *map, unsigned char *cap_map, int width, int height); void vid_yuv422pto420p(unsigned char *map, unsigned char *cap_map, int width, int height);