Skip to content

Commit 51549a4

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 ea2df3b commit 51549a4

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
@@ -1730,6 +1730,12 @@ static int mmal_init(struct bcm2835_mmal_dev *dev)
17301730
MMAL_PARAMETER_MINIMISE_FRAGMENTATION,
17311731
&enable,
17321732
sizeof(enable));
1733+
1734+
/* Enable inserting headers into the first frame */
1735+
vchiq_mmal_port_parameter_set(dev->instance,
1736+
&dev->component[COMP_VIDEO_ENCODE]->control,
1737+
MMAL_PARAMETER_VIDEO_ENCODE_HEADERS_WITH_FRAME,
1738+
&enable, sizeof(enable));
17331739
}
17341740
ret = bcm2835_mmal_set_all_camera_controls(dev);
17351741
if (ret < 0) {

0 commit comments

Comments
 (0)