[vlc-devel] commit: input: Send vlc_InputSelectedStreamChanged. (Pierre d'Herbemont )
git version control
git at videolan.org
Sat Jun 14 16:42:28 CEST 2008
vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sat Jun 14 16:22:35 2008 +0200| [e9fba763dfcb5f7ba12211bddf75bba55c35896c]
input: Send vlc_InputSelectedStreamChanged.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e9fba763dfcb5f7ba12211bddf75bba55c35896c
---
include/vlc_events.h | 5 +++++
src/input/es_out.c | 3 +++
src/input/input.c | 1 +
src/misc/events.c | 1 +
4 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/include/vlc_events.h b/include/vlc_events.h
index c26cdb5..51a3faa 100644
--- a/include/vlc_events.h
+++ b/include/vlc_events.h
@@ -114,6 +114,7 @@ typedef struct vlc_event_manager_t
typedef enum vlc_event_type_t {
/* Input (thread) events */
vlc_InputStateChanged,
+ vlc_InputSelectedStreamChanged,
/* Input item events */
vlc_InputItemMetaChanged,
@@ -142,6 +143,10 @@ typedef struct vlc_event_t
{
int new_state;
} input_state_changed;
+ struct vlc_input_selected_stream_changed
+ {
+ void * unused;
+ } input_selected_stream_changed;
/* Input item events */
struct vlc_input_item_meta_changed
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 3afcc2d..df4fb09 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -1699,6 +1699,9 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
PL_UNLOCK;
}
pl_Release( p_sys->p_input );
+ vlc_event_t event;
+ event.type = vlc_InputSelectedStreamChanged;
+ vlc_event_send( &p_sys->p_input->p->event_manager, &event );
}
return VLC_SUCCESS;
diff --git a/src/input/input.c b/src/input/input.c
index f397d4d..c954bb5 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -169,6 +169,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
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 );
+ vlc_event_manager_register_event_type( p_em, vlc_InputSelectedStreamChanged );
/* Init Common fields */
p_input->b_eof = false;
diff --git a/src/misc/events.c b/src/misc/events.c
index cd883c7..1989335 100644
--- a/src/misc/events.c
+++ b/src/misc/events.c
@@ -73,6 +73,7 @@ typedef struct vlc_event_listeners_group_t
static const char ppsz_event_type_to_name[][33] =
{
[vlc_InputStateChanged] = "vlc_InputStateChanged",
+ [vlc_InputSelectedStreamChanged] = "vlc_InputSelectedStreamChanged",
[vlc_InputItemMetaChanged] = "vlc_InputItemMetaChanged",
[vlc_InputItemSubItemAdded] = "vlc_InputItemSubItemAdded",
More information about the vlc-devel
mailing list