include/mp4v2/streaming.h Source File
streaming.h
1#ifndef MP4V2_STREAMING_H
2#define MP4V2_STREAMING_H
3
4/**************************************************************************/
11MP4V2_EXPORT
12bool 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
22MP4V2_EXPORT
23bool 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
33MP4V2_EXPORT
34const char* MP4GetSessionSdp(
35 MP4FileHandle hFile );
36
37MP4V2_EXPORT
38bool MP4SetSessionSdp(
39 MP4FileHandle hFile,
40 const char* sdpString );
41
42MP4V2_EXPORT
43bool MP4AppendSessionSdp(
44 MP4FileHandle hFile,
45 const char* sdpString );
46
47MP4V2_EXPORT
48const char* MP4GetHintTrackSdp(
49 MP4FileHandle hFile,
50 MP4TrackId hintTrackId );
51
52MP4V2_EXPORT
53bool MP4SetHintTrackSdp(
54 MP4FileHandle hFile,
55 MP4TrackId hintTrackId,
56 const char* sdpString );
57
58MP4V2_EXPORT
59bool MP4AppendHintTrackSdp(
60 MP4FileHandle hFile,
61 MP4TrackId hintTrackId,
62 const char* sdpString );
63
64MP4V2_EXPORT
65MP4TrackId MP4GetHintTrackReferenceTrackId(
66 MP4FileHandle hFile,
67 MP4TrackId hintTrackId );
68
69MP4V2_EXPORT
70bool MP4ReadRtpHint(
71 MP4FileHandle hFile,
72 MP4TrackId hintTrackId,
73 MP4SampleId hintSampleId,
74 uint16_t* pNumPackets DEFAULT(NULL) );
75
76MP4V2_EXPORT
77uint16_t MP4GetRtpHintNumberOfPackets(
78 MP4FileHandle hFile,
79 MP4TrackId hintTrackId );
80
81MP4V2_EXPORT
82int8_t MP4GetRtpPacketBFrame(
83 MP4FileHandle hFile,
84 MP4TrackId hintTrackId,
85 uint16_t packetIndex );
86
87MP4V2_EXPORT
88int32_t MP4GetRtpPacketTransmitOffset(
89 MP4FileHandle hFile,
90 MP4TrackId hintTrackId,
91 uint16_t packetIndex );
92
93MP4V2_EXPORT
94bool 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
104MP4V2_EXPORT
105MP4Timestamp MP4GetRtpTimestampStart(
106 MP4FileHandle hFile,
107 MP4TrackId hintTrackId );
108
109MP4V2_EXPORT
110bool MP4SetRtpTimestampStart(
111 MP4FileHandle hFile,
112 MP4TrackId hintTrackId,
113 MP4Timestamp rtpStart );
114
115MP4V2_EXPORT
116bool MP4AddRtpHint(
117 MP4FileHandle hFile,
118 MP4TrackId hintTrackId );
119
120MP4V2_EXPORT
121bool MP4AddRtpVideoHint(
122 MP4FileHandle hFile,
123 MP4TrackId hintTrackId,
124 bool isBframe DEFAULT(false),
125 uint32_t timestampOffset DEFAULT(0) );
126
127MP4V2_EXPORT
128bool MP4AddRtpPacket(
129 MP4FileHandle hFile,
130 MP4TrackId hintTrackId,
131 bool setMbit DEFAULT(false),
132 int32_t transmitOffset DEFAULT(0) );
133
134MP4V2_EXPORT
135bool MP4AddRtpImmediateData(
136 MP4FileHandle hFile,
137 MP4TrackId hintTrackId,
138 const uint8_t* pBytes,
139 uint32_t numBytes );
140
141MP4V2_EXPORT
142bool MP4AddRtpSampleData(
143 MP4FileHandle hFile,
144 MP4TrackId hintTrackId,
145 MP4SampleId sampleId,
146 uint32_t dataOffset,
147 uint32_t dataLength );
148
149MP4V2_EXPORT
150bool MP4AddRtpESConfigurationPacket(
151 MP4FileHandle hFile,
152 MP4TrackId hintTrackId );
153
154MP4V2_EXPORT
155bool MP4WriteRtpHint(
156 MP4FileHandle hFile,
157 MP4TrackId hintTrackId,
158 MP4Duration duration,
159 bool isSyncSample DEFAULT(true) );
160
163#endif /* MP4V2_STREAMING_H */