[haiku-development] Re: MediaPlayer and the Media Kit

  • From: Julian Harnath <julian.harnath@xxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 28 Nov 2012 23:07:04 +0100

Hello again,

while working on the MediaPlayer code, I have a few more questions 
about it :)

Here goes:

* The hierarchy of PlaybackManager->NodeManager->Controller is a bit 
unclear to me. While it's obvious, that NodeManager is there to control 
the MediaKit graph, where is the distinction between what goes into 
PlaybackManager and what goes into Controller? I suppose 
PlaybackManager comes from eXposer, seeing all its special 
functionality for frame-timing and similar things, which are never 
actually used by MediaPlayer. The naming of methods between 
PlaybackManager and Controller makes it a little confusing, e.g. there's 
Controller::Play() and PlaybackManager::StartPlaying(), or Controller::
SetFramePosition() and PlaybackManager::SetCurrentFrame() etc... Can 
someone (Stephan would be the person to ask I suppose) enlighten me on 
the Controller/PlaybackManager distinction? Was PlaybackManager just 
introduced to simplify using the other project's code or is there a 
good reason to have it in MediaPlayer?

* Since NodeManager currently assumes there is just one producer, 
consumer and connection for each, audio and video, I'd like to extend 
it to allow insertion of arbitrary filter chains. Is it ok if I change 
the design of NodeManager somewhat to make this nicely and not hacked 
in? Don't want to step on anyone's toes by changing designs.

* Why does the NodeManager always call Lock()/Unlock() on the 
BMediaRoster before/after using it? Although the BeBook mentions that 
the MediaRoster is derived from BLooper, it never says it needs 
locking, and Be's example code never does it.

* Is it ok to refactor/remove parts of MediaPlayer which duplicate 
functionality that is already present in the Media Kit (as long as it 
doesn't degrade performance)? Or is it better to keep it around to make 
it possible to sync back the code to Clockwerk or other projects?

* Not that important, but I'm still curious: what is the licence 
situation on MediaPlayer? I see parts of its code are GPL, others are 
MIT. I didn't even know such a mix is possible... (but then again I 
have my problems understanding license legalese generally ;)

--
So long, Julian

Other related posts: