Commit Graph

47 Commits

Author SHA1 Message Date
Luiz Augusto von Dentz
6f680981e0 doc/media-api: Remove obsolete properties
Properties related to HFP/HSP are no longer available since BlueZ has
no native support of those profiles.
2014-09-12 14:15:38 +03:00
Luiz Augusto von Dentz
7d3ae3c45f audio/media: Remove experimental status from Media* interfaces
These interfaces have been stable for a while so there is no reason to
keep them as experimental anymore.
2014-08-05 16:31:13 +03:00
Luiz Augusto von Dentz
6ae8a2d895 doc/media-api: Include possible errors 2014-03-13 18:04:56 +02:00
Luiz Augusto von Dentz
7a17b557ab doc/media-api: Add Metadata property to MediaItem
The implementation uses a single property to expose the item metadata
not multiple for every single metadata entry.
2013-07-26 11:27:27 +03:00
Luiz Augusto von Dentz
84fd2a75e0 doc/media-api: Update documentation of MediaItem1
This adds documentation of property Player
2013-07-17 14:31:49 +03:00
Luiz Augusto von Dentz
7c746fcd27 doc/media-api: Update documentation of MediaFolder1
This adds missing access types to properties NumberOfItems and Name
2013-07-17 14:31:49 +03:00
Luiz Augusto von Dentz
8ec17c314f doc/media-api: Update documentation of MediaPlayer1
This adds documentation of properties Type and Subtype
2013-07-16 14:53:38 +03:00
Luiz Augusto von Dentz
3dcb10d74c media-api: Fix mentioning MediaLibrary instead of MediaFolder 2013-03-05 12:39:17 +02:00
Luiz Augusto von Dentz
2b6c519d68 player: Add Playlist property
Playlist property refer to the folder where the list of items being
played can be found.
2013-03-05 11:23:42 +02:00
Luiz Augusto von Dentz
090c5c7fb9 media: Rework MediaItem Type property
Type now can assume the value "folder" so it is no longer necessary to
have Folder property, FolderType in introduced to provide the folder type
that before was on the Type itself.

In addition to this add proper documentation what properties are optional
and under what condition they are available.
2013-03-04 17:41:34 +02:00
Luiz Augusto von Dentz
6b3eb942cd media-api: Fix referencing to MediaLibrary instead of MediaFolder
MediaLibrary was replaced by MediaFolder so doesn't exist anymore.
2013-02-15 16:35:03 +02:00
Luiz Augusto von Dentz
56f02613f9 media-api: Add org.bluez.MediaFolder1
This interface adds support for browsing and searching in the player's
storage using AVRCP 1.4/1.5.

Some remarks about the design:

  - Exposing UIDCounter and UIDs was considered, but the spec seems to have
    missed to define the player's id persistency. There are also the fact that
    UIDCounter alone does not guarantee persistency across sessions and do not
    provide what exact items have changed, so in the end exposing these
    details will bring almost no value.
  - Indexing or caching the whole media library is not recommended, Bluetooth
    is too slow for that and even vendors such as Apple do not recommend doing
    it, so the only items keep in cache are the current listed ones.
  - Addressed vs Browsed player is done implicitly when accessed, this was done
    to simplify the API and avoid confusions between applications and players.
2013-02-01 15:31:15 -06:00
Luiz Augusto von Dentz
e0ee3000d1 media-api: Change RegisterPlayer to use MPRIS spec
RegisterPlayer now expect registered paths to implement
org.mpris.MediaPlayer2.player interface accourding to MPRIS spec:

http://specifications.freedesktop.org/mpris-spec/latest/
2013-01-10 16:36:02 +02:00
Luiz Augusto von Dentz
c83756dc5b player: Add Device property
Device property indicates which device object the player belongs to.
2013-01-10 16:36:00 +02:00
Luiz Augusto von Dentz
da0b4881fb player: Fix documentation to use TrackNumber in track metadata
Using Track key inside a Track property would be pointless, despite the
documentation and code where also inconsistent.
2013-01-10 16:36:00 +02:00
Luiz Augusto von Dentz
44aa975859 media-api: Add playback control methods to MediaPlayer1
This adds methods such as Play, Pause directly in MediaPlayer1, in
addition to that Track is now turn into a property to take advantage of
ObjectManager and document the interface as experimental.
2013-01-10 16:35:59 +02:00
Mikel Astiz
ba01ee9c89 media: Clarify Acquire/TryAcquire error cases
Document the reported errors for Acquire() and TryAcquire(). For the
later, make sure a specific error in guaranteed for the typical scenario
of audio not streaming.
2013-01-08 13:56:18 +02:00
Mikel Astiz
a9a177ff82 media: Add HFP/HSP gains to transport API
Add two independent and HSP/HFP-specific properties to the media
transport representing the input and output audio volumes.
2013-01-08 13:56:15 +02:00
Marcel Holtmann
8ce0255435 doc: Merge org.bluez.Control1 into org.bluez.MediaControl1 API 2012-12-20 00:14:19 +01:00
Johan Hedberg
51a961b165 doc: Mark HFP-specific MediaTransport properties clearly 2012-12-20 00:13:24 +02:00
Marcel Holtmann
5ef85aecf5 doc: Small cleanup for media and control APIs 2012-12-19 19:32:25 +01:00
Mikel Astiz
93e378e2ec media: Fix some wrong interface names
Trivially fix some wrong interface names introduced by commit
3aa15b56dc.
2012-12-06 12:23:00 +02:00
Mikel Astiz
3aa15b56dc media: Add version suffix to all media interfaces
Append the version number to all D-Bus interface names in the Media API.
2012-12-05 19:24:47 +02:00
Mikel Astiz
35a6a98045 media: Add MediaTransport.TryAcquire()
Split the Acquire() method in two parts so that the optional acquires,
formerly represented as a "?" flag in the accesstype parameter of
Acquire(), are now implemented in TryAcquire().
2012-12-05 19:23:52 +02:00
Mikel Astiz
6b97470f81 media: Remove transport access type from D-Bus API
There is no known use-case making use of these access types and
therefore the Media API can be simplified.

From now on, the transport will always be acquired with read and write
access rights.
2012-12-05 19:23:02 +02:00
Johan Hedberg
cb9cee0eb8 doc: Remove leftover PropertyChanged from media-api.txt 2012-11-30 13:17:43 +02:00
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