summaryrefslogtreecommitdiff
path: root/doc/media-api.txt
blob: b2f239ab7d8099aa3ea2ac1e6719ce493f35df99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
BlueZ D-Bus Media API description
*********************************

Media hierarchy
===============

Service		org.bluez
Interface	org.bluez.Media
Object path	[variable prefix]/{hci0,hci1,...}

Methods		void RegisterEndpoint(object endpoint, dict properties)

			Register a local end point to sender, the sender can
			register as many end points as it likes.

			Note: If the sender disconnects the end points are
			automatically unregistered.

			possible properties:

				string UUID:

					UUID of the profile which the endpoint
					is for.

				byte Codec:

					Assigned mumber of codec that the
					endpoint implements. The values should
					match the profile specification which
					is indicated by the UUID.

				array{byte} Capabilities:

					Capabilities blob, it is used as it is
					so the size and byte order must match.

			Possible Errors: org.bluez.Error.InvalidArguments
					 org.bluez.Error.NotSupported - emitted
					 when interface for the end-point is
					 disabled.

		void UnregisterEndpoint(object endpoint)

			Unregister sender end point.

MediaEndpoint hierarchy
=======================

Service		unique name
Interface	org.bluez.MediaEndpoint
Object path	freely definable

Methods		void SetConfiguration(object transport, dict properties)

			Set configuration for the transport.

		array{byte} SelectConfiguration(array{byte} capabilities)

			Select preferable configuration from the supported
			capabilities.

			Returns a configuration which can be used to setup
			a transport.

			Note: There is no need to cache the selected
			configuration since on success the configuration is
			send back as parameter of SetConfiguration.

		void ClearConfiguration(object transport)

			Clear transport configuration.

		void Release()

			This method gets called when the service daemon
			unregisters the endpoint. An endpoint can use it to do
			cleanup tasks. There is no need to unregister the
			endpoint, because when this method gets called it has
			already been unregistered.

MediaTransport hierarchy
========================

Service		org.bluez
Interface	org.bluez.MediaTransport
Object path	[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/fdX

Methods		dict GetProperties()

			Returns all properties for the interface. See the
			properties section for available properties.

		fd, uint16, uint16 Acquire(string accesstype)

			Acquire transport file descriptor and the MTU for read
			and write respectively.

			possible accesstype:

				"r" : Read only access

				"w" : Write only access

				"rw": Read and write access

		void Release(string accesstype)

			Releases file descriptor.

		void SetProperty(string name, variant value)

			Changes the value of the specified property. Only
			properties that are listed a read-write can be changed.

			On success this will emit a PropertyChanged signal.

Signals		void PropertyChanged(string name, variant value)

			This signal indicates a changed value of the given
			property.

Properties	object Device [readonly]

			Device object which the transport is connected to.

		string UUID [readonly]

			UUID of the profile which the transport is for.

		byte Codec [readonly]

			Assigned mumber of codec that the transport support.
			The values should match the profile specification which
			is indicated by the UUID.

		array{byte} Configuration [readonly]

			Configuration blob, it is used as it is so the size and
			byte order must match.

		uint16 Delay [readwrite]

			Optional. Transport delay in 1/10 of milisecond, this
			property is only writeable when the transport was
			acquired by the sender.

		boolean NREC [readwrite]

			Optional. Indicates if echo cancelling and noise
			reduction functions are active in the transport, this
			property is only writeable when the transport was
			acquired by the sender.

		boolean InbandRingtone [readwrite]

			Optional. Indicates if the transport support sending
			ringtones, this property is only writeable when the
			transport was acquired by the sender.

		string Routing [readonly]

			Optional. Indicates where is the transport being routed

			Possible Values: "HCI" or "PCM"