<meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">added speed controls in vlc http interface</span><div>

<font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><div>

 share/http/dialogs/main        |   10 ++++++++++</div><div> share/http/images/fast.png     |  Bin 0 -> 126 bytes</div><div> share/http/js/functions.js     |   10 ++++++++++</div><div> share/http/requests/README.txt |    6 ++++++</div>

<div> share/http/requests/status.xml |    4 ++++</div><div> 5 files changed, 30 insertions(+), 0 deletions(-)</div><div><br></div></span></font><div><div>diff --git a/share/http/dialogs/main b/share/http/dialogs/main</div>

<div>index 244c4d9..a08021d 100644</div><div>--- a/share/http/dialogs/main</div><div>+++ b/share/http/dialogs/main</div><div>@@ -98,6 +98,14 @@ sout and playlist .</div><div>       <img src="images/volume_mute.png" alt="Mute Volume" /></div>

<div>       <span class="btn_text">Mute Volume</span></div><div>     </button></div><div>+    <button id="btn_speed_down" onclick="rate_down();" onmouseover="button_over(this);" onmouseout="button_out(this);" title="Increase Speed" ></div>

<div>+      <img src="images/fast.png" alt="Increase Speed" /></div><div>+      <span class="btn_text">Increase Speed</span></div><div>+    </button></div><div>+    <button id="btn_speed_up" onclick="rate_up();" onmouseover="button_over(this);" onmouseout="button_out(this);" title="Decrease Speed" ></div>

<div>+      <img src="images/slow.png" alt="Decrease Speed" /></div><div>+      <span class="btn_text">Decrease Speed</span></div><div>+    </button></div><div>   </div></div>

<div>   <div id="status"></div><div>     <span id="state">(?)</span></div><div>@@ -105,6 +113,8 @@ sout and playlist .</div><div>     Time : <span id="time">(?)</span>/<span id="length">(?)</span></div>

<div>     -</div><div>     Volume : <span id="volume">(?)</span></div><div>+    -</div><div>+    Speed : <span id="rate">(?)</span></div><div>     <br/></div><div>     <!-- progress bar --></div>

<div>     <img src="images/slider_left.png" alt="slider left" /><span id="progressbar" style="background-image: url( 'images/slider_bar.png' ); width: 408px; height:16px; position:absolute;" onclick="slider_seek( event, this );" onmousemove="slider_move( event, this );"><img src="images/slider_point.png" alt="slider point" style="position:relative; left:0px;" id="main_slider_point" onmousedown="slider_down( event, this );" onmouseup="slider_up( event, this.parentNode );" onmouseout="slider_up( event, this.parentNode );"/></span><img src="images/slider_right.png" alt="slider right" style="position:relative;left:408px;" /></div>

<div>diff --git a/share/http/images/fast.png b/share/http/images/fast.png</div><div>new file mode 100644</div><div>index 0000000..b16b74b</div><div>Binary files /dev/null and b/share/http/images/fast.png differ</div><div>

diff --git a/share/http/js/functions.js b/share/http/js/functions.js</div><div>index c09222c..3d6c1bb 100644</div><div>--- a/share/http/js/functions.js</div><div>+++ b/share/http/js/functions.js</div><div>@@ -383,6 +383,14 @@ function volume_mute()</div>

