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
38f79bff
Commit
38f79bff
authored
Mar 21, 2008
by
Filippo Carone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new failing test for medialistplayer_next
parent
c4b95b50
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
0 deletions
+39
-0
bindings/java/core/src/main/java/org/videolan/jvlc/MediaListPlayer.java
...core/src/main/java/org/videolan/jvlc/MediaListPlayer.java
+10
-0
bindings/java/core/src/test/java/org/videolan/jvlc/internal/MediaListPlayerTest.java
.../java/org/videolan/jvlc/internal/MediaListPlayerTest.java
+29
-0
No files found.
bindings/java/core/src/main/java/org/videolan/jvlc/MediaListPlayer.java
View file @
38f79bff
...
...
@@ -55,6 +55,10 @@ public class MediaListPlayer
return
jvlc
.
getLibvlc
().
libvlc_media_list_player_is_playing
(
instance
,
exception
)
==
1
;
}
/**
*
*/
public
void
play
()
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
...
...
@@ -84,6 +88,12 @@ public class MediaListPlayer
jvlc
.
getLibvlc
().
libvlc_media_list_player_pause
(
instance
,
exception
);
}
public
void
next
()
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
jvlc
.
getLibvlc
().
libvlc_media_list_player_next
(
instance
,
exception
);
}
/**
* Plays the given descriptor and returns only when the player has started to play.
* @param descriptor The media descriptor to play
...
...
bindings/java/core/src/test/java/org/videolan/jvlc/internal/MediaListPlayerTest.java
View file @
38f79bff
...
...
@@ -227,4 +227,33 @@ public class MediaListPlayerTest
Assert
.
assertEquals
(
0
,
exception
.
raised
);
}
@Test
public
void
mediaListPlayerNextNoItems
()
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
LibVlcMediaListPlayer
mediaListPlayer
=
libvlc
.
libvlc_media_list_player_new
(
libvlcInstance
,
exception
);
libvlc
.
libvlc_media_list_player_next
(
mediaListPlayer
,
exception
);
Assert
.
assertEquals
(
1
,
exception
.
raised
);
}
/**
* fails, see https://trac.videolan.org/vlc/ticket/1535
*/
// @Test
public
void
mediaListPlayerNext
()
throws
Exception
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
LibVlcMediaListPlayer
mediaListPlayer
=
libvlc
.
libvlc_media_list_player_new
(
libvlcInstance
,
exception
);
LibVlcMediaList
mediaList
=
libvlc
.
libvlc_media_list_new
(
libvlcInstance
,
exception
);
LibVlcMediaDescriptor
mediaDescriptor
=
libvlc
.
libvlc_media_descriptor_new
(
libvlcInstance
,
mrl
,
exception
);
libvlc
.
libvlc_media_list_add_media_descriptor
(
mediaList
,
mediaDescriptor
,
exception
);
libvlc
.
libvlc_media_list_add_media_descriptor
(
mediaList
,
mediaDescriptor
,
exception
);
libvlc
.
libvlc_media_list_player_set_media_list
(
mediaListPlayer
,
mediaList
,
exception
);
libvlc
.
libvlc_media_list_player_play_item_at_index
(
mediaListPlayer
,
0
,
exception
);
Thread
.
sleep
(
150
);
libvlc
.
libvlc_media_list_player_next
(
mediaListPlayer
,
exception
);
Assert
.
assertEquals
(
0
,
exception
.
raised
);
}
}
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