Commit 3faa2bdb authored by Laurent Aimar's avatar Laurent Aimar

*all : multi-pass clean up/cosmetics.

parent 76ae0951
This diff is collapsed.
......@@ -2,7 +2,7 @@
* avi.h : AVI file Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: avi.h,v 1.12 2003/08/22 20:31:47 fenrir Exp $
* $Id: avi.h,v 1.13 2003/08/22 22:52:48 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -88,9 +88,6 @@ struct demux_sys_t
unsigned int i_streams;
avi_stream_t **pp_info;
#ifdef __AVI_SUBTITLE__
subtitle_demux_t *p_sub;
#endif
};
......@@ -2,7 +2,7 @@
* libavi.c :
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: libavi.c,v 1.23 2003/08/22 20:31:47 fenrir Exp $
* $Id: libavi.c,v 1.24 2003/08/22 22:52:48 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -44,8 +44,6 @@ static vlc_fourcc_t GetFOURCC( byte_t *p_buff )
#define AVI_ChunkFree( a, b ) _AVI_ChunkFree( (a), (avi_chunk_t*)(b) )
void _AVI_ChunkFree( stream_t *, avi_chunk_t *p_chk );
/****************************************************************************
*
* Basics functions to manipulates chunks
......@@ -767,7 +765,46 @@ void _AVI_ChunkFree( stream_t *s,
return;
}
static void AVI_ChunkDumpDebug( stream_t *, avi_chunk_t *);
static void AVI_ChunkDumpDebug_level( vlc_object_t *p_obj,
avi_chunk_t *p_chk, int i_level )
{
char str[1024];
int i;
avi_chunk_t *p_child;
memset( str, ' ', sizeof( str ) );
for( i = 1; i < i_level; i++ )
{
str[i * 5] = '|';
}
if( p_chk->common.i_chunk_fourcc == AVIFOURCC_RIFF||
p_chk->common.i_chunk_fourcc == AVIFOURCC_LIST )
{
sprintf( str + i_level * 5,
"%c %4.4s-%4.4s size:"I64Fu" pos:"I64Fu,
i_level ? '+' : '*',
(char*)&p_chk->common.i_chunk_fourcc,
(char*)&p_chk->list.i_type,
p_chk->common.i_chunk_size,
p_chk->common.i_chunk_pos );
}
else
{
sprintf( str + i_level * 5,
"+ %4.4s size:"I64Fu" pos:"I64Fu,
(char*)&p_chk->common.i_chunk_fourcc,
p_chk->common.i_chunk_size,
p_chk->common.i_chunk_pos );
}
msg_Dbg( p_obj, "%s", str );
p_child = p_chk->common.p_first;
while( p_child )
{
AVI_ChunkDumpDebug_level( p_obj, p_child, i_level + 1 );
p_child = p_child->common.p_next;
}
}
int AVI_ChunkReadRoot( stream_t *s, avi_chunk_t *p_root )
{
......@@ -816,7 +853,7 @@ int AVI_ChunkReadRoot( stream_t *s, avi_chunk_t *p_root )
}
}
AVI_ChunkDumpDebug( s, p_root );
AVI_ChunkDumpDebug_level( (vlc_object_t*)s, p_root, 0 );
return VLC_SUCCESS;
}
......@@ -881,50 +918,4 @@ void *_AVI_ChunkFind( avi_chunk_t *p_chk,
return NULL;
}
static void AVI_ChunkDumpDebug_level( vlc_object_t *p_obj,
avi_chunk_t *p_chk, int i_level )
{
char str[1024];
int i;
avi_chunk_t *p_child;
memset( str, ' ', sizeof( str ) );
for( i = 1; i < i_level; i++ )
{
str[i * 5] = '|';
}
if( p_chk->common.i_chunk_fourcc == AVIFOURCC_RIFF||
p_chk->common.i_chunk_fourcc == AVIFOURCC_LIST )
{
sprintf( str + i_level * 5,
"%c %4.4s-%4.4s size:"I64Fu" pos:"I64Fu,
i_level ? '+' : '*',
(char*)&p_chk->common.i_chunk_fourcc,
(char*)&p_chk->list.i_type,
p_chk->common.i_chunk_size,
p_chk->common.i_chunk_pos );
}
else
{
sprintf( str + i_level * 5,
"+ %4.4s size:"I64Fu" pos:"I64Fu,
(char*)&p_chk->common.i_chunk_fourcc,
p_chk->common.i_chunk_size,
p_chk->common.i_chunk_pos );
}
msg_Dbg( p_obj, "%s", str );
p_child = p_chk->common.p_first;
while( p_child )
{
AVI_ChunkDumpDebug_level( p_obj, p_child, i_level + 1 );
p_child = p_child->common.p_next;
}
}
static void AVI_ChunkDumpDebug( stream_t *s, avi_chunk_t *p_chk )
{
AVI_ChunkDumpDebug_level( (vlc_object_t*)s, p_chk, 0 );
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment