[vlc-devel] commit: testapi.c: Fix a warning plus small clean up. (Pierre d'Herbemont )
git version control
git at videolan.org
Thu Mar 27 03:27:15 CET 2008
vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Thu Mar 27 03:27:20 2008 +0100| [e9c43d63e3d081159589940d04d0590cfa1cfed2]
testapi.c: Fix a warning plus small clean up.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e9c43d63e3d081159589940d04d0590cfa1cfed2
---
src/control/testapi.c | 47 ++++++-----------------------------------------
1 files changed, 6 insertions(+), 41 deletions(-)
diff --git a/src/control/testapi.c b/src/control/testapi.c
index e4388ec..fc8688c 100644
--- a/src/control/testapi.c
+++ b/src/control/testapi.c
@@ -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 playback of %s\n", file);
+ log ("Testing play and pause of %s\n", file);
libvlc_exception_init (&ex);
vlc = libvlc_new (argc, argv, &ex);
More information about the vlc-devel
mailing list