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
3d041f13
Commit
3d041f13
authored
Aug 18, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modules/services_discovery/shout.c: Use the new services_discovery API.
parent
1153717c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
26 deletions
+16
-26
modules/services_discovery/shout.c
modules/services_discovery/shout.c
+16
-26
No files found.
modules/services_discovery/shout.c
View file @
3d041f13
...
...
@@ -88,7 +88,6 @@ vlc_module_end();
struct
services_discovery_sys_t
{
playlist_item_t
*
p_node_cat
,
*
p_node_one
;
input_item_t
*
p_input
;
vlc_bool_t
b_dialog
;
};
...
...
@@ -100,6 +99,8 @@ struct services_discovery_sys_t
* Local prototypes
*****************************************************************************/
static
void
Run
(
services_discovery_t
*
p_sd
);
/* Main functions */
static
int
OpenRadio
(
vlc_object_t
*
p_this
)
{
...
...
@@ -117,46 +118,38 @@ static int OpenTV( vlc_object_t *p_this )
static
int
Open
(
vlc_object_t
*
p_this
,
int
i_type
)
{
services_discovery_t
*
p_sd
=
(
services_discovery_t
*
)
p_this
;
playlist_t
*
p_playlist
=
pl_Yield
(
p_this
);
DECMALLOC_ERR
(
p_sys
,
services_discovery_sys_t
);
p_sd
->
p_sys
=
p_sys
;
p_sd
->
pf_run
=
Run
;
switch
(
i_type
)
{
case
TV
:
p_sys
->
p_input
=
input_ItemNewExt
(
p_
playlist
,
p_sys
->
p_input
=
input_ItemNewExt
(
p_
sd
,
SHOUTCAST_TV_BASE_URL
,
_
(
"Shoutcast TV"
),
0
,
NULL
,
-
1
);
break
;
case
RADIO
:
default:
p_sys
->
p_input
=
input_ItemNewExt
(
p_
playlist
,
p_sys
->
p_input
=
input_ItemNewExt
(
p_
sd
,
SHOUTCAST_BASE_URL
,
_
(
"Shoutcast"
),
0
,
NULL
,
-
1
);
break
;
}
input_ItemAddOption
(
p_sys
->
p_input
,
"no-playlist-autostart"
);
p_sys
->
p_input
->
b_prefers_tree
=
VLC_TRUE
;
p_sys
->
p_node_cat
=
playlist_NodeAddInput
(
p_playlist
,
p_sys
->
p_input
,
p_playlist
->
p_root_category
,
PLAYLIST_APPEND
,
PLAYLIST_END
,
VLC_FALSE
);
p_sys
->
p_node_one
=
playlist_NodeAddInput
(
p_playlist
,
p_sys
->
p_input
,
p_playlist
->
p_root_onelevel
,
PLAYLIST_APPEND
,
PLAYLIST_END
,
VLC_FALSE
);
p_sys
->
p_node_cat
->
i_flags
|=
PLAYLIST_RO_FLAG
;
p_sys
->
p_node_cat
->
i_flags
|=
PLAYLIST_SKIP_FLAG
;
p_sys
->
p_node_one
->
i_flags
|=
PLAYLIST_RO_FLAG
;
p_sys
->
p_node_one
->
i_flags
|=
PLAYLIST_SKIP_FLAG
;
p_sys
->
p_node_one
->
p_input
->
i_id
=
p_sys
->
p_node_cat
->
p_input
->
i_id
;
var_SetVoid
(
p_playlist
,
"intf-change"
);
pl_Release
(
p_this
);
input_Read
(
p_sd
,
p_sys
->
p_input
,
VLC_FALSE
);
return
VLC_SUCCESS
;
}
/*****************************************************************************
* Run:
*****************************************************************************/
static
void
Run
(
services_discovery_t
*
p_sd
)
{
services_discovery_AddItem
(
p_sd
,
p_sd
->
p_sys
->
p_input
,
NULL
/* no category */
);
input_Read
(
pl_Yield
(
p_sd
),
p_sd
->
p_sys
->
p_input
,
VLC_FALSE
);
}
/*****************************************************************************
* Close:
*****************************************************************************/
...
...
@@ -164,9 +157,6 @@ static void Close( vlc_object_t *p_this )
{
services_discovery_t
*
p_sd
=
(
services_discovery_t
*
)
p_this
;
services_discovery_sys_t
*
p_sys
=
p_sd
->
p_sys
;
playlist_t
*
p_playlist
=
pl_Yield
(
p_sd
);
playlist_NodeDelete
(
p_playlist
,
p_sys
->
p_node_cat
,
VLC_TRUE
,
VLC_FALSE
);
playlist_NodeDelete
(
p_playlist
,
p_sys
->
p_node_one
,
VLC_TRUE
,
VLC_FALSE
);
pl_Release
(
p_sd
);
services_discovery_RemoveItem
(
p_sd
,
p_sys
->
p_input
);
free
(
p_sys
);
}
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