2007-01-15 02:26:46

by Robert Huitl

[permalink] [raw]
Subject: [Bluez-devel] a2dpd and mplayer - any chance to get it working?

Hi,

I was wondering whether it is possible to make the a2dp alsa plugin supply
correct audio timing to applications like MPlayer. Right now, MPlayer does
not work with a2dpd because it relies on the audio driver to report accurate
audio timing information (or something like that).

If a2dpd could measure the delay introduced on the wireless transport, it
might be possible to supply timing information to media players. The player
could then sync the video to the audio data, so there should be no delay at
all between audio and video playback.

Is there something I am missing?
What changes to the alsa plugin would be necessary?

Even if the delay can't be determined exactly, we could just fake that
information MPlayer is missing, so that a2dpd at least worked together with
MPlayer (with a small delay, maybe)?

Regards,
Robert

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2007-02-06 19:25:45

by Michael Frey

[permalink] [raw]
Subject: Re: [Bluez-devel] a2dpd and mplayer - any chance to get it working?

I have been successful in using the latest cvs code. I can watch a =

movie/listen to music using mplayer. The audio is a bit choppy, and =

I get the following error from mplayer.

alsa-play: write error: Operation not permitted
alsa-play: trying to reset sound card

One other problem is sometimes when I start a movie via Mplayer, it =

pauses until a fast forward the movie a bit. Then it continues.

Good progress!!

Michael



On Feb 2, 2007, at 11:55 AM, Fr=E9d=E9ric DALLEAU wrote:

> Hi,
>
> I've been trying some things and just uploaded an *a2dpd2* plugin.
> Tested the plugin with
> aplay,xmms,amarok,vlc,mocp,kaffeine,mplayer,beep-media-player.
> This gave good sound on all except mplayer :( but at least the movie
> speed is now correct. This may be worth a try on another computer.
> Not had time to try any gst based player.
>
> reports appreciated.
>
> Fr=E9d=E9ric
> PS: Note the type plug/slave.pcm trick is not well supported by
> vlc,mocp,bmp. I used alsa-libs 1.0.13 but this should not be required.
>
>> Frederic is the one who is writing this. He has had some trouble =

>> getting
>> xmms to play without the sleep() call and it may be related to the =

>> pcm
>> status.
>>
>>>> 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?
> -- =

> Frederic
>
> Without the wind, the grass does not move.
>
>
> ---------------------------------------------------------------------- =

> ---
> Using Tomcat but need to do more? Need to support web services, =

> security?
> Get stuff done quickly with pre-integrated technology to make your =

> job easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache =

> Geronimo
> http://sel.as-us.falkag.net/sel? =

> cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D121642
> _______________________________________________
> Bluez-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easi=
er.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D1=
21642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-03-27 14:01:48

by Tim Chick

[permalink] [raw]
Subject: Re: [Bluez-devel] a2dpd and mplayer - any chance to get it working?

On Tuesday 27 March 2007 14:33, Frederic Dalleau wrote:
> > It looks like this stuff is in flux at the moment?
>
> Well, some people reported it works, some said it don't, but to me,
> it works.
>
> > I am using CVS from last night, and I see basically 100% CPU usage
> > from a2dpd, with mpg321 and mplayer whilst it is streaming.
> >
> > This is running on a 400MHz ARM based system, so there should be
> > plenty of CPU available.
>
I also tried a2dpd2, and this "only" took 50% of the CPU.

> Try a2dpd -g to get traces, to see possible errors.
> Is the sound ok ?


Yes.

> Does it do 100% when there is no stream?
No.

> Could you try it on pc?
>
Yes, but I don't see how that helps :-)

Cheers,
Tim


-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-03-27 13:33:04

by Frédéric Dalleau

[permalink] [raw]
Subject: Re: [Bluez-devel] a2dpd and mplayer - any chance to get it working?


> It looks like this stuff is in flux at the moment?
>
Well, some people reported it works, some said it don't, but to me, it
works.
> I am using CVS from last night, and I see basically 100% CPU usage from
> a2dpd, with mpg321 and mplayer whilst it is streaming.
>
> This is running on a 400MHz ARM based system, so there should be plenty
> of CPU available.
>
Try a2dpd -g to get traces, to see possible errors.
Is the sound ok ? Does it do 100% when there is no stream?
Could you try it on pc?

Frederic

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-04-06 16:05:02

by Frédéric Dalleau

[permalink] [raw]
Subject: Re: [Bluez-devel] a2dpd and mplayer - any chance to get it working?

Tim,

>>> I am using CVS from last night, and I see basically 100% CPU usage
>>> from a2dpd, with mpg321 and mplayer whilst it is streaming.
>>>
Could you try latest cvs? What version of alsa are you using?

Frederic


-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-04-06 05:17:40

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-devel] Question about poll() - was Re: a2dpd and mplayer - any chance to get it working?

Frederic

> If poll(x,y,1) is replaced by usleep(1); poll(x,y,0) then cpu usage fall
> back to 0.

poll is returning immediately either with an error or with one of your
conditions met. what is in revents after the return? what conditions are
you interested in?

brad

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-04-05 08:59:09

by Frédéric Dalleau

[permalink] [raw]
Subject: [Bluez-devel] Question about poll() - was Re: a2dpd and mplayer - any chance to get it working?

Hi,
I'm investigating the problem tim talked about :
>>> I am using CVS from last night, and I see basically 100% CPU usage
>>> from a2dpd, with mpg321 and mplayer whilst it is streaming.
>>> =

While I don't get 100% on arm I got a significant cpu usage which the =

previous btsco was not doing.
When streaming a2dpd is calling poll with small timeouts (like 1 ms) to =

ensure packets get sent at right time.
If poll(x,y,1) is replaced by usleep(1); poll(x,y,0) then cpu usage fall =

back to 0.

This means the poll call itself is burning cpu. Mmmm, I think this is =

strange.
Any ideas? What's the best place to find information for question like this?

Fr=E9d=E9ric


-------------------------------------------------------------------------
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=3Djoin.php&p=3Dsourceforge&CID=3DDE=
VDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel