Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
2eff4fa1
Commit
2eff4fa1
authored
Dec 11, 2017
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: move vlc_common_members to <vlc_objects.h>
parent
28f53706
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
72 deletions
+68
-72
include/vlc_common.h
include/vlc_common.h
+0
-72
include/vlc_objects.h
include/vlc_objects.h
+68
-0
No files found.
include/vlc_common.h
View file @
2eff4fa1
...
...
@@ -408,78 +408,6 @@ typedef int ( * vlc_list_callback_t ) ( vlc_object_t *, /* variable's objec
#include "vlc_mtime.h"
#include "vlc_threads.h"
/**
* Common structure members
*****************************************************************************/
/**
* 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)
# define VLC_OBJECT(x) \
_Generic((x)->obj, \
struct vlc_common_members: (vlc_object_t *)(&(x)->obj), \
const struct vlc_common_members: (const vlc_object_t *)(&(x)->obj) \
)
#else
# define VLC_OBJECT( x ) ((vlc_object_t *)&(x)->obj)
#endif
/*****************************************************************************
* Macros and inline functions
*****************************************************************************/
...
...
include/vlc_objects.h
View file @
2eff4fa1
...
...
@@ -28,6 +28,74 @@
* Common VLC object defintions
*/
/**
* 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)
# define VLC_OBJECT(x) \
_Generic((x)->obj, \
struct vlc_common_members: (vlc_object_t *)(&(x)->obj), \
const struct vlc_common_members: (const vlc_object_t *)(&(x)->obj) \
)
#else
# define VLC_OBJECT( x ) ((vlc_object_t *)&(x)->obj)
#endif
/* Object flags */
#define OBJECT_FLAGS_QUIET 0x0002
#define OBJECT_FLAGS_NOINTERACT 0x0004
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment