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