Commit Graph

21 Commits

Author SHA1 Message Date
Luiz Augusto von Dentz
0ecced58f3 media-api: Update documentation of MediaPlayer interface 2012-11-30 10:30:50 +02:00
Luiz Augusto von Dentz
509d71d550 media-api: Update documentation of MediaTransport interface 2012-11-29 11:32:10 +02:00
Luiz Augusto von Dentz
80b085fc97 audio: Export remote player as children object path of device
The object implements org.bluez.MediaPlayer similar to the target role.
2012-10-31 10:37:39 +02:00
Michael Knudsen
38bac0a093 doc: Fix typo in media API 2012-10-23 15:35:52 +03:00
Mikel Astiz
7b69385b5f media: Extend media API with optional acquire
Acquiring a transport is needed in two different situations: either
we are initiating the audio stream locally, or the remote side initiated
it and thus we are just reacting. In the second case, we would expect
the stream is already available, and otherwise the operation should
fail. This means the media API needs to be extended in order to make
this difference.

This issue is specially relevant in the case of SCO, because the current
approach is racy. With HFP, for example (say BlueZ has the HS role), the
following race condition could be met:

1. Phone has an incoming call and thus starts in-band ringing.
2. SCO connection is accepted and stablished by BlueZ.
3. Gateway interface state is changed to Playing.
4. Exactly afterwards, the user routes the audio to the phone, to have
   a private conversation. So the SCO link is closed.
5. In parallel, PulseAudio sees the transition to Playing, and acquires
   the transport.
6. BlueZ receives an Acquire() request, but SCO is down. So it tries to
   reconnect the SCO link.

The last step is an undesired behavior (the audio is routed back to the
car). BlueZ should be smart enough to know that the SCO connection
shouldn't be reestablished, but this is only possible if the endpoint
provides additional information in the media API.

Note that the API change introduced by this patch is backward
compatible, meaning that older versions of BlueZ will just ignore the
flag. So clients are encouraged to use it without necessarily adding a
dependency to newer versions of BlueZ.
2012-09-17 16:27:14 +03:00
Mikel Astiz
3edd39f0fd media: Expose transport state in D-Bus
Extend the Media API to expose the transport state in D-Bus, as a
property of the transport. This way the clients do not have to find
out which is the corresponding profile-specific interface for the
transport.

Additionally, this state along with the automatic release of transports
will allow clients to avoid the "optional release" or "accept remote
release" race condition. For example, with HSP/HFP profiles, the problem
is the following:

1. User suspends SCO in the remote end.
2. BlueZ signals the Playing->Connected state change in D-Bus.
3. Exactly afterwards, the user resumes SCO in the remote end.
4. In parallel, PulseAudio sees the aforementioned transition to
   Connected, and thus releases the transport.
5. BlueZ receives a Release() request while SCO is up. So the audio
   stream will be suspended.

The last step is an undesired behavior since the user explicitly wanted
to route the audio stream through Bluetooth.

The issue is difficult to reproduce but it can easily be solved by
exposing the transport state in D-Bus.
2012-09-14 16:48:24 +03:00
Michal Labedzki
4aae0e2981 doc: Fix typo
This patch fix simple typo in documentation of API.
2012-06-28 13:14:10 +03:00
Luiz Augusto von Dentz
d55d05b881 media-api: Update documentation to include Volume property 2012-05-25 10:42:01 +03:00
Syam Sidhardhan
3e14a20905 doc: Fix typo 2012-04-13 12:45:10 +03:00
Lucas De Marchi
3adcd9ed77 AVRCP: implement TRACK-REACHED-END event 2011-11-04 15:38:33 +02:00
Luiz Augusto von Dentz
4ed6c1c2a4 Add MediaPlayer.Release method
This is similar to MediaEndpoint.Release which is useful to notify the
player that it is no longer registered/active.
2011-10-28 15:15:48 +03:00
Lucas De Marchi
5a4402f8f6 Fix MediaPlayer documentation 2011-10-20 10:35:27 +03:00
Lucas De Marchi
cd25bc2b76 Don't overwrite metadata when changing track
If we use the same hash table to set the new metadata, we have 2
undesired behaviors:

1) New track may contain fields from previous track if it didn't set all
the fields
2) If we fail on parsing the signal, we will still change some of the
fields
2011-10-13 16:08:29 +03:00
Lucas De Marchi
aac1ff80c9 Fix typo on doc 2011-10-13 10:38:39 +03:00
Luiz Augusto von Dentz
14ae307458 AVRCP: move MediaPlayer to adapter object
This move the MediaPlayer registration to adapter object on Media
interface so we can track players properly.
2011-10-06 11:13:28 +03:00
Dmitriy Paliy
8c14dfca48 Update Media API documentation
Possible error responses are added to RegisterEndpoint.
2011-03-28 17:25:42 +03:00
Luiz Augusto von Dentz
3c1b20edad Add Routing property to MediaTransport interface
This should indicate to the endpoint what routing the transport is using
2011-01-19 20:44:33 +05:30
Luiz Augusto von Dentz
5937a8bf35 Remove IMTU and OMTU properties and return its values on Acquire reply
This should make Acquire blocking friendly since the client no longer has
to call GetProperties to discover how much it can write/read when using
the acquired file descriptor.
2011-01-19 20:42:32 +05:30
Luiz Augusto von Dentz
64c3ed6559 Make MediaEndpoint.ClearConfiguration to take transport path
This makes simpler to application which are handling many endpoints
without a context data. It also may be useful in future in case we
allow multiple transports per endpoint.
2010-09-22 22:23:38 +03:00
Luiz Augusto von Dentz
94d0f3a197 Make MediaEndpoint.SetConfiguration to take all transport properties
This will probably avoid the endpoint agent to have to call GetProperties
to check for transport properties.
2010-09-22 22:23:38 +03:00
Luiz Augusto von Dentz
1e985e1135 Add media API documentation
Media API is a replacement for the internal audio IPC which is no longer
necessary as DBus 1.3 and newer are capable of transfering file
descriptors.
2010-09-15 15:05:44 +03:00