📄 swfdecplayer.html
字号:
<td><span class="term"><em class="parameter"><code>player</code></em> :</span></td><td> a <a href="SwfdecPlayer.html" title="SwfdecPlayer"><span class="type">SwfdecPlayer</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>keycode</code></em> :</span></td><td> the key that was pressed</td></tr><tr><td><span class="term"><em class="parameter"><code>character</code></em> :</span></td><td> UCS4 of the character that was inserted or 0 if none</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <code class="literal">TRUE</code> if the key press was handled by the <em class="parameter"><code>player</code></em>, <code class="literal">FALSE</code> if it should be propagated further</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2612242"></a><h3><a name="swfdec-player-key-release"></a>swfdec_player_key_release ()</h3><a class="indexterm" name="id2612253"></a><pre class="programlisting">gboolean swfdec_player_key_release (<a href="SwfdecPlayer.html" title="SwfdecPlayer">SwfdecPlayer</a> *player, guint keycode, guint character);</pre><p>Call this function to make the <em class="parameter"><code>player</code></em> react to a key being released. See<a href="SwfdecPlayer.html#swfdec-player-key-press"><code class="function">swfdec_player_key_press()</code></a> for details.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>player</code></em> :</span></td><td> a <a href="SwfdecPlayer.html" title="SwfdecPlayer"><span class="type">SwfdecPlayer</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>keycode</code></em> :</span></td><td> the key that was released</td></tr><tr><td><span class="term"><em class="parameter"><code>character</code></em> :</span></td><td> UCS4 of the character that was inserted or 0 if none</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <code class="literal">TRUE</code> if the key press was handled by the <em class="parameter"><code>player</code></em>, <code class="literal">FALSE</code> if it should be propagated further</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2612391"></a><h3><a name="swfdec-player-render-audio"></a>swfdec_player_render_audio ()</h3><a class="indexterm" name="id2612402"></a><pre class="programlisting">void swfdec_player_render_audio (<a href="SwfdecPlayer.html" title="SwfdecPlayer">SwfdecPlayer</a> *player, gint16 *dest, guint start_offset, guint n_samples);</pre><p>Renders the data for this frame into the given location. The data is added to <em class="parameter"><code>dest</code></em>, so you probably want to initialize <em class="parameter"><code>dest</code></em> to silence before calling this function.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>player</code></em> :</span></td><td> a <a href="SwfdecPlayer.html" title="SwfdecPlayer"><span class="type">SwfdecPlayer</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>dest</code></em> :</span></td><td> location to add audio signal to. The audio signal will be in 44100kHz signed 16bit stereo.</td></tr><tr><td><span class="term"><em class="parameter"><code>start_offset</code></em> :</span></td><td> offset in samples at which to start rendering. The offset is calculated relative to the last iteration, so the value set by <code class="function">swfdec_player_set_audio_advance()</code> is ignored.</td></tr><tr><td><span class="term"><em class="parameter"><code>n_samples</code></em> :</span></td><td> amount of samples to render.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2612537"></a><h3><a name="swfdec-player-get-audio"></a>swfdec_player_get_audio ()</h3><a class="indexterm" name="id2612548"></a><pre class="programlisting">const GList* swfdec_player_get_audio (<a href="SwfdecPlayer.html" title="SwfdecPlayer">SwfdecPlayer</a> *player);</pre><p>Returns a list of all currently active audio streams in <em class="parameter"><code>player</code></em>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>player</code></em> :</span></td><td> a <a href="SwfdecPlayer.html" title="SwfdecPlayer"><span class="type">SwfdecPlayer</span></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A <span class="type">GList</span> of <a href="SwfdecAudio.html" title="SwfdecAudio"><span class="type">SwfdecAudio</span></a>. You must not modify or free this list.</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id2612629"></a><h2>Property Details</h2><div class="refsect2" lang="en"><a name="id2612638"></a><h3><a name="SwfdecPlayer--alignment"></a>The <code class="literal">"alignment"</code> property</h3><a class="indexterm" name="id2612651"></a><pre class="programlisting"> "alignment" <a href="swfdec-Enumerations.html#SwfdecAlignment">SwfdecAlignment</a> : Read / Write</pre><p>point of the screen to align the output to.</p><p>Default value: SWFDEC_ALIGNMENT_CENTER</p></div><hr><div class="refsect2" lang="en"><a name="id2612675"></a><h3><a name="SwfdecPlayer--background-color"></a>The <code class="literal">"background-color"</code> property</h3><a class="indexterm" name="id2612690"></a><pre class="programlisting"> "background-color" guint : Read / Write</pre><p>ARGB color used to draw the background.</p><p>Default value: 4294967295</p></div><hr><div class="refsect2" lang="en"><a name="id2612714"></a><h3><a name="SwfdecPlayer--cache-size"></a>The <code class="literal">"cache-size"</code> property</h3><a class="indexterm" name="id2612726"></a><pre class="programlisting"> "cache-size" guint : Read</pre><p>maximum cache size in bytes.</p><p>Default value: 52428800</p></div><hr><div class="refsect2" lang="en"><a name="id2612750"></a><h3><a name="SwfdecPlayer--height"></a>The <code class="literal">"height"</code> property</h3><a class="indexterm" name="id2612762"></a><pre class="programlisting"> "height" gint : Read / Write</pre><p>current height of the movie.</p><p>Allowed values: >= -1</p><p>Default value: -1</p></div><hr><div class="refsect2" lang="en"><a name="id2612790"></a><h3><a name="SwfdecPlayer--initialized"></a>The <code class="literal">"initialized"</code> property</h3><a class="indexterm" name="id2612802"></a><pre class="programlisting"> "initialized" gboolean : Read</pre><p>TRUE when the player has initialized its basic values.</p><p>Default value: FALSE</p></div><hr><div class="refsect2" lang="en"><a name="id2612826"></a><h3><a name="SwfdecPlayer--mouse-cursor"></a>The <code class="literal">"mouse-cursor"</code> property</h3><a class="indexterm" name="id2612838"></a><pre class="programlisting"> "mouse-cursor" <a href="swfdec-Enumerations.html#SwfdecMouseCursor">SwfdecMouseCursor</a> : Read</pre><p>how the mouse pointer should be presented.</p><p>Default value: SWFDEC_MOUSE_CURSOR_NONE</p></div><hr><div class="refsect2" lang="en"><a name="id2612864"></a><h3><a name="SwfdecPlayer--next-event"></a>The <code class="literal">"next-event"</code> property</h3><a class="indexterm" name="id2612881"></a><pre class="programlisting"> "next-event" guint : Read</pre><p>how many milliseconds until the next event or 0 when no event pending.</p><p>Default value: 0</p></div><hr><div class="refsect2" lang="en"><a name="id2612908"></a><h3><a name="SwfdecPlayer--scale-mode"></a>The <code class="literal">"scale-mode"</code> property</h3><a class="indexterm" name="id2612924"></a><pre class="programlisting"> "scale-mode" <a href="swfdec-Enumerations.html#SwfdecScaleMode">SwfdecScaleMode</a> : Read / Write</pre><p>method used to scale the movie.</p><p>Default value: SWFDEC_SCALE_SHOW_ALL</p></div><hr><div class="refsect2" lang="en"><a name="id2612951"></a><h3><a name="SwfdecPlayer--width"></a>The <code class="literal">"width"</code> property</h3><a class="indexterm" name="id2612967"></a><pre class="programlisting"> "width" gint : Read / Write</pre><p>current width of the movie.</p><p>Allowed values: >= -1</p><p>Default value: -1</p></div></div><div class="refsect1" lang="en"><a name="id2612999"></a><h2>Signal Details</h2><div class="refsect2" lang="en"><a name="id2613010"></a><h3><a name="SwfdecPlayer-advance"></a>The <code class="literal">"advance"</code> signal</h3><a class="indexterm" name="id2613026"></a><pre class="programlisting">void user_function (<a href="SwfdecPlayer.html" title="SwfdecPlayer">SwfdecPlayer</a> *player, guint msecs, guint audio_samples, gpointer user_data) : Run Last</pre><p>Emitted whenever the player advances.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>player</code></em> :</span></td><td> the <a href="SwfdecPlayer.html" title="SwfdecPlayer"><span class="type">SwfdecPlayer</span></a> affected</td></tr><tr><td><span class="term"><em class="parameter"><code>msecs</code></em> :</span></td><td> the amount of milliseconds the player will advance</td></tr><tr><td><span class="term"><em class="parameter"><code>audio_samples</code></em> :</span></td><td> number of frames the audio is advanced (in 44100Hz steps)</td></tr><tr><td><span class="term"><em class="parameter"><code>user_data</code></em> :</span></td><td>user data set when the signal handler was connected.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2613149"></a><h3><a name="SwfdecPlayer-audio-added"></a>The <code class="literal">"audio-added"</code> signal</h3><a class="indexterm" name="id2613166"></a><pre class="programlisting">void user_function (<a href="SwfdecPlayer.html" title="SwfdecPlayer">SwfdecPlayer</a> *player, <a href="SwfdecAudio.html" title="SwfdecAudio">SwfdecAudio</a> *audio, gpointer user_data) : Run Last</pre><p>Emitted whenever a new audio stream was added to <em class="parameter"><code>player</code></em>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>player</code></em> :</span></td><td> the <a href="SwfdecPlayer.html" title="SwfdecPlayer"><span class="type">SwfdecPlayer</span></a> affected</td></tr><tr><td><span class="term"><em class="parameter"><code>audio</code></em> :</span></td><td> the audio stream that was added</td></tr><tr><td><span class="term"><em class="parameter"><code>user_data</code></em> :</span></td><td>user data set when the signal handler was connected.</td></tr></tbody></table></div></div><hr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -