13#ifndef ZEPHYR_INCLUDE_MPIPE_UTILS_MPIPE_PLAYER_H_
14#define ZEPHYR_INCLUDE_MPIPE_UTILS_MPIPE_PLAYER_H_
50struct mpipe_player_cmd_msg {
68 char cmd_buf[CONFIG_MPIPE_PLAYER_CMD_QUEUE_DEPTH *
sizeof(
struct mpipe_player_cmd_msg)];
static void cmd(uint32_t command)
Execute a display list command by co-processor engine.
Definition ft8xx_reference_api.h:153
int mpipe_player_init(struct mpipe_player *player, struct mpipe *pipeline)
Initialize a player and start its worker thread.
int mpipe_player_replay(struct mpipe_player *player)
Restart playback from the beginning.
int mpipe_player_deinit(struct mpipe_player *player)
Wait for the worker to exit and release the player's resources.
int mpipe_player_wait_quit(struct mpipe_player *player)
Block until the player worker exits.
int mpipe_player_play(struct mpipe_player *player)
Request PLAYING.
int mpipe_player_stop(struct mpipe_player *player)
Request READY.
int mpipe_player_pause(struct mpipe_player *player)
Request PAUSED.
int mpipe_player_toggle(struct mpipe_player *player)
Toggle between PLAYING and PAUSED.
int mpipe_player_quit(struct mpipe_player *player)
Ask the worker to stop the pipeline and exit.
Bus message: what an element reports to the application.
Pipeline: the top-level bin that runs a graph.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Message Queue Structure.
Definition kernel.h:5259
Semaphore structure.
Definition kernel.h:3738
Thread Structure.
Definition thread.h:258
Message structure carrying type and origin of the message.
Definition mpipe_message.h:109
Player instance.
Definition mpipe_player.h:62
uint8_t run_id
Run counter, bumped by the worker each time a run starts.
Definition mpipe_player.h:70
struct mpipe * pipeline
Controlled pipeline.
Definition mpipe_player.h:64
struct k_thread worker
Worker thread control block.
Definition mpipe_player.h:74
struct k_msgq cmd_q
Command queue feeding the worker thread.
Definition mpipe_player.h:66
struct k_sem exited
Signaled by the worker just before it exits.
Definition mpipe_player.h:76
char cmd_buf[CONFIG_MPIPE_PLAYER_CMD_QUEUE_DEPTH *sizeof(struct mpipe_player_cmd_msg)]
Backing buffer for the command queue.
Definition mpipe_player.h:68
struct mpipe_message last_error
Last error the bus listener saw, reported by the worker.
Definition mpipe_player.h:72
A pipeline: the top-level bin that runs a graph.
Definition mpipe_pipeline.h:75