Wasabi ExpressPlay SDK for Embedded Systems  1.10
Ts2ElementaryStream.h
Go to the documentation of this file.
1 /*****************************************************************
2 |
3 | MPEG2 Transport Stream - Elementary Streams
4 |
5 | $Id: Ts2ElementaryStream.h 296 2014-06-25 11:20:09Z jebaseelir $
6 | Original author: Julien Boeuf
7 |
8 | This software is provided to you pursuant to your agreement
9 | with Intertrust Technologies Corporation ("Intertrust").
10 | This software may be used only in accordance with the terms
11 | of the agreement.
12 |
13 | Copyright (c) 2005-2014 by Intertrust. All rights reserved.
14 |
15 ****************************************************************/
16 
17 #ifndef _TS2_ELEMENTARY_STREAM_H_
18 #define _TS2_ELEMENTARY_STREAM_H_
19 
20 /*----------------------------------------------------------------------
21 | includes
22 +---------------------------------------------------------------------*/
23 #include "Atomix.h"
24 #include "Ts2Packet.h"
25 #include "Ts2Pes.h"
26 
27 /*----------------------------------------------------------------------
28 | constants
29 +---------------------------------------------------------------------*/
30 #define TS2_ES_MPEG1_VIDEO 0x01
31 #define TS2_ES_MPEG2_VIDEO 0x02
32 #define TS2_ES_MPEG1_AUDIO 0x03
33 #define TS2_ES_MPEG2_AUDIO 0x04
34 #define TS2_ES_MPEG4_VIDEO 0x10
35 #define TS2_ES_MPEG2_AAC 0x0F /* ADTS */
36 #define TS2_ES_MPEG4_AUDIO 0x11
37 #define TS2_ES_AVC 0x1B
38 #define TS2_ES_HEVC 0x24
39 #define TS2_ES_AC3 0x81
40 
41 /*----------------------------------------------------------------------
42 | types
43 +---------------------------------------------------------------------*/
45 
47  ATX_UInt8 type;
48  ATX_UInt16 pid; /* TS PID */
49  ATX_List* descs;
50  ATX_Any client_data; /* for OnPESPacketComplete callback */
51 
52  /* internal */
55  TS2_PesPacket* pes_packet,
56  ATX_Any client_data);
57 };
58 
59 /*----------------------------------------------------------------------
60 | methods
61 +---------------------------------------------------------------------*/
62 #ifdef __cplusplus
63 extern "C" {
64 #endif /* __cplusplus */
65 
66 ATX_Result
67 TS2_ElementaryStream_Parse(const ATX_Byte* data,
68  ATX_Size* data_size, /* in/out */
70 
71 ATX_Result
73  ATX_Byte* buffer);
74 
75 ATX_Size
77 
78 void
80 
81 ATX_Result
82 TS2_ElementaryStream_ProcessTsPacket(void* elementary_stream,
83  TS2_PacketDispatcher* dispatcher,
84  TS2_Packet* packet);
85 
86 ATX_Result
88  ATX_Result (*OnPesPacketComplete)(TS2_ElementaryStream*, TS2_PesPacket*, ATX_Any),
89  ATX_Any client_data);
90 
91 #ifdef __cplusplus
92 }
93 #endif /* __cplusplus */
94 
95 #endif /* _TS2_ELEMENTARY_STREAM_H_ */