# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
#include <vlc_demux.h>
#include <vlc_vout.h> /* vout_InitFormat */
vlc_module_begin();
set_shortname( "Raw Video" );
- set_description( _("Raw video demuxer") );
- set_capability( "demux2", 10 );
+ set_description( N_("Raw video demuxer") );
+ set_capability( "demux", 10 );
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_DEMUX );
set_callbacks( Open, Close );
add_shortcut( "rawvideo" );
- add_float( "rawvid-fps", 0, 0, FPS_TEXT, FPS_LONGTEXT, VLC_FALSE );
+ add_float( "rawvid-fps", 0, 0, FPS_TEXT, FPS_LONGTEXT, false );
add_integer( "rawvid-width", 0, 0, WIDTH_TEXT, WIDTH_LONGTEXT, 0 );
add_integer( "rawvid-height", 0, 0, HEIGHT_TEXT, HEIGHT_LONGTEXT, 0 );
add_string( "rawvid-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT,
- VLC_TRUE );
+ true );
add_string( "rawvid-aspect-ratio", NULL, NULL,
- ASPECT_RATIO_TEXT, ASPECT_RATIO_LONGTEXT, VLC_TRUE );
+ ASPECT_RATIO_TEXT, ASPECT_RATIO_LONGTEXT, true );
vlc_module_end();
/*****************************************************************************
mtime_t i_pcr;
- vlc_bool_t b_y4m;
+ bool b_y4m;
};
/*****************************************************************************
unsigned int i_aspect = 0;
struct preset_t *p_preset = NULL;
const uint8_t *p_peek;
- vlc_bool_t b_valid = VLC_FALSE;
- vlc_bool_t b_y4m = VLC_FALSE;
+ bool b_valid = false;
+ bool b_y4m = false;
if( stream_Peek( p_demux->s, &p_peek, 9 ) == 9 )
{
/* http://wiki.multimedia.cx/index.php?title=YUV4MPEG2 */
if( !strncmp( (char *)p_peek, "YUV4MPEG2", 9 ) )
{
- b_valid = VLC_TRUE;
- b_y4m = VLC_TRUE;
+ b_valid = true;
+ b_y4m = true;
}
}
for( p_preset = p_presets; *p_preset->psz_ext; p_preset++ )
if( !strcasecmp( psz_ext, p_preset->psz_ext ) )
{
- b_valid = VLC_TRUE;
+ b_valid = true;
break;
}
}
p_demux->pf_control = Control;
p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) );
if( !p_sys )
- return VLC_EGENERIC;
+ return VLC_ENOMEM;
p_sys->i_pcr = 1;
{
char *psz;
char *buf;
- int a, b;
+ int a = 1;
+ int b = 1;
psz = stream_ReadLine( p_demux->s );
/* TODO: handle interlacing */
{
psz_chroma = strdup( "I444" );
}
- else if( !strncmp( buf, "mono", 3 ) )
+ else if( !strncmp( buf, "mono", 4 ) )
{
psz_chroma = strdup( "GREY" );
}
p_block->i_dts = p_block->i_pts = p_sys->i_pcr;
es_out_Send( p_demux->out, p_sys->p_es_video, p_block );
- p_sys->i_pcr += ( I64C(1000000) / p_sys->f_fps );
+ p_sys->i_pcr += ( INT64_C(1000000) / p_sys->f_fps );
return 1;
}
demux_sys_t *p_sys = p_demux->p_sys;
/* XXX: DEMUX_SET_TIME is precise here */
- return demux2_vaControlHelper( p_demux->s, 0, -1,
+ return demux_vaControlHelper( p_demux->s, 0, -1,
p_sys->frame_size * p_sys->f_fps * 8,
p_sys->frame_size, i_query, args );
}