#include <vlc_common.h>
#include <vlc_plugin.h>
+#include <vlc_charset.h>
#include <errno.h>
#include <stdlib.h> /* free() */
p_intf->p_sys->fmt_out.i_chroma;
if( config_GetInt( p_intf, "freetype-yuvp" ) )
p_intf->p_sys->p_blend->fmt_in.video.i_chroma =
- VLC_FOURCC('Y','U','V','P');
+ VLC_CODEC_YUVP;
else
p_intf->p_sys->p_blend->fmt_in.video.i_chroma =
- VLC_FOURCC('Y','U','V','A');
+ VLC_CODEC_YUVA;
p_intf->p_sys->p_blend->p_module =
module_need( p_intf->p_sys->p_blend, "video blending", NULL, false );
return NULL;
if( !p_fmt->p_palette &&
- ( p_fmt->i_chroma == VLC_FOURCC('Y','U','V','P') ) )
+ ( p_fmt->i_chroma == VLC_CODEC_YUVP ) )
{
p_fmt->p_palette = malloc( sizeof(video_palette_t) );
if( !p_fmt->p_palette )
switch( fmt.i_chroma )
{
- case VLC_FOURCC('R','V','2','4'):
+ case VLC_CODEC_RGB24:
p_begin = (uint8_t *)(*p_pic)->p[Y_PLANE].p_pixels;
p_end = (uint8_t *)(*p_pic)->p[Y_PLANE].p_pixels +
( fmt.i_height * (*p_pic)->p[Y_PLANE].i_pitch );
i_skip = 3;
break;
- case VLC_FOURCC('R','V','3','2'):
+ case VLC_CODEC_RGB32:
p_begin = (uint8_t *)(*p_pic)->p[Y_PLANE].p_pixels;
p_end = (uint8_t *)(*p_pic)->p[Y_PLANE].p_pixels +
( fmt.i_height * (*p_pic)->p[Y_PLANE].i_pitch );
video_format_t fmt;
memset( &fmt, 0, sizeof(fmt) );
- fmt.i_chroma = VLC_FOURCC('T','E','X','T');
+ fmt.i_chroma = VLC_CODEC_TEXT;
fmt.i_aspect = 0;
fmt.i_width = fmt.i_visible_width = 0;
fmt.i_height = fmt.i_visible_height = 0;
switch( p_sys->var_info.bits_per_pixel )
{
case 8: /* FIXME: set the palette */
- p_sys->fmt_out.i_chroma = VLC_FOURCC('R','G','B','2'); break;
+ p_sys->fmt_out.i_chroma = VLC_CODEC_RGB8; break;
case 15:
- p_sys->fmt_out.i_chroma = VLC_FOURCC('R','V','1','5'); break;
+ p_sys->fmt_out.i_chroma = VLC_CODEC_RGB15; break;
case 16:
- p_sys->fmt_out.i_chroma = VLC_FOURCC('R','V','1','6'); break;
+ p_sys->fmt_out.i_chroma = VLC_CODEC_RGB16; break;
case 24:
- p_sys->fmt_out.i_chroma = VLC_FOURCC('R','V','2','4'); break;
+ p_sys->fmt_out.i_chroma = VLC_CODEC_RGB24; break;
case 32:
- p_sys->fmt_out.i_chroma = VLC_FOURCC('R','V','3','2'); break;
+ p_sys->fmt_out.i_chroma = VLC_CODEC_RGB32; break;
default:
msg_Err( p_intf, "unknown screen depth %i",
p_sys->var_info.bits_per_pixel );
return VLC_EGENERIC;
}
- p_sys->i_fd = open( psz_device, O_RDWR );
+ p_sys->i_fd = utf8_open( psz_device, O_RDWR );
if( p_sys->i_fd == -1 )
{
- msg_Err( p_intf, "cannot open %s (%s)", psz_device, strerror(errno) );
+ msg_Err( p_intf, "cannot open %s (%m)", psz_device );
free( psz_device );
return VLC_EGENERIC;
}
/* Get framebuffer device information */
if( ioctl( p_sys->i_fd, FBIOGET_VSCREENINFO, &p_sys->var_info ) )
{
- msg_Err( p_intf, "cannot get fb info (%s)", strerror(errno) );
+ msg_Err( p_intf, "cannot get fb info (%m)" );
close( p_sys->i_fd );
return VLC_EGENERIC;
}