mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +00:00
neonhttpsrc: implement URI query
This commit is contained in:
parent
a82483e367
commit
adc048eb64
1 changed files with 24 additions and 0 deletions
|
@ -98,6 +98,7 @@ static gboolean gst_neonhttp_src_get_size (GstBaseSrc * bsrc, guint64 * size);
|
||||||
static gboolean gst_neonhttp_src_is_seekable (GstBaseSrc * bsrc);
|
static gboolean gst_neonhttp_src_is_seekable (GstBaseSrc * bsrc);
|
||||||
static gboolean gst_neonhttp_src_do_seek (GstBaseSrc * bsrc,
|
static gboolean gst_neonhttp_src_do_seek (GstBaseSrc * bsrc,
|
||||||
GstSegment * segment);
|
GstSegment * segment);
|
||||||
|
static gboolean gst_neonhttp_src_query (GstBaseSrc * bsrc, GstQuery * query);
|
||||||
|
|
||||||
static gboolean gst_neonhttp_src_set_proxy (GstNeonhttpSrc * src,
|
static gboolean gst_neonhttp_src_set_proxy (GstNeonhttpSrc * src,
|
||||||
const gchar * uri);
|
const gchar * uri);
|
||||||
|
@ -268,6 +269,7 @@ gst_neonhttp_src_class_init (GstNeonhttpSrcClass * klass)
|
||||||
gstbasesrc_class->is_seekable =
|
gstbasesrc_class->is_seekable =
|
||||||
GST_DEBUG_FUNCPTR (gst_neonhttp_src_is_seekable);
|
GST_DEBUG_FUNCPTR (gst_neonhttp_src_is_seekable);
|
||||||
gstbasesrc_class->do_seek = GST_DEBUG_FUNCPTR (gst_neonhttp_src_do_seek);
|
gstbasesrc_class->do_seek = GST_DEBUG_FUNCPTR (gst_neonhttp_src_do_seek);
|
||||||
|
gstbasesrc_class->query = GST_DEBUG_FUNCPTR (gst_neonhttp_src_query);
|
||||||
|
|
||||||
gstpushsrc_class->create = GST_DEBUG_FUNCPTR (gst_neonhttp_src_create);
|
gstpushsrc_class->create = GST_DEBUG_FUNCPTR (gst_neonhttp_src_create);
|
||||||
|
|
||||||
|
@ -777,6 +779,28 @@ gst_neonhttp_src_do_seek (GstBaseSrc * bsrc, GstSegment * segment)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gst_neonhttp_src_query (GstBaseSrc * bsrc, GstQuery * query)
|
||||||
|
{
|
||||||
|
GstNeonhttpSrc *src = GST_NEONHTTP_SRC (bsrc);
|
||||||
|
gboolean ret;
|
||||||
|
|
||||||
|
switch (GST_QUERY_TYPE (query)) {
|
||||||
|
case GST_QUERY_URI:
|
||||||
|
gst_query_set_uri (query, src->location);
|
||||||
|
ret = TRUE;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ret = FALSE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!ret)
|
||||||
|
ret = GST_BASE_SRC_CLASS (parent_class)->query (bsrc, query);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_neonhttp_src_set_location (GstNeonhttpSrc * src, const gchar * uri)
|
gst_neonhttp_src_set_location (GstNeonhttpSrc * src, const gchar * uri)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue