Commit 5ca0ebcc authored by Sam Hocevar's avatar Sam Hocevar

* Coding style cleanup: removed tabs and trailing spaces.

parent 973409ad
This diff is collapsed.
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* using libcdio, libvcd and libvcdinfo * using libcdio, libvcd and libvcdinfo
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: cdda.h,v 1.3 2003/11/30 22:26:49 rocky Exp $ * $Id: cdda.h,v 1.4 2003/12/22 14:32:55 sam Exp $
* *
* Authors: Rocky Bernstein <rocky@panix.com> * Author: Rocky Bernstein <rocky@panix.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#endif #endif
/***************************************************************************** /*****************************************************************************
* Debugging * Debugging
*****************************************************************************/ *****************************************************************************/
#define INPUT_DBG_META 1 /* Meta information */ #define INPUT_DBG_META 1 /* Meta information */
#define INPUT_DBG_EVENT 2 /* Trace keyboard events */ #define INPUT_DBG_EVENT 2 /* Trace keyboard events */
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
if (p_cdda->i_debug & mask) \ if (p_cdda->i_debug & mask) \
msg_Dbg(p_input, "%s: "s, __func__ , ##args) msg_Dbg(p_input, "%s: "s, __func__ , ##args)
#else #else
#define dbg_print(mask, s, args...) #define dbg_print(mask, s, args...)
#endif #endif
/***************************************************************************** /*****************************************************************************
...@@ -70,8 +70,8 @@ typedef struct cdda_data_s ...@@ -70,8 +70,8 @@ typedef struct cdda_data_s
struct { struct {
bool have_info; /* True if we have any info */ bool have_info; /* True if we have any info */
cddb_disc_t *disc; /* libcdio uses this to get disc info */ cddb_disc_t *disc; /* libcdio uses this to get disc info */
int disc_length; /* Length in frames of cd. Used in int disc_length; /* Length in frames of cd. Used in
CDDB lookups */ CDDB lookups */
} cddb; } cddb;
#endif #endif
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Sam Hocevar <sam@zoy.org>
* Jean-Paul Saman <jpsaman@wxs.nl> * Jean-Paul Saman <jpsaman@wxs.nl>
* Christopher Ross <chris@tebibyte.org> * Christopher Ross <chris@tebibyte.org>
* *
...@@ -71,7 +71,7 @@ void E_(Close) ( vlc_object_t * ); ...@@ -71,7 +71,7 @@ void E_(Close) ( vlc_object_t * );
#define LNB_SLOF_TEXT N_("antenna lnb_slof (kHz)") #define LNB_SLOF_TEXT N_("antenna lnb_slof (kHz)")
#define LNB_SLOF_LONGTEXT "" #define LNB_SLOF_LONGTEXT ""
#define PROBE_TEXT N_("probe the dvb card for capabilities (default disabled)") #define PROBE_TEXT N_("probe the dvb card for capabilities (default disabled)")
#define PROBE_LONGTEXT N_("some dvb cards do not like to be probed for their capabilities") #define PROBE_LONGTEXT N_("some dvb cards do not like to be probed for their capabilities")
/* Cable */ /* Cable */
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* -udf.* to find files * -udf.* to find files
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: access.c,v 1.14 2003/10/25 00:49:13 sam Exp $ * $Id: access.c,v 1.15 2003/12/22 14:32:55 sam Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -502,11 +502,11 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -502,11 +502,11 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
val.i_int = p_area->i_id; val.i_int = p_area->i_id;
var_Change( p_input, "title", VLC_VAR_SETVALUE, &val, NULL ); var_Change( p_input, "title", VLC_VAR_SETVALUE, &val, NULL );
var_Change( p_input, "chapter", VLC_VAR_CLEARCHOICES, NULL, NULL ); var_Change( p_input, "chapter", VLC_VAR_CLEARCHOICES, NULL, NULL );
for( i = 1; i <= p_area->i_part_nb; i++ ) for( i = 1; i <= p_area->i_part_nb; i++ )
{ {
val.i_int = i; val.i_int = i;
var_Change( p_input, "chapter", VLC_VAR_ADDCHOICE, &val, NULL ); var_Change( p_input, "chapter", VLC_VAR_ADDCHOICE, &val, NULL );
} }
} /* i_title >= 0 */ } /* i_title >= 0 */
else else
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Copyright (C) lavrec (see http://mjpeg.sourceforge.net) * Copyright (C) lavrec (see http://mjpeg.sourceforge.net)
* ( XXX This file was get from the driver-zoran package and it is under GPL) * ( XXX This file was get from the driver-zoran package and it is under GPL)
* *
* $Id: videodev_mjpeg.h,v 1.1 2003/05/31 01:23:29 fenrir Exp $ * $Id: videodev_mjpeg.h,v 1.2 2003/12/22 14:32:55 sam Exp $
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -93,16 +93,16 @@ struct mjpeg_params ...@@ -93,16 +93,16 @@ struct mjpeg_params
#define JPEG_MARKER_COM (1<<6) /* Comment segment */ #define JPEG_MARKER_COM (1<<6) /* Comment segment */
#define JPEG_MARKER_APP (1<<7) /* App segment, driver will allways use APP0 */ #define JPEG_MARKER_APP (1<<7) /* App segment, driver will allways use APP0 */
int VFIFO_FB; /* Flag for enabling Video Fifo Feedback. int VFIFO_FB; /* Flag for enabling Video Fifo Feedback.
If this flag is turned on and JPEG decompressing If this flag is turned on and JPEG decompressing
is going to the screen, the decompress process is going to the screen, the decompress process
is stopped every time the Video Fifo is full. is stopped every time the Video Fifo is full.
This enables a smooth decompress to the screen This enables a smooth decompress to the screen
but the video output signal will get scrambled */ but the video output signal will get scrambled */
/* Misc */ /* Misc */
char reserved[312]; /* Makes 512 bytes for this structure */ char reserved[312]; /* Makes 512 bytes for this structure */
}; };
struct mjpeg_requestbuffers struct mjpeg_requestbuffers
......
This diff is collapsed.
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf.h: send info to intf. * intf.h: send info to intf.
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: intf.h,v 1.3 2003/12/05 05:01:17 rocky Exp $ * $Id: intf.h,v 1.4 2003/12/22 14:32:55 sam Exp $
* *
* Author: Stéphane Borel <stef@via.ecp.fr> * Author: Stéphane Borel <stef@via.ecp.fr>
* *
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -28,15 +28,15 @@ struct intf_sys_t ...@@ -28,15 +28,15 @@ struct intf_sys_t
{ {
input_thread_t * p_input; input_thread_t * p_input;
thread_vcd_data_t * p_vcd; thread_vcd_data_t * p_vcd;
vlc_bool_t b_still; /* True if we are in a still frame */ vlc_bool_t b_still; /* True if we are in a still frame */
vlc_bool_t b_inf_still; /* True if still wait time is infinite */ vlc_bool_t b_inf_still; /* True if still wait time is infinite */
mtime_t m_still_time; /* Time in microseconds remaining mtime_t m_still_time; /* Time in microseconds remaining
to wait in still frame. to wait in still frame.
*/ */
#if FINISHED #if FINISHED
vcdplay_ctrl_t control; vcdplay_ctrl_t control;
#else #else
int control; int control;
#endif #endif
vlc_bool_t b_click, b_move, b_key_pressed; vlc_bool_t b_click, b_move, b_key_pressed;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* linear.c : linear interpolation resampler * linear.c : linear interpolation resampler
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: linear.c,v 1.10 2003/03/04 03:27:40 gbazin Exp $ * $Id: linear.c,v 1.11 2003/12/22 14:32:55 sam Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* Sigmund Augdal <sigmunau@idi.ntnu.no> * Sigmund Augdal <sigmunau@idi.ntnu.no>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -129,15 +129,15 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -129,15 +129,15 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
if( p_aout->mixer.mixer.i_rate == p_filter->input.i_rate ) if( p_aout->mixer.mixer.i_rate == p_filter->input.i_rate )
{ {
if( p_filter->b_continuity && if( p_filter->b_continuity &&
p_in_buf->i_size >= p_in_buf->i_size >=
p_in_buf->i_nb_bytes + sizeof(float) * i_nb_channels ) p_in_buf->i_nb_bytes + sizeof(float) * i_nb_channels )
{ {
/* output the whole thing with the last sample from last time */ /* output the whole thing with the last sample from last time */
memmove( ((float *)(p_in_buf->p_buffer)) + i_nb_channels, memmove( ((float *)(p_in_buf->p_buffer)) + i_nb_channels,
p_in_buf->p_buffer, p_in_buf->i_nb_bytes ); p_in_buf->p_buffer, p_in_buf->i_nb_bytes );
memcpy( p_in_buf->p_buffer, p_prev_sample, memcpy( p_in_buf->p_buffer, p_prev_sample,
i_nb_channels * sizeof(float) ); i_nb_channels * sizeof(float) );
} }
p_filter->b_continuity = VLC_FALSE; p_filter->b_continuity = VLC_FALSE;
return; return;
} }
...@@ -158,7 +158,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -158,7 +158,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
if( !p_filter->b_continuity ) if( !p_filter->b_continuity )
{ {
p_filter->b_continuity = VLC_TRUE; p_filter->b_continuity = VLC_TRUE;
p_filter->p_sys->i_remainder = 0; p_filter->p_sys->i_remainder = 0;
aout_DateInit( &p_filter->p_sys->end_date, p_filter->output.i_rate ); aout_DateInit( &p_filter->p_sys->end_date, p_filter->output.i_rate );
} }
else else
...@@ -169,12 +169,12 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -169,12 +169,12 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
{ {
i_chan--; i_chan--;
p_out[i_chan] = p_prev_sample[i_chan]; p_out[i_chan] = p_prev_sample[i_chan];
p_out[i_chan] += ( (p_prev_sample[i_chan] - p_in[i_chan]) p_out[i_chan] += ( (p_prev_sample[i_chan] - p_in[i_chan])
* p_filter->p_sys->i_remainder * p_filter->p_sys->i_remainder
/ p_filter->output.i_rate ); / p_filter->output.i_rate );
} }
p_out += i_nb_channels; p_out += i_nb_channels;
i_out++; i_out++;
p_filter->p_sys->i_remainder += p_filter->input.i_rate; p_filter->p_sys->i_remainder += p_filter->input.i_rate;
} }
...@@ -190,12 +190,12 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -190,12 +190,12 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
{ {
i_chan--; i_chan--;
p_out[i_chan] = p_in[i_chan]; p_out[i_chan] = p_in[i_chan];
p_out[i_chan] += ( (p_in[i_chan] - p_out[i_chan] += ( (p_in[i_chan] -
p_in[i_chan + i_nb_channels]) p_in[i_chan + i_nb_channels])
* p_filter->p_sys->i_remainder / p_filter->output.i_rate ); * p_filter->p_sys->i_remainder / p_filter->output.i_rate );
} }
p_out += i_nb_channels; p_out += i_nb_channels;
i_out++; i_out++;
p_filter->p_sys->i_remainder += p_filter->input.i_rate; p_filter->p_sys->i_remainder += p_filter->input.i_rate;
} }
...@@ -215,7 +215,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -215,7 +215,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
p_out_buf->start_date = p_in_buf->start_date; p_out_buf->start_date = p_in_buf->start_date;
if( p_in_buf->start_date != if( p_in_buf->start_date !=
aout_DateGet( &p_filter->p_sys->end_date ) ) aout_DateGet( &p_filter->p_sys->end_date ) )
{ {
aout_DateSet( &p_filter->p_sys->end_date, p_in_buf->start_date ); aout_DateSet( &p_filter->p_sys->end_date, p_in_buf->start_date );
} }
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
* oss.c : OSS /dev/dsp module for vlc * oss.c : OSS /dev/dsp module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2002 VideoLAN * Copyright (C) 2000-2002 VideoLAN
* $Id: oss.c,v 1.60 2003/05/15 22:27:37 massiot Exp $ * $Id: oss.c,v 1.61 2003/12/22 14:32:55 sam Exp $
* *
* Authors: Michel Kaempf <maxx@via.ecp.fr> * Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Sam Hocevar <sam@zoy.org>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
/* Patches for ignorant OSS versions */ /* Patches for ignorant OSS versions */
#ifndef AFMT_AC3 #ifndef AFMT_AC3
# define AFMT_AC3 0x00000400 /* Dolby Digital AC3 */ # define AFMT_AC3 0x00000400 /* Dolby Digital AC3 */
#endif #endif
#ifndef AFMT_S16_NE #ifndef AFMT_S16_NE
...@@ -253,7 +253,7 @@ static void Probe( aout_instance_t * p_aout ) ...@@ -253,7 +253,7 @@ static void Probe( aout_instance_t * p_aout )
{ {
msg_Warn( p_aout, "s/pdif not supported by card" ); msg_Warn( p_aout, "s/pdif not supported by card" );
} }
} }
var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart, var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart,
NULL ); NULL );
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
* sdl.c : SDL audio output plugin for vlc * sdl.c : SDL audio output plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2002 VideoLAN * Copyright (C) 2000-2002 VideoLAN
* $Id: sdl.c,v 1.23 2003/10/25 00:49:13 sam Exp $ * $Id: sdl.c,v 1.24 2003/12/22 14:32:55 sam Exp $
* *
* Authors: Michel Kaempf <maxx@via.ecp.fr> * Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Sam Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org> * Pierre Baillet <oct@zoy.org>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -177,7 +177,7 @@ static int Open ( vlc_object_t *p_this ) ...@@ -177,7 +177,7 @@ static int Open ( vlc_object_t *p_this )
var_Change( p_aout, "audio-device", VLC_VAR_SETTEXT, &text, NULL ); var_Change( p_aout, "audio-device", VLC_VAR_SETTEXT, &text, NULL );
val.i_int = (obtained.channels == 2) ? AOUT_VAR_STEREO : val.i_int = (obtained.channels == 2) ? AOUT_VAR_STEREO :
AOUT_VAR_MONO; AOUT_VAR_MONO;
text.psz_string = (obtained.channels == 2) ? N_("Stereo") : text.psz_string = (obtained.channels == 2) ? N_("Stereo") :
N_("Mono"); N_("Mono");
var_Change( p_aout, "audio-device", var_Change( p_aout, "audio-device",
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* a52.c: parse A/52 audio sync info and packetize the stream * a52.c: parse A/52 audio sync info and packetize the stream
***************************************************************************** *****************************************************************************
* Copyright (C) 2001-2002 VideoLAN * Copyright (C) 2001-2002 VideoLAN
* $Id: a52.c,v 1.31 2003/11/22 23:39:14 fenrir Exp $ * $Id: a52.c,v 1.32 2003/12/22 14:32:55 sam Exp $
* *
* Authors: Stphane Borel <stef@via.ecp.fr> * Authors: Stphane Borel <stef@via.ecp.fr>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -195,7 +195,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -195,7 +195,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
} }
if( p_sys->i_state != STATE_SYNC ) if( p_sys->i_state != STATE_SYNC )
{ {
block_BytestreamFlush( &p_sys->bytestream ); block_BytestreamFlush( &p_sys->bytestream );
/* Need more data */ /* Need more data */
return NULL; return NULL;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* dts.c: parse DTS audio sync info and packetize the stream * dts.c: parse DTS audio sync info and packetize the stream
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: dts.c,v 1.8 2003/12/01 23:39:11 gbazin Exp $ * $Id: dts.c,v 1.9 2003/12/22 14:32:55 sam Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
...@@ -263,7 +263,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -263,7 +263,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
{ {
msg_Dbg( p_dec, "emulated sync word " msg_Dbg( p_dec, "emulated sync word "
"(no sync on following frame) %2.2x%2.2x%2.2x%2.2x", "(no sync on following frame) %2.2x%2.2x%2.2x%2.2x",
p_header[0], p_header[1], p_header[2], p_header[3] ); p_header[0], p_header[1], p_header[2], p_header[3] );
p_sys->i_state = STATE_NOSYNC; p_sys->i_state = STATE_NOSYNC;
block_SkipByte( &p_sys->bytestream ); block_SkipByte( &p_sys->bytestream );
break; break;
...@@ -546,7 +546,7 @@ static int SyncInfo( const byte_t * p_buf, ...@@ -546,7 +546,7 @@ static int SyncInfo( const byte_t * p_buf,
{ {
/* User defined */ /* User defined */
*pi_channels = 0; *pi_channels = 0;
*pi_channels_conf = 0; *pi_channels_conf = 0;
} }
else else
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* libmpeg2.c: mpeg2 video decoder module making use of libmpeg2. * libmpeg2.c: mpeg2 video decoder module making use of libmpeg2.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: libmpeg2.c,v 1.38 2003/12/10 23:27:34 gbazin Exp $ * $Id: libmpeg2.c,v 1.39 2003/12/22 14:32:55 sam Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -220,7 +220,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -220,7 +220,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
mpeg2_buffer( p_sys->p_mpeg2dec, p_block->p_buffer, mpeg2_buffer( p_sys->p_mpeg2dec, p_block->p_buffer,
p_block->p_buffer + p_block->i_buffer ); p_block->p_buffer + p_block->i_buffer );
p_block->i_buffer = 0; p_block->i_buffer = 0;
break; break;
case STATE_SEQUENCE: case STATE_SEQUENCE:
...@@ -256,7 +256,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -256,7 +256,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
{ {
/* Use the value provided in the MPEG sequence header */ /* Use the value provided in the MPEG sequence header */
p_sys->i_aspect = p_sys->i_aspect =
((uint64_t)p_sys->p_info->sequence->display_width) * ((uint64_t)p_sys->p_info->sequence->display_width) *
p_sys->p_info->sequence->pixel_width * VOUT_ASPECT_FACTOR / p_sys->p_info->sequence->pixel_width * VOUT_ASPECT_FACTOR /
p_sys->p_info->sequence->display_height / p_sys->p_info->sequence->display_height /
p_sys->p_info->sequence->pixel_height; p_sys->p_info->sequence->pixel_height;
...@@ -276,10 +276,10 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -276,10 +276,10 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
mpeg2_set_buf( p_sys->p_mpeg2dec, buf, NULL ); mpeg2_set_buf( p_sys->p_mpeg2dec, buf, NULL );
if( (p_pic = GetNewPicture( p_dec, buf )) == NULL ) if( (p_pic = GetNewPicture( p_dec, buf )) == NULL )
{ {
block_Release( p_block ); block_Release( p_block );
return NULL; return NULL;
} }
mpeg2_set_buf( p_sys->p_mpeg2dec, buf, p_pic ); mpeg2_set_buf( p_sys->p_mpeg2dec, buf, p_pic );
...@@ -357,7 +357,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -357,7 +357,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
vout_SynchroNewPicture( p_sys->p_synchro, vout_SynchroNewPicture( p_sys->p_synchro,
p_sys->p_info->current_picture->flags & PIC_MASK_CODING_TYPE, p_sys->p_info->current_picture->flags & PIC_MASK_CODING_TYPE,
p_sys->p_info->current_picture->nb_fields, i_pts, p_sys->p_info->current_picture->nb_fields, i_pts,
0, p_sys->i_current_rate ); 0, p_sys->i_current_rate );
if ( !(p_sys->b_slice_i if ( !(p_sys->b_slice_i
...@@ -366,7 +366,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -366,7 +366,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
&& !vout_SynchroChoose( p_sys->p_synchro, && !vout_SynchroChoose( p_sys->p_synchro,
p_sys->p_info->current_picture->flags p_sys->p_info->current_picture->flags
& PIC_MASK_CODING_TYPE, & PIC_MASK_CODING_TYPE,
/*p_sys->p_vout->render_time*/ 0 /*FIXME*/ ) ) /*p_sys->p_vout->render_time*/ 0 /*FIXME*/ ) )
{ {
mpeg2_skip( p_sys->p_mpeg2dec, 1 ); mpeg2_skip( p_sys->p_mpeg2dec, 1 );
p_sys->b_skip = 1; p_sys->b_skip = 1;
...@@ -380,10 +380,10 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -380,10 +380,10 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
vout_SynchroDecode( p_sys->p_synchro ); vout_SynchroDecode( p_sys->p_synchro );
if( (p_pic = GetNewPicture( p_dec, buf )) == NULL ) if( (p_pic = GetNewPicture( p_dec, buf )) == NULL )
{ {
block_Release( p_block ); block_Release( p_block );
return NULL; return NULL;
} }
mpeg2_set_buf( p_sys->p_mpeg2dec, buf, p_pic ); mpeg2_set_buf( p_sys->p_mpeg2dec, buf, p_pic );
} }
...@@ -422,7 +422,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -422,7 +422,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_sys->p_info->discard_fbuf->id ); p_sys->p_info->discard_fbuf->id );
} }
if( p_pic ) return p_pic; if( p_pic ) return p_pic;
break; break;
...@@ -434,7 +434,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -434,7 +434,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
msg_Warn( p_dec, "invalid picture encountered" ); msg_Warn( p_dec, "invalid picture encountered" );
if ( ( p_sys->p_info->current_picture == NULL ) || if ( ( p_sys->p_info->current_picture == NULL ) ||
( ( p_sys->p_info->current_picture->flags & ( ( p_sys->p_info->current_picture->flags &
PIC_MASK_CODING_TYPE) != B_CODING_TYPE ) ) PIC_MASK_CODING_TYPE) != B_CODING_TYPE ) )
{ {
if( p_sys->p_synchro ) vout_SynchroReset( p_sys->p_synchro ); if( p_sys->p_synchro ) vout_SynchroReset( p_sys->p_synchro );
} }
......
...@@ -2,18 +2,18 @@ ...@@ -2,18 +2,18 @@
* ogt.h : Overlay Graphics Text (SVCD subtitles) decoder thread interface * ogt.h : Overlay Graphics Text (SVCD subtitles) decoder thread interface
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: ogt.h,v 1.2 2003/12/08 06:01:11 rocky Exp $ * $Id: ogt.h,v 1.3 2003/12/22 14:32:55 sam Exp $
* *
* Authors: Rocky Bernstein * Author: Rocky Bernstein
* based on code from: * based on code from:
* Julio Sanchez Fernandez (http://subhandler.sourceforge.net) * Julio Sanchez Fernandez (http://subhandler.sourceforge.net)
* Samuel Hocevar <sam@zoy.org> * Sam Hocevar <sam@zoy.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#define DECODE_DBG_EXT 1 /* Calls from external routines */ #define DECODE_DBG_EXT 1 /* Calls from external routines */
#define DECODE_DBG_CALL 2 /* all calls */ #define DECODE_DBG_CALL 2 /* all calls */
#define DECODE_DBG_PACKET 4 /* packet assembly info */ #define DECODE_DBG_PACKET 4 /* packet assembly info */
#define DECODE_DBG_INFO 8 #define DECODE_DBG_INFO 8
#define DECODE_DEBUG 1 #define DECODE_DEBUG 1
#if DECODE_DEBUG #if DECODE_DEBUG
...@@ -35,16 +35,16 @@ ...@@ -35,16 +35,16 @@
if (p_sys && p_sys->i_debug & mask) \ if (p_sys && p_sys->i_debug & mask) \
msg_Dbg(p_dec, "%s: "s, __func__ , ##args) msg_Dbg(p_dec, "%s: "s, __func__ , ##args)
#else #else
#define dbg_print(mask, s, args...) #define dbg_print(mask, s, args...)
#endif #endif
#define LOG_ERR(args...) msg_Err( p_input, args ) #define LOG_ERR(args...) msg_Err( p_input, args )
#define LOG_WARN(args...) msg_Warn( p_input, args ) #define LOG_WARN(args...) msg_Warn( p_input, args )
#define GETINT16(p) ( (p[0] << 8) + p[1] ); p +=2; #define GETINT16(p) ( (p[0] << 8) + p[1] ); p +=2;
#define GETINT32(p) ( (p[0] << 24) + (p[1] << 16) + \ #define GETINT32(p) ( (p[0] << 24) + (p[1] << 16) + \
(p[2] << 8) + (p[3]) ) ; p += 4; (p[2] << 8) + (p[3]) ) ; p += 4;
typedef enum { typedef enum {
SUBTITLE_BLOCK_EMPTY, SUBTITLE_BLOCK_EMPTY,
...@@ -54,10 +54,10 @@ typedef enum { ...@@ -54,10 +54,10 @@ typedef enum {
/* Color and transparency of a pixel or a palette (CLUT) entry */ /* Color and transparency of a pixel or a palette (CLUT) entry */
typedef struct ogt_yuvt_val_s { typedef struct ogt_yuvt_val_s {
u_int8_t y; uint8_t y;
u_int8_t u; uint8_t u;
u_int8_t v; uint8_t v;
u_int8_t t; uint8_t t;
} ogt_yuvt_val_t; } ogt_yuvt_val_t;
struct decoder_sys_t struct decoder_sys_t
...@@ -65,49 +65,49 @@ struct decoder_sys_t ...@@ -65,49 +65,49 @@ struct decoder_sys_t
int i_debug; /* debugging mask */ int i_debug; /* debugging mask */
int b_packetizer; int b_packetizer;
mtime_t i_pts; /* Start PTS of subtitle block */ mtime_t i_pts; /* Start PTS of subtitle block */
int i_spu_size; /* size of the allocated subtitle_data */ int i_spu_size; /* size of the allocated subtitle_data */
int i_spu; int i_spu;
packet_state_t state; /* data-gathering state for this subtitle */ packet_state_t state; /* data-gathering state for this subtitle */
u_int16_t i_image; /* image number in the subtitle stream; 0 is the uint16_t i_image; /* image number in the subtitle stream; 0 is the
first one. */ first one. */
u_int8_t i_packet; /* packet number for above image number; 0 is the uint8_t i_packet; /* packet number for above image number; 0 is the
first one. */ first one. */
block_t *p_block; /* Bytes of the packet. */ block_t *p_block; /* Bytes of the packet. */
uint8_t buffer[65536 + 20 ]; /* we will never overflow more than 11 bytes if I'm right */ uint8_t buffer[65536 + 20 ]; /* we will never overflow more than 11 bytes if I'm right */
vout_thread_t *p_vout; vout_thread_t *p_vout;
/* Move into subpicture_sys_t? */ /* Move into subpicture_sys_t? */
u_int16_t comp_image_offset; /* offset from subtitle_data to compressed uint16_t comp_image_offset; /* offset from subtitle_data to compressed
image data */ image data */
int comp_image_length; /* size of the compressed image data */ int comp_image_length; /* size of the compressed image data */
int first_field_offset; int first_field_offset;
int second_field_offset; int second_field_offset;
int metadata_offset; /* offset to data describing the image */ int metadata_offset; /* offset to data describing the image */
int metadata_length; /* length of metadata */ int metadata_length; /* length of metadata */
int subtitle_data_pos; /* where to write next chunk */ int subtitle_data_pos; /* where to write next chunk */
int subtitle_data_length; /* goal for subtitle_data_pos while gathering, int subtitle_data_length; /* goal for subtitle_data_pos while gathering,
length of used subtitle_data later */ length of used subtitle_data later */
u_int32_t i_duration; /* how long to display the image, 0 stands uint32_t i_duration; /* how long to display the image, 0 stands
for "until next subtitle" */ for "until next subtitle" */
u_int16_t i_x_start, i_y_start; /* position of top leftmost pixel of uint16_t i_x_start, i_y_start; /* position of top leftmost pixel of
image when displayed */ image when displayed */
u_int16_t i_width, i_height; /* dimensions in pixels of image */ uint16_t i_width, i_height; /* dimensions in pixels of image */
ogt_yuvt_val_t pi_palette[4]; ogt_yuvt_val_t pi_palette[4];
u_int8_t i_options; uint8_t i_options;
u_int8_t i_options2; uint8_t i_options2;
u_int8_t i_cmd; uint8_t i_cmd;
u_int32_t i_cmd_arg; uint32_t i_cmd_arg;
}; };
struct subpicture_sys_t struct subpicture_sys_t
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
* lirc.c : lirc plugin for vlc * lirc.c : lirc plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: lirc.c,v 1.8 2003/08/14 18:12:39 sigmunau Exp $ * $Id: lirc.c,v 1.9 2003/12/22 14:32:55 sam Exp $
* *
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> * Author: Sigmund Augdal <sigmunau@idi.ntnu.no>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -138,7 +138,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -138,7 +138,7 @@ static void Run( intf_thread_t *p_intf )
playlist_t *p_playlist; playlist_t *p_playlist;
input_thread_t *p_input; input_thread_t *p_input;
vout_thread_t *p_vout = NULL; vout_thread_t *p_vout = NULL;
while( !p_intf->b_die ) while( !p_intf->b_die )
{ {
/* Sleep a bit */ /* Sleep a bit */
...@@ -182,11 +182,11 @@ static void Run( intf_thread_t *p_intf ) ...@@ -182,11 +182,11 @@ static void Run( intf_thread_t *p_intf )
continue; continue;
} }
while( !p_intf->b_die while( !p_intf->b_die
&& lirc_code2char( p_intf->p_sys->config, code, &c ) == 0 && lirc_code2char( p_intf->p_sys->config, code, &c ) == 0
&& c != NULL ) && c != NULL )
{ {
if( !strcmp( c, "QUIT" ) ) if( !strcmp( c, "QUIT" ) )
{ {
p_intf->p_vlc->b_die = VLC_TRUE; p_intf->p_vlc->b_die = VLC_TRUE;
...@@ -271,7 +271,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -271,7 +271,7 @@ static void Run( intf_thread_t *p_intf )
continue; continue;
} }
} }
if( !strcmp( c, "PLAY" ) ) if( !strcmp( c, "PLAY" ) )
{ {
p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
...@@ -288,7 +288,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -288,7 +288,7 @@ static void Run( intf_thread_t *p_intf )
} }
continue; continue;
} }
if( !strcmp( c, "PLAYPAUSE" ) ) if( !strcmp( c, "PLAYPAUSE" ) )
{ {
if( p_input && if( p_input &&
...@@ -312,10 +312,10 @@ static void Run( intf_thread_t *p_intf ) ...@@ -312,10 +312,10 @@ static void Run( intf_thread_t *p_intf )
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
} }
} }
continue; continue;
} }
else if( p_input ) else if( p_input )
{ {
if( !strcmp( c, "PAUSE" ) ) if( !strcmp( c, "PAUSE" ) )
...@@ -362,11 +362,11 @@ static void Run( intf_thread_t *p_intf ) ...@@ -362,11 +362,11 @@ static void Run( intf_thread_t *p_intf )
input_SetStatus( p_input, INPUT_STATUS_SLOWER ); input_SetStatus( p_input, INPUT_STATUS_SLOWER );
} }
/* beginning of modifications by stephane Thu Jun 19 15:29:49 CEST 2003 */ /* beginning of modifications by stephane Thu Jun 19 15:29:49 CEST 2003 */
else if ( !strcmp(c, "CHAPTER_N" ) || else if ( !strcmp(c, "CHAPTER_N" ) ||
!strcmp( c, "CHAPTER_P" ) ) !strcmp( c, "CHAPTER_P" ) )
{ {
unsigned int i_chapter = 0; unsigned int i_chapter = 0;
if( !strcmp( c, "CHAPTER_N" ) ) if( !strcmp( c, "CHAPTER_N" ) )
{ {
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
...@@ -379,7 +379,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -379,7 +379,7 @@ static void Run( intf_thread_t *p_intf )
i_chapter = p_input->stream.p_selected_area->i_part - 1; i_chapter = p_input->stream.p_selected_area->i_part - 1;
vlc_mutex_unlock( &p_input->stream.stream_lock ); vlc_mutex_unlock( &p_input->stream.stream_lock );
} }
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
if( ( i_chapter > 0 ) && ( i_chapter < if( ( i_chapter > 0 ) && ( i_chapter <
p_input->stream.p_selected_area->i_part_nb ) ) p_input->stream.p_selected_area->i_part_nb ) )
...@@ -392,7 +392,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -392,7 +392,7 @@ static void Run( intf_thread_t *p_intf )
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
} }
vlc_mutex_unlock( &p_input->stream.stream_lock ); vlc_mutex_unlock( &p_input->stream.stream_lock );
} }
/* end of modification by stephane Thu Jun 19 15:29:49 CEST 2003 */ /* end of modification by stephane Thu Jun 19 15:29:49 CEST 2003 */
} }
} }
...@@ -405,7 +405,7 @@ static void Feedback( intf_thread_t *p_intf, char *psz_string ) ...@@ -405,7 +405,7 @@ static void Feedback( intf_thread_t *p_intf, char *psz_string )
{ {
if ( p_intf->p_sys->p_vout ) if ( p_intf->p_sys->p_vout )
{ {
vout_ShowTextRelative( p_intf->p_sys->p_vout, psz_string, NULL, vout_ShowTextRelative( p_intf->p_sys->p_vout, psz_string, NULL,
OSD_ALIGN_TOP|OSD_ALIGN_RIGHT, 30,20,400000 ); OSD_ALIGN_TOP|OSD_ALIGN_RIGHT, 30,20,400000 );
} }
} }
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
* rc.c : remote control stdin/stdout plugin for vlc * rc.c : remote control stdin/stdout plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: rc.c,v 1.39 2003/12/02 13:31:23 gbazin Exp $ * $Id: rc.c,v 1.40 2003/12/22 14:32:55 sam Exp $
* *
* Authors: Peter Surda <shurdeek@panorama.sth.ac.at> * Author: Peter Surda <shurdeek@panorama.sth.ac.at>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -201,7 +201,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -201,7 +201,7 @@ static void Run( intf_thread_t *p_intf )
hConsoleIn = GetStdHandle(STD_INPUT_HANDLE); hConsoleIn = GetStdHandle(STD_INPUT_HANDLE);
if( hConsoleIn == INVALID_HANDLE_VALUE ) if( hConsoleIn == INVALID_HANDLE_VALUE )
{ {
msg_Err( p_intf, "Couldn't open STD_INPUT_HANDLE" ); msg_Err( p_intf, "Couldn't open STD_INPUT_HANDLE" );
p_intf->b_die = VLC_TRUE; p_intf->b_die = VLC_TRUE;
} }
#endif #endif
...@@ -823,10 +823,10 @@ static int AudioConfig( vlc_object_t *p_this, char const *psz_cmd, ...@@ -823,10 +823,10 @@ static int AudioConfig( vlc_object_t *p_this, char const *psz_cmd,
{ {
if ( i_value == val.p_list->p_values[i].i_int ) if ( i_value == val.p_list->p_values[i].i_int )
printf( "| %i - %s *\n", val.p_list->p_values[i].i_int, printf( "| %i - %s *\n", val.p_list->p_values[i].i_int,
text.p_list->p_values[i].psz_string ); text.p_list->p_values[i].psz_string );
else else
printf( "| %i - %s\n", val.p_list->p_values[i].i_int, printf( "| %i - %s\n", val.p_list->p_values[i].i_int,
text.p_list->p_values[i].psz_string ); text.p_list->p_values[i].psz_string );
} }
var_Change( (vlc_object_t *)p_aout, psz_variable, VLC_VAR_FREELIST, var_Change( (vlc_object_t *)p_aout, psz_variable, VLC_VAR_FREELIST,
&val, &text ); &val, &text );
......
...@@ -2,8 +2,9 @@ ...@@ -2,8 +2,9 @@
* libmp4.c : LibMP4 library for mp4 module for vlc * libmp4.c : LibMP4 library for mp4 module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: libmp4.c,v 1.38 2003/12/15 22:55:01 gbazin Exp $ * $Id: libmp4.c,v 1.39 2003/12/22 14:32:55 sam Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr> *
* Author: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -985,7 +986,7 @@ static int MP4_ReadBox_esds( MP4_Stream_t *p_stream, MP4_Box_t *p_box ) ...@@ -985,7 +986,7 @@ static int MP4_ReadBox_esds( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
#ifdef MP4_VERBOSE #ifdef MP4_VERBOSE
msg_Dbg( p_stream->p_input, "Found esds MPEG4ESDescr (%dBytes)", msg_Dbg( p_stream->p_input, "Found esds MPEG4ESDescr (%dBytes)",
i_len ); i_len );
#endif #endif
MP4_GET2BYTES( es_descriptor.i_ES_ID ); MP4_GET2BYTES( es_descriptor.i_ES_ID );
...@@ -1031,7 +1032,7 @@ static int MP4_ReadBox_esds( MP4_Stream_t *p_stream, MP4_Box_t *p_box ) ...@@ -1031,7 +1032,7 @@ static int MP4_ReadBox_esds( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
#ifdef MP4_VERBOSE #ifdef MP4_VERBOSE
msg_Dbg( p_stream->p_input, "Found esds MP4DecConfigDescr (%dBytes)", msg_Dbg( p_stream->p_input, "Found esds MP4DecConfigDescr (%dBytes)",
i_len ); i_len );
#endif #endif
es_descriptor.p_decConfigDescr = es_descriptor.p_decConfigDescr =
...@@ -1056,7 +1057,7 @@ static int MP4_ReadBox_esds( MP4_Stream_t *p_stream, MP4_Box_t *p_box ) ...@@ -1056,7 +1057,7 @@ static int MP4_ReadBox_esds( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
#ifdef MP4_VERBOSE #ifdef MP4_VERBOSE
msg_Dbg( p_stream->p_input, "Found esds MP4DecSpecificDescr (%dBytes)", msg_Dbg( p_stream->p_input, "Found esds MP4DecSpecificDescr (%dBytes)",
i_len ); i_len );
#endif #endif
es_descriptor.p_decConfigDescr->i_decoder_specific_info_len = i_len; es_descriptor.p_decConfigDescr->i_decoder_specific_info_len = i_len;
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
* ps.c : Program Stream input module for vlc * ps.c : Program Stream input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: ps.c,v 1.12 2003/10/27 18:57:12 rocky Exp $ * $Id: ps.c,v 1.13 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Author: Christophe Massiot <massiot@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -137,16 +137,16 @@ static int Activate( vlc_object_t * p_this ) ...@@ -137,16 +137,16 @@ static int Activate( vlc_object_t * p_this )
return -1; return -1;
} }
input_AddProgram( p_input, 0, sizeof( stream_ps_data_t ) ); input_AddProgram( p_input, 0, sizeof( stream_ps_data_t ) );
p_input->stream.p_selected_program = p_input->stream.p_selected_program =
p_input->stream.pp_programs[0] ; p_input->stream.pp_programs[0] ;
if( p_input->stream.b_seekable ) if( p_input->stream.b_seekable )
{ {
stream_ps_data_t * p_demux_data = stream_ps_data_t * p_demux_data =
(stream_ps_data_t *)p_input->stream.pp_programs[0]->p_demux_data; (stream_ps_data_t *)p_input->stream.pp_programs[0]->p_demux_data;
off_t i_tell = p_input->stream.p_selected_area->i_tell; off_t i_tell = p_input->stream.p_selected_area->i_tell;
/* Pre-parse the stream to gather stream_descriptor_t. */ /* Pre-parse the stream to gather stream_descriptor_t. */
p_input->pf_seek( p_input, (off_t) 0 ); p_input->pf_seek( p_input, (off_t) 0 );
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
* system.c: helper module for TS, PS and PES management * system.c: helper module for TS, PS and PES management
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2002 VideoLAN * Copyright (C) 1998-2002 VideoLAN
* $Id: system.c,v 1.25 2003/12/07 01:02:08 rocky Exp $ * $Id: system.c,v 1.26 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr> * Michel Lespinasse <walken@via.ecp.fr>
* Benot Steiner <benny@via.ecp.fr> * Benot Steiner <benny@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Sam Hocevar <sam@zoy.org>
* Henri Fallon <henri@via.ecp.fr> * Henri Fallon <henri@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -968,7 +968,7 @@ static es_descriptor_t * ParsePS( input_thread_t * p_input, ...@@ -968,7 +968,7 @@ static es_descriptor_t * ParsePS( input_thread_t * p_input,
else if( (i_id & 0xFFFF) == 0x70BD ) else if( (i_id & 0xFFFF) == 0x70BD )
{ {
/* SVCD OGT subtitles in stream 0x070 */ /* SVCD OGT subtitles in stream 0x070 */
i_fourcc = VLC_FOURCC('o','g','t', ' '); i_fourcc = VLC_FOURCC('o','g','t', ' ');
i_cat = SPU_ES; i_cat = SPU_ES;
#ifdef FINISHED_DEBUGGING #ifdef FINISHED_DEBUGGING
if( !p_input->stream.b_seekable ) if( !p_input->stream.b_seekable )
...@@ -979,14 +979,14 @@ static es_descriptor_t * ParsePS( input_thread_t * p_input, ...@@ -979,14 +979,14 @@ static es_descriptor_t * ParsePS( input_thread_t * p_input,
b_auto_spawn = VLC_TRUE; b_auto_spawn = VLC_TRUE;
} }
} }
else if( ((i_id >> 8) & 0xFF) <= 0x03 && else if( ((i_id >> 8) & 0xFF) <= 0x03 &&
(i_id & 0x00FF) == 0x00BD ) (i_id & 0x00FF) == 0x00BD )
{ {
/* CVD subtitles (0x00->0x03) */ /* CVD subtitles (0x00->0x03) */
i_fourcc = VLC_FOURCC('c','v','d', ' '); i_fourcc = VLC_FOURCC('c','v','d', ' ');
i_cat = SPU_ES; i_cat = SPU_ES;
msg_Warn( p_input, msg_Warn( p_input,
"CVD subtitles not implemented yet" ); "CVD subtitles not implemented yet" );
} }
else else
{ {
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* ogg.c : ogg stream input module for vlc * ogg.c : ogg stream input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001-2003 VideoLAN * Copyright (C) 2001-2003 VideoLAN
* $Id: ogg.c,v 1.51 2003/12/16 12:38:18 gbazin Exp $ * $Id: ogg.c,v 1.52 2003/12/22 14:32:55 sam Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Author: Gildas Bazin <gbazin@netcourrier.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -1235,8 +1235,8 @@ static int Demux( input_thread_t * p_input ) ...@@ -1235,8 +1235,8 @@ static int Demux( input_thread_t * p_input )
else else
{ {
input_ClockManageRef( p_input, input_ClockManageRef( p_input,
p_input->stream.p_selected_program, p_input->stream.p_selected_program,
p_stream->i_pcr ); p_stream->i_pcr );
} }
continue; continue;
} }
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* gtk_callbacks.c : Callbacks for the Gtk+ plugin. * gtk_callbacks.c : Callbacks for the Gtk+ plugin.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001, 2003 VideoLAN * Copyright (C) 2000, 2001, 2003 VideoLAN
* $Id: gtk_callbacks.c,v 1.15 2003/12/12 03:01:12 rocky Exp $ * $Id: gtk_callbacks.c,v 1.16 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Sam Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
* Julien BLACHE <jb@technologeek.org> * Julien BLACHE <jb@technologeek.org>
* *
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
#ifdef HAVE_CDDAX #ifdef HAVE_CDDAX
#define CDDA_MRL "cddax://" #define CDDA_MRL "cddax://"
#else #else
#define CDDA_MRL "cdda://" #define CDDA_MRL "cdda://"
#endif #endif
...@@ -461,7 +461,7 @@ gboolean GtkDiscEject ( GtkWidget *widget, gpointer user_data ) ...@@ -461,7 +461,7 @@ gboolean GtkDiscEject ( GtkWidget *widget, gpointer user_data )
{ {
if( !strncmp(psz_current, "dvd://", 4) ) if( !strncmp(psz_current, "dvd://", 4) )
{ {
switch( psz_current[strlen("dvd://")] ) switch( psz_current[strlen("dvd://")] )
{ {
case '\0': case '\0':
case '@': case '@':
...@@ -469,13 +469,13 @@ gboolean GtkDiscEject ( GtkWidget *widget, gpointer user_data ) ...@@ -469,13 +469,13 @@ gboolean GtkDiscEject ( GtkWidget *widget, gpointer user_data )
break; break;
default: default:
/* Omit the first MRL-selector characters */ /* Omit the first MRL-selector characters */
psz_device = strdup( psz_current + strlen("dvd://" ) ); psz_device = strdup( psz_current + strlen("dvd://" ) );
break; break;
} }
} }
else if( !strncmp(psz_current, "vcd:", strlen("vcd:")) ) else if( !strncmp(psz_current, "vcd:", strlen("vcd:")) )
{ {
switch( psz_current[strlen("vcd:")] ) switch( psz_current[strlen("vcd:")] )
{ {
case '\0': case '\0':
case '@': case '@':
...@@ -483,13 +483,13 @@ gboolean GtkDiscEject ( GtkWidget *widget, gpointer user_data ) ...@@ -483,13 +483,13 @@ gboolean GtkDiscEject ( GtkWidget *widget, gpointer user_data )
break; break;
default: default:
/* Omit the beginning MRL-selector characters */ /* Omit the beginning MRL-selector characters */
psz_device = strdup( psz_current + strlen(VCD_MRL) ); psz_device = strdup( psz_current + strlen(VCD_MRL) );
break; break;
} }
} }
else if( !strncmp(psz_current, CDDA_MRL, strlen(CDDA_MRL) ) ) else if( !strncmp(psz_current, CDDA_MRL, strlen(CDDA_MRL) ) )
{ {
switch( psz_current[strlen(CDDA_MRL)] ) switch( psz_current[strlen(CDDA_MRL)] )
{ {
case '\0': case '\0':
case '@': case '@':
...@@ -497,7 +497,7 @@ gboolean GtkDiscEject ( GtkWidget *widget, gpointer user_data ) ...@@ -497,7 +497,7 @@ gboolean GtkDiscEject ( GtkWidget *widget, gpointer user_data )
break; break;
default: default:
/* Omit the beginning MRL-selector characters */ /* Omit the beginning MRL-selector characters */
psz_device = strdup( psz_current + strlen(CDDA_MRL) ); psz_device = strdup( psz_current + strlen(CDDA_MRL) );
break; break;
} }
} }
...@@ -636,8 +636,6 @@ GtkMenubarDeinterlace ( GtkMenuItem *menuitem, ...@@ -636,8 +636,6 @@ GtkMenubarDeinterlace ( GtkMenuItem *menuitem,
if( p_intf ) if( p_intf )
msg_Dbg( p_intf, "GtkMenubarDeinterlace" ); msg_Dbg( p_intf, "GtkMenubarDeinterlace" );
} }
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* menu.c : functions to handle menu items. * menu.c : functions to handle menu items.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: menu.c,v 1.12 2003/11/24 00:39:01 fenrir Exp $ * $Id: menu.c,v 1.13 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Sam Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
* Johan Bilien <jobi@via.ecp.fr> * Johan Bilien <jobi@via.ecp.fr>
* Laurent Aimar <fenrir@via.ecp.fr> * Laurent Aimar <fenrir@via.ecp.fr>
...@@ -411,19 +411,19 @@ static void GtkDeinterlaceUpdate( intf_thread_t *p_intf, char *psz_mode ) ...@@ -411,19 +411,19 @@ static void GtkDeinterlaceUpdate( intf_thread_t *p_intf, char *psz_mode )
if( strcmp( psz_mode, "None" ) ) if( strcmp( psz_mode, "None" ) )
{ {
vout_thread_t *p_vout; vout_thread_t *p_vout;
p_vout = vlc_object_find( p_intf, VLC_OBJECT_VOUT, p_vout = vlc_object_find( p_intf, VLC_OBJECT_VOUT,
FIND_ANYWHERE ); FIND_ANYWHERE );
if( p_vout ) if( p_vout )
{ {
vlc_value_t val; vlc_value_t val;
val.psz_string = psz_mode; val.psz_string = psz_mode;
if( var_Set( p_vout, "deinterlace-mode", val ) != VLC_SUCCESS ) if( var_Set( p_vout, "deinterlace-mode", val ) != VLC_SUCCESS )
config_PutPsz( p_intf, "deinterlace-mode", psz_mode ); config_PutPsz( p_intf, "deinterlace-mode", psz_mode );
vlc_object_release( p_vout ); vlc_object_release( p_vout );
} }
else else
config_PutPsz( p_intf, "deinterlace-mode", psz_mode ); config_PutPsz( p_intf, "deinterlace-mode", psz_mode );
} }
...@@ -1167,7 +1167,7 @@ static gint GtkSetupVarMenu( intf_thread_t * p_intf, ...@@ -1167,7 +1167,7 @@ static gint GtkSetupVarMenu( intf_thread_t * p_intf,
break; break;
default: default:
/* FIXME */ /* FIXME */
return FALSE; return FALSE;
} }
p_group = gtk_radio_menu_item_group( GTK_RADIO_MENU_ITEM( p_item ) ); p_group = gtk_radio_menu_item_group( GTK_RADIO_MENU_ITEM( p_item ) );
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* gtk_open.c : functions to handle file/disc/network open widgets. * gtk_open.c : functions to handle file/disc/network open widgets.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001, 2003 VideoLAN * Copyright (C) 2000, 2001, 2003 VideoLAN
* $Id: open.c,v 1.21 2003/12/13 00:53:50 rocky Exp $ * $Id: open.c,v 1.22 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Sam Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
#ifdef HAVE_CDDAX #ifdef HAVE_CDDAX
#define CDDA_MRL "cddax://" #define CDDA_MRL "cddax://"
#else #else
#define CDDA_MRL "cdda://" #define CDDA_MRL "cdda://"
#endif #endif
...@@ -153,26 +153,26 @@ void GtkDiscOpenDvd( GtkToggleButton * togglebutton, gpointer user_data ) ...@@ -153,26 +153,26 @@ void GtkDiscOpenDvd( GtkToggleButton * togglebutton, gpointer user_data )
intf_thread_t * p_intf = GtkGetIntf( togglebutton ); intf_thread_t * p_intf = GtkGetIntf( togglebutton );
char *psz_device; char *psz_device;
if( togglebutton->active ) if( togglebutton->active )
{ {
if ( (psz_device = config_GetPsz( p_intf, "dvd" )) ) if ( (psz_device = config_GetPsz( p_intf, "dvd" )) )
{ {
gtk_widget_set_sensitive( GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_open ), "disc_dvd_use_menu" ) ) , TRUE); gtk_widget_set_sensitive( GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_open ), "disc_dvd_use_menu" ) ) , TRUE);
gtk_entry_set_text( gtk_entry_set_text(
GTK_ENTRY( lookup_widget( GTK_WIDGET(togglebutton), GTK_ENTRY( lookup_widget( GTK_WIDGET(togglebutton),
"disc_name" ) ), psz_device ); "disc_name" ) ), psz_device );
free( psz_device ); free( psz_device );
} }
else else
{ {
gtk_widget_set_sensitive( GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_open ), "disc_dvd_use_menu" ) ), FALSE ); gtk_widget_set_sensitive( GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_open ), "disc_dvd_use_menu" ) ), FALSE );
} }
GtkDiscOpenChanged( (GtkWidget *) togglebutton, user_data ); GtkDiscOpenChanged( (GtkWidget *) togglebutton, user_data );
} }
else else
{ {
gtk_widget_set_sensitive( GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_open ), "disc_dvd_use_menu" ) ), FALSE ); gtk_widget_set_sensitive( GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_open ), "disc_dvd_use_menu" ) ), FALSE );
} }
} }
...@@ -181,20 +181,20 @@ void GtkDiscOpenVcd( GtkToggleButton * togglebutton, gpointer user_data ) ...@@ -181,20 +181,20 @@ void GtkDiscOpenVcd( GtkToggleButton * togglebutton, gpointer user_data )
intf_thread_t * p_intf = GtkGetIntf( togglebutton ); intf_thread_t * p_intf = GtkGetIntf( togglebutton );
char *psz_device; char *psz_device;
if( togglebutton->active ) if( togglebutton->active )
{ {
if ( (psz_device = config_GetPsz( p_intf, "vcd" )) ) if ( (psz_device = config_GetPsz( p_intf, "vcd" )) )
{ {
gtk_entry_set_text( gtk_entry_set_text(
GTK_ENTRY( lookup_widget( GTK_WIDGET(togglebutton), GTK_ENTRY( lookup_widget( GTK_WIDGET(togglebutton),
"disc_name" ) ), psz_device ); "disc_name" ) ), psz_device );
free( psz_device ); free( psz_device );
} else { } else {
gtk_entry_set_text( gtk_entry_set_text(
GTK_ENTRY( lookup_widget( GTK_WIDGET(togglebutton), GTK_ENTRY( lookup_widget( GTK_WIDGET(togglebutton),
"disc_name" ) ), "" ); "disc_name" ) ), "" );
} }
GtkDiscOpenChanged( (GtkWidget *) togglebutton, user_data ); GtkDiscOpenChanged( (GtkWidget *) togglebutton, user_data );
} }
} }
...@@ -203,20 +203,20 @@ void GtkDiscOpenCDDA( GtkToggleButton * togglebutton, gpointer user_data ) ...@@ -203,20 +203,20 @@ void GtkDiscOpenCDDA( GtkToggleButton * togglebutton, gpointer user_data )
intf_thread_t * p_intf = GtkGetIntf( togglebutton ); intf_thread_t * p_intf = GtkGetIntf( togglebutton );
char *psz_device; char *psz_device;
if( togglebutton->active ) if( togglebutton->active )
{ {
if ( (psz_device = config_GetPsz( p_intf, "cd-audio" )) ) if ( (psz_device = config_GetPsz( p_intf, "cd-audio" )) )
{ {
gtk_entry_set_text( gtk_entry_set_text(
GTK_ENTRY( lookup_widget( GTK_WIDGET(togglebutton), GTK_ENTRY( lookup_widget( GTK_WIDGET(togglebutton),
"disc_name" ) ), psz_device ); "disc_name" ) ), psz_device );
free( psz_device ); free( psz_device );
} else { } else {
gtk_entry_set_text( gtk_entry_set_text(
GTK_ENTRY( lookup_widget( GTK_WIDGET(togglebutton), GTK_ENTRY( lookup_widget( GTK_WIDGET(togglebutton),
"disc_name" ) ), "" ); "disc_name" ) ), "" );
} }
GtkDiscOpenChanged( (GtkWidget *) togglebutton, user_data ); GtkDiscOpenChanged( (GtkWidget *) togglebutton, user_data );
} }
} }
...@@ -228,12 +228,12 @@ static void GtkDiscOpenChanged( GtkWidget * button, gpointer user_data ) ...@@ -228,12 +228,12 @@ static void GtkDiscOpenChanged( GtkWidget * button, gpointer user_data )
vlc_bool_t b_menus = VLC_FALSE; vlc_bool_t b_menus = VLC_FALSE;
vlc_bool_t b_chapter_menu = VLC_TRUE; vlc_bool_t b_chapter_menu = VLC_TRUE;
GtkWidget *p_label = gtk_object_get_data( GTK_OBJECT( p_open ), GtkWidget *p_label = gtk_object_get_data( GTK_OBJECT( p_open ),
"disc_title_label" ); "disc_title_label" );
if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button), if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button),
"disc_dvd" ) )->active ) "disc_dvd" ) )->active )
{ {
gtk_label_set_text( GTK_LABEL( p_label ), _("Title") ); gtk_label_set_text( GTK_LABEL( p_label ), _("Title") );
b_menus = GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button), b_menus = GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button),
"disc_dvd_use_menu" ) )->active; "disc_dvd_use_menu" ) )->active;
...@@ -246,45 +246,45 @@ static void GtkDiscOpenChanged( GtkWidget * button, gpointer user_data ) ...@@ -246,45 +246,45 @@ static void GtkDiscOpenChanged( GtkWidget * button, gpointer user_data )
{ {
g_string_append( p_target, "dvdsimple://" ); g_string_append( p_target, "dvdsimple://" );
} }
g_string_append( p_target, g_string_append( p_target,
gtk_entry_get_text( GTK_ENTRY( lookup_widget( gtk_entry_get_text( GTK_ENTRY( lookup_widget(
GTK_WIDGET(button), "disc_name" ) ) ) ); GTK_WIDGET(button), "disc_name" ) ) ) );
if( !b_menus ) if( !b_menus )
{ {
g_string_sprintfa( p_target, "@%i:%i", g_string_sprintfa( p_target, "@%i:%i",
gtk_spin_button_get_value_as_int( gtk_spin_button_get_value_as_int(
GTK_SPIN_BUTTON( lookup_widget( GTK_SPIN_BUTTON( lookup_widget(
GTK_WIDGET(button), "disc_title" ) ) ), GTK_WIDGET(button), "disc_title" ) ) ),
gtk_spin_button_get_value_as_int( gtk_spin_button_get_value_as_int(
GTK_SPIN_BUTTON( lookup_widget( GTK_SPIN_BUTTON( lookup_widget(
GTK_WIDGET(button), "disc_chapter" ) ) ) ); GTK_WIDGET(button), "disc_chapter" ) ) ) );
} }
} }
else if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button), else if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button),
"disc_vcd" ) )->active ) "disc_vcd" ) )->active )
{ {
int i = gtk_spin_button_get_value_as_int( int i = gtk_spin_button_get_value_as_int(
GTK_SPIN_BUTTON( lookup_widget( GTK_SPIN_BUTTON( lookup_widget(
GTK_WIDGET(button), "disc_title" ) ) ); GTK_WIDGET(button), "disc_title" ) ) );
#ifdef HAVE_VCDX #ifdef HAVE_VCDX
int i_pbc = config_GetInt( p_intf, "vcdx-PBC" ); int i_pbc = config_GetInt( p_intf, "vcdx-PBC" );
gtk_label_set_text( GTK_LABEL( p_label ),
i_pbc ? _("PBC LID") : _("Entry") );
gtk_label_set_text( GTK_LABEL( p_label ),
i_pbc ? _("PBC LID") : _("Entry") );
g_string_append( p_target, VCD_MRL ); g_string_append( p_target, VCD_MRL );
g_string_append( p_target, g_string_append( p_target,
gtk_entry_get_text( GTK_ENTRY( lookup_widget( gtk_entry_get_text( GTK_ENTRY( lookup_widget(
GTK_WIDGET(button), "disc_name" ) ) ) ); GTK_WIDGET(button), "disc_name" ) ) ) );
if ( i ) if ( i )
g_string_sprintfa( p_target, "@%c%d", i_pbc ? 'P' : 'E', i ); g_string_sprintfa( p_target, "@%c%d", i_pbc ? 'P' : 'E', i );
#else #else
gtk_label_set_text( GTK_LABEL( p_label ), _("Track") ); gtk_label_set_text( GTK_LABEL( p_label ), _("Track") );
g_string_append( p_target, VCD_MRL ); g_string_append( p_target, VCD_MRL );
g_string_sprintfa( p_target, "@%d", i ); g_string_sprintfa( p_target, "@%d", i );
#endif /* HAVE_VCDX */ #endif /* HAVE_VCDX */
...@@ -296,18 +296,18 @@ static void GtkDiscOpenChanged( GtkWidget * button, gpointer user_data ) ...@@ -296,18 +296,18 @@ static void GtkDiscOpenChanged( GtkWidget * button, gpointer user_data )
{ {
int i = gtk_spin_button_get_value_as_int( int i = gtk_spin_button_get_value_as_int(
GTK_SPIN_BUTTON( lookup_widget( GTK_SPIN_BUTTON( lookup_widget(
GTK_WIDGET(button), "disc_title" ) ) ); GTK_WIDGET(button), "disc_title" ) ) );
gtk_label_set_text( GTK_LABEL( p_label ), _("Track") ); gtk_label_set_text( GTK_LABEL( p_label ), _("Track") );
b_chapter_menu = VLC_FALSE; b_chapter_menu = VLC_FALSE;
g_string_append( p_target, CDDA_MRL ); g_string_append( p_target, CDDA_MRL );
g_string_append( p_target, g_string_append( p_target,
gtk_entry_get_text( GTK_ENTRY( lookup_widget( gtk_entry_get_text( GTK_ENTRY( lookup_widget(
GTK_WIDGET(button), "disc_name" ) ) ) ); GTK_WIDGET(button), "disc_name" ) ) ) );
#ifdef HAVE_CDDAX #ifdef HAVE_CDDAX
if ( i ) if ( i )
g_string_sprintfa( p_target, "@T%i", i ); g_string_sprintfa( p_target, "@T%i", i );
#else #else
g_string_sprintfa( p_target, "@%i", i ); g_string_sprintfa( p_target, "@%i", i );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_playlist.c : Interface for the playlist dialog * gtk_playlist.c : Interface for the playlist dialog
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: playlist.c,v 1.7 2003/12/03 21:58:43 sigmunau Exp $ * $Id: playlist.c,v 1.8 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Pierre Baillet <oct@zoy.org> * Authors: Pierre Baillet <oct@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -698,7 +698,7 @@ void GtkRebuildCList( GtkCList * p_clist, playlist_t * p_playlist ) ...@@ -698,7 +698,7 @@ void GtkRebuildCList( GtkCList * p_clist, playlist_t * p_playlist )
mtime_t dur = p_playlist->pp_items[i_dummy]->i_duration; mtime_t dur = p_playlist->pp_items[i_dummy]->i_duration;
if ( dur != -1 ) if ( dur != -1 )
{ {
secstotimestr( psz_duration, dur/1000000 ); secstotimestr( psz_duration, dur/1000000 );
} }
else else
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf.h: MacOS X interface plugin * intf.h: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: intf.h,v 1.52 2003/12/15 19:25:56 bigben Exp $ * $Id: intf.h,v 1.53 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <Cocoa/Cocoa.h> #include <Cocoa/Cocoa.h>
/***************************************************************************** /*****************************************************************************
* VLCApplication interface * VLCApplication interface
*****************************************************************************/ *****************************************************************************/
@interface VLCApplication : NSApplication @interface VLCApplication : NSApplication
{ {
...@@ -87,7 +87,7 @@ struct intf_sys_t ...@@ -87,7 +87,7 @@ struct intf_sys_t
}; };
/***************************************************************************** /*****************************************************************************
* VLCMain interface * VLCMain interface
*****************************************************************************/ *****************************************************************************/
@interface VLCMain : NSObject @interface VLCMain : NSObject
{ {
...@@ -98,7 +98,7 @@ struct intf_sys_t ...@@ -98,7 +98,7 @@ struct intf_sys_t
IBOutlet id o_timefield; /* time field */ IBOutlet id o_timefield; /* time field */
IBOutlet id o_timeslider; /* time slider */ IBOutlet id o_timeslider; /* time slider */
float f_slider; /* slider value */ float f_slider; /* slider value */
float f_slider_old; /* old slider val */ float f_slider_old; /* old slider val */
IBOutlet id o_volumeslider; /* volume slider */ IBOutlet id o_volumeslider; /* volume slider */
IBOutlet id o_btn_prev; /* btn previous */ IBOutlet id o_btn_prev; /* btn previous */
...@@ -116,13 +116,13 @@ struct intf_sys_t ...@@ -116,13 +116,13 @@ struct intf_sys_t
IBOutlet id o_controls; /* VLCControls */ IBOutlet id o_controls; /* VLCControls */
IBOutlet id o_playlist; /* VLCPlaylist */ IBOutlet id o_playlist; /* VLCPlaylist */
IBOutlet id o_info; /* VLCInfo */ IBOutlet id o_info; /* VLCInfo */
IBOutlet id o_messages; /* messages tv */ IBOutlet id o_messages; /* messages tv */
IBOutlet id o_msgs_panel; /* messages panel */ IBOutlet id o_msgs_panel; /* messages panel */
NSMutableArray * o_msg_arr; /* messages array */ NSMutableArray * o_msg_arr; /* messages array */
NSLock * o_msg_lock; /* messages lock */ NSLock * o_msg_lock; /* messages lock */
IBOutlet id o_msgs_btn_crashlog; /* messages open crashlog */ IBOutlet id o_msgs_btn_crashlog; /* messages open crashlog */
IBOutlet id o_error; /* error panel */ IBOutlet id o_error; /* error panel */
IBOutlet id o_err_msg; /* NSTextView */ IBOutlet id o_err_msg; /* NSTextView */
...@@ -130,8 +130,8 @@ struct intf_sys_t ...@@ -130,8 +130,8 @@ struct intf_sys_t
IBOutlet id o_err_bug_lbl; IBOutlet id o_err_bug_lbl;
IBOutlet id o_err_btn_msgs; /* Open Messages */ IBOutlet id o_err_btn_msgs; /* Open Messages */
IBOutlet id o_err_btn_dismiss; IBOutlet id o_err_btn_dismiss;
IBOutlet id o_info_window; /* Info panel */ IBOutlet id o_info_window; /* Info panel */
/* main menu */ /* main menu */
...@@ -213,7 +213,7 @@ struct intf_sys_t ...@@ -213,7 +213,7 @@ struct intf_sys_t
IBOutlet id o_mi_info; IBOutlet id o_mi_info;
IBOutlet id o_mi_messages; IBOutlet id o_mi_messages;
IBOutlet id o_mi_bring_atf; IBOutlet id o_mi_bring_atf;
IBOutlet id o_mu_help; IBOutlet id o_mu_help;
IBOutlet id o_mi_readme; IBOutlet id o_mi_readme;
IBOutlet id o_mi_documentation; IBOutlet id o_mi_documentation;
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
* prefs.m: MacOS X plugin for vlc * prefs.m: MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: prefs.m,v 1.35 2003/11/11 23:50:41 hartman Exp $ * $Id: prefs.m,v 1.36 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Derk-Jan Hartman <thedj at users.sf.net> * Derk-Jan Hartman <thedj at users.sf.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* ncurses.c : NCurses plugin for vlc * ncurses.c : NCurses plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002, 2003 VideoLAN * Copyright (C) 2001, 2002, 2003 VideoLAN
* $Id: ncurses.c,v 1.5 2003/12/12 03:06:51 rocky Exp $ * $Id: ncurses.c,v 1.6 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Sam Hocevar <sam@zoy.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#ifdef HAVE_CDDAX #ifdef HAVE_CDDAX
#define CDDA_MRL "cddax://" #define CDDA_MRL "cddax://"
#else #else
#define CDDA_MRL "cdda://" #define CDDA_MRL "cdda://"
#endif #endif
...@@ -403,7 +403,7 @@ static void Eject ( intf_thread_t *p_intf ) ...@@ -403,7 +403,7 @@ static void Eject ( intf_thread_t *p_intf )
{ {
if( !strncmp(psz_name, "dvd://", 4) ) if( !strncmp(psz_name, "dvd://", 4) )
{ {
switch( psz_name[strlen("dvd://")] ) switch( psz_name[strlen("dvd://")] )
{ {
case '\0': case '\0':
case '@': case '@':
...@@ -411,13 +411,13 @@ static void Eject ( intf_thread_t *p_intf ) ...@@ -411,13 +411,13 @@ static void Eject ( intf_thread_t *p_intf )
break; break;
default: default:
/* Omit the first MRL-selector characters */ /* Omit the first MRL-selector characters */
psz_device = strdup( psz_name + strlen("dvd://" ) ); psz_device = strdup( psz_name + strlen("dvd://" ) );
break; break;
} }
} }
else if( !strncmp(psz_name, VCD_MRL, strlen(VCD_MRL)) ) else if( !strncmp(psz_name, VCD_MRL, strlen(VCD_MRL)) )
{ {
switch( psz_name[strlen(VCD_MRL)] ) switch( psz_name[strlen(VCD_MRL)] )
{ {
case '\0': case '\0':
case '@': case '@':
...@@ -425,13 +425,13 @@ static void Eject ( intf_thread_t *p_intf ) ...@@ -425,13 +425,13 @@ static void Eject ( intf_thread_t *p_intf )
break; break;
default: default:
/* Omit the beginning MRL-selector characters */ /* Omit the beginning MRL-selector characters */
psz_device = strdup( psz_name + strlen(VCD_MRL) ); psz_device = strdup( psz_name + strlen(VCD_MRL) );
break; break;
} }
} }
else if( !strncmp(psz_name, CDDA_MRL, strlen(CDDA_MRL) ) ) else if( !strncmp(psz_name, CDDA_MRL, strlen(CDDA_MRL) ) )
{ {
switch( psz_name[strlen(CDDA_MRL)] ) switch( psz_name[strlen(CDDA_MRL)] )
{ {
case '\0': case '\0':
case '@': case '@':
...@@ -439,7 +439,7 @@ static void Eject ( intf_thread_t *p_intf ) ...@@ -439,7 +439,7 @@ static void Eject ( intf_thread_t *p_intf )
break; break;
default: default:
/* Omit the beginning MRL-selector characters */ /* Omit the beginning MRL-selector characters */
psz_device = strdup( psz_name + strlen(CDDA_MRL) ); psz_device = strdup( psz_name + strlen(CDDA_MRL) );
break; break;
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* pda.c : PDA Gtk2 plugin for vlc * pda.c : PDA Gtk2 plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: pda.c,v 1.17 2003/12/06 22:41:40 jpsaman Exp $ * $Id: pda.c,v 1.18 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Jean-Paul Saman <jpsaman@wxs.nl> * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* Marc Ariberti <marcari@videolan.org> * Marc Ariberti <marcari@videolan.org>
...@@ -188,7 +188,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -188,7 +188,7 @@ static void Run( intf_thread_t *p_intf )
/* Get the notebook object */ /* Get the notebook object */
p_intf->p_sys->p_notebook = GTK_NOTEBOOK( gtk_object_get_data( p_intf->p_sys->p_notebook = GTK_NOTEBOOK( gtk_object_get_data(
GTK_OBJECT( p_intf->p_sys->p_window ), "notebook" ) ); GTK_OBJECT( p_intf->p_sys->p_window ), "notebook" ) );
/* Get the slider object */ /* Get the slider object */
p_intf->p_sys->p_slider = (GtkHScale*) lookup_widget( p_intf->p_sys->p_window, "timeSlider" ); p_intf->p_sys->p_slider = (GtkHScale*) lookup_widget( p_intf->p_sys->p_window, "timeSlider" );
p_intf->p_sys->p_slider_label = (GtkLabel*) lookup_widget( p_intf->p_sys->p_window, "timeLabel" ); p_intf->p_sys->p_slider_label = (GtkLabel*) lookup_widget( p_intf->p_sys->p_window, "timeLabel" );
...@@ -264,7 +264,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -264,7 +264,7 @@ static void Run( intf_thread_t *p_intf )
/* BEGIN OF PLAYLIST GTK_TREE_VIEW */ /* BEGIN OF PLAYLIST GTK_TREE_VIEW */
p_intf->p_sys->p_tvplaylist = NULL; p_intf->p_sys->p_tvplaylist = NULL;
p_intf->p_sys->p_tvplaylist = (GtkTreeView *) lookup_widget( p_intf->p_sys->p_window, "tvPlaylist"); p_intf->p_sys->p_tvplaylist = (GtkTreeView *) lookup_widget( p_intf->p_sys->p_window, "tvPlaylist");
if (NULL == p_intf->p_sys->p_tvplaylist) if (NULL == p_intf->p_sys->p_tvplaylist)
msg_Err(p_intf, "Error obtaining pointer to Play List"); msg_Err(p_intf, "Error obtaining pointer to Play List");
...@@ -423,7 +423,7 @@ static int Manage( intf_thread_t *p_intf ) ...@@ -423,7 +423,7 @@ static int Manage( intf_thread_t *p_intf )
p_intf->p_sys->b_playing = 1; p_intf->p_sys->b_playing = 1;
/* update playlist interface */ /* update playlist interface */
p_playlist = (playlist_t *) vlc_object_find( p_playlist = (playlist_t *) vlc_object_find(
p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if (p_playlist != NULL) if (p_playlist != NULL)
{ {
...@@ -442,7 +442,7 @@ static int Manage( intf_thread_t *p_intf ) ...@@ -442,7 +442,7 @@ static int Manage( intf_thread_t *p_intf )
#define p_area p_input->stream.p_selected_area #define p_area p_input->stream.p_selected_area
if (p_intf->p_libvlc->i_cpu & CPU_CAPABILITY_FPU) if (p_intf->p_libvlc->i_cpu & CPU_CAPABILITY_FPU)
{ {
/* Manage the slider for CPU_CAPABILITY_FPU hardware */ /* Manage the slider for CPU_CAPABILITY_FPU hardware */
if( p_input->stream.b_seekable && p_intf->p_sys->b_playing ) if( p_input->stream.b_seekable && p_intf->p_sys->b_playing )
{ {
float newvalue = p_intf->p_sys->p_adj->value; float newvalue = p_intf->p_sys->p_adj->value;
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* x11_api.cpp: Various x11-specific functions * x11_api.cpp: Various x11-specific functions
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: x11_api.cpp,v 1.9 2003/06/09 22:02:13 asmax Exp $ * $Id: x11_api.cpp,v 1.10 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Cyril Deguet <asmax@videolan.org> * Author: Cyril Deguet <asmax@videolan.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -54,7 +54,7 @@ void OSAPI_SendMessage( SkinWindow *win, unsigned int message, ...@@ -54,7 +54,7 @@ void OSAPI_SendMessage( SkinWindow *win, unsigned int message,
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void OSAPI_PostMessage( SkinWindow *win, unsigned int message, void OSAPI_PostMessage( SkinWindow *win, unsigned int message,
unsigned int param1, long param2 ) unsigned int param1, long param2 )
{ {
XEvent event; XEvent event;
...@@ -66,7 +66,7 @@ void OSAPI_PostMessage( SkinWindow *win, unsigned int message, ...@@ -66,7 +66,7 @@ void OSAPI_PostMessage( SkinWindow *win, unsigned int message,
event.xclient.data.l[0] = message; event.xclient.data.l[0] = message;
event.xclient.data.l[1] = param1; event.xclient.data.l[1] = param1;
event.xclient.data.l[2] = param2; event.xclient.data.l[2] = param2;
if( win == NULL ) if( win == NULL )
{ {
// broadcast message // broadcast message
...@@ -77,7 +77,7 @@ void OSAPI_PostMessage( SkinWindow *win, unsigned int message, ...@@ -77,7 +77,7 @@ void OSAPI_PostMessage( SkinWindow *win, unsigned int message,
event.xclient.window = (( X11Window *)win)->GetHandle(); event.xclient.window = (( X11Window *)win)->GetHandle();
} }
XLOCK; XLOCK;
XSendEvent( g_pIntf->p_sys->display, event.xclient.window, False, 0, XSendEvent( g_pIntf->p_sys->display, event.xclient.window, False, 0,
&event ); &event );
XUNLOCK; XUNLOCK;
} }
...@@ -122,10 +122,10 @@ void OSAPI_GetMousePos( int &x, int &y ) ...@@ -122,10 +122,10 @@ void OSAPI_GetMousePos( int &x, int &y )
int rootx, rooty; int rootx, rooty;
int winx, winy; int winx, winy;
unsigned int xmask; unsigned int xmask;
Window root = DefaultRootWindow( g_pIntf->p_sys->display ); Window root = DefaultRootWindow( g_pIntf->p_sys->display );
XLOCK; XLOCK;
XQueryPointer( g_pIntf->p_sys->display, root, &rootReturn, &childReturn, XQueryPointer( g_pIntf->p_sys->display, root, &rootReturn, &childReturn,
&rootx, &rooty, &winx, &winy, &xmask ); &rootx, &rooty, &winx, &winy, &xmask );
XUNLOCK; XUNLOCK;
x = rootx; x = rootx;
...@@ -153,8 +153,8 @@ bool OSAPI_RmDir( string path ) ...@@ -153,8 +153,8 @@ bool OSAPI_RmDir( string path )
/* Skip "." and ".." */ /* Skip "." and ".." */
if( !*file->d_name || *file->d_name == '.' || if( !*file->d_name || *file->d_name == '.' ||
(!*(file->d_name+1) && *file->d_name == '.' && (!*(file->d_name+1) && *file->d_name == '.' &&
*(file->d_name+1) == '.') ) *(file->d_name+1) == '.') )
{ {
continue; continue;
} }
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
* memcpyaltivec.c : AltiVec memcpy module * memcpyaltivec.c : AltiVec memcpy module
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: memcpyaltivec.c,v 1.3 2003/03/30 18:14:38 gbazin Exp $ * $Id: memcpyaltivec.c,v 1.4 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Author: Christophe Massiot <massiot@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -150,7 +150,7 @@ static void * fast_memcpy( void * _to, const void * _from, size_t len ) ...@@ -150,7 +150,7 @@ static void * fast_memcpy( void * _to, const void * _from, size_t len )
static void * fast_memcpy( void * _to, const void * _from, size_t len ) static void * fast_memcpy( void * _to, const void * _from, size_t len )
{ {
asm (" \n" asm (" \n"
" cmplwi %cr0, %r5, 16 \n" " cmplwi %cr0, %r5, 16 \n"
" mr %r9, %r3 \n" " mr %r9, %r3 \n"
" bc 4, 1, ._L3 \n" " bc 4, 1, ._L3 \n"
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* duplicate.c * duplicate.c
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: duplicate.c,v 1.7 2003/12/14 17:58:37 gbazin Exp $ * $Id: duplicate.c,v 1.8 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Author: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -153,7 +153,7 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt ) ...@@ -153,7 +153,7 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
p_sys->pp_streams[i_stream], p_fmt ); p_sys->pp_streams[i_stream], p_fmt );
/* Append failed attempts as well to keep track of which pp_id /* Append failed attempts as well to keep track of which pp_id
* belongs to which duplicated stream */ * belongs to which duplicated stream */
TAB_APPEND( id->i_nb_ids, id->pp_ids, id_new ); TAB_APPEND( id->i_nb_ids, id->pp_ids, id_new );
if( id_new ) i_valid_streams++; if( id_new ) i_valid_streams++;
} }
......
...@@ -92,7 +92,7 @@ static const MBtab MB_B [] = { ...@@ -92,7 +92,7 @@ static const MBtab MB_B [] = {
{0, 0}, {INTRA|QUANT, 6}, {0, 0}, {INTRA|QUANT, 6},
{BWD|CODED|QUANT, 6}, {FWD|CODED|QUANT, 6}, {BWD|CODED|QUANT, 6}, {FWD|CODED|QUANT, 6},
{INTER|CODED|QUANT, 5}, {INTER|CODED|QUANT, 5}, {INTER|CODED|QUANT, 5}, {INTER|CODED|QUANT, 5},
{INTRA, 5}, {INTRA, 5}, {INTRA, 5}, {INTRA, 5},
{FWD, 4}, {FWD, 4}, {FWD, 4}, {FWD, 4}, {FWD, 4}, {FWD, 4}, {FWD, 4}, {FWD, 4},
{FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4},
{BWD, 3}, {BWD, 3}, {BWD, 3}, {BWD, 3}, {BWD, 3}, {BWD, 3}, {BWD, 3}, {BWD, 3},
...@@ -269,7 +269,7 @@ static const DCTtab DCT_B14_8 [] = { ...@@ -269,7 +269,7 @@ static const DCTtab DCT_B14_8 [] = {
}; };
static const DCTtab DCT_B14AC_5 [] = { static const DCTtab DCT_B14AC_5 [] = {
{ 1, 3, 5}, { 5, 1, 5}, { 4, 1, 5}, { 1, 3, 5}, { 5, 1, 5}, { 4, 1, 5},
{ 1, 2, 4}, { 1, 2, 4}, { 3, 1, 4}, { 3, 1, 4}, { 1, 2, 4}, { 1, 2, 4}, { 3, 1, 4}, { 3, 1, 4},
{ 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3},
{129, 0, 2}, {129, 0, 2}, {129, 0, 2}, {129, 0, 2}, {129, 0, 2}, {129, 0, 2}, {129, 0, 2}, {129, 0, 2},
...@@ -279,7 +279,7 @@ static const DCTtab DCT_B14AC_5 [] = { ...@@ -279,7 +279,7 @@ static const DCTtab DCT_B14AC_5 [] = {
}; };
static const DCTtab DCT_B14DC_5 [] = { static const DCTtab DCT_B14DC_5 [] = {
{ 1, 3, 5}, { 5, 1, 5}, { 4, 1, 5}, { 1, 3, 5}, { 5, 1, 5}, { 4, 1, 5},
{ 1, 2, 4}, { 1, 2, 4}, { 3, 1, 4}, { 3, 1, 4}, { 1, 2, 4}, { 1, 2, 4}, { 3, 1, 4}, { 3, 1, 4},
{ 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3},
{ 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1},
...@@ -361,7 +361,7 @@ static const DCTtab DCT_B15_8 [] = { ...@@ -361,7 +361,7 @@ static const DCTtab DCT_B15_8 [] = {
static const MBAtab MBA_5 [] = { static const MBAtab MBA_5 [] = {
{6, 5}, {5, 5}, {4, 4}, {4, 4}, {3, 4}, {3, 4}, {6, 5}, {5, 5}, {4, 4}, {4, 4}, {3, 4}, {3, 4},
{2, 3}, {2, 3}, {2, 3}, {2, 3}, {1, 3}, {1, 3}, {1, 3}, {1, 3}, {2, 3}, {2, 3}, {2, 3}, {2, 3}, {1, 3}, {1, 3}, {1, 3}, {1, 3},
{0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1},
{0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1} {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
* i420_rgb.c : YUV to bitmap RGB conversion module for vlc * i420_rgb.c : YUV to bitmap RGB conversion module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: i420_rgb.c,v 1.5 2003/12/04 12:33:43 gbazin Exp $ * $Id: i420_rgb.c,v 1.6 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Author: Sam Hocevar <sam@zoy.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -123,7 +123,7 @@ static int Activate( vlc_object_t *p_this ) ...@@ -123,7 +123,7 @@ static int Activate( vlc_object_t *p_this )
break; break;
#ifndef WIN32 /* Hmmm, is there only X11 using 32bits per pixel for RV24 ? */ #ifndef WIN32 /* Hmmm, is there only X11 using 32bits per pixel for RV24 ? */
case VLC_FOURCC('R','V','2','4'): case VLC_FOURCC('R','V','2','4'):
#endif #endif
case VLC_FOURCC('R','V','3','2'): case VLC_FOURCC('R','V','3','2'):
#if defined (MODULE_NAME_IS_i420_rgb_mmx) #if defined (MODULE_NAME_IS_i420_rgb_mmx)
...@@ -146,7 +146,7 @@ static int Activate( vlc_object_t *p_this ) ...@@ -146,7 +146,7 @@ static int Activate( vlc_object_t *p_this )
default: default:
return -1; return -1;
} }
p_vout->chroma.p_sys = malloc( sizeof( chroma_sys_t ) ); p_vout->chroma.p_sys = malloc( sizeof( chroma_sys_t ) );
if( p_vout->chroma.p_sys == NULL ) if( p_vout->chroma.p_sys == NULL )
{ {
...@@ -220,7 +220,7 @@ static int Activate( vlc_object_t *p_this ) ...@@ -220,7 +220,7 @@ static int Activate( vlc_object_t *p_this )
SetYUV( p_vout ); SetYUV( p_vout );
#endif #endif
return 0; return 0;
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* deinterlace.c : deinterlacer plugin for vlc * deinterlace.c : deinterlacer plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001, 2002, 2003 VideoLAN * Copyright (C) 2000, 2001, 2002, 2003 VideoLAN
* $Id: deinterlace.c,v 1.17 2003/11/06 16:54:40 nitrox Exp $ * $Id: deinterlace.c,v 1.18 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Author: Sam Hocevar <sam@zoy.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -376,7 +376,7 @@ static void Render ( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -376,7 +376,7 @@ static void Render ( vout_thread_t *p_vout, picture_t *p_pic )
vlc_mutex_unlock( &p_vout->p_sys->filter_lock ); vlc_mutex_unlock( &p_vout->p_sys->filter_lock );
return; return;
} }
msleep( VOUT_OUTMEM_SLEEP ); msleep( VOUT_OUTMEM_SLEEP );
} }
/* 20ms is a bit arbitrary, but it's only for the first image we get */ /* 20ms is a bit arbitrary, but it's only for the first image we get */
...@@ -706,7 +706,7 @@ static void RenderBlend( vout_thread_t *p_vout, ...@@ -706,7 +706,7 @@ static void RenderBlend( vout_thread_t *p_vout,
picture_t *p_outpic, picture_t *p_pic ) picture_t *p_outpic, picture_t *p_pic )
{ {
int i_plane; int i_plane;
/* Copy image and skip lines */ /* Copy image and skip lines */
for( i_plane = 0 ; i_plane < p_pic->i_planes ; i_plane++ ) for( i_plane = 0 ; i_plane < p_pic->i_planes ; i_plane++ )
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* qte.cpp : QT Embedded plugin for vlc * qte.cpp : QT Embedded plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2003 VideoLAN * Copyright (C) 1998-2003 VideoLAN
* $Id: qte.cpp,v 1.19 2003/05/24 12:55:38 jpsaman Exp $ * $Id: qte.cpp,v 1.20 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Gerald Hansink <gerald.hansink@ordain.nl> * Authors: Gerald Hansink <gerald.hansink@ordain.nl>
* Jean-Paul Saman <jpsaman@wxs.nl> * Jean-Paul Saman <jpsaman@wxs.nl>
...@@ -290,7 +290,7 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -290,7 +290,7 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic )
&x, &y, &w, &h ); &x, &y, &w, &h );
#if 0 #if 0
msg_Dbg(p_vout, "+qte::Display( p_vout, i_width=%d, i_height=%d, x=%u, y=%u, w=%u, h=%u", msg_Dbg(p_vout, "+qte::Display( p_vout, i_width=%d, i_height=%d, x=%u, y=%u, w=%u, h=%u",
p_vout->output.i_width, p_vout->output.i_height, x, y, w, h ); p_vout->output.i_width, p_vout->output.i_height, x, y, w, h );
#endif #endif
if(p_vout->p_sys->p_VideoWidget) if(p_vout->p_sys->p_VideoWidget)
...@@ -607,7 +607,7 @@ static void RunQtThread(event_thread_t *p_event) ...@@ -607,7 +607,7 @@ static void RunQtThread(event_thread_t *p_event)
} }
QWidget* pWidget = new QWidget(); QWidget* pWidget = new QWidget();
if (pWidget) if (pWidget)
{ {
p_event->p_vout->p_sys->p_VideoWidget = pWidget; p_event->p_vout->p_sys->p_VideoWidget = pWidget;
} }
} }
...@@ -619,31 +619,31 @@ static void RunQtThread(event_thread_t *p_event) ...@@ -619,31 +619,31 @@ static void RunQtThread(event_thread_t *p_event)
if (p_event->p_vout->p_sys->p_QApplication) if (p_event->p_vout->p_sys->p_QApplication)
{ {
/* Set default window width and heigh to exactly preferred size. */ /* Set default window width and heigh to exactly preferred size. */
QWidget *desktop = p_event->p_vout->p_sys->p_QApplication->desktop(); QWidget *desktop = p_event->p_vout->p_sys->p_QApplication->desktop();
p_event->p_vout->p_sys->p_VideoWidget->setMinimumWidth( 10 ); p_event->p_vout->p_sys->p_VideoWidget->setMinimumWidth( 10 );
p_event->p_vout->p_sys->p_VideoWidget->setMinimumHeight( 10 ); p_event->p_vout->p_sys->p_VideoWidget->setMinimumHeight( 10 );
p_event->p_vout->p_sys->p_VideoWidget->setBaseSize( p_event->p_vout->p_sys->i_width, p_event->p_vout->p_sys->p_VideoWidget->setBaseSize( p_event->p_vout->p_sys->i_width,
p_event->p_vout->p_sys->i_height ); p_event->p_vout->p_sys->i_height );
p_event->p_vout->p_sys->p_VideoWidget->setMaximumWidth( desktop->width() ); p_event->p_vout->p_sys->p_VideoWidget->setMaximumWidth( desktop->width() );
p_event->p_vout->p_sys->p_VideoWidget->setMaximumHeight( desktop->height() ); p_event->p_vout->p_sys->p_VideoWidget->setMaximumHeight( desktop->height() );
/* Check on fullscreen */ /* Check on fullscreen */
if (p_event->p_vout->b_fullscreen) if (p_event->p_vout->b_fullscreen)
p_event->p_vout->p_sys->p_VideoWidget->showFullScreen(); p_event->p_vout->p_sys->p_VideoWidget->showFullScreen();
else else
p_event->p_vout->p_sys->p_VideoWidget->showNormal(); p_event->p_vout->p_sys->p_VideoWidget->showNormal();
p_event->p_vout->p_sys->p_VideoWidget->show(); p_event->p_vout->p_sys->p_VideoWidget->show();
p_event->p_vout->p_sys->bRunning = TRUE; p_event->p_vout->p_sys->bRunning = TRUE;
#ifdef NEED_QTE_MAIN #ifdef NEED_QTE_MAIN
while(!p_event->b_die && p_event->p_vout->p_sys->bRunning) while(!p_event->b_die && p_event->p_vout->p_sys->bRunning)
{ {
/* Check if we are asked to exit */ /* Check if we are asked to exit */
if( p_event->b_die ) if( p_event->b_die )
break; break;
msleep(100); msleep(100);
} }
#else #else
// run the main loop of qtapplication until someone says: 'quit' // run the main loop of qtapplication until someone says: 'quit'
p_event->p_vout->p_sys->pcQApplication->exec(); p_event->p_vout->p_sys->pcQApplication->exec();
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
* xcommon.c: Functions common to the X11 and XVideo plugins * xcommon.c: Functions common to the X11 and XVideo plugins
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: xcommon.c,v 1.40 2003/12/08 19:50:22 gbazin Exp $ * $Id: xcommon.c,v 1.41 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Sam Hocevar <sam@zoy.org>
* David Kennedy <dkennedy@tinytoad.com> * David Kennedy <dkennedy@tinytoad.com>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -282,7 +282,7 @@ int E_(Activate) ( vlc_object_t *p_this ) ...@@ -282,7 +282,7 @@ int E_(Activate) ( vlc_object_t *p_this )
TestNetWMSupport( p_vout ); TestNetWMSupport( p_vout );
/* Add a variable to indicate if the window should be on top of others */ /* Add a variable to indicate if the window should be on top of others */
var_Create( p_vout, "video-on-top", VLC_VAR_BOOL | VLC_VAR_DOINHERIT ); var_Create( p_vout, "video-on-top", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
text.psz_string = _("Always on top"); text.psz_string = _("Always on top");
var_Change( p_vout, "video-on-top", VLC_VAR_SETTEXT, &text, NULL ); var_Change( p_vout, "video-on-top", VLC_VAR_SETTEXT, &text, NULL );
var_AddCallback( p_vout, "video-on-top", OnTopCallback, NULL ); var_AddCallback( p_vout, "video-on-top", OnTopCallback, NULL );
...@@ -581,7 +581,7 @@ static int ManageVideo( vout_thread_t *p_vout ) ...@@ -581,7 +581,7 @@ static int ManageVideo( vout_thread_t *p_vout )
var_Get( p_vout, "mouse-button-down", &val ); var_Get( p_vout, "mouse-button-down", &val );
val.i_int |= 1; val.i_int |= 1;
var_Set( p_vout, "mouse-button-down", val ); var_Set( p_vout, "mouse-button-down", val );
/* detect double-clicks */ /* detect double-clicks */
if( ( ((XButtonEvent *)&xevent)->time - if( ( ((XButtonEvent *)&xevent)->time -
p_vout->p_sys->i_time_button_last_pressed ) < 300 ) p_vout->p_sys->i_time_button_last_pressed ) < 300 )
...@@ -597,13 +597,13 @@ static int ManageVideo( vout_thread_t *p_vout ) ...@@ -597,13 +597,13 @@ static int ManageVideo( vout_thread_t *p_vout )
val.i_int |= 2; val.i_int |= 2;
var_Set( p_vout, "mouse-button-down", val ); var_Set( p_vout, "mouse-button-down", val );
break; break;
case Button3: case Button3:
var_Get( p_vout, "mouse-button-down", &val ); var_Get( p_vout, "mouse-button-down", &val );
val.i_int |= 4; val.i_int |= 4;
var_Set( p_vout, "mouse-button-down", val ); var_Set( p_vout, "mouse-button-down", val );
break; break;
case Button4: case Button4:
var_Get( p_vout, "mouse-button-down", &val ); var_Get( p_vout, "mouse-button-down", &val );
val.i_int |= 8; val.i_int |= 8;
...@@ -632,7 +632,7 @@ static int ManageVideo( vout_thread_t *p_vout ) ...@@ -632,7 +632,7 @@ static int ManageVideo( vout_thread_t *p_vout )
val.b_bool = VLC_TRUE; val.b_bool = VLC_TRUE;
var_Set( p_vout, "mouse-clicked", val ); var_Set( p_vout, "mouse-clicked", val );
break; break;
case Button2: case Button2:
{ {
playlist_t *p_playlist; playlist_t *p_playlist;
...@@ -654,7 +654,7 @@ static int ManageVideo( vout_thread_t *p_vout ) ...@@ -654,7 +654,7 @@ static int ManageVideo( vout_thread_t *p_vout )
} }
} }
break; break;
case Button3: case Button3:
{ {
intf_thread_t *p_intf; intf_thread_t *p_intf;
...@@ -694,7 +694,7 @@ static int ManageVideo( vout_thread_t *p_vout ) ...@@ -694,7 +694,7 @@ static int ManageVideo( vout_thread_t *p_vout )
val.i_int &= ~16; val.i_int &= ~16;
var_Set( p_vout, "mouse-button-down", val ); var_Set( p_vout, "mouse-button-down", val );
break; break;
} }
} }
/* Mouse move */ /* Mouse move */
......
/***************************************************************************** /*****************************************************************************
* fft.c: Iterative implementation of a FFT * fft.c: Iterative implementation of a FFT
***************************************************************************** *****************************************************************************
* $Id: fft.c,v 1.2 2003/10/24 17:43:51 sam Exp $ * $Id: fft.c,v 1.3 2003/12/22 14:32:56 sam Exp $
* *
* Mainly taken from XMMS's code * Mainly taken from XMMS's code
* *
* Authors: Richard Boulton <richard@tartarus.org> * Authors: Richard Boulton <richard@tartarus.org>
* Ralph Loader <suckfish@ihug.co.nz> * Ralph Loader <suckfish@ihug.co.nz>
* *
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#endif #endif
/****************************************************************************** /******************************************************************************
* Local prototypes * Local prototypes
*****************************************************************************/ *****************************************************************************/
static void fft_prepare(const sound_sample *input, float * re, float * im); static void fft_prepare(const sound_sample *input, float * re, float * im);
static void fft_calculate(float * re, float * im); static void fft_calculate(float * re, float * im);
...@@ -62,24 +62,24 @@ static float costable[FFT_BUFFER_SIZE / 2]; ...@@ -62,24 +62,24 @@ static float costable[FFT_BUFFER_SIZE / 2];
* On error, returns NULL. * On error, returns NULL.
* The pointer should be freed when it is finished with, by fft_close(). * The pointer should be freed when it is finished with, by fft_close().
*/ */
fft_state *visual_fft_init(void) fft_state *visual_fft_init(void)
{ {
fft_state *p_state; fft_state *p_state;
unsigned int i; unsigned int i;
p_state = (fft_state *) malloc (sizeof(fft_state)); p_state = (fft_state *) malloc (sizeof(fft_state));
if(! p_state ) if(! p_state )
return NULL; return NULL;
for(i = 0; i < FFT_BUFFER_SIZE; i++) for(i = 0; i < FFT_BUFFER_SIZE; i++)
{ {
bitReverse[i] = reverseBits(i); bitReverse[i] = reverseBits(i);
} }
for(i = 0; i < FFT_BUFFER_SIZE / 2; i++) for(i = 0; i < FFT_BUFFER_SIZE / 2; i++)
{ {
float j = 2 * PI * i / FFT_BUFFER_SIZE; float j = 2 * PI * i / FFT_BUFFER_SIZE;
costable[i] = cos(j); costable[i] = cos(j);
sintable[i] = sin(j); sintable[i] = sin(j);
} }
return p_state; return p_state;
...@@ -123,12 +123,12 @@ static void fft_prepare(const sound_sample *input, float * re, float * im) { ...@@ -123,12 +123,12 @@ static void fft_prepare(const sound_sample *input, float * re, float * im) {
unsigned int i; unsigned int i;
float *p_real = re; float *p_real = re;
float *p_imag = im; float *p_imag = im;
/* Get input, in reverse bit order */ /* Get input, in reverse bit order */
for(i = 0; i < FFT_BUFFER_SIZE; i++) for(i = 0; i < FFT_BUFFER_SIZE; i++)
{ {
*p_real++ = input[bitReverse[i]]; *p_real++ = input[bitReverse[i]];
*p_imag++ = 0; *p_imag++ = 0;
} }
} }
...@@ -142,11 +142,11 @@ static void fft_output(const float * re, const float * im, float *output) ...@@ -142,11 +142,11 @@ static void fft_output(const float * re, const float * im, float *output)
const float *p_real = re; const float *p_real = re;
const float *p_imag = im; const float *p_imag = im;
float *p_end = output + FFT_BUFFER_SIZE / 2; float *p_end = output + FFT_BUFFER_SIZE / 2;
while(p_output <= p_end) while(p_output <= p_end)
{ {
*p_output = (*p_real * *p_real) + (*p_imag * *p_imag); *p_output = (*p_real * *p_real) + (*p_imag * *p_imag);
p_output++; p_real++; p_imag++; p_output++; p_real++; p_imag++;
} }
/* Do divisions to keep the constant and highest frequency terms in scale /* Do divisions to keep the constant and highest frequency terms in scale
* with the other terms. */ * with the other terms. */
...@@ -158,56 +158,56 @@ static void fft_output(const float * re, const float * im, float *output) ...@@ -158,56 +158,56 @@ static void fft_output(const float * re, const float * im, float *output)
/* /*
* Actually perform the FFT * Actually perform the FFT
*/ */
static void fft_calculate(float * re, float * im) static void fft_calculate(float * re, float * im)
{ {
unsigned int i, j, k; unsigned int i, j, k;
unsigned int exchanges; unsigned int exchanges;
float fact_real, fact_imag; float fact_real, fact_imag;
float tmp_real, tmp_imag; float tmp_real, tmp_imag;
unsigned int factfact; unsigned int factfact;
/* Set up some variables to reduce calculation in the loops */ /* Set up some variables to reduce calculation in the loops */
exchanges = 1; exchanges = 1;
factfact = FFT_BUFFER_SIZE / 2; factfact = FFT_BUFFER_SIZE / 2;
/* Loop through the divide and conquer steps */ /* Loop through the divide and conquer steps */
for(i = FFT_BUFFER_SIZE_LOG; i != 0; i--) { for(i = FFT_BUFFER_SIZE_LOG; i != 0; i--) {
/* In this step, we have 2 ^ (i - 1) exchange groups, each with /* In this step, we have 2 ^ (i - 1) exchange groups, each with
* 2 ^ (FFT_BUFFER_SIZE_LOG - i) exchanges * 2 ^ (FFT_BUFFER_SIZE_LOG - i) exchanges
*/ */
/* Loop through the exchanges in a group */ /* Loop through the exchanges in a group */
for(j = 0; j != exchanges; j++) { for(j = 0; j != exchanges; j++) {
/* Work out factor for this exchange /* Work out factor for this exchange
* factor ^ (exchanges) = -1 * factor ^ (exchanges) = -1
* So, real = cos(j * PI / exchanges), * So, real = cos(j * PI / exchanges),
* imag = sin(j * PI / exchanges) * imag = sin(j * PI / exchanges)
*/ */
fact_real = costable[j * factfact]; fact_real = costable[j * factfact];
fact_imag = sintable[j * factfact]; fact_imag = sintable[j * factfact];
/* Loop through all the exchange groups */ /* Loop through all the exchange groups */
for(k = j; k < FFT_BUFFER_SIZE; k += exchanges << 1) { for(k = j; k < FFT_BUFFER_SIZE; k += exchanges << 1) {
int k1 = k + exchanges; int k1 = k + exchanges;
tmp_real = fact_real * re[k1] - fact_imag * im[k1]; tmp_real = fact_real * re[k1] - fact_imag * im[k1];
tmp_imag = fact_real * im[k1] + fact_imag * re[k1]; tmp_imag = fact_real * im[k1] + fact_imag * re[k1];
re[k1] = re[k] - tmp_real; re[k1] = re[k] - tmp_real;
im[k1] = im[k] - tmp_imag; im[k1] = im[k] - tmp_imag;
re[k] += tmp_real; re[k] += tmp_real;
im[k] += tmp_imag; im[k] += tmp_imag;
} }
} }
exchanges <<= 1; exchanges <<= 1;
factfact >>= 1; factfact >>= 1;
} }
} }
static int reverseBits(unsigned int initial) static int reverseBits(unsigned int initial)
{ {
unsigned int reversed = 0, loop; unsigned int reversed = 0, loop;
for(loop = 0; loop < FFT_BUFFER_SIZE_LOG; loop++) { for(loop = 0; loop < FFT_BUFFER_SIZE_LOG; loop++) {
reversed <<= 1; reversed <<= 1;
reversed += (initial & 1); reversed += (initial & 1);
initial >>= 1; initial >>= 1;
} }
return reversed; return reversed;
} }
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* demux.c * demux.c
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2003 VideoLAN * Copyright (C) 1999-2003 VideoLAN
* $Id: demux.c,v 1.5 2003/11/30 17:29:56 fenrir Exp $ * $Id: demux.c,v 1.6 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Author: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -77,7 +77,7 @@ int demux_vaControlDefault( input_thread_t *p_input, int i_query, ...@@ -77,7 +77,7 @@ int demux_vaControlDefault( input_thread_t *p_input, int i_query,
case DEMUX_SET_POSITION: case DEMUX_SET_POSITION:
f = (double)va_arg( args, double ); f = (double)va_arg( args, double );
if( p_input->stream.b_seekable && p_input->pf_seek != NULL && if( p_input->stream.b_seekable && p_input->pf_seek != NULL &&
f >= 0.0 && f <= 1.0 ) f >= 0.0 && f <= 1.0 )
{ {
SeekOffset( p_input, (int64_t)(f * SeekOffset( p_input, (int64_t)(f *
(double)p_input->stream.p_selected_area->i_size) ); (double)p_input->stream.p_selected_area->i_size) );
...@@ -109,7 +109,7 @@ int demux_vaControlDefault( input_thread_t *p_input, int i_query, ...@@ -109,7 +109,7 @@ int demux_vaControlDefault( input_thread_t *p_input, int i_query,
i64 = (int64_t)va_arg( args, int64_t ); i64 = (int64_t)va_arg( args, int64_t );
if( p_input->stream.i_mux_rate > 0 && if( p_input->stream.i_mux_rate > 0 &&
p_input->stream.b_seekable && p_input->stream.b_seekable &&
p_input->pf_seek != NULL && i64 >= 0 ) p_input->pf_seek != NULL && i64 >= 0 )
{ {
SeekOffset( p_input, i64 * 50 * SeekOffset( p_input, i64 * 50 *
(int64_t)p_input->stream.i_mux_rate / (int64_t)p_input->stream.i_mux_rate /
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* input_ext-intf.c: services to the interface * input_ext-intf.c: services to the interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001,2003 VideoLAN * Copyright (C) 1998-2001,2003 VideoLAN
* $Id: input_ext-intf.c,v 1.53 2003/12/03 13:27:51 rocky Exp $ * $Id: input_ext-intf.c,v 1.54 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Author: Christophe Massiot <massiot@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -308,7 +308,7 @@ char * input_OffsetToTime( input_thread_t * p_input, char * psz_buffer, ...@@ -308,7 +308,7 @@ char * input_OffsetToTime( input_thread_t * p_input, char * psz_buffer,
if( p_input->stream.i_mux_rate ) if( p_input->stream.i_mux_rate )
{ {
i_seconds = i_offset / 50 / p_input->stream.i_mux_rate; i_seconds = i_offset / 50 / p_input->stream.i_mux_rate;
return secstotimestr( psz_buffer, i_seconds ); return secstotimestr( psz_buffer, i_seconds );
} }
else else
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* subtitles.c * subtitles.c
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: subtitles.c,v 1.5 2003/12/02 12:57:36 gbazin Exp $ * $Id: subtitles.c,v 1.6 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Derk-Jan Hartman <hartman at videolan.org> * Authors: Derk-Jan Hartman <hartman at videolan.org>
* This is adapted code from the GPL'ed MPlayer (http://mplayerhq.hu) * This is adapted code from the GPL'ed MPlayer (http://mplayerhq.hu)
...@@ -68,54 +68,54 @@ static void strcpy_trim( char *d, char *s ) ...@@ -68,54 +68,54 @@ static void strcpy_trim( char *d, char *s )
/* skip leading whitespace */ /* skip leading whitespace */
while( *s && !isalnum(*s) ) while( *s && !isalnum(*s) )
{ {
s++; s++;
} }
for(;;) for(;;)
{ {
/* copy word */ /* copy word */
while( *s && isalnum(*s) ) while( *s && isalnum(*s) )
{ {
*d = tolower(*s); *d = tolower(*s);
s++; d++; s++; d++;
} }
if (*s == 0) break; if (*s == 0) break;
/* trim excess whitespace */ /* trim excess whitespace */
while( *s && !isalnum(*s) ) while( *s && !isalnum(*s) )
{ {
s++; s++;
} }
if( *s == 0 ) break; if( *s == 0 ) break;
*d++ = ' '; *d++ = ' ';
} }
*d = 0; *d = 0;
} }
static void strcpy_strip_ext( char *d, char *s ) static void strcpy_strip_ext( char *d, char *s )
{ {
char *tmp = strrchr(s, '.'); char *tmp = strrchr(s, '.');
if( !tmp ) { if( !tmp ) {
strcpy(d, s); strcpy(d, s);
return; return;
} }
else else
{ {
strncpy(d, s, tmp - s); strncpy(d, s, tmp - s);
d[tmp - s] = 0; d[tmp - s] = 0;
} }
while( *d ) while( *d )
{ {
*d = tolower(*d); *d = tolower(*d);
d++; d++;
} }
} }
static void strcpy_get_ext( char *d, char *s ) static void strcpy_get_ext( char *d, char *s )
{ {
char *tmp = strrchr(s, '.'); char *tmp = strrchr(s, '.');
if( !tmp ) if( !tmp )
{ {
strcpy(d, ""); strcpy(d, "");
return; return;
} else strcpy( d, tmp + 1 ); } else strcpy( d, tmp + 1 );
} }
...@@ -123,13 +123,13 @@ static int whiteonly( char *s ) ...@@ -123,13 +123,13 @@ static int whiteonly( char *s )
{ {
while ( *s ) while ( *s )
{ {
if( isalnum( *s ) ) return 0; if( isalnum( *s ) ) return 0;
s++; s++;
} }
return 1; return 1;
} }
typedef struct _subfn typedef struct _subfn
{ {
int priority; int priority;
char *psz_fname; char *psz_fname;
...@@ -137,22 +137,26 @@ typedef struct _subfn ...@@ -137,22 +137,26 @@ typedef struct _subfn
static int compare_sub_priority( const void *a, const void *b ) static int compare_sub_priority( const void *a, const void *b )
{ {
if (((subfn*)a)->priority > ((subfn*)b)->priority) { if (((subfn*)a)->priority > ((subfn*)b)->priority)
return -1; {
} else if (((subfn*)a)->priority < ((subfn*)b)->priority) { return -1;
return 1;
} else {
return strcoll(((subfn*)a)->psz_fname, ((subfn*)b)->psz_fname);
} }
if (((subfn*)a)->priority < ((subfn*)b)->priority)
{
return 1;
}
return strcoll(((subfn*)a)->psz_fname, ((subfn*)b)->psz_fname);
} }
/** /**
* Detect subtitle files. * Detect subtitle files.
* *
* When called this function will split up the psz_fname string into a * When called this function will split up the psz_fname string into a
* directory, filename and extension. It then opens the directory * directory, filename and extension. It then opens the directory
* in which the file resides and tries to find possible matches of * in which the file resides and tries to find possible matches of
* subtitles files. * subtitles files.
* *
* \ingroup Demux * \ingroup Demux
* \param p_this the calling \ref input_thread_t * \param p_this the calling \ref input_thread_t
...@@ -167,12 +171,12 @@ char** subtitles_Detect( input_thread_t *p_this, char *psz_path, char *psz_fname ...@@ -167,12 +171,12 @@ char** subtitles_Detect( input_thread_t *p_this, char *psz_path, char *psz_fname
char *f_dir, *f_fname, *f_fname_noext, *f_fname_trim, *tmp; char *f_dir, *f_fname, *f_fname_noext, *f_fname_trim, *tmp;
/* variables to be used for derivatives FILE *f */ /* variables to be used for derivatives FILE *f */
char *tmp_fname_noext, *tmp_fname_trim, *tmp_fname_ext, *tmpresult; char *tmp_fname_noext, *tmp_fname_trim, *tmp_fname_ext, *tmpresult;
vlc_value_t fuzzy; vlc_value_t fuzzy;
int len, i, j, i_sub_count; int len, i, j, i_sub_count;
subfn *result; /* unsorted results */ subfn *result; /* unsorted results */
char **result2; /* sorted results */ char **result2; /* sorted results */
FILE *f; FILE *f;
DIR *d; DIR *d;
struct dirent *de; struct dirent *de;
...@@ -200,59 +204,59 @@ char** subtitles_Detect( input_thread_t *p_this, char *psz_path, char *psz_fname ...@@ -200,59 +204,59 @@ char** subtitles_Detect( input_thread_t *p_this, char *psz_path, char *psz_fname
if( tmp ) if( tmp )
{ {
int pos; int pos;
strcpy( f_fname, tmp + 1 ); strcpy( f_fname, tmp + 1 );
pos = tmp - psz_fname; pos = tmp - psz_fname;
strncpy( f_dir, psz_fname, pos + 1 ); strncpy( f_dir, psz_fname, pos + 1 );
f_dir[pos + 1] = 0; f_dir[pos + 1] = 0;
} }
else else
{ {
strcpy( f_fname, psz_fname ); strcpy( f_fname, psz_fname );
strcpy( f_dir, "" ); strcpy( f_dir, "" );
} }
strcpy_strip_ext( f_fname_noext, f_fname ); strcpy_strip_ext( f_fname_noext, f_fname );
strcpy_trim( f_fname_trim, f_fname_noext ); strcpy_trim( f_fname_trim, f_fname_noext );
var_Get( p_this, "sub-autodetect-fuzzy", &fuzzy ); var_Get( p_this, "sub-autodetect-fuzzy", &fuzzy );
for( j = 0; j <= 1; j++) for( j = 0; j <= 1; j++)
{ {
d = opendir( j == 0 ? f_dir : psz_path ); d = opendir( j == 0 ? f_dir : psz_path );
if( d ) if( d )
{ {
int b_found; int b_found;
while( ( de = readdir( d ) ) ) while( ( de = readdir( d ) ) )
{ {
/* retrieve various parts of the filename */ /* retrieve various parts of the filename */
strcpy_strip_ext( tmp_fname_noext, de->d_name ); strcpy_strip_ext( tmp_fname_noext, de->d_name );
strcpy_get_ext( tmp_fname_ext, de->d_name ); strcpy_get_ext( tmp_fname_ext, de->d_name );
strcpy_trim( tmp_fname_trim, tmp_fname_noext ); strcpy_trim( tmp_fname_trim, tmp_fname_noext );
/* does it end with a subtitle extension? */ /* does it end with a subtitle extension? */
b_found = 0; b_found = 0;
for( i = 0; sub_exts[i]; i++ ) for( i = 0; sub_exts[i]; i++ )
{ {
if( strcmp(sub_exts[i], tmp_fname_ext ) == 0 ) if( strcmp(sub_exts[i], tmp_fname_ext ) == 0 )
{ {
b_found = 1; b_found = 1;
msg_Dbg( p_this, "found a possible subtitle: %s", de->d_name ); msg_Dbg( p_this, "found a possible subtitle: %s", de->d_name );
break; break;
} }
} }
/* we have a (likely) subtitle file */ /* we have a (likely) subtitle file */
if( b_found ) if( b_found )
{ {
int i_prio = 0; int i_prio = 0;
if( !i_prio && strcmp( tmp_fname_trim, f_fname_trim ) == 0 ) if( !i_prio && strcmp( tmp_fname_trim, f_fname_trim ) == 0 )
{ {
/* matches the movie name exactly */ /* matches the movie name exactly */
i_prio = 4; i_prio = 4;
} }
if( !i_prio && ( tmp = strstr( tmp_fname_trim, f_fname_trim ) ) ) if( !i_prio && ( tmp = strstr( tmp_fname_trim, f_fname_trim ) ) )
{ {
/* contains the movie name */ /* contains the movie name */
tmp += strlen( f_fname_trim ); tmp += strlen( f_fname_trim );
if( whiteonly( tmp ) ) if( whiteonly( tmp ) )
{ {
...@@ -264,33 +268,33 @@ char** subtitles_Detect( input_thread_t *p_this, char *psz_path, char *psz_fname ...@@ -264,33 +268,33 @@ char** subtitles_Detect( input_thread_t *p_this, char *psz_path, char *psz_fname
/* chars after (and possibly in front of) the movie name */ /* chars after (and possibly in front of) the movie name */
i_prio = 3; i_prio = 3;
} }
} }
if( !i_prio ) if( !i_prio )
{ {
/* doesn't contain the movie name */ /* doesn't contain the movie name */
if( j == 0 ) i_prio = 1; if( j == 0 ) i_prio = 1;
} }
if( i_prio >= fuzzy.i_int ) if( i_prio >= fuzzy.i_int )
{ {
sprintf( tmpresult, "%s%s", j == 0 ? f_dir : psz_path, de->d_name ); sprintf( tmpresult, "%s%s", j == 0 ? f_dir : psz_path, de->d_name );
msg_Dbg( p_this, "autodetected subtitle: %s with priority %d", de->d_name, i_prio ); msg_Dbg( p_this, "autodetected subtitle: %s with priority %d", de->d_name, i_prio );
if( ( f = fopen( tmpresult, "rt" ) ) ) if( ( f = fopen( tmpresult, "rt" ) ) )
{ {
fclose( f ); fclose( f );
result[i_sub_count].priority = i_prio; result[i_sub_count].priority = i_prio;
result[i_sub_count].psz_fname = strdup( tmpresult ); result[i_sub_count].psz_fname = strdup( tmpresult );
i_sub_count++; i_sub_count++;
} }
} }
} }
if( i_sub_count >= MAX_SUBTITLE_FILES ) break; if( i_sub_count >= MAX_SUBTITLE_FILES ) break;
} }
closedir( d ); closedir( d );
} }
} }
free( f_dir ); free( f_dir );
free( f_fname ); free( f_fname );
free( f_fname_noext ); free( f_fname_noext );
...@@ -309,7 +313,7 @@ char** subtitles_Detect( input_thread_t *p_this, char *psz_path, char *psz_fname ...@@ -309,7 +313,7 @@ char** subtitles_Detect( input_thread_t *p_this, char *psz_path, char *psz_fname
for( i = 0; i < i_sub_count; i++ ) for( i = 0; i < i_sub_count; i++ )
{ {
result2[i] = result[i].psz_fname; result2[i] = result[i].psz_fname;
} }
result2[i_sub_count] = NULL; result2[i_sub_count] = NULL;
free( result ); free( result );
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
* intf_eject.c: CD/DVD-ROM ejection handling functions * intf_eject.c: CD/DVD-ROM ejection handling functions
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: intf_eject.c,v 1.21 2003/09/18 17:54:02 zorglub Exp $ * $Id: intf_eject.c,v 1.22 2003/12/22 14:32:56 sam Exp $
* *
* Author: Julien Blache <jb@technologeek.org> for the Linux part * Authors: Julien Blache <jb@technologeek.org> for the Linux part
* with code taken from the Linux "eject" command * with code taken from the Linux "eject" command
* Jon Lech Johansen <jon-vl@nanocrew.net> for Darwin * Jon Lech Johansen <jon-vl@nanocrew.net> for Darwin
* Gildas Bazin <gbazin@netcourrier.com> for Win32 * Gildas Bazin <gbazin@netcourrier.com> for Win32
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -110,7 +110,7 @@ int __intf_Eject( vlc_object_t *p_this, const char *psz_device ) ...@@ -110,7 +110,7 @@ int __intf_Eject( vlc_object_t *p_this, const char *psz_device )
* The only way to cleanly unmount the disc under MacOS X * The only way to cleanly unmount the disc under MacOS X
* is to use the 'disktool' command line utility. It uses * is to use the 'disktool' command line utility. It uses
* the non-public Disk Arbitration API, which can not be * the non-public Disk Arbitration API, which can not be
* used by Cocoa or Carbon applications. * used by Cocoa or Carbon applications.
*/ */
if( ( psz_disk = (char *)strstr( psz_device, "disk" ) ) != NULL && if( ( psz_disk = (char *)strstr( psz_device, "disk" ) ) != NULL &&
...@@ -165,13 +165,13 @@ int __intf_Eject( vlc_object_t *p_this, const char *psz_device ) ...@@ -165,13 +165,13 @@ int __intf_Eject( vlc_object_t *p_this, const char *psz_device )
i_flags = MCI_OPEN_TYPE | MCI_OPEN_TYPE_ID | i_flags = MCI_OPEN_TYPE | MCI_OPEN_TYPE_ID |
MCI_OPEN_ELEMENT | MCI_OPEN_SHAREABLE; MCI_OPEN_ELEMENT | MCI_OPEN_SHAREABLE;
if( !mciSendCommand( 0, MCI_OPEN, i_flags, (unsigned long)&op ) ) if( !mciSendCommand( 0, MCI_OPEN, i_flags, (unsigned long)&op ) )
{ {
st.dwItem = MCI_STATUS_READY; st.dwItem = MCI_STATUS_READY;
/* Eject disc */ /* Eject disc */
i_ret = mciSendCommand( op.wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN, 0 ); i_ret = mciSendCommand( op.wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN, 0 );
/* Release access to the device */ /* Release access to the device */
mciSendCommand( op.wDeviceID, MCI_CLOSE, MCI_WAIT, 0 ); mciSendCommand( op.wDeviceID, MCI_CLOSE, MCI_WAIT, 0 );
} }
else i_ret = VLC_EGENERIC; else i_ret = VLC_EGENERIC;
...@@ -183,7 +183,7 @@ int __intf_Eject( vlc_object_t *p_this, const char *psz_device ) ...@@ -183,7 +183,7 @@ int __intf_Eject( vlc_object_t *p_this, const char *psz_device )
/* This code could be extended to support CD/DVD-ROM chargers */ /* This code could be extended to support CD/DVD-ROM chargers */
i_fd = open( psz_device, O_RDONLY | O_NONBLOCK ); i_fd = open( psz_device, O_RDONLY | O_NONBLOCK );
if( i_fd == -1 ) if( i_fd == -1 )
{ {
msg_Err( p_this, "could not open device %s", psz_device ); msg_Err( p_this, "could not open device %s", psz_device );
...@@ -269,7 +269,7 @@ static int EjectSCSI( int i_fd ) ...@@ -269,7 +269,7 @@ static int EjectSCSI( int i_fd )
{ {
return VLC_EGENERIC; return VLC_EGENERIC;
} }
scsi_cmd.inlen = 0; scsi_cmd.inlen = 0;
scsi_cmd.outlen = 0; scsi_cmd.outlen = 0;
scsi_cmd.cmd[0] = START_STOP; scsi_cmd.cmd[0] = START_STOP;
...@@ -283,10 +283,10 @@ static int EjectSCSI( int i_fd ) ...@@ -283,10 +283,10 @@ static int EjectSCSI( int i_fd )
{ {
return VLC_EGENERIC; return VLC_EGENERIC;
} }
/* Force kernel to reread partition table when new disc inserted */ /* Force kernel to reread partition table when new disc inserted */
i_status = ioctl( i_fd, BLKRRPART ); i_status = ioctl( i_fd, BLKRRPART );
return i_status; return i_status;
} }
#endif #endif
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* encoding. * encoding.
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: charset.c,v 1.4 2003/10/11 21:08:40 hartman Exp $ * $Id: charset.c,v 1.5 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Derk-Jan Hartman <thedj at users.sf.net> * Author: Derk-Jan Hartman <thedj at users.sf.net>
* *
* vlc_current_charset() an adaption of mp_locale_charset(): * vlc_current_charset() an adaption of mp_locale_charset():
* *
...@@ -52,12 +52,12 @@ typedef struct VLCCharsetAlias ...@@ -52,12 +52,12 @@ typedef struct VLCCharsetAlias
/* /*
* The libcharset load all from external text file, but it's strange and * The libcharset load all from external text file, but it's strange and
* slow solution, we rather use array(s) compiled into source. In the * slow solution, we rather use array(s) compiled into source. In the
* "good" libc this is not needful -- for example in linux. * "good" libc this is not needful -- for example in linux.
* *
* Please, put to this funtion exotic aliases only. The libc 'iconv' knows * Please, put to this funtion exotic aliases only. The libc 'iconv' knows
* a lot of basic aliases (check it first by iconv -l). * a lot of basic aliases (check it first by iconv -l).
* *
*/ */
static const char* vlc_encoding_from_language( const char *l ) static const char* vlc_encoding_from_language( const char *l )
...@@ -72,8 +72,8 @@ static const char* vlc_encoding_from_language( const char *l ) ...@@ -72,8 +72,8 @@ static const char* vlc_encoding_from_language( const char *l )
if (strstr(l, "ru")) return "KOI8-R"; if (strstr(l, "ru")) return "KOI8-R";
if (strstr(l, "uk")) return "KOI8-U"; if (strstr(l, "uk")) return "KOI8-U";
if (strstr(l, "pl") || strstr(l, "hr") || if (strstr(l, "pl") || strstr(l, "hr") ||
strstr(l, "hu") || strstr(l, "cs") || strstr(l, "hu") || strstr(l, "cs") ||
strstr(l, "sk") || strstr(l, "sl")) return "ISO-8859-2"; strstr(l, "sk") || strstr(l, "sl")) return "ISO-8859-2";
if (strstr(l, "eo") || strstr(l, "mt")) return "ISO-8859-3"; if (strstr(l, "eo") || strstr(l, "mt")) return "ISO-8859-3";
if (strstr(l, "lt") || strstr(l, "la")) return "ISO-8859-4"; if (strstr(l, "lt") || strstr(l, "la")) return "ISO-8859-4";
if (strstr(l, "bg") || strstr(l, "be") || if (strstr(l, "bg") || strstr(l, "be") ||
...@@ -95,82 +95,82 @@ static const char* vlc_encoding_from_language( const char *l ) ...@@ -95,82 +95,82 @@ static const char* vlc_encoding_from_language( const char *l )
static const char* vlc_charset_aliases( const char *psz_name ) static const char* vlc_charset_aliases( const char *psz_name )
{ {
VLCCharsetAlias *a; VLCCharsetAlias *a;
#if defined WIN32 #if defined WIN32
VLCCharsetAlias aliases[] = VLCCharsetAlias aliases[] =
{ {
{ "CP936", "GBK" }, { "CP936", "GBK" },
{ "CP1361", "JOHAB" }, { "CP1361", "JOHAB" },
{ "CP20127", "ASCII" }, { "CP20127", "ASCII" },
{ "CP20866", "KOI8-R" }, { "CP20866", "KOI8-R" },
{ "CP21866", "KOI8-RU" }, { "CP21866", "KOI8-RU" },
{ "CP28591", "ISO-8859-1" }, { "CP28591", "ISO-8859-1" },
{ "CP28592", "ISO-8859-2" }, { "CP28592", "ISO-8859-2" },
{ "CP28593", "ISO-8859-3" }, { "CP28593", "ISO-8859-3" },
{ "CP28594", "ISO-8859-4" }, { "CP28594", "ISO-8859-4" },
{ "CP28595", "ISO-8859-5" }, { "CP28595", "ISO-8859-5" },
{ "CP28596", "ISO-8859-6" }, { "CP28596", "ISO-8859-6" },
{ "CP28597", "ISO-8859-7" }, { "CP28597", "ISO-8859-7" },
{ "CP28598", "ISO-8859-8" }, { "CP28598", "ISO-8859-8" },
{ "CP28599", "ISO-8859-9" }, { "CP28599", "ISO-8859-9" },
{ "CP28605", "ISO-8859-15" }, { "CP28605", "ISO-8859-15" },
{ NULL, NULL } { NULL, NULL }
}; };
#elif SYS_AIX #elif SYS_AIX
VLCCharsetAlias aliases[] = VLCCharsetAlias aliases[] =
{ {
{ "IBM-850", "CP850" }, { "IBM-850", "CP850" },
{ "IBM-856", "CP856" }, { "IBM-856", "CP856" },
{ "IBM-921", "ISO-8859-13" }, { "IBM-921", "ISO-8859-13" },
{ "IBM-922", "CP922" }, { "IBM-922", "CP922" },
{ "IBM-932", "CP932" }, { "IBM-932", "CP932" },
{ "IBM-943", "CP943" }, { "IBM-943", "CP943" },
{ "IBM-1046", "CP1046" }, { "IBM-1046", "CP1046" },
{ "IBM-1124", "CP1124" }, { "IBM-1124", "CP1124" },
{ "IBM-1129", "CP1129" }, { "IBM-1129", "CP1129" },
{ "IBM-1252", "CP1252" }, { "IBM-1252", "CP1252" },
{ "IBM-EUCCN", "GB2312" }, { "IBM-EUCCN", "GB2312" },
{ "IBM-EUCJP", "EUC-JP" }, { "IBM-EUCJP", "EUC-JP" },
{ "IBM-EUCKR", "EUC-KR" }, { "IBM-EUCKR", "EUC-KR" },
{ "IBM-EUCTW", "EUC-TW" }, { "IBM-EUCTW", "EUC-TW" },
{ NULL, NULL } { NULL, NULL }
}; };
#elif SYS_HPUX #elif SYS_HPUX
VLCCharsetAlias aliases[] = VLCCharsetAlias aliases[] =
{ {
{ "ROMAN8", "HP-ROMAN8" }, { "ROMAN8", "HP-ROMAN8" },
{ "ARABIC8", "HP-ARABIC8" }, { "ARABIC8", "HP-ARABIC8" },
{ "GREEK8", "HP-GREEK8" }, { "GREEK8", "HP-GREEK8" },
{ "HEBREW8", "HP-HEBREW8" }, { "HEBREW8", "HP-HEBREW8" },
{ "TURKISH8", "HP-TURKISH8" }, { "TURKISH8", "HP-TURKISH8" },
{ "KANA8", "HP-KANA8" }, { "KANA8", "HP-KANA8" },
{ "HP15CN", "GB2312" }, { "HP15CN", "GB2312" },
{ NULL, NULL } { NULL, NULL }
}; };
#elif SYS_IRIX #elif SYS_IRIX
VLCCharsetAlias aliases[] = VLCCharsetAlias aliases[] =
{ {
{ "EUCCN", "GB2312" }, { "EUCCN", "GB2312" },
{ NULL, NULL } { NULL, NULL }
}; };
#elif SYS_OSF #elif SYS_OSF
VLCCharsetAlias aliases[] = VLCCharsetAlias aliases[] =
{ {
{ "KSC5601", "CP949" }, { "KSC5601", "CP949" },
{ "SDECKANJI", "EUC-JP" }, { "SDECKANJI", "EUC-JP" },
{ "TACTIS", "TIS-620" }, { "TACTIS", "TIS-620" },
{ NULL, NULL } { NULL, NULL }
}; };
#elif SYS_SOLARIS #elif SYS_SOLARIS
VLCCharsetAlias aliases[] = VLCCharsetAlias aliases[] =
{ {
{ "646", "ASCII" }, { "646", "ASCII" },
{ "CNS11643", "EUC-TW" }, { "CNS11643", "EUC-TW" },
{ "5601", "EUC-KR" }, { "5601", "EUC-KR" },
{ "JOHAP92", "JOHAB" }, { "JOHAP92", "JOHAB" },
{ "PCK", "SHIFT_JIS" }, { "PCK", "SHIFT_JIS" },
{ "2533", "TIS-620" }, { "2533", "TIS-620" },
{ NULL, NULL } { NULL, NULL }
}; };
#elif SYS_BSD #elif SYS_BSD
...@@ -190,10 +190,9 @@ static const char* vlc_charset_aliases( const char *psz_name ) ...@@ -190,10 +190,9 @@ static const char* vlc_charset_aliases( const char *psz_name )
if (strcasecmp (a->psz_alias, psz_name) == 0) if (strcasecmp (a->psz_alias, psz_name) == 0)
return a->psz_name; return a->psz_name;
} }
/* we return original name beacuse iconv() probably will know /* we return original name beacuse iconv() probably will know
* something better about name if we don't know it :-) * something better about name if we don't know it :-) */
*/
return psz_name; return psz_name;
} }
...@@ -208,10 +207,10 @@ static char *vlc_encoding_from_locale( char *psz_locale ) ...@@ -208,10 +207,10 @@ static char *vlc_encoding_from_locale( char *psz_locale )
static char buf[2 + 10 + 1]; static char buf[2 + 10 + 1];
psz_dot++; psz_dot++;
/* Look for the possible @... trailer and remove it, if any. */ /* Look for the possible @... trailer and remove it, if any. */
psz_modifier = strchr( psz_dot, '@' ); psz_modifier = strchr( psz_dot, '@' );
if( psz_modifier == NULL ) if( psz_modifier == NULL )
return psz_dot; return psz_dot;
if( 0 < ( psz_modifier - psz_dot ) < sizeof( buf )) if( 0 < ( psz_modifier - psz_dot ) < sizeof( buf ))
...@@ -241,8 +240,7 @@ vlc_bool_t vlc_current_charset( char **psz_charset ) ...@@ -241,8 +240,7 @@ vlc_bool_t vlc_current_charset( char **psz_charset )
/* But most old systems don't have a complete set of locales. Some /* But most old systems don't have a complete set of locales. Some
* (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't * (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
* use setlocale here; it would return "C" when it doesn't support the * use setlocale here; it would return "C" when it doesn't support the
* locale name the user has set. Darwin's setlocale is broken. * locale name the user has set. Darwin's setlocale is broken. */
*/
# if HAVE_SETLOCALE && !SYS_DARWIN # if HAVE_SETLOCALE && !SYS_DARWIN
psz_locale = setlocale( LC_ALL, NULL ); psz_locale = setlocale( LC_ALL, NULL );
# endif # endif
...@@ -258,8 +256,7 @@ vlc_bool_t vlc_current_charset( char **psz_charset ) ...@@ -258,8 +256,7 @@ vlc_bool_t vlc_current_charset( char **psz_charset )
} }
/* On some old systems, one used to set locale = "iso8859_1". On others, /* On some old systems, one used to set locale = "iso8859_1". On others,
* you set it to "language_COUNTRY.charset". Darwin only has LANG :( * you set it to "language_COUNTRY.charset". Darwin only has LANG :( */
*/
psz_codeset = vlc_encoding_from_locale( (char *)psz_locale ); psz_codeset = vlc_encoding_from_locale( (char *)psz_locale );
# endif /* HAVE_LANGINFO_CODESET */ # endif /* HAVE_LANGINFO_CODESET */
...@@ -279,8 +276,7 @@ vlc_bool_t vlc_current_charset( char **psz_charset ) ...@@ -279,8 +276,7 @@ vlc_bool_t vlc_current_charset( char **psz_charset )
ULONG cplen; ULONG cplen;
/* Allow user to override the codeset, as set in the operating system, /* Allow user to override the codeset, as set in the operating system,
* with standard language environment variables. * with standard language environment variables. */
*/
psz_locale = getenv( "LC_ALL" ); psz_locale = getenv( "LC_ALL" );
if( psz_locale == NULL || psz_locale[0] == '\0' ) if( psz_locale == NULL || psz_locale[0] == '\0' )
{ {
...@@ -292,7 +288,7 @@ vlc_bool_t vlc_current_charset( char **psz_charset ) ...@@ -292,7 +288,7 @@ vlc_bool_t vlc_current_charset( char **psz_charset )
psz_codeset = vlc_encoding_from_locale( psz_locale ); psz_codeset = vlc_encoding_from_locale( psz_locale );
else else
{ {
/* OS/2 has a function returning the locale's codepage as a number. */ /* OS/2 has a function returning the locale's codepage as a number. */
if( DosQueryCp( sizeof( cp ), cp, &cplen ) ) if( DosQueryCp( sizeof( cp ), cp, &cplen ) )
psz_codeset = ""; psz_codeset = "";
else else
...@@ -303,30 +299,27 @@ vlc_bool_t vlc_current_charset( char **psz_charset ) ...@@ -303,30 +299,27 @@ vlc_bool_t vlc_current_charset( char **psz_charset )
} }
#endif #endif
if( psz_codeset == NULL ) if( psz_codeset == NULL )
/* The canonical name cannot be determined. */ /* The canonical name cannot be determined. */
psz_codeset = ""; psz_codeset = "";
else else
psz_codeset = vlc_charset_aliases( psz_codeset ); psz_codeset = vlc_charset_aliases( psz_codeset );
/* Don't return an empty string. GNU libc and GNU libiconv interpret /* Don't return an empty string. GNU libc and GNU libiconv interpret
* the empty string as denoting "the locale's character encoding", * the empty string as denoting "the locale's character encoding",
* thus GNU libiconv would call this function a second time. * thus GNU libiconv would call this function a second time. */
*/
if( psz_codeset[0] == '\0' ) if( psz_codeset[0] == '\0' )
{ {
/* /* Last possibility is 'CHARSET' enviroment variable */
* Last possibility is 'CHARSET' enviroment variable
*/
if( !( psz_codeset = getenv( "CHARSET" ) ) ) if( !( psz_codeset = getenv( "CHARSET" ) ) )
psz_codeset = "ISO-8859-1"; psz_codeset = "ISO-8859-1";
} }
if( psz_charset ) if( psz_charset )
*psz_charset = strdup((char *)psz_codeset); *psz_charset = strdup((char *)psz_codeset);
if (strcasecmp(psz_codeset, "UTF8")==0 || strcasecmp(psz_codeset, "UTF-8")==0) if( !strcasecmp(psz_codeset, "UTF8") || !strcasecmp(psz_codeset, "UTF-8") )
return VLC_TRUE; return VLC_TRUE;
return VLC_FALSE; return VLC_FALSE;
} }
/***************************************************************************** /*****************************************************************************
* darwin_specific.m: Darwin specific features * darwin_specific.m: Darwin specific features
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: darwin_specific.m,v 1.16 2003/11/10 00:49:48 hartman Exp $ * $Id: darwin_specific.m,v 1.17 2003/12/22 14:32:56 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Sam Hocevar <sam@zoy.org>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -54,7 +54,7 @@ static int FindLanguage( const char * psz_lang ) ...@@ -54,7 +54,7 @@ static int FindLanguage( const char * psz_lang )
"Brazillian Portuguese", "pt_BR", "Brazillian Portuguese", "pt_BR",
"Russian", "ru", "Russian", "ru",
"Swedish", "sv", "Swedish", "sv",
NULL NULL
}; };
for( ppsz_parser = ppsz_all ; ppsz_parser[0] ; ppsz_parser += 2 ) for( ppsz_parser = ppsz_all ; ppsz_parser[0] ; ppsz_parser += 2 )
...@@ -97,20 +97,20 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] ) ...@@ -97,20 +97,20 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] )
NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init];
/* Retrieve user's preferences. */ /* Retrieve user's preferences. */
NSUserDefaults * o_defs = [NSUserDefaults standardUserDefaults]; NSUserDefaults * o_defs = [NSUserDefaults standardUserDefaults];
NSArray * o_languages = [o_defs objectForKey:@"AppleLanguages"]; NSArray * o_languages = [o_defs objectForKey:@"AppleLanguages"];
NSEnumerator * o_enumerator = [o_languages objectEnumerator]; NSEnumerator * o_enumerator = [o_languages objectEnumerator];
NSString * o_lang; NSString * o_lang;
while ( (o_lang = [o_enumerator nextObject]) ) while ( (o_lang = [o_enumerator nextObject]) )
{ {
const char * psz_string = [o_lang lossyCString]; const char * psz_string = [o_lang lossyCString];
if ( FindLanguage( psz_string ) ) if ( FindLanguage( psz_string ) )
{ {
break; break;
} }
} }
[o_pool release]; [o_pool release];
} }
} }
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
* video_text.c : text manipulation functions * video_text.c : text manipulation functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: video_text.c,v 1.48 2003/12/09 19:15:03 yoann Exp $ * $Id: video_text.c,v 1.49 2003/12/22 14:32:57 sam Exp $
* *
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> * Author: Sigmund Augdal <sigmunau@idi.ntnu.no>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -33,24 +33,24 @@ ...@@ -33,24 +33,24 @@
* \param i_vmargin vertical margin in pixels * \param i_vmargin vertical margin in pixels
* \param i_duration Amount of time the text is to be shown. * \param i_duration Amount of time the text is to be shown.
*/ */
subpicture_t *vout_ShowTextRelative( vout_thread_t *p_vout, char *psz_string, subpicture_t *vout_ShowTextRelative( vout_thread_t *p_vout, char *psz_string,
text_style_t *p_style, int i_flags, text_style_t *p_style, int i_flags,
int i_hmargin, int i_vmargin, int i_hmargin, int i_vmargin,
mtime_t i_duration ) mtime_t i_duration )
{ {
subpicture_t *p_subpic = NULL; subpicture_t *p_subpic = NULL;
mtime_t i_now = mdate(); mtime_t i_now = mdate();
if ( p_vout->pf_add_string ) if ( p_vout->pf_add_string )
{ {
p_subpic = p_vout->pf_add_string( p_vout, psz_string, p_style, i_flags, p_subpic = p_vout->pf_add_string( p_vout, psz_string, p_style, i_flags,
i_hmargin, i_vmargin, i_now, i_now + i_duration ); i_hmargin, i_vmargin, i_now, i_now + i_duration );
} }
else else
{ {
msg_Warn( p_vout, "No text renderer found" ); msg_Warn( p_vout, "No text renderer found" );
} }
return p_subpic; return p_subpic;
} }
...@@ -67,26 +67,26 @@ subpicture_t *vout_ShowTextRelative( vout_thread_t *p_vout, char *psz_string, ...@@ -67,26 +67,26 @@ subpicture_t *vout_ShowTextRelative( vout_thread_t *p_vout, char *psz_string,
* if this is 0 the string will be shown untill the next string * if this is 0 the string will be shown untill the next string
* is about to be shown * is about to be shown
*/ */
void vout_ShowTextAbsolute( vout_thread_t *p_vout, char *psz_string, void vout_ShowTextAbsolute( vout_thread_t *p_vout, char *psz_string,
text_style_t *p_style, int i_flags, text_style_t *p_style, int i_flags,
int i_hmargin, int i_vmargin, mtime_t i_start, int i_hmargin, int i_vmargin, mtime_t i_start,
mtime_t i_stop ) mtime_t i_stop )
{ {
if ( p_vout->pf_add_string ) if ( p_vout->pf_add_string )
{ {
p_vout->pf_add_string( p_vout, psz_string, p_style, i_flags, i_hmargin, p_vout->pf_add_string( p_vout, psz_string, p_style, i_flags, i_hmargin,
i_vmargin, i_start, i_stop ); i_vmargin, i_start, i_stop );
} }
else else
{ {
msg_Warn( p_vout, "No text renderer found" ); msg_Warn( p_vout, "No text renderer found" );
} }
} }
/** /**
* \brief Write an informative message at the default location, * \brief Write an informative message at the default location,
* for the default duration and only if the OSD option is enabled. * for the default duration and only if the OSD option is enabled.
* \param p_caller The object that called the function. * \param p_caller The object that called the function.
* \param psz_string The text to be shown * \param psz_string The text to be shown
**/ **/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment