videodecoder: expose default query handling function
authorThiago Santos <thiagoss@osg.samsung.com>
Fri, 14 Aug 2015 11:59:51 +0000 (08:59 -0300)
committerThiago Santos <thiagoss@osg.samsung.com>
Fri, 14 Aug 2015 16:41:58 +0000 (13:41 -0300)
Subclasses can use it to select what queries they want to handle
and forward the rest to the default handling function.

API: gst_video_decoder_sink_query_default

https://bugzilla.gnome.org/show_bug.cgi?id=753623

gst-libs/gst/video/gstvideodecoder.c
gst-libs/gst/video/gstvideodecoder.h
win32/common/libgstvideo.def

index 4aed9c4..c680722 100644 (file)
@@ -476,8 +476,6 @@ static GstFlowReturn gst_video_decoder_parse_available (GstVideoDecoder * dec,
     gboolean at_eos, gboolean new_buffer);
 static gboolean gst_video_decoder_negotiate_unlocked (GstVideoDecoder *
     decoder);
-static gboolean gst_video_decoder_sink_query_default (GstVideoDecoder * decoder,
-    GstQuery * query);
 static gboolean gst_video_decoder_src_query_default (GstVideoDecoder * decoder,
     GstQuery * query);
 
@@ -1805,7 +1803,19 @@ gst_video_decoder_sink_getcaps (GstVideoDecoder * decoder, GstCaps * filter)
   return caps;
 }
 
-static gboolean
+/**
+ * gst_video_decoder_sink_query_default:
+ * @decoder: a #GstVideoDecoder
+ * @query: (transfer none): a #GstQuery
+ *
+ * Calls the default query handler for #GstVideoDecoder. It is useful
+ * when a subclass only want to handle a particular type of query and
+ * wants to use the default handler for others.
+ *
+ * Returns: a boolean, representing if the query was handled.
+ * Since: 1.6
+ */
+gboolean
 gst_video_decoder_sink_query_default (GstVideoDecoder * decoder,
     GstQuery * query)
 {
index b2f531d..779048e 100644 (file)
@@ -424,6 +424,9 @@ GstCaps *        gst_video_decoder_proxy_getcaps (GstVideoDecoder * decoder,
                                                  GstCaps         * caps,
                                                   GstCaps         * filter);
 
+gboolean         gst_video_decoder_sink_query_default (GstVideoDecoder * decoder,
+                                                       GstQuery * query);
+
 
 G_END_DECLS
 
index 8a8b40f..ef5d650 100644 (file)
@@ -129,6 +129,7 @@ EXPORTS
        gst_video_decoder_set_needs_format
        gst_video_decoder_set_output_state
        gst_video_decoder_set_packetized
+       gst_video_decoder_sink_query_default
        gst_video_dither_flags_get_type
        gst_video_dither_free
        gst_video_dither_line