29 #define TS2_PES_START_CODE_PREFIX 0x000001 31 #define TS2_PES_COMMON_HEADER_SIZE 3 33 #define TS2_PROGRAM_MAP_STREAM_ID 0xBC 34 #define TS2_PRIVATE_1_STREAM_ID 0xBD 35 #define TS2_PADDING_STREAM_ID 0xBE 36 #define TS2_PRIVATE_2_STREAM_ID 0xBF 37 #define TS2_ECM_STREAM_ID 0xF0 38 #define TS2_EMM_STREAM_ID 0xF1 39 #define TS2_DSMCC_STREAM_ID 0xF2 40 #define TS2_ISO_IEC_13522_STREAM_ID 0xF3 41 #define TS2_H222_1_TYPE_A_STREAM_ID 0xF4 42 #define TS2_H222_1_TYPE_B_STREAM_ID 0xF5 43 #define TS2_H222_1_TYPE_C_STREAM_ID 0xF6 44 #define TS2_H222_1_TYPE_D_STREAM_ID 0xF7 45 #define TS2_H222_1_TYPE_E_STREAM_ID 0xF8 46 #define TS2_PROGRAM_DIRECTORY_STREAM_ID 0xFF 51 #define TS2_PES_HEADER_EXTENSION_PRIVATE_DATA_LENGTH 16 95 #define TS2_IsStreamIdVideo(stream_id) (((stream_id) & 0xE0) == 0xC0) 96 #define TS2_VideoStreamNumber(stream_id) ((stream_id) & 0x1F) 97 #define TS2_IsStreamIdAudio(stream_id) (((stream_id) & 0xF0) == 0xE0) 98 #define TS2_AudioStreamNumber(stream_id) ((stream_id) & 0x0F) 100 #define TS2_PesHeader_ScramblingControl(hflags) (((hflags) & 0x3000) >> 12) 101 #define TS2_PesHeader_PriorityFlag(hflags) (((hflags) & 0x0800) >> 11) 102 #define TS2_PesHeader_AlignmentIndicator(hflags) (((hflags) & 0x0400) >> 10) 103 #define TS2_PesHeader_Copyright(hflags) (((hflags) & 0x0200) >> 9) 104 #define TS2_PesHeader_OriginalOrCopy(hflags) (((hflags) & 0x0100) >> 8) 105 #define TS2_PesHeader_PtsDtsFlags(hflags) (((hflags) & 0x00C0) >> 6) 106 #define TS2_PesHeader_EscrFlag(hflags) (((hflags) & 0x0020) >> 5) 107 #define TS2_PesHeader_EsRateFlag(hflags) (((hflags) & 0x0010) >> 4) 108 #define TS2_PesHeader_DsmTrickModeFlag(hflags) (((hflags) & 0x0008) >> 3) 109 #define TS2_PesHeader_ExtraCopyInfoFlag(hflags) (((hflags) & 0x0004) >> 2) 110 #define TS2_PesHeader_PesCrcFlag(hflags) (((hflags) & 0x0002) >> 1) 111 #define TS2_PesHeader_ExtensionFlag(hflags) (((hflags) & 0x0001) ) 113 #define TS2_PesExtension_PrivateData(eflags) (((eflags) & 0x80) ) 114 #define TS2_PesExtension_PacketHeader(eflags) (((eflags) & 0x40) ) 115 #define TS2_PesExtension_SequenceCounter(eflags) (((eflags) & 0x20) ) 116 #define TS2_PesExtension_StdBuffer(eflags) (((eflags) & 0x10) ) 117 #define TS2_PesExtension_Flag2(eflags) (((eflags) & 0x01) )
void TS2_PesPacket_Destroy(TS2_PesPacket *pp)
ATX_Size length
Definition: Ts2Pes.h:81
#define TS2_PES_HEADER_EXTENSION_PRIVATE_DATA_LENGTH
Definition: Ts2Pes.h:51
ATX_UInt8 stream_id
Definition: Ts2Pes.h:80
ATX_Int8 last_continuity_counter
Definition: Ts2Pes.h:89
TS2_PesPacketHeader * header
Definition: Ts2Pes.h:82
TS2_PesPacket * current
Definition: Ts2Pes.h:87
ATX_Size pes_length_read
Definition: Ts2Pes.h:88
ATX_Result TS2_PesPacket_Unpack(TS2_PesPacketAssembler *assembler, const TS2_Packet *packet, TS2_PesPacket **packet_out)
packet_out must be non-NULL.
Definition: Ts2Packet.h:91
ATX_DataBuffer * payload
Definition: Ts2Pes.h:83