#include <vlc_common.h>
#include <vlc_plugin.h>
-#include <vlc_vout.h>
#include <vlc_codec.h>
#include <vlc_sout.h>
vlc_value_t val;
int i_posx, i_posy;
- if( p_dec->fmt_in.i_codec != VLC_FOURCC('d','v','b','s') )
+ if( p_dec->fmt_in.i_codec != VLC_CODEC_DVBS )
{
return VLC_EGENERIC;
}
p_sys->i_spu_y = i_posy;
}
- es_format_Init( &p_dec->fmt_out, SPU_ES, VLC_FOURCC( 'd','v','b','s' ) );
+ p_dec->fmt_out.i_cat = SPU_ES;
+ p_dec->fmt_out.i_codec = 0;
default_clut_init( p_dec );
continue;
}
- /* FIXME: don't create a subpicture region with VLC_FOURCC YUVP
+ /* FIXME: don't create a subpicture region with VLC CODEC YUVP
* when it actually is a TEXT region */
/* Create new SPU region */
memset( &fmt, 0, sizeof(video_format_t) );
- fmt.i_chroma = VLC_FOURCC('Y','U','V','P');
+ fmt.i_chroma = VLC_CODEC_YUVP;
fmt.i_aspect = 0; /* 0 means use aspect ratio of background video */
fmt.i_width = fmt.i_visible_width = p_region->i_width;
fmt.i_height = fmt.i_visible_height = p_region->i_height;
/* Create new SPU region */
memset( &fmt, 0, sizeof(video_format_t) );
- fmt.i_chroma = VLC_FOURCC('T','E','X','T');
+ fmt.i_chroma = VLC_CODEC_TEXT;
fmt.i_aspect = VOUT_ASPECT_FACTOR;
fmt.i_width = fmt.i_visible_width = p_region->i_width;
fmt.i_height = fmt.i_visible_height = p_region->i_height;
encoder_sys_t *p_sys;
vlc_value_t val;
- if( ( p_enc->fmt_out.i_codec != VLC_FOURCC('d','v','b','s') ) &&
+ if( ( p_enc->fmt_out.i_codec != VLC_CODEC_DVBS ) &&
!p_enc->b_force )
{
return VLC_EGENERIC;
p_enc->p_sys = p_sys;
p_enc->pf_encode_sub = Encode;
- p_enc->fmt_out.i_codec = VLC_FOURCC('d','v','b','s');
+ p_enc->fmt_out.i_codec = VLC_CODEC_DVBS;
p_enc->fmt_out.subs.dvb.i_id = 1 << 16 | 1;
config_ChainParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg );
return VLC_SUCCESS;
}
-/* FIXME: this routine is a hack to convert VLC_FOURCC('Y','U','V','A')
- * into VLC_FOURCC('Y','U','V','P')
+/* FIXME: this routine is a hack to convert VLC_CODEC_YUVA
+ * into VLC_CODEC_YUVP
*/
static subpicture_t *YuvaYuvp( subpicture_t *p_subpic )
{
#ifdef DEBUG_DVBSUB
msg_Dbg( p_enc, "YuvaYuvp: i_pixels=%d, i_iterator=%d", i_pixels, i_iterator );
#endif
- p_fmt->i_chroma = VLC_FOURCC('Y','U','V','P');
+ p_fmt->i_chroma = VLC_CODEC_YUVP;
p_fmt->p_palette = (video_palette_t *) malloc( sizeof( video_palette_t ) );
if( !p_fmt->p_palette ) break;
p_fmt->p_palette->i_entries = 0;
if( !p_subpic || !p_subpic->p_region ) return NULL;
- /* FIXME: this is a hack to convert VLC_FOURCC('Y','U','V','A') into
- * VLC_FOURCC('Y','U','V','P')
+ /* FIXME: this is a hack to convert VLC_CODEC_YUVA into
+ * VLC_CODEC_YUVP
*/
p_region = p_subpic->p_region;
- if( p_region->fmt.i_chroma == VLC_FOURCC('Y','U','V','A') )
+ if( p_region->fmt.i_chroma == VLC_CODEC_YUVA )
{
p_temp = YuvaYuvp( p_subpic );
if( !p_temp )
/* Sanity check */
if( !p_region ) return NULL;
- if( ( p_region->fmt.i_chroma != VLC_FOURCC('T','E','X','T') ) &&
- ( p_region->fmt.i_chroma != VLC_FOURCC('Y','U','V','P') ) )
+ if( ( p_region->fmt.i_chroma != VLC_CODEC_TEXT ) &&
+ ( p_region->fmt.i_chroma != VLC_CODEC_YUVP ) )
{
char psz_fourcc[5];
memset( &psz_fourcc, 0, sizeof( psz_fourcc ) );
/* Sanity check */
if( !p_region ) return;
- if( p_region->fmt.i_chroma == VLC_FOURCC('Y','U','V','P') )
+ if( p_region->fmt.i_chroma == VLC_CODEC_YUVP )
{
p_pal = p_region->fmt.p_palette;
}
{
int i_entries = 4, i_depth = 0x1, i_bg = 0;
bool b_text =
- ( p_region->fmt.i_chroma == VLC_FOURCC('T','E','X','T') );
+ ( p_region->fmt.i_chroma == VLC_CODEC_TEXT );
if( !b_text )
{
/* object coding method */
switch( p_region->fmt.i_chroma )
{
- case VLC_FOURCC( 'Y','U','V','P' ):
+ case VLC_CODEC_YUVP:
bs_write( s, 2, 0 );
break;
- case VLC_FOURCC( 'T','E','X','T' ):
+ case VLC_CODEC_TEXT:
bs_write( s, 2, 1 );
break;
default:
bs_write( s, 1, 0 ); /* non modifying color flag */
bs_write( s, 1, 0 ); /* Reserved */
- if( p_region->fmt.i_chroma == VLC_FOURCC( 'T','E','X','T' ) )
+ if( p_region->fmt.i_chroma == VLC_CODEC_TEXT )
{
int i_size, i;
unsigned int i_line;
/* Sanity check */
- if( p_region->fmt.i_chroma != VLC_FOURCC('Y','U','V','P') ) return;
+ if( p_region->fmt.i_chroma != VLC_CODEC_YUVP ) return;
/* Encode line by line */
for( i_line = !b_top; i_line < p_region->fmt.i_visible_height;