1 BlueZ D-Bus Media API description
2 *********************************
9 Interface org.bluez.Media1
10 Object path [variable prefix]/{hci0,hci1,...}
12 Methods void RegisterEndpoint(object endpoint, dict properties)
14 Register a local end point to sender, the sender can
15 register as many end points as it likes.
17 Note: If the sender disconnects the end points are
18 automatically unregistered.
24 UUID of the profile which the endpoint
29 Assigned number of codec that the
30 endpoint implements. The values should
31 match the profile specification which
32 is indicated by the UUID.
34 array{byte} Capabilities:
36 Capabilities blob, it is used as it is
37 so the size and byte order must match.
39 Possible Errors: org.bluez.Error.InvalidArguments
40 org.bluez.Error.NotSupported - emitted
41 when interface for the end-point is
44 void UnregisterEndpoint(object endpoint)
46 Unregister sender end point.
48 void RegisterPlayer(object player, dict properties)
50 Register a media player object to sender, the sender
51 can register as many objects as it likes.
53 Object must implement at least
54 org.mpris.MediaPlayer2.Player as defined in MPRIS 2.2
57 http://specifications.freedesktop.org/mpris-spec/latest/
59 Note: If the sender disconnects its objects are
60 automatically unregistered.
62 Possible Errors: org.bluez.Error.InvalidArguments
63 org.bluez.Error.NotSupported
65 void UnregisterPlayer(object player)
67 Unregister sender media player.
70 Media Control hierarchy
71 =======================
74 Interface org.bluez.MediaControl1 [Deprecated]
75 Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX
99 Adjust remote volume one step up
103 Adjust remote volume one step down
107 Fast forward playback, this action is only stopped
108 when another method in this interface is called.
112 Rewind playback, this action is only stopped
113 when another method in this interface is called.
117 boolean Connected [readonly]
120 MediaPlayer1 hierarchy
121 ======================
123 Service org.bluez (Controller role)
124 Interface org.bluez.MediaPlayer1 [Experimental]
125 Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/playerX
149 Fast forward playback, this action is only stopped
150 when another method in this interface is called.
154 Rewind playback, this action is only stopped
155 when another method in this interface is called.
157 Properties string Equalizer [readwrite]
159 Possible values: "off" or "on"
161 string Repeat [readwrite]
163 Possible values: "off", "singletrack", "alltracks" or
166 string Shuffle [readwrite]
168 Possible values: "off", "alltracks" or "group"
170 string Scan [readwrite]
172 Possible values: "off", "alltracks" or "group"
174 string Status [readonly]
176 Possible status: "playing", "stopped", "paused",
177 "forward-seek", "reverse-seek"
180 uint32 Position [readonly]
182 Playback position in milliseconds. Changing the
183 position may generate additional events that will be
184 sent to the remote device. When position is 0 it means
185 the track is starting and when it's greater than or
186 equal to track's duration the track has ended. Note
187 that even if duration is not available in metadata it's
188 possible to signal its end by setting position to the
189 maximum uint32 value.
191 dict Track [readonly]
213 uint32 NumberOfTracks:
215 Number of tracks in total
223 Track duration in milliseconds
225 object Device [readonly]
229 string Name [readonly]
233 string Type [readonly]
244 string Subtype [readonly]
253 boolean Browsable [readonly]
255 If present indicates the player can be browsed using
256 MediaFolder interface.
260 True: Supported and active
261 False: Supported but inactive
263 Note: If supported but inactive clients can enable it
264 by using MediaFolder interface but it might interfere
265 in the playback of other players.
268 boolean Searchable [readonly]
270 If present indicates the player can be searched using
271 MediaFolder interface.
275 True: Supported and active
276 False: Supported but inactive
278 Note: If supported but inactive clients can enable it
279 by using MediaFolder interface but it might interfere
280 in the playback of other players.
284 Playlist object path.
286 MediaFolder1 hierarchy
287 ======================
289 Service unique name (Target role)
290 org.bluez (Controller role)
291 Interface org.bluez.MediaFolder1 [Experimental]
292 Object path freely definable (Target role)
293 [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/playerX
296 Methods object Search(string value, dict filter)
298 Return a folder object containing the search result.
300 To list the items found use the folder object returned
301 and pass to ChangeFolder.
303 array{objects, properties} ListItems(dict filter)
305 Return a list of items found
307 void ChangeFolder(object folder)
309 Change current folder.
311 Note: By changing folder the items of previous folder
312 might be destroyed and have to be listed again, the
313 exception is NowPlaying folder which should be always
314 present while the player is active.
316 Properties uint32 NumberOfItems [readonly]
318 Number of items in the folder
320 string Name [readonly]
325 "/Filesystem/...": Filesystem scope
326 "/NowPlaying/...": NowPlaying scope
328 Note: /NowPlaying folder might not be listed if player
329 is stopped, folders created by Search are virtual so
330 once another Search is perform or the folder is
331 changed using ChangeFolder it will no longer be listed.
333 Filters uint32 Start:
335 Offset of the first item.
341 Offset of the last item.
343 Default value: NumbeOfItems
345 array{string} Attributes
347 Item properties that should be included in the list.
351 "title", "artist", "album", "genre",
352 "number-of-tracks", "number", "duration"
359 Service unique name (Target role)
360 org.bluez (Controller role)
361 Interface org.bluez.MediaItem1 [Experimental]
362 Object path freely definable (Target role)
364 prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/playerX/itemX
371 void AddtoNowPlaying()
373 Add item to now playing list
375 Properties object Player [readonly]
377 Player object path the item belongs to
379 string Name [readonly]
381 Item displayable name
383 string Type [readonly]
387 Possible values: "video", "audio", "folder"
389 string FolderType [readonly, optional]
393 Possible values: "mixed", "titles", "albums", "artists"
395 Available if property Type is "Folder"
397 boolean Playable [readonly, optional]
399 Indicates if the item can be played
401 Available if property Type is "folder"
403 dict Metadata [readonly]
413 Available if property Type is "audio"
420 Available if property Type is "audio"
427 Available if property Type is "audio"
434 Available if property Type is "audio"
437 uint32 NumberOfTracks
439 Item album number of tracks in total
441 Available if property Type is "audio"
448 Available if property Type is "audio"
453 Item duration in milliseconds
455 Available if property Type is "audio"
458 MediaEndpoint1 hierarchy
459 ========================
462 Interface org.bluez.MediaEndpoint1
463 Object path freely definable
465 Methods void SetConfiguration(object transport, dict properties)
467 Set configuration for the transport.
469 array{byte} SelectConfiguration(array{byte} capabilities)
471 Select preferable configuration from the supported
474 Returns a configuration which can be used to setup
477 Note: There is no need to cache the selected
478 configuration since on success the configuration is
479 send back as parameter of SetConfiguration.
481 void ClearConfiguration(object transport)
483 Clear transport configuration.
487 This method gets called when the service daemon
488 unregisters the endpoint. An endpoint can use it to do
489 cleanup tasks. There is no need to unregister the
490 endpoint, because when this method gets called it has
491 already been unregistered.
494 MediaTransport1 hierarchy
495 =========================
498 Interface org.bluez.MediaTransport1
499 Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/fdX
501 Methods fd, uint16, uint16 Acquire()
503 Acquire transport file descriptor and the MTU for read
504 and write respectively.
506 Possible Errors: org.bluez.Error.NotAuthorized
507 org.bluez.Error.Failed
509 fd, uint16, uint16 TryAcquire()
511 Acquire transport file descriptor only if the transport
512 is in "pending" state at the time the message is
513 received by BlueZ. Otherwise no request will be sent
514 to the remote device and the function will just fail
515 with org.bluez.Error.NotAvailable.
517 Possible Errors: org.bluez.Error.NotAuthorized
518 org.bluez.Error.Failed
519 org.bluez.Error.NotAvailable
523 Releases file descriptor.
525 Properties object Device [readonly]
527 Device object which the transport is connected to.
529 string UUID [readonly]
531 UUID of the profile which the transport is for.
533 byte Codec [readonly]
535 Assigned number of codec that the transport support.
536 The values should match the profile specification which
537 is indicated by the UUID.
539 array{byte} Configuration [readonly]
541 Configuration blob, it is used as it is so the size and
542 byte order must match.
544 string State [readonly]
546 Indicates the state of the transport. Possible
548 "idle": not streaming
549 "pending": streaming but not acquired
550 "active": streaming and acquired
552 uint16 Delay [readwrite]
554 Optional. Transport delay in 1/10 of millisecond, this
555 property is only writeable when the transport was
556 acquired by the sender.
558 boolean NREC [readwrite]
560 Optional and HFP specific (external to BlueZ).
561 Indicates if echo cancelling and noise reduction
562 functions are active in the transport, this
563 property is only writeable when the transport
564 was acquired by the sender.
566 boolean InbandRingtone [readwrite]
568 Optional and HFP specific (external to BlueZ).
569 Indicates if the transport support sending
570 ringtones, this property is only writeable when
571 the transport was acquired by the sender.
573 string Routing [readonly]
575 Optional and HFP specific (external to BlueZ).
576 Indicates where is the transport being routed.
578 Possible Values: "HCI" or "PCM"
580 uint16 Volume [readwrite]
582 Optional. Indicates volume level of the transport,
583 this property is only writeable when the transport was
584 acquired by the sender.
586 Note: the property will not be present for HSP/HFP
587 transports and MicrophoneGain/SpeakerGain should be
590 Possible Values: 0-127
592 byte MicrophoneGain [readwrite]
594 Optional. Indicates volume level of the transport's
595 incoming audio stream for HSP/HFP transports. This
596 property is only writeable when the transport was
597 acquired by the sender.
599 Possible Values: 0-15
601 byte SpeakerGain [readwrite]
603 Optional. Indicates volume level of the transport's
604 outgoing audio stream for HSP/HFP transports. This
605 property is only writeable when the transport was
606 acquired by the sender.
608 Possible Values: 0-15