Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
07a69e82
Commit
07a69e82
authored
Feb 20, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua playlist: add playlist parser for Anevia Toucan list_streams.idp functionality.
parent
15b0e318
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
0 deletions
+91
-0
share/Makefile.am
share/Makefile.am
+1
-0
share/lua/playlist/anevia_streams.lua
share/lua/playlist/anevia_streams.lua
+90
-0
No files found.
share/Makefile.am
View file @
07a69e82
...
...
@@ -242,6 +242,7 @@ DIST_lua= \
lua/meta/01_musicbrainz.lua
\
lua/meta/10_googleimage.lua
\
lua/playlist/README.txt
\
lua/playlist/anevia_streams.lua
\
lua/playlist/appletrailers.lua
\
lua/playlist/break.lua
\
lua/playlist/dailymotion.lua
\
...
...
share/lua/playlist/anevia_streams.lua
0 → 100644
View file @
07a69e82
--[[
$Id$
Parse list of available streams on Anevia Toucan servers.
The URI rtsp://ipaddress:554/list_streams.idp describes a list of
available streams on the server.
Copyright © 2009 M2X BV
Authors: Jean-Paul Saman <jpsaman@videolan.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
--]]
-- Probe function.
function
probe
()
return
vlc
.
access
==
"http"
and
string.match
(
vlc
.
path
,
"list_streams.idp"
)
end
-- Parse function.
function
parse
()
p
=
{}
_
,
_
,
server
=
string.find
(
vlc
.
path
,
"(.*)/list_streams.idp"
)
while
true
do
line
=
vlc
.
readline
()
if
not
line
then
break
end
if
string.match
(
line
,
"<streams[-]list> </stream[-]list>"
)
then
break
elseif
string.match
(
line
,
"<streams[-]list xmlns=\"
(.
*
)
\
">"
)
then
while
true
do
line
=
vlc
.
readline
()
if
not
line
then
break
end
if
string.match
(
line
,
"<streamer name=\"
(.
*
)
\
"> </streamer>"
)
then
break
;
elseif
string.match
(
line
,
"<streamer name=\"
(.
*
)
\
">"
)
then
_
,
_
,
streamer
=
string.find
(
line
,
"name=\"
(.
*
)
\
""
)
while
true
do
line
=
vlc
.
readline
()
if
not
line
then
break
end
-- ignore <host name=".." /> tags
-- ignore <port number=".." /> tags
if
string.match
(
line
,
"<input name=\"
(.
*
)
\
">"
)
then
_
,
_
,
path
=
string.find
(
line
,
"name=\"
(.
*
)
\
""
)
while
true
do
line
=
vlc
.
readline
()
if
not
line
then
break
end
if
string.match
(
line
,
"<stream id=\"
(.
*
)
\
" />"
)
then
_
,
_
,
media
=
string.find
(
line
,
"id=\"
(.
*
)
\
""
)
video
=
"rtsp://"
..
tostring
(
server
)
..
"/"
..
tostring
(
path
)
..
"/"
..
tostring
(
media
)
vlc
.
msg
.
dbg
(
"adding to playlist "
..
tostring
(
video
)
)
table.insert
(
p
,
{
path
=
video
;
name
=
media
,
url
=
video
}
)
end
-- end of input tag found
if
string.match
(
line
,
"</input>"
)
then
break
end
end
end
end
if
not
line
then
break
end
-- end of streamer tag found
if
string.match
(
line
,
"</streamer>"
)
then
break
end
end
if
not
line
then
break
end
-- end of streams-list tag found
if
string.match
(
line
,
"</streams-list>"
)
then
break
end
end
end
end
return
p
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment