public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Fabien Chevalier <fabchevalier@free.fr>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] RE : a2dpd and mplayer - any chance to get it working?
Date: Wed, 17 Jan 2007 19:35:49 +0100	[thread overview]
Message-ID: <45AE6C85.90803@free.fr> (raw)
In-Reply-To: <7A6DA545D7FDCC4B93DB651FDBC1EDDE4E6EBF@eumonex01.palmsource.com>

Hi Frederic, i think can help you for the second part:

>  I was wondering about alsa plugins :
> xmms relies on alsa timing to play, so in the plugin, there is a sleep() call, this will wait a little bit until it is time to retievre new data.
> But it seems some players (like mplayer) wants to do their own timing or at least don't want to sleep. They need to use that time to do some decoding instead. If you sleep too long, the decoding will be defered and the sound or movie will be broken.
> 
> Is there a rule to distinguish? Or some magic value to sleep?

The key idea is that ALSA applications expect ALSA to run on a hardware 
device that implements a ring buffer as a mean of transferring data from 
  ALSA to the device.
This ring buffer is divided into small chunks, called 'periods'.
ALSA API is expected to block the caller when the ring buffer is full, 
and unblock it when some room is freed. The size of the buffer, as well 
as the period size is up to the application to select so that it best 
fits its needs.

What you've done in the a2dp pcm plugin(if i understood well) is to 
throttle the application using sleep. But that does not emulate the ring 
buffer behaviour well enough, so it breaks MPlayer. :-(

Some more details can be found here : 
http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html

Cheers,

Fabien

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  parent reply	other threads:[~2007-01-17 18:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-15  2:26 [Bluez-devel] a2dpd and mplayer - any chance to get it working? Robert Huitl
2007-01-17  7:03 ` [Bluez-devel] RE : " Frederic Dalleau
2007-01-17 18:05   ` [Bluez-devel] " Robert Huitl
2007-01-17 18:35   ` Fabien Chevalier [this message]
2007-01-17 19:15     ` [Bluez-devel] RE : " Brad Midgley
2007-01-18 17:50       ` Fabien Chevalier
2007-01-28 19:30   ` [Bluez-devel] " Robert Huitl
2007-01-29  3:01     ` Brad Midgley
2007-02-02 16:55       ` Frédéric DALLEAU
2007-02-06 19:25         ` Michael Frey
2007-03-27 10:39         ` Tim Chick
2007-03-27 13:33           ` Frederic Dalleau
2007-03-27 14:01             ` Tim Chick
2007-04-05  8:59               ` [Bluez-devel] Question about poll() - was " Frederic Dalleau
2007-04-06  5:17                 ` Brad Midgley
2007-04-06 16:05               ` [Bluez-devel] " Frederic Dalleau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45AE6C85.90803@free.fr \
    --to=fabchevalier@free.fr \
    --cc=bluez-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox