<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multimedia.cx/index.php?action=history&amp;feed=atom&amp;title=RAD_Game_Tools_Bink_API</id>
	<title>RAD Game Tools Bink API - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multimedia.cx/index.php?action=history&amp;feed=atom&amp;title=RAD_Game_Tools_Bink_API"/>
	<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=RAD_Game_Tools_Bink_API&amp;action=history"/>
	<updated>2026-07-30T09:25:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=RAD_Game_Tools_Bink_API&amp;diff=4611&amp;oldid=prev</id>
		<title>Multimedia Mike: update link</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=RAD_Game_Tools_Bink_API&amp;diff=4611&amp;oldid=prev"/>
		<updated>2006-04-27T16:58:07Z</updated>

		<summary type="html">&lt;p&gt;update link&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:58, 27 April 2006&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Some games that use [[RAD Game Tools]] [[Bink]] files for their multimedia files distribute a handy Win32 DLL called binkw32.dll.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Some games that use [[RAD Game Tools]] [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Bink Container|&lt;/ins&gt;Bink]] files for their multimedia files distribute a handy Win32 DLL called binkw32.dll.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Data Structures ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Data Structures ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Multimedia Mike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=RAD_Game_Tools_Bink_API&amp;diff=2056&amp;oldid=prev</id>
		<title>Multimedia Mike: categorize</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=RAD_Game_Tools_Bink_API&amp;diff=2056&amp;oldid=prev"/>
		<updated>2006-02-05T01:18:03Z</updated>

		<summary type="html">&lt;p&gt;categorize&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:18, 4 February 2006&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l107&quot;&gt;Line 107:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 107:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Call BinkClose to deallocate the resources used for decoding the Bink file.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Call BinkClose to deallocate the resources used for decoding the Bink file.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Also, BinkGoto can be called to reposition the file during playback.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Also, BinkGoto can be called to reposition the file during playback.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Multimedia APIs]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Multimedia Mike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=RAD_Game_Tools_Bink_API&amp;diff=2055&amp;oldid=prev</id>
		<title>Multimedia Mike at 01:17, 5 February 2006</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=RAD_Game_Tools_Bink_API&amp;diff=2055&amp;oldid=prev"/>
		<updated>2006-02-05T01:17:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Some games that use [[RAD Game Tools]] [[Bink]] files for their multimedia files distribute a handy Win32 DLL called binkw32.dll.&lt;br /&gt;
&lt;br /&gt;
== Data Structures ==&lt;br /&gt;
&lt;br /&gt;
According to the [[Media Player Classic]] (MPC) application, the various Bink file manipulation functions pass around a structure with the following layout (all multi-byte numbers are native endian; pointers are 32-bit memory addresses):&lt;br /&gt;
&lt;br /&gt;
  bytes 0-3      video width&lt;br /&gt;
  bytes 4-7      video height&lt;br /&gt;
  bytes 8-11     frame count&lt;br /&gt;
  bytes 12-15    current frame&lt;br /&gt;
  bytes 16-19    last frame&lt;br /&gt;
  bytes 20-23    frames/second multiplier&lt;br /&gt;
  bytes 24-27    frames/second divisor&lt;br /&gt;
  bytes 28-31    unknown&lt;br /&gt;
  bytes 32-35    flags&lt;br /&gt;
  bytes 36-295   unknown&lt;br /&gt;
  bytes 296-299  current plane&lt;br /&gt;
  bytes 300-303  pointer to plane 0&lt;br /&gt;
  bytes 304-307  pointer to plane 1&lt;br /&gt;
  bytes 308-315  unknown&lt;br /&gt;
  bytes 316-319  Y plane width&lt;br /&gt;
  bytes 320-323  Y plane height&lt;br /&gt;
  bytes 324-327  U&amp;amp;V plane width&lt;br /&gt;
  bytes 328-331  U&amp;amp;V plane height&lt;br /&gt;
&lt;br /&gt;
This document will refer to this structure as the BinkStruct.&lt;br /&gt;
&lt;br /&gt;
MPC is interested in the following functions exported by the Bink DLL:&lt;br /&gt;
&lt;br /&gt;
 * BinkSetSoundSystem&lt;br /&gt;
 * BinkOpenDirectSound&lt;br /&gt;
 * BinkOpen&lt;br /&gt;
 * BinkGoto&lt;br /&gt;
 * BinkDoFrame&lt;br /&gt;
 * BinkNextFrame&lt;br /&gt;
 * BinkClose&lt;br /&gt;
&lt;br /&gt;
  int BinkSetSoundSystem(SOUND_FUNC SoundFunction, IDirectSound *pDS);&lt;br /&gt;
