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
1689169e
Commit
1689169e
authored
Nov 25, 2007
by
Dennis van Amerongen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/access_output/shout.c: automatic reconnect to server at startup.
parent
d0cd61dd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
23 deletions
+49
-23
modules/access_output/shout.c
modules/access_output/shout.c
+49
-23
No files found.
modules/access_output/shout.c
View file @
1689169e
...
...
@@ -364,7 +364,27 @@ static int Open( vlc_object_t *p_this )
}
}
/* Shoutcast using ICY protocol */
/* Connect at startup. Cycle through the possible protocols. */
i_ret
=
shout_get_connected
(
p_shout
);
while
(
i_ret
!=
SHOUTERR_CONNECTED
)
{
/* Shout parameters cannot be changed on an open connection */
i_ret
=
shout_close
(
p_shout
);
if
(
i_ret
==
SHOUTERR_SUCCESS
)
{
i_ret
=
SHOUTERR_UNCONNECTED
;
}
/* Re-initialize for Shoutcast using ICY protocol. Not needed for initial connection
but it is when we are reconnecting after other protocol was tried. */
i_ret
=
shout_set_protocol
(
p_shout
,
SHOUT_PROTOCOL_ICY
);
if
(
i_ret
!=
SHOUTERR_SUCCESS
)
{
msg_Err
(
p_access
,
"failed to set the protocol to 'icy'"
);
free
(
p_access
->
p_sys
);
free
(
psz_accessname
);
return
VLC_EGENERIC
;
}
i_ret
=
shout_open
(
p_shout
);
if
(
i_ret
==
SHOUTERR_SUCCESS
)
{
...
...
@@ -391,7 +411,6 @@ static int Open( vlc_object_t *p_this )
free
(
psz_accessname
);
return
VLC_EGENERIC
;
}
i_ret
=
shout_open
(
p_shout
);
if
(
i_ret
==
SHOUTERR_SUCCESS
)
{
...
...
@@ -401,7 +420,6 @@ static int Open( vlc_object_t *p_this )
else
msg_Warn
(
p_access
,
"failed to connect using 'http' (icecast 2.x) protocol "
);
}
/*
for non-blocking, use:
while( i_ret == SHOUTERR_BUSY )
...
...
@@ -410,6 +428,14 @@ static int Open( vlc_object_t *p_this )
i_ret = shout_get_connected( p_shout );
}
*/
/* Only wait when we have no connection */
if
(
i_ret
!=
SHOUTERR_CONNECTED
)
{
msg_Warn
(
p_access
,
"unable to establish connection. waiting 30 seconds to retry..."
);
msleep
(
30000000
);
}
}
if
(
i_ret
!=
SHOUTERR_CONNECTED
)
{
msg_Err
(
p_access
,
"failed to open shout stream to %s:%i/%s: %s"
,
...
...
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