]> git.sesse.net Git - vlc/blobdiff - include/vlc_variables.h
Add var_InheritAddress()
[vlc] / include / vlc_variables.h
index 0a9d7057b20d214f23621cfc3c96b9c752c37c3d..2cf2d836341935b23913ee92295e227ce5cfec96 100644 (file)
@@ -188,7 +188,8 @@ VLC_EXPORT( int, var_TriggerCallback, ( vlc_object_t *, const char * ) );
  * \param psz_name The name of the variable
  * \param i The new integer value of this variable
  */
-static inline int var_SetInteger( vlc_object_t *p_obj, const char *psz_name, int i )
+static inline int var_SetInteger( vlc_object_t *p_obj, const char *psz_name,
+                                  int64_t i )
 {
     vlc_value_t val;
     val.i_int = i;
@@ -712,6 +713,16 @@ static inline mtime_t var_InheritTime( vlc_object_t *obj, const char *name )
 }
 #define var_InheritTime(o, n) var_InheritTime(VLC_OBJECT(o), n)
 
+static inline void *var_InheritAddress( vlc_object_t *obj, const char *name )
+{
+    vlc_value_t val;
+
+    if( var_Inherit( obj, name, VLC_VAR_ADDRESS, &val ) )
+        val.p_address = NULL;
+    return val.p_address;
+}
+#define var_InheritAddress(o, n) var_InheritAddress(VLC_OBECT(o), n)
+
 VLC_EXPORT( int, var_InheritURational, ( vlc_object_t *, unsigned *num, unsigned *den, const char *var ) );
 #define var_InheritURational(a,b,c,d) var_InheritURational(VLC_OBJECT(a), b, c, d)