| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>MixBuffer</title> |
| <meta name="generator" content="DocBook XSL Stylesheets V1.75.1"> |
| <link rel="home" href="index.html" title="Mi-X Video Reference Manual"> |
| <link rel="up" href="ch01.html" title="MI-X Video API"> |
| <link rel="prev" href="MixDisplayX11.html" title="MixDisplayX11"> |
| <link rel="next" href="MixVideoFrame.html" title="MixVideoFrame"> |
| <meta name="generator" content="GTK-Doc V1.11 (XML mode)"> |
| <link rel="stylesheet" href="style.css" type="text/css"> |
| <link rel="chapter" href="ch01.html" title="MI-X Video API"> |
| <link rel="chapter" href="object-tree.html" title="Object Hierarchy"> |
| <link rel="index" href="api-index-full.html" title="API Index"> |
| </head> |
| <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
| <tr valign="middle"> |
| <td><a accesskey="p" href="MixDisplayX11.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> |
| <td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> |
| <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
| <th width="100%" align="center">Mi-X Video Reference Manual</th> |
| <td><a accesskey="n" href="MixVideoFrame.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> |
| </tr> |
| <tr><td colspan="5" class="shortcuts"> |
| <a href="#MixBuffer.synopsis" class="shortcut">Top</a> |
| | |
| <a href="#MixBuffer.description" class="shortcut">Description</a> |
| | |
| <a href="#MixBuffer.object-hierarchy" class="shortcut">Object Hierarchy</a> |
| </td></tr> |
| </table> |
| <div class="refentry" title="MixBuffer"> |
| <a name="MixBuffer"></a><div class="titlepage"></div> |
| <div class="refnamediv"><table width="100%"><tr> |
| <td valign="top"> |
| <h2><span class="refentrytitle"><a name="MixBuffer.top_of_page"></a>MixBuffer</span></h2> |
| <p>MixBuffer — MI-X Video Buffer Parameters</p> |
| </td> |
| <td valign="top" align="right"></td> |
| </tr></table></div> |
| <div class="refsynopsisdiv" title="Synopsis"> |
| <a name="MixBuffer.synopsis"></a><h2>Synopsis</h2> |
| <pre class="synopsis"> |
| void (<a class="link" href="MixBuffer.html#MixBufferCallback" title="MixBufferCallback ()">*MixBufferCallback</a>) (ulong token, |
| uchar *data); |
| <a class="link" href="MixBuffer.html#MixBuffer-struct" title="MixBuffer">MixBuffer</a>; |
| <a class="link" href="MixBuffer.html" title="MixBuffer">MixBuffer</a> * <a class="link" href="MixBuffer.html#mix-buffer-new" title="mix_buffer_new ()">mix_buffer_new</a> (void); |
| <a class="link" href="MixBuffer.html" title="MixBuffer">MixBuffer</a> * <a class="link" href="MixBuffer.html#mix-buffer-ref" title="mix_buffer_ref ()">mix_buffer_ref</a> (<a class="link" href="MixBuffer.html" title="MixBuffer">MixBuffer</a> *mix); |
| void <a class="link" href="MixBuffer.html#mix-buffer-unref" title="mix_buffer_unref ()">mix_buffer_unref</a> (<a class="link" href="MixBuffer.html" title="MixBuffer">MixBuffer</a> *mix); |
| MIX_RESULT <a class="link" href="MixBuffer.html#mix-buffer-set-data" title="mix_buffer_set_data ()">mix_buffer_set_data</a> (<a class="link" href="MixBuffer.html" title="MixBuffer">MixBuffer</a> *obj, |
| uchar *data, |
| uint size, |
| ulong token, |
| <a class="link" href="MixBuffer.html#MixBufferCallback" title="MixBufferCallback ()">MixBufferCallback</a> callback); |
| </pre> |
| </div> |
| <div class="refsect1" title="Object Hierarchy"> |
| <a name="MixBuffer.object-hierarchy"></a><h2>Object Hierarchy</h2> |
| <pre class="synopsis"> |
| MixParams |
| +----MixBuffer |
| </pre> |
| </div> |
| <div class="refsect1" title="Description"> |
| <a name="MixBuffer.description"></a><h2>Description</h2> |
| <p> |
| </p> |
| <p> |
| <a class="link" href="MixBuffer.html" title="MixBuffer"><span class="type">MixBuffer</span></a> objects are used to wrap input data buffers in a reference counted object as |
| described in the buffer model section. Data buffers themselves are allocated by the |
| App/MMF. <a class="link" href="MixBuffer.html" title="MixBuffer"><span class="type">MixBuffer</span></a> objects are allocated by <a class="link" href="MixVideo.html" title="MixVideo"><span class="type">MixVideo</span></a> in a pool and retrieved by the |
| application using <a class="link" href="MixVideo.html#mix-video-get-mixbuffer" title="mix_video_get_mixbuffer ()"><code class="function">mix_video_get_mixbuffer()</code></a>. The application will wrap a data buffer |
| in a <span class="type">Mixbuffer</span> object and pass it into <a class="link" href="MixVideo.html#mix-video-decode" title="mix_video_decode ()"><code class="function">mix_video_decode()</code></a> or to <a class="link" href="MixVideo.html#mix-video-encode" title="mix_video_encode ()"><code class="function">mix_video_encode()</code></a>. |
| </p> |
| <p> |
| </p> |
| <p> |
| The <a class="link" href="MixBuffer.html" title="MixBuffer"><span class="type">MixBuffer</span></a> objects will be released by <a class="link" href="MixVideo.html" title="MixVideo"><span class="type">MixVideo</span></a> when they are no longer needed |
| for the decode or encoder operation. The App/MMF will also release the <a class="link" href="MixBuffer.html" title="MixBuffer"><span class="type">MixBuffer</span></a> |
| object after use. When the <a class="link" href="MixBuffer.html" title="MixBuffer"><span class="type">MixBuffer</span></a> is completely released, the callback to the |
| function registered in the <a class="link" href="MixBuffer.html" title="MixBuffer"><span class="type">MixBuffer</span></a> will be called (allowing the App/MMF to release |
| data buffers as necessary). |
| </p> |
| </div> |
| <div class="refsect1" title="Details"> |
| <a name="MixBuffer.details"></a><h2>Details</h2> |
| <div class="refsect2" title="MixBufferCallback ()"> |
| <a name="MixBufferCallback"></a><h3>MixBufferCallback ()</h3> |
| <pre class="programlisting">void (*MixBufferCallback) (ulong token, |
| uchar *data);</pre> |
| </div> |
| <hr> |
| <div class="refsect2" title="MixBuffer"> |
| <a name="MixBuffer-struct"></a><h3>MixBuffer</h3> |
| <pre class="programlisting">typedef struct { |
| MixParams parent; |
| |
| |
| /* Pointer to coded data buffer */ |
| uchar *data; |
| |
| /* Size of coded data buffer */ |
| uint size; |
| |
| /* Token that will be passed to |
| * the callback function. Can be |
| * used by the application for |
| * any information to be associated |
| * with this coded data buffer, |
| * such as a pointer to a structure |
| * belonging to the application. */ |
| ulong token; |
| |
| /* callback function pointer */ |
| MixBufferCallback callback; |
| } MixBuffer; |
| </pre> |
| <p> |
| MI-X Buffer Parameter object</p> |
| </div> |
| <hr> |
| <div class="refsect2" title="mix_buffer_new ()"> |
| <a name="mix-buffer-new"></a><h3>mix_buffer_new ()</h3> |
| <pre class="programlisting"><a class="link" href="MixBuffer.html" title="MixBuffer">MixBuffer</a> * mix_buffer_new (void);</pre> |
| <p> |
| Use this method to create new instance of <a class="link" href="MixBuffer.html" title="MixBuffer"><span class="type">MixBuffer</span></a></p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td> |
| <td> A newly allocated instance of <a class="link" href="MixBuffer.html" title="MixBuffer"><span class="type">MixBuffer</span></a> |
| </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="mix_buffer_ref ()"> |
| <a name="mix-buffer-ref"></a><h3>mix_buffer_ref ()</h3> |
| <pre class="programlisting"><a class="link" href="MixBuffer.html" title="MixBuffer">MixBuffer</a> * mix_buffer_ref (<a class="link" href="MixBuffer.html" title="MixBuffer">MixBuffer</a> *mix);</pre> |
| <p> |
| Add reference count.</p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td> |
| <td> object to add reference |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td> |
| <td> the <a class="link" href="MixBuffer.html" title="MixBuffer"><span class="type">MixBuffer</span></a> instance where reference count has been increased. |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="mix_buffer_unref ()"> |
| <a name="mix-buffer-unref"></a><h3>mix_buffer_unref ()</h3> |
| <pre class="programlisting">void mix_buffer_unref (<a class="link" href="MixBuffer.html" title="MixBuffer">MixBuffer</a> *mix);</pre> |
| <p> |
| Decrement reference count of the object.</p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td> |
| <td> object to unref. |
| </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="mix_buffer_set_data ()"> |
| <a name="mix-buffer-set-data"></a><h3>mix_buffer_set_data ()</h3> |
| <pre class="programlisting">MIX_RESULT mix_buffer_set_data (<a class="link" href="MixBuffer.html" title="MixBuffer">MixBuffer</a> *obj, |
| uchar *data, |
| uint size, |
| ulong token, |
| <a class="link" href="MixBuffer.html#MixBufferCallback" title="MixBufferCallback ()">MixBufferCallback</a> callback);</pre> |
| <p> |
| Set data buffer, size, token and callback function</p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td> |
| <td> <a class="link" href="MixBuffer.html" title="MixBuffer"><span class="type">MixBuffer</span></a> object |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td> |
| <td> data buffer |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td> |
| <td> data buffer size |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>token</code></em> :</span></p></td> |
| <td> token |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td> |
| <td> callback function pointer |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td> |
| <td> <a class="link" href="MixVideo-mixvideodef.html" title="MI-X Video Data Definitons And Common Error Code">Common Video Error Return Codes</a> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| </div> |
| </div> |
| <div class="footer"> |
| <hr> |
| Generated by GTK-Doc V1.11</div> |
| </body> |
| </html> |