Bink SDK 1.5v

Bink API

Discussion

The Bink API is the API that you use to decompress each frame of a Bink file. The Bink API is used to open the file, decompress video frames, wait for the next frame, skip to the next frame, etc. The Bink API doesn't, however, draw anything onto the screen. All the Bink API does is place data into a linear memory buffer. This buffer can be a DirectDraw surface, a DIBSection, or even a plain old malloc-ed chunk of memory. The Bink API doesn't know or care about where it places the data. Because Bink doesn't blit directly to the screen, you have a lot more flexibility - you can use Bink to compress not just to compress videos, but bitmaps, textures, light maps, height maps, etc. Any rectangular data set can be compressed. Blitting is, however, a complicated situation on most platforms (especially Win32), so we also supply a ready-made blitting API (called the BinkBuffer API). This API is separate from the Bink API, though, so it is up to you whether you use it or not. The BinkBuffer API is described later in this manual.

Bink API
BinkOpen opens the specified Bink file for decompression.
BinkMacOpen opens the specified Bink file for decompression.
BINK is a structure returned from BinkOpen.
BINK_OPEN_FLAGS describes the special or unusual ways of opening a Bink file.
BinkClose closes the specified Bink handle.
BinkDoFrame decompresses the next frame of video.
BinkCopyToBuffer copies a video frame from the internal Bink memory buffers to a specified memory address.
BinkCopyToBufferRect copies a piece of the video frame from the internal Bink memory buffers to a specified memory address.
BINK_COPY_FLAGS describes the destination buffer type as well as special or unusual ways of converting Bink's internal YUV data.
BinkNextFrame moves to the next video frame in the Bink file.
BinkWait tells you when to move to the next Bink frame (based on the frame rate of the file).
BinkPause pauses and resumes playback of a Bink file.
BinkGetRects returns the dirty rectangles of the last decompressed video frame.
BINK_GETRECTS_FLAGS Specifies the type of rectangle list you'd prefer from the BinkGetRects function.
BinkGoto jumps to a new frame inside the Bink file.
BINK_GOTO_FLAGS Specifies the type of jump to perform.
BinkGetKeyFrame finds a key frame near another specified frame.
BINK_GETKEY_FLAGS Specifies the type of key frame search to perform.
BinkService gives some explicit idle time to Bink to service any of its internal tasks.
BinkSoundUseMiles tells Bink to use the Miles Sound System as its sound output system.
BinkSoundUseDirectSound tells Bink to use DirectSound as its sound output system.
BinkSoundUseSoundManager tells Bink to use the MacOS Sound Manager as its sound output system.
BinkSoundUseAX tells Bink to use AX as its sound output system on the Nintendo GameCube.
BinkSoundUseMusyX tells Bink to use MusyX as its sound output system on the Nintendo GameCube.
RADARAMCALLBACKS specifies a set of replacement audio RAM memory management functions for use with AX on the Nintendo GameCube.
RADARAMALLOC points to a function that will allocate audio memory on Bink's behalf when using AX on the Nintendo GameCube.
RADARAMFREE points to a function that will free memory allocated by a previous call to the RADARAMALLOC function.
BinkSetSoundSystem tells Bink to use a custom sound provider as its sound output system.
BinkSetVolume sets the volume of a Bink sound track.
BinkSetPan sets the speaker pan (left to right balance) of a Bink sound track.
BinkSetMixBins sets the mix bin destination of the sound track on an Xbox.
BinkSetMixBinVolumes sets the volumes of the individual mix bins on an Xbox.
BinkSetVideoOnOff tells Bink not to decompress the video frames when BinkDoFrame is called.
BinkSetSoundOnOff tells Bink not to decompress the audio and release any audio resources.
BinkGetSummary returns playback information about the specified Bink handle.
BINKSUMMARY is a structure used to return playback summary information from BinkGetSummary.
BinkGetRealtime returns realtime playback information about the specified Bink handle.
BINKREALTIME is a structure used to return realtime playback information from BinkGetRealtime.
BinkGetTrackID returns the track ID for the specified track index.
BinkOpenTrack opens a handle to the low-level audio track decoder.
BINKTRACK is a structure returned from BinkOpenTrack.
BinkCloseTrack closes a low-level audio track decoder handle.
BinkGetTrackData extracts all of the sound in the current video frame.
BinkSetFrameRate overrides the Bink file's built-in frame rate.
BinkSetSoundTrack overrides the Bink file's default sound track.
BinkSetSimulate tells Bink to simulate a specified device I/O speed.
BinkSetIOSize Specifies the size of the I/O memory buffer that Bink reads into.
BinkSetIO specifies a set of replacement file I/O functions.
RADSetMemory specifies a set of replacement memory management functions.
RADMEMALLOC points to a function that will allocate memory on Bink's behalf.
RADMEMFREE points to a function that will free memory allocated by a previous call to the RADMEMALLOC function.
BinkGetError returns a string that describes the last global Bink error.
BinkGetLogoAddress returns a pointer to an embedded Bink logo file.
BinkLoad reloads the Bink sections on an Xbox (if it had been unloaded by BinkUnload).
BinkUnload unloads the Bink sections on an Xbox.
BinkLoadConverter reloads one or more of the Bink YUV to RGB converters (if they had been unloaded by BinkUnloadConverter).
BinkUnloadConverter unloads one or more of the Bink YUV to RGB converters.
BINK_CONVERTER_FLAGS Specifies the class of Bink YUV converters to load or unload.

For technical support, e-mail Bink1@radgametools.com
© Copyright 1994-2003 RAD Game Tools, Inc. All Rights Reserved.