[Sink] update sink query
authorjy1210.jung <jy1210.jung@samsung.com>
Wed, 4 Jul 2018 07:40:02 +0000 (16:40 +0900)
committer함명주/동작제어Lab(SR)/Principal Engineer/삼성전자 <myungjoo.ham@samsung.com>
Wed, 4 Jul 2018 08:23:52 +0000 (17:23 +0900)
1. remove format query
2. block seek query

**Self evaluation:**
1. Build test: [*]Passed [ ]Failed [ ]Skipped
2. Run test: [*]Passed [ ]Failed [ ]Skipped

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
gst/tensor_sink/tensor_sink.c

index f1304ac..6c21fcd 100644 (file)
@@ -449,14 +449,17 @@ gst_tensor_sink_query (GstBaseSink * sink, GstQuery * query)
 {
   GstTensorSink *self;
   GstQueryType type;
+  GstFormat format;
 
   self = GST_TENSOR_SINK (sink);
   type = GST_QUERY_TYPE (query);
 
   switch (type) {
-    case GST_QUERY_FORMATS:
-      DLOG ("query FORMATS");
-      gst_query_set_formats (query, 2, GST_FORMAT_DEFAULT, GST_FORMAT_BYTES);
+    case GST_QUERY_SEEKING:
+      DLOG ("query SEEKING");
+      /* tensor sink does not support seeking */
+      gst_query_parse_seeking (query, &format, NULL, NULL, NULL);
+      gst_query_set_seeking (query, format, FALSE, 0, -1);
       return TRUE;
 
     default:
@@ -585,6 +588,7 @@ _tensor_sink_render_buffer (GstTensorSink * self, GstBuffer * buffer)
   g_return_if_fail (GST_IS_TENSOR_SINK (self));
 
   render_rate = _tensor_sink_get_render_rate (self);
+
   if (render_rate) {
     GstClock *clock;
     GstClockTime render_time;