Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
641f3d74
Commit
641f3d74
authored
Jun 13, 2016
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: add back media_discoverer test
This doesn't test network services anymore.
parent
983caa91
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
test/Makefile.am
test/Makefile.am
+3
-2
test/libvlc/media_discoverer.c
test/libvlc/media_discoverer.c
+8
-6
No files found.
test/Makefile.am
View file @
641f3d74
...
...
@@ -18,6 +18,7 @@ check_PROGRAMS = \
test_libvlc_media
\
test_libvlc_media_list
\
test_libvlc_media_player
\
test_libvlc_media_discoverer
\
test_libvlc_slaves
\
test_src_config_chain
\
test_src_misc_variables
\
...
...
@@ -81,8 +82,8 @@ test_libvlc_media_list_SOURCES = libvlc/media_list.c
test_libvlc_media_list_LDADD
=
$(LIBVLC)
test_libvlc_media_player_SOURCES
=
libvlc/media_player.c
test_libvlc_media_player_LDADD
=
$(LIBVLC)
#
test_libvlc_media_discoverer_SOURCES = libvlc/media_discoverer.c
#
test_libvlc_media_discoverer_LDADD =
$(LIBVLCCORE)
$(LIBVLC)
test_libvlc_media_discoverer_SOURCES
=
libvlc/media_discoverer.c
test_libvlc_media_discoverer_LDADD
=
$(LIBVLC)
test_libvlc_slaves_SOURCES
=
libvlc/slaves.c
test_libvlc_slaves_LDADD
=
$(LIBVLCCORE)
$(LIBVLC)
test_libvlc_meta_SOURCES
=
libvlc/meta.c
...
...
test/libvlc/media_discoverer.c
View file @
641f3d74
...
...
@@ -20,8 +20,7 @@
#include "test.h"
#include <vlc_common.h>
#include <vlc_mtime.h>
/* for msleep */
#include <string.h>
static
void
ml_item_event
(
const
struct
libvlc_event_t
*
p_ev
,
const
char
*
psz_event
)
...
...
@@ -29,7 +28,8 @@ ml_item_event(const struct libvlc_event_t *p_ev, const char *psz_event)
char
*
psz_mrl
=
libvlc_media_get_mrl
(
p_ev
->
u
.
media_list_item_added
.
item
);
assert
(
psz_mrl
);
log
(
"item added(%d): '%s'
\n
"
,
p_ev
->
u
.
media_list_item_added
.
index
,
psz_mrl
);
log
(
"item %s(%d): '%s'
\n
"
,
psz_event
,
p_ev
->
u
.
media_list_item_added
.
index
,
psz_mrl
);
free
(
psz_mrl
);
}
...
...
@@ -50,6 +50,8 @@ ml_item_deleted(const struct libvlc_event_t *p_ev, void *p_data)
static
void
test_discoverer
(
libvlc_instance_t
*
p_vlc
,
const
char
*
psz_name
)
{
log
(
"creating and starting discoverer %s
\n
"
,
psz_name
);
libvlc_media_discoverer_t
*
p_md
=
libvlc_media_discoverer_new
(
p_vlc
,
psz_name
);
assert
(
p_md
!=
NULL
);
...
...
@@ -75,7 +77,6 @@ test_discoverer(libvlc_instance_t *p_vlc, const char *psz_name)
else
{
assert
(
libvlc_media_discoverer_is_running
(
p_md
));
msleep
(
20000
);
libvlc_media_discoverer_stop
(
p_md
);
}
...
...
@@ -117,10 +118,11 @@ main (void)
libvlc_media_discoverer_description
*
p_service
=
pp_services
[
i
];
assert
(
i_cat
==
p_service
->
i_cat
);
log
(
"=
creating and start
discoverer: name: '%s', longname: '%s' =
\n
"
,
log
(
"= discoverer: name: '%s', longname: '%s' =
\n
"
,
p_service
->
psz_name
,
p_service
->
psz_longname
);
if
(
!
strncasecmp
(
p_service
->
psz_name
,
"podcast"
,
7
)
)
if
(
!
strncasecmp
(
p_service
->
psz_name
,
"podcast"
,
7
)
||
i_cat
==
libvlc_media_discoverer_lan
)
{
/* see comment in libvlc_media_discoverer_new() */
continue
;
...
...
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