4d38e7a7e325032b2ed3918de37f1f02784fbb65
[openwrt/staging/rmilecki.git] /
1 From e7a3b02059247ee380cf1d91e2c61beec5cae160 Mon Sep 17 00:00:00 2001
2 From: Gergo Koteles <soyer@irl.hu>
3 Date: Sun, 24 Oct 2021 23:18:09 +0200
4 Subject: [PATCH] staging/bcm2835-camera: Add support for
5 MPEG_VIDEO_FORCE_KEY_FRAME
6
7 Signed-off-by: Gergo Koteles <soyer@irl.hu>
8 ---
9 .../vc04_services/bcm2835-camera/bcm2835-camera.h | 2 +-
10 .../staging/vc04_services/bcm2835-camera/controls.c | 11 +++++++++++
11 2 files changed, 12 insertions(+), 1 deletion(-)
12
13 --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h
14 +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h
15 @@ -13,7 +13,7 @@
16 * core driver device
17 */
18
19 -#define V4L2_CTRL_COUNT 31 /* number of v4l controls */
20 +#define V4L2_CTRL_COUNT 32 /* number of v4l controls */
21
22 enum {
23 COMP_CAMERA = 0,
24 --- a/drivers/staging/vc04_services/bcm2835-camera/controls.c
25 +++ b/drivers/staging/vc04_services/bcm2835-camera/controls.c
26 @@ -1292,6 +1292,17 @@ static const struct bm2835_mmal_v4l2_ctr
27 .mmal_id = MMAL_PARAMETER_VIDEO_ENCODE_MAX_QUANT,
28 .setter = ctrl_set_video_encode_param_output,
29 },
30 + {
31 + .id = V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME,
32 + .type = MMAL_CONTROL_TYPE_STD,
33 + .min = 0,
34 + .max = 0,
35 + .def = 0,
36 + .step = 0,
37 + .imenu = NULL,
38 + .mmal_id = MMAL_PARAMETER_VIDEO_REQUEST_I_FRAME,
39 + .setter = ctrl_set_video_encode_param_output,
40 + },
41 };
42
43 int bm2835_mmal_set_all_camera_controls(struct bm2835_mmal_dev *dev)