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  -  MP4WRITESAMPLE (3)

NAME

MP4WriteSample - Write a track sample

CONTENTS

SYNTAX

#include <mp4.h>

bool MP4WriteSample(
        MP4FileHandle hFile,
        MP4TrackId trackId,
        u_int8_t* pBytes,
        u_int32_t numBytes,
        MP4Duration duration = MP4_INVALID_DURATION,
        MP4Duration renderingOffset = 0,
        bool isSyncSample = true
);

ARGUMENTS

hFile Specifies the mp4 file to which the operation applies.
trackId
  Specifies the track to which the operation applies.
pBytes Pointer to the sample data.
numBytes
  The size in bytes of the sample.
duration
  The duration for this sample. Caveat: The duration should be in the track timescale units.
renderingOffset
  The rendering offset for this sample. Currently the only media type that needs this feature is MPEG video. Caveat: The offset should be in the track timescale units.
isSyncSample
  The sync/random access flag for this sample.

RETURN VALUES

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

DESCRIPTION

MP4WriteSample writes the given sample at the end of the specified track. Currently the library does not support random insertion of samples into the track timeline. Note that with mp4 there cannot be any holes or overlapping samples in the track timeline. The last three arguments give optional sample information.

The value of duration can be given as MP4_INVALID_DURATION if all samples in the track have the same duration. This can be specified with MP4AddTrack() and related functions.

Typically for audio none of the optional arguments are needed. MPEG audio such as MP3 or AAC has a fixed sample duration and every sample can be accessed at random.

For video, all of the optional arguments could be needed. MPEG video can be encoded at a variable frame rate, with only occasional random access points, and with "B frames" which cause the rendering (display) order of the video frames to differ from the storage/decoding order.

Other media types fall between these two extremes.

SEE ALSO

MP4(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.