Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
788413cf
Commit
788413cf
authored
Jun 14, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: Send vlc_InputItemInfoChanged, and vlc_InputItemNameChanged events.
parent
6db8b4dd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
2 deletions
+32
-2
include/vlc_events.h
include/vlc_events.h
+10
-0
src/input/control.c
src/input/control.c
+16
-2
src/input/item.c
src/input/item.c
+4
-0
src/misc/events.c
src/misc/events.c
+2
-0
No files found.
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
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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