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
4a027876
Commit
4a027876
authored
Apr 28, 2006
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport trunk shoutcast changes except Shoutcast TV service discovery submodule.
parent
e94d562b
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
588 additions
and
38 deletions
+588
-38
modules/demux/playlist/Modules.am
modules/demux/playlist/Modules.am
+1
-0
modules/demux/playlist/playlist.c
modules/demux/playlist/playlist.c
+11
-0
modules/demux/playlist/playlist.h
modules/demux/playlist/playlist.h
+3
-0
modules/demux/playlist/shoutcast.c
modules/demux/playlist/shoutcast.c
+562
-0
modules/services_discovery/shout.c
modules/services_discovery/shout.c
+11
-38
No files found.
modules/demux/playlist/Modules.am
View file @
4a027876
...
...
@@ -9,6 +9,7 @@ SOURCES_playlist = \
podcast.c \
xspf.c \
xspf.h \
shoutcast.c \
$(NULL)
modules/demux/playlist/playlist.c
View file @
4a027876
...
...
@@ -38,6 +38,10 @@
#define AUTOSTART_LONGTEXT N_( "Automatically start playing the playlist " \
"content once it's loaded.\n" )
#define SHOW_ADULT_TEXT N_( "Show shoutcast adult content" )
#define SHOW_ADULT_LONGTEXT N_( "Show NC17 rated video streams when " \
"using shoutcast video playlists." )
vlc_module_begin
();
add_shortcut
(
"playlist"
);
set_category
(
CAT_INPUT
);
...
...
@@ -90,6 +94,13 @@ vlc_module_begin();
add_shortcut
(
"xspf-open"
);
set_capability
(
"demux2"
,
10
);
set_callbacks
(
E_
(
xspf_import_Activate
),
NULL
);
add_submodule
();
set_description
(
_
(
"New winamp 5.2 shoutcast import"
)
);
add_shortcut
(
"shout-winamp"
);
set_capability
(
"demux2"
,
10
);
set_callbacks
(
E_
(
Import_Shoutcast
),
E_
(
Close_Shoutcast
)
);
add_bool
(
"shoutcast-show-adult"
,
VLC_FALSE
,
NULL
,
SHOW_ADULT_TEXT
,
SHOW_ADULT_LONGTEXT
,
VLC_FALSE
);
vlc_module_end
();
...
...
modules/demux/playlist/playlist.h
View file @
4a027876
...
...
@@ -47,3 +47,6 @@ int E_(Import_podcast) ( vlc_object_t * );
void
E_
(
Close_podcast
)
(
vlc_object_t
*
);
int
E_
(
xspf_import_Activate
)
(
vlc_object_t
*
);
int
E_
(
Import_Shoutcast
)
(
vlc_object_t
*
);
void
E_
(
Close_Shoutcast
)
(
vlc_object_t
*
);
modules/demux/playlist/shoutcast.c
0 → 100644
View file @
4a027876
This diff is collapsed.
Click to expand it.
modules/services_discovery/shout.c
View file @
4a027876
...
...
@@ -5,6 +5,7 @@
* $Id$
*
* Authors: Sigmund Augdal Helberg <dnumgis@videolan.org>
* Antoine Cellerier <dionoea -@T- videolan -d.t- 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
...
...
@@ -48,7 +49,7 @@
************************************************************************/
#define MAX_LINE_LENGTH 256
#define SHOUTCAST_BASE_URL "http/shout-winamp://www.shoutcast.com/sbin/newxml.phtml"
/*****************************************************************************
* Module descriptor
...
...
@@ -58,19 +59,13 @@
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
#define LIMIT_TEXT N_("Number of streams")
/// \bug [String] -which would be listed + to list
#define LIMIT_LONGTEXT N_("Maximum number of Shoutcast radio streams which " \
"would be listed.")
vlc_module_begin
();
set_shortname
(
"Shoutcast"
);
set_description
(
_
(
"Shoutcast radio listings"
)
);
set_category
(
CAT_PLAYLIST
);
set_subcategory
(
SUBCAT_PLAYLIST_SD
);
add_integer
(
"shoutcast-limit"
,
1000
,
NULL
,
LIMIT_TEXT
,
LIMIT_LONGTEXT
,
VLC_TRUE
);
add_suppressed_integer
(
"shoutcast-limit"
);
set_capability
(
"services_discovery"
,
0
);
set_callbacks
(
Open
,
Close
);
...
...
@@ -84,10 +79,7 @@ vlc_module_end();
struct
services_discovery_sys_t
{
/* playlist node */
playlist_item_t
*
p_node
;
playlist_item_t
*
p_item
;
int
i_limit
;
vlc_bool_t
b_dialog
;
};
...
...
@@ -112,9 +104,6 @@ static int Open( vlc_object_t *p_this )
playlist_view_t
*
p_view
;
playlist_item_t
*
p_item
;
char
*
psz_shoutcast_url
;
char
*
psz_shoutcast_title
;
p_sd
->
pf_run
=
Run
;
p_sd
->
p_sys
=
p_sys
;
...
...
@@ -127,32 +116,16 @@ static int Open( vlc_object_t *p_this )
return
VLC_EGENERIC
;
}
p_sys
->
i_limit
=
config_GetInt
(
p_this
->
p_libvlc
,
"shoutcast-limit"
);
#define SHOUTCAST_BASE_URL "http/shout-b4s://www.shoutcast.com/sbin/xmllister.phtml?service=vlc&no_compress=1&limit="
psz_shoutcast_url
=
(
char
*
)
malloc
(
strlen
(
SHOUTCAST_BASE_URL
)
+
20
);
psz_shoutcast_title
=
(
char
*
)
malloc
(
6
+
20
);
sprintf
(
psz_shoutcast_url
,
SHOUTCAST_BASE_URL
"%d"
,
p_sys
->
i_limit
);
sprintf
(
psz_shoutcast_title
,
"Top %d"
,
p_sys
->
i_limit
);
p_view
=
playlist_ViewFind
(
p_playlist
,
VIEW_CATEGORY
);
p_sys
->
p_node
=
playlist_NodeCreate
(
p_playlist
,
VIEW_CATEGORY
,
_
(
"Shoutcast"
),
p_view
->
p_root
);
p_item
=
playlist_ItemNew
(
p_playlist
,
psz_shoutcast_url
,
psz_shoutcast_title
);
free
(
psz_shoutcast_url
);
free
(
psz_shoutcast_title
);
playlist_NodeAddItem
(
p_playlist
,
p_item
,
p_sys
->
p_node
->
pp_parents
[
0
]
->
i_view
,
p_sys
->
p_node
,
PLAYLIST_APPEND
,
p_sys
->
p_item
=
p_item
=
playlist_ItemNew
(
p_playlist
,
SHOUTCAST_BASE_URL
,
_
(
"Shoutcast"
)
);
playlist_NodeAddItem
(
p_playlist
,
p_item
,
p_view
->
i_id
,
p_view
->
p_root
,
PLAYLIST_APPEND
,
PLAYLIST_END
);
/* We need to declare the parents of the node as the same of the
* parent's ones */
playlist_CopyParents
(
p_sys
->
p_node
,
p_item
);
p_sys
->
p_item
->
i_flags
|=
PLAYLIST_RO_FLAG
;
p_sys
->
p_item
=
p_item
;
p_sys
->
p_node
->
i_flags
|=
PLAYLIST_RO_FLAG
;
val
.
b_bool
=
VLC_TRUE
;
var_Set
(
p_playlist
,
"intf-change"
,
val
);
...
...
@@ -172,7 +145,7 @@ static void Close( vlc_object_t *p_this )
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
)
{
playlist_NodeDelete
(
p_playlist
,
p_sys
->
p_
node
,
VLC_TRUE
,
VLC_TRUE
);
playlist_NodeDelete
(
p_playlist
,
p_sys
->
p_
item
,
VLC_TRUE
,
VLC_TRUE
);
vlc_object_release
(
p_playlist
);
}
free
(
p_sys
);
...
...
@@ -204,7 +177,7 @@ static void Run( services_discovery_t *p_sd )
if
(
i_state
==
PLAYING_S
)
{
float
f_pos
=
(
float
)(
p_sys
->
p_item
->
i_children
)
*
2
*
100
.
0
/
(
float
)(
p_sys
->
i_limit
)
;
260
/* gruiiik FIXME */
;
intf_UserProgressUpdate
(
p_sd
,
i_dialog_id
,
"Downloading"
,
f_pos
);
}
...
...
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