[haiku] Re: GSoC: Writing native interfaces for ported applications

  • From: "Stephan Assmus" <superstippi@xxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Thu, 25 Mar 2010 13:11:07 +0100

Hi,

Von: Christopher Humphries <redeye4@xxxxxxxxx>
> That said, I'm not sure of how simplistic this point of view is. I have no
> clear idea about how to add DVD playing support to Media Player, or how to
> implement media streaming (Media Kit? Network Kit?).

DVD playback is interactive. This concept is currently not implemented in the 
Media Kit at all. There is no forwarding of events, no notion of navigation. 
All of this needs to be implemented, while maintaining backwards compatibility. 
I would start by porting the necessary backend, like libdvdplay I believe VLC 
is using. From experience gained with this, it may become clearer what needs to 
change in the MediaKit in order to support this. Like I already wrote, another 
possibility is to add DVD playback just to the MediaPlayer. Then it becomes 
somewhat easier, since you don't need to worry about backwards compatibility 
and designing the perfect API for the MediaKit. Once something works, it is 
often much easier to refactor it into something more flexible like integrating 
it into the Media Kit. Often it's impossible to design something perfect from 
scratch and there are so many things you need to keep in mind. The MediaPlayer 
already has an abstraction against the Media Kit base
 d backend. It may be the easiest to design another implementation of this 
abstraction for DVD playback. But with these goals in mind, you need to start 
reading lots of code, so you become knowledgable and get ideas about possible 
ways to do it. If you get stuck with specific questions, it is much easier to 
help.

> Another thought was about native functionalities ports would miss out on,
> replicants for example. I'm pretty sure that replicants for the media
> player
> and transmission would be useful and even welcome in some cases.

MediaPlayer is not designed with replicants in mind. It's a fullfeatured 
multi-document application with multiple windows for different purposes. I 
don't see the benefit at all and I believe cramping all the code into a single 
master view would seriously spoil the design structure as well.

Best regards,
-Stephan

Other related posts: