00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef AVFORMAT_MXF_H
00022 #define AVFORMAT_MXF_H
00023
00024 #include "libavcodec/avcodec.h"
00025 #include <stdint.h>
00026
00027 typedef uint8_t UID[16];
00028
00029 enum MXFMetadataSetType {
00030 AnyType,
00031 MaterialPackage,
00032 SourcePackage,
00033 SourceClip,
00034 TimecodeComponent,
00035 Sequence,
00036 MultipleDescriptor,
00037 Descriptor,
00038 Track,
00039 CryptoContext,
00040 Preface,
00041 Identification,
00042 ContentStorage,
00043 SubDescriptor,
00044 IndexTableSegment,
00045 EssenceContainerData,
00046 TypeBottom,
00047 };
00048
00049 enum MXFFrameLayout {
00050 FullFrame = 0,
00051 SeparateFields,
00052 OneField,
00053 MixedFields,
00054 SegmentedFrame,
00055 };
00056
00057 typedef struct {
00058 UID key;
00059 int64_t offset;
00060 uint64_t length;
00061 } KLVPacket;
00062
00063 typedef struct {
00064 UID uid;
00065 unsigned matching_len;
00066 int id;
00067 } MXFCodecUL;
00068
00069 extern const MXFCodecUL ff_mxf_data_definition_uls[];
00070 extern const MXFCodecUL ff_mxf_codec_uls[];
00071 extern const MXFCodecUL ff_mxf_pixel_format_uls[];
00072
00073 int ff_mxf_decode_pixel_layout(const char pixel_layout[16], enum PixelFormat *pix_fmt);
00074
00075 #define PRINT_KEY(pc, s, x) av_dlog(pc, "%s %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", s, \
00076 (x)[0], (x)[1], (x)[2], (x)[3], (x)[4], (x)[5], (x)[6], (x)[7], (x)[8], (x)[9], (x)[10], (x)[11], (x)[12], (x)[13], (x)[14], (x)[15])
00077
00078 #endif