Page 1 of 1

What can stream objects do?

Posted: 25 May 2012 01:07
by Vhati
According to the lua readme, vlc.stream() objects can be opened, read, and filtered(?).
If you neglect to read for a while, does a buffer fill to capacity and error out, or grow and eat memory?

Can they be closed or polled?
Are streams a subclass of something with more methods?

If they don't have a close method, can the garbage collector take care of them if you set the variable to nil?


I'm mainly interested in closing a stream, but the rest would be handy to know.

Re: What can stream objects do?

Posted: 27 May 2012 13:17
by mederi
Hi! There is some demonstration of vlc.tream() usage in Allociné (french) VLC Extension. You can also check similar scripts around there fetching informations from Internet. Perhaps this could help you to reveal undocumented secrets.

Re: What can stream objects do?

Posted: 28 May 2012 22:25
by Vhati
Thanks. I missed that one.

Learned a couple things...
A) There's a second returned value for reporting errors, when the stream is nil: "local s, err = vlc.stream(...)"
B) Add "vlc.keep_alive()" after creating the stream and after each read, to keep VLC from getting bored and terminating the script for taking too long to return when the network lags.

Re: What can stream objects do?

Posted: 03 Jun 2012 22:51
by Vhati
stream:addfilter("comma,separated,list")

I think these are the only relevant ones, which extract from a single-file archive as you read:
  • zip
  • stream_filter_rar
A full list of modules, some of which may be stream filters can be found here:
http://130.75.2.12/source/xref/vlc/modules/LIST