Page 1 of 1

Adding a SD from an extension

Posted: 08 Apr 2021 22:03
by spark90
Hello !

I need to add rtsp streams on a custom SD on the left panel under "Podcasts", "Jamendo Selections", "Icecast Radio Directory" from an extension (not a sd script !)

I've tried :

Code: Select all

t = vlc.sd.add('Test') vlc.msg.dbg(t)
But il fails :evil:

logs :
main debug: looking for services_discovery module matching "Test": 9 candidates
main debug: no services_discovery modules matched
main error: no suitable services discovery module
lua debug: -2

Any Ideas ?

Thx

Re: Adding a SD from an extension

Posted: 09 Apr 2021 14:55
by mederi
Probably not.

Code: Select all

local services=vlc.sd.get_services_names() for name,title in pairs(services) do vlc.msg.info(name.." "..title) end vlc.msg.info(tostring(vlc.sd.is_loaded("lua{sd='jamendo'}"))) vlc.sd.add("lua{sd='jamendo'}") vlc.msg.info(tostring(vlc.sd.is_loaded("lua{sd='jamendo'}")))
You can feed the Playlist from extensions.

Posted: 10 Apr 2021 08:42
by spark90

Code: Select all

vlc.sd.add("lua{sd='TTTTT'}")
main debug: looking for services_discovery module matching "lua": 9 candidates
main debug: set config option: lua-sd to TTTTT
lua error: Couldn't find lua services discovery script "TTTTT".
main debug: no services_discovery modules matched
main error: no suitable services discovery module

It doesn't works :evil:

Ant Idea ?

Re: Adding a SD from an extension

Posted: 11 Apr 2021 16:13
by mederi
It seems you can only load/activate already available SD. It is quite useless and it is not even available in current master VLC 4 anymore. I think Objects (undocumented Sleeping Beauty :)) can provide some more control over VLC. Some related topic https://forum.videolan.org/viewtopic.php?f=29&t=155525

Re: Adding a SD from an extension

Posted: 06 May 2021 07:09
by spark90
Thank's for your reply.

I'm going to be mad :D

Whith a little dump function on the vlc object, I've the following results:

from SD:

Code: Select all

["sd"] = Table(4)= { ["add_node"] = function: 000001BD5353E430, ["add_item"] = function: 000001BD5353E610, ["remove_item"] = function: 000001BD5353DCB0, ["remove_node"] = function: 000001BD5353DF20 },
from extensions :

Code: Select all

["sd"] = Table(4)= { ["is_loaded"] = function: 00000203C4E77D10, ["remove"] = function: 00000203C4E775F0, ["get_services_names"] = function: 00000203C4E774D0, ["add"] = function: 00000203C4E77AD0 },
As vlc.stream() is broken in SD, I should make an extension to access vlc.net to make my own http:get() client, since vlc.net is not available from SD.
BUT with extensions, I can't add a SD item in the left menu and add my retrieved rstp streams link's (and icons). So I need an existing SD .... infinite loop... :roll:

So:

2 solutions :

Solution 1:
Make 2 scripts : 1 SD et 1 Extension. The Extension creates the files downloaded by the available vlc.net object. And the SD use the content of these files to add rstp to the SD playlist.

Solution 2:
Wait for VLC4 and see if situation looks better :-|