Commit 6a938c3c authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

input: Register vlc_InputStateChanged event.

parent acb1a3ac
......@@ -112,6 +112,9 @@ typedef struct vlc_event_manager_t
/* List of event */
/* Be sure to keep sync-ed with misc/events.c debug name table */
typedef enum vlc_event_type_t {
/* Input (thread) events */
vlc_InputStateChanged,
/* Input item events */
vlc_InputItemMetaChanged,
vlc_InputItemSubItemAdded,
......@@ -132,6 +135,12 @@ typedef struct vlc_event_t
void * p_obj; /* Sender object, automatically filled by vlc_event_send() */
union vlc_event_type_specific
{
/* Input (thread) events */
struct vlc_input_state_changed
{
int new_state;
} vlc_input_state_changed;
/* Input item events */
struct vlc_input_item_meta_changed
{
......
......@@ -167,8 +167,9 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
p_input->psz_header = psz_header ? strdup( psz_header ) : NULL;
/* Init events */
vlc_event_manager_init_with_vlc_object(
&p_input->p->event_manager, p_input );
vlc_event_manager_t * p_em = &p_input->p->event_manager;
vlc_event_manager_init_with_vlc_object( p_em, p_input );
vlc_event_manager_register_event_type( p_em, vlc_InputStateChanged );
/* Init Common fields */
p_input->b_eof = false;
......
......@@ -72,10 +72,17 @@ typedef struct vlc_event_listeners_group_t
#ifdef DEBUG_EVENT
static const char ppsz_event_type_to_name[][33] =
{
[vlc_InputStateChanged] = "vlc_InputStateChanged",
[vlc_InputItemMetaChanged] = "vlc_InputItemMetaChanged",
[vlc_InputItemSubItemAdded] = "vlc_InputItemSubItemAdded",
[vlc_InputItemDurationChanged] = "vlc_InputItemDurationChanged",
[vlc_InputItemPreparsedChanged] = "vlc_InputItemPreparsedChanged",
[vlc_ServicesDiscoveryItemAdded] = "vlc_ServicesDiscoveryItemAdded",
[vlc_ServicesDiscoveryItemRemoved] = "vlc_ServicesDiscoveryItemRemoved"
[vlc_ServicesDiscoveryStarted] = "vlc_ServicesDiscoveryStarted"
[vlc_ServicesDiscoveryEnded] = "vlc_ServicesDiscoveryEnded"
};
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment