mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
remote: notify error
Don't fail on errors but emit a signal
This commit is contained in:
parent
f3dfe61aa0
commit
ea739df26f
3 changed files with 6 additions and 1 deletions
|
|
@ -530,6 +530,7 @@ struct pw_proxy {
|
|||
#define pw_remote_events_info_changed(r,i) pw_remote_events_emit(r, info_changed, 0, i)
|
||||
#define pw_remote_events_sync_reply(r,s) pw_remote_events_emit(r, sync_reply, 0, s)
|
||||
#define pw_remote_events_state_changed(r,o,s,e) pw_remote_events_emit(r, state_changed, 0, o, s, e)
|
||||
#define pw_remote_events_error(r,i,res,e) pw_remote_events_emit(r, error, 0, i, res, e)
|
||||
|
||||
struct pw_remote {
|
||||
struct pw_core *core; /**< core */
|
||||
|
|
|
|||
|
|
@ -189,7 +189,9 @@ static void core_event_done(void *data, uint32_t seq)
|
|||
static void core_event_error(void *data, uint32_t id, int res, const char *error, ...)
|
||||
{
|
||||
struct pw_remote *this = data;
|
||||
pw_remote_update_state(this, PW_REMOTE_STATE_ERROR, error);
|
||||
pw_log_warn("remote %p: got error %d, %d (%s): %s", this,
|
||||
id, res, spa_strerror(res), error);
|
||||
pw_remote_events_error(this, id, res, error);
|
||||
}
|
||||
|
||||
static void core_event_remove_id(void *data, uint32_t id)
|
||||
|
|
|
|||
|
|
@ -136,6 +136,8 @@ struct pw_remote_events {
|
|||
/** emited when the state changes */
|
||||
void (*state_changed) (void *data, enum pw_remote_state old,
|
||||
enum pw_remote_state state, const char *error);
|
||||
/** emited when an error was reported */
|
||||
void (*error) (void *data, uint32_t id, int res, const char *error);
|
||||
};
|
||||
|
||||
/** Specify the name of the protocol to use, default is using the native protocol */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue