Skip to content

Commit 883db57

Browse files
6by9popcornmix
authored andcommitted
staging:vc04_services: bcm2835-camera: Request headers with I-frame
V4L2 wishes to have the codec header bytes in the same buffer as the first encoded frame, so it does become 1-in 1-out for encoding. The firmware now has an option to do this, so enable it. Signed-off-by: Dave Stevenson <[email protected]>
1 parent 1243177 commit 883db57

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,6 +1726,12 @@ static int mmal_init(struct bcm2835_mmal_dev *dev)
17261726
MMAL_PARAMETER_MINIMISE_FRAGMENTATION,
17271727
&enable,
17281728
sizeof(enable));
1729+
1730+
/* Enable inserting headers into the first frame */
1731+
vchiq_mmal_port_parameter_set(dev->instance,
1732+
&dev->component[COMP_VIDEO_ENCODE]->control,
1733+
MMAL_PARAMETER_VIDEO_ENCODE_HEADERS_WITH_FRAME,
1734+
&enable, sizeof(enable));
17291735
}
17301736
ret = bcm2835_mmal_set_all_camera_controls(dev);
17311737
if (ret < 0) {

0 commit comments

Comments
 (0)