summaryrefslogtreecommitdiff
path: root/src/lib/emotion
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2015-04-17 16:08:56 +0100
committerTom Hacohen <tom@stosb.com>2015-05-06 18:22:22 +0100
commitacd4ace06c45b858a8017267253dbbe7fc61c73b (patch)
tree73b703b880a599f4a9c60a4523d6b6bdd2742c78 /src/lib/emotion
parente8c4c3c2589b19272e1e5a0c7b6c3168127b1d52 (diff)
Emotion: Migrate some more of emotion to Eo/efl.player.
Diffstat (limited to 'src/lib/emotion')
-rw-r--r--src/lib/emotion/emotion_object.eo6
-rw-r--r--src/lib/emotion/emotion_smart.c30
2 files changed, 21 insertions, 15 deletions
diff --git a/src/lib/emotion/emotion_object.eo b/src/lib/emotion/emotion_object.eo
index 3fe8fffbcc..9749d1193a 100644
--- a/src/lib/emotion/emotion_object.eo
+++ b/src/lib/emotion/emotion_object.eo
@@ -74,6 +74,8 @@ class Emotion.Object (Evas.Object_Smart, Efl.File, Efl.Player, Efl.Image) {
74 Efl.Player.audio_volume.get; 74 Efl.Player.audio_volume.get;
75 Efl.Player.audio_mute.set; 75 Efl.Player.audio_mute.set;
76 Efl.Player.audio_mute.get; 76 Efl.Player.audio_mute.get;
77 Efl.Player.length.get;
78 Efl.Player.seekable.get;
77 Efl.Image.load_size.get; 79 Efl.Image.load_size.get;
78 Efl.Image.ratio.get; 80 Efl.Image.ratio.get;
79 Efl.Image.smooth_scale.set; 81 Efl.Image.smooth_scale.set;
@@ -104,11 +106,7 @@ class Emotion.Object (Evas.Object_Smart, Efl.File, Efl.Player, Efl.Image) {
104 106
105/* FIXME: Need to be added: 107/* FIXME: Need to be added:
106EAPI double emotion_object_buffer_size_get (const Evas_Object *obj); 108EAPI double emotion_object_buffer_size_get (const Evas_Object *obj);
107EAPI Eina_Bool emotion_object_seekable_get (const Evas_Object *obj);
108EAPI double emotion_object_play_length_get (const Evas_Object *obj);
109EAPI const char *emotion_object_progress_info_get (const Evas_Object *obj); 109EAPI const char *emotion_object_progress_info_get (const Evas_Object *obj);
110EAPI Eina_Bool emotion_object_video_handled_get (const Evas_Object *obj);
111EAPI Eina_Bool emotion_object_audio_handled_get (const Evas_Object *obj);
112 110
113Everything starting from (needs to be added): 111Everything starting from (needs to be added):
114EAPI int emotion_object_audio_channel_count (const Evas_Object *obj); 112EAPI int emotion_object_audio_channel_count (const Evas_Object *obj);
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c
index 4d8b4df720..8cf589903d 100644
--- a/src/lib/emotion/emotion_smart.c
+++ b/src/lib/emotion/emotion_smart.c
@@ -733,11 +733,8 @@ emotion_object_buffer_size_get(const Evas_Object *obj)
733EAPI Eina_Bool 733EAPI Eina_Bool
734emotion_object_seekable_get(const Evas_Object *obj) 734emotion_object_seekable_get(const Evas_Object *obj)
735{ 735{
736 Emotion_Object_Data *sd; 736 Eina_Bool ret;
737 737 return eo_do_ret(obj, ret, efl_player_seekable_get());
738 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
739 if (!sd->engine_instance) return EINA_FALSE;
740 return emotion_engine_instance_seekable(sd->engine_instance);
741} 738}
742 739
743EAPI Eina_Bool 740EAPI Eina_Bool
@@ -763,12 +760,8 @@ emotion_object_audio_handled_get(const Evas_Object *obj)
763EAPI double 760EAPI double
764emotion_object_play_length_get(const Evas_Object *obj) 761emotion_object_play_length_get(const Evas_Object *obj)
765{ 762{
766 Emotion_Object_Data *sd; 763 double ret;
767 764 return eo_do_ret(obj, ret, efl_player_length_get());
768 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0.0);
769 if (!sd->engine_instance) return 0.0;
770 sd->len = emotion_engine_instance_len_get(sd->engine_instance);
771 return sd->len;
772} 765}
773 766
774EAPI void 767EAPI void
@@ -1185,6 +1178,21 @@ _emotion_object_efl_player_progress_get(Eo *obj EINA_UNUSED, Emotion_Object_Data
1185 return sd->progress.stat; 1178 return sd->progress.stat;
1186} 1179}
1187 1180
1181EOLIAN static double
1182_emotion_object_efl_player_length_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd)
1183{
1184 if (!sd->engine_instance) return 0.0;
1185 sd->len = emotion_engine_instance_len_get(sd->engine_instance);
1186 return sd->len;
1187}
1188
1189EOLIAN static Eina_Bool
1190_emotion_object_efl_player_seekable_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd)
1191{
1192 if (!sd->engine_instance) return EINA_FALSE;
1193 return emotion_engine_instance_seekable(sd->engine_instance);
1194}
1195
1188EAPI const char * 1196EAPI const char *
1189emotion_object_ref_file_get(const Evas_Object *obj) 1197emotion_object_ref_file_get(const Evas_Object *obj)
1190{ 1198{