I have looked more into the problem, and it will take quite a rewrite to fix.
The problem basically stems from how the dlnaspec
is determined. As I see it, there currently are a lot of renderer and player specific checks that need to go. This is the code of a resource and as such, it should not concern itself with renderer or player details at all. E.g. "mediaRenderer.isPS3()" or "getPlayer().id()" are unacceptable IMHO.
So I thought: well, let's refactor the responsibilities to the correct place then.
But that turns out to be easier said than done.
For example, one of the first things I encountered was this comment in DLNAMediaInfo.isMuxable()
When you take a step back and think about it, determining if something is muxable isn't all that simple. Can the encoder mux? Is this particular media muxable by that particular encoder? Does the renderer support the muxed result? Are we going to mux or transcode? Which class is responsible for the outcome of all these questions?
And before you know it, you are looking at getInputStream()
, trying to figure out how it comes up with the arguments for launchTranscode()...
Summing up: the question seems simple, but a good solution will touch quite a lot of mission critical code. Coming up with a proper solution will take some time.