Commit efae654e authored by Yoann Peronneau's avatar Yoann Peronneau

* web interface: add a snapshot button

parent ef4685ad
......@@ -1062,6 +1062,24 @@ void E_(EvaluateRPN)( intf_thread_t *p_intf, mvar_t *vars,
free( psz_cmd );
free( psz_error );
}
else if( !strcmp( s, "snapshot" ) )
{
if( p_sys->p_input )
{
vout_thread_t *p_vout;
p_vout = vlc_object_find( p_sys->p_input,
VLC_OBJECT_VOUT, FIND_CHILD );
if( p_vout )
{
vout_Control( p_vout, VOUT_SNAPSHOT );
vlc_object_release( p_vout );
msg_Dbg( p_intf, "requested snapshot" );
}
}
break;
}
else
{
E_(SSPush)( st, s );
......
......@@ -81,6 +81,11 @@ sout and playlist .
<span class="btn_text">Fullscreen</span>
</button>
&nbsp;
<button id="btn_snapshot" onclick="snapshot();" onmouseover="button_over(this);" onmouseout="button_out(this);" title="Take video snapshot" >
<img src="images/snapshot.png" alt="Take video snapshot" />
<span class="btn_text">Take video snapshot</span>
</button>
&nbsp;
<button id="btn_volume_down" onclick="volume_down();" onmouseover="button_over(this);" onmouseout="button_out(this);" title="Decrease Volume" >
<img src="images/volume_down.png" alt="Decrease Volume" />
<span class="btn_text">Decrease Volume</span>
......
......@@ -377,6 +377,10 @@ function fullscreen()
{
loadXMLDoc( 'requests/status.xml?command=fullscreen', parse_status );
}
function snapshot()
{
loadXMLDoc( 'requests/status.xml?command=snapshot', parse_status );
}
function update_status()
{
loadXMLDoc( 'requests/status.xml', parse_status );
......
......@@ -91,6 +91,9 @@
<vlc id="rpn" param1="'fullscreen' 'VLC_OBJECT_VOUT' vlc_var_get ! 'fullscreen' 'VLC_OBJECT_VOUT' vlc_var_set" />
<vlc id="end" />
<vlc id="end" />
<vlc id="if" param1="command value 'snapshot' strcmp 0 =" />
<vlc id="rpn" param1="snapshot" />
<vlc id="end" />
<vlc id="if" param1="command value 'volume' strcmp 0 =" />
<vlc id="rpn" param1="val value vlc_volume_set" />
<vlc id="end"/>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment