Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 874255f3b26b44feb57fbe38a7384518 > files > 276

gmerlin-0.4.1-2mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>gmerlin: bg_visualization_plugin_s Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>bg_visualization_plugin_s Struct Reference<br>
<small>
[<a class="el" href="group__plugin__visualization.html">Audio Visualization plugins</a>]</small>
</h1><!-- doxytag: class="bg_visualization_plugin_s" -->Audio visualization plugin.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="plugin_8h_source.html">plugin.h</a>&gt;</code>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structbg__plugin__common__s.html">bg_plugin_common_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structbg__visualization__plugin__s.html#460f5f74682c61c328e23c055aba88aa">common</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Infos and functions common to all plugin types.  <a href="#460f5f74682c61c328e23c055aba88aa"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structbg__ov__callbacks__s.html">bg_ov_callbacks_t</a> *(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structbg__visualization__plugin__s.html#d9a559bbc3a01eb739acb1aeeb8cd806">get_callbacks</a> )(void *priv)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return callback  <a href="#d9a559bbc3a01eb739acb1aeeb8cd806"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structbg__visualization__plugin__s.html#4497123b57e0d7cf25bff98825de626a">open_ov</a> )(void *priv, <a class="elRef" doxygen="gavl.tags:http://gmerlin.sourceforge.net/doc/gavl//" href="http://gmerlin.sourceforge.net/doc/gavl//structgavl__audio__format__s.html">gavl_audio_format_t</a> *audio_format, <a class="elRef" doxygen="gavl.tags:http://gmerlin.sourceforge.net/doc/gavl//" href="http://gmerlin.sourceforge.net/doc/gavl//structgavl__video__format__s.html">gavl_video_format_t</a> *video_format)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Open a frame based visualization plugin.  <a href="#4497123b57e0d7cf25bff98825de626a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structbg__visualization__plugin__s.html#8e257ca8bfd289e12f872e569c2f377c">open_win</a> )(void *priv, <a class="elRef" doxygen="gavl.tags:http://gmerlin.sourceforge.net/doc/gavl//" href="http://gmerlin.sourceforge.net/doc/gavl//structgavl__audio__format__s.html">gavl_audio_format_t</a> *audio_format, const char *window_id)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Open a window based visualization plugin.  <a href="#8e257ca8bfd289e12f872e569c2f377c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structbg__visualization__plugin__s.html#b7a13cb8d3cad5e67eba9e71b677e5fc">update</a> )(void *priv, <a class="elRef" doxygen="gavl.tags:http://gmerlin.sourceforge.net/doc/gavl//" href="http://gmerlin.sourceforge.net/doc/gavl//structgavl__audio__frame__s.html">gavl_audio_frame_t</a> *frame)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send audio data to the plugin.  <a href="#b7a13cb8d3cad5e67eba9e71b677e5fc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structbg__visualization__plugin__s.html#d9533da931047fc9eb96fbf402a04e22">draw_frame</a> )(void *priv, <a class="elRef" doxygen="gavl.tags:http://gmerlin.sourceforge.net/doc/gavl//" href="http://gmerlin.sourceforge.net/doc/gavl//structgavl__video__frame__s.html">gavl_video_frame_t</a> *frame)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Draw an image.  <a href="#d9533da931047fc9eb96fbf402a04e22"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structbg__visualization__plugin__s.html#4ddc900873ef913dfc3cdff3bbdfb5c2">show_frame</a> )(void *priv)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Show the image.  <a href="#4ddc900873ef913dfc3cdff3bbdfb5c2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structbg__visualization__plugin__s.html#164e240834f27050d124a8f821bbf32a">close</a> )(void *priv)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Close a plugin.  <a href="#164e240834f27050d124a8f821bbf32a"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Audio visualization plugin. 
<p>
These plugins get audio samples and run visualizations of them. Output can be either into a <a class="elRef" doxygen="gavl.tags:http://gmerlin.sourceforge.net/doc/gavl//" href="http://gmerlin.sourceforge.net/doc/gavl//group__video__frame.html#ga0">gavl_video_frame_t</a> or directly via OpenGL. Which method is used is denoted by the <a class="el" href="group__plugin__flags.html#g45fe1ddd9ee145471e2e1226e48f609d">BG_PLUGIN_VISUALIZE_FRAME</a> and <a class="el" href="group__plugin__flags.html#gee8d964cfc3d7e2545a27d566f0ef4e2">BG_PLUGIN_VISUALIZE_GL</a> flags.<p>
For OpenGL, you need to pass a window ID to the plugin. The plugin is then responsible for creating Subwindows and setting up an OpenGL context. In General, it's stronly recommended to use the <a class="el" href="group__visualize.html#gacb632da56601f1170efff8a365617d8">bg_visualizer_t</a> module to use visualizations. <hr><h2>Field Documentation</h2>
<a class="anchor" name="460f5f74682c61c328e23c055aba88aa"></a><!-- doxytag: member="bg_visualization_plugin_s::common" ref="460f5f74682c61c328e23c055aba88aa" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structbg__plugin__common__s.html">bg_plugin_common_t</a> <a class="el" href="structbg__visualization__plugin__s.html#460f5f74682c61c328e23c055aba88aa">bg_visualization_plugin_s::common</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Infos and functions common to all plugin types. 
<p>

</div>
</div><p>
<a class="anchor" name="d9a559bbc3a01eb739acb1aeeb8cd806"></a><!-- doxytag: member="bg_visualization_plugin_s::get_callbacks" ref="d9a559bbc3a01eb739acb1aeeb8cd806" args=")(void *priv)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structbg__ov__callbacks__s.html">bg_ov_callbacks_t</a>*(* <a class="el" href="structbg__visualization__plugin__s.html#d9a559bbc3a01eb739acb1aeeb8cd806">bg_visualization_plugin_s::get_callbacks</a>)(void *priv)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
return callback 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>priv</em>&nbsp;</td><td>The handle returned by the </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>priv</em>&nbsp;</td><td>The handle returned by the create() method</td></tr>
  </table>
</dl>
create() method <dl class="return" compact><dt><b>Returns:</b></dt><dd>The callbacks or NULL </dd></dl>

</div>
</div><p>
<a class="anchor" name="4497123b57e0d7cf25bff98825de626a"></a><!-- doxytag: member="bg_visualization_plugin_s::open_ov" ref="4497123b57e0d7cf25bff98825de626a" args=")(void *priv, gavl_audio_format_t *audio_format, gavl_video_format_t *video_format)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* <a class="el" href="structbg__visualization__plugin__s.html#4497123b57e0d7cf25bff98825de626a">bg_visualization_plugin_s::open_ov</a>)(void *priv, <a class="elRef" doxygen="gavl.tags:http://gmerlin.sourceforge.net/doc/gavl//" href="http://gmerlin.sourceforge.net/doc/gavl//structgavl__audio__format__s.html">gavl_audio_format_t</a> *audio_format, <a class="elRef" doxygen="gavl.tags:http://gmerlin.sourceforge.net/doc/gavl//" href="http://gmerlin.sourceforge.net/doc/gavl//structgavl__video__format__s.html">gavl_video_format_t</a> *video_format)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Open a frame based visualization plugin. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>priv</em>&nbsp;</td><td>The handle returned by the create() method </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>audio_format</em>&nbsp;</td><td>Audio format </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>video_format</em>&nbsp;</td><td>Video format</td></tr>
  </table>
</dl>
The audio format parameter will most likely changed to the nearest supported format. In the video format parameter, you usually pass the desired render size. Everything else (except the framerate) will be set up by the plugin. 
</div>
</div><p>
<a class="anchor" name="8e257ca8bfd289e12f872e569c2f377c"></a><!-- doxytag: member="bg_visualization_plugin_s::open_win" ref="8e257ca8bfd289e12f872e569c2f377c" args=")(void *priv, gavl_audio_format_t *audio_format, const char *window_id)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* <a class="el" href="structbg__visualization__plugin__s.html#8e257ca8bfd289e12f872e569c2f377c">bg_visualization_plugin_s::open_win</a>)(void *priv, <a class="elRef" doxygen="gavl.tags:http://gmerlin.sourceforge.net/doc/gavl//" href="http://gmerlin.sourceforge.net/doc/gavl//structgavl__audio__format__s.html">gavl_audio_format_t</a> *audio_format, const char *window_id)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Open a window based visualization plugin. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>priv</em>&nbsp;</td><td>The handle returned by the create() method </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>audio_format</em>&nbsp;</td><td>Audio format </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>window_id</em>&nbsp;</td><td>A window ID</td></tr>
  </table>
