Common structure for VLC common object members, document
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 18 Jun 2016 10:39:34 +0000 (13:39 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 18 Jun 2016 15:01:32 +0000 (18:01 +0300)
130 files changed:
include/vlc_common.h
include/vlc_interface.h
lib/media_player.c
modules/access/archive/access.c
modules/access/http/transport.c
modules/access/http/tunnel.c
modules/access/idummy.c
modules/access/rar/rar.c
modules/audio_filter/audiobargraph_a.c
modules/audio_filter/compressor.c
modules/audio_filter/equalizer.c
modules/audio_filter/gain.c
modules/audio_filter/normvol.c
modules/audio_filter/spatializer/spatializer.cpp
modules/codec/daala.c
modules/codec/dvbsub.c
modules/codec/flac.c
modules/codec/rtpvideo.c
modules/codec/schroedinger.c
modules/codec/speex.c
modules/codec/t140.c
modules/codec/theora.c
modules/codec/twolame.c
modules/codec/vorbis.c
modules/codec/x264.c
modules/codec/x265.c
modules/codec/zvbi.c
modules/control/dbus/dbus_root.c
modules/control/gestures.c
modules/control/globalhotkeys/win32.c
modules/control/globalhotkeys/xcb.c
modules/control/hotkeys.c
modules/control/lirc.c
modules/control/ntservice.c
modules/control/oldrc.c
modules/demux/adaptive/xml/DOMParser.cpp
modules/demux/avformat/demux.c
modules/demux/demuxdump.c
modules/demux/dirac.c
modules/demux/flac.c
modules/demux/mjpeg.c
modules/demux/mkv/demux.cpp
modules/demux/mod.c
modules/demux/mpc.c
modules/demux/mpeg/h26x.c
modules/demux/mpeg/mpgv.c
modules/demux/mpeg/ps.c
modules/demux/mpeg/ts.c
modules/demux/nsv.c
modules/demux/ogg.c
modules/demux/playlist/dvb.c
modules/demux/playlist/wpl.c
modules/demux/pva.c
modules/demux/rawdv.c
modules/demux/rawvid.c
modules/demux/subtitle.c
modules/demux/tta.c
modules/demux/ttml.c
modules/demux/ty.c
modules/demux/vc1.c
modules/gui/macosx/CoreInteraction.m
modules/gui/macosx/DebugMessageVisualizer.m
modules/gui/macosx/TrackSynchronization.m
modules/gui/macosx/VLCPlaylist.m
modules/gui/macosx/VLCPlaylistInfo.m
modules/gui/macosx/VideoView.m
modules/gui/macosx/intf.m
modules/gui/macosx/prefs_widgets.m
modules/gui/macosx/simple_prefs.m
modules/gui/ncurses.c
modules/gui/qt/components/complete_preferences.cpp
modules/gui/qt/components/extended_panels.cpp
modules/gui/qt/dialogs/messages.cpp
modules/gui/qt/dialogs_provider.cpp
modules/gui/qt/input_manager.cpp
modules/gui/qt/main_interface.cpp
modules/gui/qt/menus.cpp
modules/gui/qt/qt.cpp
modules/gui/skins2/commands/cmd_quit.cpp
modules/gui/skins2/os2/os2_factory.cpp
modules/gui/skins2/src/dialogs.cpp
modules/gui/skins2/src/vlcproc.cpp
modules/gui/skins2/win32/win32_factory.cpp
modules/gui/skins2/x11/x11_loop.cpp
modules/lua/extension.c
modules/lua/intf.c
modules/lua/libs/misc.c
modules/lua/libs/objects.c
modules/lua/libs/variables.c
modules/misc/logger.c
modules/misc/webservices/acoustid.c
modules/services_discovery/mediadirs.c
modules/services_discovery/podcast.c
modules/stream_filter/record.c
modules/stream_out/bridge.c
modules/stream_out/chromecast/chromecast_ctrl.cpp
modules/stream_out/mosaic_bridge.c
modules/stream_out/record.c
modules/video_filter/audiobargraph_v.c
modules/video_filter/mosaic.h
modules/video_filter/opencv_example.cpp
modules/video_filter/remoteosd.c
modules/video_output/decklink.cpp
modules/video_output/win32/win32touch.c
modules/video_output/xcb/keys.c
modules/video_output/xcb/window.c
src/audio_output/common.c
src/audio_output/filters.c
src/audio_output/output.c
src/audio_output/volume.c
src/config/file.c
src/config/intf.c
src/input/input.c
src/input/stream_filter.c
src/input/vlm.c
src/interface/dialog.c
src/libvlc.h
src/misc/addons.c
src/misc/keystore.c
src/misc/messages.c
src/misc/objects.c
src/misc/update.c
src/misc/variables.c
src/modules/modules.c
src/network/tls.c
src/playlist/thread.c
src/stream_output/stream_output.c
src/video_output/event.h
src/video_output/vout_intf.c
src/video_output/window.c

index f05d9c6..74171c5 100644 (file)
@@ -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
 
 /*****************************************************************************
index 6368d54..2f9a5fa 100644 (file)
@@ -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);
 }
 
 /**
index a0860da..69d3523 100644 (file)
@@ -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 */
index 811149e..09858eb 100644 (file)
@@ -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;
index 5b737f9..cf51544 100644 (file)
@@ -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;
 
index 673f274..900ae83 100644 (file)
@@ -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;
index 617d0f5..1e7a0fe 100644 (file)
@@ -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;
     }
 
index 009e4ed..085a6f1 100644 (file)
@@ -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);
index 215c586..d1f5051 100644 (file)
@@ -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;
index 61c6854..a6fdac7 100644 (file)
@@ -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 */
index 98a4a7e..af400ed 100644 (file)
@@ -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 );
index c6c9339..b03ef4d 100644 (file)
@@ -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;
index 6bcacdb..b75df66 100644 (file)
@@ -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 )
index 5059b83..76ce7e2 100644 (file)
@@ -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)
index fd37b32..826cb03 100644 (file)
@@ -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;
     }
index 0ab0956..7a15a03 100644 (file)
@@ -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;
     }
index deb8dde..3aca417 100644 (file)
@@ -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;
     }
index e3fdd7b..f28c794 100644 (file)
@@ -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;
index 44afbf0..68dfc9e 100644 (file)
@@ -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;
     }
index 32854c2..9adf28b 100644 (file)
@@ -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;
     }
index 39cf09b..a4f186b 100644 (file)
@@ -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;
index 0001e20..2dd686c 100644 (file)
@@ -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;
     }
index 79c64b7..6fdad11 100644 (file)
@@ -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;
     }
index c557032..147da32 100644 (file)
@@ -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;
     }
index bdfb792..4eba229 100644 (file)
@@ -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;
     }
index 2fac637..c35cf4c 100644 (file)
@@ -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;
index 66385be..1004fd1 100644 (file)
@@ -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 );
 
index 46fb005..8b0ed71 100644 (file)
@@ -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;
 }
 
index ebf8403..4fc2891 100644 (file)
@@ -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):
index a4508f6..5ab1ba5 100644 (file)
@@ -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;
                 }
index 98dc58b..712e880 100644 (file)
@@ -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;
                     }
             }
index 7c4ee7f..11bb9bd 100644 (file)
@@ -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 );
 
     /* Destroy structure */
     free( p_sys );
@@ -154,7 +154,7 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
     {
         /* Libvlc / interface actions */
         case ACTIONID_QUIT:
-            libvlc_Quit( p_intf->p_libvlc );
+            libvlc_Quit( p_intf->obj.libvlc );
 
             ClearChannels( p_intf, p_vout );
             DisplayMessage( p_vout, _( "Quit" ) );
@@ -162,13 +162,13 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
 
         case ACTIONID_INTF_TOGGLE_FSC:
         case ACTIONID_INTF_HIDE:
-            var_TriggerCallback( p_intf->p_libvlc, "intf-toggle-fscontrol" );
+            var_TriggerCallback( p_intf->obj.libvlc, "intf-toggle-fscontrol" );
             break;
         case ACTIONID_INTF_BOSS:
-            var_TriggerCallback( p_intf->p_libvlc, "intf-boss" );
+            var_TriggerCallback( p_intf->obj.libvlc, "intf-boss" );
             break;
         case ACTIONID_INTF_POPUP_MENU:
-            var_TriggerCallback( p_intf->p_libvlc, "intf-popupmenu" );
+            var_TriggerCallback( p_intf->obj.libvlc, "intf-popupmenu" );
             break;
 
         /* Playlist actions (including audio) */
index 52c1dfe..17fdc1d 100644 (file)
@@ -197,7 +197,7 @@ static void Process( intf_thread_t *p_intf )
             {
                 vlc_action_t i_key = vlc_GetActionId( c );
                 if( i_key )
-                    var_SetInteger( p_intf->p_libvlc, "key-action", i_key );
+                    var_SetInteger( p_intf->obj.libvlc, "key-action", i_key );
                 else
                     msg_Err( p_intf, "Unknown hotkey '%s'", c );
             }
index bef0671..7872b71 100644 (file)
@@ -170,7 +170,7 @@ static void *Run( void *data )
     free( p_intf->p_sys->psz_service );
 
     /* Make sure we exit (In case other interfaces have been spawned) */
-    libvlc_Quit( p_intf->p_libvlc );
+    libvlc_Quit( p_intf->obj.libvlc );
     return NULL;
 }
 
index 870a414..9096c7a 100644 (file)
@@ -617,16 +617,16 @@ static void *Run( void *data )
                     psz_cmd, i_ret, vlc_error( i_ret ) );
         }
         /* Or maybe it's a global command */
-        else if( var_Type( p_intf->p_libvlc, psz_cmd ) & VLC_VAR_ISCOMMAND )
+        else if( var_Type( p_intf->obj.libvlc, psz_cmd ) & VLC_VAR_ISCOMMAND )
         {
             int i_ret = VLC_SUCCESS;
 
             /* FIXME: it's a global command, but we should pass the
-             * local object as an argument, not p_intf->p_libvlc. */
-            if ((var_Type( p_intf->p_libvlc, psz_cmd) & VLC_VAR_CLASS) == VLC_VAR_VOID)
+             * local object as an argument, not p_intf->obj.libvlc. */
+            if ((var_Type( p_intf->obj.libvlc, psz_cmd) & VLC_VAR_CLASS) == VLC_VAR_VOID)
                 var_TriggerCallback( p_intf, psz_cmd );
             else
-                i_ret = var_SetString( p_intf->p_libvlc, psz_cmd, psz_arg );
+                i_ret = var_SetString( p_intf->obj.libvlc, psz_cmd, psz_arg );
             if( i_ret != 0 )
             {
                 msg_rc( "%s: returned %i (%s)",
@@ -714,7 +714,7 @@ static void *Run( void *data )
         }
         else if( !strcmp( psz_cmd, "key" ) || !strcmp( psz_cmd, "hotkey" ) )
         {
-            var_SetInteger( p_intf->p_libvlc, "key-action",
+            var_SetInteger( p_intf->obj.libvlc, "key-action",
                             vlc_GetActionId( psz_arg ) );
         }
         else switch( psz_cmd[0] )
@@ -987,7 +987,7 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
         }
         else
         {
-            var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_JUMP_FORWARD_EXTRASHORT );
+            var_SetInteger( p_intf->obj.libvlc, "key-action", ACTIONID_JUMP_FORWARD_EXTRASHORT );
         }
         i_error = VLC_SUCCESS;
     }
@@ -1001,7 +1001,7 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
         }
         else
         {
-            var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_JUMP_BACKWARD_EXTRASHORT );
+            var_SetInteger( p_intf->obj.libvlc, "key-action", ACTIONID_JUMP_BACKWARD_EXTRASHORT );
         }
         i_error = VLC_SUCCESS;
     }
@@ -1396,7 +1396,7 @@ static int Quit( vlc_object_t *p_this, char const *psz_cmd,
     VLC_UNUSED(p_data); VLC_UNUSED(psz_cmd);
     VLC_UNUSED(oldval); VLC_UNUSED(newval);
 
-    libvlc_Quit( p_this->p_libvlc );
+    libvlc_Quit( p_this->obj.libvlc );
     return VLC_SUCCESS;
 }
 
index 9534c67..a8a6621 100644 (file)
@@ -66,11 +66,11 @@ bool    DOMParser::parse                    (bool b)
     if(!vlc_reader && !(vlc_reader = xml_ReaderCreate(stream, stream)))
         return false;
 
-    const int i_flags = vlc_reader->i_flags;
+    const int i_flags = vlc_reader->obj.flags;
     if(!b)
-        vlc_reader->i_flags |= OBJECT_FLAGS_QUIET;
+        vlc_reader->obj.flags |= OBJECT_FLAGS_QUIET;
     root = processNode(b);
-    vlc_reader->i_flags = i_flags;
+    vlc_reader->obj.flags = i_flags;
     if ( root == NULL )
         return false;
 
