MP4v2
streaming.h
1#ifndef MP4V2_STREAMING_H
2#define MP4V2_STREAMING_H
3
4/**************************************************************************/
45MP4V2_EXPORT
47 MP4FileHandle hFile,
48 MP4TrackId hintTrackId,
49 char** ppPayloadName DEFAULT(NULL),
50 uint8_t* pPayloadNumber DEFAULT(NULL),
51 uint16_t* pMaxPayloadSize DEFAULT(NULL),
52 char** ppEncodingParams DEFAULT(NULL) );
53
54#define MP4_SET_DYNAMIC_PAYLOAD 0xff
55
106MP4V2_EXPORT
108 MP4FileHandle hFile,
109 MP4TrackId hintTrackId,
110 const char* pPayloadName,
111 uint8_t* pPayloadNumber,
112 uint16_t maxPayloadSize DEFAULT(0),
113 const char * encode_params DEFAULT(NULL),
114 bool include_rtp_map DEFAULT(true),
115 bool include_mpeg4_esid DEFAULT(true) );
116
134MP4V2_EXPORT
136 MP4FileHandle hFile );
137
152MP4V2_EXPORT
154 MP4FileHandle hFile,
155 const char* sdpString );
156
172MP4V2_EXPORT
174 MP4FileHandle hFile,
175 const char* sdpString );
176
197MP4V2_EXPORT
199 MP4FileHandle hFile,
200 MP4TrackId hintTrackId );
201
217MP4V2_EXPORT
219 MP4FileHandle hFile,
220 MP4TrackId hintTrackId,
221 const char* sdpString );
222
239MP4V2_EXPORT
241 MP4FileHandle hFile,
242 MP4TrackId hintTrackId,
243 const char* sdpString );
244
258MP4V2_EXPORT
260 MP4FileHandle hFile,
261 MP4TrackId hintTrackId );
262
287MP4V2_EXPORT
289 MP4FileHandle hFile,
290 MP4TrackId hintTrackId,
291 MP4SampleId hintSampleId,
292 uint16_t* pNumPackets DEFAULT(NULL) );
293
307MP4V2_EXPORT
309 MP4FileHandle hFile,
310 MP4TrackId hintTrackId );
311
327MP4V2_EXPORT
329 MP4FileHandle hFile,
330 MP4TrackId hintTrackId,
331 uint16_t packetIndex );
332
351MP4V2_EXPORT
353 MP4FileHandle hFile,
354 MP4TrackId hintTrackId,
355 uint16_t packetIndex );
356
415MP4V2_EXPORT
417 MP4FileHandle hFile,
418 MP4TrackId hintTrackId,
419 uint16_t packetIndex,
420 uint8_t** ppBytes,
421 uint32_t* pNumBytes,
422 uint32_t ssrc DEFAULT(0),
423 bool includeHeader DEFAULT(true),
424 bool includePayload DEFAULT(true) );
425
450MP4V2_EXPORT
452 MP4FileHandle hFile,
453 MP4TrackId hintTrackId );
454
474MP4V2_EXPORT
476 MP4FileHandle hFile,
477 MP4TrackId hintTrackId,
478 MP4Timestamp rtpStart );
479
495MP4V2_EXPORT
497 MP4FileHandle hFile,
498 MP4TrackId hintTrackId );
499
536MP4V2_EXPORT
538 MP4FileHandle hFile,
539 MP4TrackId hintTrackId,
540 bool isBFrame DEFAULT(false),
541 uint32_t timestampOffset DEFAULT(0) );
542
567MP4V2_EXPORT
569 MP4FileHandle hFile,
570 MP4TrackId hintTrackId,
571 bool setMBit DEFAULT(false),
572 int32_t transmitOffset DEFAULT(0) );
573
594MP4V2_EXPORT
596 MP4FileHandle hFile,
597 MP4TrackId hintTrackId,
598 const uint8_t* pBytes,
599 uint32_t numBytes );
600
621MP4V2_EXPORT
623 MP4FileHandle hFile,
624 MP4TrackId hintTrackId,
625 MP4SampleId sampleId,
626 uint32_t dataOffset,
627 uint32_t dataLength );
628
643MP4V2_EXPORT
645 MP4FileHandle hFile,
646 MP4TrackId hintTrackId );
647
667MP4V2_EXPORT
669 MP4FileHandle hFile,
670 MP4TrackId hintTrackId,
671 MP4Duration duration,
672 bool isSyncSample DEFAULT(true) );
673
676#endif /* MP4V2_STREAMING_H */
bool MP4ReadRtpPacket(MP4FileHandle hFile, MP4TrackId hintTrackId, uint16_t packetIndex, uint8_t **ppBytes, uint32_t *pNumBytes, uint32_t ssrc=0, bool includeHeader=true, bool includePayload=true)
Read an RTP packet.
bool MP4AddRtpHint(MP4FileHandle hFile, MP4TrackId hintTrackId)
Add an RTP hint.
bool MP4SetHintTrackSdp(MP4FileHandle hFile, MP4TrackId hintTrackId, const char *sdpString)
Set the SDP media level description of the hint track.
bool MP4AppendHintTrackSdp(MP4FileHandle hFile, MP4TrackId hintTrackId, const char *sdpString)
Add to the SDP media level description of the hint track.
const char * MP4GetHintTrackSdp(MP4FileHandle hFile, MP4TrackId hintTrackId)
Get the SDP media level description associated with a hint track.
bool MP4SetHintTrackRtpPayload(MP4FileHandle hFile, MP4TrackId hintTrackId, const char *pPayloadName, uint8_t *pPayloadNumber, uint16_t maxPayloadSize=0, const char *encode_params=NULL, bool include_rtp_map=true, bool include_mpeg4_esid=true)
Set the RTP payload parameters of the hint track.
MP4TrackId MP4GetHintTrackReferenceTrackId(MP4FileHandle hFile, MP4TrackId hintTrackId)
Get the reference track id for a hint track.
bool MP4SetSessionSdp(MP4FileHandle hFile, const char *sdpString)
Set the SDP session level description of the file.
bool MP4AddRtpVideoHint(MP4FileHandle hFile, MP4TrackId hintTrackId, bool isBFrame=false, uint32_t timestampOffset=0)
Add an RTP video specific hint.
int32_t MP4GetRtpPacketTransmitOffset(MP4FileHandle hFile, MP4TrackId hintTrackId, uint16_t packetIndex)
Get the transmit offset of an RTP packet.
bool MP4GetHintTrackRtpPayload(MP4FileHandle hFile, MP4TrackId hintTrackId, char **ppPayloadName=NULL, uint8_t *pPayloadNumber=NULL, uint16_t *pMaxPayloadSize=NULL, char **ppEncodingParams=NULL)
Get the RTP payload parameters of the hint track.
bool MP4AddRtpPacket(MP4FileHandle hFile, MP4TrackId hintTrackId, bool setMBit=false, int32_t transmitOffset=0)
Add an RTP packet.
bool MP4WriteRtpHint(MP4FileHandle hFile, MP4TrackId hintTrackId, MP4Duration duration, bool isSyncSample=true)
Write an RTP hint.
bool MP4ReadRtpHint(MP4FileHandle hFile, MP4TrackId hintTrackId, MP4SampleId hintSampleId, uint16_t *pNumPackets=NULL)
Read an RTP hint.
bool MP4AddRtpESConfigurationPacket(MP4FileHandle hFile, MP4TrackId hintTrackId)
Add ES configuration information to an RTP hint.
bool MP4AppendSessionSdp(MP4FileHandle hFile, const char *sdpString)
Add to the SDP session level description of the file.
bool MP4AddRtpSampleData(MP4FileHandle hFile, MP4TrackId hintTrackId, MP4SampleId sampleId, uint32_t dataOffset, uint32_t dataLength)
Add media sample data to an RTP packet.
MP4Timestamp MP4GetRtpTimestampStart(MP4FileHandle hFile, MP4TrackId hintTrackId)
Get the RTP start time of a hint track.
bool MP4AddRtpImmediateData(MP4FileHandle hFile, MP4TrackId hintTrackId, const uint8_t *pBytes, uint32_t numBytes)
Add immediate data to an RTP packet.
uint16_t MP4GetRtpHintNumberOfPackets(MP4FileHandle hFile, MP4TrackId hintTrackId)
Get the number of packets in an RTP hint.
int8_t MP4GetRtpPacketBFrame(MP4FileHandle hFile, MP4TrackId hintTrackId, uint16_t packetIndex)
Get the B frame flag of an RTP packet.
bool MP4SetRtpTimestampStart(MP4FileHandle hFile, MP4TrackId hintTrackId, MP4Timestamp rtpStart)
Get the RTP start time of a hint track.
const char * MP4GetSessionSdp(MP4FileHandle hFile)
Get the SDP session level description of the file.