Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
59bd8e14
Commit
59bd8e14
authored
Jan 25, 2004
by
Anil Daoud
Browse files
* string review.
parent
09d8db82
Changes
22
Hide whitespace changes
Inline
Side-by-side
modules/control/corba/README
View file @
59bd8e14
$Id: README,v 1.
1
200
3
/0
7/07 16:59:00 sam
Exp $
$Id: README,v 1.
2
200
4
/0
1/25 16:17:03 anil
Exp $
* Module (server) side
** Dependencies
To compile the CORBA
plugin
, you need the orbit2 developpement files
To compile the CORBA
module
, you need the orbit2 developpement files
(for Debian, install the package liborbi2-dev)
** How to run it ?
...
...
modules/control/corba/client.py
View file @
59bd8e14
...
...
@@ -12,7 +12,7 @@ def quit ():
except
:
pass
print
"
Chargement de l'IDL
"
print
"
IDL loading
"
ORBit
.
load_typelib
(
"./MediaControl.so"
)
import
VLC
...
...
@@ -20,13 +20,13 @@ if len(sys.argv) < 1:
print
"Usage: %s"
%
sys
.
argv
[
0
]
sys
.
exit
(
1
)
print
"
I
nitiali
s
ation
de l'ORB
"
print
"
ORB i
nitiali
z
ation"
orb
=
CORBA
.
ORB_init
()
ior
=
open
(
"/tmp/vlc-ior.ref"
).
readline
()
mc
=
orb
.
string_to_object
(
ior
)
print
"Objet mc %s"
%
mc
print
"Obje
c
t mc %s"
%
mc
pos
=
mc
.
get_media_position
(
0
,
0
)
print
"pos = mc.get_media_position (0,0)"
...
...
modules/control/corba/corba.c
View file @
59bd8e14
/*****************************************************************************
* corba.c : CORBA (ORBit) remote control
plugin
for vlc
* corba.c : CORBA (ORBit) remote control
module
for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: corba.c,v 1.
3
2004/01/
0
5 1
3:07:02 zorglub
Exp $
* $Id: corba.c,v 1.
4
2004/01/
2
5 1
6:17:03 anil
Exp $
*
* Authors: Olivier Aubert <oaubert at lisi dot univ-lyon1 dot fr>
*
...
...
@@ -337,7 +337,7 @@ impl_VLC_MediaControl_get_media_position(impl_POA_VLC_MediaControl * servant,
}
/* We are asked for an AbsolutePosition. */
/* Cf
plugins
/gtk/gtk_display.c */
/* Cf
modules/gui
/gtk/gtk_display.c */
/* The lock is taken by the currentOffset function */
l_offset
=
currentOffset
(
p_input
);
...
...
@@ -459,7 +459,7 @@ impl_VLC_MediaControl_start(impl_POA_VLC_MediaControl * servant,
{
/* FIXME: we should raise an appropriate exception, but we must
define it in the IDL first */
msg_Err
(
servant
->
p_intf
,
"
Error:
no playlist available
.
"
);
msg_Err
(
servant
->
p_intf
,
"no playlist available"
);
return
;
}
...
...
@@ -474,7 +474,7 @@ impl_VLC_MediaControl_start(impl_POA_VLC_MediaControl * servant,
{
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_object_release
(
p_playlist
);
msg_Err
(
servant
->
p_intf
,
"
Error:
playlist empty
.
"
);
msg_Err
(
servant
->
p_intf
,
"playlist empty"
);
}
return
;
...
...
@@ -486,7 +486,7 @@ impl_VLC_MediaControl_pause(impl_POA_VLC_MediaControl * servant,
{
input_thread_t
*
p_input
=
servant
->
p_intf
->
p_sys
->
p_input
;
msg_Warn
(
servant
->
p_intf
,
"
C
alling MediaControl::pause"
);
msg_Warn
(
servant
->
p_intf
,
"
c
alling MediaControl::pause"
);
if
(
p_input
!=
NULL
)
{
...
...
@@ -502,7 +502,7 @@ impl_VLC_MediaControl_resume(impl_POA_VLC_MediaControl * servant,
{
input_thread_t
*
p_input
=
servant
->
p_intf
->
p_sys
->
p_input
;
msg_Warn
(
servant
->
p_intf
,
"
C
alling MediaControl::resume"
);
msg_Warn
(
servant
->
p_intf
,
"
c
alling MediaControl::resume"
);
if
(
p_input
!=
NULL
)
{
...
...
@@ -520,7 +520,7 @@ impl_VLC_MediaControl_stop(impl_POA_VLC_MediaControl * servant,
playlist_t
*
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
msg_Warn
(
servant
->
p_intf
,
"
C
alling MediaControl::stop"
);
msg_Warn
(
servant
->
p_intf
,
"
c
alling MediaControl::stop"
);
if
(
p_playlist
!=
NULL
)
{
...
...
@@ -535,7 +535,7 @@ static void
impl_VLC_MediaControl_exit
(
impl_POA_VLC_MediaControl
*
servant
,
CORBA_Environment
*
ev
)
{
msg_Warn
(
servant
->
p_intf
,
"
C
alling MediaControl::exit"
);
msg_Warn
(
servant
->
p_intf
,
"
c
alling MediaControl::exit"
);
vlc_mutex_lock
(
&
servant
->
p_intf
->
change_lock
);
servant
->
p_intf
->
b_die
=
TRUE
;
...
...
@@ -551,11 +551,11 @@ impl_VLC_MediaControl_add_to_playlist(impl_POA_VLC_MediaControl * servant,
playlist_t
*
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
msg_Warn
(
servant
->
p_intf
,
"
C
alling MediaControl::add_to_playlist %s"
,
psz_file
);
msg_Warn
(
servant
->
p_intf
,
"
c
alling MediaControl::add_to_playlist %s"
,
psz_file
);
if
(
p_playlist
==
NULL
)
{
msg_Err
(
servant
->
p_intf
,
"
Error:
no playlist defined"
);
msg_Err
(
servant
->
p_intf
,
"no playlist defined"
);
/* FIXME: should return an exception */
return
;
}
...
...
@@ -577,7 +577,7 @@ impl_VLC_MediaControl_get_playlist(impl_POA_VLC_MediaControl * servant,
FIND_ANYWHERE
);
int
i_playlist_size
;
msg_Warn
(
servant
->
p_intf
,
"
C
alling MediaControl::get_playlist"
);
msg_Warn
(
servant
->
p_intf
,
"
c
alling MediaControl::get_playlist"
);
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
i_playlist_size
=
p_playlist
->
i_size
;
...
...
@@ -611,8 +611,7 @@ static void Run ( intf_thread_t * );
* Module descriptor
*****************************************************************************/
vlc_module_begin
();
add_category_hint
(
N_
(
"Corba control"
),
NULL
,
VLC_FALSE
);
set_description
(
_
(
"corba control module"
)
);
set_description
(
_
(
"Corba control module"
)
);
set_capability
(
"interface"
,
10
);
set_callbacks
(
Open
,
Close
);
vlc_module_end
();
...
...
@@ -658,7 +657,7 @@ static void Close( vlc_object_t *p_this )
ev
=
CORBA_exception__alloc
();
CORBA_ORB_shutdown
(
p_intf
->
p_sys
->
orb
,
FALSE
,
ev
);
handle_exception_no_servant
(
p_intf
,
"
E
rreur dans Close"
);
handle_exception_no_servant
(
p_intf
,
"
e
rreur dans Close"
);
if
(
p_intf
->
p_sys
->
p_input
)
{
...
...
@@ -684,7 +683,7 @@ static gboolean Manage (gpointer p_interface)
b_work_pending
=
CORBA_ORB_work_pending
(
p_intf
->
p_sys
->
orb
,
ev
);
if
(
ev
->
_major
!=
CORBA_NO_EXCEPTION
)
{
msg_Err
(
p_intf
,
"
E
xception
dans la vrif d'vnements CORBA
"
);
msg_Err
(
p_intf
,
"
e
xception
in the CORBA events check
"
);
return
FALSE
;
}
...
...
@@ -775,21 +774,21 @@ static void Run ( intf_thread_t *p_intf )
cleaning it */
/* p_intf->p_sys->orb = gnome_CORBA_init ("VLC", NULL, &argc, &argv, 0, NULL, ev); */
handle_exception_no_servant
(
p_intf
,
"
E
xception during CORBA_ORB_init"
);
handle_exception_no_servant
(
p_intf
,
"
e
xception during CORBA_ORB_init"
);
p_intf
->
p_sys
->
root_poa
=
(
PortableServer_POA
)
CORBA_ORB_resolve_initial_references
(
p_intf
->
p_sys
->
orb
,
"RootPOA"
,
ev
);
handle_exception
(
"
E
xception during RootPOA initialization"
);
handle_exception
(
"
e
xception during RootPOA initialization"
);
p_intf
->
p_sys
->
mc
=
impl_VLC_MediaControl__create
(
p_intf
->
p_sys
->
root_poa
,
ev
);
handle_exception
(
"
E
xception during MediaControl initialization"
);
handle_exception
(
"
e
xception during MediaControl initialization"
);
servant
=
(
impl_POA_VLC_MediaControl
*
)
PortableServer_POA_reference_to_servant
(
p_intf
->
p_sys
->
root_poa
,
p_intf
->
p_sys
->
mc
,
ev
);
handle_exception
(
"
E
xception during MediaControl access"
);
handle_exception
(
"
e
xception during MediaControl access"
);
servant
->
p_intf
=
p_intf
;
psz_objref
=
CORBA_ORB_object_to_string
(
p_intf
->
p_sys
->
orb
,
p_intf
->
p_sys
->
mc
,
ev
);
handle_exception
(
"
E
xception during IOR generation"
);
handle_exception
(
"
e
xception during IOR generation"
);
msg_Warn
(
p_intf
,
"MediaControl IOR :"
);
msg_Warn
(
p_intf
,
psz_objref
);
...
...
@@ -800,7 +799,7 @@ static void Run ( intf_thread_t *p_intf )
fp
=
fopen
(
VLC_IOR_FILE
,
"w"
);
if
(
fp
==
NULL
)
{
msg_Err
(
servant
->
p_intf
,
"
C
annot write the IOR to %s (%d)."
,
VLC_IOR_FILE
,
errno
);
msg_Err
(
servant
->
p_intf
,
"
c
annot write the IOR to %s (%d)."
,
VLC_IOR_FILE
,
errno
);
}
else
{
...
...
@@ -812,11 +811,11 @@ static void Run ( intf_thread_t *p_intf )
msg_Warn
(
p_intf
,
"get_the_POAManager (state %s)"
,
p_intf
->
p_sys
->
root_poa
);
p_intf
->
p_sys
->
root_poa_manager
=
PortableServer_POA__get_the_POAManager
(
p_intf
->
p_sys
->
root_poa
,
ev
);
handle_exception
(
"
E
xception during POAManager resolution"
);
handle_exception
(
"
e
xception during POAManager resolution"
);
msg_Warn
(
p_intf
,
"
A
ctivating POAManager"
);
msg_Warn
(
p_intf
,
"
a
ctivating POAManager"
);
PortableServer_POAManager_activate
(
p_intf
->
p_sys
->
root_poa_manager
,
ev
);
handle_exception
(
"
E
xception during POAManager activation"
);
handle_exception
(
"
e
xception during POAManager activation"
);
msg_Info
(
p_intf
,
"corba remote control interface initialized"
);
...
...
@@ -832,12 +831,12 @@ static void Run ( intf_thread_t *p_intf )
name_service = CORBA_ORB_resolve_initial_references (p_intf->p_sys->orb,
"NameService",
ev);
handle_exception ("
Error:
could not get name service: %s\n",
handle_exception ("could not get name service: %s\n",
CORBA_exception_id(ev));
msg_Warn (p_intf, "Name service OK");
CosNaming_NamingContext_bind (name_service, &name, p_intf->p_sys->mc, ev);
handle_exception ("
Error:
could not register object: %s\n",
handle_exception ("could not register object: %s\n",
CORBA_exception_id(ev));
}
*/
...
...
@@ -847,7 +846,7 @@ static void Run ( intf_thread_t *p_intf )
i_event_source
=
g_timeout_add
(
INTF_IDLE_SLEEP
/
10000
,
Manage
,
p_intf
);
msg_Warn
(
p_intf
,
"
E
ntering mainloop"
);
msg_Warn
(
p_intf
,
"
e
ntering mainloop"
);
p_intf
->
p_sys
->
corbaloop
=
g_main_loop_new
(
NULL
,
FALSE
);
g_main_loop_run
(
p_intf
->
p_sys
->
corbaloop
);
...
...
@@ -856,6 +855,6 @@ static void Run ( intf_thread_t *p_intf )
g_source_remove
(
i_event_source
);
unlink
(
VLC_IOR_FILE
);
msg_Warn
(
p_intf
,
"
N
ormal termination of VLC corba
plugin
"
);
msg_Warn
(
p_intf
,
"
n
ormal termination of VLC corba
module
"
);
return
;
}
modules/control/corba/simpleplayer.py
View file @
59bd8e14
...
...
@@ -72,7 +72,7 @@ class DVDControl (Connect):
self
.
gui
.
get_widget
(
"win"
).
set_title
(
title
)
def
launch_player
(
self
):
"""Launch the VLC corba
plugin
"""
"""Launch the VLC corba
module
"""
#print "Launching vlc server..."
# FIXME: spawn is portable, but how can we make sure that
# launch-vlc-corba launches the application in the background ?
...
...
modules/control/gestures.c
View file @
59bd8e14
/*****************************************************************************
* ge
a
tures.c: control vlc with mouse gestures
* ge
s
tures.c: control vlc with mouse gestures
*****************************************************************************
* Copyright (C) 200
2
VideoLAN
* $Id: gestures.c,v 1.
6
200
3/1
1/
0
5
00:39:16 gbazin
Exp $
* Copyright (C) 200
4
VideoLAN
* $Id: gestures.c,v 1.
7
200
4/0
1/
2
5
16:17:03 anil
Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
...
...
@@ -74,25 +74,24 @@ static void RunIntf ( intf_thread_t *p_intf );
/*****************************************************************************
* Module descriptor
*****************************************************************************/
#define THRESHOLD_TEXT N_( "Motion threshold" )
#define THRESHOLD_TEXT N_( "Motion threshold
(10-100)
" )
#define THRESHOLD_LONGTEXT N_( \
"
the a
mount of movement required for a mouse" \
" gesture to be recorded" )
"
A
mount of movement required for a mouse" \
" gesture to be recorded
.
" )
#define BUTTON_TEXT N_( "
Mouse
button" )
#define BUTTON_TEXT N_( "
Trigger
button" )
#define BUTTON_LONGTEXT N_( \
"
the mouse button to be held down during
mouse gestures" )
"
You can set the trigger button for
mouse gestures
here.
" )
static
char
*
button_list
[]
=
{
"left"
,
"middle"
,
"right"
};
static
char
*
button_list_text
[]
=
{
N_
(
"Left"
),
N_
(
"Middle"
),
N_
(
"Right"
)
};
vlc_module_begin
();
add_category_hint
(
N_
(
"Gestures"
),
NULL
,
VLC_FALSE
);
add_integer
(
"gestures-threshold"
,
30
,
NULL
,
THRESHOLD_TEXT
,
THRESHOLD_LONGTEXT
,
VLC_TRUE
);
add_string
(
"gestures-button"
,
"right"
,
NULL
,
BUTTON_TEXT
,
BUTTON_LONGTEXT
,
VLC_FALSE
);
change_string_list
(
button_list
,
button_list_text
,
0
);
set_description
(
_
(
"
m
ouse gestures control interface"
)
);
set_description
(
_
(
"
M
ouse gestures control interface"
)
);
set_capability
(
"interface"
,
0
);
set_callbacks
(
E_
(
Open
),
E_
(
Close
)
);
...
...
@@ -199,7 +198,7 @@ static void RunIntf( intf_thread_t *p_intf )
p_intf
->
p_vlc
->
b_die
=
VLC_TRUE
;
break
;
case
GESTURE
(
DOWN
,
LEFT
,
UP
,
RIGHT
):
msg_Dbg
(
p_intf
,
"
A
square!"
);
msg_Dbg
(
p_intf
,
"
a
square!"
);
break
;
default:
break
;
...
...
modules/control/hotkeys.c
View file @
59bd8e14
/*****************************************************************************
* hotkeys.c: Hotkey handling for vlc
*****************************************************************************
* Copyright (C) 200
3
VideoLAN
* $Id: hotkeys.c,v 1.1
5
200
3/12/15 13:38:27 hartman
Exp $
* Copyright (C) 200
4
VideoLAN
* $Id: hotkeys.c,v 1.1
6
200
4/01/25 16:17:03 anil
Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
...
...
@@ -80,10 +80,10 @@ static void SetBookmark ( intf_thread_t *, int );
#define BOOKMARK9_TEXT N_("Playlist bookmark 9")
#define BOOKMARK10_TEXT N_("Playlist bookmark 10")
#define BOOKMARK_LONGTEXT N_( \
"This option allows you to define playlist bookmarks")
"This option allows you to define playlist bookmarks
.
")
vlc_module_begin
();
set_description
(
_
(
"
h
otkey interface"
)
);
set_description
(
_
(
"
H
otkey
s management
interface"
)
);
add_string
(
"bookmark1"
,
NULL
,
NULL
,
BOOKMARK1_TEXT
,
BOOKMARK_LONGTEXT
,
VLC_FALSE
);
add_string
(
"bookmark2"
,
NULL
,
NULL
,
...
...
@@ -232,7 +232,7 @@ static void Run( intf_thread_t *p_intf )
if
(
i_action
==
ACTIONID_QUIT
)
{
p_intf
->
p_vlc
->
b_die
=
VLC_TRUE
;
vout_OSDMessage
(
VLC_OBJECT
(
p_intf
),
_
(
"Quit"
)
);
vout_OSDMessage
(
VLC_OBJECT
(
p_intf
),
_
(
"Quit"
)
);
continue
;
}
else
if
(
i_action
==
ACTIONID_VOL_UP
)
...
...
@@ -257,7 +257,7 @@ static void Run( intf_thread_t *p_intf )
aout_VolumeMute
(
p_intf
,
&
i_newvol
);
if
(
i_newvol
==
0
)
{
vout_OSDMessage
(
VLC_OBJECT
(
p_intf
),
"Mute"
);
vout_OSDMessage
(
VLC_OBJECT
(
p_intf
),
_
(
"Mute"
)
);
}
else
{
...
...
@@ -483,7 +483,7 @@ static int KeyEvent( vlc_object_t *p_this, char const *psz_var,
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
change_lock
);
if
(
p_intf
->
p_sys
->
i_size
==
BUFFER_SIZE
)
{
msg_Warn
(
p_intf
,
"
E
vent buffer full, dropping keypress"
);
msg_Warn
(
p_intf
,
"
e
vent buffer full, dropping keypress"
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
change_lock
);
return
VLC_EGENERIC
;
}
...
...
@@ -554,7 +554,7 @@ static void SetBookmark( intf_thread_t *p_intf, int i_num )
var_Create
(
p_intf
,
psz_bookmark_name
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
val
.
psz_string
=
strdup
(
p_playlist
->
pp_items
[
p_playlist
->
i_index
]
->
psz_uri
);
var_Set
(
p_intf
,
psz_bookmark_name
,
val
);
msg_Info
(
p_intf
,
"
S
etting playlist bookmark %i to %s"
,
i_num
,
val
.
psz_string
);
msg_Info
(
p_intf
,
"
s
etting playlist bookmark %i to %s"
,
i_num
,
val
.
psz_string
);
vlc_object_release
(
p_playlist
);
}
}
modules/control/http.c
View file @
59bd8e14
...
...
@@ -2,7 +2,7 @@
* http.c : http mini-server ;)
*****************************************************************************
* Copyright (C) 2001-2004 VideoLAN
* $Id: http.c,v 1.
49
2004/01/
18 07:35:31 fenrir
Exp $
* $Id: http.c,v 1.
50
2004/01/
25 16:17:03 anil
Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Laurent Aimar <fenrir@via.ecp.fr>
...
...
@@ -71,13 +71,12 @@ static void Close ( vlc_object_t * );
#define HOST_TEXT N_( "Host address" )
#define HOST_LONGTEXT N_( \
"You can set the address and port
on which
the http interface will bind" )
"You can set the address and port the http interface will bind
to.
" )
#define SRC_TEXT N_( "Source directory" )
#define SRC_LONGTEXT N_( "Source directory" )
vlc_module_begin
();
set_description
(
_
(
"HTTP remote control interface"
)
);
add_category_hint
(
N_
(
"HTTP remote control"
),
NULL
,
VLC_TRUE
);
add_string
(
"http-host"
,
NULL
,
NULL
,
HOST_TEXT
,
HOST_LONGTEXT
,
VLC_TRUE
);
add_string
(
"http-src"
,
NULL
,
NULL
,
SRC_TEXT
,
SRC_LONGTEXT
,
VLC_TRUE
);
set_capability
(
"interface"
,
0
);
...
...
@@ -586,7 +585,7 @@ static int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
f
=
malloc
(
sizeof
(
httpd_file_callback_args_t
)
);
if
(
!
f
)
{
msg_Err
(
p_intf
,
"
O
ut of memory"
);
msg_Err
(
p_intf
,
"
o
ut of memory"
);
closedir
(
p_dir
);
return
(
VLC_ENOMEM
);
}
...
...
@@ -597,7 +596,7 @@ static int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
if
(
!
f
->
name
||
!
f
->
mime
)
{
msg_Err
(
p_intf
,
"
U
nable to parse directory"
);
msg_Err
(
p_intf
,
"
u
nable to parse directory"
);
closedir
(
p_dir
);
free
(
f
);
return
(
VLC_ENOMEM
);
...
...
@@ -626,7 +625,7 @@ static int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
f
=
malloc
(
sizeof
(
httpd_file_callback_args_t
)
);
if
(
!
f
)
{
msg_Err
(
p_intf
,
"
O
ut of memory"
);
msg_Err
(
p_intf
,
"
o
ut of memory"
);
closedir
(
p_dir
);
return
(
VLC_ENOMEM
);
}
...
...
modules/control/joystick.c
View file @
59bd8e14
/*****************************************************************************
* joystick.c: control vlc with a joystick
*****************************************************************************
* Copyright (C) 200
2
VideoLAN
* $Id: joystick.c,v 1.
3
200
3/12/22 02:24:51 sam
Exp $
* Copyright (C) 200
4
VideoLAN
* $Id: joystick.c,v 1.
4
200
4/01/25 16:17:03 anil
Exp $
*
* Authors: Clément Stenac <zorglub@via.ecp.fr>
*
...
...
@@ -137,33 +137,30 @@ static void Run ( intf_thread_t *p_intf );
*****************************************************************************/
#define THRESHOLD_TEXT N_( "Motion threshold" )
#define THRESHOLD_LONGTEXT N_( \
"
The a
mount of joystick movement required for a movement to be " \
"recorded (0->32767)" )
"
A
mount of joystick movement required for a movement to be " \
"recorded (0->32767)
.
" )
#define DEVICE_TEXT N_( "Joystick device" )
#define DEVICE_LONGTEXT N_( \
"The joystick device (usually /dev/js0 or /dev/input/js0)")
"The joystick device (usually /dev/js0 or /dev/input/js0)
.
")
#define REPEAT_TEXT N_( "Repeat time" )
#define REPEAT_TEXT N_( "Repeat time
(ms)
" )
#define REPEAT_LONGTEXT N_( \
"
The time
waited before the action is repeated if it is still " \
"triggered, in milliseconds" )
"
Delay
waited before the action is repeated if it is still " \
"triggered, in milliseconds
.
" )
#define WAIT_TEXT N_( "Wait time")
#define WAIT_TEXT N_( "Wait time
(ms)
")
#define WAIT_LONGTEXT N_(\
"The time waited before the repeat starts, in milliseconds.")
#define SEEK_TEXT N_( "Max seek interval")
#define SEEK_TEXT N_( "Max seek interval
(seconds)
")
#define SEEK_LONGTEXT N_(\
"The maximum number of seconds that will be seeked at a time." )
#define MAP_TEXT N_( "Action mapping")
#define MAP_LONGTEXT N_(\
"Allows you to remap the actions. For details," \
" please have a look at http://wiki.videolan.org/index.php/Joystick" )
#define MAP_LONGTEXT N_( "Allows you to remap the actions." )
vlc_module_begin
();
add_category_hint
(
N_
(
"Joystick"
),
NULL
,
VLC_FALSE
);
add_integer
(
"motion-threshold"
,
DEFAULT_THRESHOLD
,
NULL
,
THRESHOLD_TEXT
,
THRESHOLD_LONGTEXT
,
VLC_TRUE
);
add_string
(
"joystick-device"
,
DEFAULT_DEVICE
,
NULL
,
...
...
@@ -176,7 +173,7 @@ vlc_module_begin();
SEEK_TEXT
,
SEEK_LONGTEXT
,
VLC_TRUE
);
add_string
(
"joystick-mapping"
,
DEFAULT_MAPPING
,
NULL
,
MAP_TEXT
,
MAP_LONGTEXT
,
VLC_TRUE
);
set_description
(
_
(
"
j
oystick control interface"
)
);
set_description
(
_
(
"
J
oystick control interface"
)
);
set_capability
(
"interface"
,
0
);
set_callbacks
(
Open
,
Close
);
vlc_module_end
();
...
...
@@ -316,7 +313,7 @@ static int Init( intf_thread_t * p_intf )
if
(
p_intf
->
p_sys
->
i_fd
==
-
1
)
{
msg_Warn
(
p_intf
,
"
U
nable to open %s for reading: %s"
msg_Warn
(
p_intf
,
"
u
nable to open %s for reading: %s"
,
psz_device
,
strerror
(
errno
));
return
-
1
;
}
...
...
@@ -342,12 +339,12 @@ static int Init( intf_thread_t * p_intf )
if
(
!
psz_parse
)
{
msg_Warn
(
p_intf
,
"
I
nvalid mapping.
A
borting"
);
msg_Warn
(
p_intf
,
"
i
nvalid mapping.
a
borting
.
"
);
return
-
1
;
}
if
(
!
strlen
(
psz_parse
)
)
{
msg_Warn
(
p_intf
,
"
I
nvalid mapping
. A
borting"
);
msg_Warn
(
p_intf
,
"
i
nvalid mapping
, a
borting
.
"
);
return
-
1
;
}
...
...
@@ -438,7 +435,7 @@ static int handle_event ( intf_thread_t *p_intf, struct js_event event)
abs
(
event
.
value
-
p_intf
->
p_sys
->
axes
[
2
].
i_value
)
>
200
)
{
p_intf
->
p_sys
->
axes
[
2
].
i_value
=
event
.
value
;
msg_Dbg
(
p_intf
,
"
U
pdating volume"
);
msg_Dbg
(
p_intf
,
"
u
pdating volume"
);
/* This way, the volume is between 0 and 1024 */
aout_VolumeSet
(
p_intf
,
(
32767
-
event
.
value
)
/
64
);
return
0
;
...
...
@@ -482,13 +479,13 @@ static int handle_event ( intf_thread_t *p_intf, struct js_event event)
if
(
p_intf
->
p_sys
->
axes
[
i_axe
].
i_value
>
p_intf
->
p_sys
->
i_threshold
)
{
msg_Dbg
(
p_intf
,
"
U
p for axis %i
\n
"
,
i_axe
);
msg_Dbg
(
p_intf
,
"
u
p for axis %i
\n
"
,
i_axe
);
p_intf
->
p_sys
->
axes
[
i_axe
].
pf_actup
(
p_intf
);
}
else
if
(
p_intf
->
p_sys
->
axes
[
i_axe
].
i_value
<
-
p_intf
->
p_sys
->
i_threshold
)
{
msg_Dbg
(
p_intf
,
"
D
own for axis %i
\n
"
,
i_axe
);
msg_Dbg
(
p_intf
,
"
d
own for axis %i
\n
"
,
i_axe
);
p_intf
->
p_sys
->
axes
[
i_axe
].
pf_actdown
(
p_intf
);
}
...
...
@@ -497,7 +494,7 @@ static int handle_event ( intf_thread_t *p_intf, struct js_event event)
}
else
if
(
event
.
type
==
JS_EVENT_BUTTON
)
{
msg_Dbg
(
p_intf
,
"
B
utton %i %s"
,
event
.
number
,
msg_Dbg
(
p_intf
,
"
b
utton %i %s"
,
event
.
number
,
event
.
value
?
"pressed"
:
"released"
);
if
(
event
.
number
>
1
)
return
0
;
/* Only trigger 2 buttons */
if
(
event
.
value
==
1
)
/* Button pressed */
...
...
@@ -549,7 +546,7 @@ static int Forward(intf_thread_t *p_intf)
{
if
(
p_intf
->
p_sys
->
p_input
)
{
msg_Dbg
(
p_intf
,
"
S
eeking %f seconds"
,
p_intf
->
p_sys
->
f_seconds
);
msg_Dbg
(
p_intf
,
"
s
eeking %f seconds"
,
p_intf
->
p_sys
->
f_seconds
);
input_Seek
(
p_intf
->
p_sys
->
p_input
,
p_intf
->
p_sys
->
f_seconds
,
INPUT_SEEK_SECONDS
|
INPUT_SEEK_CUR
);
return
0
;
...
...
@@ -562,7 +559,7 @@ static int Back(intf_thread_t *p_intf)
{
if
(
p_intf
->
p_sys
->
p_input
)
{
msg_Dbg
(
p_intf
,
"
S
eeking -%f seconds"
,
p_intf
->
p_sys
->
f_seconds
);
msg_Dbg
(
p_intf
,
"
s
eeking -%f seconds"
,
p_intf
->
p_sys
->
f_seconds
);
input_Seek
(
p_intf
->
p_sys
->
p_input
,
-
(
p_intf
->
p_sys
->
f_seconds
),
INPUT_SEEK_SECONDS
|
INPUT_SEEK_CUR
);
return
0
;
...
...
modules/control/lirc/lirc.c
View file @
59bd8e14
/*****************************************************************************
* lirc.c : lirc
plugin
for vlc
* lirc.c : lirc
module
for vlc
*****************************************************************************
* Copyright (C) 200
2
VideoLAN
* $Id: lirc.c,v 1.
9
200
3/12
/2
2
1
4:32:55 sam
Exp $
* Copyright (C) 200
4
VideoLAN
* $Id: lirc.c,v 1.
10
200
4/01
/2
5
1
6:17:03 anil
Exp $
*
* Author: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
...
...
@@ -61,7 +61,7 @@ static void Feedback( intf_thread_t *, char * );
* Module descriptor
*****************************************************************************/
vlc_module_begin
();
set_description
(
_
(
"
i
nfrared remote control interface"
)
);
set_description
(
_
(
"
I
nfrared remote control interface"
)
);
set_capability
(
"interface"
,
0
);
set_callbacks
(
Open
,
Close
);
vlc_module_end
();
...
...
modules/control/ntservice.c
View file @
59bd8e14
/*****************************************************************************
* ntservice.c: Windows NT/2K/XP service interface
*****************************************************************************
* Copyright (C) 200
1
VideoLAN
* $Id: ntservice.c,v 1.
4
200
3/12/22 02:24:51 sam
Exp $
* Copyright (C) 200
4
VideoLAN
* $Id: ntservice.c,v 1.
5
200
4/01/25 16:17:03 anil
Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -54,7 +54,6 @@ static void Close ( vlc_object_t * );
vlc_module_begin
();
set_description
(
_
(
"Windows NT/2K/XP service interface"
)
);
add_category_hint
(
N_
(
"NT service"
),
NULL
,
VLC_TRUE
);
add_bool
(
"ntservice-install"
,
0
,
NULL
,
INSTALL_TEXT
,
INSTALL_LONGTEXT
,
VLC_TRUE
);
add_bool
(
"ntservice-uninstall"
,
0
,
NULL
,
...
...
@@ -158,7 +157,7 @@ static int NTServiceInstall( intf_thread_t *p_intf )
SC_HANDLE
handle
=
OpenSCManager
(
NULL
,
NULL
,
SC_MANAGER_ALL_ACCESS
);
if
(
handle
==
NULL
)
{
msg_Err
(
p_intf
,
"
C
ould not connect to SCM database"
);
msg_Err
(
p_intf
,
"
c
ould not connect to SCM database"
);
return
VLC_EGENERIC
;
}
...
...
@@ -185,20 +184,20 @@ static int NTServiceInstall( intf_thread_t *p_intf )
{
if
(
GetLastError
()
!=
ERROR_SERVICE_EXISTS
)
{
msg_Err
(
p_intf
,
"
C
ould not create new service:
\"
%s
\"
(%s)"
,
msg_Err
(
p_intf
,
"
c
ould not create new service:
\"
%s
\"
(%s)"
,
p_sys
->
psz_service
,
psz_path
);
CloseServiceHandle
(
handle
);
return
VLC_EGENERIC
;
}
else
{
msg_Warn
(
p_intf
,
"
S
ervice
\"
%s
\"
already exists"
,
msg_Warn
(
p_intf
,
"
s
ervice
\"
%s
\"
already exists"
,
p_sys
->
psz_service
);
}
}
else
{
msg_Warn
(
p_intf
,
"
S
ervice successfuly created"
);
msg_Warn
(
p_intf
,
"
s
ervice successfuly created"
);
}
if
(
service
)
CloseServiceHandle
(
service
);
...
...
@@ -214,7 +213,7 @@ static int NTServiceUninstall( intf_thread_t *p_intf )
SC_HANDLE
handle
=
OpenSCManager
(
NULL
,
NULL
,
SC_MANAGER_ALL_ACCESS
);
if
(
handle
==
NULL
)
{
msg_Err
(
p_intf
,
"
C
ould not connect to SCM database"
);
msg_Err
(
p_intf
,
"
c
ould not connect to SCM database"
);
return
VLC_EGENERIC
;
}
...
...
@@ -222,7 +221,7 @@ static int NTServiceUninstall( intf_thread_t *p_intf )
SC_HANDLE
service
=
OpenService
(
handle
,
p_sys
->
psz_service
,
DELETE
);
if
(
service
==
NULL
)
{
msg_Err
(
p_intf
,
"
C
ould not open service"
);