<div> {</div><div>     loadXMLDoc( 'requests/status.xml?command=volume&val=0', parse_status );</div><div> }</div><div>+function rate_up()</div><div>+{</div><div>+    loadXMLDoc( 'requests/status.xml?command=rate&val=150', parse_status );</div>

<div>+}</div><div>+function rate_down()</div><div>+{</div><div>+    loadXMLDoc( 'requests/status.xml?command=rate&val=-150', parse_status );</div><div>+}</div><div> function seek( pos )</div><div> {</div><div>

     loadXMLDoc( 'requests/status.xml?command=seek&val='+pos, parse_status );</div><div>@@ -471,6 +479,8 @@ function parse_status()</div><div>             set_text( 'length', format_time( length ) );</div>

<div>             if( status.getElementsByTagName( 'volume' ).length != 0 )</div><div>                 set_text( 'volume', Math.floor(status.getElementsByTagName( 'volume' )[0].firstChild.data/5.12)+'%' );</div>

<div>+<span class="Apple-tab-span" style="white-space:pre">     </span>    if( status.getElementsByTagName( 'rate' ).length != 0 )</div><div>+                set_text( 'rate', (status.getElementsByTagName( 'rate' )[0].firstChild.data)+'%' );</div>

<div>             var statetag = status.getElementsByTagName( 'state' );</div><div>             if( statetag.length > 0 )</div><div>             {</div><div>diff --git a/share/http/requests/README.txt b/share/http/requests/README.txt</div>

<div>index cfd5a09..6e437b1 100644</div><div>--- a/share/http/requests/README.txt</div><div>+++ b/share/http/requests/README.txt</div><div>@@ -100,6 +100,12 @@ status.xml:</div><div>     +1H:2M -> seek 1 hour and 2 minutes forward</div>

<div>     -10% -> seek 10% back</div><div> </div><div>+> change playing speed(rate)</div><div>+  ?command=rate&val=<val></div><div>+  Allowed values are of the form:</div><div>+   <int><span class="Apple-tab-span" style="white-space:pre">        </span>To increase speed</div>

<div>+  -<int><span class="Apple-tab-span" style="white-space:pre">       </span>To decrease speed</div><div>+</div><div> playlist.xml:</div><div> =============</div><div> < get the full playlist tree</div><div>diff --git a/share/http/requests/status.xml b/share/http/requests/status.xml</div>

<div>index da6d3ca..7088df6 100644</div><div>--- a/share/http/requests/status.xml</div><div>+++ b/share/http/requests/status.xml</div><div>@@ -116,6 +116,9 @@</div><div>   <vlc id="if" param1="command value 'volume' strcmp 0 =" /></div>

<div>     <vlc id="rpn" param1="val value vlc_volume_set" /></div><div>   <vlc id="end"/></div><div>+  <vlc id="if" param1="command value 'rate' strcmp 0 =" /></div>

<div>+    <vlc id="rpn" param1="'rate' 'VLC_OBJECT_INPUT' vlc_var_get val + 'rate' 'VLC_OBJECT_INPUT' vlc_var_set" /></div><div>+  <vlc id="end"/></div>

<div>   <vlc id="if" param1="command value 'seek' strcmp 0 =" /></div><div>     <vlc id="rpn" param1="val value vlc_seek" /></div><div>   <vlc id="end"/></div>

<div>@@ -126,6 +129,7 @@</div><div> <vlc id="end" /></div><div> <root></div><div>   <volume><vlc id="value" param1="volume" /></volume></div><div>+  <rate><vlc id="value" param1="100000 'rate' 'VLC_OBJECT_INPUT' vlc_var_get /"/></rate></div>

<div>   <length><vlc id="value" param1="stream_length" /></length></div><div>   <time><vlc id="value" param1="stream_time" /></time></div><div>   <state><vlc id="value" param1="stream_state" /></state></div>

</div><div><br></div><div><br></div><br><div class="gmail_quote">On Sun, Apr 10, 2011 at 3:44 PM, Rob <span dir="ltr"><<a href="mailto:rob@hobbyistsoftware.com">rob@hobbyistsoftware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi Sunil,<br>
<br>
I get<br>
<br>
error: cannot apply binary patch to 'share/http/images/fast.png' without full index line<br>
<br>
I'm guessing you need --full-index in git-format-patch<br>
<br>
Rob<div><div></div><div class="h5"><br>
<br>
<br>
On Fri, 08 Apr 2011 12:23:39 +0100, sunil kumar <<a href="mailto:skstronghold@gmail.com" target="_blank">skstronghold@gmail.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
added speed controls in vlc http interface<br>
<br>
diff --git a/share/http/dialogs/main b/share/http/dialogs/main<br>
index 244c4d9..a08021d 100644<br>
--- a/share/http/dialogs/main<br>
+++ b/share/http/dialogs/main<br>
@@ -98,6 +98,14 @@ sout and playlist .<br>
       <img src="images/volume_mute.png" alt="Mute Volume" /><br>
       <span class="btn_text">Mute Volume</span><br>
     </button><br>
+    <button id="btn_speed_down" onclick="rate_down();"<br>
onmouseover="button_over(this);" onmouseout="button_out(this);"<br>
title="Increase Speed" ><br>
+      <img src="images/fast.png" alt="Increase Speed" /><br>
+      <span class="btn_text">Increase Speed</span><br>
+    </button><br>
+    <button id="btn_speed_up" onclick="rate_up();"<br>
onmouseover="button_over(this);" onmouseout="button_out(this);"<br>
title="Decrease Speed" ><br>
+      <img src="images/slow.png" alt="Decrease Speed" /><br>
+      <span class="btn_text">Decrease Speed</span><br>
+    </button><br>
   </div><br>
   <div id="status"><br>
     <span id="state">(?)</span><br>
@@ -105,6 +113,8 @@ sout and playlist .<br>
     Time : <span id="time">(?)</span>/<span id="length">(?)</span><br>
     -<br>
     Volume : <span id="volume">(?)</span><br>
+    -<br>
+    Speed : <span id="rate">(?)</span><br>
     <br/><br>
     <!-- progress bar --><br>
     <img src="images/slider_left.png" alt="slider left" /><span<br>
id="progressbar" style="background-image: url( 'images/slider_bar.png' );<br>
width: 408px; height:16px; position:absolute;" onclick="slider_seek( event,<br>
this );" onmousemove="slider_move( event, this );"><img<br>
src="images/slider_point.png" alt="slider point" style="position:relative;<br>
left:0px;" id="main_slider_point" onmousedown="slider_down( event, this );"<br>
onmouseup="slider_up( event, this.parentNode );" onmouseout="slider_up(<br>
event, this.parentNode );"/></span><img src="images/slider_right.png"<br>
alt="slider right" style="position:relative;left:408px;" /><br>
diff --git a/share/http/images/fast.png b/share/http/images/fast.png<br>
new file mode 100644<br>
index 0000000..b16b74b<br>
Binary files /dev/null and b/share/http/images/fast.png differ<br>
diff --git a/share/http/js/functions.js b/share/http/js/functions.js<br>
index c09222c..3d6c1bb 100644<br>
--- a/share/http/js/functions.js<br>
+++ b/share/http/js/functions.js<br>
@@ -383,6 +383,14 @@ function volume_mute()<br>
 {<br>
     loadXMLDoc( 'requests/status.xml?command=volume&val=0', parse_status );<br>
 }<br>
+function rate_up()<br>
+{<br>
+    loadXMLDoc( 'requests/status.xml?command=rate&val=150', parse_status );<br>
+}<br>
+function rate_down()<br>
+{<br>
+    loadXMLDoc( 'requests/status.xml?command=rate&val=-150', parse_status<br>
);<br>
+}<br>
 function seek( pos )<br>
 {<br>
     loadXMLDoc( 'requests/status.xml?command=seek&val='+pos, parse_status<br>
);<br>
@@ -471,6 +479,8 @@ function parse_status()<br>
             set_text( 'length', format_time( length ) );<br>
             if( status.getElementsByTagName( 'volume' ).length != 0 )<br>
                 set_text( 'volume', Math.floor(status.getElementsByTagName(<br>
'volume' )[0].firstChild.data/5.12)+'%' );<br>
+    if( status.getElementsByTagName( 'rate' ).length != 0 )<br>
+                set_text( 'rate', (status.getElementsByTagName( 'rate'<br>
)[0].firstChild.data)+'%' );<br>
             var statetag = status.getElementsByTagName( 'state' );<br>
             if( statetag.length > 0 )<br>
             {<br>
diff --git a/share/http/requests/README.txt b/share/http/requests/README.txt<br>
index cfd5a09..6e437b1 100644<br>
--- a/share/http/requests/README.txt<br>
+++ b/share/http/requests/README.txt<br>
@@ -100,6 +100,12 @@ status.xml:<br>
     +1H:2M -> seek 1 hour and 2 minutes forward<br>
     -10% -> seek 10% back<br>
<br>
+> change playing speed(rate)<br>
+  ?command=rate&val=<val><br>
+  Allowed values are of the form:<br>
+   <int> To increase speed<br>
+  -<int> To decrease speed<br>
+<br>
 playlist.xml:<br>
 =============<br>
 < get the full playlist tree<br>
diff --git a/share/http/requests/status.xml b/share/http/requests/status.xml<br>
index da6d3ca..7088df6 100644<br>
--- a/share/http/requests/status.xml<br>
+++ b/share/http/requests/status.xml<br>
@@ -116,6 +116,9 @@<br>
   <vlc id="if" param1="command value 'volume' strcmp 0 =" /><br>
     <vlc id="rpn" param1="val value vlc_volume_set" /><br>
   <vlc id="end"/><br>
+  <vlc id="if" param1="command value 'rate' strcmp 0 =" /><br>
+    <vlc id="rpn" param1="'rate' 'VLC_OBJECT_INPUT' vlc_var_get val +<br>
'rate' 'VLC_OBJECT_INPUT' vlc_var_set" /><br>
+  <vlc id="end"/><br>
   <vlc id="if" param1="command value 'seek' strcmp 0 =" /><br>
     <vlc id="rpn" param1="val value vlc_seek" /><br>
   <vlc id="end"/><br>
@@ -126,6 +129,7 @@<br>
 <vlc id="end" /><br>
 <root><br>
   <volume><vlc id="value" param1="volume" /></volume><br>
+  <rate><vlc id="value" param1="100000 'rate' 'VLC_OBJECT_INPUT'<br>
vlc_var_get /"/></rate><br>
   <length><vlc id="value" param1="stream_length" /></length><br>
   <time><vlc id="value" param1="stream_time" /></time><br>
   <state><vlc id="value" param1="stream_state" /></state><br>
</blockquote></div></div>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="http://mailman.videolan.org/listinfo/vlc-devel" target="_blank">http://mailman.videolan.org/listinfo/vlc-devel</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Sunil Kumar<br>RIT2009021,<br>IIIT Allahabad (Amethi Campus)<br><br>
</div>