From: Stefan Sauer Date: Thu, 9 Jan 2014 07:18:07 +0000 (+0100) Subject: aiffparse: misc code cleanups X-Git-Tag: 1.19.3~507^2~12768 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dc2778734bef10340f3f476c44fd842edf95bc3a;p=platform%2Fupstream%2Fgstreamer.git aiffparse: misc code cleanups Fix the launch examples for 1.0. Turn more logging into _OBJECT variants. --- diff --git a/gst/aiff/aiffparse.c b/gst/aiff/aiffparse.c index 37febe6..1e987bf 100644 --- a/gst/aiff/aiffparse.c +++ b/gst/aiff/aiffparse.c @@ -29,8 +29,8 @@ * Parse a .aiff file into raw or compressed audio. * * - * AIFFparse supports both push and pull mode operations, making it possible to - * stream from a network source. + * The aiffparse element supports both push and pull mode operations, making it + * possible to stream from a network source. * * Example launch line * @@ -42,7 +42,7 @@ * * * - * gst-launch gnomevfssrc location=http://www.example.org/sine.aiff ! queue ! aiffparse ! audioconvert ! alsasink + * gst-launch souphhtpsrc location=http://www.example.org/sine.aiff ! queue ! aiffparse ! audioconvert ! alsasink * * Stream data from a network url. * @@ -549,7 +549,8 @@ gst_aiff_parse_peek_chunk_info (GstAiffParse * aiff, guint32 * tag, *size = GST_READ_UINT32_BE (data + 4); gst_adapter_unmap (aiff->adapter); - GST_DEBUG ("Next chunk size is %d bytes, type %" GST_FOURCC_FORMAT, *size, + GST_DEBUG_OBJECT (aiff, + "Next chunk size is %d bytes, type %" GST_FOURCC_FORMAT, *size, GST_FOURCC_ARGS (*tag)); return TRUE; @@ -574,14 +575,14 @@ gst_aiff_parse_peek_chunk (GstAiffParse * aiff, guint32 * tag, guint32 * size) if (!gst_aiff_parse_peek_chunk_info (aiff, tag, size)) return FALSE; - GST_DEBUG ("Need to peek chunk of %d bytes", *size); + GST_DEBUG_OBJECT (aiff, "Need to peek chunk of %d bytes", *size); peek_size = (*size + 1) & ~1; available = gst_adapter_available (aiff->adapter); if (available >= (8 + peek_size)) { return TRUE; } else { - GST_LOG ("but only %u bytes available now", available); + GST_LOG_OBJECT (aiff, "but only %u bytes available now", available); return FALSE; } } @@ -631,7 +632,7 @@ gst_aiff_parse_ignore_chunk (GstAiffParse * aiff, guint32 tag, guint32 size) if (!gst_aiff_parse_peek_chunk (aiff, &tag, &size)) return; } - GST_DEBUG_OBJECT (aiff, "Ignoring tag %" GST_FOURCC_FORMAT, + GST_WARNING_OBJECT (aiff, "Ignoring tag %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (tag)); flush = 8 + ((size + 1) & ~1); aiff->offset += flush; @@ -1140,7 +1141,7 @@ gst_aiff_parse_parse_stream_init (GstAiffParse * aiff) /* _take flushes the data */ tmp = gst_adapter_take_buffer (aiff->adapter, 12); - GST_DEBUG ("Parsing aiff header"); + GST_DEBUG_OBJECT (aiff, "Parsing aiff header"); if (!gst_aiff_parse_parse_file_header (aiff, tmp)) return GST_FLOW_ERROR;