Skip to content

Commit 5ee3dac

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 22850a8 commit 5ee3dac

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
@@ -1724,6 +1724,12 @@ static int mmal_init(struct bcm2835_mmal_dev *dev)
17241724
MMAL_PARAMETER_MINIMISE_FRAGMENTATION,
17251725
&enable,
17261726
sizeof(enable));
1727+
1728+
/* Enable inserting headers into the first frame */
1729+
vchiq_mmal_port_parameter_set(dev->instance,
1730+
&dev->component[COMP_VIDEO_ENCODE]->control,
1731+
MMAL_PARAMETER_VIDEO_ENCODE_HEADERS_WITH_FRAME,
1732+
&enable, sizeof(enable));
17271733
}
17281734
ret = bcm2835_mmal_set_all_camera_controls(dev);
17291735
if (ret < 0) {

0 commit comments

Comments
 (0)