Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
acbad93b
Commit
acbad93b
authored
Sep 21, 2008
by
Rémi Denis-Courmont
Browse files
lower case the module_* functions
parent
d72063d6
Changes
61
Hide whitespace changes
Inline
Side-by-side
include/vlc_common.h
View file @
acbad93b
...
...
@@ -533,7 +533,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */
/* Object properties */
\
volatile bool b_error;
/**< set by the object */
\
volatile bool b_die;
/**< set by the outside */
\
bool b_force;
/**< set by the outside (eg. module_
N
eed()) */
\
bool b_force;
/**< set by the outside (eg. module_
n
eed()) */
\
\
/** Just a reminder so that people don't cast garbage */
\
bool be_sure_to_add_VLC_COMMON_MEMBERS_to_struct; \
...
...
include/vlc_modules.h
View file @
acbad93b
...
...
@@ -30,18 +30,18 @@
* Exported functions.
*****************************************************************************/
#define module_
N
eed(a,b,c,d) __module_
N
eed(VLC_OBJECT(a),b,c,d)
VLC_EXPORT
(
module_t
*
,
__module_
N
eed
,
(
vlc_object_t
*
,
const
char
*
,
const
char
*
,
bool
)
);
#define module_
U
nneed(a,b) __module_
U
nneed(VLC_OBJECT(a),b)
VLC_EXPORT
(
void
,
__module_
U
nneed
,
(
vlc_object_t
*
,
module_t
*
)
);
#define module_
E
xists(a,b) __module_
E
xists(VLC_OBJECT(a),b)
VLC_EXPORT
(
bool
,
__module_
E
xists
,
(
vlc_object_t
*
,
const
char
*
)
);
#define module_
n
eed(a,b,c,d) __module_
n
eed(VLC_OBJECT(a),b,c,d)
VLC_EXPORT
(
module_t
*
,
__module_
n
eed
,
(
vlc_object_t
*
,
const
char
*
,
const
char
*
,
bool
)
);
#define module_
u
nneed(a,b) __module_
u
nneed(VLC_OBJECT(a),b)
VLC_EXPORT
(
void
,
__module_
u
nneed
,
(
vlc_object_t
*
,
module_t
*
)
);
#define module_
e
xists(a,b) __module_
e
xists(VLC_OBJECT(a),b)
VLC_EXPORT
(
bool
,
__module_
e
xists
,
(
vlc_object_t
*
,
const
char
*
)
);
#define module_
F
ind(a,b) __module_
F
ind(VLC_OBJECT(a),b)
VLC_EXPORT
(
module_t
*
,
__module_
F
ind
,
(
vlc_object_t
*
,
const
char
*
)
);
#define module_
f
ind(a,b) __module_
f
ind(VLC_OBJECT(a),b)
VLC_EXPORT
(
module_t
*
,
__module_
f
ind
,
(
vlc_object_t
*
,
const
char
*
)
);
VLC_EXPORT
(
module_config_t
*
,
module_
GetC
onfig
,
(
const
module_t
*
,
unsigned
*
)
);
VLC_EXPORT
(
void
,
module_
PutC
onfig
,
(
module_config_t
*
)
);
VLC_EXPORT
(
module_config_t
*
,
module_
c
onfig
_get
,
(
const
module_t
*
,
unsigned
*
)
);
VLC_EXPORT
(
void
,
module_
c
onfig
_free
,
(
module_config_t
*
)
);
VLC_EXPORT
(
module_t
*
,
module_hold
,
(
module_t
*
module
)
);
VLC_EXPORT
(
void
,
module_release
,
(
module_t
*
module
)
);
...
...
@@ -57,20 +57,20 @@ VLC_EXPORT(char **, __module_GetModulesNamesForCapability,
(
vlc_object_t
*
p_this
,
const
char
*
psz_capability
,
char
***
psz_longname
)
);
VLC_EXPORT
(
bool
,
module_
IsCapable
,
(
const
module_t
*
m
,
const
char
*
cap
)
);
VLC_EXPORT
(
const
char
*
,
module_
G
et
ObjName
,
(
const
module_t
*
m
)
);
VLC_EXPORT
(
const
char
*
,
module_
G
et
N
ame
,
(
const
module_t
*
m
,
bool
long_name
)
);
#define module_GetLongName( m ) module_
G
et
N
ame( m, true )
VLC_EXPORT
(
const
char
*
,
module_
G
et
H
elp
,
(
const
module_t
*
m
)
);
VLC_EXPORT
(
bool
,
module_
provides
,
(
const
module_t
*
m
,
const
char
*
cap
)
);
VLC_EXPORT
(
const
char
*
,
module_
g
et
_object
,
(
const
module_t
*
m
)
);
VLC_EXPORT
(
const
char
*
,
module_
g
et
_n
ame
,
(
const
module_t
*
m
,
bool
long_name
)
);
#define module_GetLongName( m ) module_
g
et
_n
ame( m, true )
VLC_EXPORT
(
const
char
*
,
module_
g
et
_h
elp
,
(
const
module_t
*
m
)
);
#define module_
G
et
M
ain
Module
(a) __module_
G
et
M
ain
Module
(VLC_OBJECT(a))
static
inline
module_t
*
__module_
G
et
M
ain
Module
(
vlc_object_t
*
p_this
)
#define module_
g
et
_m
ain(a) __module_
g
et
_m
ain(VLC_OBJECT(a))
static
inline
module_t
*
__module_
g
et
_m
ain
(
vlc_object_t
*
p_this
)
{
return
module_
F
ind
(
p_this
,
"main"
);
return
module_
f
ind
(
p_this
,
"main"
);
}
static
inline
bool
module_
IsMainModule
(
const
module_t
*
p_module
)
static
inline
bool
module_
is_main
(
const
module_t
*
p_module
)
{
return
!
strcmp
(
module_
G
et
ObjName
(
p_module
),
"main"
);
return
!
strcmp
(
module_
g
et
_object
(
p_module
),
"main"
);
}
modules/access/screen/screen.c
View file @
acbad93b
...
...
@@ -350,7 +350,7 @@ void RenderCursor( demux_t *p_demux, int i_x, int i_y,
p_sys
->
p_blend
->
fmt_in
.
video
=
p_sys
->
p_mouse
->
format
;
p_sys
->
p_blend
->
fmt_out
=
p_sys
->
fmt
;
p_sys
->
p_blend
->
p_module
=
module_
N
eed
(
p_sys
->
p_blend
,
"video blending"
,
0
,
0
);
module_
n
eed
(
p_sys
->
p_blend
,
"video blending"
,
0
,
0
);
if
(
!
p_sys
->
p_blend
->
p_module
)
{
msg_Err
(
p_demux
,
"Could not load video blending module"
);
...
...
modules/access/screen/x11.c
View file @
acbad93b
...
...
@@ -108,7 +108,7 @@ int screen_CloseCapture( demux_t *p_demux )
XCloseDisplay
(
p_display
);
if
(
p_sys
->
p_blend
)
{
module_
U
nneed
(
p_sys
->
p_blend
,
p_sys
->
p_blend
->
p_module
);
module_
u
nneed
(
p_sys
->
p_blend
,
p_sys
->
p_blend
->
p_module
);
vlc_object_detach
(
p_sys
->
p_blend
);
vlc_object_release
(
p_sys
->
p_blend
);
}
...
...
modules/access/vcdx/demux.c
View file @
acbad93b
...
...
@@ -95,7 +95,7 @@ int VCDInit ( vlc_object_t *p_this )
}
p_input
->
p_private
=
(
void
*
)
&
p_demux
->
mpeg
;
p_demux
->
p_module
=
module_
N
eed
(
p_input
,
"mpeg-system"
,
NULL
,
0
);
p_demux
->
p_module
=
module_
n
eed
(
p_input
,
"mpeg-system"
,
NULL
,
0
);
if
(
p_demux
->
p_module
==
NULL
)
{
free
(
p_input
->
p_demux_data
);
...
...
@@ -134,7 +134,7 @@ void VCDEnd ( vlc_object_t *p_this )
p_vcd
->
p_intf
=
NULL
;
module_
U
nneed
(
p_input
,
p_input
->
p_demux_data
->
p_module
);
module_
u
nneed
(
p_input
,
p_input
->
p_demux_data
->
p_module
);
free
(
p_input
->
p_demux_data
);
}
...
...
modules/codec/mpeg_audio.c
View file @
acbad93b
...
...
@@ -144,7 +144,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* HACK: Don't use this codec if we don't have an mpga audio filter */
if
(
p_dec
->
i_object_type
==
VLC_OBJECT_DECODER
&&
!
module_
E
xists
(
p_this
,
"mpgatofixed32"
)
)
!
module_
e
xists
(
p_this
,
"mpgatofixed32"
)
)
{
return
VLC_EGENERIC
;
}
...
...
modules/codec/subtitles/subsusf.c
View file @
acbad93b
...
...
@@ -519,7 +519,7 @@ static int ParseImageAttachments( decoder_t *p_dec )
fmt_out
.
i_chroma
=
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'A'
);
/* Find a suitable decoder module */
if
(
module_
E
xists
(
p_dec
,
"sdl_image"
)
)
if
(
module_
e
xists
(
p_dec
,
"sdl_image"
)
)
{
/* ffmpeg thinks it can handle bmp properly but it can't (at least
* not all of them), so use sdl_image if it is available */
...
...
modules/control/http/mvar.c
View file @
acbad93b
...
...
@@ -344,11 +344,11 @@ mvar_t *mvar_ObjectSetNew( intf_thread_t *p_intf, char *psz_name,
for
(
i
=
0
;
i
<
p_list
->
i_count
;
i
++
)
{
module_t
*
p_parser
=
(
module_t
*
)
p_list
->
p_values
[
i
].
p_object
;
if
(
module_
IsCapable
(
p_parser
,
psz_capability
)
)
if
(
module_
provides
(
p_parser
,
psz_capability
)
)
{
mvar_t
*
sd
=
mvar_New
(
"sd"
,
module_
G
et
ObjName
(
p_parser
)
);
mvar_t
*
sd
=
mvar_New
(
"sd"
,
module_
g
et
_object
(
p_parser
)
);
mvar_AppendNewVar
(
sd
,
"name"
,
module_
G
et
N
ame
(
p_parser
,
true
)
);
module_
g
et
_n
ame
(
p_parser
,
true
)
);
mvar_AppendVar
(
s
,
sd
);
}
}
...
...
modules/gui/fbosd.c
View file @
acbad93b
...
...
@@ -547,7 +547,7 @@ static int OpenBlending( intf_thread_t *p_intf )
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'A'
);
p_intf
->
p_sys
->
p_blend
->
p_module
=
module_
N
eed
(
p_intf
->
p_sys
->
p_blend
,
"video blending"
,
0
,
0
);
module_
n
eed
(
p_intf
->
p_sys
->
p_blend
,
"video blending"
,
0
,
0
);
if
(
!
p_intf
->
p_sys
->
p_blend
->
p_module
)
return
VLC_EGENERIC
;
...
...
@@ -560,7 +560,7 @@ static void CloseBlending( intf_thread_t *p_intf )
if
(
p_intf
->
p_sys
->
p_blend
)
{
if
(
p_intf
->
p_sys
->
p_blend
->
p_module
)
module_
U
nneed
(
p_intf
->
p_sys
->
p_blend
,
module_
u
nneed
(
p_intf
->
p_sys
->
p_blend
,
p_intf
->
p_sys
->
p_blend
->
p_module
);
vlc_object_detach
(
p_intf
->
p_sys
->
p_blend
);
...
...
@@ -590,13 +590,13 @@ static int OpenTextRenderer( intf_thread_t *p_intf )
if
(
psz_modulename
&&
*
psz_modulename
)
{
p_intf
->
p_sys
->
p_text
->
p_module
=
module_
N
eed
(
p_intf
->
p_sys
->
p_text
,
"text renderer"
,
module_
n
eed
(
p_intf
->
p_sys
->
p_text
,
"text renderer"
,
psz_modulename
,
true
);
}
if
(
!
p_intf
->
p_sys
->
p_text
->
p_module
)
{
p_intf
->
p_sys
->
p_text
->
p_module
=
module_
N
eed
(
p_intf
->
p_sys
->
p_text
,
"text renderer"
,
0
,
0
);
module_
n
eed
(
p_intf
->
p_sys
->
p_text
,
"text renderer"
,
0
,
0
);
}
free
(
psz_modulename
);
...
...
@@ -611,7 +611,7 @@ static void CloseTextRenderer( intf_thread_t *p_intf )
if
(
p_intf
->
p_sys
->
p_text
)
{
if
(
p_intf
->
p_sys
->
p_text
->
p_module
)
module_
U
nneed
(
p_intf
->
p_sys
->
p_text
,
module_
u
nneed
(
p_intf
->
p_sys
->
p_text
,
p_intf
->
p_sys
->
p_text
->
p_module
);
vlc_object_detach
(
p_intf
->
p_sys
->
p_text
);
...
...
modules/gui/macosx/playlistinfo.m
View file @
acbad93b
...
...
@@ -405,9 +405,9 @@ static VLCInfo *_o_sharedInstance = nil;
PL_LOCK
;
p_playlist
->
p_private
=
&
p_export
;
module_t
*
p_mod
=
module_
N
eed
(
p_playlist
,
"meta writer"
,
NULL
,
0
);
module_t
*
p_mod
=
module_
n
eed
(
p_playlist
,
"meta writer"
,
NULL
,
0
);
if
(
p_mod
)
module_
U
nneed
(
p_playlist
,
p_mod
);
module_
u
nneed
(
p_playlist
,
p_mod
);
PL_UNLOCK
;
val
.
b_bool
=
true
;
...
...
modules/gui/macosx/prefs.m
View file @
acbad93b
...
...
@@ -315,7 +315,7 @@ static VLCTreeItem *o_root_item = nil;
int
i
=
0
;
if
(
[[
self
name
]
isEqualToString
:
@"main"
]
)
{
p_main_module
=
module_
G
et
M
ain
Module
(
p_intf
);
p_main_module
=
module_
g
et
_m
ain
(
p_intf
);
assert
(
p_main_module
);
/* We found the main module */
...
...
@@ -323,7 +323,7 @@ static VLCTreeItem *o_root_item = nil;
* generate their config panel them when it is asked by the user. */
VLCTreeItem
*
p_last_category
=
NULL
;
unsigned
int
i_confsize
;
p_items
=
module_
GetC
onfig
(
p_main_module
,
&
i_confsize
);
p_items
=
module_
c
onfig
_get
(
p_main_module
,
&
i_confsize
);
o_children
=
[[
NSMutableArray
alloc
]
initWithCapacity
:
10
];
for
(
int
i
=
0
;
i
<
i_confsize
;
i
++
)
{
...
...
@@ -401,12 +401,12 @@ static VLCTreeItem *o_root_item = nil;
p_module
=
(
module_t
*
)
p_list
->
p_values
[
i
].
p_object
;
/* Exclude the main module */
if
(
module_
IsMainModule
(
p_module
)
)
if
(
module_
is_main
(
p_module
)
)
continue
;
/* Exclude empty plugins (submodules don't have config */
/* options, they are stored in the parent module) */
p_items
=
module_
GetC
onfig
(
p_module
,
&
confsize
);
p_items
=
module_
c
onfig
_get
(
p_module
,
&
confsize
);
unsigned
int
j
;
...
...
@@ -465,7 +465,7 @@ static VLCTreeItem *o_root_item = nil;
[
p_subcategory_item
->
o_children
addObject
:[[
VLCTreeItem
alloc
]
initWithName:
[[
VLCMain
sharedInstance
]
localizedString:
module_
G
et
N
ame
(
p_module
,
false
)
]
localizedString:
module_
g
et
_n
ame
(
p_module
,
false
)
]
withTitle:
[[
VLCMain
sharedInstance
]
localizedString:
module_GetLongName
(
p_module
)
]
withHelp:
@""
...
...
@@ -527,10 +527,10 @@ static VLCTreeItem *o_root_item = nil;
{
p_parser
=
(
module_t
*
)
p_list
->
p_values
[
i_index
].
p_object
;
if
(
!
strcmp
(
module_
G
et
ObjName
(
p_parser
),
psz_module_name
)
)
if
(
!
strcmp
(
module_
g
et
_object
(
p_parser
),
psz_module_name
)
)
{
unsigned
int
confsize
;
module_
GetC
onfig
(
p_parser
,
&
confsize
);
module_
c
onfig
_get
(
p_parser
,
&
confsize
);
BOOL
b_has_prefs
=
confsize
!=
0
;
vlc_list_release
(
p_list
);
return
(
b_has_prefs
);
...
...
@@ -572,7 +572,7 @@ static VLCTreeItem *o_root_item = nil;
p_module
=
(
module_t
*
)
[
self
vlcObject
];
assert
(
p_module
);
p_items
=
module_
GetC
onfig
(
p_module
,
&
confsize
);
p_items
=
module_
c
onfig
_get
(
p_module
,
&
confsize
);
for
(
unsigned
int
i
=
0
;
i
<
confsize
;
i
++
)
{
...
...
@@ -602,12 +602,12 @@ static VLCTreeItem *o_root_item = nil;
}
else
{
p_main_module
=
module_
G
et
M
ain
Module
(
p_intf
);
p_main_module
=
module_
g
et
_m
ain
(
p_intf
);
assert
(
p_main_module
);
module_config_t
*
p_items
;
unsigned
int
i
,
confsize
;
p_items
=
module_
GetC
onfig
(
p_main_module
,
&
confsize
);
p_items
=
module_
c
onfig
_get
(
p_main_module
,
&
confsize
);
/* We need to first, find the right (sub)category,
* and then abort when we find a new (sub)category. Part of the Ugliness. */
...
...
modules/gui/macosx/prefs_widgets.m
View file @
acbad93b
...
...
@@ -1289,14 +1289,14 @@
if
(
p_item
->
i_type
==
CONFIG_ITEM_MODULE
)
{
if
(
module_
IsCapable
(
p_parser
,
p_item
->
psz_type
)
)
if
(
module_
provides
(
p_parser
,
p_item
->
psz_type
)
)
{
NSString
*
o_description
=
[[
VLCMain
sharedInstance
]
localizedString:
module_GetLongName
(
p_parser
)];
[
o_popup
addItemWithTitle
:
o_description
];
if
(
p_item
->
value
.
psz
&&
!
strcmp
(
p_item
->
value
.
psz
,
module_
G
et
ObjName
(
p_parser
)
)
)
!
strcmp
(
p_item
->
value
.
psz
,
module_
g
et
_object
(
p_parser
)
)
)
[
o_popup
selectItem
:[
o_popup
lastItem
]];
}
}
...
...
@@ -1304,14 +1304,14 @@
{
int
i
;
if
(
!
strcmp
(
module_
G
et
ObjName
(
p_parser
),
"main"
)
)
if
(
!
strcmp
(
module_
g
et
_object
(
p_parser
),
"main"
)
)
continue
;
unsigned
int
confsize
;
unsigned
int
unused
;
module_
GetC
onfig
(
p_parser
,
&
confsize
);
module_
c
onfig
_get
(
p_parser
,
&
confsize
);
for
(
i
=
0
;
i
<
confsize
;
i
++
)
{
module_config_t
*
p_config
=
module_
GetC
onfig
(
p_parser
,
&
unused
)
+
i
;
module_config_t
*
p_config
=
module_
c
onfig
_get
(
p_parser
,
&
unused
)
+
i
;
/* Hack: required subcategory is stored in i_min */
if
(
p_config
->
i_type
==
CONFIG_SUBCATEGORY
&&
p_config
->
value
.
i
==
p_item
->
min
.
i
)
...
...
@@ -1321,7 +1321,7 @@
[
o_popup
addItemWithTitle
:
o_description
];
if
(
p_item
->
value
.
psz
&&
!
strcmp
(
p_item
->
value
.
psz
,
module_
G
et
ObjName
(
p_parser
))
)
module_
g
et
_object
(
p_parser
))
)
[
o_popup
selectItem
:[
o_popup
lastItem
]];
}
}
...
...
@@ -1368,13 +1368,13 @@
if
(
p_item
->
i_type
==
CONFIG_ITEM_MODULE
)
{
if
(
module_
IsCapable
(
p_parser
,
p_item
->
psz_type
)
)
if
(
module_
provides
(
p_parser
,
p_item
->
psz_type
)
)
{
NSString
*
o_description
=
[[
VLCMain
sharedInstance
]
localizedString:
module_GetLongName
(
p_parser
)];
if
(
[
newval
isEqualToString
:
o_description
]
)
{
returnval
=
strdup
(
module_
G
et
ObjName
(
p_parser
));
returnval
=
strdup
(
module_
g
et
_object
(
p_parser
));
break
;
}
}
...
...
@@ -1383,13 +1383,13 @@
{
int
i
;
if
(
!
strcmp
(
module_
G
et
ObjName
(
p_parser
),
"main"
)
)
if
(
!
strcmp
(
module_
g
et
_object
(
p_parser
),
"main"
)
)
continue
;
unsigned
int
confsize
,
unused
;
module_
GetC
onfig
(
p_parser
,
&
confsize
);
module_
c
onfig
_get
(
p_parser
,
&
confsize
);
for
(
i
=
0
;
i
<
confsize
;
i
++
)
{
module_config_t
*
p_config
=
module_
GetC
onfig
(
p_parser
,
&
unused
)
+
i
;
module_config_t
*
p_config
=
module_
c
onfig
_get
(
p_parser
,
&
unused
)
+
i
;
/* Hack: required subcategory is stored in i_min */
if
(
p_config
->
i_type
==
CONFIG_SUBCATEGORY
&&
p_config
->
value
.
i
==
p_item
->
min
.
i
)
...
...
@@ -1398,7 +1398,7 @@
localizedString:
module_GetLongName
(
p_parser
)];
if
(
[
newval
isEqualToString
:
o_description
]
)
{
returnval
=
strdup
(
module_
G
et
ObjName
(
p_parser
));
returnval
=
strdup
(
module_
g
et
_object
(
p_parser
));
break
;
}
}
...
...
@@ -2057,16 +2057,16 @@ if( _p_item->i_type == CONFIG_ITEM_MODULE_LIST )
int
i
;
p_parser
=
(
module_t
*
)
p_list
->
p_values
[
i_module_index
].
p_object
;
if
(
!
strcmp
(
module_
G
et
ObjName
(
p_parser
),
"main"
)
)
if
(
!
strcmp
(
module_
g
et
_object
(
p_parser
),
"main"
)
)
continue
;
unsigned
int
confsize
;
module_
GetC
onfig
(
p_parser
,
&
confsize
);
module_
c
onfig
_get
(
p_parser
,
&
confsize
);
for
(
i
=
0
;
i
<
confsize
;
i
++
)
{
unsigned
int
unused
;
module_config_t
*
p_config
=
module_
GetC
onfig
(
p_parser
,
&
unused
)
+
i
;
module_config_t
*
p_config
=
module_
c
onfig
_get
(
p_parser
,
&
unused
)
+
i
;
NSString
*
o_modulelongname
,
*
o_modulename
;
NSNumber
*
o_moduleenabled
=
nil
;
...
...
@@ -2077,10 +2077,10 @@ if( _p_item->i_type == CONFIG_ITEM_MODULE_LIST )
o_modulelongname
=
[
NSString
stringWithUTF8String
:
module_GetLongName
(
p_parser
)];
o_modulename
=
[
NSString
stringWithUTF8String
:
module_
G
et
ObjName
(
p_parser
)];
module_
g
et
_object
(
p_parser
)];
if
(
_p_item
->
value
.
psz
&&
strstr
(
_p_item
->
value
.
psz
,
module_
G
et
ObjName
(
p_parser
)
)
)
strstr
(
_p_item
->
value
.
psz
,
module_
g
et
_object
(
p_parser
)
)
)
o_moduleenabled
=
[
NSNumber
numberWithBool
:
YES
];
else
o_moduleenabled
=
[
NSNumber
numberWithBool
:
NO
];
...
...
modules/gui/macosx/simple_prefs.m
View file @
acbad93b
...
...
@@ -382,10 +382,10 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
for
(
int
i_index
=
0
;
i_index
<
p_list
->
i_count
;
i_index
++
)
{
p_parser
=
(
module_t
*
)
p_list
->
p_values
[
i_index
].
p_object
;
if
(
p_parser
&&
module_
IsCapable
(
p_parser
,
p_item
->
psz_type
)
)
if
(
p_parser
&&
module_
provides
(
p_parser
,
p_item
->
psz_type
)
)
{
[
object
addItemWithTitle
:
[
NSString
stringWithUTF8String
:
module_GetLongName
(
p_parser
)
?:
""
]];
if
(
p_item
->
value
.
psz
&&
!
strcmp
(
p_item
->
value
.
psz
,
module_
G
et
ObjName
(
p_parser
)
)
)
if
(
p_item
->
value
.
psz
&&
!
strcmp
(
p_item
->
value
.
psz
,
module_
g
et
_object
(
p_parser
)
)
)
[
object
selectItem
:
[
object
lastItem
]];
}
}
...
...
@@ -434,7 +434,7 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
[
self
setupButton
:
o_audio_visual_pop
forModuleList
:
"audio-visual"
];
/* Last.FM is optional */
if
(
module_
E
xists
(
p_intf
,
"audioscrobbler"
)
)
if
(
module_
e
xists
(
p_intf
,
"audioscrobbler"
)
)
{
[
o_audio_lastuser_fld
setStringValue
:
[
NSString
stringWithUTF8String
:
config_GetPsz
(
p_intf
,
"lastfm-username"
)
?:
""
]];
[
o_audio_lastpwd_sfld
setStringValue
:
[
NSString
stringWithUTF8String
:
config_GetPsz
(
p_intf
,
"lastfm-password"
)
?:
""
]];
...
...
@@ -535,9 +535,9 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
int
i_cache
=
config_GetInt
(
p_intf
,
"file-caching"
);
TestCaC
(
"udp-caching"
);
if
(
module_
E
xists
(
p_intf
,
"dvdread"
)
)
if
(
module_
e
xists
(
p_intf
,
"dvdread"
)
)
TestCaC
(
"dvdread-caching"
);
if
(
module_
E
xists
(
p_intf
,
"dvdnav"
)
)
if
(
module_
e
xists
(
p_intf
,
"dvdnav"
)
)
TestCaC
(
"dvdnav-caching"
);
TestCaC
(
"tcp-caching"
);
TestCaC
(
"fake-caching"
);
...
...
@@ -547,7 +547,7 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
TestCaCi
(
"rtsp-caching"
,
4
);
TestCaCi
(
"ftp-caching"
,
2
);
TestCaCi
(
"http-caching"
,
4
);
if
(
module_
E
xists
(
p_intf
,
"access_realrtsp"
))
if
(
module_
e
xists
(
p_intf
,
"access_realrtsp"
))
TestCaCi
(
"realrtsp-caching"
,
10
);
TestCaCi
(
"mms-caching"
,
19
);
if
(
b_cache_equal
)
...
...
@@ -685,11 +685,11 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
{
p_parser
=
(
module_t
*
)
p_list
->
p_values
[
i_module_index
].
p_object
;
if
(
p_item
->
i_type
==
CONFIG_ITEM_MODULE
&&
module_
IsCapable
(
p_parser
,
p_item
->
psz_type
)
)
if
(
p_item
->
i_type
==
CONFIG_ITEM_MODULE
&&
module_
provides
(
p_parser
,
p_item
->
psz_type
)
)
{
if
(
[[[
object
selectedItem
]
title
]
isEqualToString
:
_NS
(
module_GetLongName
(
p_parser
)
)]
)
{
config_PutPsz
(
p_intf
,
name
,
strdup
(
module_
G
et
ObjName
(
p_parser
)));
config_PutPsz
(
p_intf
,
name
,
strdup
(
module_
g
et
_object
(
p_parser
)));
break
;
}
}
...
...
@@ -772,7 +772,7 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
SaveModuleList
(
o_audio_visual_pop
,
"audio-visual"
);
/* Last.FM is optional */
if
(
module_
E
xists
(
p_intf
,
"audioscrobbler"
)
)
if
(
module_
e
xists
(
p_intf
,
"audioscrobbler"
)
)
{
[
o_audio_last_ckb
setEnabled
:
YES
];
if
(
[
o_audio_last_ckb
state
]
==
NSOnState
)
...
...
@@ -852,12 +852,12 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
#define CaC( name ) CaCi( name, 1 )
msg_Dbg
(
p_intf
,
"Adjusting all cache values to: %i"
,
[[
o_input_cachelevel_pop
selectedItem
]
tag
]
);
CaC
(
"udp-caching"
);
if
(
module_
E
xists
(
p_intf
,
"dvdread"
)
)
if
(
module_
e
xists
(
p_intf
,
"dvdread"
)
)
{
CaC
(
"dvdread-caching"
);
i
=
i
+
config_SaveConfigFile
(
p_intf
,
"dvdread"
);
}
if
(
module_
E
xists
(
p_intf
,
"dvdnav"
)
)
if
(
module_
e
xists
(
p_intf
,
"dvdnav"
)
)
{
CaC
(
"dvdnav-caching"
);
i
=
i
+
config_SaveConfigFile
(
p_intf
,
"dvdnav"
);
...
...
@@ -867,7 +867,7 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
CaC
(
"screen-caching"
);
CaCi
(
"rtsp-caching"
,
4
);
CaCi
(
"ftp-caching"
,
2
);
CaCi
(
"http-caching"
,
4
);
if
(
module_
E
xists
(
p_intf
,
"access_realrtsp"
)
)
if
(
module_
e
xists
(
p_intf
,
"access_realrtsp"
)
)
{
CaCi
(
"realrtsp-caching"
,
10
);
i
=
i
+
config_SaveConfigFile
(
p_intf
,
"access_realrtsp"
);
...
...
modules/gui/pda/pda.c
View file @
acbad93b
...
...
@@ -94,7 +94,7 @@ static int Open( vlc_object_t *p_this )
#ifdef NEED_GTK2_MAIN
msg_Dbg
(
p_intf
,
"Using gui-helper"
);
p_intf
->
p_sys
->
p_gtk_main
=
module_
N
eed
(
p_this
,
"gui-helper"
,
"gtk2"
,
true
);
module_
n
eed
(
p_this
,
"gui-helper"
,
"gtk2"
,
true
);
if
(
p_intf
->
p_sys
->
p_gtk_main
==
NULL
)
{
free
(
p_intf
->
p_sys
);
...
...
@@ -128,7 +128,7 @@ static void Close( vlc_object_t *p_this )
#ifdef NEED_GTK2_MAIN
msg_Dbg
(
p_intf
,
"Releasing gui-helper"
);
module_
U
nneed
(
p_intf
,
p_intf
->
p_sys
->
p_gtk_main
);
module_
u
nneed
(
p_intf
,
p_intf
->
p_sys
->
p_gtk_main
);
#endif
/* Destroy structure */
...
...
@@ -367,7 +367,7 @@ void GtkAutoPlayFile( vlc_object_t *p_this )
{
p_intf
=
(
intf_thread_t
*
)
p_list
->
p_values
[
i_index
].
p_object
;
if
(
strcmp
(
MODULE_STRING
,
module_
G
et
ObjName
(
p_intf
->
p_module
)
)
)
if
(
strcmp
(
MODULE_STRING
,
module_
g
et
_object
(
p_intf
->
p_module
)
)
)
{
continue
;
}
...
...
modules/gui/qt4/components/complete_preferences.cpp
View file @
acbad93b
...
...
@@ -75,14 +75,14 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
#undef BI
/* Build the tree for the main module */
module_t
*
p_module
=
module_
G
et
M
ain
Module
(
p_intf
);
module_t
*
p_module
=
module_
g
et
_m
ain
(
p_intf
);
/* Initialisation and get the confsize */
PrefsItemData
*
data
=
NULL
;
PrefsItemData
*
data_sub
=
NULL
;
QTreeWidgetItem
*
current_item
=
NULL
;
unsigned
confsize
;
module_config_t
*
const
p_config
=
module_
GetC
onfig
(
p_module
,
&
confsize
);
module_config_t
*
const
p_config
=
module_
c
onfig
_get
(
p_module
,
&
confsize
);
/* Go through the list of conf */
for
(
size_t
i
=
0
;
i
<
confsize
;
i
++
)
...
...
@@ -190,7 +190,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
/* Other items don't need yet a place on the tree */
}
}
module_
PutC
onfig
(
p_config
);
module_
c
onfig
_free
(
p_config
);
vlc_object_release
(
(
vlc_object_t
*
)
p_module
);
...
...
@@ -203,11 +203,11 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
p_module
=
(
module_t
*
)
p_list
->
p_values
[
i_index
].
p_object
;
// Main module excluded
if
(
module_
IsMainModule
(
p_module
)
)
continue
;
if
(
module_
is_main
(
p_module
)
)
continue
;
unsigned
i_subcategory
=
0
,
i_category
=
0
,
confsize
;
bool
b_options
=
false
;
module_config_t
*
const
p_config
=
module_
GetC
onfig
(
p_module
,
&
confsize
);
module_config_t
*
const
p_config
=
module_
c
onfig
_get
(
p_module
,
&
confsize
);
/* Loop through the configurations items */
for
(
size_t
i
=
0
;
i
<
confsize
;
i
++
)
...
...
@@ -225,7 +225,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
if
(
b_options
&&
i_category
&&
i_subcategory
)
break
;
}
module_
PutC
onfig
(
p_config
);
module_
c
onfig
_free
(
p_config
);
/* Dummy item, please proceed */
if
(
!
b_options
||
i_category
==
0
||
i_subcategory
==
0
)
continue
;
...
...
@@ -270,10 +270,10 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
PrefsItemData
*
module_data
=
new
PrefsItemData
();
module_data
->
i_type
=
TYPE_MODULE
;
module_data
->
psz_name
=
strdup
(
module_
G
et
ObjName
(
p_module
)
);
module_data
->
psz_name
=
strdup
(
module_
g
et
_object
(
p_module
)
);
module_data
->
help
.
clear
();
QTreeWidgetItem
*
module_item
=
new
QTreeWidgetItem
();
module_item
->
setText
(
0
,
qtr
(
module_
G
et
N
ame
(
p_module
,
false
)
)
);
module_item
->
setText
(
0
,
qtr
(
module_
g
et
_n
ame
(
p_module
,
false
)
)
);
module_item
->
setData
(
0
,
Qt
::
UserRole
,
QVariant
::
fromValue
(
module_data
)
);
module_item
->
setSizeHint
(
0
,
QSize
(
-
1
,
ITEM_HEIGHT
)
);
...
...
@@ -358,15 +358,15 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
if
(
data
->
i_type
==
TYPE_CATEGORY
)
return
;
else
if
(
data
->
i_type
==
TYPE_MODULE
)
p_module
=
module_
F
ind
(
p_intf
,
data
->
psz_name
);
p_module
=
module_
f
ind
(
p_intf
,
data
->
psz_name
);
else
{
p_module
=
module_
G
et
M
ain
Module
(
p_intf
);
p_module
=
module_
g
et
_m
ain
(
p_intf
);
assert
(
p_module
);
}
unsigned
confsize
;
module_config_t
*
const
p_config
=
module_
GetC
onfig
(
p_module
,
&
confsize
),
module_config_t
*
const
p_config
=
module_
c
onfig
_get
(
p_module
,
&
confsize
),
*
p_item
=
p_config
,
*
p_end
=
p_config
+
confsize
;
...
...
@@ -399,7 +399,7 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
}
else
{
const
char
*
psz_help
=
module_
G
et
H
elp
(
p_module
);