1MP4(3) MP4 File Format Library MP4(3)
2
3
4
6 MP4GetSampleRenderingOffset - Get the rendering offset of a track sam‐
7 ple
8
10 #include <mp4.h>
11
12 MP4Duration MP4GetSampleRenderingOffset(
13 MP4FileHandle hFile,
14 MP4TrackId trackId,
15 MP4SampleId sampleId
16 );
17
19 hFile Specifies the mp4 file to which the operation applies.
20
21 trackId
22 Specifies the track to which the operation applies.
23
24 sampleId
25 Specifies the sample to which the operation applies. Caveat: the
26 first sample has id 1 not 0.
27
28
30 Upon success, the rendering offset in track time scale units. Upon an
31 error, MP4_INVALID_DURATION.
32
34 MP4GetSampleRenderingOffset returns the rendering offset of the speci‐
35 fied sample from the specified track in the track time scale units. See
36 MP4ConvertFromTrackDuration() for how to map this value to another time
37 scale.
38
39 The sample rendering offset is typically zero for all media types other
40 than video. For video, encodings such as those defined by MPEG have
41 three types of frames: I, P, and B. To increase coding efficiency B
42 frames can depend on I or P frames that should be rendered after the B
43 frame. However to decode the B frame the I or P frame must already have
44 been decoded. This situation is addressed by placing the frames in
45 decoding order in the video track, and then setting the rendering off‐
46 set property to indicate when the video frame should actually be ren‐
47 dered to the screen. Hence the start time of a sample indicates when it
48 should be decoded, the start time plus the rendering offset indicates
49 when it should be rendered.
50
52 MP4(3) MP4ConvertFromTrackDuration(3)
53
54
55
56Cisco Systems Inc. Version 0.9 MP4(3)