Skip to content
Snippets Groups Projects
Commit 8934e84d authored by Stepan Salenikovich's avatar Stepan Salenikovich Committed by Guillaume Roguez
Browse files

gnome: fix video on slower machines

By lowering the priority of the g_timeout which draws new frames.

Refs #71359

Change-Id: I6510a1946be995fdc5b57bfd228efa92f46f84bc
parent eafc3dd8
Branches
Tags
No related merge requests found
...@@ -216,8 +216,16 @@ video_widget_init(VideoWidget *self) ...@@ -216,8 +216,16 @@ video_widget_init(VideoWidget *self)
clutter_actor_set_opacity(priv->local->actor, clutter_actor_set_opacity(priv->local->actor,
VIDEO_LOCAL_OPACITY_DEFAULT); VIDEO_LOCAL_OPACITY_DEFAULT);
/* init frame queues and the timeout sources to check them */ /* Init the timeout source which will check the for new frames.
priv->frame_timeout_source = g_timeout_add(FRAME_RATE_PERIOD, (GSourceFunc)check_frame_queue, self); * The priority must be lower than GTK drawing events
* (G_PRIORITY_HIGH_IDLE + 20) so that this timeout source doesn't choke
* the main loop on slower machines.
*/
priv->frame_timeout_source = g_timeout_add_full(G_PRIORITY_DEFAULT_IDLE,
FRAME_RATE_PERIOD,
(GSourceFunc)check_frame_queue,
self,
NULL);
/* handle button event */ /* handle button event */
g_signal_connect(GTK_WIDGET(self), "button-press-event", G_CALLBACK(on_button_press_in_screen_event), NULL); g_signal_connect(GTK_WIDGET(self), "button-press-event", G_CALLBACK(on_button_press_in_screen_event), NULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment