mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-05 17:09:48 +00:00
rtspsrc: use new option parser function
This commit is contained in:
parent
5dee61a8d5
commit
64cdbb77a9
1 changed files with 1 additions and 21 deletions
|
@ -4807,9 +4807,7 @@ gst_rtspsrc_parse_methods (GstRTSPSrc * src, GstRTSPMessage * response)
|
||||||
{
|
{
|
||||||
GstRTSPHeaderField field;
|
GstRTSPHeaderField field;
|
||||||
gchar *respoptions;
|
gchar *respoptions;
|
||||||
gchar **options;
|
|
||||||
gint indx = 0;
|
gint indx = 0;
|
||||||
gint i;
|
|
||||||
|
|
||||||
/* reset supported methods */
|
/* reset supported methods */
|
||||||
src->methods = 0;
|
src->methods = 0;
|
||||||
|
@ -4827,25 +4825,7 @@ gst_rtspsrc_parse_methods (GstRTSPSrc * src, GstRTSPMessage * response)
|
||||||
if (!respoptions)
|
if (!respoptions)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* If we get here, the server gave a list of supported methods, parse
|
src->methods |= gst_rtsp_options_from_text (respoptions);
|
||||||
* them here. The string is like:
|
|
||||||
*
|
|
||||||
* OPTIONS, DESCRIBE, ANNOUNCE, PLAY, SETUP, ...
|
|
||||||
*/
|
|
||||||
options = g_strsplit (respoptions, ",", 0);
|
|
||||||
|
|
||||||
for (i = 0; options[i]; i++) {
|
|
||||||
gchar *stripped;
|
|
||||||
gint method;
|
|
||||||
|
|
||||||
stripped = g_strstrip (options[i]);
|
|
||||||
method = gst_rtsp_find_method (stripped);
|
|
||||||
|
|
||||||
/* keep bitfield of supported methods */
|
|
||||||
if (method != GST_RTSP_INVALID)
|
|
||||||
src->methods |= method;
|
|
||||||
}
|
|
||||||
g_strfreev (options);
|
|
||||||
|
|
||||||
indx++;
|
indx++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue