xbmc/xbmc — pull request #5084 by popcornmix (2014-07-23 21:16:19+00:00)
Title: [players] Make omxplayer be derived from dvdplayer [RFC]

Currently there is a lot of duplication between omxplayer and dvdplayer.
95% of the code is OMXPlayer.cpp is the same as DVDPlayer.cpp.

Whenever DVDPlayer.cpp is edited, the change has to be duplicated on OMXPlayer.cpp.

This PR first makes OMXPlayer.cpp and DVDPlayer.cpp as close as possible, then adds stub functions where omxplayer needs additional code. OMXPlayer then becomes derived from DVDPlayer and all the common code can be dropped.

As DVDPlayerVideo/DVDPlayerAudio and OMXPlayerVideo/OMXPlayerVideo are (significantly) different, these are now derived from a common base class, and get created at run time.

Treat this as a RFC rather than something fully formed. There may be other ways of achieving the same goal that may be better.

It's also not quite complete as trickplay (ff/rew) is not working in omxplayer yet (I'm hoping I can find a cleaner way of supporting it).