mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-13 11:34:10 +00:00
gst/multifile/gstmultifilesrc.c: Implement DEFAULT and BUFFER position queries. See #555260.
Original commit message from CVS: * gst/multifile/gstmultifilesrc.c: (gst_multi_file_src_class_init), (gst_multi_file_src_query): Implement DEFAULT and BUFFER position queries. See #555260.
This commit is contained in:
parent
d0777d87fb
commit
0e9db391c7
2 changed files with 43 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-10-08 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
* gst/multifile/gstmultifilesrc.c: (gst_multi_file_src_class_init),
|
||||
(gst_multi_file_src_query):
|
||||
Implement DEFAULT and BUFFER position queries. See #555260.
|
||||
|
||||
2008-10-08 Edward Hervey <edward.hervey@collabora.co.uk>
|
||||
|
||||
* sys/ximage/gstximagesrc.c: (gst_ximage_src_stop):
|
||||
|
|
|
@ -63,6 +63,7 @@ static void gst_multi_file_src_set_property (GObject * object, guint prop_id,
|
|||
static void gst_multi_file_src_get_property (GObject * object, guint prop_id,
|
||||
GValue * value, GParamSpec * pspec);
|
||||
static GstCaps *gst_multi_file_src_getcaps (GstBaseSrc * src);
|
||||
static gboolean gst_multi_file_src_query (GstBaseSrc * src, GstQuery * query);
|
||||
|
||||
|
||||
static GstStaticPadTemplate gst_multi_file_src_pad_template =
|
||||
|
@ -135,9 +136,10 @@ gst_multi_file_src_class_init (GstMultiFileSrcClass * klass)
|
|||
|
||||
gobject_class->dispose = gst_multi_file_src_dispose;
|
||||
|
||||
gstpushsrc_class->create = gst_multi_file_src_create;
|
||||
|
||||
gstbasesrc_class->get_caps = gst_multi_file_src_getcaps;
|
||||
gstbasesrc_class->query = gst_multi_file_src_query;
|
||||
|
||||
gstpushsrc_class->create = gst_multi_file_src_create;
|
||||
|
||||
if (sizeof (off_t) < 8) {
|
||||
GST_LOG ("No large file support, sizeof (off_t) = %" G_GSIZE_FORMAT,
|
||||
|
@ -185,6 +187,39 @@ gst_multi_file_src_getcaps (GstBaseSrc * src)
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_multi_file_src_query (GstBaseSrc * src, GstQuery * query)
|
||||
{
|
||||
gboolean res;
|
||||
GstMultiFileSrc *mfsrc;
|
||||
|
||||
mfsrc = GST_MULTI_FILE_SRC (src);
|
||||
|
||||
switch (GST_QUERY_TYPE (query)) {
|
||||
case GST_QUERY_POSITION:
|
||||
{
|
||||
GstFormat format;
|
||||
|
||||
gst_query_parse_position (query, &format, NULL);
|
||||
switch (format) {
|
||||
case GST_FORMAT_BUFFERS:
|
||||
case GST_FORMAT_DEFAULT:
|
||||
gst_query_set_position (query, GST_FORMAT_BUFFERS, mfsrc->index);
|
||||
res = TRUE;
|
||||
break;
|
||||
default:
|
||||
res = GST_BASE_SRC_CLASS (parent_class)->query (src, query);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
res = GST_BASE_SRC_CLASS (parent_class)->query (src, query);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_multi_file_src_set_location (GstMultiFileSrc * src, const gchar * location)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue