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
ee1330c4
Commit
ee1330c4
authored
Mar 31, 2008
by
Tanguy Krotoff
Committed by
Pierre d'Herbemont
Mar 31, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc: add libvlc_MediaInstanceStopped
Signed-off-by:
Pierre d'Herbemont
<
pdherbemont@videolan.org
>
parent
be3c7a5f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
28 additions
and
16 deletions
+28
-16
bindings/java/core/src/main/java/org/videolan/jvlc/event/MediaInstanceCallback.java
...n/java/org/videolan/jvlc/event/MediaInstanceCallback.java
+1
-1
bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlcEventType.java
...main/java/org/videolan/jvlc/internal/LibVlcEventType.java
+2
-1
bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlcImpl.java
.../src/main/java/org/videolan/jvlc/internal/LibVlcImpl.java
+2
-2
include/vlc/libvlc_events.h
include/vlc/libvlc_events.h
+2
-1
projects/macosx/framework/Sources/VLCMediaPlayer.m
projects/macosx/framework/Sources/VLCMediaPlayer.m
+3
-3
src/control/event.c
src/control/event.c
+2
-1
src/control/media_list_player.c
src/control/media_list_player.c
+3
-3
src/control/media_player.c
src/control/media_player.c
+11
-3
src/control/testapi.c
src/control/testapi.c
+2
-1
No files found.
bindings/java/core/src/main/java/org/videolan/jvlc/event/MediaInstanceCallback.java
View file @
ee1330c4
...
...
@@ -60,7 +60,7 @@ public class MediaInstanceCallback implements LibVlcCallback
{
listener
.
paused
(
mediaInstance
);
}
else
if
(
libvlc_event
.
type
==
LibVlcEventType
.
libvlc_MediaInstance
ReachedEn
d
.
ordinal
())
else
if
(
libvlc_event
.
type
==
LibVlcEventType
.
libvlc_MediaInstance
EndReache
d
.
ordinal
())
{
listener
.
endReached
(
mediaInstance
);
}
...
...
bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlcEventType.java
View file @
ee1330c4
...
...
@@ -36,7 +36,8 @@ public enum LibVlcEventType {
libvlc_MediaDescriptorStateChanged
,
libvlc_MediaInstancePlayed
,
libvlc_MediaInstancePaused
,
libvlc_MediaInstanceReachedEnd
,
libvlc_MediaInstanceEndReached
,
libvlc_MediaInstanceStopped
,
libvlc_MediaInstanceEncounteredError
,
libvlc_MediaInstanceTimeChanged
,
libvlc_MediaInstancePositionChanged
;
...
...
bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlcImpl.java
View file @
ee1330c4
...
...
@@ -98,11 +98,11 @@ public class LibVlcImpl
libVlc
.
libvlc_event_attach
(
mediaInstanceEventManager
,
LibVlcEventType
.
libvlc_MediaInstance
ReachedEn
d
.
ordinal
(),
LibVlcEventType
.
libvlc_MediaInstance
EndReache
d
.
ordinal
(),
endReached
,
null
,
exception
);
JFrame
frame
=
new
JFrame
(
"title"
);
frame
.
setVisible
(
true
);
frame
.
setLocation
(
100
,
100
);
...
...
include/vlc/libvlc_events.h
View file @
ee1330c4
...
...
@@ -49,7 +49,8 @@ typedef enum libvlc_event_type_t {
libvlc_MediaInstancePlayed
,
libvlc_MediaInstancePaused
,
libvlc_MediaInstanceReachedEnd
,
libvlc_MediaInstanceEndReached
,
libvlc_MediaInstanceStopped
,
libvlc_MediaInstanceEncounteredError
,
libvlc_MediaInstanceTimeChanged
,
libvlc_MediaInstancePositionChanged
,
...
...
projects/macosx/framework/Sources/VLCMediaPlayer.m
View file @
ee1330c4
...
...
@@ -92,7 +92,7 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
newState
=
VLCMediaPlayerStatePlaying
;
else
if
(
event
->
type
==
libvlc_MediaInstancePaused
)
newState
=
VLCMediaPlayerStatePaused
;
else
if
(
event
->
type
==
libvlc_MediaInstance
ReachedEn
d
)
else
if
(
event
->
type
==
libvlc_MediaInstance
EndReache
d
)
newState
=
VLCMediaPlayerStateStopped
;
else
if
(
event
->
type
==
libvlc_MediaInstanceEncounteredError
)
newState
=
VLCMediaPlayerStateError
;
...
...
@@ -642,7 +642,7 @@ static const VLCMediaPlayerState libvlc_to_local_state[] =
libvlc_event_manager_t
*
p_em
=
libvlc_media_player_event_manager
(
instance
,
&
ex
);
libvlc_event_attach
(
p_em
,
libvlc_MediaInstancePlayed
,
HandleMediaInstanceStateChanged
,
self
,
&
ex
);
libvlc_event_attach
(
p_em
,
libvlc_MediaInstancePaused
,
HandleMediaInstanceStateChanged
,
self
,
&
ex
);
libvlc_event_attach
(
p_em
,
libvlc_MediaInstance
ReachedEn
d
,
HandleMediaInstanceStateChanged
,
self
,
&
ex
);
libvlc_event_attach
(
p_em
,
libvlc_MediaInstance
EndReache
d
,
HandleMediaInstanceStateChanged
,
self
,
&
ex
);
/* FIXME: We may want to turn that off when none is interested by that */
libvlc_event_attach
(
p_em
,
libvlc_MediaInstancePositionChanged
,
HandleMediaPositionChanged
,
self
,
&
ex
);
libvlc_event_attach
(
p_em
,
libvlc_MediaInstanceTimeChanged
,
HandleMediaTimeChanged
,
self
,
&
ex
);
...
...
@@ -654,7 +654,7 @@ static const VLCMediaPlayerState libvlc_to_local_state[] =
libvlc_event_manager_t
*
p_em
=
libvlc_media_player_event_manager
(
instance
,
NULL
);
libvlc_event_detach
(
p_em
,
libvlc_MediaInstancePlayed
,
HandleMediaInstanceStateChanged
,
self
,
NULL
);
libvlc_event_detach
(
p_em
,
libvlc_MediaInstancePaused
,
HandleMediaInstanceStateChanged
,
self
,
NULL
);
libvlc_event_detach
(
p_em
,
libvlc_MediaInstance
ReachedEn
d
,
HandleMediaInstanceStateChanged
,
self
,
NULL
);
libvlc_event_detach
(
p_em
,
libvlc_MediaInstance
EndReache
d
,
HandleMediaInstanceStateChanged
,
self
,
NULL
);
libvlc_event_detach
(
p_em
,
libvlc_MediaInstancePositionChanged
,
HandleMediaPositionChanged
,
self
,
NULL
);
libvlc_event_detach
(
p_em
,
libvlc_MediaInstanceTimeChanged
,
HandleMediaTimeChanged
,
self
,
NULL
);
}
...
...
src/control/event.c
View file @
ee1330c4
...
...
@@ -263,7 +263,8 @@ static const char * event_type_to_name[] =
EVENT
(
libvlc_MediaInstancePlayed
),
EVENT
(
libvlc_MediaInstancePaused
),
EVENT
(
libvlc_MediaInstanceReachedEnd
),
EVENT
(
libvlc_MediaInstanceEndReached
),
EVENT
(
libvlc_MediaInstanceStopped
),
EVENT
(
libvlc_MediaInstanceTimeChanged
),
EVENT
(
libvlc_MediaInstancePositionChanged
),
...
...
src/control/media_list_player.c
View file @
ee1330c4
...
...
@@ -170,7 +170,7 @@ static void
install_media_player_observer
(
libvlc_media_list_player_t
*
p_mlp
)
{
libvlc_event_attach
(
libvlc_media_player_event_manager
(
p_mlp
->
p_mi
,
NULL
),
libvlc_MediaInstance
ReachedEn
d
,
libvlc_MediaInstance
EndReache
d
,
media_player_reached_end
,
p_mlp
,
NULL
);
}
...
...
@@ -185,9 +185,9 @@ uninstall_media_player_observer( libvlc_media_list_player_t * p_mlp )
{
return
;
}
libvlc_event_detach
(
libvlc_media_player_event_manager
(
p_mlp
->
p_mi
,
NULL
),
libvlc_MediaInstance
ReachedEn
d
,
libvlc_MediaInstance
EndReache
d
,
media_player_reached_end
,
p_mlp
,
NULL
);
}
...
...
src/control/media_player.c
View file @
ee1330c4
...
...
@@ -149,7 +149,7 @@ input_state_changed( vlc_object_t * p_this, char const * psz_cmd,
{
case
END_S
:
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_NothingSpecial
,
NULL
);
event
.
type
=
libvlc_MediaInstance
ReachedEn
d
;
event
.
type
=
libvlc_MediaInstance
EndReache
d
;
break
;
case
PAUSE_S
:
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_Playing
,
NULL
);
...
...
@@ -314,9 +314,11 @@ libvlc_media_player_new( libvlc_instance_t * p_libvlc_instance,
free
(
p_mi
);
return
NULL
;
}
libvlc_event_manager_register_event_type
(
p_mi
->
p_event_manager
,
libvlc_MediaInstanceEndReached
,
p_e
);
libvlc_event_manager_register_event_type
(
p_mi
->
p_event_manager
,
libvlc_MediaInstance
ReachedEn
d
,
p_e
);
libvlc_MediaInstance
Stoppe
d
,
p_e
);
libvlc_event_manager_register_event_type
(
p_mi
->
p_event_manager
,
libvlc_MediaInstanceEncounteredError
,
p_e
);
libvlc_event_manager_register_event_type
(
p_mi
->
p_event_manager
,
...
...
@@ -641,6 +643,12 @@ void libvlc_media_player_stop( libvlc_media_player_t *p_mi,
input_StopThread
(
p_input_thread
);
vlc_object_release
(
p_input_thread
);
}
/* Send a stop notification event */
libvlc_event_t
event
;
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_Stopped
,
NULL
);
event
.
type
=
libvlc_MediaInstanceStopped
;
libvlc_event_send
(
p_mi
->
p_event_manager
,
&
event
);
}
/**************************************************************************
...
...
src/control/testapi.c
View file @
ee1330c4
...
...
@@ -247,7 +247,8 @@ static void test_events (const char ** argv, int argc)
libvlc_event_type_t
mi_events
[]
=
{
libvlc_MediaInstancePlayed
,
libvlc_MediaInstancePaused
,
libvlc_MediaInstanceReachedEnd
,
libvlc_MediaInstanceEndReached
,
libvlc_MediaInstanceStopped
,
libvlc_MediaInstanceEncounteredError
,
libvlc_MediaInstanceTimeChanged
,
libvlc_MediaInstancePositionChanged
,
...
...
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