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
6bc5c775
Commit
6bc5c775
authored
Feb 21, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Basic tests for the media player, fix time units
parent
0476f4d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
6 deletions
+36
-6
bindings/cil/src/player.cs
bindings/cil/src/player.cs
+3
-2
bindings/cil/tests/testvlc.cs
bindings/cil/tests/testvlc.cs
+33
-4
No files found.
bindings/cil/src/player.cs
View file @
6bc5c775
...
...
@@ -193,7 +193,7 @@ namespace VideoLAN.LibVLC
}
/**
* Total length in mi
cro
seconds of the playback (if known).
* Total length in mi
lli
seconds of the playback (if known).
*/
public
long
Length
{
...
...
@@ -206,7 +206,7 @@ namespace VideoLAN.LibVLC
}
/**
* Playback position in mi
cro
seconds from the start (if applicable).
* Playback position in mi
lli
seconds from the start (if applicable).
* Setting this value might not work depending on the underlying
* media capability and file format.
*
...
...
@@ -229,6 +229,7 @@ namespace VideoLAN.LibVLC
/**
* Playback position as a fraction of the total (if applicable).
* At start, this is 0; at the end, this is 1.
* Setting this value might not work depending on the underlying
* media capability and file format.
*
...
...
bindings/cil/tests/testvlc.cs
View file @
6bc5c775
...
...
@@ -35,6 +35,21 @@ namespace VideoLAN.LibVLC.Test
Console
.
WriteLine
(
" preparsed: {0}"
,
m
.
IsPreparsed
);
}
private
static
void
DumpPlayer
(
Player
p
)
{
if
(!
p
.
IsPlaying
)
return
;
int
percent
=
(
int
)(
p
.
Position
*
100
);
Console
.
Write
(
"{0} of {1} ms ({2}%)\r"
,
p
.
Time
,
p
.
Length
,
percent
);
}
private
static
void
Sleep
(
int
msec
)
{
System
.
Threading
.
Thread
.
Sleep
(
msec
);
}
public
static
int
Main
(
string
[]
args
)
{
string
[]
argv
=
new
string
[]{
...
...
@@ -46,13 +61,27 @@ namespace VideoLAN.LibVLC.Test
Console
.
WriteLine
(
" (compiled with {0})"
,
VLC
.
Compiler
);
VLC
vlc
=
new
VLC
(
argv
);
Media
m
=
new
Media
(
vlc
,
"/dev/null"
);
DumpMedia
(
m
);
foreach
(
string
mrl
in
args
)
{
Media
media
=
new
Media
(
vlc
,
mrl
);
Player
player
=
new
Player
(
media
);
DumpMedia
(
media
);
DumpMedia
((
Media
)
media
.
Clone
());
DumpMedia
((
Media
)
m
.
Clone
());
player
.
Play
();
do
{
DumpPlayer
(
player
);
Sleep
(
500
);
}
while
(
player
.
IsPlaying
);
player
.
Stop
();
media
.
Dispose
();
player
.
Dispose
();
}
vlc
.
Dispose
();
m
.
Dispose
();
return
0
;
}
};
...
...
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