</dl>
The audio format parameter will most likely changed to the nearest supported format. For the window id, use strings formatted like the one returned by <a class="el" href="group__plugin__ov.html#g09d7b03795b785bf703380dd6652a1f0">bg_ov_plugin_t</a> 
</div>
</div><p>
<a class="anchor" name="b7a13cb8d3cad5e67eba9e71b677e5fc"></a><!-- doxytag: member="bg_visualization_plugin_s::update" ref="b7a13cb8d3cad5e67eba9e71b677e5fc" args=")(void *priv, gavl_audio_frame_t *frame)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void(* <a class="el" href="structbg__visualization__plugin__s.html#b7a13cb8d3cad5e67eba9e71b677e5fc">bg_visualization_plugin_s::update</a>)(void *priv, <a class="elRef" doxygen="gavl.tags:http://gmerlin.sourceforge.net/doc/gavl//" href="http://gmerlin.sourceforge.net/doc/gavl//structgavl__audio__frame__s.html">gavl_audio_frame_t</a> *frame)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Send audio data to the plugin. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>priv</em>&nbsp;</td><td>The handle returned by the create() method </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>frame</em>&nbsp;</td><td>Audio frame</td></tr>
  </table>
</dl>
This updates the plugin with new audio samples. After that, we may or may not call the draw_frame function below to actually draw an image. Note, that visualization plugins are not required to do internal audio buffering, so it's wise to pass a frame with as many samples as the samples_per_frame member of the audio format returned by <a class="el" href="structbg__visualization__plugin__s.html#4497123b57e0d7cf25bff98825de626a">open_ov</a> or <a class="el" href="structbg__visualization__plugin__s.html#8e257ca8bfd289e12f872e569c2f377c">open_win</a>. 
</div>
</div><p>
<a class="anchor" name="d9533da931047fc9eb96fbf402a04e22"></a><!-- doxytag: member="bg_visualization_plugin_s::draw_frame" ref="d9533da931047fc9eb96fbf402a04e22" args=")(void *priv, gavl_video_frame_t *frame)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void(* <a class="el" href="structbg__visualization__plugin__s.html#d9533da931047fc9eb96fbf402a04e22">bg_visualization_plugin_s::draw_frame</a>)(void *priv, <a class="elRef" doxygen="gavl.tags:http://gmerlin.sourceforge.net/doc/gavl//" href="http://gmerlin.sourceforge.net/doc/gavl//structgavl__video__frame__s.html">gavl_video_frame_t</a> *frame)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Draw an image. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>priv</em>&nbsp;</td><td>The handle returned by the create() method </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>The</em>&nbsp;</td><td>video frame to draw to</td></tr>
  </table>
</dl>
For OpenGL plugins, frame is NULL. For frame based plugins, the image will be drawn into the frame you pass. You must display the frame on your own then. 
</div>
</div><p>
<a class="anchor" name="4ddc900873ef913dfc3cdff3bbdfb5c2"></a><!-- doxytag: member="bg_visualization_plugin_s::show_frame" ref="4ddc900873ef913dfc3cdff3bbdfb5c2" args=")(void *priv)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void(* <a class="el" href="structbg__visualization__plugin__s.html#4ddc900873ef913dfc3cdff3bbdfb5c2">bg_visualization_plugin_s::show_frame</a>)(void *priv)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Show the image. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>priv</em>&nbsp;</td><td>The handle returned by the create() method</td></tr>
  </table>
</dl>
This function is needed only for OpenGL plugins. Under X11, it will typically call glXSwapBuffers and process events on the X11 window. 
</div>
</div><p>
<a class="anchor" name="164e240834f27050d124a8f821bbf32a"></a><!-- doxytag: member="bg_visualization_plugin_s::close" ref="164e240834f27050d124a8f821bbf32a" args=")(void *priv)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void(* <a class="el" href="structbg__visualization__plugin__s.html#164e240834f27050d124a8f821bbf32a">bg_visualization_plugin_s::close</a>)(void *priv)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Close a plugin. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>priv</em>&nbsp;</td><td>The handle returned by the create() method </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr>The documentation for this struct was generated from the following file:<ul>
<li>/home/mandrake/rpm/BUILD/gmerlin-0.4.1/include/gmerlin/<a class="el" href="plugin_8h_source.html">plugin.h</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Aug 22 01:28:05 2009 for gmerlin by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>