Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Darshan Jain
VLC
Commits
641f3d74
Commit
641f3d74
authored
8 years ago
by
Thomas Guillem
Browse files
Options
Downloads
Patches
Plain Diff
test: add back media_discoverer test
This doesn't test network services anymore.
parent
983caa91
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/Makefile.am
+3
-2
3 additions, 2 deletions
test/Makefile.am
test/libvlc/media_discoverer.c
+8
-6
8 additions, 6 deletions
test/libvlc/media_discoverer.c
with
11 additions
and
8 deletions
test/Makefile.am
+
3
−
2
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
...
...
This diff is collapsed.
Click to expand it.
test/libvlc/media_discoverer.c
+
8
−
6
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment