Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
George Kiagiadakis
gst-plugins-good
Commits
dd1bd2be
Commit
dd1bd2be
authored
Aug 21, 2015
by
Tim-Philipp Müller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: souphttpsrc: don't try to connect to dead radio server
parent
ba8cda54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
39 deletions
+16
-39
tests/check/elements/souphttpsrc.c
tests/check/elements/souphttpsrc.c
+16
-39
No files found.
tests/check/elements/souphttpsrc.c
View file @
dd1bd2be
...
...
@@ -387,34 +387,9 @@ GST_START_TEST (test_icy_stream)
gst_bin_add
(
GST_BIN
(
pipe
),
sink
);
fail_unless
(
gst_element_link
(
src
,
sink
));
/* First try Virgin Radio Ogg stream, to see if there's connectivity and all
* (which is an attempt to work around the completely horrid error reporting
* and that we can't distinguish different types of failures here). */
g_object_set
(
src
,
"location"
,
"http://ogg2.smgradio.com/vr32.ogg"
,
NULL
);
g_object_set
(
src
,
"num-buffers"
,
1
,
NULL
);
icy_caps
=
FALSE
;
gst_element_set_state
(
pipe
,
GST_STATE_PLAYING
);
msg
=
gst_bus_poll
(
GST_ELEMENT_BUS
(
pipe
),
GST_MESSAGE_EOS
|
GST_MESSAGE_ERROR
,
-
1
);
if
(
GST_MESSAGE_TYPE
(
msg
)
==
GST_MESSAGE_ERROR
)
{
GST_INFO
(
"looks like there's no net connectivity or sgmradio.com is "
"down. In any case, let's just skip this test"
);
gst_message_unref
(
msg
);
goto
done
;
}
gst_message_unref
(
msg
);
msg
=
NULL
;
gst_element_set_state
(
pipe
,
GST_STATE_NULL
);
/* Now, if the ogg stream works, the mp3 shoutcast stream should work as
* well (time will tell if that's true) */
/* Virgin Radio 32kbps mp3 shoutcast stream */
g_object_set
(
src
,
"location"
,
"http://mp3-vr-32.smgradio.com:80/"
,
NULL
);
/* EOS after the first buffer */
g_object_set
(
src
,
"num-buffers"
,
1
,
NULL
);
icy_caps
=
TRUE
;
...
...
@@ -422,22 +397,24 @@ GST_START_TEST (test_icy_stream)
msg
=
gst_bus_poll
(
GST_ELEMENT_BUS
(
pipe
),
GST_MESSAGE_EOS
|
GST_MESSAGE_ERROR
,
-
1
);
if
(
GST_MESSAGE_TYPE
(
msg
)
==
GST_MESSAGE_EOS
)
{
GST_DEBUG
(
"success, we're done here"
);
gst_message_unref
(
msg
);
goto
done
;
}
{
GError
*
err
=
NULL
;
gst_message_parse_error
(
msg
,
&
err
,
NULL
);
gst_message_unref
(
msg
);
g_error
(
"Error with ICY mp3 shoutcast stream: %s"
,
err
->
message
);
g_error_free
(
err
);
switch
(
GST_MESSAGE_TYPE
(
msg
))
{
case
GST_MESSAGE_EOS
:
GST_DEBUG
(
"success, we're done here"
);
gst_message_unref
(
msg
);
break
;
case
GST_MESSAGE_ERROR
:{
GError
*
err
=
NULL
;
gst_message_parse_error
(
msg
,
&
err
,
NULL
);
GST_INFO
(
"Error with ICY mp3 shoutcast stream: %s"
,
err
->
message
);
gst_message_unref
(
msg
);
g_clear_error
(
&
err
);
break
;
}
default:
break
;
}
done:
icy_caps
=
FALSE
;
gst_element_set_state
(
pipe
,
GST_STATE_NULL
);
...
...
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