[player/raop] Trigger the SPEAKER event if device verification

succeeded/failed
This commit is contained in:
chme 2017-11-18 09:54:57 +01:00 committed by ejurgensen
parent 24782f5d45
commit 1689182432
3 changed files with 17 additions and 0 deletions

View File

@ -1773,6 +1773,9 @@ raop_status(struct raop_session *rs)
rs->status_cb = NULL;
if (status_cb)
status_cb(rs->device, rs->output_session, state);
if (rs->state == RAOP_STATE_UNVERIFIED)
player_speaker_status_trigger();
}
static void
@ -4160,6 +4163,8 @@ raop_cb_verification_verify_step2(struct evrtsp_request *req, void *arg)
raop_send_req_options(rs, raop_cb_startup_options);
player_speaker_status_trigger();
return;
error:

View File

@ -2364,6 +2364,15 @@ playback_pause(void *arg, int *retval)
return COMMAND_END;
}
/*
* Notify of speaker/device changes (other than activation/deactivation)
*/
void
player_speaker_status_trigger(void)
{
listener_notify(LISTENER_SPEAKER);
}
static enum command_state
speaker_enumerate(void *arg, int *retval)
{

View File

@ -88,6 +88,9 @@ player_speaker_enumerate(spk_enum_cb cb, void *arg);
int
player_speaker_set(uint64_t *ids);
void
player_speaker_status_trigger(void);
int
player_playback_start(void);