7a1c39c1d065d445327a7410d15b607c0960901c
[openwrt/staging/xback.git] /
1 From f8733b8f8d5ffccc7ec0c03311e8494c0aa57ad3 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 @@ -1286,6 +1286,17 @@ static const struct bcm2835_mmal_v4l2_ct
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 bcm2835_mmal_set_all_camera_controls(struct bcm2835_mmal_dev *dev)