Skip to content

vah264enc: Insert CEA-708 captions (2)

Eric Knapp requested to merge emkman99/gstreamer:cc2 into main

This is an alternative to !2840 (closed). The previous method used gst_h264_bit_writer_sei(), which requires fixed size buffers and ends up copying the data multiple times. This uses GstBitWriter in gstvah264enc.c to directly write variable size SEI headers.

  1. I did not check the return codes on any bit writer functions, since it looks like it cannot fail when auto-grow = true (and given that we know the bitwriter exists and the size of bits written is valid). Am I missing any point of failure here?
  2. If VA_ENC_PACKED_HEADER_RAW_DATA is not supported, this will fail by default since self->cc = true by default. Is this okay? Should it gracefully skip caption insertion instead?
Edited by Eric Knapp

Merge request reports