Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
085558eb
Commit
085558eb
authored
May 07, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not use internal libvlc symbol outside of libvlc
parent
71992c5f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
152 deletions
+0
-152
src/libvlc.sym
src/libvlc.sym
+0
-1
test/Makefile.am
test/Makefile.am
+0
-6
test/libvlc/events.c
test/libvlc/events.c
+0
-145
No files found.
src/libvlc.sym
View file @
085558eb
...
...
@@ -30,7 +30,6 @@ libvlc_event_detach
libvlc_event_manager_new
libvlc_event_manager_register_event_type
libvlc_event_manager_release
libvlc_event_send
libvlc_event_type_name
libvlc_free
libvlc_get_changeset
...
...
test/Makefile.am
View file @
085558eb
...
...
@@ -14,7 +14,6 @@ extra_check_verbose__0 = $(extra_check_verbose_0)
###############################################################################
check_PROGRAMS
=
\
test_libvlc_core
\
test_libvlc_events
\
test_libvlc_media
\
test_libvlc_media_list
\
test_libvlc_media_player
\
...
...
@@ -60,11 +59,6 @@ test_libvlc_core_LDADD = $(top_builddir)/src/libvlc.la
test_libvlc_core_CFLAGS
=
$(CFLAGS_tests)
test_libvlc_core_LDFLAGS
=
$(LDFLAGS_tests)
test_libvlc_events_SOURCES
=
libvlc/events.c
test_libvlc_events_LDADD
=
$(top_builddir)
/src/libvlc.la
test_libvlc_events_CFLAGS
=
$(CFLAGS_tests)
test_libvlc_events_LDFLAGS
=
$(LDFLAGS_tests)
test_libvlc_media_SOURCES
=
libvlc/media.c
test_libvlc_media_LDADD
=
$(top_builddir)
/src/libvlc.la
test_libvlc_media_CFLAGS
=
$(CFLAGS_tests)
...
...
test/libvlc/events.c
deleted
100644 → 0
View file @
71992c5f
/*
* events.c - libvlc smoke test
*
* $Id$
*/
/**********************************************************************
* Copyright (C) 2007 Rémi Denis-Courmont. *
* Copyright (C) 2008 Pierre d'Herbemont. *
* This program is free software; you can redistribute and/or modify *
* it under the terms of the GNU General Public License as published *
* by the Free Software Foundation; version 2 of the license, or (at *
* your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, you can get it from: *
* http://www.gnu.org/copyleft/gpl.html *
**********************************************************************/
#include "test.h"
/* 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
*
);
static
void
test_events_dummy_callback
(
const
libvlc_event_t
*
event
,
void
*
user_data
)
{
(
void
)
event
;
bool
*
callback_was_called
=
user_data
;
*
callback_was_called
=
true
;
}
static
void
test_events_callback_and_detach
(
const
libvlc_event_t
*
event
,
void
*
user_data
)
{
bool
*
callback_was_called
=
user_data
;
libvlc_event_manager_t
*
em
;
em
=
libvlc_media_player_event_manager
(
event
->
p_obj
);
libvlc_event_detach
(
em
,
event
->
type
,
test_events_callback_and_detach
,
user_data
);
*
callback_was_called
=
true
;
}
static
void
test_event_type_reception
(
libvlc_event_manager_t
*
em
,
libvlc_event_type_t
event_type
,
bool
*
callback_was_called
)
{
libvlc_event_t
event
;
event
.
type
=
event_type
;
*
callback_was_called
=
false
;
libvlc_event_send
(
em
,
&
event
);
assert
(
*
callback_was_called
);
}
#include <string.h>
static
void
test_events
(
const
char
**
argv
,
int
argc
)
{
libvlc_instance_t
*
vlc
;
libvlc_media_player_t
*
mi
;
libvlc_event_manager_t
*
em
;
bool
callback_was_called
;
libvlc_event_type_t
mi_events
[]
=
{
libvlc_MediaPlayerNothingSpecial
,
libvlc_MediaPlayerOpening
,
libvlc_MediaPlayerBuffering
,
libvlc_MediaPlayerPlaying
,
libvlc_MediaPlayerPaused
,
libvlc_MediaPlayerStopped
,
libvlc_MediaPlayerEndReached
,
libvlc_MediaPlayerEncounteredError
,
libvlc_MediaPlayerTimeChanged
,
libvlc_MediaPlayerPositionChanged
,
};
int
mi_events_len
=
sizeof
(
mi_events
)
/
sizeof
(
*
mi_events
);
log
(
"Testing events
\n
"
);
vlc
=
libvlc_new
(
argc
,
argv
);
assert
(
vlc
!=
NULL
);
mi
=
libvlc_media_player_new
(
vlc
);
assert
(
mi
!=
NULL
);
em
=
libvlc_media_player_event_manager
(
mi
);
for
(
int
i
=
0
;
i
<
0x700
;
i
++
)
strlen
(
libvlc_event_type_name
(
i
));
log
(
"+ Testing attaching to Media Instance
\n
"
);
for
(
int
i
=
0
;
i
<
mi_events_len
;
i
++
)
{
int
ret
;
ret
=
libvlc_event_attach
(
em
,
mi_events
[
i
],
test_events_dummy_callback
,
&
callback_was_called
);
assert
(
ret
==
0
);
}
log
(
"+ Testing event reception
\n
"
);
for
(
int
i
=
0
;
i
<
mi_events_len
;
i
++
)
test_event_type_reception
(
em
,
mi_events
[
i
],
&
callback_was_called
);
log
(
"+ Testing event detaching while in the event callback
\n
"
);
libvlc_event_t
event
;
event
.
type
=
mi_events
[
mi_events_len
-
1
];
callback_was_called
=
false
;
libvlc_event_detach
(
em
,
mi_events
[
mi_events_len
-
1
],
test_events_dummy_callback
,
&
callback_was_called
);
int
val
=
libvlc_event_attach
(
em
,
mi_events
[
mi_events_len
-
1
],
test_events_callback_and_detach
,
&
callback_was_called
);
assert
(
val
==
0
);
libvlc_event_send
(
em
,
&
event
);
assert
(
callback_was_called
);
callback_was_called
=
false
;
libvlc_event_send
(
em
,
&
event
);
assert
(
!
callback_was_called
);
log
(
"+ Testing regular detach()
\n
"
);
for
(
int
i
=
0
;
i
<
mi_events_len
-
1
;
i
++
)
libvlc_event_detach
(
em
,
mi_events
[
i
],
test_events_dummy_callback
,
&
callback_was_called
);
libvlc_media_player_release
(
mi
);
libvlc_release
(
vlc
);
}
int
main
(
void
)
{
test_init
();
test_events
(
test_defaults_args
,
test_defaults_nargs
);
return
0
;
}
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