mpegaudioparse: Remove empty lines added by buggy indent.

This commit is contained in:
René Stadler 2009-03-04 16:15:00 +02:00
parent d950699d2e
commit be6292d4de

View file

@ -102,26 +102,19 @@ enum
static void gst_mp3parse_class_init (GstMPEGAudioParseClass * klass);
static void gst_mp3parse_base_init (gpointer klass);
static void gst_mp3parse_init (GstMPEGAudioParse * mp3parse,
GstMPEGAudioParseClass * klass);
static gboolean gst_mp3parse_sink_event (GstPad * pad, GstEvent * event);
static GstFlowReturn gst_mp3parse_chain (GstPad * pad, GstBuffer * buffer);
static gboolean mp3parse_src_query (GstPad * pad, GstQuery * query);
static const GstQueryType *mp3parse_get_query_types (GstPad * pad);
static gboolean mp3parse_src_event (GstPad * pad, GstEvent * event);
static int head_check (GstMPEGAudioParse * mp3parse, unsigned long head);
static void gst_mp3parse_dispose (GObject * object);
static void gst_mp3parse_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_mp3parse_get_property (GObject * object, guint prop_id,
@ -143,7 +136,6 @@ static GType
gst_mp3_channel_mode_get_type (void)
{
static GType mp3_channel_mode_type = 0;
static GEnumValue mp3_channel_mode[] = {
{MP3_CHANNEL_MODE_UNKNOWN, "Unknown", "unknown"},
{MP3_CHANNEL_MODE_MONO, "Mono", "mono"},
@ -188,7 +180,6 @@ mp3_type_frame_length_from_header (GstMPEGAudioParse * mp3parse, guint32 header,
gulong mode, samplerate, bitrate, layer, channels, padding, crc;
gulong version;
gint lsf, mpg25;
GEnumValue *mode_enum;
if (header & (1 << 20)) {
@ -297,7 +288,6 @@ static void
gst_mp3parse_class_init (GstMPEGAudioParseClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
gobject_class = (GObjectClass *) klass;
@ -448,9 +438,7 @@ static gboolean
gst_mp3parse_sink_event (GstPad * pad, GstEvent * event)
{
gboolean res = TRUE;
GstMPEGAudioParse *mp3parse;
GstEvent **eventp;
mp3parse = GST_MP3PARSE (gst_pad_get_parent (pad));
@ -459,11 +447,8 @@ gst_mp3parse_sink_event (GstPad * pad, GstEvent * event)
case GST_EVENT_NEWSEGMENT:
{
gdouble rate, applied_rate;
GstFormat format;
gint64 start, stop, pos;
gboolean update;
gst_event_parse_new_segment_full (event, &update, &rate, &applied_rate,
@ -472,7 +457,6 @@ gst_mp3parse_sink_event (GstPad * pad, GstEvent * event)
g_mutex_lock (mp3parse->pending_accurate_seeks_lock);
if (format == GST_FORMAT_BYTES && mp3parse->pending_accurate_seeks) {
MPEGAudioPendingAccurateSeek *seek = NULL;
GSList *node;
for (node = mp3parse->pending_accurate_seeks; node; node = node->next) {
@ -623,13 +607,9 @@ gst_mp3parse_emit_frame (GstMPEGAudioParse * mp3parse, guint size,
guint mode, guint crc)
{
GstBuffer *outbuf;
guint bitrate;
GstFlowReturn ret = GST_FLOW_OK;
GstClockTime push_start;
GstTagList *taglist;
outbuf = gst_adapter_take_buffer (mp3parse->adapter, size);
@ -859,21 +839,15 @@ static void
gst_mp3parse_handle_first_frame (GstMPEGAudioParse * mp3parse)
{
GstTagList *taglist;
gchar *codec;
const guint32 xing_id = 0x58696e67; /* 'Xing' in hex */
const guint32 info_id = 0x496e666f; /* 'Info' in hex - found in LAME CBR files */
const guint32 vbri_id = 0x56425249; /* 'VBRI' in hex */
gint offset;
guint64 avail;
guint32 read_id;
const guint8 *data;
/* Output codec tag */
@ -927,11 +901,8 @@ gst_mp3parse_handle_first_frame (GstMPEGAudioParse * mp3parse)
read_id = GST_READ_UINT32_BE (data);
if (read_id == xing_id || read_id == info_id) {
guint32 xing_flags;
guint bytes_needed = offset + 8;
gint64 total_bytes;
GstClockTime total_time;
GST_DEBUG_OBJECT (mp3parse, "Found Xing header marker 0x%x", xing_id);
@ -999,9 +970,7 @@ gst_mp3parse_handle_first_frame (GstMPEGAudioParse * mp3parse)
if (xing_flags & XING_TOC_FLAG) {
int i, percent = 0;
guchar *table = mp3parse->xing_seek_table;
guchar old = 0;
if (data[0] != 0) {
@ -1029,7 +998,6 @@ gst_mp3parse_handle_first_frame (GstMPEGAudioParse * mp3parse)
mp3parse->xing_seek_table_inverse[i] = percent * 100;
} else if (table[percent] < i && percent < 99) {
gdouble fa, fb, fx;
gint a = percent, b = percent + 1;
fa = table[a];
@ -1038,7 +1006,6 @@ gst_mp3parse_handle_first_frame (GstMPEGAudioParse * mp3parse)
mp3parse->xing_seek_table_inverse[i] = (guint16) (fx * 100);
} else if (percent == 98 && table[percent + 1] <= i) {
gdouble fa, fb, fx;
gint a = percent + 1, b = 100;
fa = table[a];
@ -1066,9 +1033,7 @@ gst_mp3parse_handle_first_frame (GstMPEGAudioParse * mp3parse)
mp3parse->xing_vbr_scale);
} else if (read_id == vbri_id) {
gint64 total_bytes, total_frames;
GstClockTime total_time;
guint16 nseek_points;
GST_DEBUG_OBJECT (mp3parse, "Found VBRI header marker 0x%x", vbri_id);
@ -1123,7 +1088,6 @@ gst_mp3parse_handle_first_frame (GstMPEGAudioParse * mp3parse)
if (nseek_points > 0) {
guint scale, seek_bytes, seek_frames;
gint i;
mp3parse->vbri_seek_points = nseek_points;
@ -1197,17 +1161,11 @@ static GstFlowReturn
gst_mp3parse_chain (GstPad * pad, GstBuffer * buf)
{
GstFlowReturn flow = GST_FLOW_OK;
GstMPEGAudioParse *mp3parse;
const guchar *data;
guint32 header;
int bpf;
guint available;
GstClockTime timestamp;
mp3parse = GST_MP3PARSE (GST_PAD_PARENT (pad));
@ -1286,7 +1244,6 @@ gst_mp3parse_chain (GstPad * pad, GstBuffer * buf)
*************************************************************************/
if (mp3parse->resyncing) {
guint32 header2;
const guint8 *data2;
/* wait until we have the the entire current frame as well as the next
@ -1499,7 +1456,6 @@ static GstStateChangeReturn
gst_mp3parse_change_state (GstElement * element, GstStateChange transition)
{
GstMPEGAudioParse *mp3parse;
GstStateChangeReturn result;
mp3parse = GST_MP3PARSE (element);
@ -1574,7 +1530,6 @@ mp3parse_time_to_bytepos (GstMPEGAudioParse * mp3parse, GstClockTime ts,
gint64 * bytepos)
{
gint64 total_bytes;
GstClockTime total_time;
/* -1 always maps to -1 */
@ -1588,7 +1543,6 @@ mp3parse_time_to_bytepos (GstMPEGAudioParse * mp3parse, GstClockTime ts,
mp3parse_total_bytes (mp3parse, &total_bytes) &&
mp3parse_total_time (mp3parse, &total_time)) {
gdouble fa, fb, fx;
gdouble percent =
CLAMP ((100.0 * gst_util_guint64_to_gdouble (ts)) /
gst_util_guint64_to_gdouble (total_time), 0.0, 100.0);
@ -1611,7 +1565,6 @@ mp3parse_time_to_bytepos (GstMPEGAudioParse * mp3parse, GstClockTime ts,
mp3parse_total_bytes (mp3parse, &total_bytes) &&
mp3parse_total_time (mp3parse, &total_time)) {
gint i, j;
gdouble a, b, fa, fb;
i = gst_util_uint64_scale (ts, mp3parse->vbri_seek_points - 1, total_time);
@ -1653,7 +1606,6 @@ mp3parse_bytepos_to_time (GstMPEGAudioParse * mp3parse,
gint64 bytepos, GstClockTime * ts, gboolean from_total_time)
{
gint64 total_bytes;
GstClockTime total_time;
if (bytepos == -1) {
@ -1671,9 +1623,7 @@ mp3parse_bytepos_to_time (GstMPEGAudioParse * mp3parse,
mp3parse_total_bytes (mp3parse, &total_bytes) &&
mp3parse_total_time (mp3parse, &total_time)) {
gdouble fa, fb, fx;
gdouble pos = CLAMP ((bytepos * 256.0) / total_bytes, 0.0, 256.0);
gint index = CLAMP (pos, 0, 255);
fa = mp3parse->xing_seek_table_inverse[index];
@ -1693,9 +1643,7 @@ mp3parse_bytepos_to_time (GstMPEGAudioParse * mp3parse,
mp3parse_total_bytes (mp3parse, &total_bytes) &&
mp3parse_total_time (mp3parse, &total_time)) {
gint i = 0;
guint64 sum = 0;
gdouble a, b, fa, fb;
@ -1737,15 +1685,10 @@ static gboolean
mp3parse_handle_seek (GstMPEGAudioParse * mp3parse, GstEvent * event)
{
GstFormat format;
gdouble rate;
GstSeekFlags flags;
GstSeekType cur_type, stop_type;
gint64 cur, stop;
gint64 byte_cur, byte_stop;
gst_event_parse_seek (event, &rate, &format, &flags, &cur_type, &cur,
@ -1792,7 +1735,6 @@ mp3parse_handle_seek (GstMPEGAudioParse * mp3parse, GstEvent * event)
start = 0;
} else {
MPEGAudioSeekEntry *entry = NULL, *start_entry = NULL, *stop_entry = NULL;
GList *start_node, *stop_node;
gint64 seek_ts = (cur > mp3parse->max_bitreservoir) ?
(cur - mp3parse->max_bitreservoir) : 0;
@ -1880,7 +1822,6 @@ static gboolean
mp3parse_src_event (GstPad * pad, GstEvent * event)
{
GstMPEGAudioParse *mp3parse = GST_MP3PARSE (gst_pad_get_parent (pad));
gboolean res = FALSE;
g_return_val_if_fail (mp3parse != NULL, FALSE);
@ -1903,13 +1844,9 @@ static gboolean
mp3parse_src_query (GstPad * pad, GstQuery * query)
{
GstFormat format;
GstClockTime total;
GstMPEGAudioParse *mp3parse = GST_MP3PARSE (gst_pad_get_parent (pad));
gboolean res = FALSE;
GstPad *peer;
g_return_val_if_fail (mp3parse != NULL, FALSE);