1#ifndef MP4V2_STREAMING_H
2#define MP4V2_STREAMING_H
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) );
54#define MP4_SET_DYNAMIC_PAYLOAD 0xff
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) );
136 MP4FileHandle hFile );
155 const char* sdpString );
175 const char* sdpString );
200 MP4TrackId hintTrackId );
220 MP4TrackId hintTrackId,
221 const char* sdpString );
242 MP4TrackId hintTrackId,
243 const char* sdpString );
261 MP4TrackId hintTrackId );
290 MP4TrackId hintTrackId,
291 MP4SampleId hintSampleId,
292 uint16_t* pNumPackets DEFAULT(NULL) );
310 MP4TrackId hintTrackId );
330 MP4TrackId hintTrackId,
331 uint16_t packetIndex );
354 MP4TrackId hintTrackId,
355 uint16_t packetIndex );
418 MP4TrackId hintTrackId,
419 uint16_t packetIndex,
422 uint32_t ssrc DEFAULT(0),
423 bool includeHeader DEFAULT(
true),
424 bool includePayload DEFAULT(
true) );
453 MP4TrackId hintTrackId );
477 MP4TrackId hintTrackId,
478 MP4Timestamp rtpStart );
498 MP4TrackId hintTrackId );
539 MP4TrackId hintTrackId,
540 bool isBFrame DEFAULT(
false),
541 uint32_t timestampOffset DEFAULT(0) );
570 MP4TrackId hintTrackId,
571 bool setMBit DEFAULT(
false),
572 int32_t transmitOffset DEFAULT(0) );
597 MP4TrackId hintTrackId,
598 const uint8_t* pBytes,
624 MP4TrackId hintTrackId,
625 MP4SampleId sampleId,
627 uint32_t dataLength );
646 MP4TrackId hintTrackId );
670 MP4TrackId hintTrackId,
671 MP4Duration duration,
672 bool isSyncSample DEFAULT(
true) );
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.