mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-08 22:10:46 +00:00
streaming: Restart streams on video-codec changes
Interrupt the video streams when the user changes the preferred video-codecs (dcc_handle_preferred_video_codec_type) or when the host admin updates the list of video-codecs allowed (display_channel_set_video_codecs). The video streaming will be automatically restarted by spice video-detection rules. Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
3e299cede8
commit
4000846c01
@ -1193,6 +1193,8 @@ static int dcc_handle_preferred_video_codec_type(DisplayChannelClient *dcc,
|
||||
|
||||
/* New client preference */
|
||||
dcc_update_preferred_video_codecs(dcc);
|
||||
video_stream_detach_and_stop(DCC_TO_DC(dcc));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@ -255,6 +255,8 @@ void display_channel_set_video_codecs(DisplayChannel *display, GArray *video_cod
|
||||
g_clear_pointer(&display->priv->video_codecs, g_array_unref);
|
||||
display->priv->video_codecs = g_array_ref(video_codecs);
|
||||
g_object_notify(G_OBJECT(display), "video-codecs");
|
||||
|
||||
video_stream_detach_and_stop(display);
|
||||
}
|
||||
|
||||
GArray *display_channel_get_video_codecs(DisplayChannel *display)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user