[vlc-commits] mkv: Added EbmlTypeDispatcher
Filip Roséen
git at videolan.org
Tue Mar 8 17:52:09 CET 2016
vlc | branch: master | Filip Roséen <filip at videolabs.io> | Tue Mar 8 15:11:53 2016 +0100| [421416d1472eb1444190aeb3ee2714617b5e7c23] | committer: Jean-Baptiste Kempf
mkv: Added EbmlTypeDispatcher
The EbmlTypeDispatcher is a type used to "dispatch" an object of type
EbmlElement* to an appropriate callback depending on the dynamic type of
the referred to object.
It can effectivelly replace the massive if-else branches found
throughout the module by not only making the code easier to understand
and maintain, but also by making it _a lot_ faster (benchmarks show a
speed increase between 450 and 700% in terms of lookup).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=421416d1472eb1444190aeb3ee2714617b5e7c23
---
modules/demux/Makefile.am | 2 +
modules/demux/mkv/Ebml_dispatcher.hpp | 161 +++++++++++++++++++++++++++++++++
modules/demux/mkv/dispatcher.hpp | 156 ++++++++++++++++++++++++++++++++
3 files changed, 319 insertions(+)
Diff: http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=421416d1472eb1444190aeb3ee2714617b5e7c23
More information about the vlc-commits
mailing list