/* TODO: add OpenDML write support */
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
#include <vlc_sout.h>
#include <vlc_block.h>
#include <vlc_codecs.h>
static void Close ( vlc_object_t * );
vlc_module_begin();
- set_description( _("AVI muxer") );
+ set_description( N_("AVI muxer") );
set_category( CAT_SOUT );
set_subcategory( SUBCAT_SOUT_MUX );
set_capability( "sout mux", 5 );
struct sout_mux_sys_t
{
- vlc_bool_t b_write_header;
+ bool b_write_header;
int i_streams;
int i_stream_video;
p_sys->idx1.i_entry_max = 10000;
p_sys->idx1.entry = calloc( p_sys->idx1.i_entry_max,
sizeof( avi_idx1_entry_t ) );
- p_sys->b_write_header = VLC_TRUE;
+ p_sys->b_write_header = true;
p_mux->pf_control = Control;
(uint64_t)p_stream->i_totalsize /
(uint64_t)p_stream->i_duration;
}
- msg_Info( p_mux, "stream[%d] duration:"I64Fd" totalsize:"I64Fd
+ msg_Info( p_mux, "stream[%d] duration:%"PRId64" totalsize:%"PRId64
" frames:%d fps:%f kb/s:%d",
i_stream,
(int64_t)p_stream->i_duration / (int64_t)1000000,
static int Control( sout_mux_t *p_mux, int i_query, va_list args )
{
- vlc_bool_t *pb_bool;
+ VLC_UNUSED(p_mux);
+ bool *pb_bool;
char **ppsz;
switch( i_query )
{
case MUX_CAN_ADD_STREAM_WHILE_MUXING:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
- *pb_bool = VLC_FALSE;
+ pb_bool = (bool*)va_arg( args, bool * );
+ *pb_bool = false;
return VLC_SUCCESS;
case MUX_GET_ADD_STREAM_WAIT:
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
- *pb_bool = VLC_TRUE;
+ pb_bool = (bool*)va_arg( args, bool * );
+ *pb_bool = true;
return VLC_SUCCESS;
case MUX_GET_MIME:
{
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_hdr = avi_HeaderCreateRIFF( p_mux );
sout_AccessOutWrite( p_mux->p_access, p_hdr );
- p_sys->b_write_header = VLC_FALSE;
+ p_sys->b_write_header = false;
}
for( i = 0; i < p_mux->i_nb_inputs; i++ )
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;