# Multimedia File Interface features

The MMFI library supports the following 3GP features:

Feature | Description
Random access | Allows a user to seek to a specific time within a video track, jumping ahead or back in a 3GP file during a play operation.
Skew correction | Allows a user to synchronize an audio and video stream during a 3GP file record operation by specifying a skew correction value for the multimedia file.
Hint tracks | Allows a user to specify that hint tracks be created during a 3GP file record operation. Hint tracks allow a streaming server to create RTP streams from a 3GP file without knowledge of the media type, compression, or payload format.
SDP | Allows an application to store SDP data to a 3GP file and retrieve SDP data from a 3GP file.

## Random access

The random access feature allows a user to seek to a specific time within a video track, jumping ahead or back in a 3GP file during a play operation.

### Sync points table

A 3GP file must have a sync point table in order to support random access. A sync point table is created when the video stream is opened for recording, if specified by the application. A sync point table is then filled in as the video stream is recorded. There is one entry in the sync point table for every I-frame written to the 3GP file. Each entry in the sync point table is a video sample number to which a 3GP file can be randomly accessed.

### Seek operations

The operation of seeking within a 3GP file involves aligning the file's track position pointer with a sync point. When moved, the track position pointer is updated for all tracks in the 3GP file. An application may seek to a sync point by calling one of the following functions:

Function | Description
mmSeekToTime | Allows the application to seek to a specific time specified in milliseconds within a 3GP file, relative to the beginning of the file.
mmSeekToNextSyncPoint | Allows the application to seek to the next sync point after the current track position pointer.
mmSeekToPrevSyncPoint | Allows the application to seek to the previous sync point before the current track position pointer.

See Recording to a 3GP file for an example of when to specify the creation of a sync point table in the video stream.

See Random access call flow for a call flow example that uses seek functions to do random access.

## Skew correction

The skew correction feature allows a user to synchronize an audio and video stream during a 3GP file record operation by specifying a skew correction value for the multimedia file. The value of the skew correction determines how synchronization is achieved.

Depending on the value of the skew correction, the audio stream's record operation works as follows:

- If the audio stream lags the video stream, the skew correction is specified (in milliseconds) as a positive value.

- If the audio stream leads the video stream, the skew correction is specified (in milliseconds) as a negative value.

See Recording to a 3GP file for call flow examples.

## Hint tracks

The hint tracks feature allows an application to request that hint tracks be created during a video or audio stream record operation. A hint track is a track in the 3GP file that contains hint information for an audio or video media track. Hint tracks allow a streaming server to create RTP streams from a 3GP file without knowledge of the media type, compression, or payload format.

To create hint tracks in the 3GP file, the user sets a flag when opening the audio and video streams. As the audio and video streams are written to the multimedia file, the hint tracks are automatically built.

The hint tracks feature improves performance by eliminating the overhead incurred by low level RTP packetization processing when playing a multimedia file. During a play operation, the hinting information is used to properly packetize the track’s media frames into NMS native packets.

Note: Hint tracks can be created from MS packetized media formats only.

See Recording to a 3GP file for an example of specifying the use of hint tracks in the audio and video streams.

## SDP

The SDP feature allows an application to store SDP data to a 3GP file and retrieve SDP data from a 3GP file. The application uses mmSetSDPinfo to store SDP information and uses mmGetSDPinfo to retrieve SDP information.

The application is responsible for building and parsing the SDP string. It can use the Natural Access MCC SDP library to perform these tasks. See the SIP for Natural Call Control Developer’s Reference Manual, for more details.

Note: The MCC SDP library is a component of the NMS SIP for NCC software.