Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
5ca0ebcc
Commit
5ca0ebcc
authored
Dec 22, 2003
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Coding style cleanup: removed tabs and trailing spaces.
parent
973409ad
Changes
45
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
45 changed files
with
1152 additions
and
1156 deletions
+1152
-1156
modules/access/cdda/access.c
modules/access/cdda/access.c
+164
-164
modules/access/cdda/cdda.h
modules/access/cdda/cdda.h
+6
-6
modules/access/dvb/qpsk.c
modules/access/dvb/qpsk.c
+2
-2
modules/access/dvd/access.c
modules/access/dvd/access.c
+6
-6
modules/access/v4l/videodev_mjpeg.h
modules/access/v4l/videodev_mjpeg.h
+8
-8
modules/access/vcdx/access.c
modules/access/vcdx/access.c
+259
-259
modules/access/vcdx/intf.c
modules/access/vcdx/intf.c
+133
-133
modules/access/vcdx/intf.h
modules/access/vcdx/intf.h
+7
-7
modules/audio_filter/resampler/linear.c
modules/audio_filter/resampler/linear.c
+21
-21
modules/audio_output/oss.c
modules/audio_output/oss.c
+4
-4
modules/audio_output/sdl.c
modules/audio_output/sdl.c
+3
-3
modules/codec/a52.c
modules/codec/a52.c
+2
-2
modules/codec/dts.c
modules/codec/dts.c
+3
-3
modules/codec/libmpeg2.c
modules/codec/libmpeg2.c
+15
-15
modules/codec/ogt/ogt.h
modules/codec/ogt/ogt.h
+39
-39
modules/control/lirc/lirc.c
modules/control/lirc/lirc.c
+16
-16
modules/control/rc/rc.c
modules/control/rc/rc.c
+6
-6
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+6
-5
modules/demux/mpeg/ps.c
modules/demux/mpeg/ps.c
+7
-7
modules/demux/mpeg/system.c
modules/demux/mpeg/system.c
+8
-8
modules/demux/ogg.c
modules/demux/ogg.c
+4
-4
modules/gui/gtk/gtk_callbacks.c
modules/gui/gtk/gtk_callbacks.c
+10
-12
modules/gui/gtk/menu.c
modules/gui/gtk/menu.c
+14
-14
modules/gui/gtk/open.c
modules/gui/gtk/open.c
+54
-54
modules/gui/gtk/playlist.c
modules/gui/gtk/playlist.c
+2
-2
modules/gui/macosx/intf.h
modules/gui/macosx/intf.h
+10
-10
modules/gui/macosx/prefs.m
modules/gui/macosx/prefs.m
+3
-3
modules/gui/ncurses/ncurses.c
modules/gui/ncurses/ncurses.c
+10
-10
modules/gui/pda/pda.c
modules/gui/pda/pda.c
+5
-5
modules/gui/skins/x11/x11_api.cpp
modules/gui/skins/x11/x11_api.cpp
+9
-9
modules/misc/memcpy/memcpyaltivec.c
modules/misc/memcpy/memcpyaltivec.c
+4
-4
modules/stream_out/duplicate.c
modules/stream_out/duplicate.c
+3
-3
modules/stream_out/transrate/getvlc.h
modules/stream_out/transrate/getvlc.h
+4
-4
modules/video_chroma/i420_rgb.c
modules/video_chroma/i420_rgb.c
+6
-6
modules/video_filter/deinterlace/deinterlace.c
modules/video_filter/deinterlace/deinterlace.c
+4
-4
modules/video_output/qte/qte.cpp
modules/video_output/qte/qte.cpp
+14
-14
modules/video_output/x11/xcommon.c
modules/video_output/x11/xcommon.c
+9
-9
modules/visualization/visual/fft.c
modules/visualization/visual/fft.c
+52
-52
src/input/demux.c
src/input/demux.c
+4
-4
src/input/input_ext-intf.c
src/input/input_ext-intf.c
+3
-3
src/input/subtitles.c
src/input/subtitles.c
+97
-93
src/interface/intf_eject.c
src/interface/intf_eject.c
+14
-14
src/misc/charset.c
src/misc/charset.c
+74
-81
src/misc/darwin_specific.m
src/misc/darwin_specific.m
+10
-10
src/video_output/video_text.c
src/video_output/video_text.c
+18
-18
No files found.
modules/access/cdda/access.c
View file @
5ca0ebcc
This diff is collapsed.
Click to expand it.
modules/access/cdda/cdda.h
View file @
5ca0ebcc
...
...
@@ -3,9 +3,9 @@
* using libcdio, libvcd and libvcdinfo
*****************************************************************************
* 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 $
*
* Author
s: Rocky Bernstein <rocky@panix.com>
* Author
: Rocky Bernstein <rocky@panix.com>
*
* 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
...
...
@@ -29,7 +29,7 @@
#endif
/*****************************************************************************
* Debugging
* Debugging
*****************************************************************************/
#define INPUT_DBG_META 1
/* Meta information */
#define INPUT_DBG_EVENT 2
/* Trace keyboard events */
...
...
@@ -47,7 +47,7 @@
if (p_cdda->i_debug & mask) \
msg_Dbg(p_input, "%s: "s, __func__ , ##args)
#else
#define dbg_print(mask, s, args...)
#define dbg_print(mask, s, args...)
#endif
/*****************************************************************************
...
...
@@ -70,8 +70,8 @@ typedef struct cdda_data_s
struct
{
bool
have_info
;
/* True if we have any info */
cddb_disc_t
*
disc
;
/* libcdio uses this to get disc info */
int
disc_length
;
/* Length in frames of cd. Used in
CDDB lookups */
int
disc_length
;
/* Length in frames of cd. Used in
CDDB lookups */
}
cddb
;
#endif
...
...
modules/access/dvb/qpsk.c
View file @
5ca0ebcc
...
...
@@ -3,7 +3,7 @@
*****************************************************************************
* Copyright (C) 2003 VideoLAN
*
* Authors: Sam
uel
Hocevar <sam@zoy.org>
* Authors: Sam Hocevar <sam@zoy.org>
* Jean-Paul Saman <jpsaman@wxs.nl>
* Christopher Ross <chris@tebibyte.org>
*
...
...
@@ -71,7 +71,7 @@ void E_(Close) ( vlc_object_t * );
#define LNB_SLOF_TEXT N_("antenna lnb_slof (kHz)")
#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")
/* Cable */
...
...
modules/access/dvd/access.c
View file @
5ca0ebcc
...
...
@@ -8,7 +8,7 @@
* -udf.* to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: access.c,v 1.1
4 2003/10/25 00:49:13
sam Exp $
* $Id: access.c,v 1.1
5 2003/12/22 14:32:55
sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
...
...
@@ -502,11 +502,11 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
val
.
i_int
=
p_area
->
i_id
;
var_Change
(
p_input
,
"title"
,
VLC_VAR_SETVALUE
,
&
val
,
NULL
);
var_Change
(
p_input
,
"chapter"
,
VLC_VAR_CLEARCHOICES
,
NULL
,
NULL
);
for
(
i
=
1
;
i
<=
p_area
->
i_part_nb
;
i
++
)
{
val
.
i_int
=
i
;
var_Change
(
p_input
,
"chapter"
,
VLC_VAR_ADDCHOICE
,
&
val
,
NULL
);
}
for
(
i
=
1
;
i
<=
p_area
->
i_part_nb
;
i
++
)
{
val
.
i_int
=
i
;
var_Change
(
p_input
,
"chapter"
,
VLC_VAR_ADDCHOICE
,
&
val
,
NULL
);
}
}
/* i_title >= 0 */
else
...
...
modules/access/v4l/videodev_mjpeg.h
View file @
5ca0ebcc
...
...
@@ -2,7 +2,7 @@
* Copyright (C) lavrec (see http://mjpeg.sourceforge.net)
* ( 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
* it under the terms of the GNU General Public License as published by
...
...
@@ -93,16 +93,16 @@ struct mjpeg_params
#define JPEG_MARKER_COM (1<<6)
/* Comment segment */
#define JPEG_MARKER_APP (1<<7)
/* App segment, driver will allways use APP0 */
int
VFIFO_FB
;
/* Flag for enabling Video Fifo Feedback.
If this flag is turned on and JPEG decompressing
is going to the screen, the decompress process
is stopped every time the Video Fifo is full.
This enables a smooth decompress to the screen
but the video output signal will get scrambled */
int
VFIFO_FB
;
/* Flag for enabling Video Fifo Feedback.
If this flag is turned on and JPEG decompressing
is going to the screen, the decompress process
is stopped every time the Video Fifo is full.
This enables a smooth decompress to the screen
but the video output signal will get scrambled */
/* Misc */
char
reserved
[
312
];
/* Makes 512 bytes for this structure */
char
reserved
[
312
];
/* Makes 512 bytes for this structure */
};
struct
mjpeg_requestbuffers
...
...
modules/access/vcdx/access.c
View file @
5ca0ebcc
This diff is collapsed.
Click to expand it.
modules/access/vcdx/intf.c
View file @
5ca0ebcc
This diff is collapsed.
Click to expand it.
modules/access/vcdx/intf.h
View file @
5ca0ebcc
...
...
@@ -2,7 +2,7 @@
* intf.h: send info to intf.
*****************************************************************************
* 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>
*
...
...
@@ -10,7 +10,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...
...
@@ -28,15 +28,15 @@ struct intf_sys_t
{
input_thread_t
*
p_input
;
thread_vcd_data_t
*
p_vcd
;
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 */
mtime_t
m_still_time
;
/* Time in microseconds remaining
to wait in still frame.
*/
mtime_t
m_still_time
;
/* Time in microseconds remaining
to wait in still frame.
*/
#if FINISHED
vcdplay_ctrl_t
control
;
#else
#else
int
control
;
#endif
vlc_bool_t
b_click
,
b_move
,
b_key_pressed
;
...
...
modules/audio_filter/resampler/linear.c
View file @
5ca0ebcc
...
...
@@ -2,7 +2,7 @@
* linear.c : linear interpolation resampler
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: linear.c,v 1.1
0 2003/03/04 03:27:40 gbazin
Exp $
* $Id: linear.c,v 1.1
1 2003/12/22 14:32:55 sam
Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Sigmund Augdal <sigmunau@idi.ntnu.no>
...
...
@@ -11,7 +11,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* 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,
if
(
p_aout
->
mixer
.
mixer
.
i_rate
==
p_filter
->
input
.
i_rate
)
{
if
(
p_filter
->
b_continuity
&&
p_in_buf
->
i_size
>=
p_in_buf
->
i_nb_bytes
+
sizeof
(
float
)
*
i_nb_channels
)
{
/* output the whole thing with the last sample from last time */
memmove
(
((
float
*
)(
p_in_buf
->
p_buffer
))
+
i_nb_channels
,
p_in_buf
->
p_buffer
,
p_in_buf
->
i_nb_bytes
);
memcpy
(
p_in_buf
->
p_buffer
,
p_prev_sample
,
i_nb_channels
*
sizeof
(
float
)
);
}
p_in_buf
->
i_size
>=
p_in_buf
->
i_nb_bytes
+
sizeof
(
float
)
*
i_nb_channels
)
{
/* output the whole thing with the last sample from last time */
memmove
(
((
float
*
)(
p_in_buf
->
p_buffer
))
+
i_nb_channels
,
p_in_buf
->
p_buffer
,
p_in_buf
->
i_nb_bytes
);
memcpy
(
p_in_buf
->
p_buffer
,
p_prev_sample
,
i_nb_channels
*
sizeof
(
float
)
);
}
p_filter
->
b_continuity
=
VLC_FALSE
;
return
;
}
...
...
@@ -158,7 +158,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
if
(
!
p_filter
->
b_continuity
)
{
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
);
}
else
...
...
@@ -169,12 +169,12 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
{
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_filter
->
p_sys
->
i_remainder
/
p_filter
->
output
.
i_rate
);
p_out
[
i_chan
]
+=
(
(
p_prev_sample
[
i_chan
]
-
p_in
[
i_chan
])
*
p_filter
->
p_sys
->
i_remainder
/
p_filter
->
output
.
i_rate
);
}
p_out
+=
i_nb_channels
;
i_out
++
;
i_out
++
;
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,
{
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_filter
->
p_sys
->
i_remainder
/
p_filter
->
output
.
i_rate
);
p_out
[
i_chan
]
+=
(
(
p_in
[
i_chan
]
-
p_in
[
i_chan
+
i_nb_channels
])
*
p_filter
->
p_sys
->
i_remainder
/
p_filter
->
output
.
i_rate
);
}
p_out
+=
i_nb_channels
;
i_out
++
;
i_out
++
;
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,
p_out_buf
->
start_date
=
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
);
}
...
...
modules/audio_output/oss.c
View file @
5ca0ebcc
...
...
@@ -2,10 +2,10 @@
* oss.c : OSS /dev/dsp module for vlc
*****************************************************************************
* Copyright (C) 2000-2002 VideoLAN
* $Id: oss.c,v 1.6
0 2003/05/15 22:27:37 massiot
Exp $
* $Id: oss.c,v 1.6
1 2003/12/22 14:32:55 sam
Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Sam
uel
Hocevar <sam@zoy.org>
* Sam Hocevar <sam@zoy.org>
* Christophe Massiot <massiot@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -55,7 +55,7 @@
/* Patches for ignorant OSS versions */
#ifndef AFMT_AC3
# define AFMT_AC3 0x00000400
/* Dolby Digital AC3 */
# define AFMT_AC3 0x00000400
/* Dolby Digital AC3 */
#endif
#ifndef AFMT_S16_NE
...
...
@@ -253,7 +253,7 @@ static void Probe( aout_instance_t * p_aout )
{
msg_Warn
(
p_aout
,
"s/pdif not supported by card"
);
}
}
}
var_AddCallback
(
p_aout
,
"audio-device"
,
aout_ChannelsRestart
,
NULL
);
...
...
modules/audio_output/sdl.c
View file @
5ca0ebcc
...
...
@@ -2,10 +2,10 @@
* sdl.c : SDL audio output plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2002 VideoLAN
* $Id: sdl.c,v 1.2
3 2003/10/25 00:49:13
sam Exp $
* $Id: sdl.c,v 1.2
4 2003/12/22 14:32:55
sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Sam
uel
Hocevar <sam@zoy.org>
* Sam Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org>
* Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -177,7 +177,7 @@ static int Open ( vlc_object_t *p_this )
var_Change
(
p_aout
,
"audio-device"
,
VLC_VAR_SETTEXT
,
&
text
,
NULL
);
val
.
i_int
=
(
obtained
.
channels
==
2
)
?
AOUT_VAR_STEREO
:
AOUT_VAR_MONO
;
AOUT_VAR_MONO
;
text
.
psz_string
=
(
obtained
.
channels
==
2
)
?
N_
(
"Stereo"
)
:
N_
(
"Mono"
);
var_Change
(
p_aout
,
"audio-device"
,
...
...
modules/codec/a52.c
View file @
5ca0ebcc
...
...
@@ -2,7 +2,7 @@
* a52.c: parse A/52 audio sync info and packetize the stream
*****************************************************************************
* Copyright (C) 2001-2002 VideoLAN
* $Id: a52.c,v 1.3
1 2003/11/22 23:39:14 fenrir
Exp $
* $Id: a52.c,v 1.3
2 2003/12/22 14:32:55 sam
Exp $
*
* Authors: Stphane Borel <stef@via.ecp.fr>
* Christophe Massiot <massiot@via.ecp.fr>
...
...
@@ -195,7 +195,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
}
if
(
p_sys
->
i_state
!=
STATE_SYNC
)
{
block_BytestreamFlush
(
&
p_sys
->
bytestream
);
block_BytestreamFlush
(
&
p_sys
->
bytestream
);
/* Need more data */
return
NULL
;
...
...
modules/codec/dts.c
View file @
5ca0ebcc
...
...
@@ -2,7 +2,7 @@
* dts.c: parse DTS audio sync info and packetize the stream
*****************************************************************************
* 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>
* Gildas Bazin <gbazin@netcourrier.com>
...
...
@@ -263,7 +263,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
{
msg_Dbg
(
p_dec
,
"emulated sync word "
"(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
;
block_SkipByte
(
&
p_sys
->
bytestream
);
break
;
...
...
@@ -546,7 +546,7 @@ static int SyncInfo( const byte_t * p_buf,
{
/* User defined */
*
pi_channels
=
0
;
*
pi_channels_conf
=
0
;
*
pi_channels_conf
=
0
;
}
else
{
...
...
modules/codec/libmpeg2.c
View file @
5ca0ebcc
...
...
@@ -2,7 +2,7 @@
* libmpeg2.c: mpeg2 video decoder module making use of libmpeg2.
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: libmpeg2.c,v 1.3
8 2003/12/10 23:27:34 gbazin
Exp $
* $Id: libmpeg2.c,v 1.3
9 2003/12/22 14:32:55 sam
Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Christophe Massiot <massiot@via.ecp.fr>
...
...
@@ -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
,
p_block
->
p_buffer
+
p_block
->
i_buffer
);
p_block
->
i_buffer
=
0
;
p_block
->
i_buffer
=
0
;
break
;
case
STATE_SEQUENCE
:
...
...
@@ -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 */
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
->
display_height
/
p_sys
->
p_info
->
sequence
->
pixel_height
;
...
...
@@ -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
);
if
(
(
p_pic
=
GetNewPicture
(
p_dec
,
buf
))
==
NULL
)
{
block_Release
(
p_block
);
return
NULL
;
}
{
block_Release
(
p_block
);
return
NULL
;
}
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 )
vout_SynchroNewPicture
(
p_sys
->
p_synchro
,
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
);
if
(
!
(
p_sys
->
b_slice_i
...
...
@@ -366,7 +366,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
&&
!
vout_SynchroChoose
(
p_sys
->
p_synchro
,
p_sys
->
p_info
->
current_picture
->
flags
&
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
);
p_sys
->
b_skip
=
1
;
...
...
@@ -380,10 +380,10 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
vout_SynchroDecode
(
p_sys
->
p_synchro
);
if
(
(
p_pic
=
GetNewPicture
(
p_dec
,
buf
))
==
NULL
)
{
block_Release
(
p_block
);
return
NULL
;
}
{
block_Release
(
p_block
);
return
NULL
;
}
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 )
p_sys
->
p_info
->
discard_fbuf
->
id
);
}
if
(
p_pic
)
return
p_pic
;
if
(
p_pic
)
return
p_pic
;
break
;
...
...
@@ -434,7 +434,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
msg_Warn
(
p_dec
,
"invalid picture encountered"
);
if
(
(
p_sys
->
p_info
->
current_picture
==
NULL
)
||
(
(
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
);
}
...
...
modules/codec/ogt/ogt.h
View file @
5ca0ebcc
...
...
@@ -2,18 +2,18 @@
* ogt.h : Overlay Graphics Text (SVCD subtitles) decoder thread interface
*****************************************************************************
* 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 $
*
* Author
s: Rocky Bernstein
* based on code from:
* Author
: Rocky Bernstein
* based on code from:
* Julio Sanchez Fernandez (http://subhandler.sourceforge.net)
* Sam
uel
Hocevar <sam@zoy.org>
* Sam Hocevar <sam@zoy.org>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...
...
@@ -27,7 +27,7 @@
#define DECODE_DBG_EXT 1
/* Calls from external routines */
#define DECODE_DBG_CALL 2
/* all calls */
#define DECODE_DBG_PACKET 4
/* packet assembly info */
#define DECODE_DBG_INFO 8
#define DECODE_DBG_INFO 8
#define DECODE_DEBUG 1
#if DECODE_DEBUG
...
...
@@ -35,16 +35,16 @@
if (p_sys && p_sys->i_debug & mask) \
msg_Dbg(p_dec, "%s: "s, __func__ , ##args)
#else
#define dbg_print(mask, s, args...)
#define dbg_print(mask, s, args...)
#endif
#define LOG_ERR(args...) msg_Err( p_input, args )
#define LOG_WARN(args...) msg_Warn( p_input, args )
#define GETINT16(p) ( (p[0] << 8) + p[1] ); p +=2;
#define GETINT32(p) ( (p[0] << 24) + (p[1] << 16) +
\
(p[2] << 8) + (p[3]) ) ; p += 4;
#define GETINT32(p) ( (p[0] << 24) + (p[1] << 16) +
\
(p[2] << 8) + (p[3]) ) ; p += 4;
typedef
enum
{
SUBTITLE_BLOCK_EMPTY
,
...
...
@@ -54,10 +54,10 @@ typedef enum {
/* Color and transparency of a pixel or a palette (CLUT) entry */
typedef
struct
ogt_yuvt_val_s
{
u
_
int8_t
y
;
u
_
int8_t
u
;
u
_
int8_t
v
;
u
_
int8_t
t
;
uint8_t
y
;
uint8_t
u
;
uint8_t
v
;
uint8_t
t
;
}
ogt_yuvt_val_t
;
struct
decoder_sys_t
...
...
@@ -65,49 +65,49 @@ struct decoder_sys_t
int
i_debug
;
/* debugging mask */
int
b_packetizer
;
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
;
packet_state_t
state
;
/* data-gathering state for this subtitle */
u
_int16_t
i_image
;
/* image number in the subtitle stream; 0 is the
first one. */
u
_int8_t
i_packet
;
/* packet number for above image number; 0 is the
first one. */
u
int16_t
i_image
;
/* image number in the subtitle stream; 0 is the
first one. */
u
int8_t
i_packet
;
/* packet number for above image number; 0 is the
first one. */
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 */
vout_thread_t
*
p_vout
;
/* Move into subpicture_sys_t? */
u
_int16_t
comp_image_offset
;
/* offset from subtitle_data to compressed
image data */
int
comp_image_length
;
/* size of the compressed image data */
u
int16_t
comp_image_offset
;
/* offset from subtitle_data to compressed
image data */
int
comp_image_length
;
/* size of the compressed image data */
int
first_field_offset
;
int
second_field_offset
;
int
metadata_offset
;
/* offset to data describing the image */
int
metadata_length
;
/* length of metadata */
int
metadata_offset
;
/* offset to data describing the image */
int
metadata_length
;
/* length of metadata */
int
subtitle_data_pos
;
/* where to write next chunk */
int
subtitle_data_length
;
/* goal for subtitle_data_pos while gathering,
length of used subtitle_data later */
int
subtitle_data_pos
;
/* where to write next chunk */
int
subtitle_data_length
;
/* goal for subtitle_data_pos while gathering,
length of used subtitle_data later */
u
_int32_t
i_duration
;
/* how long to display the image, 0 stands
for "until next subtitle" */
u
int32_t
i_duration
;
/* how long to display the image, 0 stands
for "until next subtitle" */
u
_int16_t
i_x_start
,
i_y_start
;
/* position of top leftmost pixel of
image when displayed */
u
_int16_t
i_width
,
i_height
;
/* dimensions in pixels of image */
u
int16_t
i_x_start
,
i_y_start
;
/* position of top leftmost pixel of
image when displayed */
u
int16_t
i_width
,
i_height
;
/* dimensions in pixels of image */
ogt_yuvt_val_t
pi_palette
[
4
];
u
_
int8_t
i_options
;
u
_
int8_t
i_options2
;
u
_
int8_t
i_cmd
;
u
_
int32_t
i_cmd_arg
;
uint8_t
i_options
;
uint8_t
i_options2
;
uint8_t
i_cmd
;
uint32_t
i_cmd_arg
;
};
struct
subpicture_sys_t
...
...
modules/control/lirc/lirc.c
View file @
5ca0ebcc
...
...
@@ -2,15 +2,15 @@
* lirc.c : lirc plugin for vlc
*****************************************************************************
* 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 $
*
* Author
s
: 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
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...
...
@@ -138,7 +138,7 @@ static void Run( intf_thread_t *p_intf )
playlist_t
*
p_playlist
;
input_thread_t
*
p_input
;
vout_thread_t
*
p_vout
=
NULL
;
while
(
!
p_intf
->
b_die
)
{
/* Sleep a bit */
...
...
@@ -182,11 +182,11 @@ static void Run( intf_thread_t *p_intf )
continue
;
}
while
(
!
p_intf
->
b_die
while
(
!
p_intf
->
b_die
&&
lirc_code2char
(
p_intf
->
p_sys
->
config
,
code
,
&
c
)
==
0
&&
c
!=
NULL
)
{
if
(
!
strcmp
(
c
,
"QUIT"
)
)
{
p_intf
->
p_vlc
->
b_die
=
VLC_TRUE
;
...
...
@@ -271,7 +271,7 @@ static void Run( intf_thread_t *p_intf )
continue
;
}
}
if
(
!
strcmp
(
c
,
"PLAY"
)
)
{
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
...
...
@@ -288,7 +288,7 @@ static void Run( intf_thread_t *p_intf )
}
continue
;
}
if
(
!
strcmp
(
c
,
"PLAYPAUSE"
)
)
{
if
(
p_input
&&
...
...
@@ -312,10 +312,10 @@ static void Run( intf_thread_t *p_intf )
vlc_object_release
(
p_playlist
);
}
}
}
}
continue
;
}
else
if
(
p_input
)
{
if
(
!
strcmp
(
c
,
"PAUSE"
)
)
...
...
@@ -362,11 +362,11 @@ static void Run( intf_thread_t *p_intf )
input_SetStatus
(
p_input
,
INPUT_STATUS_SLOWER
);
}
/* 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"
)
)
{
unsigned
int
i_chapter
=
0
;
if
(
!
strcmp
(
c
,
"CHAPTER_N"
)
)
{
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
...
...
@@ -379,7 +379,7 @@ static void Run( intf_thread_t *p_intf )
i_chapter
=
p_input
->
stream
.
p_selected_area
->
i_part
-
1
;
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
}
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
if
(
(
i_chapter
>
0
)
&&
(
i_chapter
<
p_input
->
stream
.
p_selected_area
->
i_part_nb
)
)
...
...
@@ -392,7 +392,7 @@ static void Run( intf_thread_t *p_intf )
vlc_mutex_lock
(
&
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 */
}
}
...
...
@@ -405,7 +405,7 @@ static void Feedback( intf_thread_t *p_intf, char *psz_string )
{
if
(
p_intf
->
p_sys
->
p_vout
)
{
vout_ShowTextRelative
(
p_intf
->
p_sys
->
p_vout
,
psz_string
,
NULL
,
OSD_ALIGN_TOP
|
OSD_ALIGN_RIGHT
,
30
,
20
,
400000
);
vout_ShowTextRelative
(
p_intf
->
p_sys
->
p_vout
,
psz_string
,
NULL
,
OSD_ALIGN_TOP
|
OSD_ALIGN_RIGHT
,
30
,
20
,
400000
);
}
}
modules/control/rc/rc.c
View file @
5ca0ebcc
...
...
@@ -2,15 +2,15 @@
* rc.c : remote control stdin/stdout plugin for vlc
*****************************************************************************
* 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 $
*
* Author
s
: 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
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...
...
@@ -201,7 +201,7 @@ static void Run( intf_thread_t *p_intf )
hConsoleIn
=
GetStdHandle
(
STD_INPUT_HANDLE
);
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
;
}
#endif
...
...
@@ -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
)
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
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
,
&
val
,
&
text
);
...
...
modules/demux/mp4/libmp4.c
View file @
5ca0ebcc
...
...
@@ -2,8 +2,9 @@
* libmp4.c : LibMP4 library for mp4 module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: libmp4.c,v 1.38 2003/12/15 22:55:01 gbazin Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* $Id: libmp4.c,v 1.39 2003/12/22 14:32:55 sam Exp $
*
* Author: Laurent Aimar <fenrir@via.ecp.fr>
*
* 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
...
...
@@ -985,7 +986,7 @@ static int MP4_ReadBox_esds( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
#ifdef MP4_VERBOSE
msg_Dbg
(
p_stream
->
p_input
,
"Found esds MPEG4ESDescr (%dBytes)"
,
i_len
);
i_len
);
#endif
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 )
#ifdef MP4_VERBOSE
msg_Dbg
(
p_stream
->
p_input
,
"Found esds MP4DecConfigDescr (%dBytes)"
,
i_len
);
i_len
);
#endif
es_descriptor
.
p_decConfigDescr
=
...
...
@@ -1056,7 +1057,7 @@ static int MP4_ReadBox_esds( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
#ifdef MP4_VERBOSE
msg_Dbg
(
p_stream
->
p_input
,
"Found esds MP4DecSpecificDescr (%dBytes)"
,
i_len
);
i_len
);
#endif
es_descriptor
.
p_decConfigDescr
->
i_decoder_specific_info_len
=
i_len
;
...
...
modules/demux/mpeg/ps.c
View file @
5ca0ebcc
...
...
@@ -2,15 +2,15 @@
* ps.c : Program Stream input module for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: ps.c,v 1.1
2 2003/10/27 18:57:12 rocky
Exp $
* $Id: ps.c,v 1.1
3 2003/12/22 14:32:56 sam
Exp $
*
* Author
s
: 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
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...
...
@@ -137,16 +137,16 @@ static int Activate( vlc_object_t * p_this )
return
-
1
;
}
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
]
;
if
(
p_input
->
stream
.
b_seekable
)
{
stream_ps_data_t
*
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. */
p_input
->
pf_seek
(
p_input
,
(
off_t
)
0
);
...
...
modules/demux/mpeg/system.c
View file @
5ca0ebcc
...
...
@@ -2,12 +2,12 @@
* system.c: helper module for TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: system.c,v 1.2
5 2003/12/07 01:02:08 rocky
Exp $
* $Id: system.c,v 1.2
6 2003/12/22 14:32:56 sam
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
* Benot Steiner <benny@via.ecp.fr>
* Sam
uel
Hocevar <sam@zoy.org>
* Sam Hocevar <sam@zoy.org>
* Henri Fallon <henri@via.ecp.fr>
*
* 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,
else
if
(
(
i_id
&
0xFFFF
)
==
0x70BD
)
{
/* SVCD OGT subtitles in stream 0x070 */
i_fourcc
=
VLC_FOURCC
(
'o'
,
'g'
,
't'
,
' '
);
i_fourcc
=
VLC_FOURCC
(
'o'
,
'g'
,
't'
,
' '
);
i_cat
=
SPU_ES
;
#ifdef FINISHED_DEBUGGING
if
(
!
p_input
->
stream
.
b_seekable
)
...
...
@@ -979,14 +979,14 @@ static es_descriptor_t * ParsePS( input_thread_t * p_input,
b_auto_spawn
=
VLC_TRUE
;
}
}
else
if
(
((
i_id
>>
8
)
&
0xFF
)
<=
0x03
&&
(
i_id
&
0x00FF
)
==
0x00BD
)
else
if
(
((
i_id
>>
8
)
&
0xFF
)
<=
0x03
&&
(
i_id
&
0x00FF
)
==
0x00BD
)
{
/* CVD subtitles (0x00->0x03) */
i_fourcc
=
VLC_FOURCC
(
'c'
,
'v'
,
'd'
,
' '
);
i_fourcc
=
VLC_FOURCC
(
'c'
,
'v'
,
'd'
,
' '
);
i_cat
=
SPU_ES
;
msg_Warn
(
p_input
,
"CVD subtitles not implemented yet"
);
msg_Warn
(
p_input
,
"CVD subtitles not implemented yet"
);
}
else
{
...
...
modules/demux/ogg.c
View file @
5ca0ebcc
...
...
@@ -2,9 +2,9 @@
* ogg.c : ogg stream input module for vlc
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: ogg.c,v 1.5
1 2003/12/16 12:38:18 gbazin
Exp $
* $Id: ogg.c,v 1.5
2 2003/12/22 14:32:55 sam
Exp $
*
* Author
s
: Gildas Bazin <gbazin@netcourrier.com>
* Author: Gildas Bazin <gbazin@netcourrier.com>
*
* 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
...
...
@@ -1235,8 +1235,8 @@ static int Demux( input_thread_t * p_input )
else
{
input_ClockManageRef
(
p_input
,
p_input
->
stream
.
p_selected_program
,
p_stream
->
i_pcr
);
p_input
->
stream
.
p_selected_program
,
p_stream
->
i_pcr
);
}
continue
;
}
...
...
modules/gui/gtk/gtk_callbacks.c
View file @
5ca0ebcc
...
...
@@ -2,9 +2,9 @@
* gtk_callbacks.c : Callbacks for the Gtk+ plugin.
*****************************************************************************
* Copyright (C) 2000, 2001, 2003 VideoLAN
* $Id: gtk_callbacks.c,v 1.1
5 2003/12/12 03:01:12 rocky
Exp $
* $Id: gtk_callbacks.c,v 1.1
6 2003/12/22 14:32:56 sam
Exp $
*
* Authors: Sam
uel
Hocevar <sam@zoy.org>
* Authors: Sam Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
* Julien BLACHE <jb@technologeek.org>
*
...
...
@@ -48,7 +48,7 @@
#ifdef HAVE_CDDAX
#define CDDA_MRL "cddax://"
#else
#else
#define CDDA_MRL "cdda://"
#endif
...
...
@@ -461,7 +461,7 @@ gboolean GtkDiscEject ( GtkWidget *widget, gpointer user_data )
{
if
(
!
strncmp
(
psz_current
,
"dvd://"
,
4
)
)
{
switch
(
psz_current
[
strlen
(
"dvd://"
)]
)
switch
(
psz_current
[
strlen
(
"dvd://"
)]
)
{
case
'\0'
:
case
'@'
:
...
...
@@ -469,13 +469,13 @@ gboolean GtkDiscEject ( GtkWidget *widget, gpointer user_data )
break
;
default:
/* Omit the first MRL-selector characters */
psz_device
=
strdup
(
psz_current
+
strlen
(
"dvd://"
)
);
psz_device
=
strdup
(
psz_current
+
strlen
(
"dvd://"
)
);
break
;
}
}
else
if
(
!
strncmp
(
psz_current
,
"vcd:"
,
strlen
(
"vcd:"
))
)
{
switch
(
psz_current
[
strlen
(
"vcd:"
)]
)
switch
(
psz_current
[
strlen
(
"vcd:"
)]
)
{
case
'\0'
:
case
'@'
:
...
...
@@ -483,13 +483,13 @@ gboolean GtkDiscEject ( GtkWidget *widget, gpointer user_data )
break
;
default:
/* Omit the beginning MRL-selector characters */
psz_device
=
strdup
(
psz_current
+
strlen
(
VCD_MRL
)
);
psz_device
=
strdup
(
psz_current
+
strlen
(
VCD_MRL
)
);
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
'@'
:
...
...
@@ -497,7 +497,7 @@ gboolean GtkDiscEject ( GtkWidget *widget, gpointer user_data )
break
;
default:
/* Omit the beginning MRL-selector characters */
psz_device
=
strdup
(
psz_current
+
strlen
(
CDDA_MRL
)
);
psz_device
=
strdup
(
psz_current
+
strlen
(
CDDA_MRL
)
);
break
;
}
}
...
...
@@ -636,8 +636,6 @@ GtkMenubarDeinterlace ( GtkMenuItem *menuitem,
if
(
p_intf
)
msg_Dbg
(
p_intf
,
"GtkMenubarDeinterlace"
);
}
...
...
modules/gui/gtk/menu.c
View file @
5ca0ebcc
...
...
@@ -2,9 +2,9 @@
* menu.c : functions to handle menu items.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: menu.c,v 1.1
2 2003/11/24 00:39:01 fenrir
Exp $
* $Id: menu.c,v 1.1
3 2003/12/22 14:32:56 sam
Exp $
*
* Authors: Sam
uel
Hocevar <sam@zoy.org>
* Authors: Sam Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
* Johan Bilien <jobi@via.ecp.fr>
* Laurent Aimar <fenrir@via.ecp.fr>
...
...
@@ -411,19 +411,19 @@ static void GtkDeinterlaceUpdate( intf_thread_t *p_intf, char *psz_mode )
if
(
strcmp
(
psz_mode
,
"None"
)
)
{
vout_thread_t
*
p_vout
;
p_vout
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_VOUT
,
FIND_ANYWHERE
);
if
(
p_vout
)
{
vlc_value_t
val
;
val
.
psz_string
=
psz_mode
;
if
(
var_Set
(
p_vout
,
"deinterlace-mode"
,
val
)
!=
VLC_SUCCESS
)
p_vout
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_VOUT
,
FIND_ANYWHERE
);
if
(
p_vout
)
{
vlc_value_t
val
;
val
.
psz_string
=
psz_mode
;
if
(
var_Set
(
p_vout
,
"deinterlace-mode"
,
val
)
!=
VLC_SUCCESS
)
config_PutPsz
(
p_intf
,
"deinterlace-mode"
,
psz_mode
);
vlc_object_release
(
p_vout
);
}
else
vlc_object_release
(
p_vout
);
}
else
config_PutPsz
(
p_intf
,
"deinterlace-mode"
,
psz_mode
);
}
...
...
@@ -1167,7 +1167,7 @@ static gint GtkSetupVarMenu( intf_thread_t * p_intf,
break
;
default:
/* FIXME */
return
FALSE
;
return
FALSE
;
}
p_group
=
gtk_radio_menu_item_group
(
GTK_RADIO_MENU_ITEM
(
p_item
)
);
...
...
modules/gui/gtk/open.c
View file @
5ca0ebcc
...
...
@@ -2,9 +2,9 @@
* gtk_open.c : functions to handle file/disc/network open widgets.
*****************************************************************************
* Copyright (C) 2000, 2001, 2003 VideoLAN
* $Id: open.c,v 1.2
1 2003/12/13 00:53:50 rocky
Exp $
* $Id: open.c,v 1.2
2 2003/12/22 14:32:56 sam
Exp $
*
* Authors: Sam
uel
Hocevar <sam@zoy.org>
* Authors: Sam Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -48,7 +48,7 @@
#ifdef HAVE_CDDAX
#define CDDA_MRL "cddax://"
#else
#else
#define CDDA_MRL "cdda://"
#endif
...
...
@@ -153,26 +153,26 @@ void GtkDiscOpenDvd( GtkToggleButton * togglebutton, gpointer user_data )
intf_thread_t
*
p_intf
=
GtkGetIntf
(
togglebutton
);
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
),
"disc_name"
)
),
psz_device
);
free
(
psz_device
);
}
else
{
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
);
free
(
psz_device
);
}
else
{
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
);
}
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 )
intf_thread_t
*
p_intf
=
GtkGetIntf
(
togglebutton
);
char
*
psz_device
;
if
(
togglebutton
->
active
)
if
(
togglebutton
->
active
)
{
if
(
(
psz_device
=
config_GetPsz
(
p_intf
,
"vcd"
))
)
{
gtk_entry_set_text
(
if
(
(
psz_device
=
config_GetPsz
(
p_intf
,
"vcd"
))
)
{
gtk_entry_set_text
(
GTK_ENTRY
(
lookup_widget
(
GTK_WIDGET
(
togglebutton
),
"disc_name"
)
),
psz_device
);
free
(
psz_device
);
}
else
{
free
(
psz_device
);
}
else
{
gtk_entry_set_text
(
GTK_ENTRY
(
lookup_widget
(
GTK_WIDGET
(
togglebutton
),
"disc_name"
)
),
""
);
}
GtkDiscOpenChanged
(
(
GtkWidget
*
)
togglebutton
,
user_data
);
}
GtkDiscOpenChanged
(
(
GtkWidget
*
)
togglebutton
,
user_data
);
}
}
...
...
@@ -203,20 +203,20 @@ void GtkDiscOpenCDDA( GtkToggleButton * togglebutton, gpointer user_data )
intf_thread_t
*
p_intf
=
GtkGetIntf
(
togglebutton
);
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
(
lookup_widget
(
GTK_WIDGET
(
togglebutton
),
"disc_name"
)
),
psz_device
);
free
(
psz_device
);
}
else
{
}
else
{
gtk_entry_set_text
(
GTK_ENTRY
(
lookup_widget
(
GTK_WIDGET
(
togglebutton
),
"disc_name"
)
),
""
);
}
GtkDiscOpenChanged
(
(
GtkWidget
*
)
togglebutton
,
user_data
);
}
GtkDiscOpenChanged
(
(
GtkWidget
*
)
togglebutton
,
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_chapter_menu
=
VLC_TRUE
;
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
),
"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
),
"disc_dvd_use_menu"
)
)
->
active
;
...
...
@@ -246,45 +246,45 @@ static void GtkDiscOpenChanged( GtkWidget * button, gpointer user_data )
{
g_string_append
(
p_target
,
"dvdsimple://"
);
}
g_string_append
(
p_target
,
gtk_entry_get_text
(
GTK_ENTRY
(
lookup_widget
(
g_string_append
(
p_target
,
gtk_entry_get_text
(
GTK_ENTRY
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_name"
)
)
)
);
if
(
!
b_menus
)
{
g_string_sprintfa
(
p_target
,
"@%i:%i"
,
gtk_spin_button_get_value_as_int
(
if
(
!
b_menus
)
{
g_string_sprintfa
(
p_target
,
"@%i:%i"
,
gtk_spin_button_get_value_as_int
(
GTK_SPIN_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_title"
)
)
),
gtk_spin_button_get_value_as_int
(
GTK_SPIN_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_chapter"
)
)
)
);
}
}
}
else
if
(
GTK_TOGGLE_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_vcd"
)
)
->
active
)
{
int
i
=
gtk_spin_button_get_value_as_int
(
GTK_SPIN_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_title"
)
)
);
GTK_WIDGET
(
button
),
"disc_title"
)
)
);
#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
,
gtk_entry_get_text
(
GTK_ENTRY
(
lookup_widget
(
g_string_append
(
p_target
,
gtk_entry_get_text
(
GTK_ENTRY
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_name"
)
)
)
);
if
(
i
)
g_string_sprintfa
(
p_target
,
"@%c%d"
,
i_pbc
?
'P'
:
'E'
,
i
);
if
(
i
)
g_string_sprintfa
(
p_target
,
"@%c%d"
,
i_pbc
?
'P'
:
'E'
,
i
);
#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_sprintfa
(
p_target
,
"@%d"
,
i
);
#endif
/* HAVE_VCDX */
...
...
@@ -296,18 +296,18 @@ static void GtkDiscOpenChanged( GtkWidget * button, gpointer user_data )
{
int
i
=
gtk_spin_button_get_value_as_int
(
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
;
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_WIDGET
(
button
),
"disc_name"
)
)
)
);
#ifdef HAVE_CDDAX
if
(
i
)
g_string_sprintfa
(
p_target
,
"@T%i"
,
i
);
if
(
i
)
g_string_sprintfa
(
p_target
,
"@T%i"
,
i
);
#else
g_string_sprintfa
(
p_target
,
"@%i"
,
i
);
...
...
modules/gui/gtk/playlist.c
View file @
5ca0ebcc
...
...
@@ -2,7 +2,7 @@
* gtk_playlist.c : Interface for the playlist dialog
*****************************************************************************
* 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>
* Stphane Borel <stef@via.ecp.fr>
...
...
@@ -698,7 +698,7 @@ void GtkRebuildCList( GtkCList * p_clist, playlist_t * p_playlist )
mtime_t
dur
=
p_playlist
->
pp_items
[
i_dummy
]
->
i_duration
;
if
(
dur
!=
-
1
)
{
secstotimestr
(
psz_duration
,
dur
/
1000000
);
secstotimestr
(
psz_duration
,
dur
/
1000000
);
}
else
{
...
...
modules/gui/macosx/intf.h
View file @
5ca0ebcc
...
...
@@ -2,7 +2,7 @@
* intf.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: intf.h,v 1.5
2 2003/12/15 19:25:56 bigben
Exp $
* $Id: intf.h,v 1.5
3 2003/12/22 14:32:56 sam
Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
...
...
@@ -12,7 +12,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...
...
@@ -31,7 +31,7 @@
#include <Cocoa/Cocoa.h>
/*****************************************************************************
* VLCApplication interface
* VLCApplication interface
*****************************************************************************/
@interface
VLCApplication
:
NSApplication
{
...
...
@@ -87,7 +87,7 @@ struct intf_sys_t
};
/*****************************************************************************
* VLCMain interface
* VLCMain interface
*****************************************************************************/
@interface
VLCMain
:
NSObject
{
...
...
@@ -98,7 +98,7 @@ struct intf_sys_t
IBOutlet
id
o_timefield
;
/* time field */
IBOutlet
id
o_timeslider
;
/* time slider */
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_btn_prev
;
/* btn previous */
...
...
@@ -116,13 +116,13 @@ struct intf_sys_t
IBOutlet
id
o_controls
;
/* VLCControls */
IBOutlet
id
o_playlist
;
/* VLCPlaylist */
IBOutlet
id
o_info
;
/* VLCInfo */
IBOutlet
id
o_info
;
/* VLCInfo */
IBOutlet
id
o_messages
;
/* messages tv */
IBOutlet
id
o_msgs_panel
;
/* messages panel */
NSMutableArray
*
o_msg_arr
;
/* messages array */
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_err_msg
;
/* NSTextView */
...
...
@@ -130,8 +130,8 @@ struct intf_sys_t
IBOutlet
id
o_err_bug_lbl
;
IBOutlet
id
o_err_btn_msgs
;
/* Open Messages */
IBOutlet
id
o_err_btn_dismiss
;
IBOutlet
id
o_info_window
;
/* Info panel */
IBOutlet
id
o_info_window
;
/* Info panel */
/* main menu */
...
...
@@ -213,7 +213,7 @@ struct intf_sys_t
IBOutlet
id
o_mi_info
;
IBOutlet
id
o_mi_messages
;
IBOutlet
id
o_mi_bring_atf
;
IBOutlet
id
o_mu_help
;
IBOutlet
id
o_mi_readme
;
IBOutlet
id
o_mi_documentation
;
...
...
modules/gui/macosx/prefs.m
View file @
5ca0ebcc
...
...
@@ -2,10 +2,10 @@
* prefs.m: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: prefs.m,v 1.3
5 2003/11/11 23:50:41 hartman
Exp $
* $Id: prefs.m,v 1.3
6 2003/12/22 14:32:56 sam
Exp $
*
* Authors:
Jon Lech Johansen <jon-vl@nanocrew.net>
*
Derk-Jan Hartman <thedj at users.sf.net>
* Authors:
Jon Lech Johansen <jon-vl@nanocrew.net>
*
Derk-Jan Hartman <thedj at users.sf.net>
*
* 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
...
...
modules/gui/ncurses/ncurses.c
View file @
5ca0ebcc
...
...
@@ -2,9 +2,9 @@
* ncurses.c : NCurses plugin for vlc
*****************************************************************************
* 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: Sam
uel
Hocevar <sam@zoy.org>
* Authors: Sam Hocevar <sam@zoy.org>
*
* 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
...
...
@@ -38,7 +38,7 @@
#ifdef HAVE_CDDAX
#define CDDA_MRL "cddax://"
#else
#else
#define CDDA_MRL "cdda://"
#endif
...
...
@@ -403,7 +403,7 @@ static void Eject ( intf_thread_t *p_intf )
{
if
(
!
strncmp
(
psz_name
,
"dvd://"
,
4
)
)
{
switch
(
psz_name
[
strlen
(
"dvd://"
)]
)
switch
(
psz_name
[
strlen
(
"dvd://"
)]
)
{
case
'\0'
:
case
'@'
:
...
...
@@ -411,13 +411,13 @@ static void Eject ( intf_thread_t *p_intf )
break
;
default:
/* Omit the first MRL-selector characters */
psz_device
=
strdup
(
psz_name
+
strlen
(
"dvd://"
)
);
psz_device
=
strdup
(
psz_name
+
strlen
(
"dvd://"
)
);
break
;
}
}
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
'@'
:
...
...
@@ -425,13 +425,13 @@ static void Eject ( intf_thread_t *p_intf )
break
;
default:
/* Omit the beginning MRL-selector characters */
psz_device
=
strdup
(
psz_name
+
strlen
(
VCD_MRL
)
);
psz_device
=
strdup
(
psz_name
+
strlen
(
VCD_MRL
)
);
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
'@'
:
...
...
@@ -439,7 +439,7 @@ static void Eject ( intf_thread_t *p_intf )
break
;
default:
/* Omit the beginning MRL-selector characters */
psz_device
=
strdup
(
psz_name
+
strlen
(
CDDA_MRL
)
);
psz_device
=
strdup
(
psz_name
+
strlen
(
CDDA_MRL
)
);
break
;
}
}
...
...
modules/gui/pda/pda.c
View file @
5ca0ebcc
...
...
@@ -2,7 +2,7 @@
* pda.c : PDA Gtk2 plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: pda.c,v 1.1
7 2003/12/06 22:41:40 jpsaman
Exp $
* $Id: pda.c,v 1.1
8 2003/12/22 14:32:56 sam
Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* Marc Ariberti <marcari@videolan.org>
...
...
@@ -188,7 +188,7 @@ static void Run( intf_thread_t *p_intf )
/* Get the notebook object */
p_intf
->
p_sys
->
p_notebook
=
GTK_NOTEBOOK
(
gtk_object_get_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_window
),
"notebook"
)
);
/* 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_label
=
(
GtkLabel
*
)
lookup_widget
(
p_intf
->
p_sys
->
p_window
,
"timeLabel"
);
...
...
@@ -264,7 +264,7 @@ static void Run( intf_thread_t *p_intf )
/* BEGIN OF PLAYLIST GTK_TREE_VIEW */
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
)
msg_Err
(
p_intf
,
"Error obtaining pointer to Play List"
);
...
...
@@ -423,7 +423,7 @@ static int Manage( intf_thread_t *p_intf )
p_intf
->
p_sys
->
b_playing
=
1
;
/* update playlist interface */
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
!=
NULL
)
{
...
...
@@ -442,7 +442,7 @@ static int Manage( intf_thread_t *p_intf )
#define p_area p_input->stream.p_selected_area
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
)
{
float
newvalue
=
p_intf
->
p_sys
->
p_adj
->
value
;
...
...
modules/gui/skins/x11/x11_api.cpp
View file @
5ca0ebcc
...
...
@@ -2,9 +2,9 @@
* x11_api.cpp: Various x11-specific functions
*****************************************************************************
* 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 $
*
* Author
s: Cyril Deguet
<asmax@videolan.org>
* Author
: Cyril Deguet
<asmax@videolan.org>
*
* 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
...
...
@@ -54,7 +54,7 @@ void OSAPI_SendMessage( 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
;
...
...
@@ -66,7 +66,7 @@ void OSAPI_PostMessage( SkinWindow *win, unsigned int message,
event
.
xclient
.
data
.
l
[
0
]
=
message
;
event
.
xclient
.
data
.
l
[
1
]
=
param1
;
event
.
xclient
.
data
.
l
[
2
]
=
param2
;
if
(
win
==
NULL
)
{
// broadcast message
...
...
@@ -77,7 +77,7 @@ void OSAPI_PostMessage( SkinWindow *win, unsigned int message,
event
.
xclient
.
window
=
((
X11Window
*
)
win
)
->
GetHandle
();
}
XLOCK
;
XSendEvent
(
g_pIntf
->
p_sys
->
display
,
event
.
xclient
.
window
,
False
,
0
,
XSendEvent
(
g_pIntf
->
p_sys
->
display
,
event
.
xclient
.
window
,
False
,
0
,
&
event
);
XUNLOCK
;
}
...
...
@@ -122,10 +122,10 @@ void OSAPI_GetMousePos( int &x, int &y )
int
rootx
,
rooty
;
int
winx
,
winy
;
unsigned
int
xmask
;
Window
root
=
DefaultRootWindow
(
g_pIntf
->
p_sys
->
display
);
XLOCK
;
XQueryPointer
(
g_pIntf
->
p_sys
->
display
,
root
,
&
rootReturn
,
&
childReturn
,
XQueryPointer
(
g_pIntf
->
p_sys
->
display
,
root
,
&
rootReturn
,
&
childReturn
,
&
rootx
,
&
rooty
,
&
winx
,
&
winy
,
&
xmask
);
XUNLOCK
;
x
=
rootx
;
...
...
@@ -153,8 +153,8 @@ bool OSAPI_RmDir( string path )
/* Skip "." and ".." */
if
(
!*
file
->
d_name
||
*
file
->
d_name
==
'.'
||
(
!*
(
file
->
d_name
+
1
)
&&
*
file
->
d_name
==
'.'
&&
*
(
file
->
d_name
+
1
)
==
'.'
)
)
(
!*
(
file
->
d_name
+
1
)
&&
*
file
->
d_name
==
'.'
&&
*
(
file
->
d_name
+
1
)
==
'.'
)
)
{
continue
;
}
...
...
modules/misc/memcpy/memcpyaltivec.c
View file @
5ca0ebcc
...
...
@@ -2,15 +2,15 @@
* memcpyaltivec.c : AltiVec memcpy module
*****************************************************************************
* 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 $
*
* Author
s
: 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
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* 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 )
static
void
*
fast_memcpy
(
void
*
_to
,
const
void
*
_from
,
size_t
len
)
{
asm
(
"
\n
"
asm
(
"
\n
"
" cmplwi %cr0, %r5, 16
\n
"
" mr %r9, %r3
\n
"
" bc 4, 1, ._L3
\n
"
...
...
modules/stream_out/duplicate.c
View file @
5ca0ebcc
...
...
@@ -2,9 +2,9 @@
* duplicate.c
*****************************************************************************
* 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 $
*
* Author
s
: 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
* 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 )
p_sys
->
pp_streams
[
i_stream
],
p_fmt
);
/* 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
);
if
(
id_new
)
i_valid_streams
++
;
}
...
...
modules/stream_out/transrate/getvlc.h
View file @
5ca0ebcc
...
...
@@ -92,7 +92,7 @@ static const MBtab MB_B [] = {
{
0
,
0
},
{
INTRA
|
QUANT
,
6
},
{
BWD
|
CODED
|
QUANT
,
6
},
{
FWD
|
CODED
|
QUANT
,
6
},
{
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
|
CODED
,
4
},
{
FWD
|
CODED
,
4
},
{
FWD
|
CODED
,
4
},
{
FWD
|
CODED
,
4
},
{
BWD
,
3
},
{
BWD
,
3
},
{
BWD
,
3
},
{
BWD
,
3
},
...
...
@@ -269,7 +269,7 @@ static const DCTtab DCT_B14_8 [] = {
};
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
},
{
2
,
1
,
3
},
{
2
,
1
,
3
},
{
2
,
1
,
3
},
{
2
,
1
,
3
},
{
129
,
0
,
2
},
{
129
,
0
,
2
},
{
129
,
0
,
2
},
{
129
,
0
,
2
},
...
...
@@ -279,7 +279,7 @@ static const DCTtab DCT_B14AC_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
},
{
2
,
1
,
3
},
{
2
,
1
,
3
},
{
2
,
1
,
3
},
{
2
,
1
,
3
},
{
1
,
1
,
1
},
{
1
,
1
,
1
},
{
1
,
1
,
1
},
{
1
,
1
,
1
},
...
...
@@ -361,7 +361,7 @@ static const DCTtab DCT_B15_8 [] = {
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
},
{
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
}
...
...
modules/video_chroma/i420_rgb.c
View file @
5ca0ebcc
...
...
@@ -2,15 +2,15 @@
* i420_rgb.c : YUV to bitmap RGB conversion module for vlc
*****************************************************************************
* 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 $
*
* Author
s: Samuel
Hocevar <sam@zoy.org>
* Author
: Sam
Hocevar <sam@zoy.org>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...
...
@@ -123,7 +123,7 @@ static int Activate( vlc_object_t *p_this )
break
;
#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
case
VLC_FOURCC
(
'R'
,
'V'
,
'3'
,
'2'
):
#if defined (MODULE_NAME_IS_i420_rgb_mmx)
...
...
@@ -146,7 +146,7 @@ static int Activate( vlc_object_t *p_this )
default:
return
-
1
;
}
p_vout
->
chroma
.
p_sys
=
malloc
(
sizeof
(
chroma_sys_t
)
);
if
(
p_vout
->
chroma
.
p_sys
==
NULL
)
{
...
...
@@ -220,7 +220,7 @@ static int Activate( vlc_object_t *p_this )
SetYUV
(
p_vout
);
#endif
return
0
;
return
0
;
}
/*****************************************************************************
...
...
modules/video_filter/deinterlace/deinterlace.c
View file @
5ca0ebcc
...
...
@@ -2,9 +2,9 @@
* deinterlace.c : deinterlacer plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001, 2002, 2003 VideoLAN
* $Id: deinterlace.c,v 1.1
7 2003/11/06 16:54:40 nitrox
Exp $
* $Id: deinterlace.c,v 1.1
8 2003/12/22 14:32:56 sam
Exp $
*
* Author
s: Samuel
Hocevar <sam@zoy.org>
* Author
: Sam
Hocevar <sam@zoy.org>
*
* 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
...
...
@@ -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
);
return
;
}
msleep
(
VOUT_OUTMEM_SLEEP
);
msleep
(
VOUT_OUTMEM_SLEEP
);
}
/* 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,
picture_t
*
p_outpic
,
picture_t
*
p_pic
)
{
int
i_plane
;
/* Copy image and skip lines */
for
(
i_plane
=
0
;
i_plane
<
p_pic
->
i_planes
;
i_plane
++
)
{
...
...
modules/video_output/qte/qte.cpp
View file @
5ca0ebcc
...
...
@@ -2,7 +2,7 @@
* qte.cpp : QT Embedded plugin for vlc
*****************************************************************************
* 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>
* Jean-Paul Saman <jpsaman@wxs.nl>
...
...
@@ -290,7 +290,7 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic )
&
x
,
&
y
,
&
w
,
&
h
);
#if 0
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
if
(
p_vout
->
p_sys
->
p_VideoWidget
)
...
...
@@ -607,7 +607,7 @@ static void RunQtThread(event_thread_t *p_event)
}
QWidget
*
pWidget
=
new
QWidget
();
if
(
pWidget
)
{
{
p_event
->
p_vout
->
p_sys
->
p_VideoWidget
=
pWidget
;
}
}
...
...
@@ -619,31 +619,31 @@ static void RunQtThread(event_thread_t *p_event)
if
(
p_event
->
p_vout
->
p_sys
->
p_QApplication
)
{
/* Set default window width and heigh to exactly preferred size. */
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
->
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
->
i_height
);
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
->
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
->
i_height
);
p_event
->
p_vout
->
p_sys
->
p_VideoWidget
->
setMaximumWidth
(
desktop
->
width
()
);
p_event
->
p_vout
->
p_sys
->
p_VideoWidget
->
setMaximumHeight
(
desktop
->
height
()
);
/* Check on 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
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
->
bRunning
=
TRUE
;
#ifdef NEED_QTE_MAIN
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
)
break
;
msleep
(
100
);
}
msleep
(
100
);
}
#else
// run the main loop of qtapplication until someone says: 'quit'
p_event
->
p_vout
->
p_sys
->
pcQApplication
->
exec
();
...
...
modules/video_output/x11/xcommon.c
View file @
5ca0ebcc
...
...
@@ -2,10 +2,10 @@
* xcommon.c: Functions common to the X11 and XVideo plugins
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: xcommon.c,v 1.4
0 2003/12/08 19:50:22 gbazin
Exp $
* $Id: xcommon.c,v 1.4
1 2003/12/22 14:32:56 sam
Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Sam
uel
Hocevar <sam@zoy.org>
* Sam Hocevar <sam@zoy.org>
* David Kennedy <dkennedy@tinytoad.com>
* Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -282,7 +282,7 @@ int E_(Activate) ( vlc_object_t *p_this )
TestNetWMSupport
(
p_vout
);
/* 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"
);
var_Change
(
p_vout
,
"video-on-top"
,
VLC_VAR_SETTEXT
,
&
text
,
NULL
);
var_AddCallback
(
p_vout
,
"video-on-top"
,
OnTopCallback
,
NULL
);
...
...
@@ -581,7 +581,7 @@ static int ManageVideo( vout_thread_t *p_vout )
var_Get
(
p_vout
,
"mouse-button-down"
,
&
val
);
val
.
i_int
|=
1
;
var_Set
(
p_vout
,
"mouse-button-down"
,
val
);
/* detect double-clicks */
if
(
(
((
XButtonEvent
*
)
&
xevent
)
->
time
-
p_vout
->
p_sys
->
i_time_button_last_pressed
)
<
300
)
...
...
@@ -597,13 +597,13 @@ static int ManageVideo( vout_thread_t *p_vout )
val
.
i_int
|=
2
;
var_Set
(
p_vout
,
"mouse-button-down"
,
val
);
break
;
case
Button3
:
var_Get
(
p_vout
,
"mouse-button-down"
,
&
val
);
val
.
i_int
|=
4
;
var_Set
(
p_vout
,
"mouse-button-down"
,
val
);
break
;
case
Button4
:
var_Get
(
p_vout
,
"mouse-button-down"
,
&
val
);
val
.
i_int
|=
8
;
...
...
@@ -632,7 +632,7 @@ static int ManageVideo( vout_thread_t *p_vout )
val
.
b_bool
=
VLC_TRUE
;
var_Set
(
p_vout
,
"mouse-clicked"
,
val
);
break
;
case
Button2
:
{
playlist_t
*
p_playlist
;
...
...
@@ -654,7 +654,7 @@ static int ManageVideo( vout_thread_t *p_vout )
}
}
break
;
case
Button3
:
{
intf_thread_t
*
p_intf
;
...
...
@@ -694,7 +694,7 @@ static int ManageVideo( vout_thread_t *p_vout )
val
.
i_int
&=
~
16
;
var_Set
(
p_vout
,
"mouse-button-down"
,
val
);
break
;
}
}
/* Mouse move */
...
...
modules/visualization/visual/fft.c
View file @
5ca0ebcc
/*****************************************************************************
* 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
*
*
* Authors: Richard Boulton <richard@tartarus.org>
* Ralph Loader <suckfish@ihug.co.nz>
*
...
...
@@ -12,7 +12,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...
...
@@ -36,7 +36,7 @@
#endif
/******************************************************************************
* Local prototypes
* Local prototypes
*****************************************************************************/
static
void
fft_prepare
(
const
sound_sample
*
input
,
float
*
re
,
float
*
im
);
static
void
fft_calculate
(
float
*
re
,
float
*
im
);
...
...
@@ -62,24 +62,24 @@ static float costable[FFT_BUFFER_SIZE / 2];
* On error, returns NULL.
* 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
;
unsigned
int
i
;
p_state
=
(
fft_state
*
)
malloc
(
sizeof
(
fft_state
));
if
(
!
p_state
)
if
(
!
p_state
)
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
;
costable
[
i
]
=
cos
(
j
);
sintable
[
i
]
=
sin
(
j
);
float
j
=
2
*
PI
*
i
/
FFT_BUFFER_SIZE
;
costable
[
i
]
=
cos
(
j
);
sintable
[
i
]
=
sin
(
j
);
}
return
p_state
;
...
...
@@ -123,12 +123,12 @@ static void fft_prepare(const sound_sample *input, float * re, float * im) {
unsigned
int
i
;
float
*
p_real
=
re
;
float
*
p_imag
=
im
;
/* 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_imag
++
=
0
;
*
p_real
++
=
input
[
bitReverse
[
i
]];
*
p_imag
++
=
0
;
}
}
...
...
@@ -142,11 +142,11 @@ static void fft_output(const float * re, const float * im, float *output)
const
float
*
p_real
=
re
;
const
float
*
p_imag
=
im
;
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_imag
++
;
*
p_output
=
(
*
p_real
*
*
p_real
)
+
(
*
p_imag
*
*
p_imag
);
p_output
++
;
p_real
++
;
p_imag
++
;
}
/* Do divisions to keep the constant and highest frequency terms in scale
* with the other terms. */
...
...
@@ -158,56 +158,56 @@ static void fft_output(const float * re, const float * im, float *output)
/*
* 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
exchanges
;
float
fact_real
,
fact_imag
;
float
tmp_real
,
tmp_imag
;
unsigned
int
factfact
;
/* Set up some variables to reduce calculation in the loops */
exchanges
=
1
;
factfact
=
FFT_BUFFER_SIZE
/
2
;
/* Loop through the divide and conquer steps */
for
(
i
=
FFT_BUFFER_SIZE_LOG
;
i
!=
0
;
i
--
)
{
/* In this step, we have 2 ^ (i - 1) exchange groups, each with
* 2 ^ (FFT_BUFFER_SIZE_LOG - i) exchanges
*/
/* Loop through the exchanges in a group */
for
(
j
=
0
;
j
!=
exchanges
;
j
++
)
{
/* Work out factor for this exchange
* factor ^ (exchanges) = -1
* So, real = cos(j * PI / exchanges),
* imag = sin(j * PI / exchanges)
*/
fact_real
=
costable
[
j
*
factfact
];
fact_imag
=
sintable
[
j
*
factfact
];
/* Loop through all the exchange groups */
for
(
k
=
j
;
k
<
FFT_BUFFER_SIZE
;
k
+=
exchanges
<<
1
)
{
int
k1
=
k
+
exchanges
;
tmp_real
=
fact_real
*
re
[
k1
]
-
fact_imag
*
im
[
k1
];
tmp_imag
=
fact_real
*
im
[
k1
]
+
fact_imag
*
re
[
k1
];
re
[
k1
]
=
re
[
k
]
-
tmp_real
;
im
[
k1
]
=
im
[
k
]
-
tmp_imag
;
re
[
k
]
+=
tmp_real
;
im
[
k
]
+=
tmp_imag
;
}
}
exchanges
<<=
1
;
factfact
>>=
1
;
/* In this step, we have 2 ^ (i - 1) exchange groups, each with
* 2 ^ (FFT_BUFFER_SIZE_LOG - i) exchanges
*/
/* Loop through the exchanges in a group */
for
(
j
=
0
;
j
!=
exchanges
;
j
++
)
{
/* Work out factor for this exchange
* factor ^ (exchanges) = -1
* So, real = cos(j * PI / exchanges),
* imag = sin(j * PI / exchanges)
*/
fact_real
=
costable
[
j
*
factfact
];
fact_imag
=
sintable
[
j
*
factfact
];
/* Loop through all the exchange groups */
for
(
k
=
j
;
k
<
FFT_BUFFER_SIZE
;
k
+=
exchanges
<<
1
)
{
int
k1
=
k
+
exchanges
;
tmp_real
=
fact_real
*
re
[
k1
]
-
fact_imag
*
im
[
k1
];
tmp_imag
=
fact_real
*
im
[
k1
]
+
fact_imag
*
re
[
k1
];
re
[
k1
]
=
re
[
k
]
-
tmp_real
;
im
[
k1
]
=
im
[
k
]
-
tmp_imag
;
re
[
k
]
+=
tmp_real
;
im
[
k
]
+=
tmp_imag
;
}
}
exchanges
<<=
1
;
factfact
>>=
1
;
}
}
static
int
reverseBits
(
unsigned
int
initial
)
static
int
reverseBits
(
unsigned
int
initial
)
{
unsigned
int
reversed
=
0
,
loop
;
for
(
loop
=
0
;
loop
<
FFT_BUFFER_SIZE_LOG
;
loop
++
)
{
reversed
<<=
1
;
reversed
+=
(
initial
&
1
);
initial
>>=
1
;
reversed
<<=
1
;
reversed
+=
(
initial
&
1
);
initial
>>=
1
;
}
return
reversed
;
}
src/input/demux.c
View file @
5ca0ebcc
...
...
@@ -2,9 +2,9 @@
* demux.c
*****************************************************************************
* 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 $
*
* Author
s
: 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
* 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,
case
DEMUX_SET_POSITION
:
f
=
(
double
)
va_arg
(
args
,
double
);
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
*
(
double
)
p_input
->
stream
.
p_selected_area
->
i_size
)
);
...
...
@@ -109,7 +109,7 @@ int demux_vaControlDefault( input_thread_t *p_input, int i_query,
i64
=
(
int64_t
)
va_arg
(
args
,
int64_t
);
if
(
p_input
->
stream
.
i_mux_rate
>
0
&&
p_input
->
stream
.
b_seekable
&&
p_input
->
pf_seek
!=
NULL
&&
i64
>=
0
)
p_input
->
pf_seek
!=
NULL
&&
i64
>=
0
)
{
SeekOffset
(
p_input
,
i64
*
50
*
(
int64_t
)
p_input
->
stream
.
i_mux_rate
/
...
...
src/input/input_ext-intf.c
View file @
5ca0ebcc
...
...
@@ -2,9 +2,9 @@
* input_ext-intf.c: services to the interface
*****************************************************************************
* Copyright (C) 1998-2001,2003 VideoLAN
* $Id: input_ext-intf.c,v 1.5
3 2003/12/03 13:27:51 rocky
Exp $
* $Id: input_ext-intf.c,v 1.5
4 2003/12/22 14:32:56 sam
Exp $
*
* Author
s
: 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
* 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,
if
(
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
{
...
...
src/input/subtitles.c
View file @
5ca0ebcc
...
...
@@ -2,7 +2,7 @@
* subtitles.c
*****************************************************************************
* 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>
* This is adapted code from the GPL'ed MPlayer (http://mplayerhq.hu)
...
...
@@ -68,54 +68,54 @@ static void strcpy_trim( char *d, char *s )
/* skip leading whitespace */
while
(
*
s
&&
!
isalnum
(
*
s
)
)
{
s
++
;
s
++
;
}
for
(;;)
{
/* copy word */
while
(
*
s
&&
isalnum
(
*
s
)
)
/* copy word */
while
(
*
s
&&
isalnum
(
*
s
)
)
{
*
d
=
tolower
(
*
s
);
s
++
;
d
++
;
}
if
(
*
s
==
0
)
break
;
/* trim excess whitespace */
while
(
*
s
&&
!
isalnum
(
*
s
)
)
*
d
=
tolower
(
*
s
);
s
++
;
d
++
;
}
if
(
*
s
==
0
)
break
;
/* trim excess whitespace */
while
(
*
s
&&
!
isalnum
(
*
s
)
)
{
s
++
;
}
if
(
*
s
==
0
)
break
;
*
d
++
=
' '
;
s
++
;
}
if
(
*
s
==
0
)
break
;
*
d
++
=
' '
;
}
*
d
=
0
;
}
static
void
strcpy_strip_ext
(
char
*
d
,
char
*
s
)
{
char
*
tmp
=
strrchr
(
s
,
'.'
);
if
(
!
tmp
)
{
strcpy
(
d
,
s
);
return
;
strcpy
(
d
,
s
);
return
;
}
else
{
strncpy
(
d
,
s
,
tmp
-
s
);
d
[
tmp
-
s
]
=
0
;
strncpy
(
d
,
s
,
tmp
-
s
);
d
[
tmp
-
s
]
=
0
;
}
while
(
*
d
)
{
*
d
=
tolower
(
*
d
);
d
++
;
*
d
=
tolower
(
*
d
);
d
++
;
}
}
static
void
strcpy_get_ext
(
char
*
d
,
char
*
s
)
{
char
*
tmp
=
strrchr
(
s
,
'.'
);
if
(
!
tmp
)
{
strcpy
(
d
,
""
);
return
;
strcpy
(
d
,
""
);
return
;
}
else
strcpy
(
d
,
tmp
+
1
);
}
...
...
@@ -123,13 +123,13 @@ static int whiteonly( char *s )
{
while
(
*
s
)
{
if
(
isalnum
(
*
s
)
)
return
0
;
s
++
;
if
(
isalnum
(
*
s
)
)
return
0
;
s
++
;
}
return
1
;
}
typedef
struct
_subfn
typedef
struct
_subfn
{
int
priority
;
char
*
psz_fname
;
...
...
@@ -137,22 +137,26 @@ typedef struct _subfn
static
int
compare_sub_priority
(
const
void
*
a
,
const
void
*
b
)
{
if
(((
subfn
*
)
a
)
->
priority
>
((
subfn
*
)
b
)
->
priority
)
{
return
-
1
;
}
else
if
(((
subfn
*
)
a
)
->
priority
<
((
subfn
*
)
b
)
->
priority
)
{
return
1
;
}
else
{
return
strcoll
(((
subfn
*
)
a
)
->
psz_fname
,
((
subfn
*
)
b
)
->
psz_fname
);
if
(((
subfn
*
)
a
)
->
priority
>
((
subfn
*
)
b
)
->
priority
)
{
return
-
1
;
}
if
(((
subfn
*
)
a
)
->
priority
<
((
subfn
*
)
b
)
->
priority
)
{
return
1
;
}
return
strcoll
(((
subfn
*
)
a
)
->
psz_fname
,
((
subfn
*
)
b
)
->
psz_fname
);
}
/**
* Detect subtitle files.
*
*
* When called this function will split up the psz_fname string into a
* directory, filename and extension. It then opens the directory
* in which the file resides and tries to find possible matches of
* subtitles files.
* subtitles files.
*
* \ingroup Demux
* \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
char
*
f_dir
,
*
f_fname
,
*
f_fname_noext
,
*
f_fname_trim
,
*
tmp
;
/* variables to be used for derivatives FILE *f */
char
*
tmp_fname_noext
,
*
tmp_fname_trim
,
*
tmp_fname_ext
,
*
tmpresult
;
vlc_value_t
fuzzy
;
int
len
,
i
,
j
,
i_sub_count
;
subfn
*
result
;
/* unsorted results */
char
**
result2
;
/* sorted results */
FILE
*
f
;
DIR
*
d
;
struct
dirent
*
de
;
...
...
@@ -200,59 +204,59 @@ char** subtitles_Detect( input_thread_t *p_this, char *psz_path, char *psz_fname
if
(
tmp
)
{
int
pos
;
strcpy
(
f_fname
,
tmp
+
1
);
pos
=
tmp
-
psz_fname
;
strncpy
(
f_dir
,
psz_fname
,
pos
+
1
);
f_dir
[
pos
+
1
]
=
0
;
strcpy
(
f_fname
,
tmp
+
1
);
pos
=
tmp
-
psz_fname
;
strncpy
(
f_dir
,
psz_fname
,
pos
+
1
);
f_dir
[
pos
+
1
]
=
0
;
}
else
{
strcpy
(
f_fname
,
psz_fname
);
strcpy
(
f_dir
,
""
);
strcpy
(
f_fname
,
psz_fname
);
strcpy
(
f_dir
,
""
);
}
strcpy_strip_ext
(
f_fname_noext
,
f_fname
);
strcpy_trim
(
f_fname_trim
,
f_fname_noext
);
var_Get
(
p_this
,
"sub-autodetect-fuzzy"
,
&
fuzzy
);
for
(
j
=
0
;
j
<=
1
;
j
++
)
{
d
=
opendir
(
j
==
0
?
f_dir
:
psz_path
);
if
(
d
)
d
=
opendir
(
j
==
0
?
f_dir
:
psz_path
);
if
(
d
)
{
int
b_found
;
while
(
(
de
=
readdir
(
d
)
)
)
while
(
(
de
=
readdir
(
d
)
)
)
{
/* retrieve various parts of the filename */
strcpy_strip_ext
(
tmp_fname_noext
,
de
->
d_name
);
strcpy_get_ext
(
tmp_fname_ext
,
de
->
d_name
);
strcpy_trim
(
tmp_fname_trim
,
tmp_fname_noext
);
/* does it end with a subtitle extension? */
b_found
=
0
;
for
(
i
=
0
;
sub_exts
[
i
];
i
++
)
/* retrieve various parts of the filename */
strcpy_strip_ext
(
tmp_fname_noext
,
de
->
d_name
);
strcpy_get_ext
(
tmp_fname_ext
,
de
->
d_name
);
strcpy_trim
(
tmp_fname_trim
,
tmp_fname_noext
);
/* does it end with a subtitle extension? */
b_found
=
0
;
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
);
break
;
}
}
/* we have a (likely) subtitle file */
if
(
b_found
)
break
;
}
}
/* we have a (likely) subtitle file */
if
(
b_found
)
{
int
i_prio
=
0
;
if
(
!
i_prio
&&
strcmp
(
tmp_fname_trim
,
f_fname_trim
)
==
0
)
int
i_prio
=
0
;
if
(
!
i_prio
&&
strcmp
(
tmp_fname_trim
,
f_fname_trim
)
==
0
)
{
/* matches the movie name exactly */
i_prio
=
4
;
}
if
(
!
i_prio
&&
(
tmp
=
strstr
(
tmp_fname_trim
,
f_fname_trim
)
)
)
/* matches the movie name exactly */
i_prio
=
4
;
}
if
(
!
i_prio
&&
(
tmp
=
strstr
(
tmp_fname_trim
,
f_fname_trim
)
)
)
{
/* contains the movie name */
/* contains the movie name */
tmp
+=
strlen
(
f_fname_trim
);
if
(
whiteonly
(
tmp
)
)
{
...
...
@@ -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 */
i_prio
=
3
;
}
}
if
(
!
i_prio
)
}
if
(
!
i_prio
)
{
/* doesn't contain the movie name */
if
(
j
==
0
)
i_prio
=
1
;
}
if
(
i_prio
>=
fuzzy
.
i_int
)
/* doesn't contain the movie name */
if
(
j
==
0
)
i_prio
=
1
;
}
if
(
i_prio
>=
fuzzy
.
i_int
)
{
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
);
if
(
(
f
=
fopen
(
tmpresult
,
"rt"
)
)
)
if
(
(
f
=
fopen
(
tmpresult
,
"rt"
)
)
)
{
fclose
(
f
);
result
[
i_sub_count
].
priority
=
i_prio
;
result
[
i_sub_count
].
psz_fname
=
strdup
(
tmpresult
);
i_sub_count
++
;
}
}
}
if
(
i_sub_count
>=
MAX_SUBTITLE_FILES
)
break
;
}
closedir
(
d
);
}
fclose
(
f
);
result
[
i_sub_count
].
priority
=
i_prio
;
result
[
i_sub_count
].
psz_fname
=
strdup
(
tmpresult
);
i_sub_count
++
;
}
}
}
if
(
i_sub_count
>=
MAX_SUBTITLE_FILES
)
break
;
}
closedir
(
d
);
}
}
free
(
f_dir
);
free
(
f_fname
);
free
(
f_fname_noext
);
...
...
@@ -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
++
)
{
result2
[
i
]
=
result
[
i
].
psz_fname
;
result2
[
i
]
=
result
[
i
].
psz_fname
;
}
result2
[
i_sub_count
]
=
NULL
;
free
(
result
);
...
...
src/interface/intf_eject.c
View file @
5ca0ebcc
...
...
@@ -2,12 +2,12 @@
* intf_eject.c: CD/DVD-ROM ejection handling functions
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: intf_eject.c,v 1.2
1 2003/09/18 17:54:02 zorglub
Exp $
* $Id: intf_eject.c,v 1.2
2 2003/12/22 14:32:56 sam
Exp $
*
* Author: Julien Blache <jb@technologeek.org> for the Linux part
* with code taken from the Linux "eject" command
* Jon Lech Johansen <jon-vl@nanocrew.net> for Darwin
* Gildas Bazin <gbazin@netcourrier.com> for Win32
* Author
s
: Julien Blache <jb@technologeek.org> for the Linux part
*
with code taken from the Linux "eject" command
*
Jon Lech Johansen <jon-vl@nanocrew.net> for Darwin
*
Gildas Bazin <gbazin@netcourrier.com> for Win32
*
* 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
...
...
@@ -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
* is to use the 'disktool' command line utility. It uses
* 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
&&
...
...
@@ -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
|
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
;
/* Eject disc */
/* Eject disc */
i_ret
=
mciSendCommand
(
op
.
wDeviceID
,
MCI_SET
,
MCI_SET_DOOR_OPEN
,
0
);
/* Release access to the device */
mciSendCommand
(
op
.
wDeviceID
,
MCI_CLOSE
,
MCI_WAIT
,
0
);
/* Release access to the device */
mciSendCommand
(
op
.
wDeviceID
,
MCI_CLOSE
,
MCI_WAIT
,
0
);
}
else
i_ret
=
VLC_EGENERIC
;
...
...
@@ -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 */
i_fd
=
open
(
psz_device
,
O_RDONLY
|
O_NONBLOCK
);
if
(
i_fd
==
-
1
)
{
msg_Err
(
p_this
,
"could not open device %s"
,
psz_device
);
...
...
@@ -269,7 +269,7 @@ static int EjectSCSI( int i_fd )
{
return
VLC_EGENERIC
;
}
scsi_cmd
.
inlen
=
0
;
scsi_cmd
.
outlen
=
0
;
scsi_cmd
.
cmd
[
0
]
=
START_STOP
;
...
...
@@ -283,10 +283,10 @@ static int EjectSCSI( int i_fd )
{
return
VLC_EGENERIC
;
}
/* Force kernel to reread partition table when new disc inserted */
i_status
=
ioctl
(
i_fd
,
BLKRRPART
);
return
i_status
;
}
#endif
...
...
src/misc/charset.c
View file @
5ca0ebcc
...
...
@@ -3,9 +3,9 @@
* encoding.
*****************************************************************************
* 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 $
*
* Author
s
: 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():
*
...
...
@@ -52,12 +52,12 @@ typedef struct VLCCharsetAlias
/*
* 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.
*
*
* Please, put to this funtion exotic aliases only. The libc 'iconv' knows
* a lot of basic aliases (check it first by iconv -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 )
if
(
strstr
(
l
,
"ru"
))
return
"KOI8-R"
;
if
(
strstr
(
l
,
"uk"
))
return
"KOI8-U"
;
if
(
strstr
(
l
,
"pl"
)
||
strstr
(
l
,
"hr"
)
||
strstr
(
l
,
"hu"
)
||
strstr
(
l
,
"cs"
)
||
strstr
(
l
,
"sk"
)
||
strstr
(
l
,
"sl"
))
return
"ISO-8859-2"
;
strstr
(
l
,
"hu"
)
||
strstr
(
l
,
"cs"
)
||
strstr
(
l
,
"sk"
)
||
strstr
(
l
,
"sl"
))
return
"ISO-8859-2"
;
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
,
"bg"
)
||
strstr
(
l
,
"be"
)
||
...
...
@@ -95,82 +95,82 @@ static const char* vlc_encoding_from_language( const char *l )
static
const
char
*
vlc_charset_aliases
(
const
char
*
psz_name
)
{
VLCCharsetAlias
*
a
;
VLCCharsetAlias
*
a
;
#if defined WIN32
VLCCharsetAlias
aliases
[]
=
VLCCharsetAlias
aliases
[]
=
{
{
"CP936"
,
"GBK"
},
{
"CP1361"
,
"JOHAB"
},
{
"CP20127"
,
"ASCII"
},
{
"CP20866"
,
"KOI8-R"
},
{
"CP21866"
,
"KOI8-RU"
},
{
"CP28591"
,
"ISO-8859-1"
},
{
"CP28592"
,
"ISO-8859-2"
},
{
"CP28593"
,
"ISO-8859-3"
},
{
"CP28594"
,
"ISO-8859-4"
},
{
"CP28595"
,
"ISO-8859-5"
},
{
"CP28596"
,
"ISO-8859-6"
},
{
"CP28597"
,
"ISO-8859-7"
},
{
"CP28598"
,
"ISO-8859-8"
},
{
"CP28599"
,
"ISO-8859-9"
},
{
"CP28605"
,
"ISO-8859-15"
},
{
NULL
,
NULL
}
{
"CP936"
,
"GBK"
},
{
"CP1361"
,
"JOHAB"
},
{
"CP20127"
,
"ASCII"
},
{
"CP20866"
,
"KOI8-R"
},
{
"CP21866"
,
"KOI8-RU"
},
{
"CP28591"
,
"ISO-8859-1"
},
{
"CP28592"
,
"ISO-8859-2"
},
{
"CP28593"
,
"ISO-8859-3"
},
{
"CP28594"
,
"ISO-8859-4"
},
{
"CP28595"
,
"ISO-8859-5"
},
{
"CP28596"
,
"ISO-8859-6"
},
{
"CP28597"
,
"ISO-8859-7"
},
{
"CP28598"
,
"ISO-8859-8"
},
{
"CP28599"
,
"ISO-8859-9"
},
{
"CP28605"
,
"ISO-8859-15"
},
{
NULL
,
NULL
}
};
#elif SYS_AIX
VLCCharsetAlias
aliases
[]
=
{
{
"IBM-850"
,
"CP850"
},
{
"IBM-856"
,
"CP856"
},
{
"IBM-921"
,
"ISO-8859-13"
},
{
"IBM-922"
,
"CP922"
},
{
"IBM-932"
,
"CP932"
},
{
"IBM-943"
,
"CP943"
},
{
"IBM-1046"
,
"CP1046"
},
{
"IBM-1124"
,
"CP1124"
},
{
"IBM-1129"
,
"CP1129"
},
{
"IBM-1252"
,
"CP1252"
},
{
"IBM-EUCCN"
,
"GB2312"
},
{
"IBM-EUCJP"
,
"EUC-JP"
},
{
"IBM-EUCKR"
,
"EUC-KR"
},
{
"IBM-EUCTW"
,
"EUC-TW"
},
{
NULL
,
NULL
}
{
"IBM-850"
,
"CP850"
},
{
"IBM-856"
,
"CP856"
},
{
"IBM-921"
,
"ISO-8859-13"
},
{
"IBM-922"
,
"CP922"
},
{
"IBM-932"
,
"CP932"
},
{
"IBM-943"
,
"CP943"
},
{
"IBM-1046"
,
"CP1046"
},
{
"IBM-1124"
,
"CP1124"
},
{
"IBM-1129"
,
"CP1129"
},
{
"IBM-1252"
,
"CP1252"
},
{
"IBM-EUCCN"
,
"GB2312"
},
{
"IBM-EUCJP"
,
"EUC-JP"
},
{
"IBM-EUCKR"
,
"EUC-KR"
},
{
"IBM-EUCTW"
,
"EUC-TW"
},
{
NULL
,
NULL
}
};
#elif SYS_HPUX
#elif SYS_HPUX
VLCCharsetAlias
aliases
[]
=
{
{
"ROMAN8"
,
"HP-ROMAN8"
},
{
"ARABIC8"
,
"HP-ARABIC8"
},
{
"GREEK8"
,
"HP-GREEK8"
},
{
"HEBREW8"
,
"HP-HEBREW8"
},
{
"TURKISH8"
,
"HP-TURKISH8"
},
{
"KANA8"
,
"HP-KANA8"
},
{
"HP15CN"
,
"GB2312"
},
{
"ROMAN8"
,
"HP-ROMAN8"
},
{
"ARABIC8"
,
"HP-ARABIC8"
},
{
"GREEK8"
,
"HP-GREEK8"
},
{
"HEBREW8"
,
"HP-HEBREW8"
},
{
"TURKISH8"
,
"HP-TURKISH8"
},
{
"KANA8"
,
"HP-KANA8"
},
{
"HP15CN"
,
"GB2312"
},
{
NULL
,
NULL
}
};
#elif SYS_IRIX
VLCCharsetAlias
aliases
[]
=
{
{
"EUCCN"
,
"GB2312"
},
{
"EUCCN"
,
"GB2312"
},
{
NULL
,
NULL
}
};
#elif SYS_OSF
#elif SYS_OSF
VLCCharsetAlias
aliases
[]
=
{
{
"KSC5601"
,
"CP949"
},
{
"SDECKANJI"
,
"EUC-JP"
},
{
"TACTIS"
,
"TIS-620"
},
{
"KSC5601"
,
"CP949"
},
{
"SDECKANJI"
,
"EUC-JP"
},
{
"TACTIS"
,
"TIS-620"
},
{
NULL
,
NULL
}
};
#elif SYS_SOLARIS
VLCCharsetAlias
aliases
[]
=
{
{
"646"
,
"ASCII"
},
{
"CNS11643"
,
"EUC-TW"
},
{
"5601"
,
"EUC-KR"
},
{
"JOHAP92"
,
"JOHAB"
},
{
"PCK"
,
"SHIFT_JIS"
},
{
"2533"
,
"TIS-620"
},
{
"646"
,
"ASCII"
},
{
"CNS11643"
,
"EUC-TW"
},
{
"5601"
,
"EUC-KR"
},
{
"JOHAP92"
,
"JOHAB"
},
{
"PCK"
,
"SHIFT_JIS"
},
{
"2533"
,
"TIS-620"
},
{
NULL
,
NULL
}
};
#elif SYS_BSD
...
...
@@ -190,10 +190,9 @@ static const char* vlc_charset_aliases( const char *psz_name )
if
(
strcasecmp
(
a
->
psz_alias
,
psz_name
)
==
0
)
return
a
->
psz_name
;
}
/* 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
;
}
...
...
@@ -208,10 +207,10 @@ static char *vlc_encoding_from_locale( char *psz_locale )
static
char
buf
[
2
+
10
+
1
];
psz_dot
++
;
/* Look for the possible @... trailer and remove it, if any. */
psz_modifier
=
strchr
(
psz_dot
,
'@'
);
if
(
psz_modifier
==
NULL
)
return
psz_dot
;
if
(
0
<
(
psz_modifier
-
psz_dot
)
<
sizeof
(
buf
))
...
...
@@ -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
* (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
* 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
psz_locale
=
setlocale
(
LC_ALL
,
NULL
);
# endif
...
...
@@ -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,
* 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
);
# endif
/* HAVE_LANGINFO_CODESET */
...
...
@@ -279,8 +276,7 @@ vlc_bool_t vlc_current_charset( char **psz_charset )
ULONG
cplen
;
/* 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"
);
if
(
psz_locale
==
NULL
||
psz_locale
[
0
]
==
'\0'
)
{
...
...
@@ -292,7 +288,7 @@ vlc_bool_t vlc_current_charset( char **psz_charset )
psz_codeset
=
vlc_encoding_from_locale
(
psz_locale
);
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
)
)
psz_codeset
=
""
;
else
...
...
@@ -303,30 +299,27 @@ vlc_bool_t vlc_current_charset( char **psz_charset )
}
#endif
if
(
psz_codeset
==
NULL
)
/* The canonical name cannot be determined.
*/
/* The canonical name cannot be determined. */
psz_codeset
=
""
;
else
psz_codeset
=
vlc_charset_aliases
(
psz_codeset
);
/* Don't return an empty string. GNU libc and GNU libiconv interpret
* 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'
)
{
/*
* Last possibility is 'CHARSET' enviroment variable
*/
/* Last possibility is 'CHARSET' enviroment variable */
if
(
!
(
psz_codeset
=
getenv
(
"CHARSET"
)
)
)
psz_codeset
=
"ISO-8859-1"
;
}
if
(
psz_charset
)
*
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_FALSE
;
}
src/misc/darwin_specific.m
View file @
5ca0ebcc
/*****************************************************************************
* darwin_specific.m: Darwin specific features
* darwin_specific.m: Darwin specific features
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: darwin_specific.m,v 1.1
6 2003/11/10 00:49:48 hartman
Exp $
* $Id: darwin_specific.m,v 1.1
7 2003/12/22 14:32:56 sam
Exp $
*
* Authors: Sam
uel
Hocevar <sam@zoy.org>
* Authors: Sam Hocevar <sam@zoy.org>
* Christophe Massiot <massiot@via.ecp.fr>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...
...
@@ -54,7 +54,7 @@ static int FindLanguage( const char * psz_lang )
"Brazillian Portuguese"
,
"pt_BR"
,
"Russian"
,
"ru"
,
"Swedish"
,
"sv"
,
NULL
NULL
};
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[] )
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
/* Retrieve user's preferences. */
NSUserDefaults
*
o_defs
=
[
NSUserDefaults
standardUserDefaults
];
NSArray
*
o_languages
=
[
o_defs
objectForKey
:
@"AppleLanguages"
];
NSEnumerator
*
o_enumerator
=
[
o_languages
objectEnumerator
];
NSUserDefaults
*
o_defs
=
[
NSUserDefaults
standardUserDefaults
];
NSArray
*
o_languages
=
[
o_defs
objectForKey
:
@"AppleLanguages"
];
NSEnumerator
*
o_enumerator
=
[
o_languages
objectEnumerator
];
NSString
*
o_lang
;
while
(
(
o_lang
=
[
o_enumerator
nextObject
])
)
{
{
const
char
*
psz_string
=
[
o_lang
lossyCString
];
if
(
FindLanguage
(
psz_string
)
)
{
break
;
}
}
[
o_pool
release
];
}
}
...
...
src/video_output/video_text.c
View file @
5ca0ebcc
...
...
@@ -2,15 +2,15 @@
* video_text.c : text manipulation functions
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: video_text.c,v 1.4
8 2003/12/09 19:15:03 yoann
Exp $
* $Id: video_text.c,v 1.4
9 2003/12/22 14:32:57 sam
Exp $
*
* Author
s
: 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
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...
...
@@ -33,24 +33,24 @@
* \param i_vmargin vertical margin in pixels
* \param i_duration Amount of time the text is to be shown.
*/
subpicture_t
*
vout_ShowTextRelative
(
vout_thread_t
*
p_vout
,
char
*
psz_string
,
text_style_t
*
p_style
,
int
i_flags
,
int
i_hmargin
,
int
i_vmargin
,
mtime_t
i_duration
)
subpicture_t
*
vout_ShowTextRelative
(
vout_thread_t
*
p_vout
,
char
*
psz_string
,
text_style_t
*
p_style
,
int
i_flags
,
int
i_hmargin
,
int
i_vmargin
,
mtime_t
i_duration
)
{
subpicture_t
*
p_subpic
=
NULL
;
mtime_t
i_now
=
mdate
();
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
);
}
else
{
msg_Warn
(
p_vout
,
"No text renderer found"
);
msg_Warn
(
p_vout
,
"No text renderer found"
);
}
return
p_subpic
;
}
...
...
@@ -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
* is about to be shown
*/
void
vout_ShowTextAbsolute
(
vout_thread_t
*
p_vout
,
char
*
psz_string
,
text_style_t
*
p_style
,
int
i_flags
,
int
i_hmargin
,
int
i_vmargin
,
mtime_t
i_start
,
mtime_t
i_stop
)
void
vout_ShowTextAbsolute
(
vout_thread_t
*
p_vout
,
char
*
psz_string
,
text_style_t
*
p_style
,
int
i_flags
,
int
i_hmargin
,
int
i_vmargin
,
mtime_t
i_start
,
mtime_t
i_stop
)
{
if
(
p_vout
->
pf_add_string
)
{
p_vout
->
pf_add_string
(
p_vout
,
psz_string
,
p_style
,
i_flags
,
i_hmargin
,
i_vmargin
,
i_start
,
i_stop
);
p_vout
->
pf_add_string
(
p_vout
,
psz_string
,
p_style
,
i_flags
,
i_hmargin
,
i_vmargin
,
i_start
,
i_stop
);
}
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,
* 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 psz_string The text to be shown
**/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment