Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
788413cf
Commit
788413cf
authored
Jun 14, 2008
by
Pierre d'Herbemont
Browse files
input: Send vlc_InputItemInfoChanged, and vlc_InputItemNameChanged events.
parent
6db8b4dd
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/vlc_events.h
View file @
788413cf
...
...
@@ -120,6 +120,8 @@ typedef enum vlc_event_type_t {
vlc_InputItemSubItemAdded
,
vlc_InputItemDurationChanged
,
vlc_InputItemPreparsedChanged
,
vlc_InputItemNameChanged
,
vlc_InputItemInfoChanged
,
/* Service Discovery event */
vlc_ServicesDiscoveryItemAdded
,
...
...
@@ -158,6 +160,14 @@ typedef struct vlc_event_t
{
int
new_status
;
}
input_item_preparsed_changed
;
struct
vlc_input_item_name_changed
{
const
char
*
new_name
;
}
input_item_name_changed
;
struct
vlc_input_item_info_changed
{
void
*
unused
;
}
input_item_info_changed
;
/* Service discovery events */
struct
vlc_services_discovery_item_added
...
...
src/input/control.c
View file @
788413cf
...
...
@@ -200,7 +200,12 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
vlc_mutex_unlock
(
&
p_input
->
p
->
input
.
p_item
->
lock
);
if
(
!
p_input
->
b_preparsing
)
{
NotifyPlaylist
(
p_input
);
vlc_event_t
event
;
event
.
type
=
vlc_InputItemInfoChanged
;
vlc_event_send
(
p_input
->
p
->
input
.
p_item
,
&
event
);
}
}
return
VLC_SUCCESS
;
...
...
@@ -267,8 +272,12 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
vlc_mutex_unlock
(
&
p_input
->
p
->
input
.
p_item
->
lock
);
if
(
!
p_input
->
b_preparsing
)
{
NotifyPlaylist
(
p_input
);
vlc_event_t
event
;
event
.
type
=
vlc_InputItemInfoChanged
;
vlc_event_send
(
p_input
->
p
->
input
.
p_item
,
&
event
);
}
return
VLC_SUCCESS
;
}
...
...
@@ -299,8 +308,13 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
vlc_mutex_unlock
(
&
p_input
->
p
->
input
.
p_item
->
lock
);
if
(
!
p_input
->
b_preparsing
)
{
NotifyPlaylist
(
p_input
);
vlc_event_t
event
;
event
.
type
=
vlc_InputItemNameChanged
;
event
.
u
.
input_item_name_changed
.
new_name
=
psz_name
;
vlc_event_send
(
p_input
->
p
->
input
.
p_item
,
&
event
);
}
return
VLC_SUCCESS
;
}
...
...
src/input/item.c
View file @
788413cf
...
...
@@ -62,6 +62,10 @@ static inline void input_ItemInit( vlc_object_t *p_o, input_item_t *p_i )
vlc_InputItemDurationChanged
);
vlc_event_manager_register_event_type
(
&
p_i
->
event_manager
,
vlc_InputItemPreparsedChanged
);
vlc_event_manager_register_event_type
(
&
p_i
->
event_manager
,
vlc_InputItemNameChanged
);
vlc_event_manager_register_event_type
(
&
p_i
->
event_manager
,
vlc_InputItemInfoChanged
);
}
static
inline
void
input_ItemClean
(
input_item_t
*
p_i
)
...
...
src/misc/events.c
View file @
788413cf
...
...
@@ -78,6 +78,8 @@ static const char ppsz_event_type_to_name[][33] =
[
vlc_InputItemSubItemAdded
]
=
"vlc_InputItemSubItemAdded"
,
[
vlc_InputItemDurationChanged
]
=
"vlc_InputItemDurationChanged"
,
[
vlc_InputItemPreparsedChanged
]
=
"vlc_InputItemPreparsedChanged"
,
[
vlc_InputItemNameChanged
]
=
"vlc_InputItemNameChanged"
,
[
vlc_InputItemInfoChanged
]
=
"vlc_InputItemInfoChanged"
,
[
vlc_ServicesDiscoveryItemAdded
]
=
"vlc_ServicesDiscoveryItemAdded"
,
[
vlc_ServicesDiscoveryItemRemoved
]
=
"vlc_ServicesDiscoveryItemRemoved"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment