static GstFlowReturn gst_sub_parse_chain (GstPad * sinkpad, GstObject * parent,
GstBuffer * buf);
-
+#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
+static gboolean gst_sub_parse_check_byte_seekability (GstSubParse * subparse);
+#endif
#define gst_sub_parse_parent_class parent_class
G_DEFINE_TYPE (GstSubParse, gst_sub_parse, GST_TYPE_ELEMENT);
gst_event_unref (event);
goto beach;
}
-
#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
+ if (!gst_sub_parse_check_byte_seekability(self)) {
+ ret = gst_pad_event_default (pad, parent, event);
+ gst_event_unref (event);
+ break;
+ }
+
SUBPARSE_SEEK_LOCK (self);
#endif
/* Convert that seek to a seeking in bytes at position 0,
return ret;
}
+#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
+static gboolean
+gst_sub_parse_check_byte_seekability (GstSubParse * subparse)
+{
+ GstQuery *query;
+ gboolean seekable = FALSE;
+
+ query = gst_query_new_seeking (GST_FORMAT_BYTES);
+
+ if (gst_pad_peer_query (subparse->sinkpad, query)) {
+ gst_query_parse_seeking (query, NULL, &seekable, NULL, NULL);
+ } else {
+ GST_DEBUG_OBJECT (subparse, "seeking query failed");
+ }
+
+ gst_query_unref (query);
+
+ GST_INFO_OBJECT (subparse, "byte seekable: %d", seekable);
+
+ return seekable;
+}
+#endif
+
static void
gst_sub_parse_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)