svtjpegxsenc: put "codestream-length" into caps

So consumers can calculate the maximum bitrate (brat)
from that for various descriptors, in combination with
the framerate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7430>
This commit is contained in:
Tim-Philipp Müller 2024-08-30 11:19:06 +01:00 committed by GStreamer Marge Bot
parent ae1cd3d528
commit cdea025b5b

View file

@ -544,9 +544,12 @@ gst_svt_jpeg_xs_enc_set_format (GstVideoEncoder * encoder,
src_caps = gst_caps_make_writable (src_caps); src_caps = gst_caps_make_writable (src_caps);
// ToDo: might want to add more things to the caps, such as depth etc. // ToDo: add more things to the caps?
gst_caps_set_simple (src_caps, "sampling", G_TYPE_STRING, sampling, gst_caps_set_simple (src_caps, //
"depth", G_TYPE_INT, enc->input_bit_depth, NULL); "sampling", G_TYPE_STRING, sampling, //
"depth", G_TYPE_INT, enc->input_bit_depth, //
"codestream-length", G_TYPE_INT, jxsenc->bytes_per_frame, //
NULL);
GstVideoCodecState *output_state = GstVideoCodecState *output_state =
gst_video_encoder_set_output_state (GST_VIDEO_ENCODER (encoder), src_caps, gst_video_encoder_set_output_state (GST_VIDEO_ENCODER (encoder), src_caps,