Statusbar>http?

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Threetimes
New Cone
New Cone
Posts: 3
Joined: 30 Apr 2008 00:14

Statusbar>http?

Postby Threetimes » 30 Apr 2008 00:37

Hi

I want a web page via the HTTP-interface that displays the contents of the statusbar.
Image

Maybe something like this?

Code: Select all

<vlc id="value" param1="long_title" />
or

Code: Select all

<vlc id="value" param1="full_name" />

revolunet
Big Cone-huna
Big Cone-huna
Posts: 515
Joined: 17 Oct 2007 13:16
VLC version: 0.9.8
Operating System: Vista
Location: Paris, France
Contact:

Re: Statusbar>http?

Postby revolunet » 30 Apr 2008 11:17

you can find some info on this page : http://www.videolan.org/doc/vlc-user-guide/en/ch05.html

if you know things about RPN, it would be great if you could add a page to the Wiki as theres nothing about RPN for the moment.
VLC & web IT consulting - http://www.revolunet.com
Github : http://github.com/revolunet

Threetimes
New Cone
New Cone
Posts: 3
Joined: 30 Apr 2008 00:14

Re: Statusbar>http?

Postby Threetimes » 30 Apr 2008 15:31

I found it!

I started looking in the default web pages, an i found out that it loaded requests/playlist.xml so i toke a look there.
<?xml version="1.0" encoding="<vlc id="value" param1="charset"/>" standalone="yes" ?>
<vlc id="if" param1="0"/>
<!-- copyright and stuff... -->
<vlc id="end"/>

<vlc id="rpn" param1="first_item 0 store" />
<vlc id="rpn" param1="last_depth 0 store" />
<vlc id="foreach" param1="pl" param2="playlist" />
  <vlc id="if" param1="pl.depth value last_depth value <" />
    <vlc id="rpn" param1="pl.depth value ':' last_depth value 1 - ':' 1 strcat strcat strcat strcat" />
    <vlc id="foreach" param1="the_final_countdown" param2="integer" />
</node>
    <vlc id="end" />
  <vlc id="end" />
  <vlc id="if" param1="pl.type value 'Node' strcmp" />
    <vlc id="rpn" param1="1 +" />
<leaf id="<vlc id="value" param1="pl.index" />" <vlc id="if" param1="pl.current" /> current="current" <vlc id="end" /> uri="<vlc id="value" param1="pl.uri value '&' '&' str_replace" />" name="<vlc id="value" param1="pl.name value '&' '&' str_replace" />" ro="<vlc id="value" param1="pl.ro" />" duration="<vlc id="value" param1="pl.duration" />" />
  <vlc id="else" />
<node id="<vlc id="value" param1="pl.index" />" name="<vlc id="value" param1="pl.name value '&' '&' str_replace" />" ro="<vlc id="value" param1="pl.ro" />" >
    <vlc id="if" param1="first_item value 0 ="/>
      <vlc id="rpn" param1="first_item 1 store" />
    <vlc id="end"/>
    <vlc id="if" param1="pl.i_children 0 !=" />

    <vlc id="else" />
</node>
    <vlc id="end" />
  <vlc id="end" />
  <vlc id="rpn" param1="last_depth pl.depth value store" />
<vlc id="end" />
<vlc id="rpn" param1="0 ':' last_depth value 1 - ':' 1 strcat strcat strcat strcat" />
<vlc id="foreach" param1="the_final_countdown" param2="integer" />
</node>
<vlc id="end" />
(unwanted and wanted output)

I removed the red parts and changed the blue part:

I dont want xml, but just plain text.
Also I only want the name of the item.
<leaf id="<vlc id="value" param1="pl.index" />" <vlc id="if" param1="pl.current" /> current="current" <vlc id="end" /> uri="<vlc id="value" param1="pl.uri value '&' '&' str_replace" />" name="<vlc id="value" param1="pl.name value '&' '&' str_replace" />" ro="<vlc id="value" param1="pl.ro" />" duration="<vlc id="value" param1="pl.duration" />" />

Since I only want the current item, I put the whole line between [if pl.current]
<vlc id="if" param1="pl.current" /><vlc id="end" /><vlc id="value" param1="pl.name value" /><vlc id="end" />

Now just remove all line endings and unnecessary spaces and you're done!

Now I can see what track I'm listening in Samurize :P .
Image


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 15 guests