mirror of https://code.videolan.org/videolan/vlc
![]() Rewrites most of the layer vout code to have the same features as the view based vout. Additionally fixes laggy resizing, fixes CGL context creation bugs, adds support for CI filters and fixes various memory management errors. The CAOpenGLLayer based API is special and different from all other APIs provided on other OSes as it is not a push-model API but a pull one, where the OS calls a specific method when a new frame should be rendered. This makes integration into VLC relatively tricky and the code a bit harder to follow. While the API is a pull-model, we can kind of trick it by just forcing a re-display of the layer in the vouts display function. With views this would be forbidden as views are supposed to be accessed from the main thread only, but with layers this is possible if some care is taken. When forcing the layer to render from a different thread, the implicitly created CATransaction has to be flushed explicitly, as we do not have a main loop at the end of which it would be flushed. We do not force rendering all the time though, as doing that would break resize animations given that VLC can not know the right time when display refresh will happen, so resizing would look laggy and have glitches, as during a resize both the OS and VLC would drive the rendering of the layer, resulting in unexpected result. To prevent that, when live resizing starts (the user resizing by dragging a windows corner), the layer is set into asynchronous rendering mode which makes the OS drive the rendering loop completely not only for drawing the resize change. While the layer is in asynchronous mode, we ignore all update requests from the core, as the layer is anyway updated continuously by the OS and forcing rendering from another thread would lead to artifacts. Additionally while in live resize, we do not report the size changes to the core, as the event takes too long to reach the vout Control() function, resulting in the layer content being displayed at the wrong (old) size. Instead we take the current viewport size as the size and display using that. Another unusual thing compared to other vouts is that the VLC OpenGL display functions to update the viewport and aspect ratio are not called in the Control event handling callback, thats because before the render callback is called, the OS sets the OpenGL viewport to match the layer backing store size. So setting it in the Control callback is useless as it does not make any difference. |
||
---|---|---|
autotools | ||
bin | ||
compat | ||
contrib | ||
doc | ||
extras | ||
include | ||
lib | ||
m4 | ||
modules | ||
po | ||
share | ||
src | ||
test | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
AUTHORS | ||
COPYING | ||
COPYING.LIB | ||
INSTALL | ||
Makefile.am | ||
NEWS | ||
README | ||
THANKS | ||
bootstrap | ||
configure.ac | ||
make-alias |
README
README for the VLC media player =============================== VLC is a popular libre and open source media player and multimedia engine, used by a large number of individuals, professionals, companies and institutions. Using open source technologies and libraries, VLC has been ported to most computing platforms, including GNU/Linux, Windows, Mac OS X, BSD, iOS and Android. VLC can play most multimedia files, discs, streams, allows playback from devices, and is able to convert to or stream in various formats. The VideoLAN project was started at the university École Centrale Paris who relicensed VLC under the GPLv2 license in February 2001. Since then, VLC has been downloaded close to one billion times. Links: ====== The VLC web site . . . . . http://www.videolan.org/ Support . . . . . . . . . . http://www.videolan.org/support/ Forums . . . . . . . . . . http://forum.videolan.org/ Wiki . . . . . . . . . . . http://wiki.videolan.org/ The Developers site . . . . http://wiki.videolan.org/Developers_Corner VLC hacking guide . . . . . http://wiki.videolan.org/Hacker_Guide Bugtracker . . . . . . . . http://trac.videolan.org/vlc/ The VideoLAN web site . . . http://www.videolan.org/ Source Code Content: =================== ABOUT-NLS - Notes on the Free Translation Project. AUTHORS - VLC authors. COPYING - The GPL license. COPYING.LIB - The LGPL license. INSTALL - Installation and building instructions. NEWS - Important modifications between the releases. README - This file. THANKS - VLC contributors. bin/ - VLC binaries. bindings/ - libVLC bindings to other languages. compat/ - compatibility library for operating systems missing essential functionalities. contrib/ - Facilities for retrieving external libraries and building them for systems that don't have the right versions. doc/ - Miscellaneous documentation. extras/analyser - Code analyser and editor specific files. extras/buildsystem - different buildsystems specific files. extras/misc - Files that don't fit in the other extras/ categories. extras/package - VLC packaging specific files such as spec files. extras/tools/ - Facilities for retrieving external building tools needed for systems that don't have the right versions. include/ - Header files. lib/ - libVLC source code. modules/ - VLC plugins and modules. Most of the code is here. po/ - VLC translations. share/ - Common Resources files. src/ - libvlccore source code. test/ - testing system.