Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
a5b3becf
Commit
a5b3becf
authored
May 14, 2009
by
Hugo Beauzee-Luyssen
Committed by
Laurent Aimar
May 14, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding a libvlc_MediaPlayerLengthChanged event
Signed-off-by:
Laurent Aimar
<
fenrir@videolan.org
>
parent
a1fbc870
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
include/vlc/libvlc_events.h
include/vlc/libvlc_events.h
+6
-0
src/control/media_player.c
src/control/media_player.c
+9
-0
No files found.
include/vlc/libvlc_events.h
View file @
a5b3becf
...
...
@@ -88,6 +88,7 @@ typedef enum libvlc_event_type_t {
libvlc_MediaPlayerTitleChanged
,
libvlc_MediaPlayerSnapshotTaken
,
libvlc_MediaPlayerLengthChanged
,
/* New event types HERE */
}
libvlc_event_type_t
;
...
...
@@ -202,6 +203,11 @@ typedef struct libvlc_event_t
char
*
psz_filename
;
}
media_player_snapshot_taken
;
/* Length changed */
struct
{
libvlc_time_t
new_length
;
}
media_player_length_changed
;
}
u
;
}
libvlc_event_t
;
...
...
src/control/media_player.c
View file @
a5b3becf
...
...
@@ -232,6 +232,13 @@ input_event_changed( vlc_object_t * p_this, char const * psz_cmd,
var_GetTime
(
p_input
,
"time"
);
libvlc_event_send
(
p_mi
->
p_event_manager
,
&
event
);
}
else
if
(
newval
.
i_int
==
INPUT_EVENT_LENGTH
)
{
event
.
type
=
libvlc_MediaPlayerLengthChanged
;
event
.
u
.
media_player_length_changed
.
new_length
=
var_GetTime
(
p_input
,
"length"
);
libvlc_event_send
(
p_mi
->
p_event_manager
,
&
event
);
}
return
VLC_SUCCESS
;
...
...
@@ -313,6 +320,8 @@ libvlc_media_player_new( libvlc_instance_t * p_libvlc_instance,
libvlc_MediaPlayerPositionChanged
,
p_e
);
libvlc_event_manager_register_event_type
(
p_mi
->
p_event_manager
,
libvlc_MediaPlayerTimeChanged
,
p_e
);
libvlc_event_manager_register_event_type
(
p_mi
->
p_event_manager
,
libvlc_MediaPlayerLengthChanged
,
p_e
);
libvlc_event_manager_register_event_type
(
p_mi
->
p_event_manager
,
libvlc_MediaPlayerTitleChanged
,
p_e
);
libvlc_event_manager_register_event_type
(
p_mi
->
p_event_manager
,
...
...
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