[vlc-devel] [PATCHv3 13/17] test: media_player: use "mock://"
Thomas Guillem
thomas at gllm.fr
Wed Jun 10 14:57:52 CEST 2020
---
test/libvlc/media_list_player.c | 20 ++++++++++----------
test/libvlc/media_player.c | 7 ++++---
test/libvlc/test.h | 5 +----
3 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/test/libvlc/media_list_player.c b/test/libvlc/media_list_player.c
index 27cf3e1fbc5..b80deddb46c 100644
--- a/test/libvlc/media_list_player.c
+++ b/test/libvlc/media_list_player.c
@@ -121,7 +121,7 @@ static void test_media_list_player_items_queue(const char** argv, int argc)
vlc = libvlc_new (argc, argv);
assert (vlc != NULL);
- md = libvlc_media_new_path (vlc, file);
+ md = libvlc_media_new_location (vlc, file);
assert(md);
ml = libvlc_media_list_new (vlc);
@@ -186,7 +186,7 @@ static void test_media_list_player_previous(const char** argv, int argc)
vlc = libvlc_new (argc, argv);
assert (vlc != NULL);
- md = libvlc_media_new_path (vlc, file);
+ md = libvlc_media_new_location (vlc, file);
assert(md);
ml = libvlc_media_list_new (vlc);
@@ -245,7 +245,7 @@ static void test_media_list_player_next(const char** argv, int argc)
vlc = libvlc_new (argc, argv);
assert (vlc != NULL);
- md = libvlc_media_new_path (vlc, file);
+ md = libvlc_media_new_location (vlc, file);
assert(md);
ml = libvlc_media_list_new (vlc);
@@ -304,7 +304,7 @@ static void test_media_list_player_pause_stop(const char** argv, int argc)
vlc = libvlc_new (argc, argv);
assert (vlc != NULL);
- md = libvlc_media_new_path (vlc, file);
+ md = libvlc_media_new_location (vlc, file);
assert(md);
ml = libvlc_media_list_new (vlc);
@@ -344,7 +344,7 @@ static void test_media_list_player_play_item_at_index(const char** argv, int arg
vlc = libvlc_new (argc, argv);
assert (vlc != NULL);
- md = libvlc_media_new_path (vlc, file);
+ md = libvlc_media_new_location (vlc, file);
assert(md);
ml = libvlc_media_list_new (vlc);
@@ -403,19 +403,19 @@ static void test_media_list_player_playback_options (const char** argv, int argc
* ml5&6: 0 0 -- 1
*/
- md = libvlc_media_new_path (vlc, file);
+ md = libvlc_media_new_location (vlc, file);
assert(md);
- md2 = libvlc_media_new_path (vlc, file);
+ md2 = libvlc_media_new_location (vlc, file);
assert(md2);
- md3 = libvlc_media_new_path (vlc, file);
+ md3 = libvlc_media_new_location (vlc, file);
assert(md3);
- md4 = libvlc_media_new_path (vlc, file);
+ md4 = libvlc_media_new_location (vlc, file);
assert(md4);
- md5 = libvlc_media_new_path (vlc, file);
+ md5 = libvlc_media_new_location (vlc, file);
assert(md5);
ml = libvlc_media_list_new (vlc);
diff --git a/test/libvlc/media_player.c b/test/libvlc/media_player.c
index 10f56abb9e2..5a7cb3e2169 100644
--- a/test/libvlc/media_player.c
+++ b/test/libvlc/media_player.c
@@ -129,7 +129,7 @@ static void test_media_player_set_media(const char** argv, int argc)
libvlc_instance_t *vlc = libvlc_new (argc, argv);
assert (vlc != NULL);
- libvlc_media_t *md = libvlc_media_new_path (vlc, file);
+ libvlc_media_t *md = libvlc_media_new_location (vlc, file);
assert (md != NULL);
libvlc_media_player_t *mp = libvlc_media_player_new (vlc);
@@ -158,7 +158,7 @@ static void test_media_player_play_stop(const char** argv, int argc)
vlc = libvlc_new (argc, argv);
assert (vlc != NULL);
- md = libvlc_media_new_path (vlc, file);
+ md = libvlc_media_new_location (vlc, file);
assert (md != NULL);
mi = libvlc_media_player_new_from_media (md);
@@ -185,7 +185,7 @@ static void test_media_player_pause_stop(const char** argv, int argc)
vlc = libvlc_new (argc, argv);
assert (vlc != NULL);
- md = libvlc_media_new_path (vlc, file);
+ md = libvlc_media_new_location (vlc, file);
assert (md != NULL);
mi = libvlc_media_player_new_from_media (md);
@@ -217,6 +217,7 @@ int main (void)
test_media_player_set_media (test_defaults_args, test_defaults_nargs);
test_media_player_play_stop (test_defaults_args, test_defaults_nargs);
test_media_player_pause_stop (test_defaults_args, test_defaults_nargs);
+// test_media_player_tracks (test_defaults_args, test_defaults_nargs);
return 0;
}
diff --git a/test/libvlc/test.h b/test/libvlc/test.h
index 9d58d0d3285..c7b45261746 100644
--- a/test/libvlc/test.h
+++ b/test/libvlc/test.h
@@ -53,10 +53,7 @@ static const char * test_defaults_args[] = {
static const int test_defaults_nargs =
sizeof (test_defaults_args) / sizeof (test_defaults_args[0]);
-/*static const char test_default_sample[] = "samples/test.sample";*/
-static const char test_default_sample[] = SRCDIR"/samples/empty.voc";
-static const char test_default_video[] = SRCDIR"/samples/image.jpg";
-
+static const char test_default_sample[] = "mock://";
/*********************************************************************
* Some useful common functions
--
2.20.1
More information about the vlc-devel
mailing list