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

  • From: Stephan AÃmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 29 Nov 2012 12:19:00 +0100

On 29.11.2012 11:12, "Axel DÃrfler" wrote:
On November 28, 2012 at 11:07 PM Julian Harnath <julian.harnath@xxxxxxxxxxxxxx>
wrote:
* 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.

Since the media roster is a local looper, this should not make any difference;
even if the media server restarts, the looper won't change AFAICT.

In fact, if memory serves, I've added the locking specifically for the situation that the media_server restarts. The BeBook doesn't go as deep as one would like with some of these media subjects. I've written an article once on handling media server restarts ("I will survive", or what I called it). It probably mentions something on this topic. That being said, MediaPlayer currently doesn't survive a media_server restart. The code is incomplete in this regard.

Best regards,
-Stephan


Other related posts: