mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-08 23:42:28 +00:00
souphttpsrc: Set the Content-Type HTTP header on the caps.
First step to fixing ShoutCast (NSV) streaming.
This commit is contained in:
parent
53370fc899
commit
9d77bcfb29
1 changed files with 7 additions and 1 deletions
|
@ -774,7 +774,8 @@ gst_soup_http_src_got_headers_cb (SoupMessage * msg, GstSoupHTTPSrc * src)
|
||||||
src->src_caps = gst_caps_new_simple ("application/x-icy",
|
src->src_caps = gst_caps_new_simple ("application/x-icy",
|
||||||
"metadata-interval", G_TYPE_INT, icy_metaint, NULL);
|
"metadata-interval", G_TYPE_INT, icy_metaint, NULL);
|
||||||
}
|
}
|
||||||
} else if ((value =
|
}
|
||||||
|
if ((value =
|
||||||
soup_message_headers_get_content_type (msg->response_headers,
|
soup_message_headers_get_content_type (msg->response_headers,
|
||||||
¶ms)) != NULL) {
|
¶ms)) != NULL) {
|
||||||
GST_DEBUG_OBJECT (src, "Content-Type: %s", value);
|
GST_DEBUG_OBJECT (src, "Content-Type: %s", value);
|
||||||
|
@ -801,6 +802,11 @@ gst_soup_http_src_got_headers_cb (SoupMessage * msg, GstSoupHTTPSrc * src)
|
||||||
"depth", G_TYPE_INT, 16,
|
"depth", G_TYPE_INT, 16,
|
||||||
"signed", G_TYPE_BOOLEAN, TRUE,
|
"signed", G_TYPE_BOOLEAN, TRUE,
|
||||||
"endianness", G_TYPE_INT, G_BIG_ENDIAN, NULL);
|
"endianness", G_TYPE_INT, G_BIG_ENDIAN, NULL);
|
||||||
|
} else {
|
||||||
|
/* Set the Content-Type field on the caps */
|
||||||
|
if (src->src_caps)
|
||||||
|
gst_caps_set_simple (src->src_caps, "content-type", G_TYPE_STRING,
|
||||||
|
value, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue