| 1 |
//for IDirectSound we need |
| 2 |
//#include <dsound.h> |
| 3 |
//http://ccrma.stanford.edu/software/stk/Misc/dsound.h |
| 4 |
|
| 5 |
typedef struct { |
| 6 |
uint32_t Width; |
| 7 |
uint32_t Height; |
| 8 |
uint32_t FrameCount; |
| 9 |
uint32_t CurrentFrame; |
| 10 |
uint32_t LastFrame; |
| 11 |
uint32_t FPS_Multiplier; |
| 12 |
uint32_t FPS_Divisor; |
| 13 |
uint32_t Unknown1; |
| 14 |
uint32_t Flags; |
| 15 |
uint32_t Unknown2[65]; |
| 16 |
uint32_t CurrentPlane; |
| 17 |
void* Plane0_Ptr; |
| 18 |
void* Plane1_Ptr; |
| 19 |
uint32_t Unknown3[2]; |
| 20 |
uint32_t YPlane_Width; |
| 21 |
uint32_t UnVPlane_Width; |
| 22 |
uint32_t UnVPlane_Height; |
| 23 |
} BinkStruct; |
| 24 |
|
| 25 |
//_stdcall |
| 26 |
//opens the bink file |
| 27 |
BinkStruct CALLBACK *BinkOpen(HANDLE BinkFile, uint32_t Flags); |
| 28 |
|
| 29 |
//SoundFunction: This appears to be the function that will be invoked in order to playback the audio. |
| 30 |
//MPC passes in BinkOpenDirectSound as the parameter. BinkOpenDirectSound must meet the qualifications to be a SOUND_FUNC |
| 31 |
//(contrived for this description). |
| 32 |
//I renamed SOUND_FUNC to void* |
| 33 |
int CALLBACK BinkSetSoundSystem(void* SoundFunction, IDirectSound *pDS); |
| 34 |
|
| 35 |
//changes the frame the video is on...we dont need it. |
| 36 |
void CALLBACK BinkGoto(BinkStruct *Bink, uint32_t FrameNumber, uint32_t unknown); |
| 37 |
|
| 38 |
//processes the next frame in the Bink file. |
| 39 |
int CALLBACK BinkDoFrame(BinkStruct *Bink); |
| 40 |
|
| 41 |
//advance the playback engine to the next frame |
| 42 |
void CALLBACK BinkNextFrame(BinkStruct *Bink); |
| 43 |
|
| 44 |
//gracefully closes a Bink file and releases any allocated resources. |
| 45 |
void CALLBACK BinkClose(BinkStruct *Bink); |
| 46 |
|
| 47 |
/* |
| 48 |
bytes 0-3 video width |
| 49 |
bytes 4-7 video height |
| 50 |
bytes 8-11 frame count |
| 51 |
bytes 12-15 current frame |
| 52 |
bytes 16-19 last frame |
| 53 |
bytes 20-23 frames/second multiplier |
| 54 |
bytes 24-27 frames/second divisor |
| 55 |
bytes 28-31 unknown |
| 56 |
bytes 32-35 flags |
| 57 |
bytes 36-295 unknown |
| 58 |
bytes 296-299 current plane |
| 59 |
bytes 300-303 pointer to plane 0 |
| 60 |
bytes 304-307 pointer to plane 1 |
| 61 |
bytes 308-315 unknown |
| 62 |
bytes 316-319 Y plane width |
| 63 |
bytes 320-323 Y plane height |
| 64 |
bytes 324-327 U&V plane width |
| 65 |
bytes 328-331 U&V plane height |
| 66 |
*/ |