Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
71c4969b
Commit
71c4969b
authored
Jul 20, 2008
by
Filippo Carone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jvlc: libvlc state and event type enums aligned with libvlc
parent
f9281a91
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
14 deletions
+41
-14
bindings/java/core/src/main/java/org/videolan/jvlc/MediaPlayer.java
...ava/core/src/main/java/org/videolan/jvlc/MediaPlayer.java
+2
-2
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
+28
-3
bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlcImpl.java
.../src/main/java/org/videolan/jvlc/internal/LibVlcImpl.java
+1
-1
bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlcState.java
...src/main/java/org/videolan/jvlc/internal/LibVlcState.java
+6
-4
bindings/java/core/src/test/java/org/videolan/jvlc/internal/MediaListPlayerTest.java
.../java/org/videolan/jvlc/internal/MediaListPlayerTest.java
+3
-3
No files found.
bindings/java/core/src/main/java/org/videolan/jvlc/MediaPlayer.java
View file @
71c4969b
...
...
@@ -156,7 +156,7 @@ public class MediaPlayer
MediaInstanceCallback
callback
=
new
MediaInstanceCallback
(
this
,
listener
);
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
for
(
LibVlcEventType
event
:
EnumSet
.
range
(
LibVlcEventType
.
libvlc_MediaPlayerPlay
ed
,
LibVlcEventType
.
libvlc_MediaPlayerPlay
ing
,
LibVlcEventType
.
libvlc_MediaPlayerTimeChanged
))
{
libvlc
.
libvlc_event_attach
(
eventManager
,
event
.
ordinal
(),
callback
,
null
,
exception
);
...
...
@@ -174,7 +174,7 @@ public class MediaPlayer
for
(
MediaInstanceCallback
callback
:
callbacks
)
{
for
(
LibVlcEventType
event
:
EnumSet
.
range
(
LibVlcEventType
.
libvlc_MediaPlayerPlay
ed
,
LibVlcEventType
.
libvlc_MediaPlayerPlay
ing
,
LibVlcEventType
.
libvlc_MediaPlayerPositionChanged
))
{
libvlc
.
libvlc_event_detach
(
eventManager
,
event
.
ordinal
(),
callback
,
null
,
exception
);
...
...
bindings/java/core/src/main/java/org/videolan/jvlc/event/MediaInstanceCallback.java
View file @
71c4969b
...
...
@@ -51,7 +51,7 @@ public class MediaInstanceCallback implements LibVlcCallback
*/
public
void
callback
(
libvlc_event_t
libvlc_event
,
Pointer
userData
)
{
if
(
libvlc_event
.
type
==
LibVlcEventType
.
libvlc_MediaPlayerPlay
ed
.
ordinal
())
if
(
libvlc_event
.
type
==
LibVlcEventType
.
libvlc_MediaPlayerPlay
ing
.
ordinal
())
{
listener
.
played
(
mediaInstance
);
}
...
...
bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlcEventType.java
View file @
71c4969b
...
...
@@ -34,11 +34,36 @@ public enum LibVlcEventType {
libvlc_MediaPreparsedChanged
,
libvlc_MediaFreed
,
libvlc_MediaStateChanged
,
libvlc_MediaPlayerPlayed
,
libvlc_MediaPlayerNothingSpecial
,
libvlc_MediaPlayerOpening
,
libvlc_MediaPlayerBuffering
,
libvlc_MediaPlayerPlaying
,
libvlc_MediaPlayerPaused
,
libvlc_MediaPlayerEndReached
,
libvlc_MediaPlayerStopped
,
libvlc_MediaPlayerForward
,
libvlc_MediaPlayerBackward
,
libvlc_MediaPlayerEndReached
,
libvlc_MediaPlayerEncounteredError
,
libvlc_MediaPlayerTimeChanged
,
libvlc_MediaPlayerPositionChanged
;
libvlc_MediaPlayerPositionChanged
,
libvlc_MediaPlayerSeekableChanged
,
libvlc_MediaPlayerPausableChanged
,
libvlc_MediaListItemAdded
,
libvlc_MediaListWillAddItem
,
libvlc_MediaListItemDeleted
,
libvlc_MediaListWillDeleteItem
,
libvlc_MediaListViewItemAdded
,
libvlc_MediaListViewWillAddItem
,
libvlc_MediaListViewItemDeleted
,
libvlc_MediaListViewWillDeleteItem
,
libvlc_MediaListPlayerPlayed
,
libvlc_MediaListPlayerNextItemSet
,
libvlc_MediaListPlayerStopped
,
libvlc_MediaDiscovererStarted
,
libvlc_MediaDiscovererEnded
;
}
bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlcImpl.java
View file @
71c4969b
...
...
@@ -92,7 +92,7 @@ public class LibVlcImpl
libVlc
.
libvlc_event_attach
(
mediaInstanceEventManager
,
LibVlcEventType
.
libvlc_MediaPlayerPlay
ed
.
ordinal
(),
LibVlcEventType
.
libvlc_MediaPlayerPlay
ing
.
ordinal
(),
played
,
null
,
exception
);
...
...
bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlcState.java
View file @
71c4969b
...
...
@@ -29,11 +29,13 @@ package org.videolan.jvlc.internal;
public
enum
LibVlcState
{
libvlc_NothingSpecial
,
libvlc_Stopped
,
libvlc_Opening
,
libvlc_Buffering
,
libvlc_Ended
,
libvlc_Error
,
libvlc_Playing
,
libvlc_Paused
libvlc_Paused
,
libvlc_Stopped
,
libvlc_Forward
,
libvlc_Backward
,
libvlc_Ended
,
libvlc_Error
;
}
bindings/java/core/src/test/java/org/videolan/jvlc/internal/MediaListPlayerTest.java
View file @
71c4969b
...
...
@@ -200,12 +200,12 @@ public class MediaListPlayerTest
}
@Test
public
void
mediaListPlayerGetState
Stopp
ed
()
public
void
mediaListPlayerGetState
End
ed
()
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
LibVlcMediaListPlayer
mediaListPlayer
=
libvlc
.
libvlc_media_list_player_new
(
libvlcInstance
,
exception
);
int
state
=
libvlc
.
libvlc_media_list_player_get_state
(
mediaListPlayer
,
exception
);
Assert
.
assertEquals
(
LibVlcState
.
libvlc_
Stopp
ed
.
ordinal
(),
state
);
Assert
.
assertEquals
(
LibVlcState
.
libvlc_
End
ed
.
ordinal
(),
state
);
libvlc
.
libvlc_media_list_player_release
(
mediaListPlayer
);
}
...
...
@@ -331,7 +331,7 @@ public class MediaListPlayerTest
}
Thread
.
sleep
(
150
);
}
Assert
.
assertEquals
(
LibVlcState
.
libvlc_
Stopp
ed
.
ordinal
(),
libvlc
.
libvlc_media_list_player_get_state
(
Assert
.
assertEquals
(
LibVlcState
.
libvlc_
End
ed
.
ordinal
(),
libvlc
.
libvlc_media_list_player_get_state
(
mediaListPlayer
,
exception
));
libvlc
.
libvlc_media_list_release
(
mediaList
);
...
...
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