Go to the documentation of this file.
69 int old_count =
list->nb_messages_allocated;
72 if (
list->nb_messages + 1 > old_count) {
73 int new_count = 2 * old_count + 1;
76 new_count,
sizeof(*
list->messages));
81 list->nb_messages_allocated = new_count;
84 memset(
list->messages + old_count, 0,
85 (new_count - old_count) *
sizeof(*
list->messages));
93 for (
int i = 0;
i <
list->nb_messages;
i++) {
107 int sei_type, highest_vcl_type, err,
i, position;
109 switch (
ctx->codec->codec_id) {
178 unit = &au->
units[position];
179 unit->
type = sei_type;
185 switch (
ctx->codec->codec_id) {
191 .nal_unit_type = sei_type,
201 .nal_unit_type = sei_type,
203 .nuh_temporal_id_plus1 = 1,
213 .nal_unit_type = sei_type,
215 .nuh_temporal_id_plus1 = 1,
233 switch (
ctx->codec->codec_id) {
270 uint32_t payload_type,
307 message->payload_type = payload_type;
308 message->payload = payload_data;
309 message->payload_ref = payload_ref;
316 uint32_t payload_type,
319 int err,
i, j, found;
330 for (j = 0; j <
list->nb_messages; j++) {
333 if (
message->payload_type == payload_type) {
334 if (!*iter || found) {
352 av_assert0(0 <= position && position < list->nb_messages);
360 if (
list->nb_messages > 0) {
361 memmove(
list->messages + position,
362 list->messages + position + 1,
363 (
list->nb_messages - position) *
sizeof(*
list->messages));
369 uint32_t payload_type)
381 for (j =
list->nb_messages - 1; j >= 0; j--) {
382 if (
list->messages[j].payload_type == payload_type)
void * ff_refstruct_ref(void *obj)
Create a new reference to an object managed via this API, i.e.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
int ff_cbs_sei_add_message(CodedBitstreamContext *ctx, CodedBitstreamFragment *au, int prefix, uint32_t payload_type, void *payload_data, void *payload_ref)
Add an SEI message to an access unit.
void * content
Pointer to the decomposed form of this unit.
int ff_cbs_insert_unit_content(CodedBitstreamFragment *frag, int position, CodedBitstreamUnitType type, void *content, void *content_ref)
Insert a new unit into a fragment with the given content.
static void * ff_refstruct_alloc_ext(size_t size, unsigned flags, void *opaque, void(*free_cb)(FFRefStructOpaque opaque, void *obj))
A wrapper around ff_refstruct_alloc_ext_c() for the common case of a non-const qualified opaque.
void ff_cbs_sei_delete_message_type(CodedBitstreamContext *ctx, CodedBitstreamFragment *au, uint32_t payload_type)
Delete all messages with the given payload type from an access unit.
Context structure for coded bitstream operations.
static int cbs_sei_get_message_list(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit, SEIRawMessageList **list)
CodedBitstreamUnitType type
Codec-specific type of this unit.
RefStruct is an API for creating reference-counted objects with minimal overhead.
Coded bitstream unit structure.
uint8_t * data
RefStruct reference.
CodedBitstreamUnit * units
Pointer to an array of units of length nb_units_allocated.
Coded bitstream fragment structure, combining one or more units.
void * av_realloc_array(void *ptr, size_t nmemb, size_t size)
#define av_assert0(cond)
assert() equivalent, that is always enabled.
@ SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35
int ff_cbs_sei_alloc_message_payload(SEIRawMessage *message, const SEIMessageTypeDescriptor *desc)
Allocate a new payload for the given SEI message.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining list
static int FUNC() sei(CodedBitstreamContext *ctx, RWContext *rw, H264RawSEI *current)
uint8_t * data
RefStruct reference.
static void cbs_free_user_data_unregistered(FFRefStructOpaque unused, void *obj)
const SEIMessageTypeDescriptor * ff_cbs_sei_find_type(CodedBitstreamContext *ctx, int payload_type)
Find the type descriptor for the given payload type.
static void cbs_sei_delete_message(SEIRawMessageList *list, int position)
#define i(width, name, range_min, range_max)
int ff_cbs_sei_find_message(CodedBitstreamContext *ctx, CodedBitstreamFragment *au, uint32_t payload_type, SEIRawMessage **iter)
Iterate over messages with the given payload type in an access unit.
int ff_cbs_alloc_unit_content(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit)
Allocate a new internal content buffer matching the type of the unit.
@ SEI_TYPE_USER_DATA_UNREGISTERED
static void cbs_free_user_data_registered(FFRefStructOpaque unused, void *obj)
static int cbs_sei_get_unit(CodedBitstreamContext *ctx, CodedBitstreamFragment *au, int prefix, CodedBitstreamUnit **sei_unit)
static int FUNC() message(CodedBitstreamContext *ctx, RWContext *rw, SEIRawMessage *current)
int ff_cbs_sei_list_add(SEIRawMessageList *list)
Allocate a new empty SEI message in a message list.
void ff_cbs_sei_free_message_list(SEIRawMessageList *list)
Free all SEI messages in a message list.
void ff_refstruct_unref(void *objp)
Decrement the reference count of the underlying object and automatically free the object if there are...
int nb_units
Number of units in this fragment.