GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MP4GETSAMPLEIDFROMTIME (3)

NAME

MP4GetSampleIdFromTime - Get the sample id of a specified time

CONTENTS

SYNTAX

#include <mp4.h>

MP4SampleId MP4GetSampleIdFromTime(
        MP4FileHandle hFile,
        MP4TrackId trackId,
        MP4Timestamp when,
        bool wantSyncSample = false
);

ARGUMENTS

hFile Specifies the mp4 file to which the operation applies.
trackId
  Specifies the track to which the operation applies.
when Specifies the time in the track time scale that is desired.
wantSyncSample
  Specifies if the returned sample id must correspond to a sample whose sync/random access flag is true.

RETURN VALUES

Upon success, the sample id that occurs at the specified time. Upon an error, MP4_INVALID_SAMPLE_ID.

DESCRIPTION

MP4GetSampleIdFromTime returns the sample id of the track sample in which the specified time occurs.

The specified time should be in the track time scale. See MP4ConvertToTrackTimestamp() for how to map a time value to this time scale.

It is wise to use MP4GetSampleTime() with the returned sample id so one can adjust for any difference between the specified time and the actual start time of the sample.

If the calling application needs a sample that can be accessed randomly then the ’wantSyncSample’ argument should be set to true. This could be the case for a player that is implementing a positioning function and needs to be able to start decoding a track from the returned sample id.

SEE ALSO

MP4(3) MP4GetSampleIdFromEditTime(3)

Search for    or go to Top of page |  Section 3 |  Main Index


Cisco Systems Inc. MP4 (3) Version 0.9

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.