Zephyr API 3.6.99
Loading...
Searching...
No Matches
media_proxy.h
Go to the documentation of this file.
1
6/*
7 * Copyright (c) 2019 - 2024 Nordic Semiconductor ASA
8 *
9 * SPDX-License-Identifier: Apache-2.0
10 */
11
12#ifndef ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_MEDIA_PROXY_H_
13#define ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_MEDIA_PROXY_H_
14
45#include <stdint.h>
46#include <stdbool.h>
47
50
51/* TODO: Remove dependency on mcs.h */
52#include "mcs.h"
53
54#ifdef __cplusplus
55extern "C" {
56#endif
57
69
79
88
98
106#define MEDIA_PROXY_PLAYBACK_SPEED_MIN -128
108#define MEDIA_PROXY_PLAYBACK_SPEED_QUARTER -128
110#define MEDIA_PROXY_PLAYBACK_SPEED_HALF -64
112#define MEDIA_PROXY_PLAYBACK_SPEED_UNITY 0
114#define MEDIA_PROXY_PLAYBACK_SPEED_DOUBLE 64
116#define MEDIA_PROXY_PLAYBACK_SPEED_MAX 127
128#define MEDIA_PROXY_SEEKING_SPEED_FACTOR_MAX 64
130#define MEDIA_PROXY_SEEKING_SPEED_FACTOR_MIN 4
132#define MEDIA_PROXY_SEEKING_SPEED_FACTOR_ZERO 0
140#define MEDIA_PROXY_PLAYING_ORDER_SINGLE_ONCE 0x01
142#define MEDIA_PROXY_PLAYING_ORDER_SINGLE_REPEAT 0x02
144#define MEDIA_PROXY_PLAYING_ORDER_INORDER_ONCE 0x03
146#define MEDIA_PROXY_PLAYING_ORDER_INORDER_REPEAT 0x04
148#define MEDIA_PROXY_PLAYING_ORDER_OLDEST_ONCE 0x05
150#define MEDIA_PROXY_PLAYING_ORDER_OLDEST_REPEAT 0x06
152#define MEDIA_PROXY_PLAYING_ORDER_NEWEST_ONCE 0x07
154#define MEDIA_PROXY_PLAYING_ORDER_NEWEST_REPEAT 0x08
156#define MEDIA_PROXY_PLAYING_ORDER_SHUFFLE_ONCE 0x09
158#define MEDIA_PROXY_PLAYING_ORDER_SHUFFLE_REPEAT 0x0a
169#define MEDIA_PROXY_PLAYING_ORDERS_SUPPORTED_SINGLE_ONCE BIT(0)
171#define MEDIA_PROXY_PLAYING_ORDERS_SUPPORTED_SINGLE_REPEAT BIT(1)
173#define MEDIA_PROXY_PLAYING_ORDERS_SUPPORTED_INORDER_ONCE BIT(2)
175#define MEDIA_PROXY_PLAYING_ORDERS_SUPPORTED_INORDER_REPEAT BIT(3)
177#define MEDIA_PROXY_PLAYING_ORDERS_SUPPORTED_OLDEST_ONCE BIT(4)
179#define MEDIA_PROXY_PLAYING_ORDERS_SUPPORTED_OLDEST_REPEAT BIT(5)
181#define MEDIA_PROXY_PLAYING_ORDERS_SUPPORTED_NEWEST_ONCE BIT(6)
183#define MEDIA_PROXY_PLAYING_ORDERS_SUPPORTED_NEWEST_REPEAT BIT(7)
185#define MEDIA_PROXY_PLAYING_ORDERS_SUPPORTED_SHUFFLE_ONCE BIT(8)
187#define MEDIA_PROXY_PLAYING_ORDERS_SUPPORTED_SHUFFLE_REPEAT BIT(9)
195#define MEDIA_PROXY_STATE_INACTIVE 0x00
197#define MEDIA_PROXY_STATE_PLAYING 0x01
199#define MEDIA_PROXY_STATE_PAUSED 0x02
201#define MEDIA_PROXY_STATE_SEEKING 0x03
203#define MEDIA_PROXY_STATE_LAST 0x04
211#define MEDIA_PROXY_OP_PLAY 0x01
213#define MEDIA_PROXY_OP_PAUSE 0x02
215#define MEDIA_PROXY_OP_FAST_REWIND 0x03
217#define MEDIA_PROXY_OP_FAST_FORWARD 0x04
222#define MEDIA_PROXY_OP_STOP 0x05
223
225#define MEDIA_PROXY_OP_MOVE_RELATIVE 0x10
226
231#define MEDIA_PROXY_OP_PREV_SEGMENT 0x20
236#define MEDIA_PROXY_OP_NEXT_SEGMENT 0x21
241#define MEDIA_PROXY_OP_FIRST_SEGMENT 0x22
246#define MEDIA_PROXY_OP_LAST_SEGMENT 0x23
251#define MEDIA_PROXY_OP_GOTO_SEGMENT 0x24
252
254#define MEDIA_PROXY_OP_PREV_TRACK 0x30
256#define MEDIA_PROXY_OP_NEXT_TRACK 0x31
258#define MEDIA_PROXY_OP_FIRST_TRACK 0x32
260#define MEDIA_PROXY_OP_LAST_TRACK 0x33
262#define MEDIA_PROXY_OP_GOTO_TRACK 0x34
263
265#define MEDIA_PROXY_OP_PREV_GROUP 0x40
267#define MEDIA_PROXY_OP_NEXT_GROUP 0x41
269#define MEDIA_PROXY_OP_FIRST_GROUP 0x42
271#define MEDIA_PROXY_OP_LAST_GROUP 0x43
273#define MEDIA_PROXY_OP_GOTO_GROUP 0x44
279#define MEDIA_PROXY_OPCODES_SUPPORTED_LEN 4
280
286#define MEDIA_PROXY_OP_SUP_PLAY BIT(0)
288#define MEDIA_PROXY_OP_SUP_PAUSE BIT(1)
290#define MEDIA_PROXY_OP_SUP_FAST_REWIND BIT(2)
292#define MEDIA_PROXY_OP_SUP_FAST_FORWARD BIT(3)
294#define MEDIA_PROXY_OP_SUP_STOP BIT(4)
295
297#define MEDIA_PROXY_OP_SUP_MOVE_RELATIVE BIT(5)
298
300#define MEDIA_PROXY_OP_SUP_PREV_SEGMENT BIT(6)
302#define MEDIA_PROXY_OP_SUP_NEXT_SEGMENT BIT(7)
304#define MEDIA_PROXY_OP_SUP_FIRST_SEGMENT BIT(8)
306#define MEDIA_PROXY_OP_SUP_LAST_SEGMENT BIT(9)
308#define MEDIA_PROXY_OP_SUP_GOTO_SEGMENT BIT(10)
309
311#define MEDIA_PROXY_OP_SUP_PREV_TRACK BIT(11)
313#define MEDIA_PROXY_OP_SUP_NEXT_TRACK BIT(12)
315#define MEDIA_PROXY_OP_SUP_FIRST_TRACK BIT(13)
317#define MEDIA_PROXY_OP_SUP_LAST_TRACK BIT(14)
319#define MEDIA_PROXY_OP_SUP_GOTO_TRACK BIT(15)
320
322#define MEDIA_PROXY_OP_SUP_PREV_GROUP BIT(16)
324#define MEDIA_PROXY_OP_SUP_NEXT_GROUP BIT(17)
326#define MEDIA_PROXY_OP_SUP_FIRST_GROUP BIT(18)
328#define MEDIA_PROXY_OP_SUP_LAST_GROUP BIT(19)
330#define MEDIA_PROXY_OP_SUP_GOTO_GROUP BIT(20)
338#define MEDIA_PROXY_CMD_SUCCESS 0x01
340#define MEDIA_PROXY_CMD_NOT_SUPPORTED 0x02
346#define MEDIA_PROXY_CMD_PLAYER_INACTIVE 0x03
351#define MEDIA_PROXY_CMD_CANNOT_BE_COMPLETED 0x04
359#define MEDIA_PROXY_SEARCH_TYPE_TRACK_NAME 0x01
361#define MEDIA_PROXY_SEARCH_TYPE_ARTIST_NAME 0x02
363#define MEDIA_PROXY_SEARCH_TYPE_ALBUM_NAME 0x03
365#define MEDIA_PROXY_SEARCH_TYPE_GROUP_NAME 0x04
367#define MEDIA_PROXY_SEARCH_TYPE_EARLIEST_YEAR 0x05
369#define MEDIA_PROXY_SEARCH_TYPE_LATEST_YEAR 0x06
371#define MEDIA_PROXY_SEARCH_TYPE_GENRE 0x07
373#define MEDIA_PROXY_SEARCH_TYPE_ONLY_TRACKS 0x08
375#define MEDIA_PROXY_SEARCH_TYPE_ONLY_GROUPS 0x09
384#define MEDIA_PROXY_SEARCH_SUCCESS 0x01
386#define MEDIA_PROXY_SEARCH_FAILURE 0x02
395#define MEDIA_PROXY_GROUP_OBJECT_TRACK_TYPE 0x00
397#define MEDIA_PROXY_GROUP_OBJECT_GROUP_TYPE 0x01
403struct media_player;
404
405/* PUBLIC API FOR CONTROLLERS */
406
413
425 void (*local_player_instance)(struct media_player *player, int err);
426
427#ifdef CONFIG_MCTL_REMOTE_PLAYER_CONTROL
439 void (*discover_player)(struct media_player *player, int err);
440#endif /* CONFIG_MCTL_REMOTE_PLAYER_CONTROL */
441
453 void (*player_name_recv)(struct media_player *player, int err, const char *name);
454
466 void (*icon_id_recv)(struct media_player *player, int err, uint64_t id);
467
479 void (*icon_url_recv)(struct media_player *player, int err, const char *url);
480
490 void (*track_changed_recv)(struct media_player *player, int err);
491
503 void (*track_title_recv)(struct media_player *player, int err, const char *title);
504
516 void (*track_duration_recv)(struct media_player *player, int err, int32_t duration);
517
530 void (*track_position_recv)(struct media_player *player, int err, int32_t position);
531
543 void (*track_position_write)(struct media_player *player, int err, int32_t position);
544
557 void (*playback_speed_recv)(struct media_player *player, int err, int8_t speed);
558
570 void (*playback_speed_write)(struct media_player *player, int err, int8_t speed);
571
583 void (*seeking_speed_recv)(struct media_player *player, int err, int8_t speed);
584
596 void (*track_segments_id_recv)(struct media_player *player, int err, uint64_t id);
597
610 void (*current_track_id_recv)(struct media_player *player, int err, uint64_t id);
611
623 void (*current_track_id_write)(struct media_player *player, int err, uint64_t id);
624
637 void (*next_track_id_recv)(struct media_player *player, int err, uint64_t id);
638
650 void (*next_track_id_write)(struct media_player *player, int err, uint64_t id);
651
663 void (*parent_group_id_recv)(struct media_player *player, int err, uint64_t id);
664
677 void (*current_group_id_recv)(struct media_player *player, int err, uint64_t id);
678
690 void (*current_group_id_write)(struct media_player *player, int err, uint64_t id);
691
704 void (*playing_order_recv)(struct media_player *player, int err, uint8_t order);
705
717 void (*playing_order_write)(struct media_player *player, int err, uint8_t order);
718
730 void (*playing_orders_supported_recv)(struct media_player *player, int err,
731 uint16_t orders);
732
745 void (*media_state_recv)(struct media_player *player, int err, uint8_t state);
746
758 void (*command_send)(struct media_player *player, int err, const struct mpl_cmd *cmd);
759
771 void (*command_recv)(struct media_player *player, int err,
772 const struct mpl_cmd_ntf *result);
773
785 void (*commands_supported_recv)(struct media_player *player, int err, uint32_t opcodes);
786
798 void (*search_send)(struct media_player *player, int err, const struct mpl_search *search);
799
816 void (*search_recv)(struct media_player *player, int err, uint8_t result_code);
817
829 void (*search_results_id_recv)(struct media_player *player, int err, uint64_t id);
830
842 void (*content_ctrl_id_recv)(struct media_player *player, int err, uint8_t ccid);
843};
844
853
871int media_proxy_ctrl_discover_player(struct bt_conn *conn);
872
880int media_proxy_ctrl_get_player_name(struct media_player *player);
881
897int media_proxy_ctrl_get_icon_id(struct media_player *player);
898
906int media_proxy_ctrl_get_icon_url(struct media_player *player);
907
915int media_proxy_ctrl_get_track_title(struct media_player *player);
916
927int media_proxy_ctrl_get_track_duration(struct media_player *player);
928
940int media_proxy_ctrl_get_track_position(struct media_player *player);
941
956int media_proxy_ctrl_set_track_position(struct media_player *player, int32_t position);
957
975int media_proxy_ctrl_get_playback_speed(struct media_player *player);
976
996int media_proxy_ctrl_set_playback_speed(struct media_player *player, int8_t speed);
997
1014int media_proxy_ctrl_get_seeking_speed(struct media_player *player);
1015
1031int media_proxy_ctrl_get_track_segments_id(struct media_player *player);
1032
1048int media_proxy_ctrl_get_current_track_id(struct media_player *player);
1049
1063int media_proxy_ctrl_set_current_track_id(struct media_player *player, uint64_t id);
1064
1077int media_proxy_ctrl_get_next_track_id(struct media_player *player);
1078
1091int media_proxy_ctrl_set_next_track_id(struct media_player *player, uint64_t id);
1092
1110int media_proxy_ctrl_get_parent_group_id(struct media_player *player);
1111
1127int media_proxy_ctrl_get_current_group_id(struct media_player *player);
1128
1142int media_proxy_ctrl_set_current_group_id(struct media_player *player, uint64_t id);
1143
1151int media_proxy_ctrl_get_playing_order(struct media_player *player);
1152
1163int media_proxy_ctrl_set_playing_order(struct media_player *player, uint8_t order);
1164
1175int media_proxy_ctrl_get_playing_orders_supported(struct media_player *player);
1176
1186int media_proxy_ctrl_get_media_state(struct media_player *player);
1187
1201int media_proxy_ctrl_send_command(struct media_player *player, const struct mpl_cmd *command);
1202
1213int media_proxy_ctrl_get_commands_supported(struct media_player *player);
1214
1234int media_proxy_ctrl_send_search(struct media_player *player, const struct mpl_search *search);
1235
1252int media_proxy_ctrl_get_search_results_id(struct media_player *player);
1253
1266
1273
1279 const char *(*get_player_name)(void);
1280
1293
1301 const char *(*get_icon_url)(void);
1302
1308 const char *(*get_track_title)(void);
1309
1319
1330
1342 void (*set_track_position)(int32_t position);
1343
1360
1378
1394
1407
1420
1430
1440
1449
1464
1477
1487
1494
1504
1515
1525
1535 void (*send_command)(const struct mpl_cmd *command);
1536
1547
1557 void (*send_search)(const struct mpl_search *search);
1558
1572
1583};
1584
1599
1606
1612struct bt_ots *bt_mcs_get_ots(void);
1613
1621void media_proxy_pl_name_cb(const char *name);
1622
1630void media_proxy_pl_icon_url_cb(const char *url);
1631
1638
1647
1659
1676
1685
1694
1704
1713
1722
1731
1740
1749
1759void media_proxy_pl_command_cb(const struct mpl_cmd_ntf *cmd_ntf);
1760
1769
1783
1793
1794#ifdef __cplusplus
1795}
1796#endif
1797
1798 /* End of group bt_media_proxy */
1799
1800#endif /* ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_MEDIA_PROXY_H_ */
Bluetooth subsystem core APIs.
#define SEARCH_PARAM_MAX
Search parameters maximum length
Definition mcs.h:339
#define SEARCH_LEN_MAX
Search control point maximum length.
Definition mcs.h:328
int media_proxy_ctrl_get_playing_orders_supported(struct media_player *player)
Read Playing Orders Supported.
int media_proxy_ctrl_send_search(struct media_player *player, const struct mpl_search *search)
Set Search.
void media_proxy_pl_name_cb(const char *name)
Player name changed callback.
int media_proxy_ctrl_get_parent_group_id(struct media_player *player)
Read Parent Group Object ID.
int media_proxy_ctrl_get_commands_supported(struct media_player *player)
Read Commands Supported.
void media_proxy_pl_playback_speed_cb(int8_t speed)
Playback speed callback.
int media_proxy_ctrl_get_track_segments_id(struct media_player *player)
Read Current Track Segments Object ID.
int media_proxy_ctrl_get_player_name(struct media_player *player)
Read Media Player Name.
uint8_t media_proxy_ctrl_get_content_ctrl_id(struct media_player *player)
Read Content Control ID.
int media_proxy_ctrl_get_current_group_id(struct media_player *player)
Read Current Group Object ID.
int media_proxy_ctrl_get_playback_speed(struct media_player *player)
Get Playback Speed.
int media_proxy_ctrl_get_playing_order(struct media_player *player)
Read Playing Order.
int media_proxy_ctrl_register(struct media_proxy_ctrl_cbs *ctrl_cbs)
Register a controller with the media_proxy.
void media_proxy_pl_search_results_id_cb(uint64_t id)
Search Results object ID callback.
int media_proxy_ctrl_set_next_track_id(struct media_player *player, uint64_t id)
Set Next Track Object ID.
int media_proxy_ctrl_get_track_duration(struct media_player *player)
Read Track Duration.
void media_proxy_pl_track_changed_cb(void)
Track changed callback.
int media_proxy_ctrl_get_search_results_id(struct media_player *player)
Read Search Results Object ID.
int media_proxy_ctrl_send_command(struct media_player *player, const struct mpl_cmd *command)
Send Command.
int media_proxy_ctrl_discover_player(struct bt_conn *conn)
Discover a remote media player.
int media_proxy_ctrl_get_icon_id(struct media_player *player)
Read Icon Object ID.
void media_proxy_pl_track_position_cb(int32_t position)
Track position callback.
void media_proxy_pl_parent_group_id_cb(uint64_t id)
Parent group object ID callback.
void media_proxy_pl_command_cb(const struct mpl_cmd_ntf *cmd_ntf)
Command callback.
void media_proxy_pl_commands_supported_cb(uint32_t opcodes)
Commands supported callback.
int media_proxy_ctrl_set_track_position(struct media_player *player, int32_t position)
Set Track Position.
void media_proxy_pl_track_duration_cb(int32_t duration)
Track duration callback.
int media_proxy_ctrl_get_seeking_speed(struct media_player *player)
Get Seeking Speed.
void media_proxy_pl_media_state_cb(uint8_t state)
Media state callback.
void media_proxy_pl_search_cb(uint8_t result_code)
Search callback.
int media_proxy_ctrl_get_media_state(struct media_player *player)
Read Media State.
void media_proxy_pl_track_title_cb(char *title)
Track title callback.
void media_proxy_pl_playing_order_cb(uint8_t order)
Playing order callback.
int media_proxy_ctrl_set_playing_order(struct media_player *player, uint8_t order)
Set Playing Order.
int media_proxy_pl_init(void)
Initialize player.
int media_proxy_ctrl_get_icon_url(struct media_player *player)
Read Icon URL.
int media_proxy_ctrl_set_playback_speed(struct media_player *player, int8_t speed)
Set Playback Speed.
int media_proxy_ctrl_get_track_title(struct media_player *player)
Read Track Title.
int media_proxy_pl_register(struct media_proxy_pl_calls *pl_calls)
Register a player with the media proxy.
void media_proxy_pl_current_group_id_cb(uint64_t id)
Current group object ID callback.
void media_proxy_pl_current_track_id_cb(uint64_t id)
Current track object ID callback.
void media_proxy_pl_icon_url_cb(const char *url)
Player icon URL changed callback.
int media_proxy_ctrl_get_track_position(struct media_player *player)
Read Track Position.
int media_proxy_ctrl_get_next_track_id(struct media_player *player)
Read Next Track Object ID.
int media_proxy_ctrl_set_current_group_id(struct media_player *player, uint64_t id)
Set Current Group Object ID.
int media_proxy_ctrl_set_current_track_id(struct media_player *player, uint64_t id)
Set Current Track Object ID.
void media_proxy_pl_seeking_speed_cb(int8_t speed)
Seeking speed callback.
int media_proxy_ctrl_get_current_track_id(struct media_player *player)
Read Current Track Object ID.
void media_proxy_pl_next_track_id_cb(uint64_t id)
Next track object ID callback.
struct bt_ots * bt_mcs_get_ots(void)
Get the pointer of the Object Transfer Service used by the Media Control Service.
static void cmd(uint32_t command)
Execute a display list command by co-processor engine.
Definition ft8xx_reference_api.h:153
Bluetooth Media Control Service (MCS) APIs.
state
Definition parser_state.h:29
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__INT32_TYPE__ int32_t
Definition stdint.h:74
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
__INT8_TYPE__ int8_t
Definition stdint.h:72
Callbacks to a controller, from the media proxy.
Definition media_proxy.h:412
void(* search_recv)(struct media_player *player, int err, uint8_t result_code)
Search result code receive callback.
Definition media_proxy.h:816
void(* commands_supported_recv)(struct media_player *player, int err, uint32_t opcodes)
Commands supported receive callback.
Definition media_proxy.h:785
void(* next_track_id_write)(struct media_player *player, int err, uint64_t id)
Next Track Object ID write callback.
Definition media_proxy.h:650
void(* content_ctrl_id_recv)(struct media_player *player, int err, uint8_t ccid)
Content Control ID receive callback.
Definition media_proxy.h:842
void(* seeking_speed_recv)(struct media_player *player, int err, int8_t speed)
Seeking Speed receive callback.
Definition media_proxy.h:583
void(* parent_group_id_recv)(struct media_player *player, int err, uint64_t id)
Parent Group Object ID receive callback.
Definition media_proxy.h:663
void(* icon_url_recv)(struct media_player *player, int err, const char *url)
Media Player Icon URL receive callback.
Definition media_proxy.h:479
void(* track_position_write)(struct media_player *player, int err, int32_t position)
Track Position write callback.
Definition media_proxy.h:543
void(* next_track_id_recv)(struct media_player *player, int err, uint64_t id)
Next Track Object ID receive callback.
Definition media_proxy.h:637
void(* playback_speed_recv)(struct media_player *player, int err, int8_t speed)
Playback Speed receive callback.
Definition media_proxy.h:557
void(* current_track_id_write)(struct media_player *player, int err, uint64_t id)
Current Track Object ID write callback.
Definition media_proxy.h:623
void(* playing_order_write)(struct media_player *player, int err, uint8_t order)
Playing Order write callback.
Definition media_proxy.h:717
void(* track_position_recv)(struct media_player *player, int err, int32_t position)
Track Position receive callback.
Definition media_proxy.h:530
void(* playing_orders_supported_recv)(struct media_player *player, int err, uint16_t orders)
Playing Orders Supported receive callback.
Definition media_proxy.h:730
void(* current_group_id_recv)(struct media_player *player, int err, uint64_t id)
Current Group Object ID receive callback.
Definition media_proxy.h:677
void(* track_duration_recv)(struct media_player *player, int err, int32_t duration)
Track Duration receive callback.
Definition media_proxy.h:516
void(* command_send)(struct media_player *player, int err, const struct mpl_cmd *cmd)
Command send callback.
Definition media_proxy.h:758
void(* command_recv)(struct media_player *player, int err, const struct mpl_cmd_ntf *result)
Command result receive callback.
Definition media_proxy.h:771
void(* playing_order_recv)(struct media_player *player, int err, uint8_t order)
Playing Order receive callback.
Definition media_proxy.h:704
void(* player_name_recv)(struct media_player *player, int err, const char *name)
Media Player Name receive callback.
Definition media_proxy.h:453
void(* current_track_id_recv)(struct media_player *player, int err, uint64_t id)
Current Track Object ID receive callback.
Definition media_proxy.h:610
void(* track_segments_id_recv)(struct media_player *player, int err, uint64_t id)
Track Segments Object ID receive callback.
Definition media_proxy.h:596
void(* icon_id_recv)(struct media_player *player, int err, uint64_t id)
Media Player Icon Object ID receive callback.
Definition media_proxy.h:466
void(* track_title_recv)(struct media_player *player, int err, const char *title)
Track Title receive callback.
Definition media_proxy.h:503
void(* current_group_id_write)(struct media_player *player, int err, uint64_t id)
Current Group Object ID write callback.
Definition media_proxy.h:690
void(* media_state_recv)(struct media_player *player, int err, uint8_t state)
Media State receive callback.
Definition media_proxy.h:745
void(* playback_speed_write)(struct media_player *player, int err, int8_t speed)
Playback Speed write callback.
Definition media_proxy.h:570
void(* track_changed_recv)(struct media_player *player, int err)
Track changed receive callback.
Definition media_proxy.h:490
void(* search_send)(struct media_player *player, int err, const struct mpl_search *search)
Search send callback.
Definition media_proxy.h:798
void(* search_results_id_recv)(struct media_player *player, int err, uint64_t id)
Search Results Object ID receive callback See also media_proxy_ctrl_get_search_results_id()
Definition media_proxy.h:829
void(* local_player_instance)(struct media_player *player, int err)
Media Player Instance callback.
Definition media_proxy.h:425
Available calls in a player, that the media proxy can call.
Definition media_proxy.h:1272
void(* set_track_position)(int32_t position)
Set Track Position.
Definition media_proxy.h:1342
int32_t(* get_track_position)(void)
Read Track Position.
Definition media_proxy.h:1329
uint64_t(* get_parent_group_id)(void)
Read Parent Group Object ID.
Definition media_proxy.h:1463
int32_t(* get_track_duration)(void)
Read Track Duration.
Definition media_proxy.h:1318
void(* send_search)(const struct mpl_search *search)
Set Search.
Definition media_proxy.h:1557
void(* set_current_track_id)(uint64_t id)
Set Current Track Object ID.
Definition media_proxy.h:1429
void(* set_current_group_id)(uint64_t id)
Set Current Group Object ID.
Definition media_proxy.h:1486
uint8_t(* get_content_ctrl_id)(void)
Read Content Control ID.
Definition media_proxy.h:1582
uint8_t(* get_media_state)(void)
Read Media State.
Definition media_proxy.h:1524
void(* set_playback_speed)(int8_t speed)
Set Playback Speed.
Definition media_proxy.h:1377
uint64_t(* get_current_track_id)(void)
Read Current Track Object ID.
Definition media_proxy.h:1419
uint64_t(* get_track_segments_id)(void)
Read Current Track Segments Object ID.
Definition media_proxy.h:1406
uint8_t(* get_playing_order)(void)
Read Playing Order.
Definition media_proxy.h:1493
uint64_t(* get_current_group_id)(void)
Read Current Group Object ID.
Definition media_proxy.h:1476
uint16_t(* get_playing_orders_supported)(void)
Read Playing Orders Supported.
Definition media_proxy.h:1514
void(* send_command)(const struct mpl_cmd *command)
Send Command.
Definition media_proxy.h:1535
void(* set_next_track_id)(uint64_t id)
Set Next Track Object ID.
Definition media_proxy.h:1448
uint64_t(* get_icon_id)(void)
Read Icon Object ID.
Definition media_proxy.h:1292
void(* set_playing_order)(uint8_t order)
Set Playing Order.
Definition media_proxy.h:1503
uint64_t(* get_search_results_id)(void)
Read Search Results Object ID.
Definition media_proxy.h:1571
uint32_t(* get_commands_supported)(void)
Read Commands Supported.
Definition media_proxy.h:1546
int8_t(* get_playback_speed)(void)
Get Playback Speed.
Definition media_proxy.h:1359
int8_t(* get_seeking_speed)(void)
Get Seeking Speed.
Definition media_proxy.h:1393
uint64_t(* get_next_track_id)(void)
Read Next Track Object ID.
Definition media_proxy.h:1439
Media command notification.
Definition media_proxy.h:73
uint8_t result_code
The result of the operation
Definition media_proxy.h:77
uint8_t requested_opcode
The opcode that was sent.
Definition media_proxy.h:75
Media player command.
Definition media_proxy.h:61
uint8_t opcode
The opcode.
Definition media_proxy.h:63
bool use_param
Whether or not the mpl_cmd::param is used.
Definition media_proxy.h:65
int32_t param
A 32-bit signed parameter.
Definition media_proxy.h:67
Search control item.
Definition media_proxy.h:83
uint8_t type
MEDIA_PROXY_SEARCH_TYPE_<...>
Definition media_proxy.h:85
uint8_t len
Length of type and parameter.
Definition media_proxy.h:84
char param[62]
Search parameter.
Definition media_proxy.h:86
Search.
Definition media_proxy.h:92
uint8_t len
The length of the mpl_search::search value.
Definition media_proxy.h:94
char search[64]
Concatenated search control items - (type, length, param)
Definition media_proxy.h:96
Macro utilities.