dashdemux: various cleanups

Removing unused function, replacing // comments with /* */ and
replacing some GST_WARNING with GST_INFO/_DEBUG as they are meant
to be
This commit is contained in:
Thiago Santos 2013-07-03 12:30:28 -03:00
parent 5ad2a2d161
commit 788757dc1f
3 changed files with 10 additions and 30 deletions

View file

@ -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);

View file

@ -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) {
@ -3857,23 +3857,6 @@ gst_mpd_client_get_next_header_index (GstMpdClient * client, gchar ** uri,
return *uri == NULL ? FALSE : TRUE;
}
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)

View file

@ -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);