*****************************************************************************/
/* TODO: add OpenDML write support */
-#include <stdlib.h>
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <vlc/vlc.h>
#include <vlc_sout.h>
static int Control( sout_mux_t *p_mux, int i_query, va_list args )
{
+ VLC_UNUSED(p_mux);
vlc_bool_t *pb_bool;
char **ppsz;
{
sout_mux_sys_t *p_sys = p_mux->p_sys;
avi_stream_t *p_stream;
- int i_stream;
- int i;
+ int i_stream, i;
if( p_sys->b_write_header )
{
p_stream = &p_sys->stream[i_stream];
p_fifo = p_mux->pp_inputs[i]->p_fifo;
- i_count = p_fifo->i_depth;
+ i_count = block_FifoCount( p_fifo );
while( i_count > 1 )
{
avi_idx1_entry_t *p_idx;
block_t *p_data;
p_data = block_FifoGet( p_fifo );
- if( p_fifo->i_depth > 0 )
+ if( block_FifoCount( p_fifo ) > 0 )
{
block_t *p_next = block_FifoShow( p_fifo );
p_data->i_length = p_next->i_dts - p_data->i_dts;
}
#endif
-static void bo_AddFCC( buffer_out_t *p_bo, char *fcc )
+static void bo_AddFCC( buffer_out_t *p_bo, const char *fcc )
{
bo_AddByte( p_bo, fcc[0] );
bo_AddByte( p_bo, fcc[1] );
AVI_BOX_EXIT( 0 );
}
-static int avi_HeaderAdd_strh( sout_mux_t *p_mux,
- buffer_out_t *p_bo,
- avi_stream_t *p_stream )
+static int avi_HeaderAdd_strh( buffer_out_t *p_bo, avi_stream_t *p_stream )
{
AVI_BOX_ENTER( "strh" );
AVI_BOX_EXIT( 0 );
}
-static int avi_HeaderAdd_strf( sout_mux_t *p_mux,
- buffer_out_t *p_bo,
- avi_stream_t *p_stream )
+static int avi_HeaderAdd_strf( buffer_out_t *p_bo, avi_stream_t *p_stream )
{
AVI_BOX_ENTER( "strf" );
AVI_BOX_EXIT( 0 );
}
-static int avi_HeaderAdd_strl( sout_mux_t *p_mux,
- buffer_out_t *p_bo,
- avi_stream_t *p_stream )
+static int avi_HeaderAdd_strl( buffer_out_t *p_bo, avi_stream_t *p_stream )
{
AVI_BOX_ENTER_LIST( "strl" );
- avi_HeaderAdd_strh( p_mux, p_bo, p_stream );
- avi_HeaderAdd_strf( p_mux, p_bo, p_stream );
+ avi_HeaderAdd_strh( p_bo, p_stream );
+ avi_HeaderAdd_strf( p_bo, p_stream );
AVI_BOX_EXIT( 0 );
}
avi_HeaderAdd_avih( p_mux, &bo );
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] );
+ avi_HeaderAdd_strl( &bo, &p_sys->stream[i_stream] );
}
i_junk = HDR_SIZE - bo.i_buffer - 8 - 12;