Commit f1588c97 authored by Clément Stenac's avatar Clément Stenac

Fortune

parent 8865c5c7
......@@ -642,3 +642,9 @@ VLC is the greatest thing since sliced bread!
-- http://forum.videolan.org/
%
* E-bola is bouncing up and down while enjoying: HTTP/1.1 200 OK
* E-bola is bouncing up and down while enjoying: Content-type: text/html; charset=UTF-8
* E-bola is bouncing up and down while enjoying: Cache-Control: no-cache
* E-bola is bouncing up and down while enjoying: Content-Length: 25
* E-bola is bouncing up and down while enjoying: --
%
......@@ -664,6 +664,8 @@ static int DemuxInit( demux_t *p_demux )
es_format_Init( &fmt, AUDIO_ES, 0 );
i_format = GetWLE( &p_data[0] );
fprintf( stderr, "Wave format %i\n", i_format );
wf_tag_to_fourcc( i_format, &fmt.i_codec, NULL );
fmt.audio.i_channels = GetWLE( &p_data[2] );
fmt.audio.i_rate = GetDWLE( &p_data[4] );
......
static int i_global = 0, i_passed = 0, i_written = 0;
/*****************************************************************************
* asf.c: asf muxer module for vlc
*****************************************************************************
......@@ -583,6 +584,8 @@ static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
static int Mux( sout_mux_t *p_mux )
{
sout_mux_sys_t *p_sys = p_mux->p_sys;
i_global++;
fprintf( stderr, "Called %i\n", i_global );
if( p_sys->b_write_header )
{
......@@ -608,6 +611,8 @@ static int Mux( sout_mux_t *p_mux )
/* not enough data */
return VLC_SUCCESS;
}
i_passed++;
fprintf( stderr, "Passed %i\n", i_passed );
if( p_sys->i_dts_first < 0 )
{
......@@ -625,6 +630,8 @@ static int Mux( sout_mux_t *p_mux )
if( ( pk = asf_packet_create( p_mux, tk, data ) ) )
{
i_written ++;
fprintf( stderr, "Written %i\n", i_written );
sout_AccessOutWrite( p_mux->p_access, pk );
}
}
......
static int i_global = 0;
/*****************************************************************************
* avi.c
*****************************************************************************
......@@ -110,7 +111,7 @@ struct sout_mux_sys_t
};
// FIXME FIXME
#define HDR_SIZE 10240
#define HDR_SIZE 4096
/* Flags in avih */
#define AVIF_HASINDEX 0x00000010 // Index at end of file?
......@@ -404,6 +405,7 @@ static int Mux ( sout_mux_t *p_mux )
avi_stream_t *p_stream;
int i_stream;
int i;
i_global++;
if( p_sys->b_write_header )
{
......@@ -474,7 +476,6 @@ static int Mux ( sout_mux_t *p_mux )
{
p_data = block_Realloc( p_data, 0, p_data->i_buffer + 1 );
}
p_sys->i_movi_size += p_data->i_buffer;
sout_AccessOutWrite( p_mux->p_access, p_data );
}
......@@ -763,9 +764,9 @@ static int avi_HeaderAdd_strf( sout_mux_t *p_mux,
bo_AddDWordLE( p_bo, p_stream->p_bih->biYPelsPerMeter );
bo_AddDWordLE( p_bo, p_stream->p_bih->biClrUsed );
bo_AddDWordLE( p_bo, p_stream->p_bih->biClrImportant );
bo_AddMem( p_bo,
p_stream->p_bih->biSize - sizeof( BITMAPINFOHEADER ),
(uint8_t*)&p_stream->p_bih[1] );
// bo_AddMem( p_bo,
// p_stream->p_bih->biSize - sizeof( BITMAPINFOHEADER ),
// (uint8_t*)&p_stream->p_bih[1] );
break;
}
......@@ -791,32 +792,38 @@ static block_t *avi_HeaderCreateRIFF( sout_mux_t *p_mux )
int i_stream;
int i_maxbytespersec;
int i_junk;
buffer_out_t bo;
buffer_out_t bo, bo_save;
p_hdr = block_New( p_mux, HDR_SIZE );
memset( p_hdr->p_buffer, 0, HDR_SIZE );
/* Real header + LIST-movi */
p_hdr = block_New( p_mux, HDR_SIZE + 12 );
memset( p_hdr->p_buffer, 0, HDR_SIZE + 12 );
bo_Init( &bo, HDR_SIZE, p_hdr->p_buffer );
bo_Init( &bo, HDR_SIZE + 12, p_hdr->p_buffer );
bo_AddFCC( &bo, "RIFF" );
bo_AddDWordLE( &bo, p_sys->i_movi_size + HDR_SIZE - 8 + p_sys->i_idx1_size );
bo_AddDWordLE( &bo, p_sys->i_movi_size + HDR_SIZE + p_sys->i_idx1_size );
bo_AddFCC( &bo, "AVI " );
bo_AddFCC( &bo, "LIST" );
bo_AddDWordLE( &bo, HDR_SIZE - 8);
memcpy( &bo_save, &bo, sizeof( buffer_out_t ) );
bo_AddDWordLE( &bo, 0 );
bo_AddFCC( &bo, "hdrl" );
avi_HeaderAdd_avih( p_mux, &bo );
for( i_stream = 0,i_maxbytespersec = 0; i_stream < p_sys->i_streams; i_stream++ )
for( i_stream = 0, i_maxbytespersec = 0; i_stream < p_sys->i_streams;
i_stream++ )
{
avi_HeaderAdd_strl( p_mux, &bo, &p_sys->stream[i_stream] );
}
i_junk = HDR_SIZE - bo.i_buffer - 8 - 12;
bo_AddDWordLE( &bo_save, bo.i_buffer - bo_save.i_buffer - 4 );
i_junk = HDR_SIZE - bo.i_buffer - 8;
bo_AddFCC( &bo, "JUNK" );
bo_AddDWordLE( &bo, i_junk );
bo.i_buffer += i_junk;
fprintf( stderr, "Writing list-movi at %i\n", bo.i_buffer );
bo_AddFCC( &bo, "LIST" );
bo_AddDWordLE( &bo, p_sys->i_movi_size + 4 );
bo_AddFCC( &bo, "movi" );
......
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