From b21d5d023913335eaccfb81d21e41bacd2999370 Mon Sep 17 00:00:00 2001 From: Alastair Poole Date: Fri, 24 Jan 2020 12:41:25 +0000 Subject: [PATCH] video: keep track of volume setting. Ensure we retain volume setting between audio/video. gstreamer was resetting the volume on video change. --- src/bin/video.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bin/video.c b/src/bin/video.c index 09a7a17..df72693 100644 --- a/src/bin/video.c +++ b/src/bin/video.c @@ -18,6 +18,7 @@ struct _Video const char *artfile; Ecore_Exe *exe; Ecore_Event_Handler *exe_handler; + double volume; int w, h; int iw, ih, piw, pih, tw, th; int resizes; @@ -723,6 +724,10 @@ video_play_set(Evas_Object *obj, Eina_Bool play) { Video *sd = evas_object_smart_data_get(obj); if (!sd) return; + + if (sd->volume) + video_volume_set(obj, sd->volume); + emotion_object_play_set(sd->o_vid, play); } @@ -892,6 +897,7 @@ video_volume_set(Evas_Object *obj, double vol) Video *sd = evas_object_smart_data_get(obj); if (!sd) return; emotion_object_audio_volume_set(sd->o_vid, vol); + sd->volume = vol; evas_object_smart_callback_call(obj, "audio", NULL); }