The mm-player event information.


#include <mmplayer/event.h>

typedef struct mmp_event {
    mmp_event_type_e type;
    repeat_e repeat;
    shuffle_e shuffle;
    status_e status;
    float rate;
    union mmp_event_details details;
    const strm_dict_t *data;
    const char *objname;
    void *usrdata;
} mmp_event_t;


mmp_event_type_e type
Event type
repeat_e repeat
The player's repeat mode
shuffle_e shuffle
The player's shuffle mode
status_e status
The player's status
float rate
Playback rate
union mmp_event::mmp_event_details details
Additional details that vary by event type
const strm_dict_t *data
The set of mm-player properties reported by the event, stored in a dictionary object. This field is NULL when no set of properties exists; for example, if a media source has just been connected and no information has been read yet.
const char *objname
The name of the internal mm-player object associated with this event
void *usrdata
The user data associated with the dictionary; this field is always NULL because it's currently unused




The mmp_event_t structure is returned by mmp_event_get() and stores information on the latest event. For all events, the structure contains the event type and the latest player state information (e.g., repeat mode, playback status). For all event types except MMP_EVENT_NONE and MMP_EVENT_OTHER, the structure contains additional, type-specific information in the details and data fields. For instance, for MMP_EVENT_MEDIASOURCE events, each of these fields stores the type of the media source event (e.g., a media source connection or a disconnection) and information on the media source affected by the event.