1 #ifndef MP4V2_STREAMING_H
2 #define MP4V2_STREAMING_H
12 bool MP4GetHintTrackRtpPayload(
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) );
20 #define MP4_SET_DYNAMIC_PAYLOAD 0xff
23 bool MP4SetHintTrackRtpPayload(
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) );
34 const char* MP4GetSessionSdp(
35 MP4FileHandle hFile );
38 bool MP4SetSessionSdp(
40 const char* sdpString );
43 bool MP4AppendSessionSdp(
45 const char* sdpString );
48 const char* MP4GetHintTrackSdp(
50 MP4TrackId hintTrackId );
53 bool MP4SetHintTrackSdp(
55 MP4TrackId hintTrackId,
56 const char* sdpString );
59 bool MP4AppendHintTrackSdp(
61 MP4TrackId hintTrackId,
62 const char* sdpString );
65 MP4TrackId MP4GetHintTrackReferenceTrackId(
67 MP4TrackId hintTrackId );
72 MP4TrackId hintTrackId,
73 MP4SampleId hintSampleId,
74 uint16_t* pNumPackets DEFAULT(NULL) );
77 uint16_t MP4GetRtpHintNumberOfPackets(
79 MP4TrackId hintTrackId );
82 int8_t MP4GetRtpPacketBFrame(
84 MP4TrackId hintTrackId,
85 uint16_t packetIndex );
88 int32_t MP4GetRtpPacketTransmitOffset(
90 MP4TrackId hintTrackId,
91 uint16_t packetIndex );
94 bool MP4ReadRtpPacket(
96 MP4TrackId hintTrackId,
100 uint32_t ssrc DEFAULT(0),
101 bool includeHeader DEFAULT(
true),
102 bool includePayload DEFAULT(
true) );
105 MP4Timestamp MP4GetRtpTimestampStart(
107 MP4TrackId hintTrackId );
110 bool MP4SetRtpTimestampStart(
112 MP4TrackId hintTrackId,
113 MP4Timestamp rtpStart );
118 MP4TrackId hintTrackId );
121 bool MP4AddRtpVideoHint(
123 MP4TrackId hintTrackId,
124 bool isBframe DEFAULT(
false),
125 uint32_t timestampOffset DEFAULT(0) );
128 bool MP4AddRtpPacket(
130 MP4TrackId hintTrackId,
131 bool setMbit DEFAULT(
false),
132 int32_t transmitOffset DEFAULT(0) );
135 bool MP4AddRtpImmediateData(
137 MP4TrackId hintTrackId,
138 const uint8_t* pBytes,
142 bool MP4AddRtpSampleData(
144 MP4TrackId hintTrackId,
145 MP4SampleId sampleId,
147 uint32_t dataLength );
150 bool MP4AddRtpESConfigurationPacket(
152 MP4TrackId hintTrackId );
155 bool MP4WriteRtpHint(
157 MP4TrackId hintTrackId,
158 MP4Duration duration,
159 bool isSyncSample DEFAULT(
true) );