forked from enlightenment/efl
emotion - audio volume - leave as-is on file open/init
this fixes gst and gst1 modules to leave volume be on start. generic can't really query easily, so just set to 0.8 by default, and xine is already just fine. do this because back-ends seems to have a habit of setting master volume, not per-app volume. @fix
This commit is contained in:
parent
b7afdc80ec
commit
6ed29b4425
|
@ -1030,7 +1030,7 @@ em_add(const Emotion_Engine *api, Evas_Object *obj, const Emotion_Module_Options
|
|||
ev->fd_read = NULL;
|
||||
ev->fd_write = NULL;
|
||||
ev->speed = 1.0;
|
||||
ev->volume = 1.0;
|
||||
ev->volume = 0.8;
|
||||
ev->audio_mute = EINA_FALSE;
|
||||
ev->cmd.type = -1;
|
||||
|
||||
|
|
|
@ -1787,7 +1787,9 @@ _emotion_gstreamer_video_pipeline_parse(Emotion_Gstreamer_Video *ev,
|
|||
GstQuery *query;
|
||||
const GValue *val;
|
||||
gchar *str;
|
||||
|
||||
gboolean mute = 0;
|
||||
gdouble vol = 0.0;
|
||||
|
||||
gdouble length_time = 0.0;
|
||||
gint width;
|
||||
gint height;
|
||||
|
@ -1987,8 +1989,10 @@ _emotion_gstreamer_video_pipeline_parse(Emotion_Gstreamer_Video *ev,
|
|||
|
||||
ev->pipeline_parsed = EINA_TRUE;
|
||||
|
||||
em_audio_channel_volume_set(ev, ev->volume);
|
||||
em_audio_channel_mute_set(ev, ev->audio_mute);
|
||||
g_object_get(ev->pipeline, "volume", &vol, NULL);
|
||||
g_object_get(ev->pipeline, "mute", &mute, NULL);
|
||||
ev->volume = vol;
|
||||
ev->audio_mute = mute;
|
||||
|
||||
if (ev->play_started)
|
||||
{
|
||||
|
|
|
@ -100,6 +100,8 @@ em_file_open(void *video,
|
|||
Emotion_Gstreamer *ev = video;
|
||||
char *uri;
|
||||
char *suburi = NULL;
|
||||
gboolean mute = 0;
|
||||
gdouble vol = 0.0;
|
||||
|
||||
if (!file) return EINA_FALSE;
|
||||
|
||||
|
@ -125,8 +127,10 @@ em_file_open(void *video,
|
|||
if (!ev->pipeline)
|
||||
return EINA_FALSE;
|
||||
|
||||
em_audio_channel_volume_set(ev, ev->volume);
|
||||
em_audio_channel_mute_set(ev, ev->audio_mute);
|
||||
g_object_get(ev->pipeline, "volume", &vol, NULL);
|
||||
g_object_get(ev->pipeline, "mute", &mute, NULL);
|
||||
ev->volume = vol;
|
||||
ev->audio_mute = mute;
|
||||
|
||||
ev->position = 0.0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue