include/mp4v2/streaming.h Source File
streaming.h
1 #ifndef MP4V2_STREAMING_H
2 #define MP4V2_STREAMING_H
3 
4 /**************************************************************************/
11 MP4V2_EXPORT
12 bool MP4GetHintTrackRtpPayload(
13  MP4FileHandle hFile,
14  MP4TrackId hintTrackId,
15  char** ppPayloadName DEFAULT(NULL),
16  uint8_t* pPayloadNumber DEFAULT(NULL),
17  uint16_t* pMaxPayloadSize DEFAULT(NULL),
18  char** ppEncodingParams DEFAULT(NULL) );
19 
20 #define MP4_SET_DYNAMIC_PAYLOAD 0xff
21 
22 MP4V2_EXPORT
23 bool MP4SetHintTrackRtpPayload(
24  MP4FileHandle hFile,
25  MP4TrackId hintTrackId,
26  const char* pPayloadName,
27  uint8_t* pPayloadNumber,
28  uint16_t maxPayloadSize DEFAULT(0),
29  const char * encode_params DEFAULT(NULL),
30  bool include_rtp_map DEFAULT(true),
31  bool include_mpeg4_esid DEFAULT(true) );
32 
33 MP4V2_EXPORT
34 const char* MP4GetSessionSdp(
35  MP4FileHandle hFile );
36 
37 MP4V2_EXPORT
38 bool MP4SetSessionSdp(
39  MP4FileHandle hFile,
40  const char* sdpString );
41 
42 MP4V2_EXPORT
43 bool MP4AppendSessionSdp(
44  MP4FileHandle hFile,
45  const char* sdpString );
46 
47 MP4V2_EXPORT
48 const char* MP4GetHintTrackSdp(
49  MP4FileHandle hFile,
50  MP4TrackId hintTrackId );
51 
52 MP4V2_EXPORT
53 bool MP4SetHintTrackSdp(
54  MP4FileHandle hFile,
55  MP4TrackId hintTrackId,
56  const char* sdpString );
57 
58 MP4V2_EXPORT
59 bool MP4AppendHintTrackSdp(
60  MP4FileHandle hFile,
61  MP4TrackId hintTrackId,
62  const char* sdpString );
63 
64 MP4V2_EXPORT
65 MP4TrackId MP4GetHintTrackReferenceTrackId(
66  MP4FileHandle hFile,
67  MP4TrackId hintTrackId );
68 
69 MP4V2_EXPORT
70 bool MP4ReadRtpHint(
71  MP4FileHandle hFile,
72  MP4TrackId hintTrackId,
73  MP4SampleId hintSampleId,
74  uint16_t* pNumPackets DEFAULT(NULL) );
75 
76 MP4V2_EXPORT
77 uint16_t MP4GetRtpHintNumberOfPackets(
78  MP4FileHandle hFile,
79  MP4TrackId hintTrackId );
80 
81 MP4V2_EXPORT
82 int8_t MP4GetRtpPacketBFrame(
83  MP4FileHandle hFile,
84  MP4TrackId hintTrackId,
85  uint16_t packetIndex );
86 
87 MP4V2_EXPORT
88 int32_t MP4GetRtpPacketTransmitOffset(
89  MP4FileHandle hFile,
90  MP4TrackId hintTrackId,
91  uint16_t packetIndex );
92 
93 MP4V2_EXPORT
94 bool MP4ReadRtpPacket(
95  MP4FileHandle hFile,
96  MP4TrackId hintTrackId,
97  uint16_t packetIndex,
98  uint8_t** ppBytes,
99  uint32_t* pNumBytes,
100  uint32_t ssrc DEFAULT(0),
101  bool includeHeader DEFAULT(true),
102  bool includePayload DEFAULT(true) );
103 
104 MP4V2_EXPORT
105 MP4Timestamp MP4GetRtpTimestampStart(
106  MP4FileHandle hFile,
107  MP4TrackId hintTrackId );
108 
109 MP4V2_EXPORT
110 bool MP4SetRtpTimestampStart(
111  MP4FileHandle hFile,
112  MP4TrackId hintTrackId,
113  MP4Timestamp rtpStart );
114 
115 MP4V2_EXPORT
116 bool MP4AddRtpHint(
117  MP4FileHandle hFile,
118  MP4TrackId hintTrackId );
119 
120 MP4V2_EXPORT
121 bool MP4AddRtpVideoHint(
122  MP4FileHandle hFile,
123  MP4TrackId hintTrackId,
124  bool isBframe DEFAULT(false),
125  uint32_t timestampOffset DEFAULT(0) );
126 
127 MP4V2_EXPORT
128 bool MP4AddRtpPacket(
129  MP4FileHandle hFile,
130  MP4TrackId hintTrackId,
131  bool setMbit DEFAULT(false),
132  int32_t transmitOffset DEFAULT(0) );
133 
134 MP4V2_EXPORT
135 bool MP4AddRtpImmediateData(
136  MP4FileHandle hFile,
137  MP4TrackId hintTrackId,
138  const uint8_t* pBytes,
139  uint32_t numBytes );
140 
141 MP4V2_EXPORT
142 bool MP4AddRtpSampleData(
143  MP4FileHandle hFile,
144  MP4TrackId hintTrackId,
145  MP4SampleId sampleId,
146  uint32_t dataOffset,
147  uint32_t dataLength );
148 
149 MP4V2_EXPORT
150 bool MP4AddRtpESConfigurationPacket(
151  MP4FileHandle hFile,
152  MP4TrackId hintTrackId );
153 
154 MP4V2_EXPORT
155 bool MP4WriteRtpHint(
156  MP4FileHandle hFile,
157  MP4TrackId hintTrackId,
158  MP4Duration duration,
159  bool isSyncSample DEFAULT(true) );
160 
163 #endif /* MP4V2_STREAMING_H */