What's New in QuickTime 5

| Previous | Chapter Contents | Chapter Top | Next |

Video Codec Latency API

The following API is used by QuickTime to retrieve the video latency:

ImageCodecGetDecompressLatency

Retrieves the video latency from the specified video codec.

pascal ComponentResult ImageCodecGetDecompressLatency(ComponentInstance
                                            ci, TimeRecord * latency);

ci
Specifies the image compressor component for the request.
latency
Pointer to a time record containing the latency required for that codec.

DISCUSSION

The following code snippet shows an example implementation of this function:

pascal ComponentResult myCodecGetDecompressLatency(myCodecGlobals *glob,
                                                    TimeRecord *latency)

{
    OSErr   result = paramErr;
    
    // Example setting 33 ms latency
    if (latency != nil) {
        latency->value.hi = 0;
        latency->value.lo = 33;             // latency value
        latency->scale = 1000;              // 1 ms scale
        latency->base = nil;
        result = noErr;
    }
    return result;
}


© 2001 Apple Computer, Inc.

What's New in QuickTime 5

| Previous | Chapter Contents | Chapter Top | Next |