X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fcbs_h264.h;h=9f7c2a0d308e8d08805a5955b11a9f4fe6603115;hb=9f6a06d9271a11781717fd0b134db2bcd716508e;hp=92277e475061798cb561ca6ac0cd4403b34e0c18;hpb=de33b3e457a656230fc6d544a1889218d77a5b3c;p=ffmpeg diff --git a/libavcodec/cbs_h264.h b/libavcodec/cbs_h264.h index 92277e47506..9f7c2a0d308 100644 --- a/libavcodec/cbs_h264.h +++ b/libavcodec/cbs_h264.h @@ -38,7 +38,6 @@ enum { typedef struct H264RawNALUnitHeader { - uint8_t forbidden_zero_bit; uint8_t nal_ref_idc; uint8_t nal_unit_type; @@ -253,7 +252,7 @@ typedef struct H264RawSEIPicTimestamp { uint8_t minutes_value; uint8_t hours_flag; uint8_t hours_value; - uint32_t time_offset; + int32_t time_offset; } H264RawSEIPicTimestamp; typedef struct H264RawSEIPicTiming { @@ -315,6 +314,10 @@ typedef struct H264RawSEIMasteringDisplayColourVolume { uint32_t min_display_mastering_luminance; } H264RawSEIMasteringDisplayColourVolume; +typedef struct H264RawSEIAlternativeTransferCharacteristics { + uint8_t preferred_transfer_characteristics; +} H264RawSEIAlternativeTransferCharacteristics; + typedef struct H264RawSEIPayload { uint32_t payload_type; uint32_t payload_size; @@ -328,6 +331,8 @@ typedef struct H264RawSEIPayload { H264RawSEIRecoveryPoint recovery_point; H264RawSEIDisplayOrientation display_orientation; H264RawSEIMasteringDisplayColourVolume mastering_display_colour_volume; + H264RawSEIAlternativeTransferCharacteristics + alternative_transfer_characteristics; struct { uint8_t *data; size_t data_length; @@ -463,20 +468,26 @@ typedef struct CodedBitstreamH264Context { /** * Add an SEI message to an access unit. + * + * On success, the payload will be owned by a unit in access_unit; + * on failure, the content of the payload will be freed. */ int ff_cbs_h264_add_sei_message(CodedBitstreamContext *ctx, CodedBitstreamFragment *access_unit, - const H264RawSEIPayload *payload); + H264RawSEIPayload *payload); /** * Delete an SEI message from an access unit. * * Deletes from nal_unit, which must be an SEI NAL unit. If this is the * last message in nal_unit, also deletes it from access_unit. + * + * Requires nal_unit to be a unit in access_unit and position to be >= 0 + * and < the payload count of the SEI nal_unit. */ -int ff_cbs_h264_delete_sei_message(CodedBitstreamContext *ctx, - CodedBitstreamFragment *access_unit, - CodedBitstreamUnit *nal_unit, - int position); +void ff_cbs_h264_delete_sei_message(CodedBitstreamContext *ctx, + CodedBitstreamFragment *access_unit, + CodedBitstreamUnit *nal_unit, + int position); #endif /* AVCODEC_CBS_H264_H */