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
VideoLAN
libvlcpp
Commits
9c64fb89
Commit
9c64fb89
authored
Mar 03, 2015
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
main.cpp: Move some parts around
parent
42275c9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
test/main.cpp
test/main.cpp
+8
-12
No files found.
test/main.cpp
View file @
9c64fb89
...
...
@@ -34,24 +34,13 @@ int main(int ac, char** av)
}
auto
instance
=
VLC
::
Instance
(
0
,
nullptr
);
auto
audioFilters
=
instance
.
audioFilterList
();
for
(
const
auto
&
f
:
audioFilters
)
{
std
::
cout
<<
f
.
name
()
<<
std
::
endl
;
}
auto
media
=
VLC
::
Media
(
instance
,
av
[
1
],
VLC
::
Media
::
FromPath
);
auto
mp
=
VLC
::
MediaPlayer
(
media
);
auto
eventManager
=
mp
.
eventManager
();
eventManager
.
onPlaying
([
&
media
]()
{
std
::
cout
<<
media
.
mrl
()
<<
" is playing"
<<
std
::
endl
;
});
/*
* Should trigger static_assert:
*
* eventManager->onPlaying([](std::string){});
* eventManager->onPlaying([] { return 0;} );
*/
mp
.
play
();
bool
expected
=
true
;
...
...
@@ -115,4 +104,11 @@ int main(int ac, char** av)
// by leaving the scope, it won't be unregistered from mp2's eventManager.
// If it did, libvlc would assert as the event has been unregistered already.
mp
.
eventManager
().
unregister
(
h3
);
// List audio filters
auto
audioFilters
=
instance
.
audioFilterList
();
for
(
const
auto
&
f
:
audioFilters
)
{
std
::
cout
<<
f
.
name
()
<<
std
::
endl
;
}
}
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