MP4AddRtpVideoHint - Man Page

Add an RTP video specific hint

Syntax

#include <mp4.h>

bool MP4AddRtpVideoHint(
MP4FileHandle hFile,
MP4TrackId trackId,
bool isBFrame = false,
u_int32_t timestampOffset = 0
);

Arguments

hFile

Specifies the mp4 file to which the operation applies.

trackId

Specifies the hint track to which the operation applies.

isBFrame

Specifies if this hint will contain packets for a video B frame

timestampOffset

Specifies a positive offset to add to the RTP timestamp for this hint. Caveat: the value is in the hint track timescale.

Return Values

Upon success, true (1). Upon an error, false (0).

Description

MP4AddRtpVideoHint is an extended version of MP4AddRtpHint specifically to handle MPEG video frames.

The isBFrame parameter allows the packets in the RTP hint to be marked as belonging to a video B frame. This can be useful to a streaming server if packets must be dropped due to system load or network congestion. No other video frames are dependent on the contents of B frames, so they are least damaging type of frames to drop.

The timestampOffset parameter allows an offset to be added to the RTP timestamp of the packets in the RTP hint. This is necessary for MPEG video that contains B frames since the video frames are transmitted out of order with respect to when they should be rendered. I.e I and P frames are transmitted before any B frames that depend on them. The RTP timestamp must represent the rendering time of the data in the packets hence an offset must be added.

Note: The timestampOffset is equivalent to the sample rendering offset of a video media track. See MP4GetSampleRenderingOffset().

See Also

MP4(3) MP4AddRtpHint(3) MP4AddRtpPacket(3) MP4WriteRtpHint (3)

Info

Version 0.9 Cisco Systems Inc. MP4 File Format Library