mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +00:00
soup: fix caps
This commit is contained in:
parent
54252d0c49
commit
88733ea2f8
1 changed files with 10 additions and 2 deletions
|
@ -712,6 +712,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);
|
||||||
|
|
||||||
|
gst_base_src_set_caps (GST_BASE_SRC (src), src->src_caps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((value =
|
if ((value =
|
||||||
|
@ -735,13 +737,19 @@ gst_soup_http_src_got_headers_cb (SoupMessage * msg, GstSoupHTTPSrc * src)
|
||||||
rate = atol (param);
|
rate = atol (param);
|
||||||
|
|
||||||
src->src_caps = gst_caps_new_simple ("audio/x-raw",
|
src->src_caps = gst_caps_new_simple ("audio/x-raw",
|
||||||
"format", G_TYPE_STRING, "S16_BE",
|
"format", G_TYPE_STRING, "S16BE",
|
||||||
|
"layout", G_TYPE_STRING, "interleaved",
|
||||||
"channels", G_TYPE_INT, channels, "rate", G_TYPE_INT, rate, NULL);
|
"channels", G_TYPE_INT, channels, "rate", G_TYPE_INT, rate, NULL);
|
||||||
|
|
||||||
|
gst_base_src_set_caps (GST_BASE_SRC (src), src->src_caps);
|
||||||
} else {
|
} else {
|
||||||
/* Set the Content-Type field on the caps */
|
/* Set the Content-Type field on the caps */
|
||||||
if (src->src_caps)
|
if (src->src_caps) {
|
||||||
|
src->src_caps = gst_caps_make_writable (src->src_caps);
|
||||||
gst_caps_set_simple (src->src_caps, "content-type", G_TYPE_STRING,
|
gst_caps_set_simple (src->src_caps, "content-type", G_TYPE_STRING,
|
||||||
value, NULL);
|
value, NULL);
|
||||||
|
gst_base_src_set_caps (GST_BASE_SRC (src), src->src_caps);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue