diff options
author | Thiago Santos <thiago.sousa.santos@collabora.com> | 2013-07-03 12:30:28 -0300 |
---|---|---|
committer | Thiago Santos <thiago.sousa.santos@collabora.com> | 2013-07-03 15:34:41 -0300 |
commit | 788757dc1f4aaa87bc2aac1b9e6539fd534dbfaa (patch) | |
tree | 7a420d21c5be2f9203d9327c18afc7a0a3a607aa /ext | |
parent | 5ad2a2d161aad6dc64db53aa5c10daf6ed3d74b4 (diff) |
dashdemux: various cleanups
Removing unused function, replacing // comments with /* */ and
replacing some GST_WARNING with GST_INFO/_DEBUG as they are meant
to be
Diffstat (limited to 'ext')
-rw-r--r-- | ext/dash/gstdashdemux.c | 11 | ||||
-rw-r--r-- | ext/dash/gstmpdparser.c | 27 | ||||
-rw-r--r-- | ext/dash/gstmpdparser.h | 2 |
3 files changed, 10 insertions, 30 deletions
diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c index f5416b38b8..6824f4bc4c 100644 --- a/ext/dash/gstdashdemux.c +++ b/ext/dash/gstdashdemux.c @@ -489,7 +489,7 @@ gst_dash_demux_src_event (GstPad * pad, GstObject * parent, GstEvent * event) GSList *iter; gboolean update; - GST_WARNING_OBJECT (demux, "Received seek event"); + GST_INFO_OBJECT (demux, "Received seek event"); if (gst_mpd_client_is_live (demux->client)) { GST_WARNING_OBJECT (demux, "Received seek event for live stream"); @@ -581,8 +581,8 @@ gst_dash_demux_src_event (GstPad * pad, GstObject * parent, GstEvent * event) list = g_list_next (list)) { chunk = list->data; current_pos = chunk->start_time; - //current_sequence = chunk->number; - GST_WARNING_OBJECT (demux, "current_pos:%" GST_TIME_FORMAT + /* current_sequence = chunk->number; */ + GST_DEBUG_OBJECT (demux, "current_pos:%" GST_TIME_FORMAT " <= target_pos:%" GST_TIME_FORMAT " duration:%" GST_TIME_FORMAT, GST_TIME_ARGS (current_pos), GST_TIME_ARGS (target_pos), GST_TIME_ARGS (chunk->duration)); @@ -932,7 +932,7 @@ gst_dash_demux_src_query (GstPad * pad, GstObject * parent, GstQuery * query) break; } default:{ - // By default, do not forward queries upstream + /* By default, do not forward queries upstream */ break; } } @@ -1966,8 +1966,7 @@ gst_dash_demux_get_next_fragment (GstDashDemux * demux) GstBuffer *buffer; GstMediaFragmentInfo fragment; - if (gst_mpd_client_get_next_fragment (demux->client, - stream_idx, &fragment)) { + if (gst_mpd_client_get_next_fragment (demux->client, stream_idx, &fragment)) { g_get_current_time (&start); GST_INFO_OBJECT (demux, "Next fragment for stream #%i", stream_idx); diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c index 39e14cacce..e9fb433fda 100644 --- a/ext/dash/gstmpdparser.c +++ b/ext/dash/gstmpdparser.c @@ -64,8 +64,7 @@ static gboolean gst_mpdparser_get_xml_prop_cond_uint (xmlNode * a_node, static gboolean gst_mpdparser_get_xml_prop_dateTime (xmlNode * a_node, const gchar * property_name, GstDateTime ** property_value); static gboolean gst_mpdparser_get_xml_prop_duration (xmlNode * a_node, - const gchar * property_name, gint64 default_value, - gint64 * property_value); + const gchar * property_name, gint64 default_value, gint64 * property_value); static gboolean gst_mpdparser_get_xml_node_content (xmlNode * a_node, gchar ** content); static gchar *gst_mpdparser_get_xml_node_namespace (xmlNode * a_node, @@ -1978,8 +1977,8 @@ gst_mpdparser_get_adapt_set_with_mimeType_and_idx (GList * AdaptationSets, if (AdaptationSets == NULL) return NULL; - // FIXME Use ContentComponent to determine if this adaptation set contains - // the content type we're looking for. + /* FIXME Use ContentComponent to determine if this adaptation set contains + * the content type we're looking for. */ for (list = g_list_first (AdaptationSets); list; list = g_list_next (list)) { adapt_set = (GstAdaptationSetNode *) list->data; if (adapt_set) { @@ -3221,7 +3220,8 @@ gst_mpd_client_setup_representation (GstMpdClient * client, } /* check duration of last segment */ - last_media_segment = stream->segments ? g_list_last (stream->segments)->data : NULL; + last_media_segment = + stream->segments ? g_list_last (stream->segments)->data : NULL; if (last_media_segment && GST_CLOCK_TIME_IS_VALID (PeriodEnd)) { if (last_media_segment->start_time + last_media_segment->duration > PeriodEnd) { @@ -3858,23 +3858,6 @@ gst_mpd_client_get_next_header_index (GstMpdClient * client, gchar ** uri, } GstClockTime -gst_mpd_client_get_current_position (GstMpdClient * client) -{ - GstActiveStream *stream; - GstMediaSegment *media_segment; - - stream = g_list_nth_data (client->active_streams, client->stream_idx); - g_return_val_if_fail (stream != NULL, GST_CLOCK_TIME_NONE); - - media_segment = - g_list_nth_data (stream->segments, - gst_mpd_client_get_segment_index (stream)); - g_return_val_if_fail (media_segment != NULL, GST_CLOCK_TIME_NONE); - - return media_segment->start_time; -} - -GstClockTime gst_mpd_client_get_next_fragment_duration (GstMpdClient * client, GstActiveStream * stream) { diff --git a/ext/dash/gstmpdparser.h b/ext/dash/gstmpdparser.h index 0d8d8d9b9a..f0f8f4c914 100644 --- a/ext/dash/gstmpdparser.h +++ b/ext/dash/gstmpdparser.h @@ -465,7 +465,6 @@ struct _GstMpdClient guint period_idx; /* index of current Period */ GList *active_streams; /* list of GstActiveStream */ - guint stream_idx; /* currently active stream */ guint update_failed_count; gchar *mpd_uri; /* manifest file URI */ @@ -485,7 +484,6 @@ gboolean gst_mpd_parse (GstMpdClient *client, const gchar *data, gint size); gboolean gst_mpd_client_setup_media_presentation (GstMpdClient *client); gboolean gst_mpd_client_setup_streaming (GstMpdClient *client, GstStreamMimeType mimeType, const gchar* lang); gboolean gst_mpd_client_setup_representation (GstMpdClient *client, GstActiveStream *stream, GstRepresentationNode *representation); -GstClockTime gst_mpd_client_get_current_position (GstMpdClient *client); GstClockTime gst_mpd_client_get_next_fragment_duration (GstMpdClient * client, GstActiveStream * stream); GstClockTime gst_mpd_client_get_media_presentation_duration (GstMpdClient *client); gboolean gst_mpd_client_get_last_fragment_timestamp (GstMpdClient * client, guint stream_idx, GstClockTime * ts); |