mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-12 13:30:15 -05:00
stream: add event to notify commands
This commit is contained in:
parent
1cacb64b19
commit
dfa3f631ec
2 changed files with 5 additions and 6 deletions
|
|
@ -557,14 +557,10 @@ static int impl_send_command(void *object, const struct spa_command *command)
|
|||
stream_set_state(stream, PW_STREAM_STATE_STREAMING, NULL);
|
||||
}
|
||||
break;
|
||||
case SPA_NODE_COMMAND_ParamBegin:
|
||||
case SPA_NODE_COMMAND_ParamEnd:
|
||||
break;
|
||||
default:
|
||||
pw_log_warn("%p: unhandled node command %d", stream,
|
||||
SPA_NODE_COMMAND_ID(command));
|
||||
break;
|
||||
}
|
||||
pw_stream_emit_command(stream, command);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ struct pw_time {
|
|||
/** Events for a stream. These events are always called from the mainloop
|
||||
* unless explicitly documented otherwise. */
|
||||
struct pw_stream_events {
|
||||
#define PW_VERSION_STREAM_EVENTS 0
|
||||
#define PW_VERSION_STREAM_EVENTS 1
|
||||
uint32_t version;
|
||||
|
||||
void (*destroy) (void *data);
|
||||
|
|
@ -238,6 +238,9 @@ struct pw_stream_events {
|
|||
|
||||
/** The stream is drained */
|
||||
void (*drained) (void *data);
|
||||
|
||||
/** A command notify, Since 0.3.39:1 */
|
||||
void (*command) (void *data, const struct spa_command *command);
|
||||
};
|
||||
|
||||
/** Convert a stream state to a readable string */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue