Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
c240692f
Commit
c240692f
authored
Jun 18, 2016
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Common structure for VLC common object members, document
parent
70a05fb5
Changes
130
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
130 changed files
with
397 additions
and
350 deletions
+397
-350
include/vlc_common.h
include/vlc_common.h
+70
-31
include/vlc_interface.h
include/vlc_interface.h
+1
-1
lib/media_player.c
lib/media_player.c
+2
-2
modules/access/archive/access.c
modules/access/archive/access.c
+3
-3
modules/access/http/transport.c
modules/access/http/transport.c
+1
-1
modules/access/http/tunnel.c
modules/access/http/tunnel.c
+1
-1
modules/access/idummy.c
modules/access/idummy.c
+1
-1
modules/access/rar/rar.c
modules/access/rar/rar.c
+3
-3
modules/audio_filter/audiobargraph_a.c
modules/audio_filter/audiobargraph_a.c
+6
-6
modules/audio_filter/compressor.c
modules/audio_filter/compressor.c
+2
-2
modules/audio_filter/equalizer.c
modules/audio_filter/equalizer.c
+2
-2
modules/audio_filter/gain.c
modules/audio_filter/gain.c
+1
-1
modules/audio_filter/normvol.c
modules/audio_filter/normvol.c
+6
-3
modules/audio_filter/spatializer/spatializer.cpp
modules/audio_filter/spatializer/spatializer.cpp
+2
-2
modules/codec/daala.c
modules/codec/daala.c
+1
-1
modules/codec/dvbsub.c
modules/codec/dvbsub.c
+1
-1
modules/codec/flac.c
modules/codec/flac.c
+1
-1
modules/codec/rtpvideo.c
modules/codec/rtpvideo.c
+1
-1
modules/codec/schroedinger.c
modules/codec/schroedinger.c
+1
-1
modules/codec/speex.c
modules/codec/speex.c
+1
-1
modules/codec/t140.c
modules/codec/t140.c
+1
-1
modules/codec/theora.c
modules/codec/theora.c
+1
-1
modules/codec/twolame.c
modules/codec/twolame.c
+1
-1
modules/codec/vorbis.c
modules/codec/vorbis.c
+1
-1
modules/codec/x264.c
modules/codec/x264.c
+1
-1
modules/codec/x265.c
modules/codec/x265.c
+1
-1
modules/codec/zvbi.c
modules/codec/zvbi.c
+2
-2
modules/control/dbus/dbus_root.c
modules/control/dbus/dbus_root.c
+2
-2
modules/control/gestures.c
modules/control/gestures.c
+1
-1
modules/control/globalhotkeys/win32.c
modules/control/globalhotkeys/win32.c
+3
-3
modules/control/globalhotkeys/xcb.c
modules/control/globalhotkeys/xcb.c
+3
-3
modules/control/hotkeys.c
modules/control/hotkeys.c
+6
-6
modules/control/lirc.c
modules/control/lirc.c
+1
-1
modules/control/ntservice.c
modules/control/ntservice.c
+1
-1
modules/control/oldrc.c
modules/control/oldrc.c
+8
-8
modules/demux/adaptive/xml/DOMParser.cpp
modules/demux/adaptive/xml/DOMParser.cpp
+3
-3
modules/demux/avformat/demux.c
modules/demux/avformat/demux.c
+2
-2
modules/demux/demuxdump.c
modules/demux/demuxdump.c
+1
-1
modules/demux/dirac.c
modules/demux/dirac.c
+1
-1
modules/demux/flac.c
modules/demux/flac.c
+1
-1
modules/demux/mjpeg.c
modules/demux/mjpeg.c
+1
-1
modules/demux/mkv/demux.cpp
modules/demux/mkv/demux.cpp
+2
-2
modules/demux/mod.c
modules/demux/mod.c
+1
-1
modules/demux/mpc.c
modules/demux/mpc.c
+1
-1
modules/demux/mpeg/h26x.c
modules/demux/mpeg/h26x.c
+2
-2
modules/demux/mpeg/mpgv.c
modules/demux/mpeg/mpgv.c
+1
-1
modules/demux/mpeg/ps.c
modules/demux/mpeg/ps.c
+1
-1
modules/demux/mpeg/ts.c
modules/demux/mpeg/ts.c
+1
-1
modules/demux/nsv.c
modules/demux/nsv.c
+1
-1
modules/demux/ogg.c
modules/demux/ogg.c
+1
-1
modules/demux/playlist/dvb.c
modules/demux/playlist/dvb.c
+1
-1
modules/demux/playlist/wpl.c
modules/demux/playlist/wpl.c
+3
-3
modules/demux/pva.c
modules/demux/pva.c
+1
-1
modules/demux/rawdv.c
modules/demux/rawdv.c
+1
-1
modules/demux/rawvid.c
modules/demux/rawvid.c
+1
-1
modules/demux/subtitle.c
modules/demux/subtitle.c
+2
-2
modules/demux/tta.c
modules/demux/tta.c
+1
-1
modules/demux/ttml.c
modules/demux/ttml.c
+3
-3
modules/demux/ty.c
modules/demux/ty.c
+1
-1
modules/demux/vc1.c
modules/demux/vc1.c
+1
-1
modules/gui/macosx/CoreInteraction.m
modules/gui/macosx/CoreInteraction.m
+8
-8
modules/gui/macosx/DebugMessageVisualizer.m
modules/gui/macosx/DebugMessageVisualizer.m
+5
-5
modules/gui/macosx/TrackSynchronization.m
modules/gui/macosx/TrackSynchronization.m
+1
-1
modules/gui/macosx/VLCPlaylist.m
modules/gui/macosx/VLCPlaylist.m
+2
-2
modules/gui/macosx/VLCPlaylistInfo.m
modules/gui/macosx/VLCPlaylistInfo.m
+2
-2
modules/gui/macosx/VideoView.m
modules/gui/macosx/VideoView.m
+3
-3
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+4
-4
modules/gui/macosx/prefs_widgets.m
modules/gui/macosx/prefs_widgets.m
+1
-1
modules/gui/macosx/simple_prefs.m
modules/gui/macosx/simple_prefs.m
+1
-1
modules/gui/ncurses.c
modules/gui/ncurses.c
+5
-5
modules/gui/qt/components/complete_preferences.cpp
modules/gui/qt/components/complete_preferences.cpp
+1
-1
modules/gui/qt/components/extended_panels.cpp
modules/gui/qt/components/extended_panels.cpp
+4
-4
modules/gui/qt/dialogs/messages.cpp
modules/gui/qt/dialogs/messages.cpp
+5
-5
modules/gui/qt/dialogs_provider.cpp
modules/gui/qt/dialogs_provider.cpp
+2
-2
modules/gui/qt/input_manager.cpp
modules/gui/qt/input_manager.cpp
+3
-3
modules/gui/qt/main_interface.cpp
modules/gui/qt/main_interface.cpp
+10
-10
modules/gui/qt/menus.cpp
modules/gui/qt/menus.cpp
+1
-1
modules/gui/qt/qt.cpp
modules/gui/qt/qt.cpp
+2
-2
modules/gui/skins2/commands/cmd_quit.cpp
modules/gui/skins2/commands/cmd_quit.cpp
+1
-1
modules/gui/skins2/os2/os2_factory.cpp
modules/gui/skins2/os2/os2_factory.cpp
+1
-1
modules/gui/skins2/src/dialogs.cpp
modules/gui/skins2/src/dialogs.cpp
+2
-2
modules/gui/skins2/src/vlcproc.cpp
modules/gui/skins2/src/vlcproc.cpp
+2
-2
modules/gui/skins2/win32/win32_factory.cpp
modules/gui/skins2/win32/win32_factory.cpp
+1
-1
modules/gui/skins2/x11/x11_loop.cpp
modules/gui/skins2/x11/x11_loop.cpp
+1
-1
modules/lua/extension.c
modules/lua/extension.c
+1
-1
modules/lua/intf.c
modules/lua/intf.c
+6
-6
modules/lua/libs/misc.c
modules/lua/libs/misc.c
+1
-1
modules/lua/libs/objects.c
modules/lua/libs/objects.c
+1
-1
modules/lua/libs/variables.c
modules/lua/libs/variables.c
+2
-2
modules/misc/logger.c
modules/misc/logger.c
+1
-1
modules/misc/webservices/acoustid.c
modules/misc/webservices/acoustid.c
+3
-3
modules/services_discovery/mediadirs.c
modules/services_discovery/mediadirs.c
+3
-3
modules/services_discovery/podcast.c
modules/services_discovery/podcast.c
+5
-5
modules/stream_filter/record.c
modules/stream_filter/record.c
+1
-1
modules/stream_out/bridge.c
modules/stream_out/bridge.c
+5
-5
modules/stream_out/chromecast/chromecast_ctrl.cpp
modules/stream_out/chromecast/chromecast_ctrl.cpp
+5
-5
modules/stream_out/mosaic_bridge.c
modules/stream_out/mosaic_bridge.c
+2
-2
modules/stream_out/record.c
modules/stream_out/record.c
+1
-1
modules/video_filter/audiobargraph_v.c
modules/video_filter/audiobargraph_v.c
+10
-11
modules/video_filter/mosaic.h
modules/video_filter/mosaic.h
+1
-1
modules/video_filter/opencv_example.cpp
modules/video_filter/opencv_example.cpp
+4
-4
modules/video_filter/remoteosd.c
modules/video_filter/remoteosd.c
+2
-2
modules/video_output/decklink.cpp
modules/video_output/decklink.cpp
+2
-2
modules/video_output/win32/win32touch.c
modules/video_output/win32/win32touch.c
+8
-8
modules/video_output/xcb/keys.c
modules/video_output/xcb/keys.c
+1
-1
modules/video_output/xcb/window.c
modules/video_output/xcb/window.c
+6
-6
src/audio_output/common.c
src/audio_output/common.c
+2
-2
src/audio_output/filters.c
src/audio_output/filters.c
+1
-1
src/audio_output/output.c
src/audio_output/output.c
+4
-4
src/audio_output/volume.c
src/audio_output/volume.c
+1
-1
src/config/file.c
src/config/file.c
+1
-1
src/config/intf.c
src/config/intf.c
+16
-10
src/input/input.c
src/input/input.c
+5
-5
src/input/stream_filter.c
src/input/stream_filter.c
+1
-1
src/input/vlm.c
src/input/vlm.c
+5
-5
src/interface/dialog.c
src/interface/dialog.c
+2
-2
src/libvlc.h
src/libvlc.h
+1
-1
src/misc/addons.c
src/misc/addons.c
+4
-4
src/misc/keystore.c
src/misc/keystore.c
+1
-1
src/misc/messages.c
src/misc/messages.c
+7
-7
src/misc/objects.c
src/misc/objects.c
+15
-15
src/misc/update.c
src/misc/update.c
+1
-1
src/misc/variables.c
src/misc/variables.c
+1
-1
src/modules/modules.c
src/modules/modules.c
+4
-4
src/network/tls.c
src/network/tls.c
+1
-1
src/playlist/thread.c
src/playlist/thread.c
+2
-2
src/stream_output/stream_output.c
src/stream_output/stream_output.c
+1
-1
src/video_output/event.h
src/video_output/event.h
+5
-5
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+1
-1
src/video_output/window.c
src/video_output/window.c
+1
-1
No files found.
include/vlc_common.h
View file @
c240692f
...
...
@@ -411,47 +411,86 @@ typedef int ( * vlc_list_callback_t ) ( vlc_object_t *, /* variable's objec
#include "vlc_mtime.h"
#include "vlc_threads.h"
/**
***************************************************************************
/**
* Common structure members
*****************************************************************************/
/* VLC_COMMON_MEMBERS : members common to all basic vlc objects */
#define VLC_COMMON_MEMBERS \
/** \name VLC_COMMON_MEMBERS \
* these members are common for all vlc objects \
*/
\
/**@{*/
\
const char *psz_object_type; \
\
/* Messages header */
\
char *psz_header; \
int i_flags; \
\
/* Object properties */
\
bool b_force;
/**< set by the outside (eg. module_need()) */
\
\
/* Stuff related to the libvlc structure */
\
libvlc_int_t *p_libvlc;
/**< (root of all evil) - 1 */
\
\
vlc_object_t * p_parent;
/**< our parent */
\
\
/**@}*/
\
/* VLC_OBJECT: attempt at doing a clever cast */
#if VLC_GCC_VERSION(4,0)
/**
* VLC object common members
*
* Common public properties for all VLC objects.
* Object also have private properties maintained by the core, see
* \ref vlc_object_internals_t
*/
struct
vlc_common_members
{
/** Object type name
*
* A constant string identifying the type of the object (for logging)
*/
const
char
*
object_type
;
/** Log messages header
*
* Human-readable header for log messages. This is not thread-safe and
* only used by VLM and Lua interfaces.
*/
char
*
header
;
int
flags
;
/** Module probe flag
*
* A boolean during module probing when the probe is "forced".
* See \ref module_need().
*/
bool
force
;
/** LibVLC instance
*
* Root VLC object of the objects tree that this object belongs in.
*/
libvlc_int_t
*
libvlc
;
/** Parent object
*
* The parent VLC object in the objects tree. For the root (the LibVLC
* instance) object, this is NULL.
*/
vlc_object_t
*
parent
;
};
/**
* Backward compatibility macro
*/
#define VLC_COMMON_MEMBERS struct vlc_common_members obj;
/**
* Type-safe vlc_object_t cast
*
* This macro attempts to cast a pointer to a compound type to a
* \ref vlc_object_t pointer in a type-safe manner.
* It checks if the compound type actually starts with an embedded
* \ref vlc_object_t structure.
*/
#if !defined(__cplusplus) && (__STDC_VERSION__ >= 201112L)
# define VLC_OBJECT(x) \
_Generic((x)->obj, \
struct vlc_common_members: (vlc_object_t *)(&(x)->obj) \
)
#elif VLC_GCC_VERSION(4,0)
# ifndef __cplusplus
# define VLC_OBJECT( x ) \
__builtin_choose_expr( \
__builtin_offsetof(__typeof__(*(x)), psz_object_type), \
(void)0
/* screw you */
, \
(vlc_object_t *)(x))
__builtin_types_compatible_p(__typeof__((x)->obj), struct vlc_common_members), \
(vlc_object_t *)(x), (void)0)
# else
# define VLC_OBJECT( x ) \
((vlc_object_t *)(
x
) \
+ 0 * __builtin_offsetof(__typeof__(*(x)),
psz_
object_type))
((vlc_object_t *)(
&((x)->obj)
) \
+ 0 * __builtin_offsetof(__typeof__(*(x)),
obj.
object_type))
# endif
#else
# define VLC_OBJECT( x ) ((vlc_object_t *)(x))
# define VLC_OBJECT( x ) ((vlc_object_t *)
&
(x)
->obj
)
#endif
/*****************************************************************************
...
...
include/vlc_interface.h
View file @
c240692f
...
...
@@ -92,7 +92,7 @@ VLC_API void libvlc_Quit( libvlc_int_t * );
static
inline
playlist_t
*
pl_Get
(
struct
intf_thread_t
*
intf
)
{
return
(
playlist_t
*
)(
intf
->
p_
parent
);
return
(
playlist_t
*
)(
intf
->
obj
.
parent
);
}
/**
...
...
lib/media_player.c
View file @
c240692f
...
...
@@ -739,7 +739,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
* FIXME: It's unclear why we want to put this in public API, and why we
* want to expose it in such a limiting and ugly way.
*/
var_AddCallback
(
mp
->
p_
libvlc
,
"snapshot-file"
,
snapshot_was_taken
,
mp
);
var_AddCallback
(
mp
->
obj
.
libvlc
,
"snapshot-file"
,
snapshot_was_taken
,
mp
);
libvlc_retain
(
instance
);
return
mp
;
...
...
@@ -773,7 +773,7 @@ static void libvlc_media_player_destroy( libvlc_media_player_t *p_mi )
assert
(
p_mi
);
/* Detach Callback from the main libvlc object */
var_DelCallback
(
p_mi
->
p_
libvlc
,
var_DelCallback
(
p_mi
->
obj
.
libvlc
,
"snapshot-file"
,
snapshot_was_taken
,
p_mi
);
/* Detach callback from the media player / input manager object */
...
...
modules/access/archive/access.c
View file @
c240692f
...
...
@@ -118,10 +118,10 @@ static int FindVolumes(access_t *p_access, struct archive *p_archive, const char
break
;
/* Probe URI */
int
i_savedflags
=
p_access
->
i_
flags
;
p_access
->
i_
flags
|=
OBJECT_FLAGS_NOINTERACT
;
int
i_savedflags
=
p_access
->
obj
.
flags
;
p_access
->
obj
.
flags
|=
OBJECT_FLAGS_NOINTERACT
;
stream_t
*
p_stream
=
stream_UrlNew
(
p_access
,
psz_newuri
);
p_access
->
i_
flags
=
i_savedflags
;
p_access
->
obj
.
flags
=
i_savedflags
;
if
(
p_stream
)
{
ppsz_files
[
*
pi_files
]
=
psz_newuri
;
...
...
modules/access/http/transport.c
View file @
c240692f
...
...
@@ -127,7 +127,7 @@ vlc_tls_t *vlc_https_connect(vlc_tls_creds_t *creds, const char *name,
if
(
port
==
0
)
port
=
443
;
int
fd
=
vlc_tcp_connect
(
creds
->
p_
parent
,
name
,
port
);
int
fd
=
vlc_tcp_connect
(
creds
->
obj
.
parent
,
name
,
port
);
if
(
fd
==
-
1
)
return
NULL
;
...
...
modules/access/http/tunnel.c
View file @
c240692f
...
...
@@ -151,7 +151,7 @@ vlc_tls_t *vlc_https_connect_proxy(vlc_tls_creds_t *creds,
sock
=
vlc_https_connect
(
creds
,
url
.
psz_host
,
url
.
i_port
,
&
ptwo
);
else
if
(
!
strcasecmp
(
url
.
psz_protocol
,
"http"
))
sock
=
vlc_http_connect
(
creds
?
creds
->
p_
parent
:
NULL
,
sock
=
vlc_http_connect
(
creds
?
creds
->
obj
.
parent
:
NULL
,
url
.
psz_host
,
url
.
i_port
);
else
sock
=
NULL
;
...
...
modules/access/idummy.c
View file @
c240692f
...
...
@@ -162,7 +162,7 @@ nop:
msg_Info
(
p_demux
,
"command `quit'"
);
p_demux
->
pf_demux
=
DemuxNoOp
;
p_demux
->
pf_control
=
DemuxControl
;
libvlc_Quit
(
p_demux
->
p_
libvlc
);
libvlc_Quit
(
p_demux
->
obj
.
libvlc
);
return
VLC_SUCCESS
;
}
...
...
modules/access/rar/rar.c
View file @
c240692f
...
...
@@ -394,10 +394,10 @@ int RarParse(stream_t *s, int *count, rar_file_t ***file, unsigned int *pi_nbvol
if
(
!
volume_mrl
)
return
VLC_SUCCESS
;
const
int
s_flags
=
s
->
i_
flags
;
s
->
i_
flags
|=
OBJECT_FLAGS_NOINTERACT
;
const
int
s_flags
=
s
->
obj
.
flags
;
s
->
obj
.
flags
|=
OBJECT_FLAGS_NOINTERACT
;
vol
=
stream_UrlNew
(
s
,
volume_mrl
);
s
->
i_
flags
=
s_flags
;
s
->
obj
.
flags
=
s_flags
;
if
(
!
vol
)
{
free
(
volume_mrl
);
...
...
modules/audio_filter/audiobargraph_a.c
View file @
c240692f
...
...
@@ -139,8 +139,8 @@ static int Open( vlc_object_t *p_this )
p_filter
->
fmt_out
.
audio
=
p_filter
->
fmt_in
.
audio
;
p_filter
->
pf_audio_filter
=
DoWork
;
var_Create
(
p_filter
->
p_
libvlc
,
"audiobargraph_v-alarm"
,
VLC_VAR_BOOL
);
var_Create
(
p_filter
->
p_
libvlc
,
"audiobargraph_v-i_values"
,
VLC_VAR_STRING
);
var_Create
(
p_filter
->
obj
.
libvlc
,
"audiobargraph_v-alarm"
,
VLC_VAR_BOOL
);
var_Create
(
p_filter
->
obj
.
libvlc
,
"audiobargraph_v-i_values"
,
VLC_VAR_STRING
);
return
VLC_SUCCESS
;
}
...
...
@@ -157,7 +157,7 @@ static void SendValues(filter_t *p_filter, float *value, int nbChannels)
}
//msg_Dbg(p_filter, "values: %s", message);
var_SetString
(
p_filter
->
p_
libvlc
,
"audiobargraph_v-i_values"
,
msg
);
var_SetString
(
p_filter
->
obj
.
libvlc
,
"audiobargraph_v-i_values"
,
msg
);
}
/*****************************************************************************
...
...
@@ -223,7 +223,7 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
sum
=
sqrtf
(
sum
);
/* 5 - compare it to the threshold */
var_SetBool
(
p_filter
->
p_
libvlc
,
"audiobargraph_v-alarm"
,
var_SetBool
(
p_filter
->
obj
.
libvlc
,
"audiobargraph_v-alarm"
,
sum
<
p_sys
->
alarm_threshold
);
p_sys
->
lastAlarm
=
p_in_buf
->
i_pts
;
...
...
@@ -246,8 +246,8 @@ static void Close( vlc_object_t *p_this )
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
var_Destroy
(
p_filter
->
p_
libvlc
,
"audiobargraph_v-i_values"
);
var_Destroy
(
p_filter
->
p_
libvlc
,
"audiobargraph_v-alarm"
);
var_Destroy
(
p_filter
->
obj
.
libvlc
,
"audiobargraph_v-i_values"
);
var_Destroy
(
p_filter
->
obj
.
libvlc
,
"audiobargraph_v-alarm"
);
while
(
p_sys
->
first
!=
NULL
)
{
ValueDate_t
*
current
=
p_sys
->
first
;
...
...
modules/audio_filter/compressor.c
View file @
c240692f
...
...
@@ -205,7 +205,7 @@ vlc_module_end ()
static
int
Open
(
vlc_object_t
*
p_this
)
{
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
vlc_object_t
*
p_aout
=
p_filter
->
p_
parent
;
vlc_object_t
*
p_aout
=
p_filter
->
obj
.
parent
;
float
f_sample_rate
=
p_filter
->
fmt_in
.
audio
.
i_rate
;
float
f_num
;
...
...
@@ -270,7 +270,7 @@ static int Open( vlc_object_t *p_this )
static
void
Close
(
vlc_object_t
*
p_this
)
{
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
vlc_object_t
*
p_aout
=
p_filter
->
p_
parent
;
vlc_object_t
*
p_aout
=
p_filter
->
obj
.
parent
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
/* Remove our callbacks */
...
...
modules/audio_filter/equalizer.c
View file @
c240692f
...
...
@@ -282,7 +282,7 @@ static int EqzInit( filter_t *p_filter, int i_rate )
eqz_config_t
cfg
;
int
i
,
ch
;
vlc_value_t
val1
,
val2
,
val3
;
vlc_object_t
*
p_aout
=
p_filter
->
p_
parent
;
vlc_object_t
*
p_aout
=
p_filter
->
obj
.
parent
;
int
i_ret
=
VLC_ENOMEM
;
bool
b_vlcFreqs
=
var_InheritBool
(
p_aout
,
"equalizer-vlcfreqs"
);
...
...
@@ -451,7 +451,7 @@ static void EqzFilter( filter_t *p_filter, float *out, float *in,
static
void
EqzClean
(
filter_t
*
p_filter
)
{
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
vlc_object_t
*
p_aout
=
p_filter
->
p_
parent
;
vlc_object_t
*
p_aout
=
p_filter
->
obj
.
parent
;
var_DelCallback
(
p_aout
,
"equalizer-bands"
,
BandsCallback
,
p_sys
);
var_DelCallback
(
p_aout
,
"equalizer-preset"
,
PresetCallback
,
p_sys
);
...
...
modules/audio_filter/gain.c
View file @
c240692f
...
...
@@ -93,7 +93,7 @@ static int Open( vlc_object_t *p_this )
return
VLC_EGENERIC
;
}
p_sys
->
f_gain
=
var_InheritFloat
(
p_filter
->
p_
parent
,
"gain-value"
);
p_sys
->
f_gain
=
var_InheritFloat
(
p_filter
->
obj
.
parent
,
"gain-value"
);
msg_Dbg
(
p_filter
,
"gain multiplier sets to %.2fx"
,
p_sys
->
f_gain
);
p_filter
->
fmt_out
.
audio
=
p_filter
->
fmt_in
.
audio
;
...
...
modules/audio_filter/normvol.c
View file @
c240692f
...
...
@@ -102,8 +102,10 @@ static int Open( vlc_object_t *p_this )
p_sys
=
p_filter
->
p_sys
=
malloc
(
sizeof
(
*
p_sys
)
);
if
(
!
p_sys
)
return
VLC_ENOMEM
;
p_sys
->
i_nb
=
var_CreateGetInteger
(
p_filter
->
p_parent
,
"norm-buff-size"
);
p_sys
->
f_max
=
var_CreateGetFloat
(
p_filter
->
p_parent
,
"norm-max-level"
);
p_sys
->
i_nb
=
var_CreateGetInteger
(
p_filter
->
obj
.
parent
,
"norm-buff-size"
);
p_sys
->
f_max
=
var_CreateGetFloat
(
p_filter
->
obj
.
parent
,
"norm-max-level"
);
if
(
p_sys
->
f_max
<=
0
)
p_sys
->
f_max
=
0
.
01
;
...
...
@@ -184,7 +186,8 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
f_average
=
f_average
/
p_sys
->
i_nb
;
/* Seuil arbitraire */
p_sys
->
f_max
=
var_GetFloat
(
p_filter
->
p_parent
,
"norm-max-level"
);
p_sys
->
f_max
=
var_GetFloat
(
p_filter
->
obj
.
parent
,
"norm-max-level"
);
//fprintf(stderr,"Average %f, max %f\n", f_average, p_sys->f_max );
if
(
f_average
>
p_sys
->
f_max
)
...
...
modules/audio_filter/spatializer/spatializer.cpp
View file @
c240692f
...
...
@@ -132,7 +132,7 @@ static int Open( vlc_object_t *p_this )
{
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
filter_sys_t
*
p_sys
;
vlc_object_t
*
p_aout
=
p_filter
->
p_
parent
;
vlc_object_t
*
p_aout
=
p_filter
->
obj
.
parent
;
/* Allocate structure */
p_sys
=
p_filter
->
p_sys
=
(
filter_sys_t
*
)
malloc
(
sizeof
(
*
p_sys
)
);
...
...
@@ -172,7 +172,7 @@ static void Close( vlc_object_t *p_this )
{
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
vlc_object_t
*
p_aout
=
p_filter
->
p_
parent
;
vlc_object_t
*
p_aout
=
p_filter
->
obj
.
parent
;
/* Delete the callbacks */
for
(
unsigned
i
=
0
;
i
<
num_callbacks
;
++
i
)
...
...
modules/codec/daala.c
View file @
c240692f
...
...
@@ -581,7 +581,7 @@ static int OpenEncoder( vlc_object_t *p_this )
int
status
;
if
(
p_enc
->
fmt_out
.
i_codec
!=
VLC_CODEC_DAALA
&&
!
p_enc
->
b_
force
)
!
p_enc
->
obj
.
force
)
{
return
VLC_EGENERIC
;
}
...
...
modules/codec/dvbsub.c
View file @
c240692f
...
...
@@ -1719,7 +1719,7 @@ static int OpenEncoder( vlc_object_t *p_this )
encoder_sys_t
*
p_sys
;
if
(
(
p_enc
->
fmt_out
.
i_codec
!=
VLC_CODEC_DVBS
)
&&
!
p_enc
->
b_
force
)
!
p_enc
->
obj
.
force
)
{
return
VLC_EGENERIC
;
}
...
...
modules/codec/flac.c
View file @
c240692f
...
...
@@ -669,7 +669,7 @@ static int OpenEncoder( vlc_object_t *p_this )
encoder_sys_t
*
p_sys
;
if
(
p_enc
->
fmt_out
.
i_codec
!=
VLC_CODEC_FLAC
&&
!
p_enc
->
b_
force
)
!
p_enc
->
obj
.
force
)
{
return
VLC_EGENERIC
;
}
...
...
modules/codec/rtpvideo.c
View file @
c240692f
...
...
@@ -53,7 +53,7 @@ vlc_module_end ()
static
int
OpenEncoder
(
vlc_object_t
*
p_this
)
{
encoder_t
*
p_enc
=
(
encoder_t
*
)
p_this
;
if
(
p_enc
->
fmt_out
.
i_codec
!=
VLC_CODEC_R420
&&
!
p_enc
->
b_
force
)
if
(
p_enc
->
fmt_out
.
i_codec
!=
VLC_CODEC_R420
&&
!
p_enc
->
obj
.
force
)
return
VLC_EGENERIC
;
p_enc
->
pf_encode_video
=
Encode
;
...
...
modules/codec/schroedinger.c
View file @
c240692f
...
...
@@ -1078,7 +1078,7 @@ static int OpenEncoder( vlc_object_t *p_this )
char
*
psz_tmp
;
if
(
p_enc
->
fmt_out
.
i_codec
!=
VLC_CODEC_DIRAC
&&
!
p_enc
->
b_
force
)
!
p_enc
->
obj
.
force
)
{
return
VLC_EGENERIC
;
}
...
...
modules/codec/speex.c
View file @
c240692f
...
...
@@ -957,7 +957,7 @@ static int OpenEncoder( vlc_object_t *p_this )
uint8_t
*
p_extra
;
if
(
p_enc
->
fmt_out
.
i_codec
!=
VLC_CODEC_SPEEX
&&
!
p_enc
->
b_
force
)
!
p_enc
->
obj
.
force
)
{
return
VLC_EGENERIC
;
}
...
...
modules/codec/t140.c
View file @
c240692f
...
...
@@ -60,7 +60,7 @@ static int Open( vlc_object_t *p_this )
break
;
default:
if
(
!
p_enc
->
b_
force
)
if
(
!
p_enc
->
obj
.
force
)
return
VLC_EGENERIC
;
p_enc
->
fmt_out
.
i_codec
=
VLC_CODEC_ITU_T140
;
...
...
modules/codec/theora.c
View file @
c240692f
...
...
@@ -677,7 +677,7 @@ static int OpenEncoder( vlc_object_t *p_this )
int
status
;
if
(
p_enc
->
fmt_out
.
i_codec
!=
VLC_CODEC_THEORA
&&
!
p_enc
->
b_
force
)
!
p_enc
->
obj
.
force
)
{
return
VLC_EGENERIC
;
}
...
...
modules/codec/twolame.c
View file @
c240692f
...
...
@@ -133,7 +133,7 @@ static int OpenEncoder( vlc_object_t *p_this )
if
(
p_enc
->
fmt_out
.
i_codec
!=
VLC_CODEC_MP2
&&
p_enc
->
fmt_out
.
i_codec
!=
VLC_CODEC_MPGA
&&
p_enc
->
fmt_out
.
i_codec
!=
VLC_FOURCC
(
'm'
,
'p'
,
'2'
,
'a'
)
&&
!
p_enc
->
b_
force
)
!
p_enc
->
obj
.
force
)
{
return
VLC_EGENERIC
;
}
...
...
modules/codec/vorbis.c
View file @
c240692f
...
...
@@ -754,7 +754,7 @@ static int OpenEncoder( vlc_object_t *p_this )
ogg_packet
header
[
3
];
if
(
p_enc
->
fmt_out
.
i_codec
!=
VLC_CODEC_VORBIS
&&
!
p_enc
->
b_
force
)
!
p_enc
->
obj
.
force
)
{
return
VLC_EGENERIC
;
}
...
...
modules/codec/x264.c
View file @
c240692f
...
...
@@ -818,7 +818,7 @@ static int Open ( vlc_object_t *p_this )
#else
if
(
p_enc
->
fmt_out
.
i_codec
!=
VLC_CODEC_H264
&&
#endif
!
p_enc
->
b_
force
)
!
p_enc
->
obj
.
force
)
{
return
VLC_EGENERIC
;
}
...
...
modules/codec/x265.c
View file @
c240692f
...
...
@@ -141,7 +141,7 @@ static int Open (vlc_object_t *p_this)
encoder_t
*
p_enc
=
(
encoder_t
*
)
p_this
;
encoder_sys_t
*
p_sys
;
if
(
p_enc
->
fmt_out
.
i_codec
!=
VLC_CODEC_HEVC
&&
!
p_enc
->
b_
force
)
if
(
p_enc
->
fmt_out
.
i_codec
!=
VLC_CODEC_HEVC
&&
!
p_enc
->
obj
.
force
)
return
VLC_EGENERIC
;
p_enc
->
fmt_out
.
i_cat
=
VIDEO_ES
;
...
...
modules/codec/zvbi.c
View file @
c240692f
...
...
@@ -267,7 +267,7 @@ static int Open( vlc_object_t *p_this )
p_sys
->
i_level
=
var_CreateGetInteger
(
p_dec
,
"vbi-level"
);
/* Listen for keys */
var_AddCallback
(
p_dec
->
p_
libvlc
,
"key-pressed"
,
EventKey
,
p_dec
);
var_AddCallback
(
p_dec
->
obj
.
libvlc
,
"key-pressed"
,
EventKey
,
p_dec
);
es_format_Init
(
&
p_dec
->
fmt_out
,
SPU_ES
,
VLC_CODEC_SPU
);
if
(
p_sys
->
b_text
)
...
...
@@ -289,7 +289,7 @@ static void Close( vlc_object_t *p_this )
var_DelCallback
(
p_dec
,
"vbi-opaque"
,
Opaque
,
p_sys
);
var_DelCallback
(
p_dec
,
"vbi-page"
,
RequestPage
,
p_sys
);
var_DelCallback
(
p_dec
->
p_
libvlc
,
"key-pressed"
,
EventKey
,
p_dec
);
var_DelCallback
(
p_dec
->
obj
.
libvlc
,
"key-pressed"
,
EventKey
,
p_dec
);
vlc_mutex_destroy
(
&
p_sys
->
lock
);
...
...
modules/control/dbus/dbus_root.c
View file @
c240692f
...
...
@@ -261,14 +261,14 @@ MarshalSupportedUriSchemes( intf_thread_t *p_intf, DBusMessageIter *container )
DBUS_METHOD
(
Quit
)
{
/* exits vlc */
REPLY_INIT
;
libvlc_Quit
(
INTF
->
p_
libvlc
);
libvlc_Quit
(
INTF
->
obj
.
libvlc
);
REPLY_SEND
;
}
DBUS_METHOD
(
Raise
)
{
/* shows vlc's main window */
REPLY_INIT
;
var_ToggleBool
(
INTF
->
p_
libvlc
,
"intf-show"
);
var_ToggleBool
(
INTF
->
obj
.
libvlc
,
"intf-show"
);
REPLY_SEND
;
}
...
...
modules/control/gestures.c
View file @
c240692f
...
...
@@ -355,7 +355,7 @@ static void ProcessGesture( intf_thread_t *p_intf )
case
GESTURE
(
DOWN
,
LEFT
,
NONE
,
NONE
):
/* FIXME: Should close the vout!"*/
libvlc_Quit
(
p_intf
->
p_
libvlc
);
libvlc_Quit
(
p_intf
->
obj
.
libvlc
);
break
;
case
GESTURE
(
DOWN
,
LEFT
,
UP
,
RIGHT
):
...
...
modules/control/globalhotkeys/win32.c
View file @
c240692f
...
...
@@ -167,7 +167,7 @@ static void *Thread( void *p_data )
(
LONG_PTR
)
p_intf
);
/* Registering of Hotkeys */
for
(
const
struct
hotkey
*
p_hotkey
=
p_intf
->
p_
libvlc
->
p_hotkeys
;
for
(
const
struct
hotkey
*
p_hotkey
=
p_intf
->
obj
.
libvlc
->
p_hotkeys
;
p_hotkey
->
psz_action
!=
NULL
;
p_hotkey
++
)
{
...
...
@@ -266,7 +266,7 @@ static void *Thread( void *p_data )
DispatchMessage
(
&
message
);
/* Unregistering of Hotkeys */
for
(
const
struct
hotkey
*
p_hotkey
=
p_intf
->
p_
libvlc
->
p_hotkeys
;
for
(
const
struct
hotkey
*
p_hotkey
=
p_intf
->
obj
.
libvlc
->
p_hotkeys
;
p_hotkey
->
psz_action
!=
NULL
;
p_hotkey
++
)
{
...
...
@@ -311,7 +311,7 @@ LRESULT CALLBACK WMHOTKEYPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
vlc_action_t
action
=
vlc_GetActionId
(
psz_atomName
);
if
(
action
!=
ACTIONID_NONE
)
{
var_SetInteger
(
p_intf
->
p_
libvlc
,
var_SetInteger
(
p_intf
->
obj
.
libvlc
,
"key-action"
,
action
);
return
1
;
}
...
...
modules/control/globalhotkeys/xcb.c
View file @
c240692f
...
...
@@ -294,7 +294,7 @@ static bool Mapping( intf_thread_t *p_intf )
p_sys
->
p_map
=
NULL
;
/* Registering of Hotkeys */
for
(
const
struct
hotkey
*
p_hotkey
=
p_intf
->
p_
libvlc
->
p_hotkeys
;
for
(
const
struct
hotkey
*
p_hotkey
=
p_intf
->
obj
.
libvlc
->
p_hotkeys
;
p_hotkey
->
psz_action
!=
NULL
;
p_hotkey
++
)
{
...
...
@@ -408,8 +408,8 @@ static void *Thread( void *p_data )
if
(
p_map
->
p_keys
[
j
]
==
e
->
detail
&&
p_map
->
i_modifier
==
e
->
state
)
{
var_SetInteger
(
p_intf
->
p_
libvlc
,
"global-key-pressed"
,
p_map
->
i_vlc
);
var_SetInteger
(
p_intf
->
obj
.
libvlc
,
"global-key-pressed"
,
p_map
->
i_vlc
);
goto
done
;
}
}
...
...
modules/control/hotkeys.c
View file @
c240692f
...
...
@@ -112,7 +112,7 @@ static int Open( vlc_object_t *p_this )
p_sys
->
subtitle_delaybookmarks
.
i_time_audio
=
0
;
p_sys
->
subtitle_delaybookmarks
.
i_time_subtitle
=
0
;
var_AddCallback
(
p_intf
->
p_
libvlc
,
"key-action"
,
ActionEvent
,
p_intf
);
var_AddCallback
(
p_intf
->
obj
.
libvlc
,
"key-action"
,
ActionEvent
,
p_intf
);
return
VLC_SUCCESS
;
}
...
...
@@ -124,7 +124,7 @@ static void Close( vlc_object_t *p_this )
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
;
var_DelCallback
(
p_intf
->
p_
libvlc
,
"key-action"
,
ActionEvent
,
p_intf
);
var_DelCallback
(
p_intf
->
obj
.
libvlc
,
"key-action"
,
ActionEvent
,
p_intf
);