vlc的基础结构主要为:
typedef struct vlc_list_t vlc_list_t;
typedef struct vlc_object_t vlc_object_t;
typedef struct libvlc_int_t libvlc_int_t;
typedef struct date_t date_t;
现只分析vlc_object_t和libvlc_int_t
其中vlc_object_t为所有类型的“基类”:
struct vlc_object_t
{
VLC_COMMON_MEMBERS
};
libvlc_int_t“继承”自vlc_object_t
struct libvlc_int_t
{
VLC_COMMON_MEMBERS
/* Structure storing the action name / key associations */
const struct hotkey *p_hotkeys;
};
struct hotkey实际是个字符串:
struct hotkey
{
const char *psz_action;
};
创建vlc_object_t对象的函数为
void *vlc_custom_create (vlc_object_t *parent, size_t length,
const char *typename)
内部有一个重要的类vlc_object_internals_t来管理vlc_object_t对象内部的变量等
网友评论