// Convert c-style libvlc_event_t to Event
Convert c-style libvlc_event_t to Event
Convert c - style libvlc_event_t to Event
fn conv_event(pe: *const sys::libvlc_event_t) -> Event {
    let event_type: EventType = unsafe{ ::std::mem::transmute((*pe)._type) };
    match event_type {
        EventType::MediaMetaChanged => {
            unsafe{
                Event::MediaMetaChanged((*pe).u.media_meta_changed.meta_type)
            }
        },
        EventType::MediaSubItemAdded => {
            Event::MediaSubItemAdded
        },
        EventType::MediaDurationChanged => {
            unsafe{
                Event::MediaDurationChanged((*pe).u.media_duration_changed.new_duration)
            }
        },
        EventType::MediaParsedChanged => {
            unsafe{
                Event::MediaParsedChanged((*pe).u.media_parsed_changed.new_status)
            }
        },
        EventType::MediaFreed => {
            Event::MediaFreed
        },
        EventType::MediaStateChanged => {
            unsafe{
                Event::MediaStateChanged((*pe).u.media_state_changed.new_state)
            }
        },
        EventType::MediaSubItemTreeAdded => {
            Event::MediaSubItemTreeAdded
        },
        EventType::MediaPlayerMediaChanged => {
            Event::MediaPlayerMediaChanged
        },
        EventType::MediaPlayerNothingSpecial => {
            Event::MediaPlayerNothingSpecial
        },
        EventType::MediaPlayerOpening => {
            Event::MediaPlayerOpening
        },
        EventType::MediaPlayerBuffering => {
            unsafe{
                Event::MediaPlayerBuffering((*pe).u.media_player_buffering.new_cache)
            }
        },
        EventType::MediaPlayerPlaying => {
            Event::MediaPlayerPlaying
        },
        EventType::MediaPlayerPaused => {
            Event::MediaPlayerPaused
        },
        EventType::MediaPlayerStopped => {
            Event::MediaPlayerStopped
        },
        EventType::MediaPlayerForward => {
            Event::MediaPlayerForward
        },
        EventType::MediaPlayerBackward => {
            Event::MediaPlayerBackward
        },
        EventType::MediaPlayerEndReached => {
            Event::MediaPlayerEndReached
        },
        EventType::MediaPlayerEncounteredError => {
            Event::MediaPlayerEncounteredError
        },
        EventType::MediaPlayerTimeChanged => {
            Event::MediaPlayerTimeChanged
        },
        EventType::MediaPlayerPositionChanged => {
            unsafe{
                Event::MediaPlayerPositionChanged((*pe).u.media_player_position_changed.new_position)
            }
        },
        EventType::MediaPlayerSeekableChanged => {
            Event::MediaPlayerSeekableChanged
        },
        EventType::MediaPlayerPausableChanged => {
            Event::MediaPlayerPausableChanged
        },
        EventType::MediaPlayerTitleChanged => {
            Event::MediaPlayerTitleChanged
        },
        EventType::MediaPlayerSnapshotTaken => {
            Event::MediaPlayerSnapshotTaken
        },
        EventType::MediaPlayerLengthChanged => {
            Event::MediaPlayerLengthChanged
        },
        EventType::MediaPlayerVout => {
            Event::MediaPlayerVout
        },
        EventType::MediaPlayerScrambledChanged => {
            Event::MediaPlayerScrambledChanged
        },
        EventType::MediaListItemAdded => {
            Event::MediaListItemAdded
        },
        EventType::MediaListWillAddItem => {
            Event::MediaListWillAddItem
        },
        EventType::MediaListItemDeleted => {
            Event::MediaListItemDeleted
        },
        EventType::MediaListWillDeleteItem => {
            Event::MediaListWillDeleteItem
        },
        EventType::MediaListViewItemAdded => {
            Event::MediaListViewItemAdded
        },
        EventType::MediaListViewWillAddItem => {
            Event::MediaListViewWillAddItem
        },
        EventType::MediaListViewItemDeleted => {
            Event::MediaListViewItemDeleted
        },
        EventType::MediaListViewWillDeleteItem => {
            Event::MediaListViewWillDeleteItem
        },
        EventType::MediaListPlayerPlayed => {
            Event::MediaListPlayerPlayed
        },
        EventType::MediaListPlayerNextItemSet => {
            Event::MediaListPlayerNextItemSet
        },
        EventType::MediaListPlayerStopped => {
            Event::MediaListPlayerStopped
        },
        EventType::MediaDiscovererStarted => {
            Event::MediaDiscovererStarted
        },
        EventType::MediaDiscovererEnded => {
            Event::MediaDiscovererEnded
        },
        EventType::VlmMediaAdded => {
            unsafe {
                Event::VlmMediaAdded(from_cstr((*pe).u.vlm_media_event.psz_instance_name), from_cstr((*pe).u.vlm_media_event.psz_media_name))
            }
        },
        EventType::VlmMediaRemoved => {
            unsafe {
                Event::VlmMediaRemoved(from_cstr((*pe).u.vlm_media_event.psz_instance_name), from_cstr((*pe).u.vlm_media_event.psz_media_name))
            }
        },
        EventType::VlmMediaChanged => {
            unsafe {
                Event::VlmMediaChanged(from_cstr((*pe).u.vlm_media_event.psz_instance_name), from_cstr((*pe).u.vlm_media_event.psz_media_name))
            }
        },
        EventType::VlmMediaInstanceStarted => {
            unsafe {
                Event::VlmMediaInstanceStarted(from_cstr((*pe).u.vlm_media_event.psz_instance_name), from_cstr((*pe).u.vlm_media_event.psz_media_name))
            }
        },
        EventType::VlmMediaInstanceStopped => {
            unsafe {
                Event::VlmMediaInstanceStopped(from_cstr((*pe).u.vlm_media_event.psz_instance_name), from_cstr((*pe).u.vlm_media_event.psz_media_name))
            }
        },
        EventType::VlmMediaInstanceStatusInit => {
            unsafe {
                Event::VlmMediaInstanceStatusInit(from_cstr((*pe).u.vlm_media_event.psz_instance_name), from_cstr((*pe).u.vlm_media_event.psz_media_name))
            }
        },
        EventType::VlmMediaInstanceStatusOpening => {
            unsafe {
                Event::VlmMediaInstanceStatusOpening(from_cstr((*pe).u.vlm_media_event.psz_instance_name), from_cstr((*pe).u.vlm_media_event.psz_media_name))
            }
        },
        EventType::VlmMediaInstanceStatusPlaying => {
            unsafe {
                Event::VlmMediaInstanceStatusPlaying(from_cstr((*pe).u.vlm_media_event.psz_instance_name), from_cstr((*pe).u.vlm_media_event.psz_media_name))
            }
        },
        EventType::VlmMediaInstanceStatusPause => {
            unsafe {
                Event::VlmMediaInstanceStatusPause(from_cstr((*pe).u.vlm_media_event.psz_instance_name), from_cstr((*pe).u.vlm_media_event.psz_media_name))
            }
        },
        EventType::VlmMediaInstanceStatusEnd => {
            unsafe {
                Event::VlmMediaInstanceStatusEnd(from_cstr((*pe).u.vlm_media_event.psz_instance_name), from_cstr((*pe).u.vlm_media_event.psz_media_name))
            }
        },
        EventType::VlmMediaInstanceStatusError => {
            unsafe {
                Event::VlmMediaInstanceStatusError(from_cstr((*pe).u.vlm_media_event.psz_instance_name), from_cstr((*pe).u.vlm_media_event.psz_media_name))
            }
        },
    }
}
fn conv_event ( pe : * const sys :: libvlc_event_t ) -> Event { let event_type : EventType = unsafe { :: std :: mem :: transmute ( ( * pe ) . _type ) } ; match event_type { EventType :: MediaMetaChanged => { unsafe { Event :: MediaMetaChanged ( ( * pe ) . u . media_meta_changed . meta_type ) } } , EventType :: MediaSubItemAdded => { Event :: MediaSubItemAdded } , EventType :: MediaDurationChanged => { unsafe { Event :: MediaDurationChanged ( ( * pe ) . u . media_duration_changed . new_duration ) } } , EventType :: MediaParsedChanged => { unsafe { Event :: MediaParsedChanged ( ( * pe ) . u . media_parsed_changed . new_status ) } } , EventType :: MediaFreed => { Event :: MediaFreed } , EventType :: MediaStateChanged => { unsafe { Event :: MediaStateChanged ( ( * pe ) . u . media_state_changed . new_state ) } } , EventType :: MediaSubItemTreeAdded => { Event :: MediaSubItemTreeAdded } , EventType :: MediaPlayerMediaChanged => { Event :: MediaPlayerMediaChanged } , EventType :: MediaPlayerNothingSpecial => { Event :: MediaPlayerNothingSpecial } , EventType :: MediaPlayerOpening => { Event :: MediaPlayerOpening } , EventType :: MediaPlayerBuffering => { unsafe { Event :: MediaPlayerBuffering ( ( * pe ) . u . media_player_buffering . new_cache ) } } , EventType :: MediaPlayerPlaying => { Event :: MediaPlayerPlaying } , EventType :: MediaPlayerPaused => { Event :: MediaPlayerPaused } , EventType :: MediaPlayerStopped => { Event :: MediaPlayerStopped } , EventType :: MediaPlayerForward => { Event :: MediaPlayerForward } , EventType :: MediaPlayerBackward => { Event :: MediaPlayerBackward } , EventType :: MediaPlayerEndReached => { Event :: MediaPlayerEndReached } , EventType :: MediaPlayerEncounteredError => { Event :: MediaPlayerEncounteredError } , EventType :: MediaPlayerTimeChanged => { Event :: MediaPlayerTimeChanged } , EventType :: MediaPlayerPositionChanged => { unsafe { Event :: MediaPlayerPositionChanged ( ( * pe ) . u . media_player_position_changed . new_position ) } } , EventType :: MediaPlayerSeekableChanged => { Event :: MediaPlayerSeekableChanged } , EventType :: MediaPlayerPausableChanged => { Event :: MediaPlayerPausableChanged } , EventType :: MediaPlayerTitleChanged => { Event :: MediaPlayerTitleChanged } , EventType :: MediaPlayerSnapshotTaken => { Event :: MediaPlayerSnapshotTaken } , EventType :: MediaPlayerLengthChanged => { Event :: MediaPlayerLengthChanged } , EventType :: MediaPlayerVout => { Event :: MediaPlayerVout } , EventType :: MediaPlayerScrambledChanged => { Event :: MediaPlayerScrambledChanged } , EventType :: MediaListItemAdded => { Event :: MediaListItemAdded } , EventType :: MediaListWillAddItem => { Event :: MediaListWillAddItem } , EventType :: MediaListItemDeleted => { Event :: MediaListItemDeleted } , EventType :: MediaListWillDeleteItem => { Event :: MediaListWillDeleteItem } , EventType :: MediaListViewItemAdded => { Event :: MediaListViewItemAdded } , EventType :: MediaListViewWillAddItem => { Event :: MediaListViewWillAddItem } , EventType :: MediaListViewItemDeleted => { Event :: MediaListViewItemDeleted } , EventType :: MediaListViewWillDeleteItem => { Event :: MediaListViewWillDeleteItem } , EventType :: MediaListPlayerPlayed => { Event :: MediaListPlayerPlayed } , EventType :: MediaListPlayerNextItemSet => { Event :: MediaListPlayerNextItemSet } , EventType :: MediaListPlayerStopped => { Event :: MediaListPlayerStopped } , EventType :: MediaDiscovererStarted => { Event :: MediaDiscovererStarted } , EventType :: MediaDiscovererEnded => { Event :: MediaDiscovererEnded } , EventType :: VlmMediaAdded => { unsafe { Event :: VlmMediaAdded ( from_cstr ( ( * pe ) . u . vlm_media_event . psz_instance_name ) , from_cstr ( ( * pe ) . u . vlm_media_event . psz_media_name ) ) } } , EventType :: VlmMediaRemoved => { unsafe { Event :: VlmMediaRemoved ( from_cstr ( ( * pe ) . u . vlm_media_event . psz_instance_name ) , from_cstr ( ( * pe ) . u . vlm_media_event . psz_media_name ) ) } } , EventType :: VlmMediaChanged => { unsafe { Event :: VlmMediaChanged ( from_cstr ( ( * pe ) . u . vlm_media_event . psz_instance_name ) , from_cstr ( ( * pe ) . u . vlm_media_event . psz_media_name ) ) } } , EventType :: VlmMediaInstanceStarted => { unsafe { Event :: VlmMediaInstanceStarted ( from_cstr ( ( * pe ) . u . vlm_media_event . psz_instance_name ) , from_cstr ( ( * pe ) . u . vlm_media_event . psz_media_name ) ) } } , EventType :: VlmMediaInstanceStopped => { unsafe { Event :: VlmMediaInstanceStopped ( from_cstr ( ( * pe ) . u . vlm_media_event . psz_instance_name ) , from_cstr ( ( * pe ) . u . vlm_media_event . psz_media_name ) ) } } , EventType :: VlmMediaInstanceStatusInit => { unsafe { Event :: VlmMediaInstanceStatusInit ( from_cstr ( ( * pe ) . u . vlm_media_event . psz_instance_name ) , from_cstr ( ( * pe ) . u . vlm_media_event . psz_media_name ) ) } } , EventType :: VlmMediaInstanceStatusOpening => { unsafe { Event :: VlmMediaInstanceStatusOpening ( from_cstr ( ( * pe ) . u . vlm_media_event . psz_instance_name ) , from_cstr ( ( * pe ) . u . vlm_media_event . psz_media_name ) ) } } , EventType :: VlmMediaInstanceStatusPlaying => { unsafe { Event :: VlmMediaInstanceStatusPlaying ( from_cstr ( ( * pe ) . u . vlm_media_event . psz_instance_name ) , from_cstr ( ( * pe ) . u . vlm_media_event . psz_media_name ) ) } } , EventType :: VlmMediaInstanceStatusPause => { unsafe { Event :: VlmMediaInstanceStatusPause ( from_cstr ( ( * pe ) . u . vlm_media_event . psz_instance_name ) , from_cstr ( ( * pe ) . u . vlm_media_event . psz_media_name ) ) } } , EventType :: VlmMediaInstanceStatusEnd => { unsafe { Event :: VlmMediaInstanceStatusEnd ( from_cstr ( ( * pe ) . u . vlm_media_event . psz_instance_name ) , from_cstr ( ( * pe ) . u . vlm_media_event . psz_media_name ) ) } } , EventType :: VlmMediaInstanceStatusError => { unsafe { Event :: VlmMediaInstanceStatusError ( from_cstr ( ( * pe ) . u . vlm_media_event . psz_instance_name ) , from_cstr ( ( * pe ) . u . vlm_media_event . psz_media_name ) ) } } , } }
Convert c-style libvlc_event_t to Event
Convert c - style libvlc_event_t to Event
pe
*const sys::libvlc_event_t