[vlc-devel] [RFC, PATCH 0/6] Adding dispatcher functionality to demux/mkv

Filip Roséen filip at videolabs.io
Thu Mar 3 13:30:21 CET 2016


The patches included in this batch are all related to dispatching
functionality in one way or another.

They basically introduce a replacement for the many massive if-else
trees currently in the module (especially in
`matroska_segment{,_parse}.cpp`).

While hopefully being easier to maintain, they are also more
performant in terms of execution speed (which is a nice plus).

Feedback would be awesome, and everyone that replies will get a slice
of the ascii-art cake below (it is not a lie, but rather delicious).

                               0   0
                               |   |
                           ____|___|____
                        0  |~ ~ ~ ~ ~ ~|   0
                        |  |           |   |
                     ___|__|___________|___|__
                     |/\/\/\/\/\/\/\/\/\/\/\/|
                 0   |       vlc-devel       |   0
                 |   |/\/\/\/\/\/\/\/\/\/\/\/|   |
                _|___|_______________________|___|__
               |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|
               |                                   |
               |   GOT FEEDBACK?  TAKE A SLICE!    |
               | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
               |___________________________________|


NOTE: This patch-batch is a continuation of the work done by:
 
  - https://mailman.videolan.org/pipermail/vlc-devel/2016-March/106425.html

Best Regards,
Filip "refp" Roséen

Filip Roséen (6):
  demux/mkv: Added EbmlTypeDispatcher (including changes to Makefile.am)
  demux/mkv: Use EbmTypeDispatcher in `matroska_segment_c::{ParseTrackEntry,ParseTracks}`
  demux/mkv: Cleaned up code to issue debug diagnostics
  demux/mkv: Use EbmlTypeDispatcher in `matroska_segment_c::ParseInfo`
  demux/mkv: Added StringDispatcher (including changes to Makefile.am)
  demux/mkv: Use `StringDispatcher` in `matroska_segment_c::TrackInit`

 modules/demux/Makefile.am                    |    3 +
 modules/demux/mkv/Ebml_dispatcher.hpp        |  161 +++
 modules/demux/mkv/dispatcher.hpp             |  150 +++
 modules/demux/mkv/matroska_segment_parse.cpp | 1827 ++++++++++++--------------
 modules/demux/mkv/string_dispatcher.hpp      |  175 +++
 5 files changed, 1363 insertions(+), 953 deletions(-)
 create mode 100644 modules/demux/mkv/Ebml_dispatcher.hpp
 create mode 100644 modules/demux/mkv/dispatcher.hpp
 create mode 100644 modules/demux/mkv/string_dispatcher.hpp

-- 
2.7.2



More information about the vlc-devel mailing list