Browse code

lavd/avdevice: add volume messages

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>

Lukasz Marek authored on 2014/04/16 05:06:17
Showing 1 changed files
... ...
@@ -154,6 +154,41 @@ enum AVAppToDevMessageType {
154 154
     AV_APP_TO_DEV_PAUSE        = MKBETAG('P', 'A', 'U', ' '),
155 155
     AV_APP_TO_DEV_PLAY         = MKBETAG('P', 'L', 'A', 'Y'),
156 156
     AV_APP_TO_DEV_TOGGLE_PAUSE = MKBETAG('P', 'A', 'U', 'T'),
157
+
158
+    /**
159
+     * Volume control message.
160
+     *
161
+     * Set volume level. It may be device-dependent if volume
162
+     * is changed per stream or system wide. Per stream volume
163
+     * change is expected when possible.
164
+     *
165
+     * data: double: new volume with range of 0.0 - 1.0.
166
+     */
167
+    AV_APP_TO_DEV_SET_VOLUME = MKBETAG('S', 'V', 'O', 'L'),
168
+
169
+    /**
170
+     * Mute control messages.
171
+     *
172
+     * Change mute state. It may be device-dependent if mute status
173
+     * is changed per stream or system wide. Per stream mute status
174
+     * change is expected when possible.
175
+     *
176
+     * data: NULL.
177
+     */
178
+    AV_APP_TO_DEV_MUTE        = MKBETAG(' ', 'M', 'U', 'T'),
179
+    AV_APP_TO_DEV_UNMUTE      = MKBETAG('U', 'M', 'U', 'T'),
180
+    AV_APP_TO_DEV_TOGGLE_MUTE = MKBETAG('T', 'M', 'U', 'T'),
181
+
182
+    /**
183
+     * Get volume/mute messages.
184
+     *
185
+     * Force the device to send AV_DEV_TO_APP_VOLUME_LEVEL_CHANGED or
186
+     * AV_DEV_TO_APP_MUTE_STATE_CHANGED command respectively.
187
+     *
188
+     * data: NULL.
189
+     */
190
+    AV_APP_TO_DEV_GET_VOLUME = MKBETAG('G', 'V', 'O', 'L'),
191
+    AV_APP_TO_DEV_GET_MUTE   = MKBETAG('G', 'M', 'U', 'T'),
157 192
 };
158 193
 
159 194
 /**
... ...
@@ -237,6 +272,24 @@ enum AVDevToAppMessageType {
237 237
      */
238 238
     AV_DEV_TO_APP_BUFFER_READABLE = MKBETAG('B','R','D',' '),
239 239
     AV_DEV_TO_APP_BUFFER_WRITABLE = MKBETAG('B','W','R',' '),
240
+
241
+    /**
242
+     * Mute state change message.
243
+     *
244
+     * Device informs that mute state has changed.
245
+     *
246
+     * data: int: 0 for not muted state, non-zero for muted state.
247
+     */
248
+    AV_DEV_TO_APP_MUTE_STATE_CHANGED = MKBETAG('C','M','U','T'),
249
+
250
+    /**
251
+     * Volume level change message.
252
+     *
253
+     * Device informs that volume level has changed.
254
+     *
255
+     * data: double: new volume with range of 0.0 - 1.0.
256
+     */
257
+    AV_DEV_TO_APP_VOLUME_LEVEL_CHANGED = MKBETAG('C','V','O','L'),
240 258
 };
241 259
 
242 260
 /**