diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-11-09 01:04:02 +0000 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2018-02-20 22:04:12 +0000 |
commit | 1d12a545ce828eaf4fb37295400008ea37635ab8 (patch) | |
tree | cd46b169af902f8fa59d8e9d315af7f2999d7c7c /libavcodec/cbs.h | |
parent | 2651352988212531038326c44754ece1728c4a3b (diff) | |
download | ffmpeg-1d12a545ce828eaf4fb37295400008ea37635ab8.tar.gz |
cbs: Add an explicit type for coded bitstream unit types
Also fix conversion specifiers used for the unit type.
Diffstat (limited to 'libavcodec/cbs.h')
-rw-r--r-- | libavcodec/cbs.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/libavcodec/cbs.h b/libavcodec/cbs.h index 34ee78be32..85c7b55577 100644 --- a/libavcodec/cbs.h +++ b/libavcodec/cbs.h @@ -28,6 +28,15 @@ struct CodedBitstreamType; /** + * The codec-specific type of a bitstream unit. + * + * H.264 / AVC: nal_unit_type + * H.265 / HEVC: nal_unit_type + * MPEG-2: start code value (without prefix) + */ +typedef uint32_t CodedBitstreamUnitType; + +/** * Coded bitstream unit structure. * * A bitstream unit the the smallest element of a bitstream which @@ -40,7 +49,7 @@ typedef struct CodedBitstreamUnit { /** * Codec-specific type of this unit. */ - uint32_t type; + CodedBitstreamUnitType type; /** * Pointer to the bitstream form of this unit. @@ -149,7 +158,7 @@ typedef struct CodedBitstreamContext { * Types not in this list will be available in bitstream form only. * If NULL, all supported types will be decomposed. */ - uint32_t *decompose_unit_types; + CodedBitstreamUnitType *decompose_unit_types; /** * Length of the decompose_unit_types array. */ @@ -250,7 +259,8 @@ void ff_cbs_fragment_uninit(CodedBitstreamContext *ctx, */ int ff_cbs_insert_unit_content(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, - int position, uint32_t type, + int position, + CodedBitstreamUnitType type, void *content); /** @@ -260,7 +270,8 @@ int ff_cbs_insert_unit_content(CodedBitstreamContext *ctx, */ int ff_cbs_insert_unit_data(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, - int position, uint32_t type, + int position, + CodedBitstreamUnitType type, uint8_t *data, size_t data_size); /** |