78 lines
5.6 KiB
HTML
78 lines
5.6 KiB
HTML
<!-- This page was created with the RAD auto-doc generator. -->
|
|
<!doctype html public "-//w3c//dtd html 3.2 final//en">
|
|
<html>
|
|
<head>
|
|
<title>BinkCopyToBuffer</title>
|
|
<meta http-equiv="content-type" content="text/html; charset=iso8859-1">
|
|
<meta name="ms.locale" content="en-us">
|
|
<meta name="description" content="copies a video frame from the internal Bink memory buffers to a specified memory address.">
|
|
<meta name="ms-hkwd" content="BinkCopyToBuffer">
|
|
<link rel="stylesheet" title="default" href="reference.css" type="text/css" media="screen">
|
|
</head>
|
|
<body topmargin="0">
|
|
<table cellspacing=0 cellpadding=0 class=bar width=100% height=25>
|
|
<tr class=bar>
|
|
<td class=bar>
|
|
<i> <a href="index.html" class=trn>Bink SDK 1.5v</a></i>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h1>BinkCopyToBuffer</h1>
|
|
<p>The function <b>BinkCopyToBuffer</b> copies a video frame from the internal Bink memory buffers to a specified memory address.</p>
|
|
<table width=100% cellspacing=0 class=pre>
|
|
<tr class=pre>
|
|
<td class=pre>
|
|
<pre><b><a href="S32.html" class=trn>S32</a> <a href="BinkCopyToBuffer.html" class=trn>BinkCopyToBuffer</a>(</b>
|
|
<b>  <a href="HBINK.html" class=trn>HBINK</a> </b><i>bink</i><b>,</b>
|
|
<b>  <a href="VOID_PTR.html" class=trn>VOID_PTR</a> </b><i>dest_addr</i><b>,</b>
|
|
<b>  <a href="S32.html" class=trn>S32</a> </b><i>dest_pitch</i><b>,</b>
|
|
<b>  <a href="U32.html" class=trn>U32</a> </b><i>dest_height</i><b>,</b>
|
|
<b>  <a href="U32.html" class=trn>U32</a> </b><i>dest_x</i><b>,</b>
|
|
<b>  <a href="U32.html" class=trn>U32</a> </b><i>dest_y</i><b>,</b>
|
|
<b>  <a href="BINK_COPY_FLAGS.html" class=trn>BINK_COPY_FLAGS</a> </b><i>copy_flags</i>
|
|
<b>);</b></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h4>In Parameters</h4>
|
|
<dl>
|
|
<dt><i>bink</i></dt>
|
|
<dd>Specifies the Bink handle.</dd>
|
|
<dt><i>dest_addr</i></dt>
|
|
<dd>Address of the destination memory buffer.</dd>
|
|
<dt><i>dest_pitch</i></dt>
|
|
<dd>Pitch of the destination buffer in bytes.</dd>
|
|
<dt><i>dest_height</i></dt>
|
|
<dd>Height of the destination buffer in pixels.</dd>
|
|
<dt><i>dest_x</i></dt>
|
|
<dd>X (left) pixel offset into the destination buffer.</dd>
|
|
<dt><i>dest_y</i></dt>
|
|
<dd>Y (top) pixel offset into the destination buffer.</dd>
|
|
<dt><i>copy_flags</i></dt>
|
|
<dd>Specifies the flags that describe the destination buffer type and other special copy options.</dd>
|
|
</dl>
|
|
<h4>Returns</h4>
|
|
<p>Returns one if the frame was skipped, or zero otherwise.</p>
|
|
<h4>Discussion</h4>
|
|
<p>Use this function to copy the decompressed pixels from Bink's internal decompression buffers into a destination address. This destination address can be any linear piece of memory - malloc-ed memory, DirectDraw surface pointers, the Buffer address in a BinkBuffer structure, etc. If the destination uses the RGB colorspace, then this function also performs the conversion from YUV to RGB. If you are using the BinkBuffer API, use the bink_buf->Buffer field for the dest_addr parameter, the bink_buf->BufferPitch field for the dest_pitch parameter, the bink_buf->Height field for the dest_height parameter, and the bink_buf->SurfaceType field for the copy_flags parameter. Also make sure you call <a href="BinkBufferLock.html">BinkBufferLock</a> before calling BinkCopyToBuffer and <a href="BinkBufferUnlock.html">BinkBufferUnlock</a> immediately after. See ExamW32.C for details. If you are using DirectDraw, then simply lock the surface you want to copy to, call BinkCopyToBuffer (with lpSurface for the dest_addr parameter and lPitch for the dest_pitch), and then unlock the surface. See ExamDDP.C for details. Note that if the video is falling behind the audio, then this function may return without copying any pixels. If the copy is skipped, then this function will return a non-zero value. If copy was successful, then a zero will be returned. To copy just a piece of the internal buffers, use the <a href="BinkCopyToBufferRect.html">BinkCopyToBufferRect</a> function. On the Nintendo GameCube, note that due to the swizzled output, you must use divisible-by-four values for the X offset, Y offset, width, and height parameters. Inverted scanline buffers (bottom-up) are also supported (although rarely necessary now a days). To specify an inverted buffer, pass in a negative pitch. Inverted buffers will be slower than standard top-down buffers. </p>
|
|
<p>
|
|
<br>
|
|
<b>Group:</b>
|
|
<a href="Bink API.html">Bink API</a><br>
|
|
<b>Related Sections:</b>
|
|
<a href="Bink Examples for th43an3m.html">Bink Examples for the Nintendo GameCube</a>, <a href="Bink Playback on the43an3m.html">Bink Playback on the Nintendo GameCube</a>, <a href="Scaling.html">Scaling</a><br>
|
|
<b>Related Functions:</b>
|
|
<a href="BinkBufferLock.html">BinkBufferLock</a>, <a href="BinkBufferOpen.html">BinkBufferOpen</a>, <a href="BinkBufferUnlock.html">BinkBufferUnlock</a>, <a href="BinkCopyToBufferRect.html">BinkCopyToBufferRect</a>, <a href="BinkDDSurfaceType.html">BinkDDSurfaceType</a>, <a href="BinkDX8SurfaceType.html">BinkDX8SurfaceType</a>, <a href="BinkDoFrame.html">BinkDoFrame</a>, <a href="BinkGDSurfaceType.html">BinkGDSurfaceType</a><br>
|
|
<b>Related Basic Types:</b>
|
|
<a href="BINKBUFFER_OPEN_FLAGS.html">BINKBUFFER_OPEN_FLAGS</a>, <a href="BINK_COPY_FLAGS.html">BINK_COPY_FLAGS</a>, <a href="HBINK.html">HBINK</a>, <a href="S32.html">S32</a>, <a href="U32.html">U32</a>, <a href="VOID_PTR.html">VOID_PTR</a><br>
|
|
<b>Related Structures:</b>
|
|
<a href="BINKBUFFER.html">BINKBUFFER</a></p>
|
|
<p align=center>
|
|
<a href="mailto:Bink1@radgametools.com">For technical support, e-mail Bink1@radgametools.com</a>
|
|
<br>
|
|
<a href="http://www.radgametools.com/bnkmain.htm?from=help1.5v">© Copyright 1994-2003 RAD Game Tools, Inc. All Rights Reserved.</a>
|
|
</p>
|
|
<br>
|
|
</body>
|
|
</html>
|