p_aout->p_sys = malloc( sizeof( aout_sys_t ) );
if( p_aout->p_sys == NULL )
{
- intf_ErrMsg("Alsa Plugin : Could not allocate memory\n");
- intf_ErrMsg("error: %s\n", strerror(ENOMEM) );
+ intf_ErrMsg( "Alsa Plugin : Could not allocate memory" );
+ intf_ErrMsg( "error: %s", strerror(ENOMEM) );
return( 1 );
}
p_aout->p_sys->s_alsa_device.i_num,
SND_PCM_OPEN_PLAYBACK ) ) )
{
- intf_ErrMsg ( "Could not open alsa device; exit = %i\n",
- i_open_returns );
- intf_ErrMsg ( "This means : %s\n\n",snd_strerror(i_open_returns) );
+ intf_ErrMsg ( "Could not open alsa device; exit = %i",
+ i_open_returns );
+ intf_ErrMsg ( "This means : %s", snd_strerror(i_open_returns) );
return ( 1 );
}
- intf_DbgMsg("Alsa plugin : Alsa device successfully opened\n");
+ intf_DbgMsg("Alsa plugin : Alsa device successfully opened");
return ( 0 );
}
if ( i_set_param_returns )
{
- intf_ErrMsg ( "ALSA_PLUGIN : Unable to set parameters; exit = %i\n",
+ intf_ErrMsg ( "ALSA_PLUGIN : Unable to set parameters; exit = %i",
i_set_param_returns );
- intf_ErrMsg( "This means : %s\n\n",
+ intf_ErrMsg( "This means : %s",
snd_strerror( i_set_param_returns ) );
return ( 1 );
}
if ( i_prepare_playback_returns )
{
- intf_ErrMsg ( "ALSA_PLUGIN : Unable to prepare channel : exit = %i\n",
+ intf_ErrMsg ( "ALSA_PLUGIN : Unable to prepare channel : exit = %i",
i_prepare_playback_returns );
- intf_ErrMsg( "This means : %s\n\n",
+ intf_ErrMsg( "This means : %s",
snd_strerror( i_set_param_returns ) );
return ( 1 );
if ( i_playback_go_returns )
{
intf_ErrMsg ( "ALSA_PLUGIN : Unable to prepare channel (bis) :
- exit = %i\n", i_playback_go_returns );
- intf_ErrMsg( "This means : %s\n\n",
+ exit = %i", i_playback_go_returns );
+ intf_ErrMsg( "This means : %s",
snd_strerror( i_set_param_returns ) );
return ( 1 );
}
if ( i_alsa_get_status_returns )
{
- intf_ErrMsg ( "Error getting alsa buffer info; exit=%i\n",
+ intf_ErrMsg ( "Error getting alsa buffer info; exit=%i",
i_alsa_get_status_returns );
- intf_ErrMsg ( "This means : %s \n\n",
+ intf_ErrMsg ( "This means : %s",
snd_strerror ( i_alsa_get_status_returns ) );
return ( 1 );
}
switch (alsa_channel_status.status)
{
- case SND_PCM_STATUS_NOTREADY : intf_ErrMsg("Status NOT READY \n \n");
+ case SND_PCM_STATUS_NOTREADY : intf_ErrMsg("Status NOT READY");
break;
case SND_PCM_STATUS_UNDERRUN : {
int i_prepare_returns;
intf_ErrMsg(
- "Status UNDERRUN ... reseting queue \n \n");
+ "Status UNDERRUN ... reseting queue");
i_prepare_returns =
snd_pcm_playback_prepare(
p_aout->p_sys->p_alsa_handle );
if ( i_prepare_returns )
{
intf_ErrMsg(
- "Error : could not flush : %i\n",
+ "Error : could not flush : %i",
i_prepare_returns);
intf_ErrMsg(
- "This means : %s\n",
+ "This means : %s",
snd_strerror(i_prepare_returns));
}
break;
if ( i_write_returns <= 0 )
{
- intf_ErrMsg ( "Error writing blocks; exit=%i\n", i_write_returns );
- intf_ErrMsg ( "This means : %s\n", snd_strerror( i_write_returns ) );
+ intf_ErrMsg ( "Error writing blocks; exit=%i", i_write_returns );
+ intf_ErrMsg ( "This means : %s", snd_strerror( i_write_returns ) );
}
}
if ( i_close_returns )
{
- intf_ErrMsg( "Error closing alsa device; exit=%i\n",i_close_returns );
- intf_ErrMsg( "This means : %s\n\n",snd_strerror( i_close_returns ) );
+ intf_ErrMsg( "Error closing alsa device; exit=%i",i_close_returns );
+ intf_ErrMsg( "This means : %s",snd_strerror( i_close_returns ) );
}
free(p_aout->p_sys);
- intf_DbgMsg( "Alsa plugin : Alsa device closed\n");
+ intf_DbgMsg( "Alsa plugin : Alsa device closed");
}
p_aout->p_sys = (aout_sys_t*) malloc( sizeof( aout_sys_t ) );
if( p_aout->p_sys == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM) );
+ intf_ErrMsg("error: %s", strerror(ENOMEM) );
return( 1 );
}
if( p_aout->p_sys->p_format == NULL )
{
free( p_aout->p_sys );
- intf_ErrMsg("error: cannot allocate memory for gs_audio_format\n" );
+ intf_ErrMsg("error: cannot allocate memory for gs_audio_format" );
return( 1 );
}
{
free( p_aout->p_sys->p_format );
free( p_aout->p_sys );
- intf_ErrMsg("error: cannot allocate memory for BPushGameSound\n" );
+ intf_ErrMsg("error: cannot allocate memory for BPushGameSound" );
return( 1 );
}
{
free( p_aout->p_sys->p_format );
free( p_aout->p_sys );
- intf_ErrMsg("error: cannot allocate memory for BPushGameSound\n" );
+ intf_ErrMsg("error: cannot allocate memory for BPushGameSound" );
return( 1 );
}
p_intf->p_sys = (intf_sys_t*) malloc( sizeof( intf_sys_t ) );
if( p_intf->p_sys == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM));
+ intf_ErrMsg("error: %s", strerror(ENOMEM));
return( 1 );
}
p_intf->p_sys->i_key = -1;
if( p_intf->p_sys->p_window == 0 )
{
free( p_intf->p_sys );
- intf_ErrMsg( "error: cannot allocate memory for InterfaceWindow\n" );
+ intf_ErrMsg( "error: cannot allocate memory for InterfaceWindow" );
return( 1 );
}
p_intf->p_vout = vout_CreateThread( NULL, 0, 0, 0, NULL, 0, NULL );
if( p_intf->p_vout == NULL ) /* error */
{
- intf_ErrMsg("intf error: can't create output thread\n" );
+ intf_ErrMsg("intf error: can't create output thread" );
return( 1 );
}
}
p_vout->p_sys = (vout_sys_t*) malloc( sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
{
- intf_ErrMsg( "error: %s\n", strerror(ENOMEM) );
+ intf_ErrMsg( "error: %s", strerror(ENOMEM) );
return( 1 );
}
/* Open and initialize device */
if( BeosOpenDisplay( p_vout ) )
{
- intf_ErrMsg("vout error: can't open display\n");
+ intf_ErrMsg("vout error: can't open display");
free( p_vout->p_sys );
return( 1 );
}
p_vout->p_sys->pp_buffer[1] = (byte_t*) malloc( i_page_size );
if( p_vout->p_sys->pp_buffer[0] == NULL || p_vout->p_sys->pp_buffer[0] == NULL )
{
- intf_ErrMsg("vout error: can't allocate video memory (%s)\n", strerror(errno) );
+ intf_ErrMsg("vout error: can't allocate video memory (%s)", strerror(errno) );
if( p_vout->p_sys->pp_buffer[0] != NULL ) free( p_vout->p_sys->pp_buffer[0] );
if( p_vout->p_sys->pp_buffer[1] != NULL ) free( p_vout->p_sys->pp_buffer[1] );
p_win->locker->Unlock();
{
if( p_vout->i_changes & VOUT_SIZE_CHANGE )
{
- intf_DbgMsg("resizing window\n");
+ intf_DbgMsg("resizing window");
p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
/* Resize window */
/* Recreate XImages. If SysInit failed, the thread can't go on. */
if( vout_BeInit( p_vout ) )
{
- intf_ErrMsg("error: can't resize display\n");
+ intf_ErrMsg("error: can't resize display");
return( 1 );
}
/* Tell the video output thread that it will need to rebuild YUV
* tables. This is needed since convertion buffer size may have changed */
p_vout->i_changes |= VOUT_YUV_CHANGE;
- intf_Msg("Video display resized (%dx%d)\n", p_vout->i_width, p_vout->i_height);
+ intf_Msg("Video display resized (%dx%d)", p_vout->i_width, p_vout->i_height);
}
return( 0 );
}
if( p_vout->p_sys->p_window == 0 )
{
free( p_vout->p_sys );
- intf_ErrMsg( "error: cannot allocate memory for VideoWindow\n" );
+ intf_ErrMsg( "error: cannot allocate memory for VideoWindow" );
return( 1 );
}
VideoWindow * p_win = p_vout->p_sys->p_window;
switch( p_vout->i_screen_depth )
{
case 8:
- intf_ErrMsg( "vout error: 8 bit mode not fully supported\n" );
+ intf_ErrMsg( "vout error: 8 bit mode not fully supported" );
break;
case 15:
p_vout->i_red_mask = 0x7c00;
p_aout->p_sys = malloc( sizeof( aout_sys_t ) );
if( p_aout->p_sys == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM) );
+ intf_ErrMsg("error: %s", strerror(ENOMEM) );
return( 1 );
}
/* Open the sound device */
if ( (p_aout->i_fd = open( p_aout->psz_device, O_WRONLY|O_NONBLOCK )) < 0 )
{
- intf_ErrMsg( "aout error: can't open audio device (%s)\n", p_aout->psz_device );
+ intf_ErrMsg( "aout error: can't open audio device (%s)", p_aout->psz_device );
return( -1 );
}
{
if ( ioctl( p_aout->i_fd, SNDCTL_DSP_RESET, NULL ) < 0 )
{
- intf_ErrMsg( "aout error: can't reset audio device (%s)\n", p_aout->psz_device );
+ intf_ErrMsg( "aout error: can't reset audio device (%s)", p_aout->psz_device );
return( -1 );
}
i_format = p_aout->i_format;
if ( ioctl( p_aout->i_fd, SNDCTL_DSP_SETFMT, &i_format ) < 0 )
{
- intf_ErrMsg( "aout error: can't set audio output format (%i)\n", p_aout->i_format );
+ intf_ErrMsg( "aout error: can't set audio output format (%i)", p_aout->i_format );
return( -1 );
}
if ( i_format != p_aout->i_format )
{
- intf_DbgMsg( "aout debug: audio output format not supported (%i)\n", p_aout->i_format );
+ intf_DbgMsg( "aout debug: audio output format not supported (%i)", p_aout->i_format );
p_aout->i_format = i_format;
}
if ( ioctl( p_aout->i_fd, SNDCTL_DSP_STEREO, &b_stereo ) < 0 )
{
- intf_ErrMsg( "aout error: can't set number of audio channels (%i)\n", p_aout->i_channels );
+ intf_ErrMsg( "aout error: can't set number of audio channels (%i)", p_aout->i_channels );
return( -1 );
}
if ( b_stereo != p_aout->b_stereo )
{
- intf_DbgMsg( "aout debug: number of audio channels not supported (%i)\n", p_aout->i_channels );
+ intf_DbgMsg( "aout debug: number of audio channels not supported (%i)", p_aout->i_channels );
p_aout->b_stereo = b_stereo;
p_aout->i_channels = 1 + b_stereo;
}
l_rate = p_aout->l_rate;
if ( ioctl( p_aout->i_fd, SNDCTL_DSP_SPEED, &l_rate ) < 0 )
{
- intf_ErrMsg( "aout error: can't set audio output rate (%li)\n", p_aout->l_rate );
+ intf_ErrMsg( "aout error: can't set audio output rate (%li)", p_aout->l_rate );
return( -1 );
}
if ( l_rate != p_aout->l_rate )
{
- intf_DbgMsg( "aout debug: audio output rate not supported (%li)\n", p_aout->l_rate );
+ intf_DbgMsg( "aout debug: audio output rate not supported (%li)", p_aout->l_rate );
p_aout->l_rate = l_rate;
}
p_intf->p_vout = vout_CreateThread( NULL, 0, 0, 0, NULL, 0, NULL );
if( p_intf->p_vout == NULL ) /* error */
{
- intf_ErrMsg("intf error: can't create output thread\n" );
+ intf_ErrMsg("intf error: can't create output thread" );
return( 1 );
}
}
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM) );
+ intf_ErrMsg("error: %s", strerror(ENOMEM) );
return( 1 );
}
/* Open and initialize device */
if( DummyOpenDisplay( p_vout ) )
{
- intf_ErrMsg("vout error: can't open display\n");
+ intf_ErrMsg("vout error: can't open display");
free( p_vout->p_sys );
return( 1 );
}
p_vout->p_sys->p_video = malloc( p_vout->p_sys->i_page_size * 2 );
if( (int)p_vout->p_sys->p_video == -1 )
{
- intf_ErrMsg("vout error: can't map video memory (%s)\n", strerror(errno) );
+ intf_ErrMsg("vout error: can't map video memory (%s)", strerror(errno) );
return( 1 );
}
p_aout->p_sys = malloc( sizeof( aout_sys_t ) );
if( p_aout->p_sys == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM) );
+ intf_ErrMsg("error: %s", strerror(ENOMEM) );
return( 1 );
}
p_aout->l_rate, NULL, "vlc")) < 0 )
{
intf_ErrMsg( "aout error: can't open esound socket"
- " (format 0x%08x at %ld Hz)\n",
+ " (format 0x%08x at %ld Hz)",
p_aout->p_sys->esd_format, p_aout->l_rate );
return( -1 );
}
amount = (2 * 44100 * (ESD_BUF_SIZE + 256)) / p_aout->l_rate;
}
- intf_DbgMsg( "aout: latency is %i\n", amount );
+ intf_DbgMsg( "aout: latency is %i", amount );
write( p_aout->i_fd, buffer, i_size );
}
{
return( 1 );
};
- intf_DbgMsg("0x%x\n", p_intf );
/* Set tty and fb devices */
p_intf->p_sys->i_tty_dev = 0; /* 0 == /dev/tty0 == current console */
if( sigaction( SIGUSR1, &sig_tty, &p_intf->p_sys->sig_usr1 ) ||
sigaction( SIGUSR2, &sig_tty, &p_intf->p_sys->sig_usr2 ) )
{
- intf_ErrMsg( "intf error: can't set up signal handler (%s)\n",
+ intf_ErrMsg( "intf error: can't set up signal handler (%s)",
strerror(errno) );
tcsetattr(0, 0, &p_intf->p_sys->old_termios);
FBTextMode( p_intf->p_sys->i_tty_dev );
if( ioctl(p_intf->p_sys->i_tty_dev, VT_GETMODE, &p_intf->p_sys->vt_mode)
== -1 )
{
- intf_ErrMsg( "intf error: cant get terminal mode (%s)\n",
+ intf_ErrMsg( "intf error: cant get terminal mode (%s)",
strerror(errno) );
sigaction( SIGUSR1, &p_intf->p_sys->sig_usr1, NULL );
sigaction( SIGUSR2, &p_intf->p_sys->sig_usr2, NULL );
if( ioctl(p_intf->p_sys->i_tty_dev, VT_SETMODE, &vt_mode) == -1 )
{
- intf_ErrMsg( "intf error: can't set terminal mode (%s)\n",
+ intf_ErrMsg( "intf error: can't set terminal mode (%s)",
strerror(errno) );
sigaction( SIGUSR1, &p_intf->p_sys->sig_usr1, NULL );
sigaction( SIGUSR2, &p_intf->p_sys->sig_usr2, NULL );
NULL, 0, NULL );
if( p_intf->p_vout == NULL ) /* XXX?? error */
{
- intf_ErrMsg("intf error: can't create output thread\n" );
+ intf_ErrMsg("intf error: can't create output thread" );
ioctl( p_intf->p_sys->i_tty_dev, VT_SETMODE,
&p_intf->p_sys->vt_mode );
sigaction( SIGUSR1, &p_intf->p_sys->sig_usr1, NULL );
{
if( intf_ProcessKey(p_intf, (int)buf[0]) )
{
- intf_ErrMsg("unhandled key '%c' (%i)\n", (char) buf[0], buf[0] );
+ intf_ErrMsg("unhandled key '%c' (%i)", (char) buf[0], buf[0] );
}
}
}
/* return to text mode */
if (-1 == ioctl(i_tty_dev, KDSETMODE, KD_TEXT))
{
- intf_ErrMsg("intf error: ioctl KDSETMODE\n");
+ intf_ErrMsg("intf error: ioctl KDSETMODE");
}
}
/* switch to graphic mode */
if (-1 == ioctl(i_tty_dev, KDSETMODE, KD_GRAPHICS))
{
- intf_ErrMsg("intf error: ioctl KDSETMODE\n");
+ intf_ErrMsg("intf error: ioctl KDSETMODE");
}
}
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM) );
+ intf_ErrMsg("error: %s", strerror(ENOMEM) );
return( 1 );
}
/* Open and initialize device */
if( FBOpenDisplay( p_vout ) )
{
- intf_ErrMsg("vout error: can't open display\n");
+ intf_ErrMsg("vout error: can't open display");
free( p_vout->p_sys );
return( 1 );
}
*/
if( p_vout->i_changes & VOUT_SIZE_CHANGE )
{
- intf_DbgMsg("resizing window\n");
+ intf_DbgMsg("resizing window");
p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
/* Destroy XImages to change their size */
/* Recreate XImages. If SysInit failed, the thread can't go on. */
if( vout_FBInit( p_vout ) )
{
- intf_ErrMsg("error: can't resize display\n");
+ intf_ErrMsg("error: can't resize display");
return( 1 );
}
/* Tell the video output thread that it will need to rebuild YUV
* tables. This is needed since conversion buffer size may have changed */
p_vout->i_changes |= VOUT_YUV_CHANGE;
- intf_Msg("Video display resized (%dx%d)\n", p_vout->i_width, p_vout->i_height);
+ intf_Msg("Video display resized (%dx%d)", p_vout->i_width, p_vout->i_height);
#endif
}
p_vout->p_sys->i_fb_dev = open( psz_device, O_RDWR);
if( p_vout->p_sys->i_fb_dev == -1 )
{
- intf_ErrMsg("vout error: can't open %s (%s)\n", psz_device, strerror(errno) );
+ intf_ErrMsg("vout error: can't open %s (%s)", psz_device, strerror(errno) );
return( 1 );
}
/* Get framebuffer device informations */
if( ioctl( p_vout->p_sys->i_fb_dev, FBIOGET_VSCREENINFO, &p_vout->p_sys->var_info ) )
{
- intf_ErrMsg( "vout error: can't get framebuffer informations (%s)\n", strerror(errno) );
+ intf_ErrMsg( "vout error: can't get framebuffer informations (%s)", strerror(errno) );
close( p_vout->p_sys->i_fb_dev );
return( 1 );
}
p_vout->p_sys->var_info.activate = FB_ACTIVATE_NXTOPEN;
p_vout->p_sys->var_info.xoffset = 0;
p_vout->p_sys->var_info.yoffset = 0;
- intf_ErrMsg( "vout: ypanstep is %i\n", fix_info.ypanstep );
+ intf_ErrMsg( "vout: ypanstep is %i", fix_info.ypanstep );
/* XXX?? ask sam p_vout->p_sys->mode_info.sync = FB_SYNC_VERT_HIGH_ACT; */
if( ioctl( p_vout->p_sys->i_fb_dev, FBIOPUT_VSCREENINFO, &p_vout->p_sys->var_info ) )
{
- intf_ErrMsg("vout error: can't set framebuffer informations (%s)\n", strerror(errno) );
+ intf_ErrMsg("vout error: can't set framebuffer informations (%s)", strerror(errno) );
close( p_vout->p_sys->i_fb_dev );
return( 1 );
}
if( ioctl( p_vout->p_sys->i_fb_dev, FBIOGET_FSCREENINFO, &fix_info ) ||
ioctl( p_vout->p_sys->i_fb_dev, FBIOGET_VSCREENINFO, &p_vout->p_sys->var_info ) )
{
- intf_ErrMsg("vout error: can't get framebuffer informations (%s)\n", strerror(errno) );
+ intf_ErrMsg("vout error: can't get framebuffer informations (%s)", strerror(errno) );
/* FIXME: restore fb config ?? */
close( p_vout->p_sys->i_fb_dev );
return( 1 );
/* FIXME: if the image is full-size, it gets cropped on the left
* because of the xres / xres_virtual slight difference */
- intf_Msg( "%ix%i (virtual %ix%i)\n", p_vout->p_sys->var_info.xres, p_vout->p_sys->var_info.yres, p_vout->p_sys->var_info.xres_virtual, p_vout->p_sys->var_info.yres_virtual );
+ intf_Msg( "%ix%i (virtual %ix%i)", p_vout->p_sys->var_info.xres, p_vout->p_sys->var_info.yres, p_vout->p_sys->var_info.xres_virtual, p_vout->p_sys->var_info.yres_virtual );
p_vout->i_width = p_vout->p_sys->var_info.xres_virtual ? p_vout->p_sys->var_info.xres_virtual : p_vout->p_sys->var_info.xres;
p_vout->i_height = p_vout->p_sys->var_info.yres;
p_vout->i_screen_depth = p_vout->p_sys->var_info.bits_per_pixel;
break;
default: /* unsupported screen depth */
- intf_ErrMsg( "vout error: screen depth %d is not supported\n",
+ intf_ErrMsg( "vout error: screen depth %d is not supported",
p_vout->i_screen_depth);
return( 1 );
break;
memset( p_vout->p_sys->p_video, 0, p_vout->p_sys->i_page_size * 2 );
if( (int)p_vout->p_sys->p_video == -1 ) /* according to man, it is -1. What about NULL ? */
{
- intf_ErrMsg("vout error: can't map video memory (%s)\n", strerror(errno) );
+ intf_ErrMsg("vout error: can't map video memory (%s)", strerror(errno) );
/* FIXME: restore fb config ?? */
close( p_vout->p_sys->i_fb_dev );
return( 1 );
#endif
);
- intf_DbgMsg("framebuffer type=%d, visual=%d, ypanstep=%d, ywrap=%d, accel=%d\n",
+ intf_DbgMsg("framebuffer type=%d, visual=%d, ypanstep=%d, ywrap=%d, accel=%d",
fix_info.type, fix_info.visual, fix_info.ypanstep, fix_info.ywrapstep, fix_info.accel );
return( 0 );
}
/* Check that b_video is set */
if( !p_main->b_video )
{
- intf_ErrMsg("error: GGI interface require a video output thread\n");
+ intf_ErrMsg("error: GGI interface require a video output thread");
return( 1 );
}
p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
if( p_intf->p_sys == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM) );
+ intf_ErrMsg("error: %s", strerror(ENOMEM) );
return( 1 );
}
if( p_intf->p_vout == NULL ) /* error */
{
- intf_ErrMsg("error: can't create video output thread\n" );
+ intf_ErrMsg("error: can't create video output thread" );
free( p_intf->p_sys );
return( 1 );
}
i_key = ggiGetc( p_intf->p_sys->p_display );
if( intf_ProcessKey( p_intf, i_key ) )
{
- intf_DbgMsg("unhandled key '%c' (%i)\n", (char) i_key, i_key );
+ intf_DbgMsg("unhandled key '%c' (%i)", (char) i_key, i_key );
}
}
}
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM) );
+ intf_ErrMsg("error: %s", strerror(ENOMEM) );
return( 1 );
}
/* Open and initialize device */
if( GGIOpenDisplay( p_vout, psz_display, p_data ) )
{
- intf_ErrMsg("error: can't initialize GGI display\n");
+ intf_ErrMsg("error: can't initialize GGI display");
free( p_vout->p_sys );
return( 1 );
}
/* Initialize library */
if( ggiInit() )
{
- intf_ErrMsg("error: can't initialize GGI library\n");
+ intf_ErrMsg("error: can't initialize GGI library");
return( 1 );
}
p_vout->p_sys->p_display = ggiOpen( psz_display, NULL );
if( p_vout->p_sys->p_display == NULL )
{
- intf_ErrMsg("error: can't open GGI default display\n");
+ intf_ErrMsg("error: can't open GGI default display");
ggiExit();
return( 1 );
}
/* Set mode */
if( ggiSetMode( p_vout->p_sys->p_display, &mode ) )
{
- intf_ErrMsg("error: can't set GGI mode\n");
+ intf_ErrMsg("error: can't set GGI mode");
ggiClose( p_vout->p_sys->p_display );
ggiExit();
return( 1 );
(ggi_directbuffer *)ggiDBGetBuffer( p_vout->p_sys->p_display, i_index );
if( p_vout->p_sys->p_buffer[ i_index ] == NULL )
{
- intf_ErrMsg("error: double buffering is not possible\n");
+ intf_ErrMsg("error: double buffering is not possible");
ggiClose( p_vout->p_sys->p_display );
ggiExit();
return( 1 );
(p_vout->p_sys->p_buffer[ i_index ]->noaccess != 0) ||
(p_vout->p_sys->p_buffer[ i_index ]->align != 0) )
{
- intf_ErrMsg("error: incorrect video memory type\n");
+ intf_ErrMsg("error: incorrect video memory type");
ggiClose( p_vout->p_sys->p_display );
ggiExit();
return( 1 );
#ifdef DEBUG
if( p_vout->p_sys->b_must_acquire )
{
- intf_DbgMsg("buffers must be acquired\n");
+ intf_DbgMsg("buffers must be acquired");
}
#endif
ggiSetGCBackground(p_vout->p_sys->p_display,
ggiMapColor(p_vout->p_sys->p_display,&col_bg)) )
{
- intf_ErrMsg("error: can't set colors\n");
+ intf_ErrMsg("error: can't set colors");
ggiClose( p_vout->p_sys->p_display );
ggiExit();
return( 1 );
if( ggiSetGCClipping(p_vout->p_sys->p_display, 0, 0,
mode.visible.x, mode.visible.y ) )
{
- intf_ErrMsg("error: can't set clipping\n");
+ intf_ErrMsg("error: can't set clipping");
ggiClose( p_vout->p_sys->p_display );
ggiExit();
return( 1 );
p_intf->p_vout = vout_CreateThread( NULL, 0, 0, 0, NULL, 0, NULL );
if( p_intf->p_vout == NULL ) /* error */
{
- intf_ErrMsg("intf error: can't create output thread\n" );
+ intf_ErrMsg("intf error: can't create output thread" );
return( 1 );
}
}
{
if( intf_ProcessKey(p_intf, (int)buf = getch()) )
{
- intf_ErrMsg( "unhandled key '%c' (%i)\n", (char) buf, buf );
+ intf_ErrMsg( "unhandled key '%c' (%i)", (char) buf, buf );
}
}
}
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM) );
+ intf_ErrMsg("error: %s", strerror(ENOMEM) );
return( 1 );
}
/* Open and initialize device */
if( GlideOpenDisplay( p_vout ) )
{
- intf_ErrMsg("vout error: can't open display\n");
+ intf_ErrMsg("vout error: can't open display");
free( p_vout->p_sys );
return( 1 );
}
GR_LFBWRITEMODE_565, GR_ORIGIN_UPPER_LEFT, FXFALSE,
&p_vout->p_sys->p_buffer_info) == FXFALSE )
{
- intf_ErrMsg( "vout error: can't take 3dfx back buffer lock\n" );
+ intf_ErrMsg( "vout error: can't take 3dfx back buffer lock" );
}
}
p_vout->p_sys->p_video = malloc( p_vout->p_sys->i_page_size * 2 );
if( (int)p_vout->p_sys->p_video == -1 )
{
- intf_ErrMsg( "vout error: can't map video memory (%s)\n",
+ intf_ErrMsg( "vout error: can't map video memory (%s)",
strerror(errno) );
return( 1 );
}
if( !grSstQueryHardware(&hwconfig) )
{
- intf_ErrMsg( "vout error: can't get 3dfx hardware config\n" );
+ intf_ErrMsg( "vout error: can't get 3dfx hardware config" );
return( 1 );
}
if( !grSstWinOpen(0, resolution, GR_REFRESH_60Hz,
GR_COLORFORMAT_ABGR, GR_ORIGIN_UPPER_LEFT, 2, 1) )
{
- intf_ErrMsg( "vout error: can't open 3dfx screen\n" );
+ intf_ErrMsg( "vout error: can't open 3dfx screen" );
return( 1 );
}
GR_LFBWRITEMODE_565, GR_ORIGIN_UPPER_LEFT, FXFALSE,
&p_front_buffer_info) == FXFALSE )
{
- intf_ErrMsg( "vout error: can't take 3dfx front buffer lock\n" );
+ intf_ErrMsg( "vout error: can't take 3dfx front buffer lock" );
grGlideShutdown();
return( 1 );
}
GR_LFBWRITEMODE_565, GR_ORIGIN_UPPER_LEFT, FXFALSE,
&p_vout->p_sys->p_buffer_info) == FXFALSE )
{
- intf_ErrMsg( "vout error: can't take 3dfx back buffer lock\n" );
+ intf_ErrMsg( "vout error: can't take 3dfx back buffer lock" );
grGlideShutdown();
return( 1 );
}
p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
if( p_intf->p_sys == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM));
+ intf_ErrMsg("error: %s", strerror(ENOMEM));
return( 1 );
}
p_intf->p_sys->p_gnome = malloc( sizeof( gnome_thread_t ) );
if( p_intf->p_sys->p_gnome == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM));
+ intf_ErrMsg("error: %s", strerror(ENOMEM));
free( p_intf->p_sys );
return( 1 );
}
p_intf->p_sys->p_display = XOpenDisplay( psz_display );
if( !p_intf->p_sys->p_display ) /* error */
{
- intf_ErrMsg("error: can't open display %s\n", psz_display );
+ intf_ErrMsg("error: can't open display %s", psz_display );
free( p_intf->p_sys->p_gnome );
free( p_intf->p_sys );
return( 1 );
/* Spawn base window - this window will include the video output window */
if( GnomeCreateWindow( p_intf ) )
{
- intf_ErrMsg( "error: can't create output window\n" );
+ intf_ErrMsg( "error: can't create output window" );
XCloseDisplay( p_intf->p_sys->p_display );
free( p_intf->p_sys->p_gnome );
free( p_intf->p_sys );
if( p_intf->p_vout == NULL ) /* error */
{
- intf_ErrMsg("error: can't create video output thread\n" );
+ intf_ErrMsg("error: can't create video output thread" );
GnomeDestroyWindow( p_intf );
XCloseDisplay( p_intf->p_sys->p_display );
free( p_intf->p_sys->p_gnome );
if( p_intf->p_sys->p_gnome->thread_id )
{
p_intf->p_sys->p_gnome->b_die = 1;
- intf_Msg( "waiting for Gnome thread to terminate\n" );
+ intf_Msg( "waiting for Gnome thread to terminate" );
vlc_thread_join( p_intf->p_sys->p_gnome->thread_id );
- intf_Msg( "Gnome thread terminated\n" );
+ intf_Msg( "Gnome thread terminated" );
}
/* Close main window and display */
&p_intf->p_sys->wm_delete_window, 1 ) )
{
/* WM_DELETE_WINDOW is not supported by window manager */
- intf_Msg("error: missing or bad window manager - please exit program kindly.\n");
+ intf_Msg("error: missing or bad window manager - please exit program kindly.");
}
/* Creation of a graphic context that doesn't generate a GraphicsExpose
{
if( intf_ProcessKey( p_intf, i_key ) )
{
- intf_DbgMsg( "unhandled key '%c' (%i)\n", (char) i_key, i_key );
+ intf_DbgMsg( "unhandled key '%c' (%i)", (char) i_key, i_key );
}
}
}
/* Other event */
else
{
- intf_DbgMsg( "%p -> unhandled event type %d received\n",
+ intf_DbgMsg( "%p -> unhandled event type %d received",
p_intf, xevent.type );
}
#endif
}
else
{
- intf_DbgMsg( "%p -> unhandled ClientMessage received\n", p_intf );
+ intf_DbgMsg( "%p -> unhandled ClientMessage received", p_intf );
}
}
if( b_resized )
{
/* If interface window has been resized, change vout size */
- intf_DbgMsg( "resizing output window\n" );
+ intf_DbgMsg( "resizing output window" );
vlc_mutex_lock( &p_intf->p_vout->change_lock );
p_intf->p_vout->i_width = p_intf->p_sys->i_width;
p_intf->p_vout->i_height = p_intf->p_sys->i_height;
(p_intf->p_vout->i_height != p_intf->p_sys->i_height) )
{
/* If video output size has changed, change interface window size */
- intf_DbgMsg( "resizing output window\n" );
+ intf_DbgMsg( "resizing output window" );
p_intf->p_sys->i_width = p_intf->p_vout->i_width;
p_intf->p_sys->i_height = p_intf->p_vout->i_height;
XResizeWindow( p_intf->p_sys->p_display, p_intf->p_sys->window,
{
if( p_intf->p_sys->i_ss_count++ == 0 )
{
- intf_Msg( "Enabling screen saver\n" );
+ intf_Msg( "Enabling screen saver" );
XSetScreenSaver( p_intf->p_sys->p_display, p_intf->p_sys->i_ss_timeout,
p_intf->p_sys->i_ss_interval, p_intf->p_sys->i_ss_blanking,
p_intf->p_sys->i_ss_exposure );
&p_intf->p_sys->i_ss_exposure );
/* Disable screen saver */
- intf_Msg("Disabling screen saver\n");
+ intf_Msg("Disabling screen saver");
XSetScreenSaver( p_intf->p_sys->p_display, 0,
p_intf->p_sys->i_ss_interval, p_intf->p_sys->i_ss_blanking,
p_intf->p_sys->i_ss_exposure );
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM) );
+ intf_ErrMsg("error: %s", strerror(ENOMEM) );
return( 1 );
}
* id is still valid. */
if( X11OpenDisplay( p_vout, psz_display, i_root_window, p_data ) )
{
- intf_ErrMsg("error: can't initialize X11 display\n" );
+ intf_ErrMsg("error: can't initialize X11 display" );
free( p_vout->p_sys );
return( 1 );
}
}
if( i_err ) /* an error occured */
{
- intf_Msg("XShm video extension deactivated\n" );
+ intf_Msg("XShm video extension deactivated" );
p_vout->p_sys->b_shm = 0;
}
}
{
if( X11CreateImage( p_vout, &p_vout->p_sys->p_ximage[0] ) )
{
- intf_ErrMsg("error: can't create images\n");
+ intf_ErrMsg("error: can't create images");
p_vout->p_sys->p_ximage[0] = NULL;
p_vout->p_sys->p_ximage[1] = NULL;
return( 1 );
}
if( X11CreateImage( p_vout, &p_vout->p_sys->p_ximage[1] ) )
{
- intf_ErrMsg("error: can't create images\n");
+ intf_ErrMsg("error: can't create images");
X11DestroyImage( p_vout->p_sys->p_ximage[0] );
p_vout->p_sys->p_ximage[0] = NULL;
p_vout->p_sys->p_ximage[1] = NULL;
*/
if( p_vout->i_changes & VOUT_SIZE_CHANGE )
{
- intf_DbgMsg("resizing window\n");
+ intf_DbgMsg("resizing window");
p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
/* Resize window */
/* Recreate XImages. If SysInit failed, the thread can't go on. */
if( vout_GnomeInit( p_vout ) )
{
- intf_ErrMsg("error: can't resize display\n");
+ intf_ErrMsg("error: can't resize display");
return( 1 );
}
/* Tell the video output thread that it will need to rebuild YUV
* tables. This is needed since convertion buffer size may have changed */
p_vout->i_changes |= VOUT_YUV_CHANGE;
- intf_Msg("Video display resized (%dx%d)\n", p_vout->i_width, p_vout->i_height);
+ intf_Msg("Video display resized (%dx%d)", p_vout->i_width, p_vout->i_height);
}
return 0;
int i;
XColor color[255];
- intf_DbgMsg( "Palette change called\n" );
+ intf_DbgMsg( "Palette change called" );
/* allocate palette */
for( i = 0; i < 255; i++ )
p_vout->p_sys->p_display = XOpenDisplay( psz_display );
if( p_vout->p_sys->p_display == NULL )
{
- intf_ErrMsg("error: can't open display %s\n", psz_display );
+ intf_ErrMsg("error: can't open display %s", psz_display );
return( 1 );
}
p_vout->p_sys->i_screen = DefaultScreen( p_vout->p_sys->p_display );
if( !p_vout->p_sys->b_shm )
{
- intf_Msg("XShm video extension is not available\n");
+ intf_Msg("XShm video extension is not available");
}
/* Get screen depth */
&xvisual_template, &i_count );
if( p_xvisual == NULL )
{
- intf_ErrMsg("error: no PseudoColor visual available\n");
+ intf_ErrMsg("error: no PseudoColor visual available");
XCloseDisplay( p_vout->p_sys->p_display );
return( 1 );
}
&xvisual_template, &i_count );
if( p_xvisual == NULL )
{
- intf_ErrMsg("error: no TrueColor visual available\n");
+ intf_ErrMsg("error: no TrueColor visual available");
XCloseDisplay( p_vout->p_sys->p_display );
return( 1 );
}
/* Create a window */
if( X11CreateWindow( p_vout ) )
{
- intf_ErrMsg("error: can't open a window\n");
+ intf_ErrMsg("error: can't open a window");
XCloseDisplay( p_vout->p_sys->p_display );
return( 1 );
}
pb_data = (byte_t *) malloc( p_vout->i_bytes_per_line * p_vout->i_height );
if( !pb_data ) /* error */
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM));
+ intf_ErrMsg("error: %s", strerror(ENOMEM));
return( 1 );
}
p_vout->i_width, p_vout->i_height, i_quantum, 0);
if(! *pp_ximage ) /* error */
{
- intf_ErrMsg( "error: XCreateImage() failed\n" );
+ intf_ErrMsg( "error: XCreateImage() failed" );
free( pb_data );
return( 1 );
}
p_shm_info, p_vout->i_width, p_vout->i_height );
if(! *pp_ximage ) /* error */
{
- intf_ErrMsg("error: XShmCreateImage() failed\n");
+ intf_ErrMsg("error: XShmCreateImage() failed");
return( 1 );
}
IPC_CREAT | 0777);
if( p_shm_info->shmid < 0) /* error */
{
- intf_ErrMsg("error: can't allocate shared image data (%s)\n",
+ intf_ErrMsg("error: can't allocate shared image data (%s)",
strerror(errno));
XDestroyImage( *pp_ximage );
return( 1 );
p_shm_info->shmaddr = (*pp_ximage)->data = shmat(p_shm_info->shmid, 0, 0);
if(! p_shm_info->shmaddr )
{ /* error */
- intf_ErrMsg("error: can't attach shared memory (%s)\n",
+ intf_ErrMsg("error: can't attach shared memory (%s)",
strerror(errno));
shmctl( p_shm_info->shmid, IPC_RMID, 0 ); /* free shared memory */
XDestroyImage( *pp_ximage );
p_shm_info->readOnly = True;
if( XShmAttach( p_vout->p_sys->p_display, p_shm_info ) == False ) /* error */
{
- intf_ErrMsg("error: can't attach shared memory to X11 server\n");
+ intf_ErrMsg("error: can't attach shared memory to X11 server");
shmdt( p_shm_info->shmaddr ); /* detach shared memory from process
* and automatic free */
XDestroyImage( *pp_ximage );
XDestroyImage( p_ximage );
if( shmdt( p_shm_info->shmaddr ) ) /* detach shared memory from process */
{ /* also automatic freeing... */
- intf_ErrMsg( "error: can't detach shared memory (%s)\n",
+ intf_ErrMsg( "error: can't detach shared memory (%s)",
strerror(errno) );
}
}
p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
if( p_intf->p_sys == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM));
+ intf_ErrMsg("error: %s", strerror(ENOMEM));
return( 1 );
}
p_intf->p_sys->p_display = XOpenDisplay( psz_display );
if( !p_intf->p_sys->p_display ) /* error */
{
- intf_ErrMsg("error: can't open display %s\n", psz_display );
+ intf_ErrMsg("error: can't open display %s", psz_display );
free( p_intf->p_sys );
return( 1 );
}
* but also command buttons, subtitles and other indicators */
if( X11CreateWindow( p_intf ) )
{
- intf_ErrMsg("error: can't create interface window\n" );
+ intf_ErrMsg("error: can't create interface window" );
XCloseDisplay( p_intf->p_sys->p_display );
free( p_intf->p_sys );
return( 1 );
p_intf->p_sys->i_height, NULL, 0, NULL );
if( p_intf->p_vout == NULL ) /* error */
{
- intf_ErrMsg("error: can't create video output thread\n" );
+ intf_ErrMsg("error: can't create video output thread" );
X11DestroyWindow( p_intf );
XCloseDisplay( p_intf->p_sys->p_display );
free( p_intf->p_sys );
&p_intf->p_sys->wm_delete_window, 1 ) )
{
/* WM_DELETE_WINDOW is not supported by window manager */
- intf_Msg("error: missing or bad window manager - please exit program kindly.\n");
+ intf_Msg("error: missing or bad window manager - please exit program kindly.");
}
/* Creation of a graphic context that doesn't generate a GraphicsExpose event
/* DestroyNotify event: window has been destroyed */
else if( xevent.type == DestroyNotify )
{
- intf_ErrMsg( "vout: window destroyed !\n");
+ intf_ErrMsg( "vout: window destroyed !");
}
/* Keyboard event */
else if( xevent.type == KeyPress )
{
if( intf_ProcessKey( p_intf, i_key ) )
{
- intf_DbgMsg("unhandled key '%c' (%i)\n", (char) i_key, i_key );
+ intf_DbgMsg("unhandled key '%c' (%i)", (char) i_key, i_key );
}
}
}
&& (xevent.xclient.data.l[0] == p_intf->p_sys->wm_delete_window ) )
{
/* FIXME: this never happens :( how to receive wm messages ?? */
- intf_DbgMsg("ClientMessage received\n");
+ intf_DbgMsg("ClientMessage received");
}
#ifdef DEBUG
/* Other event */
else
{
- intf_DbgMsg("%p -> unhandled event type %d received\n", p_intf, xevent.type );
+ intf_DbgMsg("%p -> unhandled event type %d received", p_intf, xevent.type );
}
#endif
}
if( b_resized )
{
/* If interface window has been resized, change vout size */
- intf_DbgMsg("resizing output window\n");
+ intf_DbgMsg("resizing output window");
vlc_mutex_lock( &p_intf->p_vout->change_lock );
p_intf->p_vout->i_width = p_intf->p_sys->i_width;
p_intf->p_vout->i_height = p_intf->p_sys->i_height;
(p_intf->p_vout->i_height != p_intf->p_sys->i_height) )
{
/* If video output size has changed, change interface window size */
- intf_DbgMsg("resizing interface window\n");
+ intf_DbgMsg("resizing interface window");
p_intf->p_sys->i_width = p_intf->p_vout->i_width;
p_intf->p_sys->i_height = p_intf->p_vout->i_height;
XResizeWindow( p_intf->p_sys->p_display, p_intf->p_sys->window,
{
if( p_intf->p_sys->i_ss_count++ == 0 )
{
- intf_Msg("Enabling screen saver\n");
+ intf_Msg("Enabling screen saver");
XSetScreenSaver( p_intf->p_sys->p_display, p_intf->p_sys->i_ss_timeout,
p_intf->p_sys->i_ss_interval, p_intf->p_sys->i_ss_blanking,
p_intf->p_sys->i_ss_exposure );
&p_intf->p_sys->i_ss_exposure );
/* Disable screen saver */
- intf_Msg("Disabling screen saver\n");
+ intf_Msg("Disabling screen saver");
XSetScreenSaver( p_intf->p_sys->p_display, 0,
p_intf->p_sys->i_ss_interval, p_intf->p_sys->i_ss_blanking,
p_intf->p_sys->i_ss_exposure );
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM) );
+ intf_ErrMsg("error: %s", strerror(ENOMEM) );
return( 1 );
}
p_vout->p_sys->p_mga = malloc( sizeof( mga_vid_config_t ) );
if( p_vout->p_sys->p_mga == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM) );
+ intf_ErrMsg("error: %s", strerror(ENOMEM) );
free( p_vout->p_sys );
return( 1 );
}
if( (p_vout->p_sys->i_fd = open("/dev/mga_vid",O_RDWR)) == -1 )
{
- intf_ErrMsg("error: can't open MGA driver /dev/mga_vid\n" );
+ intf_ErrMsg("error: can't open MGA driver /dev/mga_vid" );
free( p_vout->p_sys->p_mga );
free( p_vout->p_sys );
return( 1 );
* id is still valid. */
if( X11OpenDisplay( p_vout, psz_display, i_root_window ) )
{
- intf_ErrMsg("error: can't initialize X11 display\n" );
+ intf_ErrMsg("error: can't initialize X11 display" );
free( p_vout->p_sys->p_mga );
free( p_vout->p_sys );
return( 1 );
if( ioctl(p_vout->p_sys->i_fd, MGA_VID_CONFIG, p_vout->p_sys->p_mga) )
{
- intf_ErrMsg("error in config ioctl\n");
+ intf_ErrMsg("error in config ioctl");
}
if (p_vout->p_sys->p_mga->card_type == MGA_G200)
{
- intf_Msg( "detected MGA G200 (%d MB Ram)\n",
+ intf_Msg( "detected MGA G200 (%d MB Ram)",
p_vout->p_sys->p_mga->ram_size );
p_vout->p_sys->b_g400 = 0;
}
else
{
- intf_Msg( "detected MGA G400 (%d MB Ram)\n",
+ intf_Msg( "detected MGA G400 (%d MB Ram)",
p_vout->p_sys->p_mga->ram_size );
p_vout->p_sys->b_g400 = 1;
}
}
if( i_err ) /* an error occured */
{
- intf_Msg("XShm video sextension deactivated\n" );
+ intf_Msg("XShm video sextension deactivated" );
p_vout->p_sys->b_shm = 0;
}
}
{
if( X11CreateImage( p_vout, &p_vout->p_sys->p_ximage[0] ) )
{
- intf_ErrMsg("error: can't create images\n");
+ intf_ErrMsg("error: can't create images");
p_vout->p_sys->p_ximage[0] = NULL;
p_vout->p_sys->p_ximage[1] = NULL;
return( 1 );
}
if( X11CreateImage( p_vout, &p_vout->p_sys->p_ximage[1] ) )
{
- intf_ErrMsg("error: can't create images\n");
+ intf_ErrMsg("error: can't create images");
X11DestroyImage( p_vout->p_sys->p_ximage[0] );
p_vout->p_sys->p_ximage[0] = NULL;
p_vout->p_sys->p_ximage[1] = NULL;
*/
if( p_vout->i_changes & VOUT_SIZE_CHANGE )
{
- intf_DbgMsg("resizing window\n");
+ intf_DbgMsg("resizing window");
p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
/* Resize window */
/* Recreate XImages. If SysInit failed, the thread can't go on. */
if( vout_MGAInit( p_vout ) )
{
- intf_ErrMsg("error: can't resize display\n");
+ intf_ErrMsg("error: can't resize display");
return( 1 );
}
/* Tell the video output thread that it will need to rebuild YUV
* tables. This is needed since convertion buffer size may have changed */
p_vout->i_changes |= VOUT_YUV_CHANGE;
- intf_Msg("Video display resized (%dx%d)\n", p_vout->i_width, p_vout->i_height);
+ intf_Msg("Video display resized (%dx%d)", p_vout->i_width, p_vout->i_height);
}
return 0;
p_vout->p_sys->p_display = XOpenDisplay( psz_display );
if( p_vout->p_sys->p_display == NULL )
{
- intf_ErrMsg("error: can't open display %s\n", psz_display );
+ intf_ErrMsg("error: can't open display %s", psz_display );
return( 1 );
}
p_vout->p_sys->i_screen = DefaultScreen( p_vout->p_sys->p_display );
if( !p_vout->p_sys->b_shm )
{
- intf_Msg("XShm video extension is not available\n");
+ intf_Msg("XShm video extension is not available");
}
/* Get screen depth */
&xvisual_template, &i_count );
if( p_xvisual == NULL )
{
- intf_ErrMsg("error: no PseudoColor visual available\n");
+ intf_ErrMsg("error: no PseudoColor visual available");
XCloseDisplay( p_vout->p_sys->p_display );
return( 1 );
}
&xvisual_template, &i_count );
if( p_xvisual == NULL )
{
- intf_ErrMsg("error: no TrueColor visual available\n");
+ intf_ErrMsg("error: no TrueColor visual available");
XCloseDisplay( p_vout->p_sys->p_display );
return( 1 );
}
/* Create a window */
if( X11CreateWindow( p_vout ) )
{
- intf_ErrMsg("error: can't open a window\n");
+ intf_ErrMsg("error: can't open a window");
XCloseDisplay( p_vout->p_sys->p_display );
return( 1 );
}
pb_data = (byte_t *) malloc( p_vout->i_bytes_per_line * p_vout->i_height );
if( !pb_data ) /* error */
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM));
+ intf_ErrMsg("error: %s", strerror(ENOMEM));
return( 1 );
}
p_vout->i_width, p_vout->i_height, i_quantum, 0);
if(! *pp_ximage ) /* error */
{
- intf_ErrMsg( "error: XCreateImage() failed\n" );
+ intf_ErrMsg( "error: XCreateImage() failed" );
free( pb_data );
return( 1 );
}
p_shm_info, p_vout->i_width, p_vout->i_height );
if(! *pp_ximage ) /* error */
{
- intf_ErrMsg("error: XShmCreateImage() failed\n");
+ intf_ErrMsg("error: XShmCreateImage() failed");
return( 1 );
}
IPC_CREAT | 0777);
if( p_shm_info->shmid < 0) /* error */
{
- intf_ErrMsg("error: can't allocate shared image data (%s)\n",
+ intf_ErrMsg("error: can't allocate shared image data (%s)",
strerror(errno));
XDestroyImage( *pp_ximage );
return( 1 );
p_shm_info->shmaddr = (*pp_ximage)->data = shmat(p_shm_info->shmid, 0, 0);
if(! p_shm_info->shmaddr )
{ /* error */
- intf_ErrMsg("error: can't attach shared memory (%s)\n",
+ intf_ErrMsg("error: can't attach shared memory (%s)",
strerror(errno));
shmctl( p_shm_info->shmid, IPC_RMID, 0 ); /* free shared memory */
XDestroyImage( *pp_ximage );
p_shm_info->readOnly = True;
if( XShmAttach( p_vout->p_sys->p_display, p_shm_info ) == False ) /* error */
{
- intf_ErrMsg("error: can't attach shared memory to X11 server\n");
+ intf_ErrMsg("error: can't attach shared memory to X11 server");
shmdt( p_shm_info->shmaddr ); /* detach shared memory from process
* and automatic free */
XDestroyImage( *pp_ximage );
XDestroyImage( p_ximage );
if( shmdt( p_shm_info->shmaddr ) ) /* detach shared memory from process */
{ /* also automatic freeing... */
- intf_ErrMsg("error: can't detach shared memory (%s)\n",
+ intf_ErrMsg("error: can't detach shared memory (%s)",
strerror(errno));
}
}
/* Check that b_video is set */
if( !p_main->b_video )
{
- intf_ErrMsg( "error: SDL interface requires a video output thread\n" );
+ intf_ErrMsg( "error: SDL interface requires a video output thread" );
return( 1 );
}
p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
if( p_intf->p_sys == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM) );
+ intf_ErrMsg("error: %s", strerror(ENOMEM) );
return( 1 );
}
if( p_intf->p_vout == NULL ) /* error */
{
- intf_ErrMsg( "error: can't create video output thread\n" );
+ intf_ErrMsg( "error: can't create video output thread" );
free( p_intf->p_sys );
return( 1 );
}
default :
if( intf_ProcessKey( p_intf, (char ) i_key ) )
{
- intf_DbgMsg( "unhandled key '%c' (%i)\n",
+ intf_DbgMsg( "unhandled key '%c' (%i)",
(char) i_key, i_key );
}
break;
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
{
- intf_ErrMsg( "error: %s\n", strerror(ENOMEM) );
+ intf_ErrMsg( "error: %s", strerror(ENOMEM) );
return( 1 );
}
/* Initialize library */
if( SDL_Init(SDL_INIT_VIDEO) < 0 )
{
- intf_ErrMsg( "error: can't initialize SDL library: %s\n",
+ intf_ErrMsg( "error: can't initialize SDL library: %s",
SDL_GetError() );
free( p_vout->p_sys );
return( 1 );
if( SDLOpenDisplay(p_vout) )
{
- intf_ErrMsg( "error: can't initialize SDL library: %s\n",
+ intf_ErrMsg( "error: can't initialize SDL library: %s",
SDL_GetError() );
free( p_vout->p_sys );
return( 1 );
if( SDLOpenDisplay(p_vout) )
{
- intf_ErrMsg( "error: can't open DISPLAY default display\n" );
+ intf_ErrMsg( "error: can't open DISPLAY default display" );
return( 1 );
}
p_vout->p_sys->b_reopen_display = 0;
SDL_YV12_OVERLAY,
p_vout->p_sys->p_display
);
- intf_Msg("[YUV acceleration] : %d,\n",
+ intf_Msg("[YUV acceleration] : %d,",
p_vout->p_sys->p_overlay->hw_overlay);
}
if( p_vout->p_sys->p_display == NULL )
{
- intf_ErrMsg( "error: can't open DISPLAY default display\n" );
+ intf_ErrMsg( "error: can't open DISPLAY default display" );
return( 1 );
}
SDL_WM_SetCaption( VOUT_TITLE , VOUT_TITLE );
ggiSetGCBackground(p_vout->p_sys->p_display,
ggiMapColor(p_vout->p_sys->p_display,&col_bg)) )
{
- intf_ErrMsg("error: can't set colors\n");
+ intf_ErrMsg("error: can't set colors");
ggiClose( p_vout->p_sys->p_display );
ggiExit();
return( 1 );
p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
if( p_intf->p_sys == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM));
+ intf_ErrMsg("error: %s", strerror(ENOMEM));
return( 1 );
}
p_intf->p_sys->p_display = XOpenDisplay( psz_display );
if( !p_intf->p_sys->p_display ) /* error */
{
- intf_ErrMsg("error: can't open display %s\n", psz_display );
+ intf_ErrMsg("error: can't open display %s", psz_display );
free( p_intf->p_sys );
return( 1 );
}
* but also command buttons, subtitles and other indicators */
if( X11CreateWindow( p_intf ) )
{
- intf_ErrMsg("error: can't create interface window\n" );
+ intf_ErrMsg("error: can't create interface window" );
XCloseDisplay( p_intf->p_sys->p_display );
free( p_intf->p_sys );
return( 1 );
if( p_intf->p_vout == NULL ) /* error */
{
- intf_ErrMsg("error: can't create video output thread\n" );
+ intf_ErrMsg("error: can't create video output thread" );
X11DestroyWindow( p_intf );
XCloseDisplay( p_intf->p_sys->p_display );
free( p_intf->p_sys );
&p_intf->p_sys->wm_delete_window, 1 ) )
{
/* WM_DELETE_WINDOW is not supported by window manager */
- intf_Msg("error: missing or bad window manager - please exit program kindly.\n");
+ intf_Msg("error: missing or bad window manager - please exit program kindly.");
}
/* Creation of a graphic context that doesn't generate a GraphicsExpose
{
if( intf_ProcessKey( p_intf, i_key ) )
{
- intf_DbgMsg("unhandled key '%c' (%i)\n", (char) i_key, i_key );
+ intf_DbgMsg("unhandled key '%c' (%i)", (char) i_key, i_key );
}
}
}
/* Other event */
else
{
- intf_DbgMsg( "%p -> unhandled event type %d received\n",
+ intf_DbgMsg( "%p -> unhandled event type %d received",
p_intf, xevent.type );
}
#endif
}
else
{
- intf_DbgMsg( "%p -> unhandled ClientMessage received\n", p_intf );
+ intf_DbgMsg( "%p -> unhandled ClientMessage received", p_intf );
}
}
if( b_resized )
{
/* If interface window has been resized, change vout size */
- intf_DbgMsg( "resizing output window\n" );
+ intf_DbgMsg( "resizing output window" );
vlc_mutex_lock( &p_intf->p_vout->change_lock );
p_intf->p_vout->i_width = p_intf->p_sys->i_width;
p_intf->p_vout->i_height = p_intf->p_sys->i_height;
(p_intf->p_vout->i_height != p_intf->p_sys->i_height) )
{
/* If video output size has changed, change interface window size */
- intf_DbgMsg( "resizing output window\n" );
+ intf_DbgMsg( "resizing output window" );
p_intf->p_sys->i_width = p_intf->p_vout->i_width;
p_intf->p_sys->i_height = p_intf->p_vout->i_height;
XResizeWindow( p_intf->p_sys->p_display, p_intf->p_sys->window,
{
if( p_intf->p_sys->i_ss_count++ == 0 )
{
- intf_Msg( "Enabling screen saver\n" );
+ intf_Msg( "Enabling screen saver" );
XSetScreenSaver( p_intf->p_sys->p_display, p_intf->p_sys->i_ss_timeout,
p_intf->p_sys->i_ss_interval, p_intf->p_sys->i_ss_blanking,
p_intf->p_sys->i_ss_exposure );
&p_intf->p_sys->i_ss_exposure );
/* Disable screen saver */
- intf_Msg("Disabling screen saver\n");
+ intf_Msg("Disabling screen saver");
XSetScreenSaver( p_intf->p_sys->p_display, 0,
p_intf->p_sys->i_ss_interval, p_intf->p_sys->i_ss_blanking,
p_intf->p_sys->i_ss_exposure );
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM) );
+ intf_ErrMsg("error: %s", strerror(ENOMEM) );
return( 1 );
}
* id is still valid. */
if( X11OpenDisplay( p_vout, psz_display, i_root_window, p_data ) )
{
- intf_ErrMsg("error: can't initialize X11 display\n" );
+ intf_ErrMsg("error: can't initialize X11 display" );
free( p_vout->p_sys );
return( 1 );
}
}
if( i_err ) /* an error occured */
{
- intf_Msg("XShm video sextension deactivated\n" );
+ intf_Msg("XShm video sextension deactivated" );
p_vout->p_sys->b_shm = 0;
}
}
{
if( X11CreateImage( p_vout, &p_vout->p_sys->p_ximage[0] ) )
{
- intf_ErrMsg("error: can't create images\n");
+ intf_ErrMsg("error: can't create images");
p_vout->p_sys->p_ximage[0] = NULL;
p_vout->p_sys->p_ximage[1] = NULL;
return( 1 );
}
if( X11CreateImage( p_vout, &p_vout->p_sys->p_ximage[1] ) )
{
- intf_ErrMsg("error: can't create images\n");
+ intf_ErrMsg("error: can't create images");
X11DestroyImage( p_vout->p_sys->p_ximage[0] );
p_vout->p_sys->p_ximage[0] = NULL;
p_vout->p_sys->p_ximage[1] = NULL;
*/
if( p_vout->i_changes & VOUT_SIZE_CHANGE )
{
- intf_DbgMsg("resizing window\n");
+ intf_DbgMsg("resizing window");
p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
/* Resize window */
/* Recreate XImages. If SysInit failed, the thread can't go on. */
if( vout_X11Init( p_vout ) )
{
- intf_ErrMsg("error: can't resize display\n");
+ intf_ErrMsg("error: can't resize display");
return( 1 );
}
* tables. This is needed since conversion buffer size may have
* changed */
p_vout->i_changes |= VOUT_YUV_CHANGE;
- intf_Msg("Video display resized (%dx%d)\n", p_vout->i_width, p_vout->i_height);
+ intf_Msg("Video display resized (%dx%d)", p_vout->i_width, p_vout->i_height);
}
return 0;
int i;
XColor color[255];
- intf_DbgMsg( "Palette change called\n" );
+ intf_DbgMsg( "Palette change called" );
/* allocate palette */
for( i = 0; i < 255; i++ )
p_vout->p_sys->p_display = XOpenDisplay( psz_display );
if( p_vout->p_sys->p_display == NULL )
{
- intf_ErrMsg("error: can't open display %s\n", psz_display );
+ intf_ErrMsg("error: can't open display %s", psz_display );
return( 1 );
}
p_vout->p_sys->i_screen = DefaultScreen( p_vout->p_sys->p_display );
if( !p_vout->p_sys->b_shm )
{
- intf_Msg("XShm video extension is not available\n");
+ intf_Msg("XShm video extension is not available");
}
/* Get screen depth */
&xvisual_template, &i_count );
if( p_xvisual == NULL )
{
- intf_ErrMsg("error: no PseudoColor visual available\n");
+ intf_ErrMsg("error: no PseudoColor visual available");
XCloseDisplay( p_vout->p_sys->p_display );
return( 1 );
}
&xvisual_template, &i_count );
if( p_xvisual == NULL )
{
- intf_ErrMsg("error: no TrueColor visual available\n");
+ intf_ErrMsg("error: no TrueColor visual available");
XCloseDisplay( p_vout->p_sys->p_display );
return( 1 );
}
/* Create a window */
if( X11CreateWindow( p_vout ) )
{
- intf_ErrMsg("error: can't open a window\n");
+ intf_ErrMsg("error: can't open a window");
XCloseDisplay( p_vout->p_sys->p_display );
return( 1 );
}
pb_data = (byte_t *) malloc( p_vout->i_bytes_per_line * p_vout->i_height );
if( !pb_data ) /* error */
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM));
+ intf_ErrMsg("error: %s", strerror(ENOMEM));
return( 1 );
}
p_vout->i_width, p_vout->i_height, i_quantum, 0);
if(! *pp_ximage ) /* error */
{
- intf_ErrMsg( "error: XCreateImage() failed\n" );
+ intf_ErrMsg( "error: XCreateImage() failed" );
free( pb_data );
return( 1 );
}
p_shm_info, p_vout->i_width, p_vout->i_height );
if(! *pp_ximage ) /* error */
{
- intf_ErrMsg("error: XShmCreateImage() failed\n");
+ intf_ErrMsg("error: XShmCreateImage() failed");
return( 1 );
}
IPC_CREAT | 0777);
if( p_shm_info->shmid < 0) /* error */
{
- intf_ErrMsg("error: can't allocate shared image data (%s)\n",
+ intf_ErrMsg("error: can't allocate shared image data (%s)",
strerror(errno));
XDestroyImage( *pp_ximage );
return( 1 );
p_shm_info->shmaddr = (*pp_ximage)->data = shmat(p_shm_info->shmid, 0, 0);
if(! p_shm_info->shmaddr )
{ /* error */
- intf_ErrMsg("error: can't attach shared memory (%s)\n",
+ intf_ErrMsg("error: can't attach shared memory (%s)",
strerror(errno));
shmctl( p_shm_info->shmid, IPC_RMID, 0 ); /* free shared memory */
XDestroyImage( *pp_ximage );
p_shm_info->readOnly = True;
if( XShmAttach( p_vout->p_sys->p_display, p_shm_info ) == False ) /* error */
{
- intf_ErrMsg("error: can't attach shared memory to X11 server\n");
+ intf_ErrMsg("error: can't attach shared memory to X11 server");
shmdt( p_shm_info->shmaddr ); /* detach shared memory from process
* and automatic free */
XDestroyImage( *pp_ximage );
XDestroyImage( p_ximage );
if( shmdt( p_shm_info->shmaddr ) ) /* detach shared memory from process */
{ /* also automatic freeing... */
- intf_ErrMsg( "error: can't detach shared memory (%s)\n",
+ intf_ErrMsg( "error: can't detach shared memory (%s)",
strerror(errno) );
}
}
p_vout->yuv.p_base = malloc( tables_size );
if( p_vout->yuv.p_base == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM));
+ intf_ErrMsg("error: %s", strerror(ENOMEM));
return( 1 );
}
p_vout->yuv.p_buffer = malloc( VOUT_MAX_WIDTH * p_vout->i_bytes_per_pixel );
if( p_vout->yuv.p_buffer == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM));
+ intf_ErrMsg("error: %s", strerror(ENOMEM));
free( p_vout->yuv.p_base );
return( 1 );
}
( ( p_vout->i_bytes_per_pixel == 1 ) ? 2 : 1 ) );
if( p_vout->yuv.p_offset == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM));
+ intf_ErrMsg("error: %s", strerror(ENOMEM));
free( p_vout->yuv.p_base );
free( p_vout->yuv.p_buffer );
return( 1 );
&& r <= RGB_MAX && g <= RGB_MAX && b <= RGB_MAX )
{
/* this one should never happen unless someone fscked up my code */
- if(j == 256) { intf_ErrMsg( "vout error: no colors left to build palette\n" ); break; }
+ if(j == 256) { intf_ErrMsg( "vout error: no colors left to build palette" ); break; }
/* clip the colors */
red[j] = CLIP( r );
*****************************************************************************/
void ConvertY4Gray24( YUV_ARGS_24BPP )
{
- intf_ErrMsg( "yuv error: unhandled function, grayscale, bpp = 24\n" );
+ intf_ErrMsg( "yuv error: unhandled function, grayscale, bpp = 24" );
}
/*****************************************************************************
*****************************************************************************/
void ConvertYUV420RGB24( YUV_ARGS_24BPP )
{
- intf_ErrMsg( "yuv error: unhandled function, chroma = 420, bpp = 24\n" );
+ intf_ErrMsg( "yuv error: unhandled function, chroma = 420, bpp = 24" );
}
/*****************************************************************************
*****************************************************************************/
void ConvertYUV422RGB24( YUV_ARGS_24BPP )
{
- intf_ErrMsg( "yuv error: unhandled function, chroma = 422, bpp = 24\n" );
+ intf_ErrMsg( "yuv error: unhandled function, chroma = 422, bpp = 24" );
}
/*****************************************************************************
*****************************************************************************/
void ConvertYUV444RGB24( YUV_ARGS_24BPP )
{
- intf_ErrMsg( "yuv error: unhandled function, chroma = 444, bpp = 24\n" );
+ intf_ErrMsg( "yuv error: unhandled function, chroma = 444, bpp = 24" );
}
*****************************************************************************/
void ConvertYUV422RGB8( YUV_ARGS_8BPP )
{
- intf_ErrMsg( "yuv error: unhandled function, chroma = 422, bpp = 8\n" );
+ intf_ErrMsg( "yuv error: unhandled function, chroma = 422, bpp = 8" );
}
/*****************************************************************************
*****************************************************************************/
void ConvertYUV444RGB8( YUV_ARGS_8BPP )
{
- intf_ErrMsg( "yuv error: unhandled function, chroma = 444, bpp = 8\n" );
+ intf_ErrMsg( "yuv error: unhandled function, chroma = 444, bpp = 8" );
}
p_vout->yuv.p_base = malloc( tables_size );
if( p_vout->yuv.p_base == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM));
+ intf_ErrMsg("error: %s", strerror(ENOMEM));
return( 1 );
}
}
p_vout->yuv.p_buffer = malloc( VOUT_MAX_WIDTH * p_vout->i_bytes_per_pixel );
if( p_vout->yuv.p_buffer == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM));
+ intf_ErrMsg("error: %s", strerror(ENOMEM));
free( p_vout->yuv.p_base );
return( 1 );
}
p_vout->yuv.p_offset = malloc( p_vout->i_width * sizeof( int ) );
if( p_vout->yuv.p_offset == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM));
+ intf_ErrMsg("error: %s", strerror(ENOMEM));
free( p_vout->yuv.p_base );
free( p_vout->yuv.p_buffer );
return( 1 );
&& r <= RGB_MAX && g <= RGB_MAX && b <= RGB_MAX )
{
/* this one should never happen unless someone fscked up my code */
- if(j == 256) { intf_ErrMsg( "vout error: no colors left to build palette\n" ); break; }
+ if(j == 256) { intf_ErrMsg( "vout error: no colors left to build palette" ); break; }
/* clip the colors */
red[j] = CLIP( r );
*****************************************************************************/
void ConvertYUV422RGB16( YUV_ARGS_16BPP )
{
- intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 422, bpp = 16\n" );
+ intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 422, bpp = 16" );
}
/*****************************************************************************
*****************************************************************************/
void ConvertYUV444RGB16( YUV_ARGS_16BPP )
{
- intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 444, bpp = 16\n" );
+ intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 444, bpp = 16" );
}
*****************************************************************************/
void ConvertY4Gray24( YUV_ARGS_24BPP )
{
- intf_ErrMsg( "yuvmmx error: unhandled function, grayscale, bpp = 24\n" );
+ intf_ErrMsg( "yuvmmx error: unhandled function, grayscale, bpp = 24" );
}
/*****************************************************************************
*****************************************************************************/
void ConvertYUV420RGB24( YUV_ARGS_24BPP )
{
- intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 420, bpp = 24\n" );
+ intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 420, bpp = 24" );
}
/*****************************************************************************
*****************************************************************************/
void ConvertYUV422RGB24( YUV_ARGS_24BPP )
{
- intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 422, bpp = 24\n" );
+ intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 422, bpp = 24" );
}
/*****************************************************************************
*****************************************************************************/
void ConvertYUV444RGB24( YUV_ARGS_24BPP )
{
- intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 444, bpp = 24\n" );
+ intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 444, bpp = 24" );
}
*****************************************************************************/
void ConvertY4Gray32( YUV_ARGS_32BPP )
{
- intf_ErrMsg( "yuvmmx error: unhandled function, grayscale, bpp = 32\n" );
+ intf_ErrMsg( "yuvmmx error: unhandled function, grayscale, bpp = 32" );
}
/*****************************************************************************
*****************************************************************************/
void ConvertYUV422RGB32( YUV_ARGS_32BPP )
{
- intf_ErrMsg( "yuv error: unhandled function, chroma = 422, bpp = 32\n" );
+ intf_ErrMsg( "yuv error: unhandled function, chroma = 422, bpp = 32" );
}
/*****************************************************************************
*****************************************************************************/
void ConvertYUV444RGB32( YUV_ARGS_32BPP )
{
- intf_ErrMsg( "yuv error: unhandled function, chroma = 444, bpp = 32\n" );
+ intf_ErrMsg( "yuv error: unhandled function, chroma = 444, bpp = 32" );
}
*****************************************************************************/
void ConvertY4Gray8( YUV_ARGS_8BPP )
{
- intf_ErrMsg( "yuvmmx error: unhandled function, grayscale, bpp = 8\n" );
+ intf_ErrMsg( "yuvmmx error: unhandled function, grayscale, bpp = 8" );
}
/*****************************************************************************
*****************************************************************************/
void ConvertYUV420RGB8( YUV_ARGS_8BPP )
{
- intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 420, bpp = 8\n" );
+ intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 420, bpp = 8" );
}
/*****************************************************************************
*****************************************************************************/
void ConvertYUV422RGB8( YUV_ARGS_8BPP )
{
- intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 422, bpp = 8\n" );
+ intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 422, bpp = 8" );
}
/*****************************************************************************
*****************************************************************************/
void ConvertYUV444RGB8( YUV_ARGS_8BPP )
{
- intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 444, bpp = 8\n" );
+ intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 444, bpp = 8" );
}
* ac3_decoder_thread.c: ac3 decoder thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: ac3_decoder_thread.c,v 1.20 2000/12/21 14:18:15 massiot Exp $
+ * $Id: ac3_decoder_thread.c,v 1.21 2000/12/22 13:04:44 sam Exp $
*
* Authors:
*
{
ac3dec_thread_t * p_ac3dec;
- intf_DbgMsg( "ac3dec debug: creating ac3 decoder thread\n" );
+ intf_DbgMsg( "ac3dec debug: creating ac3 decoder thread" );
/* Allocate the memory needed to store the thread's structure */
if ((p_ac3dec = (ac3dec_thread_t *)malloc (sizeof(ac3dec_thread_t))) == NULL)
{
intf_ErrMsg ( "ac3dec error: not enough memory "
- "for ac3dec_CreateThread() to create the new thread\n");
+ "for ac3dec_CreateThread() to create the new thread");
return 0;
}
/* Spawn the ac3 decoder thread */
if (vlc_thread_create(&p_ac3dec->thread_id, "ac3 decoder", (vlc_thread_func_t)RunThread, (void *)p_ac3dec))
{
- intf_ErrMsg( "ac3dec error: can't spawn ac3 decoder thread\n" );
+ intf_ErrMsg( "ac3dec error: can't spawn ac3 decoder thread" );
free (p_ac3dec);
return 0;
}
- intf_DbgMsg ("ac3dec debug: ac3 decoder thread (%p) created\n", p_ac3dec);
+ intf_DbgMsg ("ac3dec debug: ac3 decoder thread (%p) created", p_ac3dec);
return p_ac3dec->thread_id;
}
aout_fifo_t aout_fifo;
ac3_byte_stream_t * byte_stream;
- intf_DbgMsg ("ac3dec debug: initializing ac3 decoder thread %p\n", p_ac3dec);
+ intf_DbgMsg ("ac3dec debug: initializing ac3 decoder thread %p", p_ac3dec);
/* Get the first data packet. */
vlc_mutex_lock( &p_ac3dec->p_fifo->data_lock );
return -1;
}
- intf_DbgMsg ("ac3dec debug: ac3 decoder thread %p initialized\n", p_ac3dec);
+ intf_DbgMsg ("ac3dec debug: ac3 decoder thread %p initialized", p_ac3dec);
return 0;
}
{
int sync;
- intf_DbgMsg ("ac3dec debug: running ac3 decoder thread (%p) (pid == %i)\n", p_ac3dec, getpid());
+ intf_DbgMsg ("ac3dec debug: running ac3 decoder thread (%p) (pid == %i)", p_ac3dec, getpid());
/* FIXME ! Qu'est-ce que c'est que ce bordel !?!?!?!? --Meuuh */
//msleep (INPUT_PTS_DELAY);
int ptr;
ac3_byte_stream_t * p_byte_stream;
- intf_DbgMsg ("ac3dec: sync\n");
+ intf_DbgMsg ("ac3dec: sync");
p_byte_stream = ac3_byte_stream (&p_ac3dec->ac3_decoder);
*****************************************************************************/
static void EndThread (ac3dec_thread_t * p_ac3dec)
{
- intf_DbgMsg ("ac3dec debug: destroying ac3 decoder thread %p\n", p_ac3dec);
+ intf_DbgMsg ("ac3dec debug: destroying ac3 decoder thread %p", p_ac3dec);
/* If the audio output fifo was created, we destroy it */
if (p_ac3dec->p_aout_fifo != NULL)
free( p_ac3dec->p_config );
free( p_ac3dec );
- intf_DbgMsg ("ac3dec debug: ac3 decoder thread %p destroyed\n", p_ac3dec);
+ intf_DbgMsg ("ac3dec debug: ac3 decoder thread %p destroyed", p_ac3dec);
}
void ac3_byte_stream_next (ac3_byte_stream_t * p_byte_stream)
/*
if (p_ac3dec->bsi.acmod > 7)
- intf_ErrMsg( "ac3dec: (downmix) invalid acmod number\n" );
+ intf_ErrMsg( "ac3dec: (downmix) invalid acmod number" );
*/
/* There are two main cases, with or without Dolby Surround */
case EXP_D15: /* 1 */
for (i = 0; i < ngrps; i++) {
if (exps[i] > 124) {
- intf_ErrMsg ( "ac3dec error: invalid exponent\n" );
+ intf_ErrMsg ( "ac3dec error: invalid exponent" );
return 1;
}
exp_acc += (exps_1[exps[i]] /*- 2*/);
case EXP_D25: /* 2 */
for (i = 0; i < ngrps; i++) {
if (exps[i] > 124) {
- intf_ErrMsg ( "ac3dec error: invalid exponent\n" );
+ intf_ErrMsg ( "ac3dec error: invalid exponent" );
return 1;
}
exp_acc += (exps_1[exps[i]] /*- 2*/);
case EXP_D45: /* 3 */
for (i = 0; i < ngrps; i++) {
if (exps[i] > 124) {
- intf_ErrMsg ( "ac3dec error: invalid exponent\n" );
+ intf_ErrMsg ( "ac3dec error: invalid exponent" );
return 1;
}
exp_acc += (exps_1[exps[i]] /*- 2*/);
group_code = p_ac3dec->bit_stream.buffer >> (32 - 5);
DumpBits (&(p_ac3dec->bit_stream), 5);
if (group_code >= 27) {
- intf_ErrMsg ( "ac3dec error: invalid mantissa\n" );
+ intf_ErrMsg ( "ac3dec error: invalid mantissa" );
}
q_1[ 1 ] = q_1_1[ group_code ];
DumpBits (&(p_ac3dec->bit_stream), 7);
if (group_code >= 125) {
- intf_ErrMsg ( "ac3dec error: invalid mantissa\n" );
+ intf_ErrMsg ( "ac3dec error: invalid mantissa" );
}
q_2[ 1 ] = q_2_1[ group_code ];
DumpBits (&(p_ac3dec->bit_stream), 3);
if (group_code >= 7) {
- intf_ErrMsg ( "ac3dec error: invalid mantissa\n" );
+ intf_ErrMsg ( "ac3dec error: invalid mantissa" );
}
return (q_3[group_code] * exp_lut[exp]);
DumpBits (&(p_ac3dec->bit_stream), 7);
if (group_code >= 121) {
- intf_ErrMsg ( "ac3dec error: invalid mantissa\n" );
+ intf_ErrMsg ( "ac3dec error: invalid mantissa" );
}
q_4[ 0 ] = q_4_1[ group_code ];
DumpBits (&(p_ac3dec->bit_stream), 4);
if (group_code >= 15) {
- intf_ErrMsg ( "ac3dec error: invalid mantissa\n" );
+ intf_ErrMsg ( "ac3dec error: invalid mantissa" );
}
return (q_5[group_code] * exp_lut[exp]);
/* XXX rewrite the byte counting system to reduce overhead */
#if 0
- intf_DbgMsg ( "skip %d\n",
+ intf_DbgMsg ( "skip %d",
p_adec->frame_size - p_adec->bit_stream.total_bytes_read );
#endif
* audio_decoder.c: MPEG audio decoder thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: audio_decoder.c,v 1.41 2000/12/21 14:18:15 massiot Exp $
+ * $Id: audio_decoder.c,v 1.42 2000/12/22 13:04:44 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
{
adec_thread_t * p_adec;
- intf_DbgMsg ( "adec debug: creating audio decoder thread\n" );
+ intf_DbgMsg ( "adec debug: creating audio decoder thread" );
/* Allocate the memory needed to store the thread's structure */
if ( (p_adec = (adec_thread_t *)malloc (sizeof(adec_thread_t))) == NULL )
{
- intf_ErrMsg ( "adec error: not enough memory for adec_CreateThread() to create the new thread\n" );
+ intf_ErrMsg ( "adec error: not enough memory for adec_CreateThread() to create the new thread" );
return 0;
}
/* Spawn the audio decoder thread */
if ( vlc_thread_create(&p_adec->thread_id, "audio decoder", (vlc_thread_func_t)RunThread, (void *)p_adec) )
{
- intf_ErrMsg ("adec error: can't spawn audio decoder thread\n");
+ intf_ErrMsg ("adec error: can't spawn audio decoder thread");
free (p_adec);
return 0;
}
- intf_DbgMsg ("adec debug: audio decoder thread (%p) created\n", p_adec);
+ intf_DbgMsg ("adec debug: audio decoder thread (%p) created", p_adec);
return p_adec->thread_id;
}
aout_fifo_t aout_fifo;
adec_byte_stream_t * byte_stream;
- intf_DbgMsg ("adec debug: initializing audio decoder thread %p\n", p_adec);
+ intf_DbgMsg ("adec debug: initializing audio decoder thread %p", p_adec);
/* Our first job is to initialize the bit stream structure with the
* beginning of the input stream */
return -1;
}
- intf_DbgMsg ( "adec debug: audio decoder thread %p initialized\n", p_adec );
+ intf_DbgMsg ( "adec debug: audio decoder thread %p initialized", p_adec );
return 0;
}
{
int sync;
- intf_DbgMsg ( "adec debug: running audio decoder thread (%p) (pid == %i)\n", p_adec, getpid() );
+ intf_DbgMsg ( "adec debug: running audio decoder thread (%p) (pid == %i)", p_adec, getpid() );
/* You really suck */
//msleep ( INPUT_PTS_DELAY );
/* have to find a synchro point */
adec_byte_stream_t * p_byte_stream;
- intf_DbgMsg ( "adec: sync\n" );
+ intf_DbgMsg ( "adec: sync" );
p_byte_stream = adec_byte_stream ( &p_adec->audio_decoder );
/* FIXME: the check will be done later, am I right ? */
*****************************************************************************/
static void EndThread ( adec_thread_t *p_adec )
{
- intf_DbgMsg ( "adec debug: destroying audio decoder thread %p\n", p_adec );
+ intf_DbgMsg ( "adec debug: destroying audio decoder thread %p", p_adec );
/* If the audio output fifo was created, we destroy it */
if ( p_adec->p_aout_fifo != NULL )
free( p_adec->p_config );
free( p_adec );
- intf_DbgMsg ("adec debug: audio decoder thread %p destroyed\n", p_adec);
+ intf_DbgMsg ("adec debug: audio decoder thread %p destroyed", p_adec);
}
void adec_byte_stream_next ( adec_byte_stream_t * p_byte_stream )
long l_bytes;
void * aout_thread = NULL;
- intf_DbgMsg("aout debug: spawning audio output thread (%p)\n", p_aout);
+ intf_DbgMsg("aout debug: spawning audio output thread (%p)", p_aout);
/* We want the audio output thread to live */
p_aout->b_die = 0;
break;
default:
- intf_ErrMsg( "aout error: unknown audio output format (%i)\n",
+ intf_ErrMsg( "aout error: unknown audio output format (%i)",
p_aout->i_format );
return( -1 );
}
break;
default:
- intf_ErrMsg("aout error: unknown audio output format (%i)\n",
+ intf_ErrMsg("aout error: unknown audio output format (%i)",
p_aout->i_format);
return( -1 );
}
break;
default:
- intf_ErrMsg("aout error: unknown number of audio channels (%i)\n",
+ intf_ErrMsg("aout error: unknown number of audio channels (%i)",
p_aout->i_channels );
return( -1 );
}
* the s32 buffer's memory */
if ( (p_aout->buffer = malloc(l_bytes)) == NULL )
{
- intf_ErrMsg("aout error: not enough memory to create the output buffer\n");
+ intf_ErrMsg("aout error: not enough memory to create the output buffer");
return( -1 );
}
if ( (p_aout->s32_buffer = (s32 *)calloc(p_aout->l_units, sizeof(s32) << ( p_aout->b_stereo))) == NULL )
{
- intf_ErrMsg("aout error: not enough memory to create the s32 output buffer\n");
+ intf_ErrMsg("aout error: not enough memory to create the s32 output buffer");
free( p_aout->buffer );
return( -1 );
}
/* Launch the thread */
if ( vlc_thread_create( &p_aout->thread_id, "audio output", (vlc_thread_func_t)aout_thread, p_aout ) )
{
- intf_ErrMsg("aout error: can't spawn audio output thread (%p)\n", p_aout);
+ intf_ErrMsg("aout error: can't spawn audio output thread (%p)", p_aout);
free( p_aout->buffer );
free( p_aout->s32_buffer );
return( -1 );
}
- intf_DbgMsg("aout debug: audio output thread (%p) spawned\n", p_aout);
+ intf_DbgMsg("aout debug: audio output thread (%p) spawned", p_aout);
return( 0 );
}
{
/* FIXME: pi_status is not handled correctly: check vout how to do!?? */
- intf_DbgMsg("aout debug: requesting termination of audio output thread (%p)\n", p_aout);
+ intf_DbgMsg("aout debug: requesting termination of audio output thread (%p)", p_aout);
/* Ask thread to kill itself and wait until it's done */
p_aout->b_die = 1;
/* Free the structure */
p_aout->p_sys_close( p_aout );
- intf_DbgMsg("aout debug: audio device (%s) closed\n", p_aout->psz_device);
+ intf_DbgMsg("aout debug: audio device (%s) closed", p_aout->psz_device);
/* Free structure */
free( p_aout );
}
if ( i_fifo == AOUT_MAX_FIFOS )
{
- intf_ErrMsg("aout error: no empty fifo available\n");
+ intf_ErrMsg("aout error: no empty fifo available");
vlc_mutex_unlock( &p_aout->fifos_lock );
return( NULL );
}
* for (AOUT_FIFO_SIZE+1) audio frames. */
if ( (p_aout->fifo[i_fifo].buffer = malloc( sizeof(s16)*(AOUT_FIFO_SIZE+1)*p_fifo->l_frame_size )) == NULL )
{
- intf_ErrMsg("aout error: not enough memory to create the frames buffer\n");
+ intf_ErrMsg("aout error: not enough memory to create the frames buffer");
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO;
vlc_mutex_unlock( &p_aout->fifos_lock );
return( NULL );
/* Allocate the memory needed to store the dates of the frames */
if ( (p_aout->fifo[i_fifo].date = (mtime_t *)malloc( sizeof(mtime_t)*(AOUT_FIFO_SIZE+1) )) == NULL )
{
- intf_ErrMsg("aout error: not enough memory to create the dates buffer\n");
+ intf_ErrMsg("aout error: not enough memory to create the dates buffer");
free( p_aout->fifo[i_fifo].buffer );
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO;
vlc_mutex_unlock( &p_aout->fifos_lock );
break;
default:
- intf_ErrMsg("aout error: unknown fifo type (%i)\n", p_aout->fifo[i_fifo].i_type);
+ intf_ErrMsg("aout error: unknown fifo type (%i)", p_aout->fifo[i_fifo].i_type);
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO;
vlc_mutex_unlock( &p_aout->fifos_lock );
return( NULL );
vlc_mutex_unlock( &p_aout->fifos_lock );
/* Return the pointer to the fifo structure */
- intf_DbgMsg("aout debug: audio output fifo (%p) allocated\n", &p_aout->fifo[i_fifo]);
+ intf_DbgMsg("aout debug: audio output fifo (%p) allocated", &p_aout->fifo[i_fifo]);
return( &p_aout->fifo[i_fifo] );
}
*****************************************************************************/
void aout_DestroyFifo( aout_fifo_t * p_fifo )
{
- intf_DbgMsg("aout debug: requesting destruction of audio output fifo (%p)\n", p_fifo);
+ intf_DbgMsg("aout debug: requesting destruction of audio output fifo (%p)", p_fifo);
p_fifo->b_die = 1;
}
l_units = ((p_fifo->l_next_frame - p_fifo->l_start_frame) & AOUT_FIFO_SIZE) * (p_fifo->l_frame_size >> (p_fifo->b_stereo));
l_rate = p_fifo->l_rate + ((aout_date - p_fifo->date[p_fifo->l_start_frame]) / 256);
- intf_DbgMsg( "aout debug: %lli (%li);\n", aout_date - p_fifo->date[p_fifo->l_start_frame], l_rate );
+ intf_DbgMsg( "aout debug: %lli (%li);", aout_date - p_fifo->date[p_fifo->l_start_frame], l_rate );
InitializeIncrement( &p_fifo->unit_increment, l_rate, p_aout->l_rate );
long l_buffer, l_buffer_limit;
long l_units, l_bytes;
- intf_DbgMsg("adec debug: running audio output U8_M_thread (%p) (pid == %i)\n", p_aout, getpid());
+ intf_DbgMsg("adec debug: running audio output U8_M_thread (%p) (pid == %i)", p_aout, getpid());
/* As the s32_buffer was created with calloc(), we don't have to set this
* memory to zero and we can immediately jump into the thread's loop */
}
free( p_aout->fifo[i_fifo].buffer ); /* !! */
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO; /* !! */
- intf_DbgMsg("aout debug: audio output fifo (%p) destroyed\n", &p_aout->fifo[i_fifo]); /* !! */
+ intf_DbgMsg("aout debug: audio output fifo (%p) destroyed", &p_aout->fifo[i_fifo]); /* !! */
}
break;
}
free( p_aout->fifo[i_fifo].buffer ); /* !! */
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO; /* !! */
- intf_DbgMsg("aout debug: audio output fifo (%p) destroyed\n", &p_aout->fifo[i_fifo]); /* !! */
+ intf_DbgMsg("aout debug: audio output fifo (%p) destroyed", &p_aout->fifo[i_fifo]); /* !! */
}
break;
free( p_aout->fifo[i_fifo].buffer );
free( p_aout->fifo[i_fifo].date );
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO; /* !! */
- intf_DbgMsg("aout debug: audio output fifo (%p) destroyed\n", &p_aout->fifo[i_fifo]);
+ intf_DbgMsg("aout debug: audio output fifo (%p) destroyed", &p_aout->fifo[i_fifo]);
continue;
}
free( p_aout->fifo[i_fifo].buffer );
free( p_aout->fifo[i_fifo].date );
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO; /* !! */
- intf_DbgMsg("aout debug: audio output fifo (%p) destroyed\n", &p_aout->fifo[i_fifo]);
+ intf_DbgMsg("aout debug: audio output fifo (%p) destroyed", &p_aout->fifo[i_fifo]);
continue;
}
break;
default:
- intf_DbgMsg("aout debug: unknown fifo type (%i)\n", p_aout->fifo[i_fifo].i_type);
+ intf_DbgMsg("aout debug: unknown fifo type (%i)", p_aout->fifo[i_fifo].i_type);
break;
}
}
case AOUT_INTF_STEREO_FIFO:
free( p_aout->fifo[i_fifo].buffer ); /* !! */
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO; /* !! */
- intf_DbgMsg("aout debug: audio output fifo (%p) destroyed\n", &p_aout->fifo[i_fifo]);
+ intf_DbgMsg("aout debug: audio output fifo (%p) destroyed", &p_aout->fifo[i_fifo]);
break;
case AOUT_ADEC_MONO_FIFO:
free( p_aout->fifo[i_fifo].buffer );
free( p_aout->fifo[i_fifo].date );
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO; /* !! */
- intf_DbgMsg("aout debug: audio output fifo (%p) destroyed\n", &p_aout->fifo[i_fifo]);
+ intf_DbgMsg("aout debug: audio output fifo (%p) destroyed", &p_aout->fifo[i_fifo]);
break;
default:
long l_buffer, l_buffer_limit;
long l_units, l_bytes;
- intf_DbgMsg("adec debug: running audio output U8_S_thread (%p) (pid == %i)\n", p_aout, getpid());
+ intf_DbgMsg("adec debug: running audio output U8_S_thread (%p) (pid == %i)", p_aout, getpid());
/* As the s32_buffer was created with calloc(), we don't have to set this
* memory to zero and we can immediately jump into the thread's loop */
}
free( p_aout->fifo[i_fifo].buffer ); /* !! */
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO; /* !! */
- intf_DbgMsg("aout debug: audio output fifo (%p) destroyed\n", &p_aout->fifo[i_fifo]); /* !! */
+ intf_DbgMsg("aout debug: audio output fifo (%p) destroyed", &p_aout->fifo[i_fifo]); /* !! */
}
break;
}
free( p_aout->fifo[i_fifo].buffer ); /* !! */
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO; /* !! */
- intf_DbgMsg("aout debug: audio output fifo (%p) destroyed\n", &p_aout->fifo[i_fifo]); /* !! */
+ intf_DbgMsg("aout debug: audio output fifo (%p) destroyed", &p_aout->fifo[i_fifo]); /* !! */
}
break;
free( p_aout->fifo[i_fifo].buffer );
free( p_aout->fifo[i_fifo].date );
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO; /* !! */
- intf_DbgMsg("aout debug: audio output fifo (%p) destroyed\n", &p_aout->fifo[i_fifo]);
+ intf_DbgMsg("aout debug: audio output fifo (%p) destroyed", &p_aout->fifo[i_fifo]);
continue;
}
free( p_aout->fifo[i_fifo].buffer );
free( p_aout->fifo[i_fifo].date );
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO; /* !! */
- intf_DbgMsg("aout debug: audio output fifo (%p) destroyed\n", &p_aout->fifo[i_fifo]);
+ intf_DbgMsg("aout debug: audio output fifo (%p) destroyed", &p_aout->fifo[i_fifo]);
continue;
}
break;
default:
- intf_DbgMsg("aout debug: unknown fifo type (%i)\n", p_aout->fifo[i_fifo].i_type);
+ intf_DbgMsg("aout debug: unknown fifo type (%i)", p_aout->fifo[i_fifo].i_type);
break;
}
}
case AOUT_INTF_STEREO_FIFO:
free( p_aout->fifo[i_fifo].buffer ); /* !! */
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO; /* !! */
- intf_DbgMsg("aout debug: audio output fifo (%p) destroyed\n", &p_aout->fifo[i_fifo]);
+ intf_DbgMsg("aout debug: audio output fifo (%p) destroyed", &p_aout->fifo[i_fifo]);
break;
case AOUT_ADEC_MONO_FIFO:
free( p_aout->fifo[i_fifo].buffer );
free( p_aout->fifo[i_fifo].date );
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO; /* !! */
- intf_DbgMsg("aout debug: audio output fifo (%p) destroyed\n", &p_aout->fifo[i_fifo]);
+ intf_DbgMsg("aout debug: audio output fifo (%p) destroyed", &p_aout->fifo[i_fifo]);
break;
default:
long l_buffer, l_buffer_limit;
long l_units, l_bytes;
- intf_DbgMsg("adec debug: running audio output S16_S_thread (%p) (pid == %i)\n", p_aout, getpid());
+ intf_DbgMsg("adec debug: running audio output S16_S_thread (%p) (pid == %i)", p_aout, getpid());
/* As the s32_buffer was created with calloc(), we don't have to set this
* memory to zero and we can immediately jump into the thread's loop */
}
free( p_aout->fifo[i_fifo].buffer ); /* !! */
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO; /* !! */
- intf_DbgMsg("aout debug: audio output fifo (%p) destroyed\n", &p_aout->fifo[i_fifo]); /* !! */
+ intf_DbgMsg("aout debug: audio output fifo (%p) destroyed", &p_aout->fifo[i_fifo]); /* !! */
}
break;
}
free( p_aout->fifo[i_fifo].buffer ); /* !! */
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO; /* !! */
- intf_DbgMsg("aout debug: audio output fifo (%p) destroyed\n", &p_aout->fifo[i_fifo]); /* !! */
+ intf_DbgMsg("aout debug: audio output fifo (%p) destroyed", &p_aout->fifo[i_fifo]); /* !! */
}
break;
free( p_aout->fifo[i_fifo].buffer );
free( p_aout->fifo[i_fifo].date );
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO; /* !! */
- intf_DbgMsg("aout debug: audio output fifo (%p) destroyed\n", &p_aout->fifo[i_fifo]);
+ intf_DbgMsg("aout debug: audio output fifo (%p) destroyed", &p_aout->fifo[i_fifo]);
continue;
}
free( p_aout->fifo[i_fifo].buffer );
free( p_aout->fifo[i_fifo].date );
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO; /* !! */
- intf_DbgMsg("aout debug: audio output fifo (%p) destroyed\n", &p_aout->fifo[i_fifo]);
+ intf_DbgMsg("aout debug: audio output fifo (%p) destroyed", &p_aout->fifo[i_fifo]);
continue;
}
break;
default:
- intf_DbgMsg("aout debug: unknown fifo type (%i)\n", p_aout->fifo[i_fifo].i_type);
+ intf_DbgMsg("aout debug: unknown fifo type (%i)", p_aout->fifo[i_fifo].i_type);
break;
}
}
case AOUT_INTF_STEREO_FIFO:
free( p_aout->fifo[i_fifo].buffer ); /* !! */
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO; /* !! */
- intf_DbgMsg("aout debug: audio output fifo (%p) destroyed\n", &p_aout->fifo[i_fifo]);
+ intf_DbgMsg("aout debug: audio output fifo (%p) destroyed", &p_aout->fifo[i_fifo]);
break;
case AOUT_ADEC_MONO_FIFO:
free( p_aout->fifo[i_fifo].buffer );
free( p_aout->fifo[i_fifo].date );
p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO; /* !! */
- intf_DbgMsg("aout debug: audio output fifo (%p) destroyed\n", &p_aout->fifo[i_fifo]);
+ intf_DbgMsg("aout debug: audio output fifo (%p) destroyed", &p_aout->fifo[i_fifo]);
break;
default:
/* Create thread */
if( vlc_thread_create( &p_gdec->thread_id, "generic decoder", (vlc_thread_func)RunThread, (void *) p_gdec) )
{
- intf_ErrMsg("gdec error: %s\n", strerror(ENOMEM));
- intf_DbgMsg("failed\n");
+ intf_ErrMsg("gdec error: %s", strerror(ENOMEM));
+ intf_DbgMsg("failed");
free( p_gdec );
return( NULL );
}
&& (i_status != THREAD_FATAL) );
if( i_status != THREAD_READY )
{
- intf_DbgMsg("failed\n");
+ intf_DbgMsg("failed");
return( NULL );
}
}
- intf_DbgMsg("succeeded -> %p\n", p_gdec);
+ intf_DbgMsg("succeeded -> %p", p_gdec);
return( p_gdec );
}
&& (i_status != THREAD_FATAL) );
}
- intf_DbgMsg("%p -> succeeded\n", p_gdec);
+ intf_DbgMsg("%p -> succeeded", p_gdec);
}
/* following functions are local */
/* Mark thread as running and return */
*p_gdec->pi_status = THREAD_READY;
- intf_DbgMsg("%p -> succeeded\n", p_gdec);
+ intf_DbgMsg("%p -> succeeded", p_gdec);
return(0);
}
free( p_gdec ); /* destroy descriptor */
*pi_status = THREAD_OVER;
- intf_DbgMsg("%p\n", p_gdec);
+ intf_DbgMsg("%p", p_gdec);
}
/*****************************************************************************
#ifdef DEBUG
default: /* unknown id origin */
- intf_DbgMsg("unable to identify PES using input method %d\n",
+ intf_DbgMsg("unable to identify PES using input method %d",
p_gdec->p_input->i_method );
break;
#endif
{
/* Dolby AC-3 stream - might be specific to DVD PS streams */
i_type = MPEG2_AUDIO_ES;
- intf_DbgMsg("PES %p identified as AUDIO AC3\n", p_pes);
+ intf_DbgMsg("PES %p identified as AUDIO AC3", p_pes);
}
else if( (i_stream_id & 0xe0) == 0xc0 )
{
* an ISO/IEC 13818-3 is capable of decoding an ISO/IEC 11172-3 stream,
* the first one is used */
i_type = MPEG2_AUDIO_ES;
- intf_DbgMsg("PES %p identified as AUDIO MPEG\n", p_pes);
+ intf_DbgMsg("PES %p identified as AUDIO MPEG", p_pes);
}
else if( (i_stream_id & 0xf0) == 0xe0 )
{
* an ISO/IEC 13818-2 is capable of decoding an ISO/IEC 11172-2 stream,
* the first one is used */
i_type = MPEG2_VIDEO_ES;
- intf_DbgMsg("PES %p identified as VIDEO\n", p_pes);
+ intf_DbgMsg("PES %p identified as VIDEO", p_pes);
}
else
{
/* The stream could not be identified - just return */
- intf_DbgMsg("PES %p could not be identified\n", p_pes);
+ intf_DbgMsg("PES %p could not be identified", p_pes);
return;
}
sprintf(psz_pes, "id 0x%x, %d bytes",
i_stream_id, p_pes->i_pes_size );
#endif
- intf_Msg("gdec: PES %s\n", psz_pes );
+ intf_Msg("gdec: PES %s", psz_pes );
}
* decoders.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input.c,v 1.63 2000/12/21 19:24:26 massiot Exp $
+ * $Id: input.c,v 1.64 2000/12/22 13:04:44 sam Exp $
*
* Authors:
*
int i_status; /* thread status */
/* Allocate descriptor */
- intf_DbgMsg("\n");
p_input = (input_thread_t *)malloc( sizeof(input_thread_t) );
if( p_input == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(errno));
+ intf_ErrMsg("error: %s", strerror(errno));
free( p_config );
return( NULL );
}
if( vlc_thread_create( &p_input->thread_id, "input", (void *) RunThread,
(void *) p_input ) )
{
- intf_ErrMsg("error: %s\n", strerror(errno) );
+ intf_ErrMsg("error: %s", strerror(errno) );
free( p_input );
free( p_config );
return( NULL );
case INPUT_METHOD_VLAN_BCAST: /* vlan network method */
/* if( !p_main->b_vlans )
{
- intf_ErrMsg("error: vlans are not activated\n");
+ intf_ErrMsg("error: vlans are not activated");
free( p_input );
return( NULL );
} */ /* la-lala */
struct tms cpu_usage;
times( &cpu_usage );
- intf_Msg("input stats: cpu usage (user: %d, system: %d)\n",
+ intf_Msg("input stats: cpu usage (user: %d, system: %d)",
cpu_usage.tms_utime, cpu_usage.tms_stime);
}
#endif
* input_netlist.c: netlist management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_netlist.c,v 1.20 2000/12/21 13:07:45 massiot Exp $
+ * $Id: input_netlist.c,v 1.21 2000/12/22 13:04:45 sam Exp $
*
* Authors: Henri Fallon <henri@videolan.org>
*
p_input->p_method_data = malloc(sizeof(netlist_t));
if ( p_input->p_method_data == NULL )
{
- intf_ErrMsg("Unable to malloc the netlist struct\n");
+ intf_ErrMsg("Unable to malloc the netlist struct");
return (-1);
}
(byte_t *) malloc(i_buffer_size* i_nb_data );
if ( p_netlist->p_buffers == NULL )
{
- intf_ErrMsg ("Unable to malloc in netlist initialization (1)\n");
+ intf_ErrMsg ("Unable to malloc in netlist initialization (1)");
return (-1);
}
(data_packet_t *) malloc(sizeof(data_packet_t)*(i_nb_data));
if ( p_netlist->p_data == NULL )
{
- intf_ErrMsg ("Unable to malloc in netlist initialization (2)\n");
+ intf_ErrMsg ("Unable to malloc in netlist initialization (2)");
return (-1);
}
(pes_packet_t *) malloc(sizeof(pes_packet_t)*(i_nb_pes));
if ( p_netlist->p_pes == NULL )
{
- intf_ErrMsg ("Unable to malloc in netlist initialization (3)\n");
+ intf_ErrMsg ("Unable to malloc in netlist initialization (3)");
return (-1);
}
(data_packet_t **) malloc (i_nb_data * sizeof(data_packet_t *) );
if ( p_netlist->pp_free_data == NULL )
{
- intf_ErrMsg ("Unable to malloc in netlist initialization (4)\n");
+ intf_ErrMsg ("Unable to malloc in netlist initialization (4)");
}
p_netlist->pp_free_pes =
(pes_packet_t **) malloc (i_nb_pes * sizeof(pes_packet_t *) );
if ( p_netlist->pp_free_pes == NULL )
{
- intf_ErrMsg ("Unable to malloc in netlist initialization (5)\n");
+ intf_ErrMsg ("Unable to malloc in netlist initialization (5)");
}
p_netlist->p_free_iovec = ( struct iovec * )
malloc( (i_nb_data + INPUT_READ_ONCE) * sizeof(struct iovec) );
if ( p_netlist->p_free_iovec == NULL )
{
- intf_ErrMsg ("Unable to malloc in netlist initialization (6)\n");
+ intf_ErrMsg ("Unable to malloc in netlist initialization (6)");
}
/* Fill the data FIFO */
(p_netlist->i_iovec_end - p_netlist->i_iovec_start)%p_netlist->i_nb_data
< INPUT_READ_ONCE )
{
- intf_ErrMsg("Empty iovec FIFO. Unable to allocate memory\n");
+ intf_ErrMsg("Empty iovec FIFO. Unable to allocate memory");
return (NULL);
}
/* check */
if ( p_netlist->i_data_start == p_netlist->i_data_end )
{
- intf_ErrMsg("Empty Data FIFO in netlist. Unable to allocate memory\n");
+ intf_ErrMsg("Empty Data FIFO in netlist. Unable to allocate memory");
return ( NULL );
}
/* check */
if ( p_netlist->i_pes_start == p_netlist->i_pes_end )
{
- intf_ErrMsg("Empty PES FIFO in netlist - Unable to allocate memory\n");
+ intf_ErrMsg("Empty PES FIFO in netlist - Unable to allocate memory");
return ( NULL );
}
* FIXME : check the return value of realloc() and malloc() !
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_programs.c,v 1.14 2000/12/22 10:58:27 massiot Exp $
+ * $Id: input_programs.c,v 1.15 2000/12/22 13:04:45 sam Exp $
*
* Authors:
*
{
int i, j;
#define S p_input->stream
- intf_Msg( "input info: Dumping stream ID 0x%x\n", S.i_stream_id );
+ intf_Msg( "input info: Dumping stream ID 0x%x", S.i_stream_id );
if( S.b_seekable )
- intf_Msg( "input info: seekable stream, position: %d/%d\n",
+ intf_Msg( "input info: seekable stream, position: %d/%d",
S.i_tell, S.i_size );
else
- intf_Msg( "input info: %s\n", S.b_pace_control ? "pace controlled" :
+ intf_Msg( "input info: %s", S.b_pace_control ? "pace controlled" :
"pace un-controlled" );
#undef S
for( i = 0; i < p_input->stream.i_pgrm_number; i++ )
{
#define P p_input->stream.pp_programs[i]
- intf_Msg( "input info: Dumping program 0x%x, version %d (%s)\n",
+ intf_Msg( "input info: Dumping program 0x%x, version %d (%s)",
P->i_number, P->i_version,
P->b_is_ok ? "complete" : "partial" );
if( P->i_synchro_state == SYNCHRO_OK )
- intf_Msg( "input info: synchro absolute delta : %lld (jitter : %lld)\n",
+ intf_Msg( "input info: synchro absolute delta : %lld (jitter : %lld)",
P->delta_absolute, P->delta_cr );
#undef P
for( j = 0; j < p_input->stream.pp_programs[i]->i_es_number; j++ )
{
#define ES p_input->stream.pp_programs[i]->pp_es[j]
- intf_Msg( "input info: ES 0x%x, stream 0x%x, type 0x%x, %s\n",
+ intf_Msg( "input info: ES 0x%x, stream 0x%x, type 0x%x, %s",
ES->i_id, ES->i_stream_id, ES->i_type,
ES->p_decoder_fifo != NULL ? "selected" : "not selected");
#undef ES
* input_ps.c: PS demux and packet management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_ps.c,v 1.11 2000/12/21 19:33:03 massiot Exp $
+ * $Id: input_ps.c,v 1.12 2000/12/22 13:04:45 sam Exp $
*
* Authors:
*
/* It is common for MPEG-1 streams to pad with zeros
* (although it is forbidden by the recommendation), so
* don't bother everybody in this case. */
- intf_WarnMsg( 1, "Garbage at input (%x)\n", i_startcode );
+ intf_WarnMsg( 1, "Garbage at input (%x)", i_startcode );
}
while( (i_startcode & 0xFFFFFF00) != 0x100L )
* mpeg_system.c: TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: mpeg_system.c,v 1.15 2000/12/22 10:58:27 massiot Exp $
+ * $Id: mpeg_system.c,v 1.16 2000/12/22 13:04:45 sam Exp $
*
* Authors:
*
#define p_pes (p_es->p_pes)
- //intf_DbgMsg("End of PES packet %p\n", p_pes);
+ //intf_DbgMsg("End of PES packet %p", p_pes);
/* Parse the header. The header has a variable length, but in order
* to improve the algorithm, we will read the 14 bytes we may be
/* PTS management */
if( p_pes->b_has_pts )
{
- //intf_Msg("%lld\n", p_pes->i_pts);
+ //intf_Msg("%lld", p_pes->i_pts);
switch( p_es->p_pgrm->i_synchro_state )
{
case SYNCHRO_NOT_STARTED:
{
#define p_pes (p_es->p_pes)
- //intf_DbgMsg("PES-demultiplexing %p (%p)\n", p_ts_packet, p_pes);
+ //intf_DbgMsg("PES-demultiplexing %p (%p)", p_ts_packet, p_pes);
/* If we lost data, insert an NULL data packet (philosophy : 0 is quite
* often an escape sequence in decoders, so that should make them wait
p_input->p_method_data,
PADDING_PACKET_SIZE )) == NULL )
{
- intf_ErrMsg("Out of memory\n");
+ intf_ErrMsg("Out of memory");
p_input->b_error = 1;
return;
}
if( (p_pes = p_input->p_plugin->pf_new_pes(
p_input->p_method_data )) == NULL )
{
- intf_ErrMsg("Out of memory\n");
+ intf_ErrMsg("Out of memory");
p_input->b_error = 1;
return;
}
p_input->b_error = 1;
return;
}
- //intf_DbgMsg("New PES packet %p (first data: %p)\n", p_pes, p_data);
+ //intf_DbgMsg("New PES packet %p (first data: %p)", p_pes, p_data);
p_pes->p_first = p_data;
/* If the PES header fits in the first data packet, we can
) * 300) / 27;
}
/* Call the pace control. */
- //intf_Msg("+%lld\n", scr_time);
+ //intf_Msg("+%lld", scr_time);
CRDecode( p_input, p_input->stream.pp_programs[0],
scr_time );
b_trash = 1;
#define p (p_data->p_buffer)
- //intf_DbgMsg("input debug: TS-demultiplexing packet %p, pid %d\n",
+ //intf_DbgMsg("input debug: TS-demultiplexing packet %p, pid %d",
// p_ts_packet, U16_AT(&p[1]) & 0x1fff);
/* Extract flags values from TS common header. */
* don't know, do as if we missed a packet to be sure to recover
* from this situation */
intf_WarnMsg( 2,
- "Packet lost by TS demux: current %d, packet %d\n",
+ "Packet lost by TS demux: current %d, packet %d",
p_es_demux->i_continuity_counter & 0x0f,
p[3] & 0x0f );
b_lost = 1;
p_intf = malloc( sizeof( intf_thread_t ) );
if( !p_intf )
{
- intf_ErrMsg("error: %s\n", strerror( ENOMEM ) );
+ intf_ErrMsg("error: %s", strerror( ENOMEM ) );
return( NULL );
}
if( i_best_score == 0 )
{
free( p_intf );
- intf_ErrMsg( "error: no suitable plugin to create interface\n" );
+ intf_ErrMsg( "error: no suitable plugin to create interface" );
return( NULL );
}
p_intf->p_console = intf_ConsoleCreate();
if( p_intf->p_console == NULL )
{
- intf_ErrMsg("error: can't create control console\n");
+ intf_ErrMsg("error: can't create control console");
free( p_intf );
return( NULL );
}
if( p_intf->p_sys_create( p_intf ) )
{
- intf_ErrMsg("error: can't create interface\n");
+ intf_ErrMsg("error: can't create interface");
intf_ConsoleDestroy( p_intf->p_console );
free( p_intf );
return( NULL );
}
- intf_Msg("Interface initialized\n");
+ intf_Msg("Interface initialized");
return( p_intf );
}
* the script could be executed but failed */
else if( intf_ExecScript( main_GetPszVariable( INTF_INIT_SCRIPT_VAR, INTF_INIT_SCRIPT_DEFAULT ) ) > 0 )
{
- intf_ErrMsg("warning: error(s) during startup script\n");
+ intf_ErrMsg("warning: error(s) during startup script");
}
/* Main loop */
{
input_DestroyThread( p_intf->p_input, NULL );
p_intf->p_input = NULL;
- intf_DbgMsg("Input thread destroyed\n");
+ intf_DbgMsg("Input thread destroyed");
}
/* Sleep to avoid using all CPU - since some interfaces needs to access
input_DestroyThread( p_intf->p_input, NULL );
}
- intf_Msg("Channel %d: %s\n", i_channel, p_channel->psz_description );
+ intf_Msg("Channel %d: %s", i_channel, p_channel->psz_description );
/* Open a new input */
p_intf->p_input = input_CreateThread( p_channel->i_input_method, p_channel->psz_input_source,
}
/* Channel does not exist */
- intf_Msg("Channel %d does not exist\n", i_channel );
+ intf_Msg("Channel %d does not exist", i_channel );
#endif
return( 1 );
}
p_file = fopen( psz_filename, "r" );
if( p_file == NULL )
{
- intf_ErrMsg("error: can't open %s (%s)\n", psz_filename, strerror(errno));
+ intf_ErrMsg("error: can't open %s (%s)", psz_filename, strerror(errno));
return( 1 );
}
p_intf->p_channel = malloc( sizeof( intf_channel_t ) * i_index );
if( p_intf->p_channel == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM));
+ intf_ErrMsg("error: %s", strerror(ENOMEM));
fclose( p_file );
return( 1 );
}
{
if( !ParseChannel( p_channel, psz_line ) )
{
- intf_DbgMsg( "channel [%d] %s : method %d (%s:%d vlan id %d)\n",
+ intf_DbgMsg( "channel [%d] %s : method %d (%s:%d vlan id %d)",
p_channel->i_channel, p_channel->psz_description,
p_channel->i_input_method,
p_channel->psz_input_source,
p_channel->psz_description = malloc( i_field_length + 1 );
if( p_channel->psz_description == NULL )
{
- intf_ErrMsg("error: %s\n", strerror( ENOMEM ));
+ intf_ErrMsg("error: %s", strerror( ENOMEM ));
i_field = -1;
}
else
p_channel->psz_input_source = malloc( i_field_length + 1 );
if( p_channel->psz_input_source == NULL )
{
- intf_ErrMsg("error: %s\n", strerror( ENOMEM ));
+ intf_ErrMsg("error: %s", strerror( ENOMEM ));
i_field = -1;
}
else
int i_index; /* multi-purposes index */
int i_return; /* command return value */
- intf_DbgMsg("command `%s'\n", psz_cmd);
+ intf_DbgMsg("command `%s'", psz_cmd);
/* Parse command line (separate arguments). If nothing has been found,
* the function returns without error */
{
case INTF_FATAL_ERROR: /* fatal error */
/* Print message and terminates the interface thread */
- intf_ErrMsg( "fatal error in command `%s'\n", psz_argv[0] );
+ intf_ErrMsg( "fatal error in command `%s'", psz_argv[0] );
p_main->p_intf->b_die = 1;
break;
* error should be very rare since it does not even try to cancel
* other threads... */
intf_ErrMsg( "critical error in command `%s', "
- "please report this error !\n", psz_argv[0] );
+ "please report this error !", psz_argv[0] );
intf_FlushMsg();
exit( INTF_CRITICAL_ERROR );
break;
p_file = fopen( psz_vlcrc, "r" );
if( p_file == NULL )
{
- intf_DbgMsg("intf warning: %s: %s\n", psz_vlcrc, strerror(errno));
+ intf_DbgMsg("intf warning: %s: %s", psz_vlcrc, strerror(errno));
return( -1 );
}
}
if( !feof( p_file ) )
{
- intf_ErrMsg("error: %s: %s\n", psz_vlcrc, strerror(errno));
+ intf_ErrMsg("error: %s: %s", psz_vlcrc, strerror(errno));
return( -1 );
}
}
intf_DbgMsg(
- "argument flags=0x%x (index=%d) name=%s str=%s int=%d float=%f\n",
+ "argument flags=0x%x (index=%d) name=%s str=%s int=%d float=%f",
argv[i_arg].i_flags, argv[i_arg].i_index,
(argv[i_arg].i_flags & INTF_NAMED_ARG) ? argv[i_arg].ps_name : "NA",
(argv[i_arg].i_flags & INTF_STR_ARG) ? argv[i_arg].psz_str : "NA",
{
/* Format has not been used and is neither optionnal nor multiple
* and present */
- intf_IntfMsg("error: missing argument(s)\n");
+ intf_IntfMsg("error: missing argument(s)");
return( 1 );
}
}
#ifdef DEBUG
else /* error: missing type specifier */
{
- intf_ErrMsg("error: missing type specifier for `%s' (0x%x)\n", psz_str, i_flags);
+ intf_ErrMsg("error: missing type specifier for `%s' (0x%x)", psz_str, i_flags);
return( 1 );
}
#endif
break;
#ifdef DEBUG
default:/* error which should never happen: incorrect format */
- intf_DbgMsg("error: incorrect format string `%s'\n", psz_format);
+ intf_DbgMsg("error: incorrect format string `%s'", psz_format);
break;
#endif
}
/* Find to which input this command is destinated */
- intf_IntfMsg( "Adding PID %d to input %d\n", i_pid, i_input );
+ intf_IntfMsg( "Adding PID %d to input %d", i_pid, i_input );
//XXX?? input_AddPgrmElem( p_main->p_intf->p_x11->p_input,
//XXX?? i_pid );
return( INTF_NO_ERROR );
{
int i_index = p_argv[1].i_num;
- intf_IntfMsg("Reading PSI table for input %d\n", i_index);
+ intf_IntfMsg("Reading PSI table for input %d", i_index);
//XXX?? input_PsiRead(p_main->p_intf->p_x11->p_input );
return( INTF_NO_ERROR );
}
fprintf(stderr, "warning: can't store following message (%s): ",
strerror(errno) );
vfprintf(stderr, psz_format, ap );
+ fprintf(stderr, "\n" );
exit( errno );
}
strerror(errno) );
fprintf(stderr, INTF_MSG_DBG_FORMAT, psz_file, psz_function, i_line );
vfprintf(stderr, psz_format, ap );
+ fprintf(stderr, "\n" );
exit( errno );
}
switch( p_msg->i_type )
{
case INTF_MSG_STD: /* standard messages */
- fprintf( stdout, psz_msg );
+ fprintf( stdout, "%s\n", psz_msg );
break;
case INTF_MSG_ERR: /* error messages */
case INTF_MSG_WARN:
#ifndef DEBUG_LOG_ONLY
case INTF_MSG_DBG: /* debugging messages */
#endif
- fprintf( stderr, psz_msg );
+ fprintf( stderr, "%s\n", psz_msg );
break;
case INTF_MSG_INTF: /* interface messages */
intf_ConsolePrint( p_main->p_intf->p_console, psz_msg );
if( p_main->p_msg->p_log_file != NULL )
{
fwrite( psz_msg, strlen( psz_msg ), 1, p_main->p_msg->p_log_file );
+ fwrite( "\n", 1, 1, p_main->p_msg->p_log_file );
}
#endif
{
case INTF_MSG_STD: /* standard messages */
case INTF_MSG_DBG: /* debug messages */
- fprintf( stdout, p_msg->psz_msg );
+ fprintf( stdout, "%s\n", p_msg->psz_msg );
break;
case INTF_MSG_ERR: /* error messages */
case INTF_MSG_WARN:
- fprintf( stderr, p_msg->psz_msg ); /* warning message */
+ fprintf( stderr, "%s\n", p_msg->psz_msg ); /* warning message */
break;
case INTF_MSG_INTF: /* interface messages */
intf_ConsolePrint( p_main->p_intf->p_console, p_msg->psz_msg );
if( !p_main->p_msg ) /* start messages interface */
{
fprintf( stderr, "error: can't initialize messages interface (%s)\n",
- strerror(errno) );
+ strerror(errno) );
return( errno );
}
p_main->p_playlist = playlist_Create( );
if( !p_main->p_playlist )
{
- intf_Msg( "Playlist initialization failed\n" );
+ intf_Msg( "Playlist initialization failed" );
intf_MsgDestroy();
return( errno );
}
p_main->p_bank = bank_Create( );
if( !p_main->p_bank )
{
- intf_Msg( "Plugin bank initialization failed\n" );
+ intf_Msg( "Plugin bank initialization failed" );
playlist_Destroy( p_main->p_playlist );
intf_MsgDestroy();
return( errno );
{
/* On error during vlans initialization, switch off vlans */
intf_Msg( "Virtual LANs initialization failed : "
- "vlans management is deactivated\n" );
+ "vlans management is deactivated" );
p_main->b_vlans = 0;
}
#endif
if( p_main->p_aout == NULL )
{
/* On error during audio initialization, switch off audio */
- intf_Msg( "Audio initialization failed : audio is deactivated\n" );
+ intf_Msg( "Audio initialization failed : audio is deactivated" );
p_main->b_audio = 0;
}
}
/*
* Terminate messages interface and program
*/
- intf_Msg( "Program terminated.\n" );
+ intf_Msg( "Program terminated." );
intf_MsgDestroy();
return( 0 );
psz_env = malloc( strlen(psz_name) + strlen(psz_value) + 2 );
if( psz_env == NULL )
{
- intf_ErrMsg( "error: %s\n", strerror(ENOMEM) );
+ intf_ErrMsg( "error: %s", strerror(ENOMEM) );
}
else
{
sprintf( psz_env, "%s=%s", psz_name, psz_value );
if( putenv( psz_env ) )
{
- intf_ErrMsg( "error: %s\n", strerror(errno) );
+ intf_ErrMsg( "error: %s", strerror(errno) );
}
}
}
p_main->ppsz_env = ppsz_env;
SetDefaultConfiguration();
- intf_MsgImm( COPYRIGHT_MESSAGE "\n" );
+ intf_MsgImm( COPYRIGHT_MESSAGE );
/* Get the executable name (similar to the basename command) */
p_main->psz_arg0 = p_pointer = ppsz_argv[ 0 ];
/* Internal error: unknown option */
case '?':
default:
- intf_ErrMsg( "intf error: unknown option `%s'\n", ppsz_argv[optind - 1] );
+ intf_ErrMsg( "intf error: unknown option `%s'", ppsz_argv[optind - 1] );
Usage( USAGE );
return( EINVAL );
break;
static void Usage( int i_fashion )
{
/* Usage */
- intf_Msg( "Usage: %s [options] [parameters] [file]...\n",
+ intf_Msg( "Usage: %s [options] [parameters] [file]...",
p_main->psz_arg0 );
if( i_fashion == USAGE )
{
- intf_Msg( "Try `%s --help' for more information.\n",
+ intf_Msg( "Try `%s --help' for more information.",
p_main->psz_arg0 );
return;
}
/* Options */
- intf_Msg( "\n"
- "Options:\n"
- " --noaudio \tdisable audio\n"
- " --aout <plugin> \taudio output method\n"
- " --stereo, --mono \tstereo/mono audio\n"
+ intf_Msg( "\nOptions:"
+ "\n --noaudio \tdisable audio"
+ "\n --aout <plugin> \taudio output method"
+ "\n --stereo, --mono \tstereo/mono audio"
"\n"
- " --novideo \tdisable video\n"
- " --vout <plugin> \tvideo output method\n"
- " --display <display> \tdisplay string\n"
- " --width <w>, --height <h> \tdisplay dimensions\n"
- " -g, --grayscale \tgrayscale output\n"
- " --color \tcolor output\n"
+ "\n --novideo \tdisable video"
+ "\n --vout <plugin> \tvideo output method"
+ "\n --display <display> \tdisplay string"
+ "\n --width <w>, --height <h> \tdisplay dimensions"
+ "\n -g, --grayscale \tgrayscale output"
+ "\n --color \tcolor output"
"\n"
- " -a, --dvdaudio <type> \tchoose DVD audio type\n"
- " -c, --dvdchannel <channel> \tchoose DVD audio channel\n"
- " -s, --dvdsubtitle <channel> \tchoose DVD subtitle channel\n"
+ "\n -a, --dvdaudio <type> \tchoose DVD audio type"
+ "\n -c, --dvdchannel <channel> \tchoose DVD audio channel"
+ "\n -s, --dvdsubtitle <channel> \tchoose DVD subtitle channel"
"\n"
- " --vlans \tenable vlans\n"
- " --server <host> \tvideo server address\n"
- " --port <port> \tvideo server port\n"
- " --broadcast \tlisten to a broadcast\n"
+ "\n --vlans \tenable vlans"
+ "\n --server <host> \tvideo server address"
+ "\n --port <port> \tvideo server port"
+ "\n --broadcast \tlisten to a broadcast"
"\n"
- " --synchro <type> \tforce synchro algorithm\n"
+ "\n --synchro <type> \tforce synchro algorithm"
"\n"
- " --warning <level> \tdisplay warning messages\n"
+ "\n --warning <level> \tdisplay warning messages"
"\n"
- " -h, --help \tprint help and exit\n"
- " -H, --longhelp \tprint long help and exit\n"
- " -v, --version \toutput version information and exit\n" );
+ "\n -h, --help \tprint help and exit"
+ "\n -H, --longhelp \tprint long help and exit"
+ "\n -v, --version \toutput version information and exit" );
if( i_fashion == SHORT_HELP )
return;
/* Interface parameters */
- intf_Msg( "\n"
- "Interface parameters:\n"
- " " INTF_INIT_SCRIPT_VAR "=<filename> \tinitialization script\n"
- " " INTF_CHANNELS_VAR "=<filename> \tchannels list\n"
- " " INTF_WARNING_VAR "=<level> \twarning level\n" );
+ intf_Msg( "\nInterface parameters:\n"
+ "\n " INTF_INIT_SCRIPT_VAR "=<filename> \tinitialization script"
+ "\n " INTF_CHANNELS_VAR "=<filename> \tchannels list"
+ "\n " INTF_WARNING_VAR "=<level> \twarning level" );
/* Audio parameters */
- intf_Msg( "\n"
- "Audio parameters:\n"
- " " AOUT_METHOD_VAR "=<method name> \taudio method\n"
- " " AOUT_DSP_VAR "=<filename> \tdsp device path\n"
- " " AOUT_STEREO_VAR "={1|0} \tstereo or mono output\n"
- " " AOUT_RATE_VAR "=<rate> \toutput rate\n" );
+ intf_Msg( "\nAudio parameters:"
+ "\n " AOUT_METHOD_VAR "=<method name> \taudio method"
+ "\n " AOUT_DSP_VAR "=<filename> \tdsp device path"
+ "\n " AOUT_STEREO_VAR "={1|0} \tstereo or mono output"
+ "\n " AOUT_RATE_VAR "=<rate> \toutput rate" );
/* Video parameters */
- intf_Msg( "\n"
- "Video parameters:\n"
- " " VOUT_METHOD_VAR "=<method name> \tdisplay method\n"
- " " VOUT_DISPLAY_VAR "=<display name> \tdisplay used\n"
- " " VOUT_WIDTH_VAR "=<width> \tdisplay width\n"
- " " VOUT_HEIGHT_VAR "=<height> \tdislay height\n"
- " " VOUT_FB_DEV_VAR "=<filename> \tframebuffer device path\n"
- " " VOUT_GRAYSCALE_VAR "={1|0} \tgrayscale or color output\n" );
+ intf_Msg( "\nVideo parameters:"
+ "\n " VOUT_METHOD_VAR "=<method name> \tdisplay method"
+ "\n " VOUT_DISPLAY_VAR "=<display name> \tdisplay used"
+ "\n " VOUT_WIDTH_VAR "=<width> \tdisplay width"
+ "\n " VOUT_HEIGHT_VAR "=<height> \tdislay height"
+ "\n " VOUT_FB_DEV_VAR "=<filename> \tframebuffer device path"
+ "\n " VOUT_GRAYSCALE_VAR "={1|0} \tgrayscale or color output" );
/* DVD parameters */
- intf_Msg( "\n"
- "DVD parameters:\n"
- " " INPUT_DVD_AUDIO_VAR "={ac3|lpcm|mpeg|off} \taudio type\n"
- " " INPUT_DVD_CHANNEL_VAR "=[0-15] \taudio channel\n"
- " " INPUT_DVD_SUBTITLE_VAR "=[0-31] \tsubtitle channel\n" );
+ intf_Msg( "\nDVD parameters:"
+ "\n " INPUT_DVD_AUDIO_VAR "={ac3|lpcm|mpeg|off} \taudio type"
+ "\n " INPUT_DVD_CHANNEL_VAR "=[0-15] \taudio channel"
+ "\n " INPUT_DVD_SUBTITLE_VAR "=[0-31] \tsubtitle channel" );
/* Input parameters */
- intf_Msg( "\n"
- "Input parameters:\n"
- " " INPUT_SERVER_VAR "=<hostname> \tvideo server\n"
- " " INPUT_PORT_VAR "=<port> \tvideo server port\n"
- " " INPUT_IFACE_VAR "=<interface> \tnetwork interface\n"
- " " INPUT_BROADCAST_VAR "={1|0} \tbroadcast mode\n"
- " " INPUT_VLAN_SERVER_VAR "=<hostname> \tvlan server\n"
- " " INPUT_VLAN_PORT_VAR "=<port> \tvlan server port\n" );
+ intf_Msg( "\nInput parameters:\n"
+ "\n " INPUT_SERVER_VAR "=<hostname> \tvideo server"
+ "\n " INPUT_PORT_VAR "=<port> \tvideo server port"
+ "\n " INPUT_IFACE_VAR "=<interface> \tnetwork interface"
+ "\n " INPUT_BROADCAST_VAR "={1|0} \tbroadcast mode"
+ "\n " INPUT_VLAN_SERVER_VAR "=<hostname> \tvlan server"
+ "\n " INPUT_VLAN_PORT_VAR "=<port> \tvlan server port" );
/* Synchro parameters */
- intf_Msg( "\n"
- "Synchro parameters:\n"
- " " VPAR_SYNCHRO_VAR "={I|I+|IP|IP+|IPB} \tsynchro algorithm\n");
+ intf_Msg( "\nSynchro parameters:"
+ "\n " VPAR_SYNCHRO_VAR "={I|I+|IP|IP+|IPB} \tsynchro algorithm");
}
/*****************************************************************************
"This program comes with NO WARRANTY, to the extent permitted by law.\n"
"You may redistribute it under the terms of the GNU General Public License;\n"
"see the file named COPYING for details.\n"
- "Written by the VideoLAN team at Ecole Centrale, Paris.\n" );
+ "Written by the VideoLAN team at Ecole Centrale, Paris." );
}
static void SimpleSignalHandler( int i_signal )
{
/* Acknowledge the signal received */
- intf_WarnMsg(0, "intf: ignoring signal %d\n", i_signal );
+ intf_WarnMsg(0, "intf: ignoring signal %d", i_signal );
}
signal( SIGQUIT, SIG_IGN );
/* Acknowledge the signal received */
- intf_ErrMsgImm("intf: signal %d received, exiting\n", i_signal );
+ intf_ErrMsgImm("intf: signal %d received, exiting", i_signal );
/* Try to terminate everything - this is done by requesting the end of the
* interface thread */
int lpcm_init (lpcmdec_t * p_lpcmdec)
{
- intf_DbgMsg( "LPCM Debug: lpmcm init called\n" );
+ intf_DbgMsg( "LPCM Debug: lpmcm init called" );
return 0;
}
* lpcm_decoder_thread.c: lpcm decoder thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: lpcm_decoder_thread.c,v 1.5 2000/12/21 13:25:51 massiot Exp $
+ * $Id: lpcm_decoder_thread.c,v 1.6 2000/12/22 13:04:45 sam Exp $
*
* Authors:
*
vlc_thread_t lpcmdec_CreateThread (adec_config_t * p_config)
{
lpcmdec_thread_t * p_lpcmdec;
- intf_DbgMsg ( "LPCM Debug: creating lpcm decoder thread\n" );
+ intf_DbgMsg ( "LPCM Debug: creating lpcm decoder thread" );
/* Allocate the memory needed to store the thread's structure */
if ((p_lpcmdec = (lpcmdec_thread_t *)malloc (sizeof(lpcmdec_thread_t))) == NULL) {
- intf_ErrMsg ( "LPCM Error: not enough memory for lpcmdec_CreateThread() to create the new thread\n" );
+ intf_ErrMsg ( "LPCM Error: not enough memory for lpcmdec_CreateThread() to create the new thread" );
return 0;
}
/* Spawn the lpcm decoder thread */
if (vlc_thread_create(&p_lpcmdec->thread_id, "lpcm decoder", (vlc_thread_func_t)RunThread, (void *)p_lpcmdec)) {
- intf_ErrMsg ( "LPCM Error: can't spawn lpcm decoder thread\n" );
+ intf_ErrMsg ( "LPCM Error: can't spawn lpcm decoder thread" );
free (p_lpcmdec);
return 0;
}
- intf_DbgMsg ( "LPCM Debug: lpcm decoder thread (%p) created\n", p_lpcmdec );
+ intf_DbgMsg ( "LPCM Debug: lpcm decoder thread (%p) created", p_lpcmdec );
return p_lpcmdec->thread_id;
}
aout_fifo_t aout_fifo;
lpcm_byte_stream_t * byte_stream;
- intf_DbgMsg ( "LPCM Debug: initializing lpcm decoder thread %p\n", p_lpcmdec );
+ intf_DbgMsg ( "LPCM Debug: initializing lpcm decoder thread %p", p_lpcmdec );
/* Our first job is to initialize the bit stream structure with the
* beginning of the input stream */
return -1;
}
- intf_DbgMsg ( "LPCM Debug: lpcm decoder thread %p initialized\n", p_lpcmdec );
+ intf_DbgMsg ( "LPCM Debug: lpcm decoder thread %p initialized", p_lpcmdec );
return 0;
}
{
int sync;
- intf_DbgMsg( "LPCM Debug: running lpcm decoder thread (%p) (pid== %i)\n", p_lpcmdec, getpid() );
+ intf_DbgMsg( "LPCM Debug: running lpcm decoder thread (%p) (pid== %i)", p_lpcmdec, getpid() );
/* Fucking holy piece of shit ! */
//msleep (INPUT_PTS_DELAY);
vlc_cond_signal (&p_lpcmdec->p_aout_fifo->data_wait);
vlc_mutex_unlock (&p_lpcmdec->p_aout_fifo->data_lock);
- intf_DbgMsg( "LPCM Debug: %x\n", *buffer );
+ intf_DbgMsg( "LPCM Debug: %x", *buffer );
bad_frame:
}
*****************************************************************************/
static void EndThread (lpcmdec_thread_t * p_lpcmdec)
{
- intf_DbgMsg( "LPCM Debug: destroying lpcm decoder thread %p\n", p_lpcmdec );
+ intf_DbgMsg( "LPCM Debug: destroying lpcm decoder thread %p", p_lpcmdec );
/* If the audio output fifo was created, we destroy it */
if (p_lpcmdec->p_aout_fifo != NULL) {
/* Destroy descriptor */
free (p_lpcmdec);
- intf_DbgMsg( "LPCM Debug: lpcm decoder thread %p destroyed\n", p_lpcmdec );
+ intf_DbgMsg( "LPCM Debug: lpcm decoder thread %p destroyed", p_lpcmdec );
}
void lpcm_byte_stream_next (lpcm_byte_stream_t * p_byte_stream)
{
/* The convertion failed: the address is an host name, which needs
* to be resolved */
- intf_DbgMsg("debug: resolving internet address %s...\n", psz_in_addr);
+ intf_DbgMsg("debug: resolving internet address %s...", psz_in_addr);
if ( (p_hostent = gethostbyname(psz_in_addr)) == NULL)
{
- intf_ErrMsg("error: unknown host %s\n", psz_in_addr);
+ intf_ErrMsg("error: unknown host %s", psz_in_addr);
return( -1 );
}
if( !i_rc )
{
p_ifdescr->i_flags = ifr_config.ifr_flags;
- intf_DbgMsg("%s flags: 0x%x\n", psz_name, p_ifdescr->i_flags);
+ intf_DbgMsg("%s flags: 0x%x", psz_name, p_ifdescr->i_flags);
}
else
{
- intf_ErrMsg("Cannot read flags for interface %s: %s\n", psz_name,
+ intf_ErrMsg("Cannot read flags for interface %s: %s", psz_name,
strerror(errno));
return -1;
}
if( !i_rc )
{
memcpy(&p_ifdescr->sa_phys_addr, &ifr_config.ifr_addr, sizeof(struct sockaddr));
- intf_DbgMsg("%s MAC address: %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n", psz_name,
+ intf_DbgMsg("%s MAC address: %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x", psz_name,
p_ifdescr->sa_phys_addr.sa_data[0]&0xff,
p_ifdescr->sa_phys_addr.sa_data[1]&0xff,
p_ifdescr->sa_phys_addr.sa_data[2]&0xff,
}
else
{
- intf_ErrMsg("Cannot read hardware address for interface %s: %s\n",
+ intf_ErrMsg("Cannot read hardware address for interface %s: %s",
psz_name, strerror(errno));
return -1;
}
if( !i_rc )
{
memcpy(&p_ifdescr->sa_net_addr, &ifr_config.ifr_addr, sizeof(struct sockaddr));
- intf_DbgMsg("%s IP address: %s\n", psz_name,
+ intf_DbgMsg("%s IP address: %s", psz_name,
inet_ntoa(p_ifdescr->sa_net_addr.sin_addr));
}
else
{
- intf_ErrMsg("Cannot read network address for interface %s: %s\n",
+ intf_ErrMsg("Cannot read network address for interface %s: %s",
psz_name, strerror(errno));
return -1;
}
/* Read broadcast address of the interface and store it in our description */
if(p_ifdescr->i_flags & IFF_POINTOPOINT)
{
- intf_DbgMsg("%s doen't not support broadcast\n", psz_name);
+ intf_DbgMsg("%s doen't not support broadcast", psz_name);
i_rc = ioctl(i_sockfd, SIOCGIFDSTADDR, (byte_t *)&ifr_config);
}
else
{
- intf_DbgMsg("%s supports broadcast\n", psz_name);
+ intf_DbgMsg("%s supports broadcast", psz_name);
i_rc = ioctl(i_sockfd, SIOCGIFBRDADDR, (byte_t *)&ifr_config);
}
if( !i_rc )
{
memcpy(&p_ifdescr->sa_bcast_addr, &ifr_config.ifr_addr, sizeof(struct sockaddr));
- intf_DbgMsg("%s broadcast address: %s\n", psz_name,
+ intf_DbgMsg("%s broadcast address: %s", psz_name,
inet_ntoa(p_ifdescr->sa_bcast_addr.sin_addr));
}
else
{
- intf_ErrMsg("Cannot read broadcast address for interface %s: %s\n",
+ intf_ErrMsg("Cannot read broadcast address for interface %s: %s",
psz_name, strerror(errno));
return -1;
}
i_rc = ioctl(i_sockfd, SIOCGIFCONF, (byte_t*)&ifc_netconf);
if( i_rc )
{
- intf_ErrMsg("Cannot read network configuration: %s\n",
+ intf_ErrMsg("Cannot read network configuration: %s",
strerror(errno));
break;
}
for( i_remaining = ifc_netconf.ifc_len / sizeof (struct ifreq);
i_remaining-- > 0; p_ifr_current_if++ )
{
- intf_DbgMsg("Found interface %s\n", p_ifr_current_if->ifr_name);
+ intf_DbgMsg("Found interface %s", p_ifr_current_if->ifr_name);
/* Don't use an interface devoted to an address family other than IP */
if(p_ifr_current_if->ifr_addr.sa_family != AF_INET)
/* Read the status of this interface */
if( ioctl(i_sockfd, SIOCGIFFLAGS, (byte_t *)p_ifr_current_if) < 0 )
{
- intf_ErrMsg("Cannot access interface %s: %s\n",
+ intf_ErrMsg("Cannot access interface %s: %s",
p_ifr_current_if->ifr_name, strerror(errno));
i_rc = -1;
break;
p_playlist = malloc( sizeof( playlist_t ) );
if( !p_playlist )
{
- intf_ErrMsg("playlist error: %s\n", strerror( ENOMEM ) );
+ intf_ErrMsg("playlist error: %s", strerror( ENOMEM ) );
return( NULL );
}
p_playlist->i_index = 0;
p_playlist->p_list = NULL;
- intf_Msg("Playlist initialized\n");
+ intf_Msg("Playlist initialized");
return( p_playlist );
}
p_bank = malloc( sizeof( plugin_bank_t ) );
if( !p_bank )
{
- intf_ErrMsg("plugin bank error: %s\n", strerror( ENOMEM ) );
+ intf_ErrMsg("plugin bank error: %s", strerror( ENOMEM ) );
return( NULL );
}
}
p_bank->i_plugin_count = MAX_PLUGIN_COUNT;
- intf_Msg("Plugin bank initialized\n");
+ intf_Msg("Plugin bank initialized");
return( p_bank );
}
}
#ifndef SYS_BEOS
- intf_WarnMsg( 1, "Plugin %s failed: %s\n", psz_plugin, dlerror() );
+ intf_WarnMsg( 1, "Plugin %s failed: %s", psz_plugin, dlerror() );
#endif
free( psz_plugin );
if( i == p_bank->i_plugin_count )
{
intf_ErrMsg( "plugin bank error: reached max plugin count (%i), "
- "increase MAX_PLUGIN_COUNT\n", p_bank->i_plugin_count );
+ "increase MAX_PLUGIN_COUNT", p_bank->i_plugin_count );
return( -1 );
}
/* Tell the world we found it */
- intf_Msg( "Plugin %i: %s %s [0x%x]\n", i,
+ intf_Msg( "Plugin %i: %s %s [0x%x]", i,
p_bank->p_info[ i ]->psz_name,
p_bank->p_info[ i ]->psz_version,
p_bank->p_info[ i ]->i_score );
p_file = malloc( sizeof(resource_file_t) );
if( p_file == NULL )
{
- intf_ErrMsg("rsc error 101-1: %s\n", strerror(errno));
+ intf_ErrMsg("rsc error 101-1: %s", strerror(errno));
return( NULL );
}
p_file->p_resource = malloc( sizeof(resource_descriptor_t) * i_size );
if( p_file->p_resource == NULL )
{
- intf_ErrMsg("rsc error 101-2: %s\n", strerror(errno));
+ intf_ErrMsg("rsc error 101-2: %s", strerror(errno));
free( p_file );
return( NULL );
}
p_file->i_file = open( psz_filename, O_CREAT | O_RDWR, i_mode );
if( p_file->i_file == -1 ) /* error */
{
- intf_ErrMsg("rsc error 101-3: %s: %s\n", psz_filename, strerror(errno) );
+ intf_ErrMsg("rsc error 101-3: %s: %s", psz_filename, strerror(errno) );
free( p_file->p_resource );
free( p_file );
}
p_file = malloc( sizeof(resource_file_t) );
if( p_file == NULL )
{
- intf_ErrMsg("rsc error 102-1: %s\n", strerror(errno));
+ intf_ErrMsg("rsc error 102-1: %s", strerror(errno));
return( NULL );
}
p_file->i_file = open( psz_filename, i_flags );
if( p_file->i_file == -1 ) /* error */
{
- intf_ErrMsg("rsc error 102-2: %s: %s\n", psz_filename, strerror(errno) );
+ intf_ErrMsg("rsc error 102-2: %s: %s", psz_filename, strerror(errno) );
free( p_file );
return( NULL );
}
/* Read header */
if( read( p_file->i_file, p_buffer, 8 ) != 8)
{
- intf_ErrMsg("rsc error 102-3: %s: unexpected end of file (not a resource file ?)\n");
+ intf_ErrMsg("rsc error 102-3: %s: unexpected end of file (not a resource file ?)");
close( p_file->i_file );
free( p_file);
return( NULL );
}
if( (p_buffer[0] != 'R') || (p_buffer[0] != 'F') || (*(u16 *)(p_buffer + 4) != i_type) )
{
- intf_ErrMsg("rsc error 102-4: %s is not a valid resource file or has incorrect type\n", psz_filename);
+ intf_ErrMsg("rsc error 102-4: %s is not a valid resource file or has incorrect type", psz_filename);
close( p_file->i_file );
free( p_file );
return( NULL );
}
p_file->i_type = i_type;
p_file->i_size = *(u16 *)(p_buffer + 6);
- intf_DbgMsg("rsc debug 102-1: %s opened, %d resources\n", psz_filename, p_file->i_size);
+ intf_DbgMsg("rsc debug 102-1: %s opened, %d resources", psz_filename, p_file->i_size);
/* Allocate tables */
p_file->p_resource = malloc( sizeof(resource_descriptor_t) * p_file->i_size );
if( p_file->p_resource == NULL )
{
- intf_ErrMsg("rsc error 102-5: %s\n", strerror(errno));
+ intf_ErrMsg("rsc error 102-5: %s", strerror(errno));
close( p_file->i_file );
free( p_file );
return( NULL );
{
if( read( p_file->i_file, p_buffer, 50 ) != 50 )
{
- intf_ErrMsg("rsc error 102-6: %s: unexpected end of file\n", psz_filename);
+ intf_ErrMsg("rsc error 102-6: %s: unexpected end of file", psz_filename);
close( p_file->i_file );
free( p_file->p_resource );
free( p_file );
#ifdef DEBUG
if( p_file->b_read_only )
{
- intf_DbgMsg("rsc debug 103-1: can't update a read-only file\n");
+ intf_DbgMsg("rsc debug 103-1: can't update a read-only file");
return( -1 );
}
#endif
/* Seek beginning of file */
if( lseek( p_file->i_file, 0, SEEK_SET ) )
{
- intf_ErrMsg("rsc error 103-1: %s\n", strerror(errno));
+ intf_ErrMsg("rsc error 103-1: %s", strerror(errno));
return( -2 );
}
*(u16 *)(p_buffer + 6) = p_file->i_size;
if( write( p_file->i_file, p_buffer, 8 ) != 8 )
{
- intf_ErrMsg("rsc error 103-2: %s\n", strerror(errno));
+ intf_ErrMsg("rsc error 103-2: %s", strerror(errno));
return( -3 );
}
*(u64 *)(p_buffer + 42) = p_file->p_resource[i_index].i_size;
if( write( p_file->i_file, p_buffer, 8 ) != 8 )
{
- intf_ErrMsg("rsc error 103-3: %s\n", strerror(errno));
+ intf_ErrMsg("rsc error 103-3: %s", strerror(errno));
return( -4 );
}
}
/* Close and destroy descriptor */
if( close( p_file->i_file ) )
{
- intf_ErrMsg("rsc error 104-1: %s\n", strerror(errno));
+ intf_ErrMsg("rsc error 104-1: %s", strerror(errno));
return( -2 );
}
free( p_file->p_resource );
}
if( i_index == p_file->i_size )
{
- intf_ErrMsg("rsc error 105-1: unknown resource %s.%d\n", psz_name, i_type);
+ intf_ErrMsg("rsc error 105-1: unknown resource %s.%d", psz_name, i_type);
return( -1 );
}
/* Seek */
if( lseek( p_file->i_file, p_file->p_resource[i_index].i_offset, SEEK_SET ) )
{
- intf_ErrMsg("rsc error 105-2: can not reach %s.%d: %s\n", psz_name,
+ intf_ErrMsg("rsc error 105-2: can not reach %s.%d: %s", psz_name,
i_type, strerror(errno));
return( -2 );
}
/* Check if buffer is large enough */
if( max_size < p_file->p_resource[i_index].i_size )
{
- intf_ErrMsg("rsc error 106-1: buffer is too small\n");
+ intf_ErrMsg("rsc error 106-1: buffer is too small");
return( -2 );
}
if( read( p_file->i_file, p_data, p_file->p_resource[i_index].i_size )
!= p_file->p_resource[i_index].i_size )
{
- intf_ErrMsg("rsc error 106-2: can not read %s.%d: %s\n",
+ intf_ErrMsg("rsc error 106-2: can not read %s.%d: %s",
p_file->p_resource[i_index].psz_name,
p_file->p_resource[i_index].i_type,
strerror(errno));
#ifdef DEBUG
if( p_file->b_read_only )
{
- intf_DbgMsg("rsc debug 107-1: can not write to a read-only resource file\n");
+ intf_DbgMsg("rsc debug 107-1: can not write to a read-only resource file");
return( -1 );
}
#endif
}
if( i_index == -1 )
{
- intf_ErrMsg("rsc error 107-1: resources table is full\n");
+ intf_ErrMsg("rsc error 107-1: resources table is full");
return( -1 );
}
/* Seek end of file */
if( lseek( p_file->i_file, i_offset, SEEK_SET ) )
{
- intf_ErrMsg("rsc error 107-2: %s\n", strerror(errno));
+ intf_ErrMsg("rsc error 107-2: %s", strerror(errno));
return( -2 );
}
/* Write data */
if( write( p_file->i_file, p_data, size ) != size )
{
- intf_ErrMsg("rsc error 107-3: %s\n", strerror(errno));
+ intf_ErrMsg("rsc error 107-3: %s", strerror(errno));
return( -3 );
}
{
spudec_thread_t * p_spudec;
- intf_DbgMsg("spudec debug: creating spu decoder thread\n");
+ intf_DbgMsg("spudec debug: creating spu decoder thread");
/* Allocate the memory needed to store the thread's structure */
if ( (p_spudec = (spudec_thread_t *)malloc( sizeof(spudec_thread_t) )) == NULL )
{
- intf_ErrMsg("spudec error: not enough memory for spudec_CreateThread() to create the new thread\n");
+ intf_ErrMsg("spudec error: not enough memory for spudec_CreateThread() to create the new thread");
return( 0 );
}
if ( vlc_thread_create(&p_spudec->thread_id, "spu decoder",
(vlc_thread_func_t)RunThread, (void *)p_spudec) )
{
- intf_ErrMsg("spudec error: can't spawn spu decoder thread\n");
+ intf_ErrMsg("spudec error: can't spawn spu decoder thread");
free( p_spudec );
return( 0 );
}
- intf_DbgMsg("spudec debug: spu decoder thread (%p) created\n", p_spudec);
+ intf_DbgMsg("spudec debug: spu decoder thread (%p) created", p_spudec);
return( p_spudec->thread_id );
}
*****************************************************************************/
static int InitThread( spudec_thread_t *p_spudec )
{
- intf_DbgMsg("spudec debug: initializing spu decoder thread %p\n", p_spudec);
+ intf_DbgMsg("spudec debug: initializing spu decoder thread %p", p_spudec);
p_spudec->p_config->decoder_config.pf_init_bit_stream( &p_spudec->bit_stream,
p_spudec->p_config->decoder_config.p_decoder_fifo );
/* Mark thread as running and return */
- intf_DbgMsg( "spudec debug: InitThread(%p) succeeded\n", p_spudec );
+ intf_DbgMsg( "spudec debug: InitThread(%p) succeeded", p_spudec );
return( 0 );
}
*****************************************************************************/
static void RunThread( spudec_thread_t *p_spudec )
{
- intf_DbgMsg("spudec debug: running spu decoder thread (%p) (pid == %i)\n",
+ intf_DbgMsg("spudec debug: running spu decoder thread (%p) (pid == %i)",
p_spudec, getpid());
/*
break;
default:
/* ?? (unknown command) */
- intf_ErrMsg( "spudec: unknown command 0x%.2x\n",
+ intf_ErrMsg( "spudec: unknown command 0x%.2x",
i_cmd );
break;
}
else
{
/* Unexpected PES packet - trash it */
- intf_ErrMsg( "spudec: trying to recover from bad packet\n" );
+ intf_ErrMsg( "spudec: trying to recover from bad packet" );
vlc_mutex_lock( &p_spudec->p_fifo->data_lock );
p_spudec->p_fifo->pf_delete_pes( p_spudec->p_fifo->p_packets_mgt,
DECODER_FIFO_START(*p_spudec->p_fifo) );
*****************************************************************************/
static void EndThread( spudec_thread_t *p_spudec )
{
- intf_DbgMsg( "spudec debug: destroying spu decoder thread %p\n", p_spudec );
+ intf_DbgMsg( "spudec debug: destroying spu decoder thread %p", p_spudec );
free( p_spudec->p_config );
free( p_spudec );
- intf_DbgMsg( "spudec debug: spu decoder thread %p destroyed\n", p_spudec);
+ intf_DbgMsg( "spudec debug: spu decoder thread %p destroyed", p_spudec);
}
* vdec_motion.c : motion compensation routines
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: vdec_motion.c,v 1.32 2000/12/21 17:19:52 massiot Exp $
+ * $Id: vdec_motion.c,v 1.33 2000/12/22 13:04:45 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Jean-Marc Dressler <polux@via.ecp.fr>
+ (i_mv_y >> 1) * i_l_stride;
if( i_source_offset >= p_source->i_width * p_source->i_height )
{
- intf_ErrMsg( "vdec error: bad motion vector (lum)\n" );
+ intf_ErrMsg( "vdec error: bad motion vector (lum)" );
return;
}
+ ((i_mv_y/2) >> 1) * i_c_stride;
if( i_source_offset >= (p_source->i_width * p_source->i_height) / 4 )
{
- intf_ErrMsg( "vdec error: bad motion vector (chroma)\n" );
+ intf_ErrMsg( "vdec error: bad motion vector (chroma)" );
return;
}
* video_decoder.c : video decoder thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_decoder.c,v 1.41 2000/12/21 17:19:52 massiot Exp $
+ * $Id: video_decoder.c,v 1.42 2000/12/22 13:04:45 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Gaël Hendryckx <jimmy@via.ecp.fr>
{
vdec_thread_t * p_vdec;
- intf_DbgMsg("vdec debug: creating video decoder thread\n");
+ intf_DbgMsg("vdec debug: creating video decoder thread");
/* Allocate the memory needed to store the thread's structure */
if ( (p_vdec = (vdec_thread_t *)malloc( sizeof(vdec_thread_t) )) == NULL )
{
- intf_ErrMsg("vdec error: not enough memory for vdec_CreateThread() to create the new thread\n");
+ intf_ErrMsg("vdec error: not enough memory for vdec_CreateThread() to create the new thread");
return( NULL );
}
if ( vlc_thread_create(&p_vdec->thread_id, "video decoder",
(vlc_thread_func_t)RunThread, (void *)p_vdec) )
{
- intf_ErrMsg("vdec error: can't spawn video decoder thread\n");
+ intf_ErrMsg("vdec error: can't spawn video decoder thread");
free( p_vdec );
return( NULL );
}
- intf_DbgMsg("vdec debug: video decoder thread (%p) created\n", p_vdec);
+ intf_DbgMsg("vdec debug: video decoder thread (%p) created", p_vdec);
return( p_vdec );
}
*****************************************************************************/
void vdec_DestroyThread( vdec_thread_t *p_vdec /*, int *pi_status */ )
{
- intf_DbgMsg("vdec debug: requesting termination of video decoder thread %p\n", p_vdec);
+ intf_DbgMsg("vdec debug: requesting termination of video decoder thread %p", p_vdec);
/* Ask thread to kill itself */
p_vdec->b_die = 1;
int i_dummy;
#endif
- intf_DbgMsg("vdec debug: initializing video decoder thread %p\n", p_vdec);
+ intf_DbgMsg("vdec debug: initializing video decoder thread %p", p_vdec);
#ifndef HAVE_MMX
/* Init crop table */
/* Re-nice ourself */
if( nice(VDEC_NICE) == -1 )
{
- intf_WarnMsg( 2, "vdec warning : couldn't nice() (%s)\n",
+ intf_WarnMsg( 2, "vdec warning : couldn't nice() (%s)",
strerror(errno) );
}
#endif
/* Mark thread as running and return */
- intf_DbgMsg("vdec debug: InitThread(%p) succeeded\n", p_vdec);
+ intf_DbgMsg("vdec debug: InitThread(%p) succeeded", p_vdec);
return( 0 );
}
*****************************************************************************/
static void EndThread( vdec_thread_t *p_vdec )
{
- intf_DbgMsg("vdec debug: EndThread(%p)\n", p_vdec);
+ intf_DbgMsg("vdec debug: EndThread(%p)", p_vdec);
}
/*****************************************************************************
*/
if( p_mb->pf_motion == 0 )
{
- intf_ErrMsg( "vdec error: pf_motion set to NULL\n" );
+ intf_ErrMsg( "vdec error: pf_motion set to NULL" );
}
else
{
*/
if( p_mb->pf_motion == 0 )
{
- intf_ErrMsg( "vdec error: pf_motion set to NULL\n" );
+ intf_ErrMsg( "vdec error: pf_motion set to NULL" );
}
else
{
*****************************************************************************/
static void RunThread( vdec_thread_t *p_vdec )
{
- intf_DbgMsg("vdec debug: running video decoder thread (%p) (pid == %i)\n",
+ intf_DbgMsg("vdec debug: running video decoder thread (%p) (pid == %i)",
p_vdec, getpid());
/*
* video_fifo.h : FIFO for the pool of video_decoders
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_fifo.h,v 1.1 2000/12/21 17:19:52 massiot Exp $
+ * $Id: video_fifo.h,v 1.2 2000/12/22 13:04:45 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
while( P_buffer.i_index == -1 )
{
/* No more structures available. This should not happen ! */
- intf_DbgMsg("vpar debug: macroblock list is empty, delaying\n");
+ intf_DbgMsg("vpar debug: macroblock list is empty, delaying");
vlc_mutex_unlock( &P_buffer.lock );
if( p_fifo->p_vpar->b_die )
{
/* Test if it was the last block of the picture */
if( b_finished )
{
-//intf_DbgMsg( "Image decodee\n" );
+//intf_DbgMsg( "Image decodee" );
/* Mark the picture to be displayed */
vout_DisplayPicture( p_fifo->p_vpar->p_vout, p_mb->p_picture );
/* Test if it was the last block of the picture */
if( b_finished )
{
- intf_DbgMsg( "Image trashee\n" );
+ intf_DbgMsg( "Image trashee" );
/* Mark the picture to be trashed */
vout_DestroyPicture( p_fifo->p_vpar->p_vout, p_mb->p_picture );
int i_best_index = 0, i_best_score = 0;
/* Allocate descriptor */
- intf_DbgMsg("\n");
p_vout = (vout_thread_t *) malloc( sizeof(vout_thread_t) );
if( p_vout == NULL )
{
- intf_ErrMsg( "vout error: %s\n", strerror(ENOMEM) );
+ intf_ErrMsg( "vout error: %s", strerror(ENOMEM) );
return( NULL );
}
p_vout->b_interface = 0;
p_vout->b_scale = 1;
- intf_DbgMsg( "wished configuration: %dx%d, %d/%d bpp (%d Bpl)\n",
+ intf_DbgMsg( "wished configuration: %dx%d, %d/%d bpp (%d Bpl)",
p_vout->i_width, p_vout->i_height, p_vout->i_screen_depth,
p_vout->i_bytes_per_pixel * 8, p_vout->i_bytes_per_line );
return( NULL );
}
intf_DbgMsg( "actual configuration: %dx%d, %d/%d bpp (%d Bpl), "
- "masks: 0x%x/0x%x/0x%x\n",
+ "masks: 0x%x/0x%x/0x%x",
p_vout->i_width, p_vout->i_height, p_vout->i_screen_depth,
p_vout->i_bytes_per_pixel * 8, p_vout->i_bytes_per_line,
p_vout->i_red_mask, p_vout->i_green_mask,
}
if( p_vout->p_default_font == NULL )
{
- intf_ErrMsg( "vout error: could not load default font\n" );
+ intf_ErrMsg( "vout error: could not load default font" );
p_vout->p_sys_destroy( p_vout );
free( p_vout );
return( NULL );
}
if( p_vout->p_large_font == NULL )
{
- intf_ErrMsg( "vout error: could not load large font\n" );
+ intf_ErrMsg( "vout error: could not load large font" );
vout_UnloadFont( p_vout->p_default_font );
p_vout->p_sys_destroy( p_vout );
free( p_vout );
if( vlc_thread_create( &p_vout->thread_id, "video output",
(void *) RunThread, (void *) p_vout) )
{
- intf_ErrMsg("vout error: %s\n", strerror(ENOMEM));
+ intf_ErrMsg("vout error: %s", strerror(ENOMEM));
vout_UnloadFont( p_vout->p_default_font );
vout_UnloadFont( p_vout->p_large_font );
p_vout->p_sys_destroy( p_vout );
return( NULL );
}
- intf_Msg( "Video display initialized (%dx%d, %d/%d bpp)\n", p_vout->i_width,
+ intf_Msg( "Video display initialized (%dx%d, %d/%d bpp)", p_vout->i_width,
p_vout->i_height, p_vout->i_screen_depth,
p_vout->i_bytes_per_pixel * 8 );
int i_status; /* thread status */
/* Set status */
- intf_DbgMsg("\n");
+ intf_DbgMsg("");
p_vout->pi_status = (pi_status != NULL) ? pi_status : &i_status;
*p_vout->pi_status = THREAD_DESTROY;
/* Check if status is valid */
if( p_subpic->i_status != RESERVED_SUBPICTURE )
{
- intf_DbgMsg("error: subpicture %p has invalid status %d\n", p_subpic,
+ intf_DbgMsg("error: subpicture %p has invalid status %d", p_subpic,
p_subpic->i_status );
}
#endif
#ifdef DEBUG_VOUT
/* Send subpicture information */
- intf_DbgMsg("subpicture %p: type=%d, begin date=%s, end date=%s\n",
+ intf_DbgMsg("subpicture %p: type=%d, begin date=%s, end date=%s",
p_subpic, p_subpic->i_type,
mstrtime( psz_begin_date, p_subpic->begin_date ),
mstrtime( psz_end_date, p_subpic->end_date ) );
* to be done */
p_vout->p_subpicture[i_subpic].i_status = RESERVED_SUBPICTURE;
#ifdef DEBUG_VOUT
- intf_DbgMsg("subpicture %p (in destroyed subpicture slot)\n",
+ intf_DbgMsg("subpicture %p (in destroyed subpicture slot)",
&p_vout->p_subpicture[i_subpic] );
#endif
vlc_mutex_unlock( &p_vout->subpicture_lock );
break;
#ifdef DEBUG
default:
- intf_DbgMsg("error: unknown subpicture type %d\n", i_type );
+ intf_DbgMsg("error: unknown subpicture type %d", i_type );
p_free_subpic->p_data = NULL;
break;
#endif
p_free_subpic->i_type = EMPTY_SUBPICTURE;
p_free_subpic->i_status = FREE_SUBPICTURE;
p_free_subpic = NULL;
- intf_ErrMsg("spu warning: %s\n", strerror( ENOMEM ) );
+ intf_ErrMsg("spu warning: %s", strerror( ENOMEM ) );
}
#ifdef DEBUG_VOUT
- intf_DbgMsg("subpicture %p (in free subpicture slot)\n", p_free_subpic );
+ intf_DbgMsg("subpicture %p (in free subpicture slot)", p_free_subpic );
#endif
vlc_mutex_unlock( &p_vout->subpicture_lock );
return( p_free_subpic );
}
/* No free or destroyed subpicture could be found */
- intf_DbgMsg( "warning: subpicture heap is full\n" );
+ intf_DbgMsg( "warning: subpicture heap is full" );
vlc_mutex_unlock( &p_vout->subpicture_lock );
return( NULL );
}
/* Check if status is valid */
if( p_subpic->i_status != RESERVED_SUBPICTURE )
{
- intf_DbgMsg("error: subpicture %p has invalid status %d\n",
+ intf_DbgMsg("error: subpicture %p has invalid status %d",
p_subpic, p_subpic->i_status );
}
#endif
p_subpic->i_status = DESTROYED_SUBPICTURE;
#ifdef DEBUG_VOUT
- intf_DbgMsg("subpicture %p\n", p_subpic);
+ intf_DbgMsg("subpicture %p", p_subpic);
#endif
}
break;
#ifdef DEBUG
default:
- intf_DbgMsg("error: picture %p has invalid status %d\n", p_pic, p_pic->i_status );
+ intf_DbgMsg("error: picture %p has invalid status %d", p_pic, p_pic->i_status );
break;
#endif
}
#ifdef DEBUG_VOUT
- intf_DbgMsg("picture %p\n", p_pic);
+ intf_DbgMsg("picture %p", p_pic);
#endif
vlc_mutex_unlock( &p_vout->picture_lock );
}
break;
#ifdef DEBUG
default:
- intf_DbgMsg("error: picture %p has invalid status %d\n", p_pic, p_pic->i_status );
+ intf_DbgMsg("error: picture %p has invalid status %d", p_pic, p_pic->i_status );
break;
#endif
}
#ifdef DEBUG_VOUT
- intf_DbgMsg("picture %p, display date: %s\n", p_pic, mstrtime( psz_date, p_pic->date) );
+ intf_DbgMsg("picture %p, display date: %s", p_pic, mstrtime( psz_date, p_pic->date) );
#endif
vlc_mutex_unlock( &p_vout->picture_lock );
}
p_vout->p_picture[i_picture].i_status = RESERVED_PICTURE;
p_vout->i_pictures++;
#ifdef DEBUG_VOUT
- intf_DbgMsg("picture %p (in destroyed picture slot)\n",
+ intf_DbgMsg("picture %p (in destroyed picture slot)",
&p_vout->p_picture[i_picture] );
#endif
vlc_mutex_unlock( &p_vout->picture_lock );
break;
#ifdef DEBUG
default:
- intf_DbgMsg("error: unknown picture type %d\n", i_type );
+ intf_DbgMsg("error: unknown picture type %d", i_type );
p_free_picture->p_data = NULL;
break;
#endif
p_free_picture->i_type = EMPTY_PICTURE;
p_free_picture->i_status = FREE_PICTURE;
p_free_picture = NULL;
- intf_ErrMsg( "vout warning: %s\n", strerror( ENOMEM ) );
+ intf_ErrMsg( "vout warning: %s", strerror( ENOMEM ) );
}
#ifdef DEBUG_VOUT
- intf_DbgMsg("picture %p (in free picture slot)\n", p_free_picture );
+ intf_DbgMsg("picture %p (in free picture slot)", p_free_picture );
#endif
vlc_mutex_unlock( &p_vout->picture_lock );
return( p_free_picture );
}
/* No free or destroyed picture could be found */
- intf_DbgMsg( "warning: picture heap is full\n" );
+ intf_DbgMsg( "warning: picture heap is full" );
vlc_mutex_unlock( &p_vout->picture_lock );
return( NULL );
}
(p_pic->i_status != RESERVED_DATED_PICTURE) &&
(p_pic->i_status != RESERVED_DISP_PICTURE) )
{
- intf_DbgMsg("error: picture %p has invalid status %d\n", p_pic, p_pic->i_status );
+ intf_DbgMsg("error: picture %p has invalid status %d", p_pic, p_pic->i_status );
}
#endif
p_vout->i_pictures--;
#ifdef DEBUG_VOUT
- intf_DbgMsg("picture %p\n", p_pic);
+ intf_DbgMsg("picture %p", p_pic);
#endif
vlc_mutex_unlock( &p_vout->picture_lock );
}
p_pic->i_refcount++;
#ifdef DEBUG_VOUT
- intf_DbgMsg("picture %p refcount=%d\n", p_pic, p_pic->i_refcount );
+ intf_DbgMsg("picture %p refcount=%d", p_pic, p_pic->i_refcount );
#endif
vlc_mutex_unlock( &p_vout->picture_lock );
#ifdef DEBUG_VOUT
if( p_pic->i_refcount < 0 )
{
- intf_DbgMsg("error: refcount < 0\n");
+ intf_DbgMsg("error: refcount < 0");
p_pic->i_refcount = 0;
}
#endif
}
#ifdef DEBUG_VOUT
- intf_DbgMsg("picture %p refcount=%d\n", p_pic, p_pic->i_refcount );
+ intf_DbgMsg("picture %p refcount=%d", p_pic, p_pic->i_refcount );
#endif
vlc_mutex_unlock( &p_vout->picture_lock );
}
if (i != ((u32)1 << i_log))
{
- intf_DbgMsg("internal error: binary log overflow\n");
+ intf_DbgMsg("internal error: binary log overflow");
}
return( i_log );
static int InitThread( vout_thread_t *p_vout )
{
/* Update status */
- intf_DbgMsg("\n");
*p_vout->pi_status = THREAD_START;
#ifdef STATS
/* Initialize convertion tables and functions */
if( vout_InitYUV( p_vout ) )
{
- intf_ErrMsg("error: can't allocate YUV translation tables\n");
+ intf_ErrMsg("error: can't allocate YUV translation tables");
return( 1 );
}
}
*p_vout->pi_status = THREAD_READY;
- intf_DbgMsg("thread ready\n");
+ intf_DbgMsg("thread ready");
return( 0 );
}
DestroyThread( p_vout, THREAD_ERROR );
return;
}
- intf_DbgMsg("\n");
/*
* Main loop - it is not executed if an error occured during
p_vout->c_loops++;
if( !(p_vout->c_loops % VOUT_STATS_NB_LOOPS) )
{
- intf_Msg("vout stats: picture heap: %d/%d\n",
+ intf_Msg("vout stats: picture heap: %d/%d",
p_vout->i_pictures, VOUT_MAX_PICTURES);
}
#endif
p_vout->i_pictures--;
}
intf_WarnMsg( 3,
- "warning: late picture skipped (%p)\n", p_pic );
+ "warning: late picture skipped (%p)", p_pic );
vlc_mutex_unlock( &p_vout->picture_lock );
continue;
} else {
/* no splash screen ! */
- intf_ErrMsgImm("End of splash screen\n");
+ intf_ErrMsgImm("End of splash screen");
p_vout->init_display_date=0;
}
}
* then swap buffers */
vlc_mutex_lock( &p_vout->change_lock );
#ifdef DEBUG_VOUT
- intf_DbgMsg( "picture %p, subpicture %p in buffer %d, display=%d\n", p_pic, p_subpic,
+ intf_DbgMsg( "picture %p, subpicture %p in buffer %d, display=%d", p_pic, p_subpic,
p_vout->i_buffer_index, b_display /* && !(p_vout->i_changes & VOUT_NODISPLAY_CHANGE) */ );
#endif
if( b_display /* && !(p_vout->i_changes & VOUT_NODISPLAY_CHANGE) */ )
/* End of thread */
EndThread( p_vout );
DestroyThread( p_vout, THREAD_OVER );
- intf_DbgMsg( "thread end\n" );
+ intf_DbgMsg( "thread end" );
}
/*****************************************************************************
static void ErrorThread( vout_thread_t *p_vout )
{
/* Wait until a `die' order */
- intf_DbgMsg("\n");
while( !p_vout->b_die )
{
/* Sleep a while */
int i_index; /* index in heap */
/* Store status */
- intf_DbgMsg("\n");
*p_vout->pi_status = THREAD_END;
#ifdef STATS
struct tms cpu_usage;
times( &cpu_usage );
- intf_Msg("vout stats: cpu usage (user: %d, system: %d)\n",
+ intf_Msg("vout stats: cpu usage (user: %d, system: %d)",
cpu_usage.tms_utime, cpu_usage.tms_stime);
}
#endif
int *pi_status; /* status adress */
/* Store status adress */
- intf_DbgMsg("\n");
pi_status = p_vout->pi_status;
/* Destroy thread structures allocated by Create and InitThread */
else
{
#ifdef DEBUG_VOUT
- intf_DbgMsg("area overflow\n");
+ intf_DbgMsg("area overflow");
#endif
p_buffer->pi_area_end[VOUT_MAX_AREAS - 1] = i_h;
}
if( p_buffer->i_areas == VOUT_MAX_AREAS )
{
#ifdef DEBUG_VOUT
- intf_DbgMsg("areas overflow\n");
+ intf_DbgMsg("areas overflow");
#endif
p_buffer->pi_area_end[VOUT_MAX_AREAS - 2] = p_buffer->pi_area_end[VOUT_MAX_AREAS - 1];
}
for( i_area = 0; i_area < p_buffer->i_areas; i_area++ )
{
#ifdef DEBUG_VOUT
- intf_DbgMsg("clearing picture %p area in buffer %d: %d-%d\n", p_pic,
+ intf_DbgMsg("clearing picture %p area in buffer %d: %d-%d", p_pic,
p_vout->i_buffer_index, p_buffer->pi_area_begin[i_area], p_buffer->pi_area_end[i_area] );
#endif
i_data_size = (p_buffer->pi_area_end[i_area] - p_buffer->pi_area_begin[i_area] + 1) * p_vout->i_bytes_per_line;
break;
#ifdef DEBUG
default:
- intf_DbgMsg("error: unknown picture type %d\n", p_pic->i_type );
+ intf_DbgMsg("error: unknown picture type %d", p_pic->i_type );
break;
#endif
}
#ifdef DEBUG_VOUT
/* Print picture date and rendering time */
- intf_DbgMsg("picture %p rendered in buffer %d (%ld us), display date: %s\n", p_pic,
+ intf_DbgMsg("picture %p rendered in buffer %d (%ld us), display date: %s", p_pic,
p_vout->i_buffer_index, (long) (mdate() - render_time),
mstrtime( psz_date, p_pic->date ));
#endif
#ifdef DEBUG
default:
- intf_DbgMsg( "error: unknown subpicture %p type %d\n",
+ intf_DbgMsg( "error: unknown subpicture %p type %d",
p_subpic, p_subpic->i_type );
#endif
}
#ifdef DEBUG_VOUT
if( p_vout->i_changes )
{
- intf_DbgMsg("changes: 0x%x (no display: 0x%x)\n", p_vout->i_changes,
+ intf_DbgMsg("changes: 0x%x (no display: 0x%x)", p_vout->i_changes,
0 /* p_vout->i_changes & VOUT_NODISPLAY_CHANGE */ );
}
#endif
{
if( vout_ResetYUV( p_vout ) )
{
- intf_ErrMsg("error: can't rebuild convertion tables\n");
+ intf_ErrMsg("error: can't rebuild convertion tables");
return( 1 );
}
}
{
/* Some changes were not acknowledged by p_vout->p_sys_manage or this
* function, it means they should not be authorized */
- intf_ErrMsg( "error: unauthorized changes in the video output thread\n" );
+ intf_ErrMsg( "error: unauthorized changes in the video output thread" );
return( 1 );
}
static void SetPalette ( p_vout_thread_t p_vout, u16 *red,
u16 *green, u16 *blue, u16 *transp )
{
- intf_ErrMsg( "SetPalette: method does not support palette changing\n" );
+ intf_ErrMsg( "SetPalette: method does not support palette changing" );
}
if( ((i_code >> 2) + vspu.i_x + vspu.i_y * vspu.i_width)
> vspu.i_height * vspu.i_width )
{
- intf_DbgMsg ( "video_spu: invalid draw request ! %d %d\n",
+ intf_DbgMsg ( "video_spu: invalid draw request ! %d %d",
i_code >> 2, vspu.i_height * vspu.i_width
- ( (i_code >> 2) + vspu.i_x
+ vspu.i_y * vspu.i_width ) );
{
/* we have a boo boo ! */
intf_DbgMsg( "video_spu: unknown code 0x%x "
- "(dest %x side %x, x=%d, y=%d)\n",
+ "(dest %x side %x, x=%d, y=%d)",
i_code, p_from[i_id], i_id, vspu.i_x, vspu.i_y );
if( NewLine( &vspu, &i_id ) < 0 )
return;
if( ((i_code >> 2) + vspu.i_x + vspu.i_y * vspu.i_width)
> vspu.i_height * vspu.i_width )
{
- intf_DbgMsg ( "video_spu: invalid draw request ! %d %d\n",
+ intf_DbgMsg ( "video_spu: invalid draw request ! %d %d",
i_code >> 2, vspu.i_height * vspu.i_width
- ( (i_code >> 2) + vspu.i_x
+ vspu.i_y * vspu.i_width ) );
{
/* we have a boo boo ! */
intf_DbgMsg( "video_spu: unknown code 0x%x "
- "(dest %x side %x, x=%d, y=%d)\n",
+ "(dest %x side %x, x=%d, y=%d)",
i_code, p_from[i_id], i_id, vspu.i_x, vspu.i_y );
if( NewLine( &vspu, &i_id ) < 0 )
return;
i_file = open( psz_name, O_RDONLY );
if( i_file == -1 )
{
- intf_DbgMsg("vout: can't open file '%s' (%s)\n", psz_name, strerror(errno));
+ intf_DbgMsg("vout: can't open file '%s' (%s)", psz_name, strerror(errno));
return( NULL );
}
/* Read magick number */
if( read( i_file, pi_buffer, 2 ) != 2 )
{
- intf_ErrMsg("vout error: unexpected end of file '%s'\n", psz_name );
+ intf_ErrMsg("vout error: unexpected end of file '%s'", psz_name );
close( i_file );
return( NULL );
}
p_font = malloc( sizeof( vout_font_t ) );
if( p_font == NULL )
{
- intf_ErrMsg("vout error: %s\n", strerror(ENOMEM));
+ intf_ErrMsg("vout error: %s", strerror(ENOMEM));
close( i_file );
return( NULL );
}
/* Read font header - two bytes indicate the font properties */
if( read( i_file, pi_buffer, 2 ) != 2)
{
- intf_ErrMsg("error: unexpected end of file '%s'\n", psz_name );
+ intf_ErrMsg("error: unexpected end of file '%s'", psz_name );
free( p_font );
close( i_file );
return( NULL );
p_font->p_data = malloc( 2 * 256 * pi_buffer[1] );
if( p_font->p_data == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM));
+ intf_ErrMsg("error: %s", strerror(ENOMEM));
free( p_font );
close( i_file );
return( NULL );
/* Copy raw data */
if( read( i_file, p_font->p_data, 256 * pi_buffer[1] ) != 256 * pi_buffer[1] )
{
- intf_ErrMsg("error: unexpected end of file '%s'\n", psz_name );
+ intf_ErrMsg("error: unexpected end of file '%s'", psz_name );
free( p_font->p_data );
free( p_font );
close( i_file );
break;
default:
- intf_ErrMsg("error: file '%s' has an unknown format\n", psz_name );
+ intf_ErrMsg("error: file '%s' has an unknown format", psz_name );
free( p_font );
close( i_file );
return( NULL );
}
- intf_DbgMsg( "loaded %s: type %d, %d-%dx%d\n", psz_name, p_font->i_type,
+ intf_DbgMsg( "loaded %s: type %d, %d-%dx%d", psz_name, p_font->i_type,
p_font->i_width, p_font->i_interspacing, p_font->i_height );
return( p_font );
}
*****************************************************************************/
void vout_UnloadFont( vout_font_t *p_font )
{
- intf_DbgMsg( "vout: unloading font %p\n", p_font );
+ intf_DbgMsg( "vout: unloading font %p", p_font );
free( p_font->p_data );
free( p_font );
}
break;
#ifdef DEBUG
default:
- intf_DbgMsg("error: unknown font type %d\n", p_font->i_type );
+ intf_DbgMsg("error: unknown font type %d", p_font->i_type );
break;
#endif
}
break;
#ifdef DEBUG
default:
- intf_DbgMsg("error: unknown font type %d\n", p_font->i_type );
+ intf_DbgMsg("error: unknown font type %d", p_font->i_type );
break;
#endif
}
* video_parser.c : video parser thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_parser.c,v 1.57 2000/12/21 17:19:54 massiot Exp $
+ * $Id: video_parser.c,v 1.58 2000/12/22 13:04:45 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
{
vpar_thread_t * p_vpar;
- intf_DbgMsg( "vpar debug: creating video parser thread\n" );
+ intf_DbgMsg( "vpar debug: creating video parser thread" );
/* Allocate the memory needed to store the thread's structure */
if ( (p_vpar = (vpar_thread_t *)malloc( sizeof(vpar_thread_t) )) == NULL )
{
intf_ErrMsg( "vpar error: not enough memory "
- "for vpar_CreateThread() to create the new thread\n");
+ "for vpar_CreateThread() to create the new thread");
return( 0 );
}
if ( vlc_thread_create( &p_vpar->thread_id, "video parser",
(vlc_thread_func_t)RunThread, (void *)p_vpar ) )
{
- intf_ErrMsg("vpar error: can't spawn video parser thread\n");
+ intf_ErrMsg("vpar error: can't spawn video parser thread");
free( p_vpar );
return( 0 );
}
- intf_DbgMsg("vpar debug: video parser thread (%p) created\n", p_vpar);
+ intf_DbgMsg("vpar debug: video parser thread (%p) created", p_vpar);
return( p_vpar->thread_id );
}
int i_dummy;
#endif
- intf_DbgMsg("vpar debug: initializing video parser thread %p\n", p_vpar);
+ intf_DbgMsg("vpar debug: initializing video parser thread %p", p_vpar);
p_vpar->p_config->decoder_config.pf_init_bit_stream( &p_vpar->bit_stream,
p_vpar->p_config->decoder_config.p_decoder_fifo );
/* Re-nice ourself */
if( nice(VDEC_NICE) == -1 )
{
- intf_WarnMsg( 2, "vpar warning : couldn't nice() (%s)\n",
+ intf_WarnMsg( 2, "vpar warning : couldn't nice() (%s)",
strerror(errno) );
}
#endif
vpar_SynchroInit( p_vpar );
/* Mark thread as running and return */
- intf_DbgMsg("vpar debug: InitThread(%p) succeeded\n", p_vpar);
+ intf_DbgMsg("vpar debug: InitThread(%p) succeeded", p_vpar);
return( 0 );
}
*****************************************************************************/
static void RunThread( vpar_thread_t *p_vpar )
{
- intf_DbgMsg("vpar debug: running video parser thread (%p) (pid == %i)\n", p_vpar, getpid());
+ intf_DbgMsg("vpar debug: running video parser thread (%p) (pid == %i)", p_vpar, getpid());
/*
* Initialize thread
int i_dummy;
#endif
- intf_DbgMsg("vpar debug: destroying video parser thread %p\n", p_vpar);
+ intf_DbgMsg("vpar debug: destroying video parser thread %p", p_vpar);
#ifdef STATS
- intf_Msg("vpar stats: %d loops among %d sequence(s)\n",
+ intf_Msg("vpar stats: %d loops among %d sequence(s)",
p_vpar->c_loops, p_vpar->c_sequences);
{
struct tms cpu_usage;
times( &cpu_usage );
- intf_Msg("vpar stats: cpu usage (user: %d, system: %d)\n",
+ intf_Msg("vpar stats: cpu usage (user: %d, system: %d)",
cpu_usage.tms_utime, cpu_usage.tms_stime);
}
- intf_Msg("vpar stats: Read %d frames/fields (I %d/P %d/B %d)\n",
+ intf_Msg("vpar stats: Read %d frames/fields (I %d/P %d/B %d)",
p_vpar->pc_pictures[I_CODING_TYPE]
+ p_vpar->pc_pictures[P_CODING_TYPE]
+ p_vpar->pc_pictures[B_CODING_TYPE],
p_vpar->pc_pictures[I_CODING_TYPE],
p_vpar->pc_pictures[P_CODING_TYPE],
p_vpar->pc_pictures[B_CODING_TYPE]);
- intf_Msg("vpar stats: Decoded %d frames/fields (I %d/P %d/B %d)\n",
+ intf_Msg("vpar stats: Decoded %d frames/fields (I %d/P %d/B %d)",
p_vpar->pc_decoded_pictures[I_CODING_TYPE]
+ p_vpar->pc_decoded_pictures[P_CODING_TYPE]
+ p_vpar->pc_decoded_pictures[B_CODING_TYPE],
p_vpar->pc_decoded_pictures[I_CODING_TYPE],
p_vpar->pc_decoded_pictures[P_CODING_TYPE],
p_vpar->pc_decoded_pictures[B_CODING_TYPE]);
- intf_Msg("vpar stats: Read %d malformed frames/fields (I %d/P %d/B %d)\n",
+ intf_Msg("vpar stats: Read %d malformed frames/fields (I %d/P %d/B %d)",
p_vpar->pc_malformed_pictures[I_CODING_TYPE]
+ p_vpar->pc_malformed_pictures[P_CODING_TYPE]
+ p_vpar->pc_malformed_pictures[B_CODING_TYPE],
p_vpar->pc_malformed_pictures[P_CODING_TYPE],
p_vpar->pc_malformed_pictures[B_CODING_TYPE]);
#define S p_vpar->sequence
- intf_Msg("vpar info: %s stream (%dx%d), %d pi/s\n",
+ intf_Msg("vpar info: %s stream (%dx%d), %d pi/s",
S.b_mpeg2 ? "MPEG-2" : "MPEG-1",
S.i_width, S.i_height, S.i_frame_rate/1001);
- intf_Msg("vpar info: %s, %s, matrix_coeff: %d\n",
+ intf_Msg("vpar info: %s, %s, matrix_coeff: %d",
S.b_progressive ? "Progressive" : "Non-progressive",
S.i_scalable_mode ? "scalable" : "non-scalable",
S.i_matrix_coefficients);
free( p_vpar->p_config );
free( p_vpar );
- intf_DbgMsg("vpar debug: EndThread(%p)\n", p_vpar);
+ intf_DbgMsg("vpar debug: EndThread(%p)", p_vpar);
}
* vpar_blocks.c : blocks parsing
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: vpar_blocks.c,v 1.67 2000/12/21 17:19:54 massiot Exp $
+ * $Id: vpar_blocks.c,v 1.68 2000/12/22 13:04:45 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Jean-Marc Dressler <polux@via.ecp.fr>
/* There should be no D picture in non-intra blocks */
if( p_vpar->picture.i_coding_type == D_CODING_TYPE )
- intf_ErrMsg("vpar error : D-picture in non intra block\n");
+ intf_ErrMsg("vpar error : D-picture in non intra block");
/* Decoding of the AC coefficients */
p_mb->ppi_blocks[i_b][i_pos] = b_sign ? -i_level : i_level;
}
- intf_ErrMsg("vpar error: DCT coeff (non-intra) is out of bounds\n");
+ intf_ErrMsg("vpar error: DCT coeff (non-intra) is out of bounds");
p_vpar->picture.b_error = 1;
}
p_mb->ppi_blocks[i_b][i_pos] = b_sign ? -i_level : i_level;
}
- intf_ErrMsg("vpar error: DCT coeff (intra) is out of bounds\n");
+ intf_ErrMsg("vpar error: DCT coeff (intra) is out of bounds");
p_vpar->picture.b_error = 1;
}
p_mb->ppi_blocks[i_b][i_pos] = b_sign ? -i_level : i_level;
}
- intf_ErrMsg("vpar error: DCT coeff (non-intra) is out of bounds\n");
+ intf_ErrMsg("vpar error: DCT coeff (non-intra) is out of bounds");
p_vpar->picture.b_error = 1;
}
p_mb->ppi_blocks[i_b][i_pos] = b_sign ? -i_level : i_level;
}
- intf_ErrMsg("vpar error: DCT coeff (intra) is out of bounds\n");
+ intf_ErrMsg("vpar error: DCT coeff (intra) is out of bounds");
p_vpar->picture.b_error = 1;
}
if( (i_code -= 12) < 0 )
{
p_vpar->picture.b_error = 1;
- intf_DbgMsg( "vpar debug: Invalid motion_vector code\n" );
+ intf_DbgMsg( "vpar debug: Invalid motion_vector code" );
return 0;
}
if( i_coding_type == I_CODING_TYPE )
{
- intf_DbgMsg("vpar error: skipped macroblock in I-picture\n");
+ intf_DbgMsg("vpar error: skipped macroblock in I-picture");
p_vpar->picture.b_error = 1;
return;
}
if( i_inc < 0 )
{
- intf_ErrMsg( "vpar error: bad address increment (%d)\n", i_inc );
+ intf_ErrMsg( "vpar error: bad address increment (%d)", i_inc );
p_vpar->picture.b_error = 1;
return;
}
if( *pi_mb_address < i_mb_address_save )
{
- intf_ErrMsg( "vpar error: slices do not follow, maybe a PES has been trashed\n" );
+ intf_ErrMsg( "vpar error: slices do not follow, maybe a PES has been trashed" );
p_vpar->picture.b_error = 1;
return;
}
if( ppf_parse_mb[i_structure]
[p_vpar->picture.i_coding_type] == NULL )
{
- intf_ErrMsg( "vpar error: bad ppf_parse_mb function pointer (struct:%d, coding type:%d)\n",
+ intf_ErrMsg( "vpar error: bad ppf_parse_mb function pointer (struct:%d, coding type:%d)",
i_structure, i_coding_type );
}
else
< SLICE_START_CODE_MIN) ||
(i_dummy > SLICE_START_CODE_MAX) )
{
- intf_DbgMsg("vpar debug: premature end of picture\n");
+ intf_DbgMsg("vpar debug: premature end of picture");
p_vpar->picture.b_error = 1;
break;
}
* vpar_headers.c : headers parsing
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: vpar_headers.c,v 1.61 2000/12/21 17:19:54 massiot Exp $
+ * $Id: vpar_headers.c,v 1.62 2000/12/22 13:04:45 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stéphane Borel <stef@via.ecp.fr>
/* Allocate a piece of memory to load the matrix. */
if( (p_matrix->pi_matrix = (int *)malloc( 64*sizeof(int) )) == NULL )
{
- intf_ErrMsg( "vpar error: allocation error in LoadMatrix()\n" );
+ intf_ErrMsg( "vpar error: allocation error in LoadMatrix()" );
p_vpar->p_fifo->b_error = 1;
return;
}
break;
case SEQUENCE_END_CODE:
- intf_DbgMsg("vpar debug: sequence end code received\n");
+ intf_DbgMsg("vpar debug: sequence end code received");
return 1;
break;
p_vpar->picture.i_current_structure = 0;
- intf_DbgMsg("vpar debug: odd number of field picture.\n");
+ intf_DbgMsg("vpar debug: odd number of field picture.");
}
/* Do we have the reference pictures ? */
p_vpar->sequence.i_height ) )
== NULL )
{
- intf_DbgMsg("vpar debug: allocation error in vout_CreatePicture, delaying\n");
+ intf_DbgMsg("vpar debug: allocation error in vout_CreatePicture, delaying");
if( p_vpar->p_fifo->b_die || p_vpar->p_fifo->b_error )
{
return;
* vpar_synchro.c : frame dropping routines
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: vpar_synchro.c,v 1.62 2000/12/21 17:19:54 massiot Exp $
+ * $Id: vpar_synchro.c,v 1.63 2000/12/22 13:04:45 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
b_decode = (pts - now) > (TAU_PRIME(I_CODING_TYPE) + DELTA);
}
if( !b_decode )
- intf_WarnMsg( 3, "vpar synchro warning: trashing I\n" );
+ intf_WarnMsg( 3, "vpar synchro warning: trashing I" );
break;
case P_CODING_TYPE:
vlc_mutex_unlock( &p_vpar->synchro.fifo_lock );
#ifdef DEBUG_VPAR
- intf_DbgMsg("vpar synchro debug: %s picture scheduled for %s, %s (%lld)\n",
+ intf_DbgMsg("vpar synchro debug: %s picture scheduled for %s, %s (%lld)",
i_coding_type == B_CODING_TYPE ? "B" :
(i_coding_type == P_CODING_TYPE ? "P" : "I"),
mstrtime(p_date, pts), b_decode ? "decoding" : "trashed",
else
{
/* FIFO full, panic() */
- intf_ErrMsg("vpar error: synchro fifo full, estimations will be biased\n");
+ intf_ErrMsg("vpar error: synchro fifo full, estimations will be biased");
}
vlc_mutex_unlock( &p_vpar->synchro.fifo_lock );
p_vpar->synchro.pi_meaningful[i_coding_type]++;
}
#ifdef DEBUG_VPAR
- intf_DbgMsg("vpar synchro debug: finished decoding %s (%lld)\n",
+ intf_DbgMsg("vpar synchro debug: finished decoding %s (%lld)",
i_coding_type == B_CODING_TYPE ? "B" :
(i_coding_type == P_CODING_TYPE ? "P" : "I"), tau);
#endif
#ifdef STATS
if( p_vpar->synchro.i_type == VPAR_SYNCHRO_DEFAULT )
{
- intf_Msg( "vpar synchro stats: I(%lld) P(%lld)[%d] B(%lld)[%d] YUV(%lld) : %d/%d\n",
+ intf_Msg( "vpar synchro stats: I(%lld) P(%lld)[%d] B(%lld)[%d] YUV(%lld) : %d/%d",
p_vpar->synchro.p_tau[I_CODING_TYPE],
p_vpar->synchro.p_tau[P_CODING_TYPE],
p_vpar->synchro.i_n_p,
if( p_pes->i_pts < p_vpar->synchro.current_pts )
{
intf_WarnMsg( 2,
- "vpar synchro warning: pts_date < current_date\n" );
+ "vpar synchro warning: pts_date < current_date" );
}
p_vpar->synchro.current_pts = p_pes->i_pts;
p_pes->b_has_pts = 0;
if( p_vpar->synchro.backward_pts < p_vpar->synchro.current_pts )
{
intf_WarnMsg( 2,
- "vpar warning: backward_date < current_date\n" );
+ "vpar warning: backward_date < current_date" );
}
p_vpar->synchro.current_pts = p_vpar->synchro.backward_pts;
p_vpar->synchro.backward_pts = 0;