GstMessage * message);
static void finish_unprepare (GstRTSPMedia * media);
static gboolean default_unprepare (GstRTSPMedia * media);
-static gboolean
-default_convert_range (GstRTSPMedia * media, GstRTSPTimeRange * range,
- GstRTSPRangeUnit unit);
+static gboolean default_convert_range (GstRTSPMedia * media,
+ GstRTSPTimeRange * range, GstRTSPRangeUnit unit);
static gboolean default_query_position (GstRTSPMedia * media,
gint64 * position);
static gboolean default_query_stop (GstRTSPMedia * media, gint64 * stop);
}
}
+static gboolean
+default_query_position (GstRTSPMedia * media, gint64 * position)
+{
+ return gst_element_query_position (media->priv->pipeline, GST_FORMAT_TIME,
+ position);
+}
+
+static gboolean
+default_query_stop (GstRTSPMedia * media, gint64 * stop)
+{
+ GstQuery *query;
+ gboolean res;
+
+ query = gst_query_new_segment (GST_FORMAT_TIME);
+ if ((res = gst_element_query (media->priv->pipeline, query))) {
+ GstFormat format;
+ gst_query_parse_segment (query, NULL, &format, NULL, stop);
+ if (format != GST_FORMAT_TIME)
+ *stop = -1;
+ }
+ gst_query_unref (query);
+ return res;
+}
+
/* must be called with state lock */
static void
collect_media_stats (GstRTSPMedia * media)
return res;
}
+/* called with state-lock */
+static gboolean
+default_convert_range (GstRTSPMedia * media, GstRTSPTimeRange * range,
+ GstRTSPRangeUnit unit)
+{
+ return gst_rtsp_range_convert_units (range, unit);
+}
+
/**
* gst_rtsp_media_get_range_string:
* @media: a #GstRTSPMedia
return FALSE;
}
}
-
-/* called with state-lock */
-static gboolean
-default_convert_range (GstRTSPMedia * media, GstRTSPTimeRange * range,
- GstRTSPRangeUnit unit)
-{
- return gst_rtsp_range_convert_units (range, unit);
-}
-
-static gboolean
-default_query_position (GstRTSPMedia * media, gint64 * position)
-{
- return gst_element_query_position (media->priv->pipeline, GST_FORMAT_TIME,
- position);
-}
-
-static gboolean
-default_query_stop (GstRTSPMedia * media, gint64 * stop)
-{
- GstQuery *query;
- gboolean res;
-
- query = gst_query_new_segment (GST_FORMAT_TIME);
- if ((res = gst_element_query (media->priv->pipeline, query))) {
- GstFormat format;
- gst_query_parse_segment (query, NULL, &format, NULL, stop);
- if (format != GST_FORMAT_TIME)
- *stop = -1;
- }
- gst_query_unref (query);
- return res;
-}