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
940734d9
Commit
940734d9
authored
Mar 29, 2008
by
Filippo Carone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unit tests update
parent
fea85dea
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
16 deletions
+33
-16
bindings/java/core/src/test/java/org/videolan/jvlc/MediaListTest.java
...a/core/src/test/java/org/videolan/jvlc/MediaListTest.java
+1
-1
bindings/java/core/src/test/java/org/videolan/jvlc/internal/LibVlcCoreTest.java
.../test/java/org/videolan/jvlc/internal/LibVlcCoreTest.java
+1
-1
bindings/java/core/src/test/java/org/videolan/jvlc/internal/LibVlcMediaInstanceTest.java
...a/org/videolan/jvlc/internal/LibVlcMediaInstanceTest.java
+1
-1
bindings/java/core/src/test/java/org/videolan/jvlc/internal/MediaDescriptorTest.java
.../java/org/videolan/jvlc/internal/MediaDescriptorTest.java
+1
-1
bindings/java/core/src/test/java/org/videolan/jvlc/internal/MediaListPlayerTest.java
.../java/org/videolan/jvlc/internal/MediaListPlayerTest.java
+28
-11
bindings/java/core/src/test/java/org/videolan/jvlc/internal/MediaListTest.java
...c/test/java/org/videolan/jvlc/internal/MediaListTest.java
+1
-1
No files found.
bindings/java/core/src/test/java/org/videolan/jvlc/MediaListTest.java
View file @
940734d9
...
...
@@ -40,7 +40,7 @@ public class MediaListTest
@Before
public
void
setup
()
{
jvlc
=
new
JVLC
();
jvlc
=
new
JVLC
(
"-vvv -I dummy --aout=dummy --vout=dummy"
);
}
@Test
...
...
bindings/java/core/src/test/java/org/videolan/jvlc/internal/LibVlcCoreTest.java
View file @
940734d9
...
...
@@ -40,7 +40,7 @@ public class LibVlcCoreTest
public
void
testNew
()
throws
Exception
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
LibVlcInstance
libvlcInstance
=
instance
.
libvlc_new
(
0
,
new
String
[]
{},
exception
);
LibVlcInstance
libvlcInstance
=
instance
.
libvlc_new
(
0
,
new
String
[]
{
"-I"
,
"dummy"
,
"--aout=dummy"
,
"--vout=dummy"
},
exception
);
Assert
.
assertNotNull
(
libvlcInstance
);
Assert
.
assertEquals
(
0
,
exception
.
raised
);
}
...
...
bindings/java/core/src/test/java/org/videolan/jvlc/internal/LibVlcMediaInstanceTest.java
View file @
940734d9
...
...
@@ -50,7 +50,7 @@ public class LibVlcMediaInstanceTest
public
void
testSetup
()
{
exception
=
new
libvlc_exception_t
();
libvlcInstance
=
libvlc
.
libvlc_new
(
0
,
new
String
[]{},
exception
);
libvlcInstance
=
libvlc
.
libvlc_new
(
0
,
new
String
[]{
"-vvv"
,
"-I"
,
"dummy"
,
"-aout=dummy"
,
"-vout=dummy"
},
exception
);
libvlc
.
libvlc_exception_clear
(
exception
);
}
...
...
bindings/java/core/src/test/java/org/videolan/jvlc/internal/MediaDescriptorTest.java
View file @
940734d9
...
...
@@ -48,7 +48,7 @@ public class MediaDescriptorTest
public
void
testSetup
()
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
libvlcInstance
=
libvlc
.
libvlc_new
(
0
,
new
String
[]{},
exception
);
libvlcInstance
=
libvlc
.
libvlc_new
(
0
,
new
String
[]{
"-I"
,
"dummy"
,
"--aout=dummy"
,
"--vout=dummy"
},
exception
);
}
@After
...
...
bindings/java/core/src/test/java/org/videolan/jvlc/internal/MediaListPlayerTest.java
View file @
940734d9
...
...
@@ -25,8 +25,6 @@
package
org.videolan.jvlc.internal
;
import
java.io.File
;
import
junit.framework.Assert
;
import
org.junit.After
;
...
...
@@ -53,7 +51,7 @@ public class MediaListPlayerTest
public
void
testSetup
()
throws
Exception
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
libvlcInstance
=
libvlc
.
libvlc_new
(
0
,
new
String
[]{
"-
A"
,
"file"
,
"--audiofile-file="
+
File
.
createTempFile
(
"jvlc"
,
".wav"
).
getAbsolutePath
()
},
exception
);
libvlcInstance
=
libvlc
.
libvlc_new
(
0
,
new
String
[]{
"-
vvv"
,
"-I"
,
"dummy"
,
"--aout=dummy"
,
"--vout=dummy"
},
exception
);
// use the following line to use your audio card.
// libvlcInstance = libvlc.libvlc_new(0, new String[]{}, exception);
}
...
...
@@ -181,7 +179,20 @@ public class MediaListPlayerTest
}
Thread
.
sleep
(
150
);
}
// FIXME give stats the time to run... there's probably a race condition in misc/stats.c:259 that
// needs to be fixed
Thread
.
sleep
(
400
);
libvlc
.
libvlc_media_list_player_stop
(
mediaListPlayer
,
exception
);
libvlc
.
libvlc_media_list_player_release
(
mediaListPlayer
);
}
@Test
public
void
mediaListPlayerGetStateStopped
()
{
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_Stopped
.
ordinal
(),
state
);
}
@Test
...
...
@@ -194,6 +205,19 @@ public class MediaListPlayerTest
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
(
mediaListPlayer
,
mediaDescriptor
,
exception
);
while
(
true
)
{
int
playing
=
libvlc
.
libvlc_media_list_player_is_playing
(
mediaListPlayer
,
exception
);
if
(
exception
.
raised
==
1
)
{
throw
new
RuntimeException
(
"Native exception thrown"
);
}
if
(
playing
==
1
)
{
break
;
}
Thread
.
sleep
(
150
);
}
libvlc
.
libvlc_media_list_player_pause
(
mediaListPlayer
,
exception
);
Assert
.
assertEquals
(
0
,
exception
.
raised
);
while
(
true
)
...
...
@@ -212,16 +236,9 @@ public class MediaListPlayerTest
int
state
=
libvlc
.
libvlc_media_list_player_get_state
(
mediaListPlayer
,
exception
);
Assert
.
assertEquals
(
"Expected state: "
+
LibVlcState
.
libvlc_Paused
+
".\n"
,
LibVlcState
.
libvlc_Paused
.
ordinal
(),
state
);
libvlc
.
libvlc_media_list_player_stop
(
mediaListPlayer
,
exception
);
libvlc
.
libvlc_media_list_player_release
(
mediaListPlayer
);
}
@Test
public
void
mediaListPlayerGetStateStopped
()
{
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_Stopped
.
ordinal
(),
state
);
}
@Test
public
void
mediaListPlayerSetMediaInstance
()
...
...
bindings/java/core/src/test/java/org/videolan/jvlc/internal/MediaListTest.java
View file @
940734d9
...
...
@@ -47,7 +47,7 @@ public class MediaListTest
public
void
testSetup
()
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
libvlcInstance
=
libvlc
.
libvlc_new
(
0
,
new
String
[]{},
exception
);
libvlcInstance
=
libvlc
.
libvlc_new
(
0
,
new
String
[]{
"-I"
,
"dummy"
,
"--aout=dummy"
,
"--vout=dummy"
},
exception
);
}
@After
...
...
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