&lt;br /&gt;
Description: BinkSetSoundSystem initializes the audio playback subsystem.&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
* SoundFunction: This appears to be the function that will be invoked in order to playback the audio. MPC passes in BinkOpenDirectSound as the parameter. BinkOpenDirectSound must meet the qualifications to be a SOUND_FUNC (contrived for this description).&lt;br /&gt;
* pDS: A pointer to an IDirectSound structure.&lt;br /&gt;
&lt;br /&gt;
Returns: 0 if the function failed, non-zero on success.&lt;br /&gt;
&lt;br /&gt;
  BinkStruct *BinkOpen(HANDLE BinkFile, UINT32 Flags);&lt;br /&gt;
&lt;br /&gt;
Description: BinkOpen opens and initializes a Bink file for playback.&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
* BinkFile: A Windows file HANDLE that refers to the Bink file to be read.&lt;br /&gt;
* Flags: The meaning of all the flags is unclear, but MPC calls BinkOpen with 0x00800000.&lt;br /&gt;
&lt;br /&gt;
Returns: A pointer to a BinkStruct that will be used for playing the Bink file.&lt;br /&gt;
&lt;br /&gt;
  void BinkGoto(BinkStruct *Bink, UINT32 FrameNumber, UINT32 unknown);&lt;br /&gt;
&lt;br /&gt;
Description: BinkGoto signals the playback engine to reposition the Bink file to a&lt;br /&gt;
requested frame.&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
* Bink: A pointer to the BinkStruct returned by BinkOpen.&lt;br /&gt;
* FrameNumber: The frame number where the stream should be positioned to.&lt;br /&gt;
* unknown: MPC sets this parameter to 0.&lt;br /&gt;
&lt;br /&gt;
Returns: No known return value as MPC does not check for one.&lt;br /&gt;
&lt;br /&gt;
  int BinkDoFrame(BinkStruct *Bink);&lt;br /&gt;
&lt;br /&gt;
Description: BinkDoFrame processes the next frame in the Bink file.&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
* Bink: A pointer to the BinkStruct returned by BinkOpen.&lt;br /&gt;
&lt;br /&gt;
Returns: MPC's code comments indicate that this function does return a &lt;br /&gt;
value, but the meaning is not specified.&lt;br /&gt;
&lt;br /&gt;
  void BinkNextFrame(BinkStruct *Bink);&lt;br /&gt;
&lt;br /&gt;
Description: BinkNextFrame signals the playback engine to advance the Bink file to the next frame.&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
* Bink: A pointer to the BinkStruct returned by BinkOpen.&lt;br /&gt;
&lt;br /&gt;
Returns: No known return value as MPC does not check for one.&lt;br /&gt;
&lt;br /&gt;
  void BinkClose(BinkStruct *Bink);&lt;br /&gt;
&lt;br /&gt;
Description: BinkClose gracefully closes a Bink file and releases any allocated resources.&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
* Bink: A pointer to the BinkStruct returned by BinkOpen.&lt;br /&gt;
&lt;br /&gt;
Returns: No known return value as MPC does not check for one.&lt;br /&gt;
&lt;br /&gt;
== Using The Bink DLL ==&lt;br /&gt;
&lt;br /&gt;
Using the Bink DLL to decode a Bink file operates using the following steps:&lt;br /&gt;
&lt;br /&gt;
# Set up the sound system using BinkSetSoundSystem. The Bink DLL provides the BinkOpenDirectSound for audio playback and handles the audio itself.&lt;br /&gt;
# Call BinkOpen with a handle to the file. The function will allocate and return a BinkStruct data structure. This structure contains parameters regarding the file's video properties, such as width and height. There are pointers to two different planes. The Bink DLL uses a double-buffering scheme when decoding video, and decodes to YUV 4:2:0 data (alias YV12, YUV420P). After decoding a frame of video, one of the two planes will contain a pointer to a buffer that contains all of the Y data, all of the U data, and all of the V data, all back to back. The current plane is indicated in the BinkStruct. The BinkStruct also provides the dimensions of the Y plane and the U&amp;amp;V planes so that the data can be properly sorted out. The data in the buffer is ordered YUV unless bits 15 and 16 in the BinkStruct's flags are set to 1 (BinkStruct.flags &amp;amp; 0x00018000), in which case, the data is ordered YVU.&lt;br /&gt;
# Call BinkDoFrame to decode the next frame of video. Fetch the video from the BinkStruct and display, convert, manipulate as an application sees fit.&lt;br /&gt;
# Call BinkNextFrame to advance to the next frame in the file.&lt;br /&gt;
# Repeat from step 3 while there are frames remaining in the file (the number of frames is specified in the BinkStruct).&lt;br /&gt;
# Call BinkClose to deallocate the resources used for decoding the Bink file.&lt;br /&gt;
# Also, BinkGoto can be called to reposition the file during playback.&lt;/div&gt;</summary>
		<author><name>Multimedia Mike</name></author>
	</entry>
</feed>