Commit 5f5121a8 authored by Felix Paul Kühne's avatar Felix Paul Kühne

libvlc: add a new event fired if the chapter changes

parent 0584253f
...@@ -83,6 +83,7 @@ enum libvlc_event_e { ...@@ -83,6 +83,7 @@ enum libvlc_event_e {
libvlc_MediaPlayerUnmuted, libvlc_MediaPlayerUnmuted,
libvlc_MediaPlayerAudioVolume, libvlc_MediaPlayerAudioVolume,
libvlc_MediaPlayerAudioDevice, libvlc_MediaPlayerAudioDevice,
libvlc_MediaPlayerChapterChanged,
libvlc_MediaListItemAdded=0x200, libvlc_MediaListItemAdded=0x200,
libvlc_MediaListWillAddItem, libvlc_MediaListWillAddItem,
...@@ -160,6 +161,10 @@ typedef struct libvlc_event_t ...@@ -160,6 +161,10 @@ typedef struct libvlc_event_t
float new_cache; float new_cache;
} media_player_buffering; } media_player_buffering;
struct struct
{
int new_chapter;
} media_player_chapter_changed;
struct
{ {
float new_position; float new_position;
} media_player_position_changed; } media_player_position_changed;
......
...@@ -372,6 +372,12 @@ input_event_changed( vlc_object_t * p_this, char const * psz_cmd, ...@@ -372,6 +372,12 @@ input_event_changed( vlc_object_t * p_this, char const * psz_cmd,
event.u.media_player_title_changed.new_title = var_GetInteger( p_input, "title" ); event.u.media_player_title_changed.new_title = var_GetInteger( p_input, "title" );
libvlc_event_send( p_mi->p_event_manager, &event ); libvlc_event_send( p_mi->p_event_manager, &event );
} }
else if ( newval.i_int == INPUT_EVENT_CHAPTER )
{
event.type = libvlc_MediaPlayerChapterChanged;
event.u.media_player_chapter_changed.new_chapter = var_GetInteger( p_input, "chapter" );
libvlc_event_send( p_mi->p_event_manager, &event );
}
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
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