forked from enlightenment/efl
efl_player: split off audio related properties
Summary: this commit moves the audio related properties from Efl.Player to Efl.Player_Audio. Reviewers: zmike, Jaehyun_Cho Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7877 Differential Revision: https://phab.enlightenment.org/D10106
This commit is contained in:
parent
b3adcff0df
commit
5e9e33dd91
|
@ -132,6 +132,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
|
||||||
#include "interfaces/efl_part.eo.h"
|
#include "interfaces/efl_part.eo.h"
|
||||||
#include "interfaces/efl_playable.eo.h"
|
#include "interfaces/efl_playable.eo.h"
|
||||||
#include "interfaces/efl_player.eo.h"
|
#include "interfaces/efl_player.eo.h"
|
||||||
|
#include "interfaces/efl_audio_control.eo.h"
|
||||||
#include "interfaces/efl_text.eo.h"
|
#include "interfaces/efl_text.eo.h"
|
||||||
#include "interfaces/efl_text_types.eot.h"
|
#include "interfaces/efl_text_types.eot.h"
|
||||||
#include "interfaces/efl_ui_i18n.eo.h"
|
#include "interfaces/efl_ui_i18n.eo.h"
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
interface @beta Efl.Audio_Control extends Efl.Player
|
||||||
|
{
|
||||||
|
[[Player interface for audio related properties]]
|
||||||
|
methods {
|
||||||
|
@property volume {
|
||||||
|
[[Control the audio volume.
|
||||||
|
|
||||||
|
Controls the audio volume of the stream being played. This has
|
||||||
|
nothing to do with the system volume. This volume will be
|
||||||
|
multiplied by the system volume. e.g.: if the current volume
|
||||||
|
level is 0.5, and the system volume is 50%, it will be
|
||||||
|
0.5 * 0.5 = 0.25.
|
||||||
|
]]
|
||||||
|
set {
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
volume: double; [[The volume level]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@property mute {
|
||||||
|
[[This property controls the audio mute state.]]
|
||||||
|
set {
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
mute: bool; [[The mute state. $true or $false.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -19,6 +19,7 @@
|
||||||
#include "interfaces/efl_part.eo.c"
|
#include "interfaces/efl_part.eo.c"
|
||||||
#include "interfaces/efl_playable.eo.c"
|
#include "interfaces/efl_playable.eo.c"
|
||||||
#include "interfaces/efl_player.eo.c"
|
#include "interfaces/efl_player.eo.c"
|
||||||
|
#include "interfaces/efl_audio_control.eo.c"
|
||||||
#include "interfaces/efl_text.eo.c"
|
#include "interfaces/efl_text.eo.c"
|
||||||
#include "interfaces/efl_text_font.eo.c"
|
#include "interfaces/efl_text_font.eo.c"
|
||||||
#include "interfaces/efl_text_style.eo.c"
|
#include "interfaces/efl_text_style.eo.c"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
interface @beta Efl.Player
|
interface @beta Efl.Player
|
||||||
{
|
{
|
||||||
[[Efl media player interface]]
|
[[Efl media player interface]]
|
||||||
|
c_prefix: efl_player;
|
||||||
methods {
|
methods {
|
||||||
start {
|
start {
|
||||||
[[Start a playing playable object.]]
|
[[Start a playing playable object.]]
|
||||||
|
@ -74,33 +75,6 @@ interface @beta Efl.Player
|
||||||
speed: double; [[The play speed in the [0, infinity) range.]]
|
speed: double; [[The play speed in the [0, infinity) range.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@property volume {
|
|
||||||
[[Control the audio volume.
|
|
||||||
|
|
||||||
Controls the audio volume of the stream being played. This has
|
|
||||||
nothing to do with the system volume. This volume will be
|
|
||||||
multiplied by the system volume. e.g.: if the current volume
|
|
||||||
level is 0.5, and the system volume is 50%, it will be
|
|
||||||
0.5 * 0.5 = 0.25.
|
|
||||||
]]
|
|
||||||
set {
|
|
||||||
}
|
|
||||||
get {
|
|
||||||
}
|
|
||||||
values {
|
|
||||||
volume: double; [[The volume level]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@property mute {
|
|
||||||
[[This property controls the audio mute state.]]
|
|
||||||
set {
|
|
||||||
}
|
|
||||||
get {
|
|
||||||
}
|
|
||||||
values {
|
|
||||||
mute: bool; [[The mute state. $true or $false.]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@property length {
|
@property length {
|
||||||
[[Get the length of play for the media file.]]
|
[[Get the length of play for the media file.]]
|
||||||
get {
|
get {
|
||||||
|
|
|
@ -42,6 +42,7 @@ pub_eo_files = [
|
||||||
'efl_gfx_image_load_controller.eo',
|
'efl_gfx_image_load_controller.eo',
|
||||||
'efl_part.eo',
|
'efl_part.eo',
|
||||||
'efl_player.eo',
|
'efl_player.eo',
|
||||||
|
'efl_audio_control.eo',
|
||||||
'efl_text.eo',
|
'efl_text.eo',
|
||||||
'efl_text_font.eo',
|
'efl_text_font.eo',
|
||||||
'efl_text_style.eo',
|
'efl_text_style.eo',
|
||||||
|
|
|
@ -474,25 +474,25 @@ elm_video_file_get(Eo *obj, const char **filename)
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_video_audio_level_set(Evas_Object *obj, double volume)
|
elm_video_audio_level_set(Evas_Object *obj, double volume)
|
||||||
{
|
{
|
||||||
efl_player_volume_set(obj, volume);
|
efl_audio_control_volume_set(obj, volume);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI double
|
EAPI double
|
||||||
elm_video_audio_level_get(const Evas_Object *obj)
|
elm_video_audio_level_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
return efl_player_volume_get(obj);
|
return efl_audio_control_volume_get(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_video_audio_mute_set(Evas_Object *obj, Eina_Bool mute)
|
elm_video_audio_mute_set(Evas_Object *obj, Eina_Bool mute)
|
||||||
{
|
{
|
||||||
efl_player_mute_set(obj, mute);
|
efl_audio_control_mute_set(obj, mute);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
elm_video_audio_mute_get(const Evas_Object *obj)
|
elm_video_audio_mute_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
return efl_player_mute_get(obj);
|
return efl_audio_control_mute_get(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI double
|
EAPI double
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class @beta Efl.Canvas.Video extends Efl.Canvas.Group
|
class @beta Efl.Canvas.Video extends Efl.Canvas.Group
|
||||||
implements Efl.File, Efl.Player, Efl.Gfx.Image, Efl.Gfx.Image_Load_Controller
|
implements Efl.File, Efl.Audio_Control, Efl.Gfx.Image, Efl.Gfx.Image_Load_Controller
|
||||||
{
|
{
|
||||||
[[Efl canvas video class]]
|
[[Efl canvas video class]]
|
||||||
methods {
|
methods {
|
||||||
|
@ -10,7 +10,7 @@ class @beta Efl.Canvas.Video extends Efl.Canvas.Group
|
||||||
emotion object.
|
emotion object.
|
||||||
|
|
||||||
Please don't use this function, consider using
|
Please don't use this function, consider using
|
||||||
@Efl.Player.mute instead.
|
@Efl.Audio_Control.mute instead.
|
||||||
]]
|
]]
|
||||||
set {
|
set {
|
||||||
}
|
}
|
||||||
|
@ -59,8 +59,8 @@ class @beta Efl.Canvas.Video extends Efl.Canvas.Group
|
||||||
Efl.Player.play { get; set; }
|
Efl.Player.play { get; set; }
|
||||||
Efl.Player.pos { get; set; }
|
Efl.Player.pos { get; set; }
|
||||||
Efl.Player.progress { get; }
|
Efl.Player.progress { get; }
|
||||||
Efl.Player.volume { get; set; }
|
Efl.Audio_Control.volume { get; set; }
|
||||||
Efl.Player.mute { get; set; }
|
Efl.Audio_Control.mute { get; set; }
|
||||||
Efl.Player.length { get; }
|
Efl.Player.length { get; }
|
||||||
Efl.Player.seekable { get; }
|
Efl.Player.seekable { get; }
|
||||||
Efl.Gfx.Image_Load_Controller.load_size { get; }
|
Efl.Gfx.Image_Load_Controller.load_size { get; }
|
||||||
|
|
|
@ -830,11 +830,11 @@ emotion_object_event_simple_send(Evas_Object *obj, Emotion_Event ev)
|
||||||
EAPI void
|
EAPI void
|
||||||
emotion_object_audio_volume_set(Evas_Object *obj, double vol)
|
emotion_object_audio_volume_set(Evas_Object *obj, double vol)
|
||||||
{
|
{
|
||||||
efl_player_volume_set(obj, vol);
|
efl_audio_control_volume_set(obj, vol);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_efl_canvas_video_efl_player_volume_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, double vol)
|
_efl_canvas_video_efl_audio_control_volume_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, double vol)
|
||||||
{
|
{
|
||||||
DBG("vol=%f", vol);
|
DBG("vol=%f", vol);
|
||||||
if (!sd->engine_instance) return;
|
if (!sd->engine_instance) return;
|
||||||
|
@ -844,11 +844,11 @@ _efl_canvas_video_efl_player_volume_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Da
|
||||||
EAPI double
|
EAPI double
|
||||||
emotion_object_audio_volume_get(const Evas_Object *obj)
|
emotion_object_audio_volume_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
return efl_player_volume_get(obj);
|
return efl_audio_control_volume_get(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static double
|
EOLIAN static double
|
||||||
_efl_canvas_video_efl_player_volume_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
|
_efl_canvas_video_efl_audio_control_volume_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
|
||||||
{
|
{
|
||||||
if (!sd->engine_instance) return 0.0;
|
if (!sd->engine_instance) return 0.0;
|
||||||
return emotion_engine_instance_audio_channel_volume_get(sd->engine_instance);
|
return emotion_engine_instance_audio_channel_volume_get(sd->engine_instance);
|
||||||
|
@ -857,11 +857,11 @@ _efl_canvas_video_efl_player_volume_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Vi
|
||||||
EAPI void
|
EAPI void
|
||||||
emotion_object_audio_mute_set(Evas_Object *obj, Eina_Bool mute)
|
emotion_object_audio_mute_set(Evas_Object *obj, Eina_Bool mute)
|
||||||
{
|
{
|
||||||
efl_player_mute_set(obj, mute);
|
efl_audio_control_mute_set(obj, mute);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_efl_canvas_video_efl_player_mute_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, Eina_Bool mute)
|
_efl_canvas_video_efl_audio_control_mute_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, Eina_Bool mute)
|
||||||
{
|
{
|
||||||
DBG("mute=" FMT_UCHAR, mute);
|
DBG("mute=" FMT_UCHAR, mute);
|
||||||
if (!sd->engine_instance) return;
|
if (!sd->engine_instance) return;
|
||||||
|
@ -871,11 +871,11 @@ _efl_canvas_video_efl_player_mute_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
emotion_object_audio_mute_get(const Evas_Object *obj)
|
emotion_object_audio_mute_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
return efl_player_mute_get(obj);
|
return efl_audio_control_mute_get(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Eina_Bool
|
EOLIAN static Eina_Bool
|
||||||
_efl_canvas_video_efl_player_mute_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
|
_efl_canvas_video_efl_audio_control_mute_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
|
||||||
{
|
{
|
||||||
if (!sd->engine_instance) return EINA_FALSE;
|
if (!sd->engine_instance) return EINA_FALSE;
|
||||||
return emotion_engine_instance_audio_channel_mute_get(sd->engine_instance);
|
return emotion_engine_instance_audio_channel_mute_get(sd->engine_instance);
|
||||||
|
|
Loading…
Reference in New Issue