index a56be31..8ef3db8 100644 (file)
@@ -219,7 +219,7 @@ int OpenDemux( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
-    if( !p_demux->b_force )
+    if( !p_demux->obj.force )
     {
         static const char ppsz_blacklist[][16] = {
             /* Don't handle MPEG unless forced */
@@ -244,7 +244,7 @@ int OpenDemux( vlc_object_t *p_this )
     }
 
     /* Don't trigger false alarms on bin files */
-    if( !p_demux->b_force && !strcmp( fmt->name, "psxstr" ) )
+    if( !p_demux->obj.force && !strcmp( fmt->name, "psxstr" ) )
     {
         int i_len;
 
index 5c12244..5e2987a 100644 (file)
@@ -69,7 +69,7 @@ static int Open( vlc_object_t * p_this )
     demux_t *p_demux = (demux_t*)p_this;
 
     /* Accept only if forced */
-    if( !p_demux->b_force )
+    if( !p_demux->obj.force )
         return VLC_EGENERIC;
 
     char *access = var_InheritString( p_demux, "demuxdump-access" );
index 4890833..ba19689 100644 (file)
@@ -99,7 +99,7 @@ static int Open( vlc_object_t * p_this )
     if( p_peek[0] != 'B' || p_peek[1] != 'B' ||
         p_peek[2] != 'C' || p_peek[3] != 'D') /* start of ParseInfo */
     {
-        if( !p_demux->b_force ) return VLC_EGENERIC;
+        if( !p_demux->obj.force ) return VLC_EGENERIC;
 
         msg_Err( p_demux, "This doesn't look like a Dirac stream (incorrect parsecode)" );
         msg_Warn( p_demux, "continuing anyway" );
index 2daab84..cf45308 100644 (file)
@@ -119,7 +119,7 @@ static int Open( vlc_object_t * p_this )
 
     if( p_peek[0]!='f' || p_peek[1]!='L' || p_peek[2]!='a' || p_peek[3]!='C' )
     {
-        if( !p_demux->b_force
+        if( !p_demux->obj.force
          && !demux_IsContentType( p_demux, "audio/flac" ) )
             return VLC_EGENERIC;
 
index a1f70c6..9fe9580 100644 (file)
@@ -298,7 +298,7 @@ static int Open( vlc_object_t * p_this )
     int         i_size;
     bool        b_matched = false;
 
-    if( IsMxpeg( p_demux->s ) && !p_demux->b_force )
+    if( IsMxpeg( p_demux->s ) && !p_demux->obj.force )
         // let avformat handle this case
         return VLC_EGENERIC;
 
index aeb707c..8e6db9e 100644 (file)
@@ -146,7 +146,7 @@ void event_thread_t::EventThread()
     b_vout       = true;
 
     /* catch all key event */
-    var_AddCallback( p_demux->p_libvlc, "key-action", EventKey, this );
+    var_AddCallback( p_demux->obj.libvlc, "key-action", EventKey, this );
     /* catch input event */
     var_AddCallback( p_demux->p_input, "intf-event", EventInput, this );
 
@@ -417,7 +417,7 @@ void event_thread_t::EventThread()
         vlc_object_release( p_vout );
     }
     var_DelCallback( p_demux->p_input, "intf-event", EventInput, this );
-    var_DelCallback( p_demux->p_libvlc, "key-action", EventKey, this );
+    var_DelCallback( p_demux->obj.libvlc, "key-action", EventKey, this );
 
     vlc_restorecancel (canc);
 }
index fee7e8f..64055b4 100644 (file)
@@ -141,7 +141,7 @@ static int Open( vlc_object_t *p_this )
     ModPlug_Settings settings;
 
     /* We accept file based on extension match */
-    if( !p_demux->b_force )
+    if( !p_demux->obj.force )
     {
         const char *psz_ext = p_demux->psz_file ? strrchr( p_demux->psz_file, '.' )
                                                 : NULL;
index 028f42d..9374a9d 100644 (file)
@@ -130,7 +130,7 @@ static int Open( vlc_object_t * p_this )
         if( i_version  < 4 || i_version > 6 )
             return VLC_EGENERIC;
 
-        if( !p_demux->b_force )
+        if( !p_demux->obj.force )
         {
             /* Check file name extension */
             if( !demux_IsPathExtension( p_demux, ".mpc" ) &&
index bfea7b0..4307a02 100644 (file)
@@ -257,7 +257,7 @@ static int GenericOpen( demux_t *p_demux, const char *psz_module,
     int i_ret = 0;
 
     /* Restrict by type first */
-    if( !p_demux->b_force &&
+    if( !p_demux->obj.force &&
         !check_Property( p_demux, pp_psz_exts, demux_IsPathExtension ) &&
         !check_Property( p_demux, pp_psz_mimes, demux_IsContentType ) )
     {
@@ -314,7 +314,7 @@ static int GenericOpen( demux_t *p_demux, const char *psz_module,
 
     if( i_ret < 1 )
     {
-        if( !p_demux->b_force )
+        if( !p_demux->obj.force )
         {
             msg_Warn( p_demux, "%s module discarded (no startcode)", psz_module );
             return VLC_EGENERIC;
index 36ad5a4..5eea766 100644 (file)
@@ -85,7 +85,7 @@ static int Open( vlc_object_t * p_this )
         return VLC_EGENERIC;
     }
 
-    if( p_demux->b_force )
+    if( p_demux->obj.force )
         b_forced = true;
 
     if( p_peek[0] != 0x00 || p_peek[1] != 0x00 || p_peek[2] != 0x01 )
index 91465f3..63114f3 100644 (file)
@@ -164,7 +164,7 @@ static int OpenForce( vlc_object_t *p_this )
 
 static int Open( vlc_object_t *p_this )
 {
-    return OpenCommon( p_this, ((demux_t *)p_this)->b_force );
+    return OpenCommon( p_this, p_this->obj.force );
 }
 
 /*****************************************************************************
index f59dfc5..ab07a06 100644 (file)
@@ -233,7 +233,7 @@ static int DetectPacketSize( demux_t *p_demux, unsigned *pi_header_size, int i_o
         }
     }
 
-    if( p_demux->b_force )
+    if( p_demux->obj.force )
     {
         msg_Warn( p_demux, "this does not look like a TS stream, continuing" );
         return TS_PACKET_SIZE_188;
index 06a56f5..2814bbc 100644 (file)
@@ -100,7 +100,7 @@ static int Open( vlc_object_t *p_this )
     if( memcmp( p_peek, "NSVf", 4 ) && memcmp( p_peek, "NSVs", 4 ) )
     {
        /* In case we had force this demuxer we try to resynch */
-        if( !p_demux->b_force || ReSynch( p_demux ) )
+        if( !p_demux->obj.force || ReSynch( p_demux ) )
             return VLC_EGENERIC;
     }
 
index 40b26c6..6bdb96d 100644 (file)
@@ -208,7 +208,7 @@ static int Open( vlc_object_t * p_this )
 
     /* Check if we are dealing with an ogg stream */
     if( stream_Peek( p_demux->s, &p_peek, 4 ) < 4 ) return VLC_EGENERIC;
-    if( !p_demux->b_force && memcmp( p_peek, "OggS", 4 ) )
+    if( !p_demux->obj.force && memcmp( p_peek, "OggS", 4 ) )
     {
         char *psz_mime = stream_ContentType( p_demux->s );
         if( !psz_mime )
index c7c1ac0..fcb43da 100644 (file)
@@ -47,7 +47,7 @@ int Import_DVB(vlc_object_t *p_this)
     demux_t *demux = (demux_t *)p_this;
 
     CHECK_FILE();
-    if (!demux_IsPathExtension(demux, ".conf" ) && !demux->b_force )
+    if (!demux_IsPathExtension(demux, ".conf" ) && !demux->obj.force )
         return VLC_EGENERIC;
 
     /* Check if this really is a channels file */
index 2a79b7e..58baf71 100644 (file)
@@ -202,11 +202,11 @@ int Import_WPL( vlc_object_t* p_this )
         return VLC_EGENERIC;
     }
 
-    const int i_flags = p_sys->p_reader->i_flags;
-    p_sys->p_reader->i_flags |= OBJECT_FLAGS_QUIET;
+    const int i_flags = p_sys->p_reader->obj.flags;
+    p_sys->p_reader->obj.flags |= OBJECT_FLAGS_QUIET;
     const char* psz_name;
     int type = xml_ReaderNextNode( p_sys->p_reader, &psz_name );
-    p_sys->p_reader->i_flags = i_flags;
+    p_sys->p_reader->obj.flags = i_flags;
     if ( type != XML_READER_STARTELEM || strcasecmp( psz_name, "smil" ) )
     {
         msg_Err( p_demux, "Invalid WPL playlist. Root element should have been <smil>" );
index d6f538e..adebaa3 100644 (file)
@@ -88,7 +88,7 @@ static int Open( vlc_object_t *p_this )
     if( p_peek[0] != 'A' || p_peek[1] != 'V' || p_peek[4] != 0x55 )
     {
         /* In case we had forced this demuxer we try to resynch */
-        if( !p_demux->b_force || ReSynch( p_demux ) )
+        if( !p_demux->obj.force || ReSynch( p_demux ) )
             return VLC_EGENERIC;
     }
 
index 2ef54c2..7d433d4 100644 (file)
@@ -138,7 +138,7 @@ static int Open( vlc_object_t * p_this )
      * it is possible to force this demux. */
 
     /* Check for DV file extension */
-    if( !demux_IsPathExtension( p_demux, ".dv" ) && !p_demux->b_force )
+    if( !demux_IsPathExtension( p_demux, ".dv" ) && !p_demux->obj.force )
         return VLC_EGENERIC;
 
     if( stream_Peek( p_demux->s, &p_peek, DV_PAL_FRAME_SIZE ) <
index a69b0b3..2f89e91 100644 (file)
@@ -147,7 +147,7 @@ static int Open( vlc_object_t * p_this )
         }
     }
 
-    if( !p_demux->b_force )
+    if( !p_demux->obj.force )
     {
         /* guess preset based on file extension */
         if( !p_demux->psz_file )
index c68821d..7ceae49 100644 (file)
@@ -244,7 +244,7 @@ static int Open ( vlc_object_t *p_this )
     int  (*pf_read)( demux_t *, subtitle_t*, int );
     int            i, i_max;
 
-    if( !p_demux->b_force )
+    if( !p_demux->obj.force )
     {
         msg_Dbg( p_demux, "subtitle demux discarded" );
         return VLC_EGENERIC;
@@ -717,7 +717,7 @@ static int Demux( demux_t *p_demux )
     if( p_sys->i_subtitle >= p_sys->i_subtitles )
         return 0;
 
-    i_maxdate = p_sys->i_next_demux_date - var_GetInteger( p_demux->p_parent, "spu-delay" );;
+    i_maxdate = p_sys->i_next_demux_date - var_GetInteger( p_demux->obj.parent, "spu-delay" );;
     if( i_maxdate <= 0 && p_sys->i_subtitle < p_sys->i_subtitles )
     {
         /* Should not happen */
index 2603fff..2374ee2 100644 (file)
@@ -96,7 +96,7 @@ static int Open( vlc_object_t * p_this )
 
     if( memcmp( p_peek, "TTA1", 4 ) )
     {
-        if( !p_demux->b_force )
+        if( !p_demux->obj.force )
             return VLC_EGENERIC;
 
         /* User forced */
index 388bf52..1265717 100644 (file)
@@ -497,11 +497,11 @@ static int Open( vlc_object_t* p_this )
         return VLC_EGENERIC;
     }
 
-    const int i_flags = p_sys->p_reader->i_flags;
-    p_sys->p_reader->i_flags |= OBJECT_FLAGS_QUIET;
+    const int i_flags = p_sys->p_reader->obj.flags;
+    p_sys->p_reader->obj.flags |= OBJECT_FLAGS_QUIET;
     const char* psz_name;
     int i_type = xml_ReaderNextNode( p_sys->p_reader, &psz_name );
-    p_sys->p_reader->i_flags = i_flags;
+    p_sys->p_reader->obj.flags = i_flags;
     if ( i_type != XML_READER_STARTELEM || ( strcmp( psz_name, "tt" ) && strcmp( psz_name, "tt:tt" ) ) )
     {
         Close( p_demux );
index 5507fa6..be0753e 100644 (file)
@@ -307,7 +307,7 @@ static int Open(vlc_object_t *p_this)
          U32_AT(&p_peek[4]) != 0x02 ||
          U32_AT(&p_peek[8]) != CHUNK_SIZE )
     {
-        if( !p_demux->b_force &&
+        if( !p_demux->obj.force &&
             !demux_IsPathExtension( p_demux, ".ty" ) &&
             !demux_IsPathExtension( p_demux, ".ty+" ) )
             return VLC_EGENERIC;
index 1c671c4..38d0016 100644 (file)
@@ -86,7 +86,7 @@ static int Open( vlc_object_t * p_this )
     if( p_peek[0] != 0x00 || p_peek[1] != 0x00 ||
         p_peek[2] != 0x01 || p_peek[3] != 0x0f ) /* Sequence header */
     {
-        if( !p_demux->b_force )
+        if( !p_demux->obj.force )
         {
             msg_Warn( p_demux, "vc-1 module discarded (no startcode)" );
             return VLC_EGENERIC;
index 0eec81a..b17138c 100644 (file)
@@ -111,7 +111,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
         [_remote setClickCountEnabledButtons: kRemoteButtonPlay];
         [_remote setDelegate: self];
 
-        var_AddCallback(p_intf->p_libvlc, "intf-boss", BossCallback, (__bridge void *)self);
+        var_AddCallback(p_intf->obj.libvlc, "intf-boss", BossCallback, (__bridge void *)self);
     }
     return self;
 }
@@ -119,7 +119,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 - (void)dealloc
 {
     intf_thread_t *p_intf = getIntf();
-    var_DelCallback(p_intf->p_libvlc, "intf-boss", BossCallback, (__bridge void *)self);
+    var_DelCallback(p_intf->obj.libvlc, "intf-boss", BossCallback, (__bridge void *)self);
     [[NSNotificationCenter defaultCenter] removeObserver: self];
 }
 
@@ -621,7 +621,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
     if (p_input != NULL) {
         vout_thread_t *p_vout = input_GetVout(p_input);
         if (p_vout != NULL) {
-            var_SetInteger(getIntf()->p_libvlc, "key-action", ACTIONID_POSITION);
+            var_SetInteger(getIntf()->obj.libvlc, "key-action", ACTIONID_POSITION);
             vlc_object_release(p_vout);
         }
         vlc_object_release(p_input);
@@ -1126,11 +1126,11 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
                 break;
             case kRemoteButtonVolume_Plus_Hold:
                 if (p_intf)
-                    var_SetInteger(p_intf->p_libvlc, "key-action", ACTIONID_VOL_UP);
+                    var_SetInteger(p_intf->obj.libvlc, "key-action", ACTIONID_VOL_UP);
                 break;
             case kRemoteButtonVolume_Minus_Hold:
                 if (p_intf)
-                    var_SetInteger(p_intf->p_libvlc, "key-action", ACTIONID_VOL_DOWN);
+                    var_SetInteger(p_intf->obj.libvlc, "key-action", ACTIONID_VOL_DOWN);
                 break;
         }
         if (b_remote_button_hold) {
@@ -1169,14 +1169,14 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
                 [NSSound increaseSystemVolume];
             else
                 if (p_intf)
-                    var_SetInteger(p_intf->p_libvlc, "key-action", ACTIONID_VOL_UP);
+                    var_SetInteger(p_intf->obj.libvlc, "key-action", ACTIONID_VOL_UP);
             break;
         case kRemoteButtonVolume_Minus:
             if (config_GetInt(getIntf(), "macosx-appleremote-sysvol"))
                 [NSSound decreaseSystemVolume];
             else
                 if (p_intf)
-                    var_SetInteger(p_intf->p_libvlc, "key-action", ACTIONID_VOL_DOWN);
+                    var_SetInteger(p_intf->obj.libvlc, "key-action", ACTIONID_VOL_DOWN);
             break;
         case kRemoteButtonRight:
             if (config_GetInt(getIntf(), "macosx-appleremote-prevnext"))
@@ -1322,7 +1322,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
         }
 
         if (b_found_key) {
-            var_SetInteger(p_intf->p_libvlc, "key-pressed", val.i_int);
+            var_SetInteger(p_intf->obj.libvlc, "key-pressed", val.i_int);
             return YES;
         }
     }
index 52105d4..348d1be 100644 (file)
@@ -98,7 +98,7 @@ static void MsgCallback(void *data, int type, const vlc_log_t *item, const char
 
 - (void)dealloc
 {
-    vlc_LogSet( getIntf()->p_libvlc, NULL, NULL );
+    vlc_LogSet( getIntf()->obj.libvlc, NULL, NULL );
 }
 
 - (void)windowDidLoad
@@ -116,7 +116,7 @@ static void MsgCallback(void *data, int type, const vlc_log_t *item, const char
 - (void)showWindow:(id)sender
 {
     /* subscribe to LibVLCCore's messages */
-    vlc_LogSet(getIntf()->p_libvlc, MsgCallback, (__bridge void*)self);
+    vlc_LogSet(getIntf()->obj.libvlc, MsgCallback, (__bridge void*)self);
 
     [super showWindow:sender];
 }
@@ -135,7 +135,7 @@ static void MsgCallback(void *data, int type, const vlc_log_t *item, const char
 - (void)windowWillClose:(NSNotification *)notification
 {
     /* unsubscribe from LibVLCCore's messages */
-    vlc_LogSet( getIntf()->p_libvlc, NULL, NULL );
+    vlc_LogSet( getIntf()->obj.libvlc, NULL, NULL );
     [_messageArray removeAllObjects];
 }
 
@@ -166,8 +166,8 @@ static void MsgCallback(void *data, int type, const vlc_log_t *item, const char
     [_messageArray removeAllObjects];
 
     // Reregister handler, to write new header to log
-    vlc_LogSet(getIntf()->p_libvlc, NULL, NULL);
-    vlc_LogSet(getIntf()->p_libvlc, MsgCallback, (__bridge void*)self);
+    vlc_LogSet(getIntf()->obj.libvlc, NULL, NULL);
+    vlc_LogSet(getIntf()->obj.libvlc, MsgCallback, (__bridge void*)self);
 
     [_messageTable reloadData];
 }
index ff48915..96973da 100644 (file)
         config_PutFloat(getIntf(), SUBSDELAY_CFG_FACTOR, f_factor);
 
         /* Try to find an instance of subsdelay, and set its factor */
-        vlc_object_t *p_obj = (vlc_object_t *) vlc_object_find_name(getIntf()->p_libvlc, "subsdelay");
+        vlc_object_t *p_obj = (vlc_object_t *) vlc_object_find_name(getIntf()->obj.libvlc, "subsdelay");
         if (p_obj) {
             var_SetFloat(p_obj, SUBSDELAY_CFG_FACTOR, f_factor);
             vlc_object_release(p_obj);
index bdf8819..b096e2e 100644 (file)
             continue;
         }
 
-        libvlc_MetadataRequest(p_intf->p_libvlc, [o_item input], META_REQUEST_OPTION_NONE, -1, NULL);
+        libvlc_MetadataRequest(p_intf->obj.libvlc, [o_item input], META_REQUEST_OPTION_NONE, -1, NULL);
 
     }
     [self playlistUpdated];
         if (![o_item isLeaf])
             continue;
 
-        libvlc_ArtRequest(p_intf->p_libvlc, [o_item input], META_REQUEST_OPTION_NONE);
+        libvlc_ArtRequest(p_intf->obj.libvlc, [o_item input], META_REQUEST_OPTION_NONE);
     }
     [self playlistUpdated];
 }
index 871ca52..6eec5e5 100644 (file)
         [_imageWell setImage: [NSImage imageNamed: @"noart.png"]];
     } else {
         if (!input_item_IsPreparsed(p_item))
-            libvlc_MetadataRequest(getIntf()->p_libvlc, p_item, META_REQUEST_OPTION_NONE, -1, NULL);
+            libvlc_MetadataRequest(getIntf()->obj.libvlc, p_item, META_REQUEST_OPTION_NONE, -1, NULL);
 
         /* fill uri info */
         char *psz_url = vlc_uri_decode(input_item_GetURI(p_item));
@@ -387,7 +387,7 @@ FREENULL( psz_##foo );
 - (IBAction)downloadCoverArt:(id)sender
 {
     playlist_t *p_playlist = pl_Get(getIntf());
-    if (p_item) libvlc_ArtRequest(getIntf()->p_libvlc, p_item, META_REQUEST_OPTION_NONE);
+    if (p_item) libvlc_ArtRequest(getIntf()->obj.libvlc, p_item, META_REQUEST_OPTION_NONE);
 }
 
 @end
index 8c50e37..9820daf 100644 (file)
                 [[VLCCoreInteraction sharedInstance] toggleFullscreen];
             else if (p_vout) {
                 val.i_int |= (int)CocoaKeyToVLC(key);
-                var_Set(p_vout->p_libvlc, "key-pressed", val);
+                var_Set(p_vout->obj.libvlc, "key-pressed", val);
             }
             else
                 msg_Dbg(getIntf(), "could not send keyevent to VLC core");
 
         i_lastScrollWheelDirection = 1; // Y
         for (NSUInteger i = 0; i < (int)(f_yabsvalue/4.+1.); i++)
-            var_SetInteger(p_intf->p_libvlc, "key-pressed", i_yvlckey);
+            var_SetInteger(p_intf->obj.libvlc, "key-pressed", i_yvlckey);
 
         t_lastScrollEvent = [NSDate timeIntervalSinceReferenceDate];
         [self performSelector:@selector(resetScrollWheelDirection)
 
         i_lastScrollWheelDirection = -1; // X
         for (NSUInteger i = 0; i < (int)(f_xabsvalue/6.+1.); i++)
-            var_SetInteger(p_intf->p_libvlc, "key-pressed", i_xvlckey);
+            var_SetInteger(p_intf->obj.libvlc, "key-pressed", i_xvlckey);
 
         t_lastScrollEvent = [NSDate timeIntervalSinceReferenceDate];
         [self performSelector:@selector(resetScrollWheelDirection)
index e95d6a7..5c97883 100644 (file)
@@ -242,8 +242,8 @@ static VLCMain *sharedInstance = nil;
 
         var_Create(p_intf, "intf-change", VLC_VAR_BOOL);
 
-        var_AddCallback(p_intf->p_libvlc, "intf-toggle-fscontrol", ShowController, (__bridge void *)self);
-        var_AddCallback(p_intf->p_libvlc, "intf-show", ShowController, (__bridge void *)self);
+        var_AddCallback(p_intf->obj.libvlc, "intf-toggle-fscontrol", ShowController, (__bridge void *)self);
+        var_AddCallback(p_intf->obj.libvlc, "intf-show", ShowController, (__bridge void *)self);
 
         playlist_t *p_playlist = pl_Get(p_intf);
         if ([NSApp currentSystemPresentationOptions] & NSApplicationPresentationFullScreen)
@@ -367,8 +367,8 @@ static VLCMain *sharedInstance = nil;
 
     msg_Dbg(p_intf, "Terminating");
 
-    var_DelCallback(p_intf->p_libvlc, "intf-toggle-fscontrol", ShowController, (__bridge void *)self);
-    var_DelCallback(p_intf->p_libvlc, "intf-show", ShowController, (__bridge void *)self);
+    var_DelCallback(p_intf->obj.libvlc, "intf-toggle-fscontrol", ShowController, (__bridge void *)self);
+    var_DelCallback(p_intf->obj.libvlc, "intf-show", ShowController, (__bridge void *)self);
 
     [[NSNotificationCenter defaultCenter] removeObserver: self];
 
index c94b721..7dc66a9 100644 (file)
@@ -879,7 +879,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
         case CONFIG_ITEM_KEY:
             /* So you don't need to restart to have the changes take effect */
             val.i_int = [self intValue];
-            var_Set(getIntf()->p_libvlc, psz_name, val);
+            var_Set(getIntf()->obj.libvlc, psz_name, val);
         case CONFIG_ITEM_INTEGER:
         case CONFIG_ITEM_BOOL:
             config_PutInt(getIntf(), psz_name, [self intValue]);
index 32b0f99..d10a600 100644 (file)
@@ -764,7 +764,7 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam
     /********************
      * hotkeys settings *
      ********************/
-    const struct hotkey *p_hotkeys = p_intf->p_libvlc->p_hotkeys;
+    const struct hotkey *p_hotkeys = p_intf->obj.libvlc->p_hotkeys;
     _hotkeySettings = [[NSMutableArray alloc] init];
     NSMutableArray *tempArray_desc = [[NSMutableArray alloc] init];
     NSMutableArray *tempArray_names = [[NSMutableArray alloc] init];
index 5370973..73bfbbd 100644 (file)
@@ -714,7 +714,7 @@ static int SubDrawObject(intf_sys_t *sys, int l, vlc_object_t *p_obj, int i_leve
 {
     char *name = vlc_object_get_name(p_obj);
     MainBoxWrite(sys, l++, "%*s%s%s \"%s\" (%p)", 2 * i_level++, "", prefix,
-                  p_obj->psz_object_type, name ? name : "", (void *)p_obj);
+                  p_obj->obj.object_type, name ? name : "", (void *)p_obj);
     free(name);
 
     vlc_list_t *list = vlc_list_children(p_obj);
@@ -729,7 +729,7 @@ static int SubDrawObject(intf_sys_t *sys, int l, vlc_object_t *p_obj, int i_leve
 static int DrawObjects(intf_thread_t *intf, input_thread_t *input)
 {
     (void) input;
-    return SubDrawObject(intf->p_sys, 0, VLC_OBJECT(intf->p_libvlc), 0, "");
+    return SubDrawObject(intf->p_sys, 0, VLC_OBJECT(intf->obj.libvlc), 0, "");
 }
 
 static int DrawMeta(intf_thread_t *intf, input_thread_t *p_input)
@@ -1594,7 +1594,7 @@ static void HandleCommonKey(intf_thread_t *intf, input_thread_t *input,
     case 'q':
     case 'Q':
     case KEY_EXIT:
-        libvlc_Quit(intf->p_libvlc);
+        libvlc_Quit(intf->obj.libvlc);
         sys->exit = true;           // terminate the main loop
         return;
 
@@ -1835,7 +1835,7 @@ static int Open(vlc_object_t *p_this)
     vlc_mutex_init(&sys->pl_lock);
 
     sys->verbosity = var_InheritInteger(intf, "verbose");
-    vlc_LogSet(intf->p_libvlc, MsgCallback, sys);
+    vlc_LogSet(intf->obj.libvlc, MsgCallback, sys);
 
     sys->box_type = BOX_PLAYLIST;
     sys->plidx_follow = true;
@@ -1894,7 +1894,7 @@ static void Close(vlc_object_t *p_this)
 
     endwin();   /* Close the ncurses interface */
 
-    vlc_LogSet(p_this->p_libvlc, NULL, NULL);
+    vlc_LogSet(p_this->obj.libvlc, NULL, NULL);
     vlc_mutex_destroy(&sys->msg_lock);
     vlc_mutex_destroy(&sys->pl_lock);
     for(unsigned i = 0; i < sizeof sys->msgs / sizeof *sys->msgs; i++) {
index 389edc4..a0b6357 100644 (file)
@@ -420,7 +420,7 @@ void PrefsTree::updateLoadedStatus( QTreeWidgetItem *item = NULL,
 
     if( loaded == NULL )
     {
-        vlc_object_t *p_root = VLC_OBJECT( p_intf->p_libvlc );
+        vlc_object_t *p_root = VLC_OBJECT( p_intf->obj.libvlc );
         loaded = new QSet<QString>();
         populateLoadedSet( loaded, p_root );
         b_release = true;
index 8a426e5..93d5049 100644 (file)
@@ -81,7 +81,7 @@ QString OptionFromWidgetName( QObject *obj )
 static inline void setup_vfilter( intf_thread_t *p_intf, const char* psz_name, QWidget *widget )
 {
     vlc_object_t *p_obj = ( vlc_object_t * )
-        vlc_object_find_name( p_intf->p_libvlc, psz_name );
+        vlc_object_find_name( p_intf->obj.libvlc, psz_name );
     QCheckBox *checkbox = qobject_cast<QCheckBox*>( widget );
     QGroupBox *groupbox = qobject_cast<QGroupBox*>( widget );
     if( p_obj )
@@ -481,7 +481,7 @@ void ExtVideo::setWidgetValue( QObject *widget )
     //std::cout << "Option name: " << option.toStdString() << std::endl;
 
     vlc_object_t *p_obj = ( vlc_object_t * )
-        vlc_object_find_name( p_intf->p_libvlc, qtu( module ) );
+        vlc_object_find_name( p_intf->obj.libvlc, qtu( module ) );
     int i_type;
     vlc_value_t val;
 
@@ -568,7 +568,7 @@ void ExtVideo::setWidgetValue( QObject *widget )
 void ExtVideo::setFilterOption( struct intf_thread_t *p_intf, const char *psz_module, const char *psz_option,
         int i_int, double f_float, QString val )
 {
-    vlc_object_t *p_obj = ( vlc_object_t * )vlc_object_find_name( p_intf->p_libvlc, psz_module );
+    vlc_object_t *p_obj = ( vlc_object_t * )vlc_object_find_name( p_intf->obj.libvlc, psz_module );
     int i_type;
     bool b_is_command;
 
@@ -1651,7 +1651,7 @@ void SyncControls::subsdelaySetFactor( double f_factor )
     config_PutFloat( p_intf, SUBSDELAY_CFG_FACTOR, f_factor );
 
     /* Try to find an instance of subsdelay, and set its factor */
-    vlc_object_t *p_obj = ( vlc_object_t * ) vlc_object_find_name( p_intf->p_libvlc, "subsdelay" );
+    vlc_object_t *p_obj = ( vlc_object_t * ) vlc_object_find_name( p_intf->obj.libvlc, "subsdelay" );
     if( p_obj )
     {
         var_SetFloat( p_obj, SUBSDELAY_CFG_FACTOR, f_factor );
index 52c45d8..ddf9f75 100644 (file)
@@ -133,15 +133,15 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
     restoreWidgetPosition( "Messages", QSize( 600, 450 ) );
 
     /* Hook up to LibVLC messaging */
-    vlc_LogSet( p_intf->p_libvlc, MsgCallback, this );
+    vlc_LogSet( p_intf->obj.libvlc, MsgCallback, this );
 
-    buildTree( NULL, VLC_OBJECT( p_intf->p_libvlc ) );
+    buildTree( NULL, VLC_OBJECT( p_intf->obj.libvlc ) );
 }
 
 MessagesDialog::~MessagesDialog()
 {
     saveWidgetPosition( "Messages" );
-    vlc_LogSet( p_intf->p_libvlc, NULL, NULL );
+    vlc_LogSet( p_intf->obj.libvlc, NULL, NULL );
 };
 
 void MessagesDialog::changeVerbosity( int i_verbosity )
@@ -298,7 +298,7 @@ void MessagesDialog::buildTree( QTreeWidgetItem *parentItem,
 
     char *name = vlc_object_get_name( p_obj );
     item->setText( 0, QString("%1%2 (0x%3)")
-                   .arg( qfu( p_obj->psz_object_type ) )
+                   .arg( qfu( p_obj->obj.object_type ) )
                    .arg( ( name != NULL )
                          ? QString( " \"%1\"" ).arg( qfu( name ) )
                              : "" )
@@ -318,7 +318,7 @@ void MessagesDialog::updateOrClear()
     if( ui.mainTab->currentIndex() == 1)
     {
         ui.modulesTree->clear();
-        buildTree( NULL, VLC_OBJECT( p_intf->p_libvlc ) );
+        buildTree( NULL, VLC_OBJECT( p_intf->obj.libvlc ) );
     }
     else if( ui.mainTab->currentIndex() == 0 )
         ui.messages->clear();
index 1aabe1a..d7a50ca 100644 (file)
@@ -118,7 +118,7 @@ DialogsProvider::~DialogsProvider()
 void DialogsProvider::quit()
 {
     b_isDying = true;
-    libvlc_Quit( p_intf->p_libvlc );
+    libvlc_Quit( p_intf->obj.libvlc );
 }
 
 void DialogsProvider::customEvent( QEvent *event )
@@ -865,5 +865,5 @@ void DialogsProvider::sendKey( int key )
      }
 
      // forward key to vlc core when not a key accelerator
-     var_SetInteger( p_intf->p_libvlc, "key-pressed", key );
+     var_SetInteger( p_intf->obj.libvlc, "key-pressed", key );
 }
index 861bcdc..14f81b8 100644 (file)
@@ -697,7 +697,7 @@ void InputManager::requestArtUpdate( input_item_t *p_item, bool b_forced )
             if ( status & ( ITEM_ART_NOTFOUND|ITEM_ART_FETCHED ) )
                 return;
         }
-        libvlc_ArtRequest( p_intf->p_libvlc, p_item,
+        libvlc_ArtRequest( p_intf->obj.libvlc, p_item,
                            (b_forced) ? META_REQUEST_OPTION_SCOPE_ANY
                                       : META_REQUEST_OPTION_NONE );
         /* No input will signal the cover art to update,
@@ -906,12 +906,12 @@ void InputManager::faster()
 
 void InputManager::littlefaster()
 {
-    var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_RATE_FASTER_FINE );
+    var_SetInteger( p_intf->obj.libvlc, "key-action", ACTIONID_RATE_FASTER_FINE );
 }
 
 void InputManager::littleslower()
 {
-    var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_RATE_SLOWER_FINE );
+    var_SetInteger( p_intf->obj.libvlc, "key-action", ACTIONID_RATE_SLOWER_FINE );
 }
 
 void InputManager::normalRate()
index 86e4866..f30b10d 100644 (file)
@@ -239,12 +239,12 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     /************
      * Callbacks
      ************/
-    var_AddCallback( p_intf->p_libvlc, "intf-toggle-fscontrol", IntfShowCB, p_intf );
-    var_AddCallback( p_intf->p_libvlc, "intf-boss", IntfBossCB, p_intf );
-    var_AddCallback( p_intf->p_libvlc, "intf-show", IntfRaiseMainCB, p_intf );
+    var_AddCallback( p_intf->obj.libvlc, "intf-toggle-fscontrol", IntfShowCB, p_intf );
+    var_AddCallback( p_intf->obj.libvlc, "intf-boss", IntfBossCB, p_intf );
+    var_AddCallback( p_intf->obj.libvlc, "intf-show", IntfRaiseMainCB, p_intf );
 
     /* Register callback for the intf-popupmenu variable */
-    var_AddCallback( p_intf->p_libvlc, "intf-popupmenu", PopupMenuCB, p_intf );
+    var_AddCallback( p_intf->obj.libvlc, "intf-popupmenu", PopupMenuCB, p_intf );
 
 
     /* Final Sizing, restoration and placement of the interface */
@@ -308,10 +308,10 @@ MainInterface::~MainInterface()
     QVLCTools::saveWidgetPosition(settings, this);
 
     /* Unregister callbacks */
-    var_DelCallback( p_intf->p_libvlc, "intf-boss", IntfBossCB, p_intf );
-    var_DelCallback( p_intf->p_libvlc, "intf-show", IntfRaiseMainCB, p_intf );
-    var_DelCallback( p_intf->p_libvlc, "intf-toggle-fscontrol", IntfShowCB, p_intf );
-    var_DelCallback( p_intf->p_libvlc, "intf-popupmenu", PopupMenuCB, p_intf );
+    var_DelCallback( p_intf->obj.libvlc, "intf-boss", IntfBossCB, p_intf );
+    var_DelCallback( p_intf->obj.libvlc, "intf-show", IntfRaiseMainCB, p_intf );
+    var_DelCallback( p_intf->obj.libvlc, "intf-toggle-fscontrol", IntfShowCB, p_intf );
+    var_DelCallback( p_intf->obj.libvlc, "intf-popupmenu", PopupMenuCB, p_intf );
 
     p_intf->p_sys->p_mi = NULL;
 }
@@ -1522,7 +1522,7 @@ void MainInterface::handleKeyPress( QKeyEvent *e )
     int i_vlck = qtEventToVLCKey( e );
     if( i_vlck > 0 )
     {
-        var_SetInteger( p_intf->p_libvlc, "key-pressed", i_vlck );
+        var_SetInteger( p_intf->obj.libvlc, "key-pressed", i_vlck );
         e->accept();
     }
     else
@@ -1532,7 +1532,7 @@ void MainInterface::handleKeyPress( QKeyEvent *e )
 void MainInterface::wheelEvent( QWheelEvent *e )
 {
     int i_vlckey = qtWheelEventToVLCKey( e );
-    var_SetInteger( p_intf->p_libvlc, "key-pressed", i_vlckey );
+    var_SetInteger( p_intf->obj.libvlc, "key-pressed", i_vlckey );
     e->accept();
 }
 
index 09a8892..2f70f57 100644 (file)
@@ -1081,7 +1081,7 @@ QMenu* VLCMenuBar::PopupMenu( intf_thread_t *p_intf, bool show )
         /* In skins interface, append some items */
         if( p_intf->p_sys->b_isDialogProvider )
         {
-            vlc_object_t* p_object = p_intf->p_parent;
+            vlc_object_t* p_object = p_intf->obj.parent;
             submenu->setTitle( qtr( "Interface" ) );
 
             /* Open skin dialog box */
index 5aee407..317b82c 100644 (file)
@@ -384,7 +384,7 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider )
 
     /* set up the playlist to work on */
     if( isDialogProvider )
-        p_intf->p_sys->p_playlist = pl_Get( (intf_thread_t *)p_intf->p_parent );
+        p_intf->p_sys->p_playlist = pl_Get( (intf_thread_t *)p_intf->obj.parent );
     else
         p_intf->p_sys->p_playlist = pl_Get( p_intf );
 
@@ -392,7 +392,7 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider )
     vlc_sem_init (&ready, 0);
 #ifdef Q_OS_MAC
     /* Run mainloop on the main thread as Cocoa requires */
-    libvlc_SetExitHandler( p_intf->p_libvlc, Abort, p_intf );
+    libvlc_SetExitHandler( p_intf->obj.libvlc, Abort, p_intf );
     Thread( (void *)p_intf );
 #else
     if( vlc_clone( &p_sys->thread, Thread, p_intf, VLC_THREAD_PRIORITY_LOW ) )
index 147304e..468cbd0 100644 (file)
@@ -48,7 +48,7 @@ void CmdQuit::execute()
     }
 
     // Kill libvlc
-    libvlc_Quit( getIntf()->p_libvlc );
+    libvlc_Quit( getIntf()->obj.libvlc );
 }
 
 
index 0dcdffe..5a8bb9f 100644 (file)
@@ -90,7 +90,7 @@ MRESULT EXPENTRY OS2Factory::OS2FrameProc( HWND hwnd, ULONG msg,
         // If closing parent window
         if( SHORT1FROMMP(mp1) == SC_CLOSE )
         {
-            libvlc_Quit( p_intf->p_libvlc );
+            libvlc_Quit( p_intf->obj.libvlc );
 
             return 0;
         }
index 31eb526..0e86687 100644 (file)
@@ -120,7 +120,7 @@ Dialogs::~Dialogs()
         vlc_object_release( m_pProvider );
 
         /* Unregister callbacks */
-        var_DelCallback( getIntf()->p_libvlc, "intf-popupmenu",
+        var_DelCallback( getIntf()->obj.libvlc, "intf-popupmenu",
                          PopupMenuCB, this );
     }
 }
@@ -171,7 +171,7 @@ bool Dialogs::init()
     }
 
     /* Register callback for the intf-popupmenu variable */
-    var_AddCallback( getIntf()->p_libvlc, "intf-popupmenu",
+    var_AddCallback( getIntf()->obj.libvlc, "intf-popupmenu",
                      PopupMenuCB, this );
 
     return true;
index 305806d..1ec10ee 100644 (file)
@@ -156,7 +156,7 @@ VlcProc::VlcProc( intf_thread_t *pIntf ): SkinObject( pIntf ),
 
     ADD_CALLBACK( pIntf->p_sys->p_playlist, "volume" )
     ADD_CALLBACK( pIntf->p_sys->p_playlist, "mute" )
-    ADD_CALLBACK( pIntf->p_libvlc, "intf-toggle-fscontrol" )
+    ADD_CALLBACK( pIntf->obj.libvlc, "intf-toggle-fscontrol" )
 
     ADD_CALLBACK( pIntf->p_sys->p_playlist, "random" )
     ADD_CALLBACK( pIntf->p_sys->p_playlist, "loop" )
@@ -199,7 +199,7 @@ VlcProc::~VlcProc()
                      onGenericCallback, this );
     var_DelCallback( getIntf()->p_sys->p_playlist, "mute",
                      onGenericCallback, this );
-    var_DelCallback( getIntf()->p_libvlc, "intf-toggle-fscontrol",
+    var_DelCallback( getIntf()->obj.libvlc, "intf-toggle-fscontrol",
                      onGenericCallback, this );
 
     var_DelCallback( getIntf()->p_sys->p_playlist, "random",
index 2270d40..325277f 100644 (file)
@@ -74,7 +74,7 @@ LRESULT CALLBACK Win32Factory::Win32Proc( HWND hwnd, UINT uMsg,
             // If closing parent window
             if( (wParam & 0xFFF0) == SC_CLOSE )
             {
-                libvlc_Quit( p_intf->p_libvlc );
+                libvlc_Quit( p_intf->obj.libvlc );
                 return 0;
             }
             else if( (wParam & 0xFFF0) == SC_MINIMIZE )
index e57dc20..d0edf2d 100644 (file)
@@ -179,7 +179,7 @@ void X11Loop::handleX11Event()
                 (Atom)event.xclient.data.l[0] == wm_delete )
             {
                 msg_Dbg( getIntf(), "Received WM_DELETE_WINDOW message" );
-                libvlc_Quit( getIntf()->p_libvlc );
+                libvlc_Quit( getIntf()->obj.libvlc );
             }
         }
         return;
index f3c60af..3767062 100644 (file)
@@ -812,7 +812,7 @@ static lua_State* GetLuaState( extensions_manager_t *p_mgr,
         }
         vlclua_set_this( L, p_mgr );
         vlclua_set_playlist_internal( L,
-            pl_Get((intf_thread_t *)(p_mgr->p_parent)) );
+            pl_Get((intf_thread_t *)(p_mgr->obj.parent)) );
         vlclua_extension_set( L, p_ext );
 
         luaL_openlibs( L );
index 1e43a8e..210caf0 100644 (file)
@@ -208,17 +208,17 @@ static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
         char *n = var_InheritString( p_this, "lua-intf" );
         if( unlikely(n == NULL) )
             return VLC_EGENERIC;
-        name = p_intf->psz_header = n;
+        name = p_intf->obj.header = n;
     }
     else
         /* Cleaned up by vlc_object_release() */
-        p_intf->psz_header = strdup( name );
+        p_intf->obj.header = strdup( name );
 
     intf_sys_t *p_sys = malloc( sizeof(*p_sys) );
     if( unlikely(p_sys == NULL) )
     {
-        free( p_intf->psz_header );
-        p_intf->psz_header = NULL;
+        free( p_intf->obj.header );
+        p_intf->obj.header = NULL;
         return VLC_ENOMEM;
     }
     p_intf->p_sys = p_sys;
@@ -377,8 +377,8 @@ static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
 error:
     free( p_sys->psz_filename );
     free( p_sys );
-    free( p_intf->psz_header );
-    p_intf->psz_header = NULL;
+    free( p_intf->obj.header );
+    p_intf->obj.header = NULL;
     return VLC_EGENERIC;
 }
 
index 2674b81..241a7fe 100644 (file)
@@ -122,7 +122,7 @@ static int vlclua_quit( lua_State *L )
     vlc_object_t *p_this = vlclua_get_this( L );
     /* The rc.c code also stops the playlist ... not sure if this is needed
      * though. */
-    libvlc_Quit( p_this->p_libvlc );
+    libvlc_Quit( p_this->obj.libvlc );
     return 0;
 }
 
index 6517816..7a847a3 100644 (file)
@@ -59,7 +59,7 @@ static int vlclua_object_find( lua_State *L )
 
 static int vlclua_get_libvlc( lua_State *L )
 {
-    libvlc_int_t *p_libvlc = vlclua_get_this( L )->p_libvlc;
+    libvlc_int_t *p_libvlc = vlclua_get_this( L )->obj.libvlc;
     vlc_object_hold( p_libvlc );
     vlclua_push_vlc_object( L, p_libvlc );
     return 1;
index 9f4e3fe..f79fc0b 100644 (file)
@@ -227,14 +227,14 @@ static int vlclua_libvlc_command( lua_State *L )
     const char *psz_cmd = luaL_checkstring( L, 1 );
     val_arg.psz_string = (char*)luaL_optstring( L, 2, "" );
 
-    int i_type = var_Type( p_this->p_libvlc, psz_cmd );
+    int i_type = var_Type( p_this->obj.libvlc, psz_cmd );
     if( ! (i_type & VLC_VAR_ISCOMMAND) )
     {
         return luaL_error( L, "libvlc's \"%s\" is not a command",
                            psz_cmd );
     }
 
-    int i_ret = var_Set( p_this->p_libvlc, psz_cmd, val_arg );
+    int i_ret = var_Set( p_this->obj.libvlc, psz_cmd, val_arg );
     lua_pop( L, 2 );
 
     return vlclua_push_ret( L, i_ret );
index 94b0c60..84822fd 100644 (file)
@@ -80,5 +80,5 @@ static int Open( vlc_object_t *p_this )
 static void Close( vlc_object_t *p_this )
 {
     /* Flush the queue and unsubscribe from the message queue */
-    vlc_LogSet( p_this->p_libvlc, NULL, NULL );
+    vlc_LogSet( p_this->obj.libvlc, NULL, NULL );
 }
index 012c1bd..65b8d9d 100644 (file)
@@ -162,13 +162,13 @@ int DoAcoustIdWebRequest( vlc_object_t *p_obj, acoustid_fingerprint_t *p_data )
          return VLC_EGENERIC;
 
     msg_Dbg( p_obj, "Querying AcoustID from %s", psz_url );
-    int i_saved_flags = p_obj->i_flags;
-    p_obj->i_flags |= OBJECT_FLAGS_NOINTERACT;
+    int i_saved_flags = p_obj->obj.flags;
+    p_obj->obj.flags |= OBJECT_FLAGS_NOINTERACT;
 
     stream_t *p_stream = stream_UrlNew( p_obj, psz_url );
 
     free( psz_url );
-    p_obj->i_flags = i_saved_flags;
+    p_obj->obj.flags = i_saved_flags;
     if ( p_stream == NULL )
         return VLC_EGENERIC;
 
index 0d1c262..11811c9 100644 (file)
@@ -154,11 +154,11 @@ static int Open( vlc_object_t *p_this, enum type_e i_type )
         return VLC_EGENERIC;
     }
 
-    var_AddCallback( p_sd->p_libvlc, p_sys->psz_var, onNewFileAdded, p_sd );
+    var_AddCallback( p_sd->obj.libvlc, p_sys->psz_var, onNewFileAdded, p_sd );
 
     if( vlc_clone( &p_sys->thread, Run, p_sd, VLC_THREAD_PRIORITY_LOW ) )
     {
-        var_DelCallback( p_sd->p_libvlc, p_sys->psz_var, onNewFileAdded, p_sd );
+        var_DelCallback( p_sd->obj.libvlc, p_sys->psz_var, onNewFileAdded, p_sd );
         free( p_sys->psz_dir[1] );
         free( p_sys->psz_dir[0] );
         free( p_sys );
@@ -229,7 +229,7 @@ static void Close( vlc_object_t *p_this )
     vlc_cancel( p_sys->thread );
     vlc_join( p_sys->thread, NULL );
 
-    var_DelCallback( p_sd->p_libvlc, p_sys->psz_var, onNewFileAdded, p_sd );
+    var_DelCallback( p_sd->obj.libvlc, p_sys->psz_var, onNewFileAdded, p_sd );
 
     free( p_sys->psz_dir[1] );
     free( p_sys->psz_dir[0] );
index 010a73a..03008aa 100644 (file)
@@ -120,7 +120,7 @@ static void SaveUrls( services_discovery_t *p_sd );
  *****************************************************************************/
 static int Open( vlc_object_t *p_this )
 {
-    if( strcmp( p_this->p_parent->psz_object_type, "playlist" ) )
+    if( strcmp( p_this->obj.parent->obj.object_type, "playlist" ) )
         return VLC_EGENERIC; /* FIXME: support LibVLC SD too! */
 
     services_discovery_t *p_sd = ( services_discovery_t* )p_this;
@@ -144,7 +144,7 @@ static int Open( vlc_object_t *p_this )
     p_sd->p_sys  = p_sys;
 
     /* Launch the callback associated with this variable */
-    vlc_object_t *pl = p_sd->p_parent;
+    vlc_object_t *pl = p_sd->obj.parent;
     var_Create( pl, "podcast-urls", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
     var_AddCallback( pl, "podcast-urls", UrlsChange, p_sys );
 
@@ -170,7 +170,7 @@ static void Close( vlc_object_t *p_this )
 {
     services_discovery_t *p_sd = ( services_discovery_t* )p_this;
     services_discovery_sys_t *p_sys = p_sd->p_sys;
-    vlc_object_t *pl = p_sd->p_parent;
+    vlc_object_t *pl = p_sd->obj.parent;
     int i;
 
     vlc_cancel (p_sys->thread);
@@ -222,7 +222,7 @@ static void *Run( void *data )
 
         if( p_sys->update_type == UPDATE_URLS )
         {
-            char *psz_urls = var_GetNonEmptyString( p_sd->p_parent,
+            char *psz_urls = var_GetNonEmptyString( p_sd->obj.parent,
                                                     "podcast-urls" );
             ParseUrls( p_sd, psz_urls );
             free( psz_urls );
@@ -375,7 +375,7 @@ static void ParseRequest( services_discovery_t *p_sd )
 
     if ( ! p_sys->b_savedurls_loaded )
     {
-        char *psz_urls = var_GetNonEmptyString( p_sd->p_parent,
+        char *psz_urls = var_GetNonEmptyString( p_sd->obj.parent,
                                                 "podcast-urls" );
         ParseUrls( p_sd, psz_urls );
         free( psz_urls );
index c0c8b68..73dcccc 100644 (file)
@@ -200,7 +200,7 @@ static int Start( stream_t *s, const char *psz_extension )
     }
 
     /* signal new record file */
-    var_SetString( s->p_libvlc, "record-file", psz_file );
+    var_SetString( s->obj.libvlc, "record-file", psz_file );
 
     msg_Dbg( s, "Recording into %s", psz_file );
     free( psz_file );
index 6ee5448..3e588a7 100644 (file)
@@ -249,13 +249,13 @@ static sout_stream_id_sys_t * AddOut( sout_stream_t *p_stream, const es_format_t
 
     vlc_mutex_lock( &lock );
 
-    p_bridge = var_GetAddress( p_stream->p_libvlc, p_sys->psz_name );
+    p_bridge = var_GetAddress( p_stream->obj.libvlc, p_sys->psz_name );
     if ( p_bridge == NULL )
     {
         p_bridge = xmalloc( sizeof( bridge_t ) );
 
-        var_Create( p_stream->p_libvlc, p_sys->psz_name, VLC_VAR_ADDRESS );
-        var_SetAddress( p_stream->p_libvlc, p_sys->psz_name, p_bridge );
+        var_Create( p_stream->obj.libvlc, p_sys->psz_name, VLC_VAR_ADDRESS );
+        var_SetAddress( p_stream->obj.libvlc, p_sys->psz_name, p_bridge );
 
         p_bridge->i_es_num = 0;
         p_bridge->pp_es = NULL;
@@ -513,7 +513,7 @@ static int SendIn( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
     /* Then check all bridged streams */
     vlc_mutex_lock( &lock );
 
-    p_bridge = var_GetAddress( p_stream->p_libvlc, p_sys->psz_name );
+    p_bridge = var_GetAddress( p_stream->obj.libvlc, p_sys->psz_name );
 
     if( p_bridge )
     {
@@ -655,7 +655,7 @@ static int SendIn( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
             free( p_bridge->pp_es[i] );
         free( p_bridge->pp_es );
         free( p_bridge );
-        var_Destroy( p_stream->p_libvlc, p_sys->psz_name );
+        var_Destroy( p_stream->obj.libvlc, p_sys->psz_name );
     }
     }
 
index 58dd4ad..e0286b9 100644 (file)
@@ -132,9 +132,9 @@ intf_sys_t::intf_sys_t(vlc_object_t * const p_this, int port, std::string device
     common.pf_set_artwork      = set_artwork;
     common.pf_set_title        = set_title;
 
-    assert( var_Type( p_module->p_parent->p_parent, CC_SHARED_VAR_NAME) == 0 );
-    if (var_Create( p_module->p_parent->p_parent, CC_SHARED_VAR_NAME, VLC_VAR_ADDRESS ) == VLC_SUCCESS )
-        var_SetAddress( p_module->p_parent->p_parent, CC_SHARED_VAR_NAME, &common );
+    assert( var_Type( p_module->obj.parent->obj.parent, CC_SHARED_VAR_NAME) == 0 );
+    if (var_Create( p_module->obj.parent->obj.parent, CC_SHARED_VAR_NAME, VLC_VAR_ADDRESS ) == VLC_SUCCESS )
+        var_SetAddress( p_module->obj.parent->obj.parent, CC_SHARED_VAR_NAME, &common );
 
     // Start the Chromecast event thread.
     if (vlc_clone(&chromecastThread, ChromecastThread, this,
@@ -148,7 +148,7 @@ intf_sys_t::~intf_sys_t()
 {
     setHasInput( false );
 
-    var_Destroy( p_module->p_parent->p_parent, CC_SHARED_VAR_NAME );
+    var_Destroy( p_module->obj.parent->obj.parent, CC_SHARED_VAR_NAME );
 
     switch ( conn_status )
     {
@@ -229,7 +229,7 @@ int intf_sys_t::connectChromecast()
     if (fd < 0)
         return -1;
 
-    p_creds = vlc_tls_ClientCreate( p_module->p_parent );
+    p_creds = vlc_tls_ClientCreate( p_module->obj.parent );
     if (p_creds == NULL)
     {
         net_Close(fd);
index 5853814..9a95464 100644 (file)
@@ -328,7 +328,7 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, const es_format_t *p
     p_bridge = GetBridge( p_stream );
     if ( p_bridge == NULL )
     {
-        vlc_object_t *p_libvlc = VLC_OBJECT( p_stream->p_libvlc );
+        vlc_object_t *p_libvlc = VLC_OBJECT( p_stream->obj.libvlc );
         vlc_value_t val;
 
         p_bridge = xmalloc( sizeof( bridge_t ) );
@@ -463,7 +463,7 @@ static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
 
     if ( b_last_es )
     {
-        vlc_object_t *p_libvlc = VLC_OBJECT( p_stream->p_libvlc );
+        vlc_object_t *p_libvlc = VLC_OBJECT( p_stream->obj.libvlc );
         for ( i = 0; i < p_bridge->i_es_num; i++ )
             free( p_bridge->pp_es[i] );
         free( p_bridge->pp_es );
index 3b7604a..4b3a84c 100644 (file)
@@ -356,7 +356,7 @@ static int OutputNew( sout_stream_t *p_stream,
     }
 
     if( psz_file && psz_extension )
-        var_SetString( p_stream->p_libvlc, "record-file", psz_file );
+        var_SetString( p_stream->obj.libvlc, "record-file", psz_file );
 
     free( psz_file );
     free( psz_output );
index 1a28373..71814e4 100644 (file)
@@ -549,17 +549,16 @@ static int OpenCommon(vlc_object_t *p_this, bool b_sub)
         p_sys->i_pos = 0;
 
     vlc_mutex_init(&p_sys->lock);
+    var_Create(p_filter->obj.libvlc, CFG_PREFIX "alarm", VLC_VAR_BOOL);
+    var_Create(p_filter->obj.libvlc, CFG_PREFIX "i_values", VLC_VAR_STRING);
 
-    var_Create(p_filter->p_libvlc, CFG_PREFIX "alarm", VLC_VAR_BOOL);
-    var_Create(p_filter->p_libvlc, CFG_PREFIX "i_values", VLC_VAR_STRING);
-
-    var_AddCallback(p_filter->p_libvlc, CFG_PREFIX "alarm",
+    var_AddCallback(p_filter->obj.libvlc, CFG_PREFIX "alarm",
                     BarGraphCallback, p_sys);
-    var_AddCallback(p_filter->p_libvlc, CFG_PREFIX "i_values",
+    var_AddCallback(p_filter->obj.libvlc, CFG_PREFIX "i_values",
                     BarGraphCallback, p_sys);
 
-    var_TriggerCallback(p_filter->p_libvlc, CFG_PREFIX "alarm");
-    var_TriggerCallback(p_filter->p_libvlc, CFG_PREFIX "i_values");
+    var_TriggerCallback(p_filter->obj.libvlc, CFG_PREFIX "alarm");
+    var_TriggerCallback(p_filter->obj.libvlc, CFG_PREFIX "i_values");
 
     for (int i = 0; ppsz_filter_callbacks[i]; i++)
         var_AddCallback(p_filter, ppsz_filter_callbacks[i],
@@ -601,12 +600,12 @@ static void Close(vlc_object_t *p_this)
         var_DelCallback(p_filter, ppsz_filter_callbacks[i],
                          BarGraphCallback, p_sys);
 
-    var_DelCallback(p_filter->p_libvlc, CFG_PREFIX "i_values",
+    var_DelCallback(p_filter->obj.libvlc, CFG_PREFIX "i_values",
                     BarGraphCallback, p_sys);
-    var_DelCallback(p_filter->p_libvlc, CFG_PREFIX "alarm",
+    var_DelCallback(p_filter->obj.libvlc, CFG_PREFIX "alarm",
                     BarGraphCallback, p_sys);
-    var_Destroy(p_filter->p_libvlc, CFG_PREFIX "i_values");
-    var_Destroy(p_filter->p_libvlc, CFG_PREFIX "alarm");
+    var_Destroy(p_filter->obj.libvlc, CFG_PREFIX "i_values");
+    var_Destroy(p_filter->obj.libvlc, CFG_PREFIX "alarm");
 
     if (p_sys->p_blend)
         filter_DeleteBlend(p_sys->p_blend);
index c5888bc..cc7533b 100644 (file)
@@ -43,6 +43,6 @@ typedef struct bridge_t
 
 static bridge_t *GetBridge( vlc_object_t *p_object )
 {
-    return var_GetAddress(VLC_OBJECT(p_object->p_libvlc), "mosaic-struct");
+    return var_GetAddress(VLC_OBJECT(p_object->obj.libvlc), "mosaic-struct");
 }
 #define GetBridge(a) GetBridge( VLC_OBJECT(a) )
index fc022e3..b2a332d 100644 (file)
@@ -106,11 +106,11 @@ static int OpenFilter( vlc_object_t *p_this )
 
     //create the VIDEO_FILTER_EVENT_VARIABLE
     vlc_value_t val;
-    if (var_Create( p_filter->p_libvlc, VIDEO_FILTER_EVENT_VARIABLE, VLC_VAR_ADDRESS | VLC_VAR_DOINHERIT ) != VLC_SUCCESS)
+    if (var_Create( p_filter->obj.libvlc, VIDEO_FILTER_EVENT_VARIABLE, VLC_VAR_ADDRESS | VLC_VAR_DOINHERIT ) != VLC_SUCCESS)
         msg_Err( p_filter, "Could not create %s", VIDEO_FILTER_EVENT_VARIABLE);
 
     val.p_address = &(p_sys->event_info);
-    if (var_Set( p_filter->p_libvlc, VIDEO_FILTER_EVENT_VARIABLE, val )!=VLC_SUCCESS)
+    if (var_Set( p_filter->obj.libvlc, VIDEO_FILTER_EVENT_VARIABLE, val )!=VLC_SUCCESS)
         msg_Err( p_filter, "Could not set %s", VIDEO_FILTER_EVENT_VARIABLE);
 
     //OpenCV init specific to this example
@@ -139,7 +139,7 @@ static void CloseFilter( vlc_object_t *p_this )
     free( p_sys->event_info.p_region );
     free( p_sys );
 
-    var_Destroy( p_filter->p_libvlc, VIDEO_FILTER_EVENT_VARIABLE);
+    var_Destroy( p_filter->obj.libvlc, VIDEO_FILTER_EVENT_VARIABLE);
 }
 
 /****************************************************************************
@@ -204,7 +204,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
         }
 
         if (faces && (faces->total > 0))    //raise the video filter event
-            var_TriggerCallback( p_filter->p_libvlc, VIDEO_FILTER_EVENT_VARIABLE );
+            var_TriggerCallback( p_filter->obj.libvlc, VIDEO_FILTER_EVENT_VARIABLE );
     }
     else
         msg_Err( p_filter, "No cascade - is opencv-haarcascade-file valid?" );
index f9a2f2f..2229748 100644 (file)
@@ -279,7 +279,7 @@ static int CreateFilter ( vlc_object_t *p_this )
     p_sys->b_vnc_key_events = var_InheritBool( p_this,
                                                RMTOSD_CFG "key-events" );
     if( p_sys->b_vnc_key_events )
-        var_AddCallback( p_filter->p_libvlc, "key-pressed", KeyEvent, p_this );
+        var_AddCallback( p_filter->obj.libvlc, "key-pressed", KeyEvent, p_this );
 
     msg_Dbg( p_filter, "osdvnc filter started" );
 
@@ -307,7 +307,7 @@ static void DestroyFilter( vlc_object_t *p_this )
     msg_Dbg( p_filter, "DestroyFilter called." );
 
     if( p_sys->b_vnc_key_events )
-        var_DelCallback( p_filter->p_libvlc, "key-pressed", KeyEvent, p_this );
+        var_DelCallback( p_filter->obj.libvlc, "key-pressed", KeyEvent, p_this );
 
     vlc_cancel( p_sys->worker_thread );
     vlc_join( p_sys->worker_thread, NULL );
index 5a4b697..148aed4 100644 (file)
@@ -216,7 +216,7 @@ static vlc_mutex_t sys_lock = VLC_STATIC_MUTEX;
 
 static struct decklink_sys_t *GetDLSys(vlc_object_t *obj)
 {
-    vlc_object_t *libvlc = VLC_OBJECT(obj->p_libvlc);
+    vlc_object_t *libvlc = VLC_OBJECT(obj->obj.libvlc);
     struct decklink_sys_t *sys;
 
     vlc_mutex_lock(&sys_lock);
@@ -243,7 +243,7 @@ static struct decklink_sys_t *GetDLSys(vlc_object_t *obj)
 
 static void ReleaseDLSys(vlc_object_t *obj)
 {
-    vlc_object_t *libvlc = VLC_OBJECT(obj->p_libvlc);
+    vlc_object_t *libvlc = VLC_OBJECT(obj->obj.libvlc);
 
     vlc_mutex_lock(&sys_lock);
 
index 019d454..0b5a6ef 100644 (file)
@@ -74,7 +74,7 @@ LRESULT DecodeGesture( vlc_object_t *p_this, win32_gesture_sys_t *p_gesture,
                         else
                             action_id = ACTIONID_JUMP_FORWARD_SHORT;
                     }
-                    var_SetInteger( p_this->p_libvlc, "key-action", action_id );
+                    var_SetInteger( p_this->obj.libvlc, "key-action", action_id );
                 }
                 /* Reset the values */
                 p_gesture->i_action = GESTURE_ACTION_UNDEFINED;
@@ -108,9 +108,9 @@ LRESULT DecodeGesture( vlc_object_t *p_this, win32_gesture_sys_t *p_gesture,
                     int offset = p_gesture->i_lasty - gi.ptsLocation.y;
 
                     if( offset > 100)
-                        var_SetInteger( p_this->p_libvlc, "key-action", ACTIONID_VOL_UP );
+                        var_SetInteger( p_this->obj.libvlc, "key-action", ACTIONID_VOL_UP );
                     else if( offset < -100)
-                        var_SetInteger( p_this->p_libvlc, "key-action", ACTIONID_VOL_DOWN );
+                        var_SetInteger( p_this->obj.libvlc, "key-action", ACTIONID_VOL_DOWN );
                     else
                         break;
 
@@ -124,19 +124,19 @@ LRESULT DecodeGesture( vlc_object_t *p_this, win32_gesture_sys_t *p_gesture,
 
                     if( p_gesture->i_lasty - p_gesture->i_beginy > 80 )
                     {
-                        var_SetInteger( p_this->p_libvlc, "key-action", ACTIONID_BRIGHTNESS_DOWN );
+                        var_SetInteger( p_this->obj.libvlc, "key-action", ACTIONID_BRIGHTNESS_DOWN );
                         p_gesture->i_lasty = gi.ptsLocation.y;
                     }
                     else if ( p_gesture->i_lasty - p_gesture->i_beginy < 80 )
                     {
-                        var_SetInteger( p_this->p_libvlc, "key-action", ACTIONID_BRIGHTNESS_UP );
+                        var_SetInteger( p_this->obj.libvlc, "key-action", ACTIONID_BRIGHTNESS_UP );
                         p_gesture->i_lasty = gi.ptsLocation.y;
                     } */
                 }
                 break;
             case GID_TWOFINGERTAP:
                 p_gesture->i_type = GID_TWOFINGERTAP;
-                var_SetInteger( p_this->p_libvlc, "key-action", ACTIONID_PLAY_PAUSE );
+                var_SetInteger( p_this->ovj.libvlc, "key-action", ACTIONID_PLAY_PAUSE );
                 bHandled = TRUE;
                 break;
             case GID_ZOOM:
@@ -151,10 +151,10 @@ LRESULT DecodeGesture( vlc_object_t *p_this, win32_gesture_sys_t *p_gesture,
                             double k = (double)(gi.ullArguments) /
                                        (double)(p_gesture->i_ullArguments);
                             if( k > 1 )
-                                var_SetInteger( p_this->p_libvlc, "key-action",
+                                var_SetInteger( p_this->obj.libvlc, "key-action",
                                         ACTIONID_TOGGLE_FULLSCREEN );
                             else
-                                var_SetInteger( p_this->p_libvlc, "key-action",
+                                var_SetInteger( p_this->obj.libvlc, "key-action",
                                         ACTIONID_LEAVE_FULLSCREEN );
                         }
                         break;
index debf1b7..b97a679 100644 (file)
@@ -167,7 +167,7 @@ int XCB_keyHandler_Process (key_handler_t *ctx, xcb_generic_event_t *ev)
                 vk |= KEY_MODIFIER_META;
             if (e->state & XCB_MOD_MASK_5) /* Alternate Graphic */
                 vk |= KEY_MODIFIER_ALT;
-            var_SetInteger (ctx->obj->p_libvlc, "key-pressed", vk);
+            var_SetInteger (ctx->obj->obj.libvlc, "key-pressed", vk);
             break;
         }
 
index f8d3ab4..02c9dd1 100644 (file)
@@ -485,13 +485,13 @@ static int AcquireDrawable (vlc_object_t *obj, xcb_window_t window)
     xcb_window_t *used;
     size_t n = 0;
 
-    if (var_Create (obj->p_libvlc, "xid-in-use", VLC_VAR_ADDRESS))
+    if (var_Create (obj->obj.libvlc, "xid-in-use", VLC_VAR_ADDRESS))
         return VLC_ENOMEM;
 
     /* Keep a list of busy drawables, so we don't overlap videos if there are
      * more than one video track in the stream. */
     vlc_mutex_lock (&serializer);
-    used = var_GetAddress (obj->p_libvlc, "xid-in-use");
+    used = var_GetAddress (obj->obj.libvlc, "xid-in-use");
     if (used != NULL)
     {
         while (used[n])
@@ -507,7 +507,7 @@ static int AcquireDrawable (vlc_object_t *obj, xcb_window_t window)
     {
         used[n] = window;
         used[n + 1] = 0;
-        var_SetAddress (obj->p_libvlc, "xid-in-use", used);
+        var_SetAddress (obj->obj.libvlc, "xid-in-use", used);
     }
     else
     {
@@ -527,7 +527,7 @@ static void ReleaseDrawable (vlc_object_t *obj, xcb_window_t window)
     size_t n = 0;
 
     vlc_mutex_lock (&serializer);
-    used = var_GetAddress (obj->p_libvlc, "xid-in-use");
+    used = var_GetAddress (obj->obj.libvlc, "xid-in-use");
     assert (used);
     while (used[n] != window)
     {
@@ -539,13 +539,13 @@ static void ReleaseDrawable (vlc_object_t *obj, xcb_window_t window)
     while (used[++n]);
 
     if (n == 0)
-         var_SetAddress (obj->p_libvlc, "xid-in-use", NULL);
+         var_SetAddress (obj->obj.libvlc, "xid-in-use", NULL);
     vlc_mutex_unlock (&serializer);
 
     if (n == 0)
         free (used);
     /* Variables are reference-counted... */
-    var_Destroy (obj->p_libvlc, "xid-in-use");
+    var_Destroy (obj->obj.libvlc, "xid-in-use");
 }
 
 /**
index e2b2f1c..a6048ad 100644 (file)
@@ -557,8 +557,8 @@ bool aout_ChangeFilterString( vlc_object_t *p_obj, vlc_object_t *p_aout,
     }
     else
     {
-        psz_list = var_CreateGetString( p_obj->p_libvlc, psz_variable );
-        var_Destroy( p_obj->p_libvlc, psz_variable );
+        psz_list = var_CreateGetString( p_obj->obj.libvlc, psz_variable );
+        var_Destroy( p_obj->obj.libvlc, psz_variable );
     }
 
     /* Split the string into an array of filters */
index d0c2997..83e8646 100644 (file)
@@ -361,7 +361,7 @@ vout_thread_t *aout_filter_RequestVout (filter_t *filter, vout_thread_t *vout,
      * need to add a new pf_aout_request_vout callback or store a pointer
      * to aout_request_vout_t inside filter_t (i.e. a level of indirection). */
     const aout_request_vout_t *req = filter->owner.sys;
-    char *visual = var_InheritString (filter->p_parent, "audio-visual");
+    char *visual = var_InheritString (filter->obj.parent, "audio-visual");
     /* NOTE: Disable recycling to always close the filter vout because OpenGL
      * visualizations do not use this function to ask for a context. */
     bool recycle = false;
index c958215..c5d850b 100644 (file)
@@ -95,7 +95,7 @@ static void aout_MuteNotify (audio_output_t *aout, bool mute)
 
 static void aout_PolicyNotify (audio_output_t *aout, bool cork)
 {
-    (cork ? var_IncInteger : var_DecInteger) (aout->p_parent, "corks");
+    (cork ? var_IncInteger : var_DecInteger) (aout->obj.parent, "corks");
 }
 
 static void aout_DeviceNotify (audio_output_t *aout, const char *id)
@@ -334,10 +334,10 @@ void aout_Destroy (audio_output_t *aout)
     aout_OutputUnlock (aout);
 
     var_DelCallback (aout, "audio-filter", FilterCallback, NULL);
-    var_DelCallback (aout, "device", var_CopyDevice, aout->p_parent);
-    var_DelCallback (aout, "mute", var_Copy, aout->p_parent);
+    var_DelCallback (aout, "device", var_CopyDevice, aout->obj.parent);
+    var_DelCallback (aout, "mute", var_Copy, aout->obj.parent);
     var_SetFloat (aout, "volume", -1.f);
-    var_DelCallback (aout, "volume", var_Copy, aout->p_parent);
+    var_DelCallback (aout, "volume", var_Copy, aout->obj.parent);
     vlc_object_release (aout);
 }
 
index 78c1517..8c2e120 100644 (file)
@@ -113,7 +113,7 @@ void aout_volume_Delete(aout_volume_t *vol)
 
     if (vol->module != NULL)
         module_unneed(obj, vol->module);
-    var_DelCallback(obj->p_parent, "audio-replay-gain-mode",
+    var_DelCallback(obj->obj.parent, "audio-replay-gain-mode",
                     ReplayGainCallback, vol);
     vlc_object_release(obj);
 }
index 8a23680..0a5a0be 100644 (file)
@@ -103,7 +103,7 @@ static FILE *config_OpenConfigFile( vlc_object_t *p_obj )
             {
                 /* Old config file found. We want to write it at the
                  * new location now. */
-                msg_Info( p_obj->p_libvlc, "Found old config file at %s. "
+                msg_Info( p_obj, "Found old config file at %s. "
                           "VLC will now use %s.", psz_old, psz_filename );
                 char *psz_readme;
                 if( asprintf(&psz_readme,"%s/.vlc/README",
index d61dab1..7d7ac50 100644 (file)
 /* Adds an extra interface to the configuration */
 void config_AddIntf( vlc_object_t *p_this, const char *psz_intf )
 {
+    vlc_object_t *libvlc = VLC_OBJECT(p_this->obj.libvlc);
+
     assert( psz_intf );
 
     char *psz_config, *psz_parser;
     size_t i_len = strlen( psz_intf );
 
-    psz_config = psz_parser = config_GetPsz( p_this->p_libvlc, "control" );
+    psz_config = psz_parser = config_GetPsz( libvlc, "control" );
     while( psz_parser )
     {
         if( !strncmp( psz_intf, psz_parser, i_len ) )
@@ -51,7 +53,7 @@ void config_AddIntf( vlc_object_t *p_this, const char *psz_intf )
     }
     free( psz_config );
 
-    psz_config = psz_parser = config_GetPsz( p_this->p_libvlc, "extraintf" );
+    psz_config = psz_parser = config_GetPsz( libvlc, "extraintf" );
     while( psz_parser )
     {
         if( !strncmp( psz_intf, psz_parser, i_len ) )
@@ -69,12 +71,12 @@ void config_AddIntf( vlc_object_t *p_this, const char *psz_intf )
         char *psz_newconfig;
         if( asprintf( &psz_newconfig, "%s:%s", psz_config, psz_intf ) != -1 )
         {
-            config_PutPsz( p_this->p_libvlc, "extraintf", psz_newconfig );
+            config_PutPsz( libvlc, "extraintf", psz_newconfig );
             free( psz_newconfig );
         }
     }
     else
-        config_PutPsz( p_this->p_libvlc, "extraintf", psz_intf );
+        config_PutPsz( libvlc, "extraintf", psz_intf );
 
     free( psz_config );
 }
@@ -83,12 +85,14 @@ void config_AddIntf( vlc_object_t *p_this, const char *psz_intf )
 /* Removes an extra interface from the configuration */
 void config_RemoveIntf( vlc_object_t *p_this, const char *psz_intf )
 {
+    vlc_object_t *libvlc = VLC_OBJECT(p_this->obj.libvlc);
+
     assert( psz_intf );
 
     char *psz_config, *psz_parser;
     size_t i_len = strlen( psz_intf );
 
-    psz_config = psz_parser = config_GetPsz( p_this->p_libvlc, "extraintf" );
+    psz_config = psz_parser = config_GetPsz( libvlc, "extraintf" );
     while( psz_parser )
     {
         if( !strncmp( psz_intf, psz_parser, i_len ) )
@@ -99,7 +103,7 @@ void config_RemoveIntf( vlc_object_t *p_this, const char *psz_intf )
             *psz_parser = '\0';
             if( asprintf( &psz_newconfig, "%s%s", psz_config, psz_end ) != -1 )
             {
-                config_PutPsz( p_this->p_libvlc, "extraintf", psz_newconfig );
+                config_PutPsz( libvlc, "extraintf", psz_newconfig );
                 free( psz_newconfig );
             }
             break;
@@ -109,7 +113,7 @@ void config_RemoveIntf( vlc_object_t *p_this, const char *psz_intf )
     }
     free( psz_config );
 
-    psz_config = psz_parser = config_GetPsz( p_this->p_libvlc, "control" );
+    psz_config = psz_parser = config_GetPsz( libvlc, "control" );
     while( psz_parser )
     {
         if( !strncmp( psz_intf, psz_parser, i_len ) )
@@ -120,7 +124,7 @@ void config_RemoveIntf( vlc_object_t *p_this, const char *psz_intf )
             *psz_parser = '\0';
             if( asprintf( &psz_newconfig, "%s%s", psz_config, psz_end ) != -1 )
             {
-                config_PutPsz( p_this->p_libvlc, "control", psz_newconfig );
+                config_PutPsz( libvlc, "control", psz_newconfig );
                 free( psz_newconfig );
             }
             break;
@@ -138,12 +142,14 @@ void config_RemoveIntf( vlc_object_t *p_this, const char *psz_intf )
  */
 bool config_ExistIntf( vlc_object_t *p_this, const char *psz_intf )
 {
+    vlc_object_t *libvlc = VLC_OBJECT(p_this->obj.libvlc);
+
     assert( psz_intf );
 
     char *psz_config, *psz_parser;
     size_t i_len = strlen( psz_intf );
 
-    psz_config = psz_parser = config_GetPsz( p_this->p_libvlc, "extraintf" );
+    psz_config = psz_parser = config_GetPsz( libvlc, "extraintf" );
     while( psz_parser )
     {
         if( !strncmp( psz_parser, psz_intf, i_len ) )
@@ -156,7 +162,7 @@ bool config_ExistIntf( vlc_object_t *p_this, const char *psz_intf )
     }
     free( psz_config );
 
-    psz_config = psz_parser = config_GetPsz( p_this->p_libvlc, "control" );
+    psz_config = psz_parser = config_GetPsz( libvlc, "control" );
     while( psz_parser )
     {
         if( !strncmp( psz_parser, psz_intf, i_len ) )
index c5d0162..214d0ae 100644 (file)
@@ -304,7 +304,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
     input_item_ApplyOptions( VLC_OBJECT(p_input), p_item );
 
     p_input->b_preparsing = b_preparsing;
-    p_input->psz_header = psz_header ? strdup( psz_header ) : NULL;
+    p_input->obj.header = psz_header ? strdup( psz_header ) : NULL;
 
     /* Init Common fields */
     p_input->p->b_can_pace_control = true;
@@ -357,17 +357,17 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
 
     /* */
     if( p_input->b_preparsing )
-        p_input->i_flags |= OBJECT_FLAGS_QUIET | OBJECT_FLAGS_NOINTERACT;
+        p_input->obj.flags |= OBJECT_FLAGS_QUIET | OBJECT_FLAGS_NOINTERACT;
 
     /* Make sure the interaction option is honored */
     if( !var_InheritBool( p_input, "interact" ) )
-        p_input->i_flags |= OBJECT_FLAGS_NOINTERACT;
+        p_input->obj.flags |= OBJECT_FLAGS_NOINTERACT;
     else if( p_item->b_preparse_interact )
     {
         /* If true, this item was asked explicitly to interact with the user
          * (via libvlc_MetadataRequest). Sub items created from this input won't
          * have this flag and won't interact with the user */
-        p_input->i_flags &= ~OBJECT_FLAGS_NOINTERACT;
+        p_input->obj.flags &= ~OBJECT_FLAGS_NOINTERACT;
     }
 
     vlc_mutex_unlock( &p_item->lock );
@@ -1262,7 +1262,7 @@ static int Init( input_thread_t * p_input )
 {
     input_source_t *master;
 
-    if( var_Type( p_input->p_parent, "meta-file" ) )
+    if( var_Type( p_input->obj.parent, "meta-file" ) )
     {
         msg_Dbg( p_input, "Input is a meta file: disabling unneeded options" );
         var_SetString( p_input, "sout", "" );
index c34a442..40e67ef 100644 (file)
@@ -42,7 +42,7 @@ stream_t *stream_FilterNew( stream_t *p_source,
     stream_t *s;
     assert( p_source != NULL );
 
-    s = stream_CommonNew( p_source->p_parent, StreamDelete );
+    s = stream_CommonNew( p_source->obj.parent, StreamDelete );
     if( s == NULL )
         return NULL;
 
index db094cd..fab5ce3 100644 (file)
@@ -85,7 +85,7 @@ static int InputEvent( vlc_object_t *p_this, char const *psz_cmd,
     VLC_UNUSED(psz_cmd);
     VLC_UNUSED(oldval);
     input_thread_t *p_input = (input_thread_t *)p_this;
-    vlm_t *p_vlm = libvlc_priv( p_input->p_libvlc )->p_vlm;
+    vlm_t *p_vlm = libvlc_priv( p_input->obj.libvlc )->p_vlm;
     assert( p_vlm );
     vlm_media_sys_t *p_media = p_data;
     const char *psz_instance_name = NULL;
@@ -118,7 +118,7 @@ static vlc_mutex_t vlm_mutex = VLC_STATIC_MUTEX;
  *****************************************************************************/
 vlm_t *vlm_New ( vlc_object_t *p_this )
 {
-    vlm_t *p_vlm = NULL, **pp_vlm = &(libvlc_priv (p_this->p_libvlc)->p_vlm);
+    vlm_t *p_vlm = NULL, **pp_vlm = &(libvlc_priv (p_this->obj.libvlc)->p_vlm);
     char *psz_vlmconf;
 
     /* Avoid multiple creation */
@@ -137,7 +137,7 @@ vlm_t *vlm_New ( vlc_object_t *p_this )
 
     msg_Dbg( p_this, "creating VLM" );
 
-    p_vlm = vlc_custom_create( p_this->p_libvlc, sizeof( *p_vlm ),
+    p_vlm = vlc_custom_create( p_this->obj.libvlc, sizeof( *p_vlm ),
                                "vlm daemon" );
     if( !p_vlm )
     {
@@ -203,7 +203,7 @@ void vlm_Delete( vlm_t *p_vlm )
     vlc_mutex_lock( &vlm_mutex );
     assert( p_vlm->users > 0 );
     if( --p_vlm->users == 0 )
-        assert( libvlc_priv(p_vlm->p_libvlc)->p_vlm == p_vlm );
+        assert( libvlc_priv(p_vlm->obj.libvlc)->p_vlm == p_vlm );
     else
         p_vlm = NULL;
 
@@ -230,7 +230,7 @@ void vlm_Delete( vlm_t *p_vlm )
         vlc_object_release( p_vlm->p_vod );
     }
 
-    libvlc_priv(p_vlm->p_libvlc)->p_vlm = NULL;
+    libvlc_priv(p_vlm->obj.libvlc)->p_vlm = NULL;
     vlc_mutex_unlock( &vlm_mutex );
 
     vlc_join( p_vlm->thread, NULL );
index d0752b1..52cc7e8 100644 (file)
@@ -122,11 +122,11 @@ struct dialog_i11e_context
 static inline vlc_dialog_provider *
 get_dialog_provider(vlc_object_t *p_obj, bool b_check_interact)
 {
-    if (b_check_interact && p_obj->i_flags & OBJECT_FLAGS_NOINTERACT)
+    if (b_check_interact && p_obj->obj.flags & OBJECT_FLAGS_NOINTERACT)
         return NULL;
 
     vlc_dialog_provider *p_provider =
-        libvlc_priv(p_obj->p_libvlc)->p_dialog_provider;
+        libvlc_priv(p_obj->obj.libvlc)->p_dialog_provider;
     assert(p_provider != NULL);
     return p_provider;
 }
index 21bdfdc..63d8b54 100644 (file)
@@ -165,7 +165,7 @@ void intf_InsertItem(libvlc_int_t *, const char *mrl, unsigned optc,
                      const char * const *optv, unsigned flags);
 void intf_DestroyAll( libvlc_int_t * );
 
-#define libvlc_stats( o ) (libvlc_priv((VLC_OBJECT(o))->p_libvlc)->b_stats)
+#define libvlc_stats( o ) (libvlc_priv((VLC_OBJECT(o))->obj.libvlc)->b_stats)
 
 /*
  * Variables stuff
index cd16a74..66f7224 100644 (file)
@@ -299,7 +299,7 @@ static void LoadLocalStorage( addons_manager_t *p_manager )
 {
     addons_finder_t *p_finder =
         vlc_custom_create( p_manager->p_priv->p_parent, sizeof( *p_finder ), "entries finder" );
-    p_finder->i_flags |= OBJECT_FLAGS_NOINTERACT;
+    p_finder->obj.flags |= OBJECT_FLAGS_NOINTERACT;
 
     module_t *p_module = module_need( p_finder, "addons finder",
                                       "addons.store.list", true );
@@ -344,7 +344,7 @@ static void *FinderThread( void *p_data )
 
         if( p_finder != NULL )
         {
-            p_finder->i_flags |= OBJECT_FLAGS_NOINTERACT;
+            p_finder->obj.flags |= OBJECT_FLAGS_NOINTERACT;
             module_t *p_module;
             ARRAY_INIT( p_finder->entries );
             p_finder->psz_uri = psz_uri;
@@ -379,7 +379,7 @@ static int addons_manager_WriteCatalog( addons_manager_t *p_manager )
 
     addons_storage_t *p_storage =
         vlc_custom_create( p_manager->p_priv->p_parent, sizeof( *p_storage ), "entries storage" );
-    p_storage->i_flags |= OBJECT_FLAGS_NOINTERACT;
+    p_storage->obj.flags |= OBJECT_FLAGS_NOINTERACT;
 
     module_t *p_module = module_need( p_storage, "addons storage",
                                       "addons.store.install", true );
@@ -408,7 +408,7 @@ static int installOrRemoveAddon( addons_manager_t *p_manager, addon_entry_t *p_e
 
     addons_storage_t *p_storage =
         vlc_custom_create( p_manager->p_priv->p_parent, sizeof( *p_storage ), "entries storage" );
-    p_storage->i_flags |= OBJECT_FLAGS_NOINTERACT;
+    p_storage->obj.flags |= OBJECT_FLAGS_NOINTERACT;
 
     module_t *p_module = module_need( p_storage, "addons storage",
                                       "addons.store.install", true );
index 222ffb8..a05907d 100644 (file)
@@ -151,7 +151,7 @@ libvlc_InternalKeystoreClean(libvlc_int_t *p_libvlc)
 static vlc_keystore *
 get_memory_keystore(vlc_object_t *p_obj)
 {
-    return libvlc_priv(p_obj->p_libvlc)->p_memory_keystore;
+    return libvlc_priv(p_obj->obj.libvlc)->p_memory_keystore;
 }
 
 static vlc_keystore_entry *
index 5a69110..454ad16 100644 (file)
@@ -90,7 +90,7 @@ void vlc_vaLog (vlc_object_t *obj, int type, const char *module,
                 const char *file, unsigned line, const char *func,
                 const char *format, va_list args)
 {
-    if (obj != NULL && obj->i_flags & OBJECT_FLAGS_QUIET)
+    if (obj != NULL && obj->obj.flags & OBJECT_FLAGS_QUIET)
         return;
 
     /* Get basename from the module filename */
@@ -112,7 +112,7 @@ void vlc_vaLog (vlc_object_t *obj, int type, const char *module,
     vlc_log_t msg;
 
     msg.i_object_id = (uintptr_t)obj;
-    msg.psz_object_type = (obj != NULL) ? obj->psz_object_type : "generic";
+    msg.psz_object_type = (obj != NULL) ? obj->obj.object_type : "generic";
     msg.psz_module = module;
     msg.psz_header = NULL;
     msg.file = file;
@@ -120,10 +120,10 @@ void vlc_vaLog (vlc_object_t *obj, int type, const char *module,
     msg.func = func;
     msg.tid = vlc_thread_id();
 
-    for (vlc_object_t *o = obj; o != NULL; o = o->p_parent)
-        if (o->psz_header != NULL)
+    for (vlc_object_t *o = obj; o != NULL; o = o->obj.parent)
+        if (o->obj.header != NULL)
         {
-            msg.psz_header = o->psz_header;
+            msg.psz_header = o->obj.header;
             break;
         }
 
@@ -137,7 +137,7 @@ void vlc_vaLog (vlc_object_t *obj, int type, const char *module,
 
     /* Pass message to the callback */
     if (obj != NULL)
-        vlc_vaLogCallback(obj->p_libvlc, type, &msg, format, args);
+        vlc_vaLogCallback(obj->obj.libvlc, type, &msg, format, args);
 }
 
 /**
@@ -269,7 +269,7 @@ static int vlc_LogEarlyOpen(vlc_logger_t *logger)
 
 static void vlc_LogEarlyClose(vlc_logger_t *logger, void *d)
 {
-    libvlc_int_t *vlc = logger->p_libvlc;
+    libvlc_int_t *vlc = logger->obj.libvlc;
     vlc_logger_early_t *sys = d;
 
     /* Drain early log messages */
index f3af1db..3ed5271 100644 (file)
@@ -61,8 +61,8 @@ static void PrintObject (vlc_object_t *obj, const char *prefix)
 
     int canc = vlc_savecancel ();
     printf (" %so %p %s, %u refs, parent %p\n", prefix, (void *)obj,
-            obj->psz_object_type, atomic_load(&priv->refs),
-            (void *)obj->p_parent);
+            obj->obj.object_type, atomic_load(&priv->refs),
+            (void *)obj->obj.parent);
     vlc_restorecancel (canc);
 }
 
@@ -201,20 +201,20 @@ void *vlc_custom_create (vlc_object_t *parent, size_t length,
     vlc_mutex_init (&priv->tree_lock);
 
     vlc_object_t *obj = (vlc_object_t *)(priv + 1);
-    obj->psz_object_type = typename;
-    obj->psz_header = NULL;
-    obj->b_force = false;
+    obj->obj.object_type = typename;
+    obj->obj.header = NULL;
+    obj->obj.force = false;
     memset (obj + 1, 0, length - sizeof (*obj)); /* type-specific stuff */
 
     if (likely(parent != NULL))
     {
         vlc_object_internals_t *papriv = vlc_internals (parent);
 
-        obj->i_flags = parent->i_flags;
-        obj->p_libvlc = parent->p_libvlc;
+        obj->obj.flags = parent->obj.flags;
+        obj->obj.libvlc = parent->obj.libvlc;
 
         /* Attach the child to its parent (no lock needed) */
-        obj->p_parent = vlc_object_hold (parent);
+        obj->obj.parent = vlc_object_hold (parent);
 
         /* Attach the parent to its child (structure lock needed) */
         vlc_mutex_lock (&papriv->tree_lock);
@@ -228,9 +228,9 @@ void *vlc_custom_create (vlc_object_t *parent, size_t length,
     {
         libvlc_int_t *self = (libvlc_int_t *)obj;
 
-        obj->i_flags = 0;
-        obj->p_libvlc = self;
-        obj->p_parent = NULL;
+        obj->obj.flags = 0;
+        obj->obj.libvlc = self;
+        obj->obj.parent = NULL;
         priv->next = NULL;
 
         /* TODO: should be in src/libvlc.c */
@@ -319,7 +319,7 @@ static void vlc_object_destroy( vlc_object_t *p_this )
     if( p_priv->pf_destructor )
         p_priv->pf_destructor( p_this );
 
-    if (unlikely(p_this->p_parent == NULL))
+    if (unlikely(p_this->obj.parent == NULL))
     {
         /* TODO: should be in src/libvlc.c */
         var_DelCallback (p_this, "vars", VarsCommand, NULL);
@@ -332,7 +332,7 @@ static void vlc_object_destroy( vlc_object_t *p_this )
     vlc_mutex_destroy (&p_priv->tree_lock);
     vlc_cond_destroy( &p_priv->var_wait );
     vlc_mutex_destroy( &p_priv->var_lock );
-    free( p_this->psz_header );
+    free( p_this->obj.header );
     free( p_priv->psz_name );
     free( p_priv );
 }
@@ -362,7 +362,7 @@ static vlc_object_t *FindName (vlc_object_t *obj, const char *name)
  * Beware that objects found in this manner can be "owned" by another thread,
  * be of _any_ type, and be attached to any module (if any). With such an
  * object reference, you can set or get object variables, emit log messages,
- * and read write-once object parameters (psz_object_type, etc).
+ * and read write-once object parameters (obj.object_type, etc).
  * You CANNOT cast the object to a more specific object type, and you
  * definitely cannot invoke object type-specific callbacks with this.
  *
@@ -437,7 +437,7 @@ void vlc_object_release (vlc_object_t *obj)
         assert (refs > 0);
     }
 
-    vlc_object_t *parent = obj->p_parent;
+    vlc_object_t *parent = obj->obj.parent;
 
     if (unlikely(parent == NULL))
     {   /* Destroying the root object */
index f7359c1..cc32d39 100644 (file)
@@ -113,7 +113,7 @@ update_t *update_New( vlc_object_t *p_this )
 
     vlc_mutex_init( &p_update->lock );
 
-    p_update->p_libvlc = p_this->p_libvlc;
+    p_update->p_libvlc = p_this->obj.libvlc;
 
     p_update->release.psz_url = NULL;
     p_update->release.psz_desc = NULL;
index 65163d5..c2ed69a 100644 (file)
@@ -1247,7 +1247,7 @@ int var_Inherit( vlc_object_t *p_this, const char *psz_name, int i_type,
                  vlc_value_t *p_val )
 {
     i_type &= VLC_VAR_CLASS;
-    for( vlc_object_t *obj = p_this; obj != NULL; obj = obj->p_parent )
+    for( vlc_object_t *obj = p_this; obj != NULL; obj = obj->obj.parent )
     {
         if( var_GetChecked( obj, psz_name, i_type, p_val ) == VLC_SUCCESS )
             return VLC_SUCCESS;
index 6dd2678..3756011 100644 (file)
@@ -239,7 +239,7 @@ module_t *vlc_module_load(vlc_object_t *obj, const char *capability,
     }
 
     module_t *module = NULL;
-    const bool b_force_backup = obj->b_force; /* FIXME: remove this */
+    const bool b_force_backup = obj->obj.force; /* FIXME: remove this */
     va_list args;
 
     va_start(args, probe);
@@ -264,7 +264,7 @@ module_t *vlc_module_load(vlc_object_t *obj, const char *capability,
         if (!strcasecmp ("none", shortcut))
             goto done;
 
-        obj->b_force = strict && strcasecmp ("any", shortcut);
+        obj->obj.force = strict && strcasecmp ("any", shortcut);
         for (ssize_t i = 0; i < total; i++)
         {
             module_t *cand = mods[i];
@@ -289,7 +289,7 @@ module_t *vlc_module_load(vlc_object_t *obj, const char *capability,
     /* None of the shortcuts matched, fall back to any module */
     if (!strict)
     {
-        obj->b_force = false;
+        obj->obj.force = false;
         for (ssize_t i = 0; i < total; i++)
         {
             module_t *cand = mods[i];
@@ -309,7 +309,7 @@ module_t *vlc_module_load(vlc_object_t *obj, const char *capability,
     }
 done:
     va_end (args);
-    obj->b_force = b_force_backup;
+    obj->obj.force = b_force_backup;
     module_list_free (mods);
     free (var);
 
index 5787051..31387f6 100644 (file)
@@ -135,7 +135,7 @@ static vlc_tls_t *vlc_tls_SessionCreate(vlc_tls_creds_t *crd,
     if (unlikely(session == NULL))
         return NULL;
 
-    session->obj = crd->p_parent;
+    session->obj = crd->obj.parent;
     session->p = NULL;
 
     int canc = vlc_savecancel();
index 2d54850..5e198a0 100644 (file)
@@ -229,7 +229,7 @@ static bool PlayItem( playlist_t *p_playlist, playlist_item_t *p_item )
     if( !b_has_art || strncmp( psz_arturl, "attachment://", 13 ) )
     {
         PL_DEBUG( "requesting art for new input thread" );
-        libvlc_ArtRequest( p_playlist->p_libvlc, p_input, META_REQUEST_OPTION_NONE );
+        libvlc_ArtRequest( p_playlist->obj.libvlc, p_input, META_REQUEST_OPTION_NONE );
     }
     free( psz_arturl );
 
@@ -511,7 +511,7 @@ static void *Thread ( void *data )
         if( var_InheritBool( p_playlist, "play-and-exit" ) )
         {
             msg_Info( p_playlist, "end of playlist, exiting" );
-            libvlc_Quit( p_playlist->p_libvlc );
+            libvlc_Quit( p_playlist->obj.libvlc );
         }
 
         /* Destroy any video display now (XXX: ugly hack) */
index e127c32..88f59d1 100644 (file)
@@ -748,7 +748,7 @@ static void mrl_Clean( mrl_t *p_mrl )
 /* Destroy a "stream_out" module */
 static void sout_StreamDelete( sout_stream_t *p_stream )
 {
-    sout_instance_t *p_sout = (sout_instance_t *)(p_stream->p_parent);
+    sout_instance_t *p_sout = (sout_instance_t *)(p_stream->obj.parent);
 
     msg_Dbg( p_stream, "destroying chain... (name=%s)", p_stream->psz_name );
 
index c3c2ddf..8f11250 100644 (file)
@@ -46,7 +46,7 @@ static inline void vout_SendEventClose(vout_thread_t *vout)
 }
 static inline void vout_SendEventKey(vout_thread_t *vout, int key)
 {
-    var_SetInteger(vout->p_libvlc, "key-pressed", key);
+    var_SetInteger(vout->obj.libvlc, "key-pressed", key);
 }
 static inline void vout_SendEventMouseMoved(vout_thread_t *vout, int x, int y)
 {
@@ -65,14 +65,14 @@ static inline void vout_SendEventMousePressed(vout_thread_t *vout, int button)
         int x, y;
         var_GetCoords(vout, "mouse-moved", &x, &y);
         var_SetCoords(vout, "mouse-clicked", x, y);
-        var_SetBool(vout->p_libvlc, "intf-popupmenu", false);
+        var_SetBool(vout->obj.libvlc, "intf-popupmenu", false);
         return;
     }
     case MOUSE_BUTTON_CENTER:
-        var_ToggleBool(vout->p_libvlc, "intf-toggle-fscontrol");
+        var_ToggleBool(vout->obj.libvlc, "intf-toggle-fscontrol");
         return;
     case MOUSE_BUTTON_RIGHT:
-        var_SetBool(vout->p_libvlc, "intf-popupmenu", true);
+        var_SetBool(vout->obj.libvlc, "intf-popupmenu", true);
         return;
     case MOUSE_BUTTON_WHEEL_UP:    key = KEY_MOUSEWHEELUP;    break;
     case MOUSE_BUTTON_WHEEL_DOWN:  key = KEY_MOUSEWHEELDOWN;  break;
@@ -105,7 +105,7 @@ static inline void vout_SendEventMouseHidden(vout_thread_t *vout)
 static inline void vout_SendEventSnapshot(vout_thread_t *vout, const char *filename)
 {
     /* signal creation of a new snapshot file */
-    var_SetString(vout->p_libvlc, "snapshot-file", filename);
+    var_SetString(vout->obj.libvlc, "snapshot-file", filename);
 }
 
 #warning "FIXME clean up postproc event"
index 002ac7b..d80c53f 100644 (file)
@@ -416,7 +416,7 @@ static void VoutSaveSnapshot( vout_thread_t *p_vout )
     VoutOsdSnapshot( p_vout, p_picture, psz_filename );
 
     /* signal creation of a new snapshot file */
-    var_SetString( p_vout->p_libvlc, "snapshot-file", psz_filename );
+    var_SetString( p_vout->obj.libvlc, "snapshot-file", psz_filename );
 
     free( psz_filename );
 
index 8b3826a..2487668 100644 (file)
@@ -144,7 +144,7 @@ static void vout_display_window_ResizeNotify(vout_window_t *window,
 
 static void vout_display_window_CloseNotify(vout_window_t *window)
 {
-    vout_thread_t *vout = (vout_thread_t *)window->p_parent;
+    vout_thread_t *vout = (vout_thread_t *)window->obj.parent;
 
     vout_SendEventClose(vout);
 }