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
e9c43d63
Commit
e9c43d63
authored
Mar 27, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testapi.c: Fix a warning plus small clean up.
parent
aa389eb5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
41 deletions
+6
-41
src/control/testapi.c
src/control/testapi.c
+6
-41
No files found.
src/control/testapi.c
View file @
e9c43d63
...
...
@@ -50,9 +50,13 @@ static void catch (void)
libvlc_exception_clear
(
&
ex
);
}
/* Test we have */
static
void
test_core
(
const
char
**
argv
,
int
argc
);
static
void
test_media_list
(
const
char
**
argv
,
int
argc
);
static
void
test_events
(
const
char
**
argv
,
int
argc
);
static
void
test_media_player_play_stop
(
const
char
**
argv
,
int
argc
);
/* Tests implementations */
static
void
test_core
(
const
char
**
argv
,
int
argc
)
{
libvlc_instance_t
*
vlc
;
...
...
@@ -113,45 +117,6 @@ static void test_media_list (const char ** argv, int argc)
catch
();
}
static
void
test_file_playback
(
const
char
**
argv
,
int
argc
,
const
char
*
file
)
{
libvlc_instance_t
*
vlc
;
libvlc_media_descriptor_t
*
md
;
libvlc_media_instance_t
*
mi
;
log
(
"Testing playback of %s
\n
"
,
file
);
libvlc_exception_init
(
&
ex
);
vlc
=
libvlc_new
(
argc
,
argv
,
&
ex
);
catch
();
md
=
libvlc_media_descriptor_new
(
vlc
,
file
,
&
ex
);
catch
();
mi
=
libvlc_media_instance_new_from_media_descriptor
(
md
,
&
ex
);
catch
();
libvlc_media_descriptor_release
(
md
);
libvlc_media_instance_play
(
mi
,
&
ex
);
catch
();
/* FIXME: Do something clever */
sleep
(
1
);
assert
(
libvlc_media_instance_get_state
(
mi
,
&
ex
)
!=
libvlc_Error
);
catch
();
libvlc_media_instance_stop
(
mi
,
&
ex
);
catch
();
libvlc_media_instance_release
(
mi
);
catch
();
libvlc_release
(
vlc
);
catch
();
}
/* This one is an internal API. We use it here to run tests that
* don't depends on playback, and only test the event framework */
extern
void
libvlc_event_send
(
libvlc_event_manager_t
*
,
libvlc_event_t
*
);
...
...
@@ -264,9 +229,9 @@ static void test_media_player_play_stop(const char** argv, int argc)
libvlc_instance_t
*
vlc
;
libvlc_media_descriptor_t
*
md
;
libvlc_media_instance_t
*
mi
;
const
char
*
*
file
=
"../bindings/java/core/src/test/resources/raffa_voice.ogg"
;
const
char
*
file
=
"../bindings/java/core/src/test/resources/raffa_voice.ogg"
;
log
(
"Testing play
back
of %s
\n
"
,
file
);
log
(
"Testing play
and pause
of %s
\n
"
,
file
);
libvlc_exception_init
(
&
ex
);
vlc
=
libvlc_new
(
argc
,
argv
,
&
ex
);
...
...
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