rc interface special functionality

This forum is about all development around libVLC.
olegkirillov
Blank Cone
Blank Cone
Posts: 46
Joined: 29 Jun 2008 21:04

rc interface special functionality

Postby olegkirillov » 01 Jan 2009 23:24

Hi!
I'm rewriting the rc console interface to implement special functionality for my Internet-TV channel.
Now I need one function, that is not straightforward. I need a special command (I call it "sweep") to delete all playlist contents except the currently playing file. There are two hurdles - to determine the file being played (I suppose I'll be able to find sometning like this in http interface) and to delete the all other playlist items (I don't know yet how to do this).

Could anyone give me a hint or code snippet?

TIA

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: rc interface special functionality

Postby Jean-Baptiste Kempf » 02 Jan 2009 12:29

Modify the file in modules/controls/rc.c
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

olegkirillov
Blank Cone
Blank Cone
Posts: 46
Joined: 29 Jun 2008 21:04

Re: rc interface special functionality

Postby olegkirillov » 02 Jan 2009 22:28

Heh... I know what to change but I don't know how. :)
What I do really need is the way to find the current input's position in playlist to try deletion loops on items before and after the currently playing one.

I was surprised when I discovered that current version of rc.c does not have the "remove" command. Now mine has one. :)

olegkirillov
Blank Cone
Blank Cone
Posts: 46
Joined: 29 Jun 2008 21:04

Re: rc interface special functionality

Postby olegkirillov » 09 Jan 2009 00:13

Solved. :)
Added "clear" command (it was missing in rc interface).
Added "i_id" field in "playlist" command output.
Added "goto <i_id>" command.
Added "remove <i_id>" command.
Added "sweep" command (removes all playlist items except currently playing one).

if someone is interested in these functions I can build a diff.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: rc interface special functionality

Postby Jean-Baptiste Kempf » 09 Jan 2009 01:54

Yes, diff would be great!
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 12 guests