mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-07 16:59:25 +00:00
sound: Use default message handler if possible
red_channel_client_handle_message can handle base messages so reuse it. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
6be1c2f839
commit
cd82c9f698
@ -319,18 +319,6 @@ static int snd_record_handle_write(RecordChannelClient *record_client, size_t si
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int
|
||||
playback_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, uint16_t type, void *message)
|
||||
{
|
||||
switch (type) {
|
||||
case SPICE_MSGC_DISCONNECTING:
|
||||
break;
|
||||
default:
|
||||
return red_channel_client_handle_message(rcc, size, type, message);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int
|
||||
record_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, uint16_t type, void *message)
|
||||
{
|
||||
@ -368,8 +356,6 @@ record_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, uint16_t type
|
||||
record_client->start_time = mark->time;
|
||||
break;
|
||||
}
|
||||
case SPICE_MSGC_DISCONNECTING:
|
||||
break;
|
||||
default:
|
||||
return red_channel_client_handle_message(rcc, size, type, message);
|
||||
}
|
||||
@ -1427,7 +1413,7 @@ playback_channel_class_init(PlaybackChannelClass *klass)
|
||||
object_class->constructed = playback_channel_constructed;
|
||||
|
||||
channel_class->parser = spice_get_client_channel_parser(SPICE_CHANNEL_PLAYBACK, NULL);
|
||||
channel_class->handle_parsed = playback_channel_handle_parsed;
|
||||
channel_class->handle_parsed = red_channel_client_handle_message;
|
||||
channel_class->send_item = playback_channel_send_item;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user