summaryrefslogtreecommitdiff
path: root/src/lib/emotion/emotion_smart.c
diff options
context:
space:
mode:
authorYeshwanth Reddivari <r.yeshwanth@samsung.com>2016-09-21 10:37:59 -0700
committerCedric BAIL <cedric@osg.samsung.com>2016-09-21 11:04:34 -0700
commit7b90e1147442d6a8023422400bffd77e2815fe0b (patch)
tree779d696049dd14b9111e80573a6c9b34814e6601 /src/lib/emotion/emotion_smart.c
parentcbfcfdf3e90906e31f8defc65d17747c28e19f57 (diff)
emotion: convert Emotion_Object into Efl.Canvas.Video
Reviewers: singh.amitesh, raster, jpeg, cedric Differential Revision: https://phab.enlightenment.org/D3994 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/emotion/emotion_smart.c')
-rw-r--r--src/lib/emotion/emotion_smart.c344
1 files changed, 191 insertions, 153 deletions
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c
index 044d63c..e4ce471 100644
--- a/src/lib/emotion/emotion_smart.c
+++ b/src/lib/emotion/emotion_smart.c
@@ -43,17 +43,17 @@
43 if (!smart) return ret; \ 43 if (!smart) return ret; \
44 } 44 }
45 45
46#define E_OBJ_NAME "emotion_object" 46#define E_OBJ_NAME "efl_canvas_video"
47 47
48#ifdef MY_CLASS 48#ifdef MY_CLASS
49# undef MY_CLASS 49# undef MY_CLASS
50#endif 50#endif
51 51
52#define MY_CLASS EMOTION_OBJECT_CLASS 52#define MY_CLASS EFL_CANVAS_VIDEO_CLASS
53 53
54typedef struct _Emotion_Object_Data Emotion_Object_Data; 54typedef struct _Efl_Canvas_Video_Data Efl_Canvas_Video_Data;
55 55
56struct _Emotion_Object_Data 56struct _Efl_Canvas_Video_Data
57{ 57{
58 EINA_REFCOUNT; 58 EINA_REFCOUNT;
59 Emotion_Engine_Instance *engine_instance; 59 Emotion_Engine_Instance *engine_instance;
@@ -126,7 +126,7 @@ static void _pos_set_job(void *data);
126static void _pixels_get(void *data, Evas_Object *obj); 126static void _pixels_get(void *data, Evas_Object *obj);
127 127
128static void 128static void
129_engine_init(Eo *obj, Emotion_Object_Data *sd) 129_engine_init(Eo *obj, Efl_Canvas_Video_Data *sd)
130{ 130{
131 if (sd->engine_instance) return; 131 if (sd->engine_instance) return;
132 sd->engine_instance = emotion_engine_instance_new(sd->engine, obj, 132 sd->engine_instance = emotion_engine_instance_new(sd->engine, obj,
@@ -157,7 +157,7 @@ _emotion_image_data_zero(Evas_Object *img)
157} 157}
158 158
159static void 159static void
160_smart_data_free(Emotion_Object_Data *sd) 160_smart_data_free(Efl_Canvas_Video_Data *sd)
161{ 161{
162#ifdef HAVE_EIO 162#ifdef HAVE_EIO
163 /* Only cancel the load_xattr or we will loose ref to time_seek stringshare */ 163 /* Only cancel the load_xattr or we will loose ref to time_seek stringshare */
@@ -199,7 +199,7 @@ _smart_data_free(Emotion_Object_Data *sd)
199static void 199static void
200_clipper_position_size_update(Evas_Object *obj, int x, int y, int w, int h, int vid_w, int vid_h) 200_clipper_position_size_update(Evas_Object *obj, int x, int y, int w, int h, int vid_w, int vid_h)
201{ 201{
202 Emotion_Object_Data *sd; 202 Efl_Canvas_Video_Data *sd;
203 double scale_w, scale_h; 203 double scale_w, scale_h;
204 204
205 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 205 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
@@ -243,7 +243,7 @@ emotion_object_add(Evas *evas)
243} 243}
244 244
245EOLIAN static Eo * 245EOLIAN static Eo *
246_emotion_object_efl_object_constructor(Eo *obj, Emotion_Object_Data *pd EINA_UNUSED) 246_efl_canvas_video_efl_object_constructor(Eo *obj, Efl_Canvas_Video_Data *pd EINA_UNUSED)
247{ 247{
248 obj = efl_constructor(efl_super(obj, MY_CLASS)); 248 obj = efl_constructor(efl_super(obj, MY_CLASS));
249 efl_canvas_object_type_set(obj, E_OBJ_NAME); 249 efl_canvas_object_type_set(obj, E_OBJ_NAME);
@@ -254,7 +254,7 @@ _emotion_object_efl_object_constructor(Eo *obj, Emotion_Object_Data *pd EINA_UNU
254EAPI Evas_Object * 254EAPI Evas_Object *
255emotion_object_image_get(const Evas_Object *obj) 255emotion_object_image_get(const Evas_Object *obj)
256{ 256{
257 Emotion_Object_Data *sd; 257 Efl_Canvas_Video_Data *sd;
258 258
259 sd = evas_object_smart_data_get(obj); 259 sd = evas_object_smart_data_get(obj);
260 if (!sd) return NULL; 260 if (!sd) return NULL;
@@ -262,9 +262,9 @@ emotion_object_image_get(const Evas_Object *obj)
262} 262}
263 263
264EOLIAN static void 264EOLIAN static void
265_emotion_object_option_set(Eo *obj EINA_UNUSED, Emotion_Object_Data *pd, const char *opt, const char *val) 265_efl_canvas_video_option_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *pd, const char *opt, const char *val)
266{ 266{
267 Emotion_Object_Data *sd = pd; 267 Efl_Canvas_Video_Data *sd = pd;
268 268
269 if ((!opt) || (!val)) return; 269 if ((!opt) || (!val)) return;
270 270
@@ -295,9 +295,9 @@ _emotion_object_option_set(Eo *obj EINA_UNUSED, Emotion_Object_Data *pd, const c
295} 295}
296 296
297EOLIAN static Eina_Bool 297EOLIAN static Eina_Bool
298_emotion_object_engine_set(Eo *obj, Emotion_Object_Data *pd, const char *engine) 298_efl_canvas_video_engine_set(Eo *obj, Efl_Canvas_Video_Data *pd, const char *engine)
299{ 299{
300 Emotion_Object_Data *sd = pd; 300 Efl_Canvas_Video_Data *sd = pd;
301 const char *file; 301 const char *file;
302 302
303 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0); 303 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
@@ -355,7 +355,7 @@ emotion_object_file_set(Evas_Object *obj, const char *file)
355} 355}
356 356
357EOLIAN static Eina_Bool 357EOLIAN static Eina_Bool
358_emotion_object_efl_file_file_set(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd, const char *file, const char *key EINA_UNUSED) 358_efl_canvas_video_efl_file_file_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, const char *file, const char *key EINA_UNUSED)
359{ 359{
360 DBG("file=%s", file); 360 DBG("file=%s", file);
361 361
@@ -419,14 +419,14 @@ emotion_object_file_get(const Evas_Object *obj)
419} 419}
420 420
421EOLIAN static void 421EOLIAN static void
422_emotion_object_efl_file_file_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd, const char **file, const char **key) 422_efl_canvas_video_efl_file_file_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, const char **file, const char **key)
423{ 423{
424 if (file) *file = sd->file; 424 if (file) *file = sd->file;
425 if (key) *key = NULL; 425 if (key) *key = NULL;
426} 426}
427 427
428static void 428static void
429_emotion_aspect_borders_apply(Evas_Object *obj, Emotion_Object_Data *sd, int w, int h, int iw, int ih) 429_emotion_aspect_borders_apply(Evas_Object *obj, Efl_Canvas_Video_Data *sd, int w, int h, int iw, int ih)
430{ 430{
431 int x, y; 431 int x, y;
432 432
@@ -466,7 +466,7 @@ _emotion_aspect_borders_apply(Evas_Object *obj, Emotion_Object_Data *sd, int w,
466} 466}
467 467
468static void 468static void
469_emotion_object_aspect_border_apply(Evas_Object *obj, Emotion_Object_Data *sd, int w, int h) 469_efl_canvas_video_aspect_border_apply(Evas_Object *obj, Efl_Canvas_Video_Data *sd, int w, int h)
470{ 470{
471 int iw, ih; 471 int iw, ih;
472 double ir; 472 double ir;
@@ -549,7 +549,7 @@ _emotion_object_aspect_border_apply(Evas_Object *obj, Emotion_Object_Data *sd, i
549EAPI void 549EAPI void
550emotion_object_border_set(Evas_Object *obj, int l, int r, int t, int b) 550emotion_object_border_set(Evas_Object *obj, int l, int r, int t, int b)
551{ 551{
552 Emotion_Object_Data *sd; 552 Efl_Canvas_Video_Data *sd;
553 int w, h; 553 int w, h;
554 554
555 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 555 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
@@ -560,13 +560,13 @@ emotion_object_border_set(Evas_Object *obj, int l, int r, int t, int b)
560 sd->crop.t = -t; 560 sd->crop.t = -t;
561 sd->crop.b = -b; 561 sd->crop.b = -b;
562 evas_object_geometry_get(obj, NULL, NULL, &w, &h); 562 evas_object_geometry_get(obj, NULL, NULL, &w, &h);
563 _emotion_object_aspect_border_apply(obj, sd, w, h); 563 _efl_canvas_video_aspect_border_apply(obj, sd, w, h);
564} 564}
565 565
566EAPI void 566EAPI void
567emotion_object_border_get(const Evas_Object *obj, int *l, int *r, int *t, int *b) 567emotion_object_border_get(const Evas_Object *obj, int *l, int *r, int *t, int *b)
568{ 568{
569 Emotion_Object_Data *sd; 569 Efl_Canvas_Video_Data *sd;
570 570
571 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 571 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
572 *l = -sd->crop.l; 572 *l = -sd->crop.l;
@@ -578,7 +578,7 @@ emotion_object_border_get(const Evas_Object *obj, int *l, int *r, int *t, int *b
578EAPI void 578EAPI void
579emotion_object_bg_color_set(Evas_Object *obj, int r, int g, int b, int a) 579emotion_object_bg_color_set(Evas_Object *obj, int r, int g, int b, int a)
580{ 580{
581 Emotion_Object_Data *sd; 581 Efl_Canvas_Video_Data *sd;
582 582
583 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 583 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
584 584
@@ -593,7 +593,7 @@ emotion_object_bg_color_set(Evas_Object *obj, int r, int g, int b, int a)
593EAPI void 593EAPI void
594emotion_object_bg_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) 594emotion_object_bg_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a)
595{ 595{
596 Emotion_Object_Data *sd; 596 Efl_Canvas_Video_Data *sd;
597 597
598 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 598 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
599 evas_object_color_get(sd->bg, r, g, b, a); 599 evas_object_color_get(sd->bg, r, g, b, a);
@@ -602,7 +602,7 @@ emotion_object_bg_color_get(const Evas_Object *obj, int *r, int *g, int *b, int
602EAPI void 602EAPI void
603emotion_object_keep_aspect_set(Evas_Object *obj, Emotion_Aspect a) 603emotion_object_keep_aspect_set(Evas_Object *obj, Emotion_Aspect a)
604{ 604{
605 Emotion_Object_Data *sd; 605 Efl_Canvas_Video_Data *sd;
606 int w, h; 606 int w, h;
607 607
608 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 608 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
@@ -610,13 +610,13 @@ emotion_object_keep_aspect_set(Evas_Object *obj, Emotion_Aspect a)
610 610
611 sd->aspect = a; 611 sd->aspect = a;
612 evas_object_geometry_get(obj, NULL, NULL, &w, &h); 612 evas_object_geometry_get(obj, NULL, NULL, &w, &h);
613 _emotion_object_aspect_border_apply(obj, sd, w, h); 613 _efl_canvas_video_aspect_border_apply(obj, sd, w, h);
614} 614}
615 615
616EAPI Emotion_Aspect 616EAPI Emotion_Aspect
617emotion_object_keep_aspect_get(const Evas_Object *obj) 617emotion_object_keep_aspect_get(const Evas_Object *obj)
618{ 618{
619 Emotion_Object_Data *sd; 619 Efl_Canvas_Video_Data *sd;
620 620
621 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EMOTION_ASPECT_KEEP_NONE); 621 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EMOTION_ASPECT_KEEP_NONE);
622 return sd->aspect; 622 return sd->aspect;
@@ -629,7 +629,7 @@ emotion_object_play_set(Evas_Object *obj, Eina_Bool play)
629} 629}
630 630
631EOLIAN static void 631EOLIAN static void
632_emotion_object_efl_player_play_set(Eo *obj, Emotion_Object_Data *sd, Eina_Bool play) 632_efl_canvas_video_efl_player_play_set(Eo *obj, Efl_Canvas_Video_Data *sd, Eina_Bool play)
633{ 633{
634 DBG("play=" FMT_UCHAR ", was=" FMT_UCHAR, play, sd->play); 634 DBG("play=" FMT_UCHAR ", was=" FMT_UCHAR, play, sd->play);
635 if (!sd->engine_instance) return; 635 if (!sd->engine_instance) return;
@@ -653,7 +653,7 @@ emotion_object_play_get(const Evas_Object *obj)
653} 653}
654 654
655EOLIAN static Eina_Bool 655EOLIAN static Eina_Bool
656_emotion_object_efl_player_play_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd) 656_efl_canvas_video_efl_player_play_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
657{ 657{
658 if (!sd->engine_instance) return EINA_FALSE; 658 if (!sd->engine_instance) return EINA_FALSE;
659 return sd->play; 659 return sd->play;
@@ -666,7 +666,7 @@ emotion_object_position_set(Evas_Object *obj, double sec)
666} 666}
667 667
668EOLIAN static void 668EOLIAN static void
669_emotion_object_efl_player_position_set(Eo *obj, Emotion_Object_Data *sd, double sec) 669_efl_canvas_video_efl_player_position_set(Eo *obj, Efl_Canvas_Video_Data *sd, double sec)
670{ 670{
671 DBG("sec=%f", sec); 671 DBG("sec=%f", sec);
672 if (!sd->engine_instance) return; 672 if (!sd->engine_instance) return;
@@ -691,7 +691,7 @@ emotion_object_position_get(const Evas_Object *obj)
691} 691}
692 692
693EOLIAN static double 693EOLIAN static double
694_emotion_object_efl_player_position_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd) 694_efl_canvas_video_efl_player_position_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
695{ 695{
696 if (!sd->engine_instance) return 0.0; 696 if (!sd->engine_instance) return 0.0;
697 sd->pos = emotion_engine_instance_pos_get(sd->engine_instance); 697 sd->pos = emotion_engine_instance_pos_get(sd->engine_instance);
@@ -701,7 +701,7 @@ _emotion_object_efl_player_position_get(Eo *obj EINA_UNUSED, Emotion_Object_Data
701EAPI double 701EAPI double
702emotion_object_buffer_size_get(const Evas_Object *obj) 702emotion_object_buffer_size_get(const Evas_Object *obj)
703{ 703{
704 Emotion_Object_Data *sd; 704 Efl_Canvas_Video_Data *sd;
705 705
706 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 1.0); 706 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 1.0);
707 if (!sd->engine_instance) return 0.0; 707 if (!sd->engine_instance) return 0.0;
@@ -717,7 +717,7 @@ emotion_object_seekable_get(const Evas_Object *obj)
717EAPI Eina_Bool 717EAPI Eina_Bool
718emotion_object_video_handled_get(const Evas_Object *obj) 718emotion_object_video_handled_get(const Evas_Object *obj)
719{ 719{
720 Emotion_Object_Data *sd; 720 Efl_Canvas_Video_Data *sd;
721 721
722 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0); 722 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
723 if (!sd->engine_instance) return EINA_FALSE; 723 if (!sd->engine_instance) return EINA_FALSE;
@@ -727,7 +727,7 @@ emotion_object_video_handled_get(const Evas_Object *obj)
727EAPI Eina_Bool 727EAPI Eina_Bool
728emotion_object_audio_handled_get(const Evas_Object *obj) 728emotion_object_audio_handled_get(const Evas_Object *obj)
729{ 729{
730 Emotion_Object_Data *sd; 730 Efl_Canvas_Video_Data *sd;
731 731
732 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0); 732 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
733 if (!sd->engine_instance) return EINA_FALSE; 733 if (!sd->engine_instance) return EINA_FALSE;
@@ -750,7 +750,7 @@ emotion_object_size_get(const Evas_Object *obj, int *iw, int *ih)
750} 750}
751 751
752EOLIAN static void 752EOLIAN static void
753_emotion_object_efl_image_load_load_size_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd, int *iw, int *ih) 753_efl_canvas_video_efl_image_load_load_size_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, int *iw, int *ih)
754{ 754{
755 if (iw) *iw = sd->video.w; 755 if (iw) *iw = sd->video.w;
756 if (ih) *ih = sd->video.h; 756 if (ih) *ih = sd->video.h;
@@ -763,7 +763,7 @@ emotion_object_smooth_scale_set(Evas_Object *obj, Eina_Bool smooth)
763} 763}
764 764
765EOLIAN static void 765EOLIAN static void
766_emotion_object_efl_image_smooth_scale_set(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd, Eina_Bool smooth) 766_efl_canvas_video_efl_image_smooth_scale_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, Eina_Bool smooth)
767{ 767{
768 evas_object_image_smooth_scale_set(sd->obj, smooth); 768 evas_object_image_smooth_scale_set(sd->obj, smooth);
769} 769}
@@ -775,7 +775,7 @@ emotion_object_smooth_scale_get(const Evas_Object *obj)
775} 775}
776 776
777EOLIAN static Eina_Bool 777EOLIAN static Eina_Bool
778_emotion_object_efl_image_smooth_scale_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd) 778_efl_canvas_video_efl_image_smooth_scale_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
779{ 779{
780 return evas_object_image_smooth_scale_get(sd->obj); 780 return evas_object_image_smooth_scale_get(sd->obj);
781} 781}
@@ -787,7 +787,7 @@ emotion_object_ratio_get(const Evas_Object *obj)
787} 787}
788 788
789EOLIAN static double 789EOLIAN static double
790_emotion_object_efl_image_ratio_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd) 790_efl_canvas_video_efl_image_ratio_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
791{ 791{
792 if (!sd->engine_instance) return 0.0; 792 if (!sd->engine_instance) return 0.0;
793 return sd->ratio; 793 return sd->ratio;
@@ -799,7 +799,7 @@ _emotion_object_efl_image_ratio_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd
799EAPI void 799EAPI void
800emotion_object_event_simple_send(Evas_Object *obj, Emotion_Event ev) 800emotion_object_event_simple_send(Evas_Object *obj, Emotion_Event ev)
801{ 801{
802 Emotion_Object_Data *sd; 802 Efl_Canvas_Video_Data *sd;
803 803
804 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 804 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
805 if (!sd->engine_instance) return; 805 if (!sd->engine_instance) return;
@@ -809,11 +809,11 @@ emotion_object_event_simple_send(Evas_Object *obj, Emotion_Event ev)
809EAPI void 809EAPI void
810emotion_object_audio_volume_set(Evas_Object *obj, double vol) 810emotion_object_audio_volume_set(Evas_Object *obj, double vol)
811{ 811{
812 efl_player_audio_volume_set(obj, vol); 812 efl_player_volume_set(obj, vol);
813} 813}
814 814
815EOLIAN static void 815EOLIAN static void
816_emotion_object_efl_player_audio_volume_set(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd, double vol) 816_efl_canvas_video_efl_player_volume_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, double vol)
817{ 817{
818 DBG("vol=%f", vol); 818 DBG("vol=%f", vol);
819 if (!sd->engine_instance) return; 819 if (!sd->engine_instance) return;
@@ -823,11 +823,11 @@ _emotion_object_efl_player_audio_volume_set(Eo *obj EINA_UNUSED, Emotion_Object_
823EAPI double 823EAPI double
824emotion_object_audio_volume_get(const Evas_Object *obj) 824emotion_object_audio_volume_get(const Evas_Object *obj)
825{ 825{
826 return efl_player_audio_volume_get(obj); 826 return efl_player_volume_get(obj);
827} 827}
828 828
829EOLIAN static double 829EOLIAN static double
830_emotion_object_efl_player_audio_volume_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd) 830_efl_canvas_video_efl_player_volume_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
831{ 831{
832 if (!sd->engine_instance) return 0.0; 832 if (!sd->engine_instance) return 0.0;
833 return emotion_engine_instance_audio_channel_volume_get(sd->engine_instance); 833 return emotion_engine_instance_audio_channel_volume_get(sd->engine_instance);
@@ -836,11 +836,11 @@ _emotion_object_efl_player_audio_volume_get(Eo *obj EINA_UNUSED, Emotion_Object_
836EAPI void 836EAPI void
837emotion_object_audio_mute_set(Evas_Object *obj, Eina_Bool mute) 837emotion_object_audio_mute_set(Evas_Object *obj, Eina_Bool mute)
838{ 838{
839 efl_player_audio_mute_set(obj, mute); 839 efl_player_mute_set(obj, mute);
840} 840}
841 841
842EOLIAN static void 842EOLIAN static void
843_emotion_object_efl_player_audio_mute_set(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd, Eina_Bool mute) 843_efl_canvas_video_efl_player_mute_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, Eina_Bool mute)
844{ 844{
845 DBG("mute=" FMT_UCHAR, mute); 845 DBG("mute=" FMT_UCHAR, mute);
846 if (!sd->engine_instance) return; 846 if (!sd->engine_instance) return;
@@ -850,11 +850,11 @@ _emotion_object_efl_player_audio_mute_set(Eo *obj EINA_UNUSED, Emotion_Object_Da
850EAPI Eina_Bool 850EAPI Eina_Bool
851emotion_object_audio_mute_get(const Evas_Object *obj) 851emotion_object_audio_mute_get(const Evas_Object *obj)
852{ 852{
853 return efl_player_audio_mute_get(obj); 853 return efl_player_mute_get(obj);
854} 854}
855 855
856EOLIAN static Eina_Bool 856EOLIAN static Eina_Bool
857_emotion_object_efl_player_audio_mute_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd) 857_efl_canvas_video_efl_player_mute_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
858{ 858{
859 if (!sd->engine_instance) return EINA_FALSE; 859 if (!sd->engine_instance) return EINA_FALSE;
860 return emotion_engine_instance_audio_channel_mute_get(sd->engine_instance); 860 return emotion_engine_instance_audio_channel_mute_get(sd->engine_instance);
@@ -863,7 +863,7 @@ _emotion_object_efl_player_audio_mute_get(Eo *obj EINA_UNUSED, Emotion_Object_Da
863EAPI int 863EAPI int
864emotion_object_audio_channel_count(const Evas_Object *obj) 864emotion_object_audio_channel_count(const Evas_Object *obj)
865{ 865{
866 Emotion_Object_Data *sd; 866 Efl_Canvas_Video_Data *sd;
867 867
868 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0); 868 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
869 if (!sd->engine_instance) return 0; 869 if (!sd->engine_instance) return 0;
@@ -873,7 +873,7 @@ emotion_object_audio_channel_count(const Evas_Object *obj)
873EAPI const char * 873EAPI const char *
874emotion_object_audio_channel_name_get(const Evas_Object *obj, int channel) 874emotion_object_audio_channel_name_get(const Evas_Object *obj, int channel)
875{ 875{
876 Emotion_Object_Data *sd; 876 Efl_Canvas_Video_Data *sd;
877 877
878 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL); 878 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
879 if (!sd->engine_instance) return NULL; 879 if (!sd->engine_instance) return NULL;
@@ -883,7 +883,7 @@ emotion_object_audio_channel_name_get(const Evas_Object *obj, int channel)
883EAPI void 883EAPI void
884emotion_object_audio_channel_set(Evas_Object *obj, int channel) 884emotion_object_audio_channel_set(Evas_Object *obj, int channel)
885{ 885{
886 Emotion_Object_Data *sd; 886 Efl_Canvas_Video_Data *sd;
887 887
888 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 888 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
889 DBG("channel=%d", channel); 889 DBG("channel=%d", channel);
@@ -894,7 +894,7 @@ emotion_object_audio_channel_set(Evas_Object *obj, int channel)
894EAPI int 894EAPI int
895emotion_object_audio_channel_get(const Evas_Object *obj) 895emotion_object_audio_channel_get(const Evas_Object *obj)
896{ 896{
897 Emotion_Object_Data *sd; 897 Efl_Canvas_Video_Data *sd;
898 898
899 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0); 899 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
900 if (!sd->engine_instance) return 0; 900 if (!sd->engine_instance) return 0;
@@ -904,7 +904,7 @@ emotion_object_audio_channel_get(const Evas_Object *obj)
904EAPI void 904EAPI void
905emotion_object_video_mute_set(Evas_Object *obj, Eina_Bool mute) 905emotion_object_video_mute_set(Evas_Object *obj, Eina_Bool mute)
906{ 906{
907 Emotion_Object_Data *sd; 907 Efl_Canvas_Video_Data *sd;
908 908
909 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 909 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
910 DBG("mute=" FMT_UCHAR, mute); 910 DBG("mute=" FMT_UCHAR, mute);
@@ -915,7 +915,7 @@ emotion_object_video_mute_set(Evas_Object *obj, Eina_Bool mute)
915EAPI Eina_Bool 915EAPI Eina_Bool
916emotion_object_video_mute_get(const Evas_Object *obj) 916emotion_object_video_mute_get(const Evas_Object *obj)
917{ 917{
918 Emotion_Object_Data *sd; 918 Efl_Canvas_Video_Data *sd;
919 919
920 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0); 920 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
921 if (!sd->engine_instance) return EINA_FALSE; 921 if (!sd->engine_instance) return EINA_FALSE;
@@ -925,7 +925,7 @@ emotion_object_video_mute_get(const Evas_Object *obj)
925EAPI void 925EAPI void
926emotion_object_video_subtitle_file_set(Evas_Object *obj, const char *filepath) 926emotion_object_video_subtitle_file_set(Evas_Object *obj, const char *filepath)
927{ 927{
928 Emotion_Object_Data *sd; 928 Efl_Canvas_Video_Data *sd;
929 929
930 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 930 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
931 DBG("subtitle=%s", filepath); 931 DBG("subtitle=%s", filepath);
@@ -937,7 +937,7 @@ emotion_object_video_subtitle_file_set(Evas_Object *obj, const char *filepath)
937EAPI const char * 937EAPI const char *
938emotion_object_video_subtitle_file_get(const Evas_Object *obj) 938emotion_object_video_subtitle_file_get(const Evas_Object *obj)
939{ 939{
940 Emotion_Object_Data *sd; 940 Efl_Canvas_Video_Data *sd;
941 941
942 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0); 942 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
943 if (!sd->engine_instance) return NULL; 943 if (!sd->engine_instance) return NULL;
@@ -947,7 +947,7 @@ emotion_object_video_subtitle_file_get(const Evas_Object *obj)
947EAPI int 947EAPI int
948emotion_object_video_channel_count(const Evas_Object *obj) 948emotion_object_video_channel_count(const Evas_Object *obj)
949{ 949{
950 Emotion_Object_Data *sd; 950 Efl_Canvas_Video_Data *sd;
951 951
952 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0); 952 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
953 if (!sd->engine_instance) return 0; 953 if (!sd->engine_instance) return 0;
@@ -957,7 +957,7 @@ emotion_object_video_channel_count(const Evas_Object *obj)
957EAPI const char * 957EAPI const char *
958emotion_object_video_channel_name_get(const Evas_Object *obj, int channel) 958emotion_object_video_channel_name_get(const Evas_Object *obj, int channel)
959{ 959{
960 Emotion_Object_Data *sd; 960 Efl_Canvas_Video_Data *sd;
961 961
962 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL); 962 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
963 if (!sd->engine_instance) return NULL; 963 if (!sd->engine_instance) return NULL;
@@ -967,7 +967,7 @@ emotion_object_video_channel_name_get(const Evas_Object *obj, int channel)
967EAPI void 967EAPI void
968emotion_object_video_channel_set(Evas_Object *obj, int channel) 968emotion_object_video_channel_set(Evas_Object *obj, int channel)
969{ 969{
970 Emotion_Object_Data *sd; 970 Efl_Canvas_Video_Data *sd;
971 971
972 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 972 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
973 DBG("channel=%d", channel); 973 DBG("channel=%d", channel);
@@ -978,7 +978,7 @@ emotion_object_video_channel_set(Evas_Object *obj, int channel)
978EAPI int 978EAPI int
979emotion_object_video_channel_get(const Evas_Object *obj) 979emotion_object_video_channel_get(const Evas_Object *obj)
980{ 980{
981 Emotion_Object_Data *sd; 981 Efl_Canvas_Video_Data *sd;
982 982
983 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0); 983 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
984 if (!sd->engine_instance) return 0; 984 if (!sd->engine_instance) return 0;
@@ -988,7 +988,7 @@ emotion_object_video_channel_get(const Evas_Object *obj)
988EAPI void 988EAPI void
989emotion_object_spu_mute_set(Evas_Object *obj, Eina_Bool mute) 989emotion_object_spu_mute_set(Evas_Object *obj, Eina_Bool mute)
990{ 990{
991 Emotion_Object_Data *sd; 991 Efl_Canvas_Video_Data *sd;
992 992
993 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 993 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
994 DBG("mute=" FMT_UCHAR, mute); 994 DBG("mute=" FMT_UCHAR, mute);
@@ -999,7 +999,7 @@ emotion_object_spu_mute_set(Evas_Object *obj, Eina_Bool mute)
999EAPI Eina_Bool 999EAPI Eina_Bool
1000emotion_object_spu_mute_get(const Evas_Object *obj) 1000emotion_object_spu_mute_get(const Evas_Object *obj)
1001{ 1001{
1002 Emotion_Object_Data *sd; 1002 Efl_Canvas_Video_Data *sd;
1003 1003
1004 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0); 1004 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
1005 if (!sd->engine_instance) return EINA_FALSE; 1005 if (!sd->engine_instance) return EINA_FALSE;
@@ -1009,7 +1009,7 @@ emotion_object_spu_mute_get(const Evas_Object *obj)
1009EAPI int 1009EAPI int
1010emotion_object_spu_channel_count(const Evas_Object *obj) 1010emotion_object_spu_channel_count(const Evas_Object *obj)
1011{ 1011{
1012 Emotion_Object_Data *sd; 1012 Efl_Canvas_Video_Data *sd;
1013 1013
1014 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0); 1014 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
1015 if (!sd->engine_instance) return 0; 1015 if (!sd->engine_instance) return 0;
@@ -1019,7 +1019,7 @@ emotion_object_spu_channel_count(const Evas_Object *obj)
1019EAPI const char * 1019EAPI const char *
1020emotion_object_spu_channel_name_get(const Evas_Object *obj, int channel) 1020emotion_object_spu_channel_name_get(const Evas_Object *obj, int channel)
1021{ 1021{
1022 Emotion_Object_Data *sd; 1022 Efl_Canvas_Video_Data *sd;
1023 1023
1024 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL); 1024 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
1025 if (!sd->engine_instance) return NULL; 1025 if (!sd->engine_instance) return NULL;
@@ -1029,7 +1029,7 @@ emotion_object_spu_channel_name_get(const Evas_Object *obj, int channel)
1029EAPI void 1029EAPI void
1030emotion_object_spu_channel_set(Evas_Object *obj, int channel) 1030emotion_object_spu_channel_set(Evas_Object *obj, int channel)
1031{ 1031{
1032 Emotion_Object_Data *sd; 1032 Efl_Canvas_Video_Data *sd;
1033 1033
1034 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1034 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1035 DBG("channel=%d", channel); 1035 DBG("channel=%d", channel);
@@ -1040,7 +1040,7 @@ emotion_object_spu_channel_set(Evas_Object *obj, int channel)
1040EAPI int 1040EAPI int
1041emotion_object_spu_channel_get(const Evas_Object *obj) 1041emotion_object_spu_channel_get(const Evas_Object *obj)
1042{ 1042{
1043 Emotion_Object_Data *sd; 1043 Efl_Canvas_Video_Data *sd;
1044 1044
1045 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0); 1045 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
1046 if (!sd->engine_instance) return 0; 1046 if (!sd->engine_instance) return 0;
@@ -1050,7 +1050,7 @@ emotion_object_spu_channel_get(const Evas_Object *obj)
1050EAPI int 1050EAPI int
1051emotion_object_chapter_count(const Evas_Object *obj) 1051emotion_object_chapter_count(const Evas_Object *obj)
1052{ 1052{
1053 Emotion_Object_Data *sd; 1053 Efl_Canvas_Video_Data *sd;
1054 1054
1055 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0); 1055 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
1056 if (!sd->engine_instance) return 0; 1056 if (!sd->engine_instance) return 0;
@@ -1060,7 +1060,7 @@ emotion_object_chapter_count(const Evas_Object *obj)
1060EAPI void 1060EAPI void
1061emotion_object_chapter_set(Evas_Object *obj, int chapter) 1061emotion_object_chapter_set(Evas_Object *obj, int chapter)
1062{ 1062{
1063 Emotion_Object_Data *sd; 1063 Efl_Canvas_Video_Data *sd;
1064 1064
1065 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1065 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1066 DBG("chapter=%d", chapter); 1066 DBG("chapter=%d", chapter);
@@ -1071,7 +1071,7 @@ emotion_object_chapter_set(Evas_Object *obj, int chapter)
1071EAPI int 1071EAPI int
1072emotion_object_chapter_get(const Evas_Object *obj) 1072emotion_object_chapter_get(const Evas_Object *obj)
1073{ 1073{
1074 Emotion_Object_Data *sd; 1074 Efl_Canvas_Video_Data *sd;
1075 1075
1076 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0); 1076 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
1077 if (!sd->engine_instance) return 0; 1077 if (!sd->engine_instance) return 0;
@@ -1081,7 +1081,7 @@ emotion_object_chapter_get(const Evas_Object *obj)
1081EAPI const char * 1081EAPI const char *
1082emotion_object_chapter_name_get(const Evas_Object *obj, int chapter) 1082emotion_object_chapter_name_get(const Evas_Object *obj, int chapter)
1083{ 1083{
1084 Emotion_Object_Data *sd; 1084 Efl_Canvas_Video_Data *sd;
1085 1085
1086 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL); 1086 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
1087 if (!sd->engine_instance) return NULL; 1087 if (!sd->engine_instance) return NULL;
@@ -1091,7 +1091,7 @@ emotion_object_chapter_name_get(const Evas_Object *obj, int chapter)
1091EAPI void 1091EAPI void
1092emotion_object_play_speed_set(Evas_Object *obj, double speed) 1092emotion_object_play_speed_set(Evas_Object *obj, double speed)
1093{ 1093{
1094 Emotion_Object_Data *sd; 1094 Efl_Canvas_Video_Data *sd;
1095 1095
1096 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1096 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1097 DBG("speed=%f", speed); 1097 DBG("speed=%f", speed);
@@ -1102,7 +1102,7 @@ emotion_object_play_speed_set(Evas_Object *obj, double speed)
1102EAPI double 1102EAPI double
1103emotion_object_play_speed_get(const Evas_Object *obj) 1103emotion_object_play_speed_get(const Evas_Object *obj)
1104{ 1104{
1105 Emotion_Object_Data *sd; 1105 Efl_Canvas_Video_Data *sd;
1106 1106
1107 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0.0); 1107 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0.0);
1108 if (!sd->engine_instance) return 0.0; 1108 if (!sd->engine_instance) return 0.0;
@@ -1112,7 +1112,7 @@ emotion_object_play_speed_get(const Evas_Object *obj)
1112EAPI void 1112EAPI void
1113emotion_object_eject(Evas_Object *obj) 1113emotion_object_eject(Evas_Object *obj)
1114{ 1114{
1115 Emotion_Object_Data *sd; 1115 Efl_Canvas_Video_Data *sd;
1116 1116
1117 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1117 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1118 if (!sd->engine_instance) return; 1118 if (!sd->engine_instance) return;
@@ -1122,7 +1122,7 @@ emotion_object_eject(Evas_Object *obj)
1122EAPI const char * 1122EAPI const char *
1123emotion_object_title_get(const Evas_Object *obj) 1123emotion_object_title_get(const Evas_Object *obj)
1124{ 1124{
1125 Emotion_Object_Data *sd; 1125 Efl_Canvas_Video_Data *sd;
1126 1126
1127 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL); 1127 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
1128 return sd->title; 1128 return sd->title;
@@ -1131,7 +1131,7 @@ emotion_object_title_get(const Evas_Object *obj)
1131EAPI const char * 1131EAPI const char *
1132emotion_object_progress_info_get(const Evas_Object *obj) 1132emotion_object_progress_info_get(const Evas_Object *obj)
1133{ 1133{
1134 Emotion_Object_Data *sd; 1134 Efl_Canvas_Video_Data *sd;
1135 1135
1136 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL); 1136 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
1137 return sd->progress.info; 1137 return sd->progress.info;
@@ -1144,13 +1144,13 @@ emotion_object_progress_status_get(const Evas_Object *obj)
1144} 1144}
1145 1145
1146EOLIAN static double 1146EOLIAN static double
1147_emotion_object_efl_player_progress_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd) 1147_efl_canvas_video_efl_player_progress_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
1148{ 1148{
1149 return sd->progress.stat; 1149 return sd->progress.stat;
1150} 1150}
1151 1151
1152EOLIAN static double 1152EOLIAN static double
1153_emotion_object_efl_player_length_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd) 1153_efl_canvas_video_efl_player_length_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
1154{ 1154{
1155 if (!sd->engine_instance) return 0.0; 1155 if (!sd->engine_instance) return 0.0;
1156 sd->len = emotion_engine_instance_len_get(sd->engine_instance); 1156 sd->len = emotion_engine_instance_len_get(sd->engine_instance);
@@ -1158,7 +1158,7 @@ _emotion_object_efl_player_length_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *
1158} 1158}
1159 1159
1160EOLIAN static Eina_Bool 1160EOLIAN static Eina_Bool
1161_emotion_object_efl_player_seekable_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd) 1161_efl_canvas_video_efl_player_seekable_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
1162{ 1162{
1163 if (!sd->engine_instance) return EINA_FALSE; 1163 if (!sd->engine_instance) return EINA_FALSE;
1164 return emotion_engine_instance_seekable(sd->engine_instance); 1164 return emotion_engine_instance_seekable(sd->engine_instance);
@@ -1167,7 +1167,7 @@ _emotion_object_efl_player_seekable_get(Eo *obj EINA_UNUSED, Emotion_Object_Data
1167EAPI const char * 1167EAPI const char *
1168emotion_object_ref_file_get(const Evas_Object *obj) 1168emotion_object_ref_file_get(const Evas_Object *obj)
1169{ 1169{
1170 Emotion_Object_Data *sd; 1170 Efl_Canvas_Video_Data *sd;
1171 1171
1172 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL); 1172 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
1173 return sd->ref.file; 1173 return sd->ref.file;
@@ -1176,7 +1176,7 @@ emotion_object_ref_file_get(const Evas_Object *obj)
1176EAPI int 1176EAPI int
1177emotion_object_ref_num_get(const Evas_Object *obj) 1177emotion_object_ref_num_get(const Evas_Object *obj)
1178{ 1178{
1179 Emotion_Object_Data *sd; 1179 Efl_Canvas_Video_Data *sd;
1180 1180
1181 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0); 1181 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
1182 return sd->ref.num; 1182 return sd->ref.num;
@@ -1185,7 +1185,7 @@ emotion_object_ref_num_get(const Evas_Object *obj)
1185EAPI int 1185EAPI int
1186emotion_object_spu_button_count_get(const Evas_Object *obj) 1186emotion_object_spu_button_count_get(const Evas_Object *obj)
1187{ 1187{
1188 Emotion_Object_Data *sd; 1188 Efl_Canvas_Video_Data *sd;
1189 1189
1190 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0); 1190 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
1191 return sd->spu.button_num; 1191 return sd->spu.button_num;
@@ -1194,7 +1194,7 @@ emotion_object_spu_button_count_get(const Evas_Object *obj)
1194EAPI int 1194EAPI int
1195emotion_object_spu_button_get(const Evas_Object *obj) 1195emotion_object_spu_button_get(const Evas_Object *obj)
1196{ 1196{
1197 Emotion_Object_Data *sd; 1197 Efl_Canvas_Video_Data *sd;
1198 1198
1199 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0); 1199 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
1200 return sd->spu.button; 1200 return sd->spu.button;
@@ -1203,7 +1203,7 @@ emotion_object_spu_button_get(const Evas_Object *obj)
1203EAPI const char * 1203EAPI const char *
1204emotion_object_meta_info_get(const Evas_Object *obj, Emotion_Meta_Info meta) 1204emotion_object_meta_info_get(const Evas_Object *obj, Emotion_Meta_Info meta)
1205{ 1205{
1206 Emotion_Object_Data *sd; 1206 Efl_Canvas_Video_Data *sd;
1207 int id; 1207 int id;
1208 1208
1209 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL); 1209 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
@@ -1242,7 +1242,7 @@ emotion_object_meta_info_get(const Evas_Object *obj, Emotion_Meta_Info meta)
1242EAPI void 1242EAPI void
1243emotion_object_vis_set(Evas_Object *obj, Emotion_Vis visualization) 1243emotion_object_vis_set(Evas_Object *obj, Emotion_Vis visualization)
1244{ 1244{
1245 Emotion_Object_Data *sd; 1245 Efl_Canvas_Video_Data *sd;
1246 1246
1247 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1247 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1248 DBG("visualization=%d", visualization); 1248 DBG("visualization=%d", visualization);
@@ -1253,7 +1253,7 @@ emotion_object_vis_set(Evas_Object *obj, Emotion_Vis visualization)
1253EAPI Emotion_Vis 1253EAPI Emotion_Vis
1254emotion_object_vis_get(const Evas_Object *obj) 1254emotion_object_vis_get(const Evas_Object *obj)
1255{ 1255{
1256 Emotion_Object_Data *sd; 1256 Efl_Canvas_Video_Data *sd;
1257 1257
1258 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EMOTION_VIS_NONE); 1258 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EMOTION_VIS_NONE);
1259 if (!sd->engine_instance) return EMOTION_VIS_NONE; 1259 if (!sd->engine_instance) return EMOTION_VIS_NONE;
@@ -1263,7 +1263,7 @@ emotion_object_vis_get(const Evas_Object *obj)
1263EAPI Eina_Bool 1263EAPI Eina_Bool
1264emotion_object_vis_supported(const Evas_Object *obj, Emotion_Vis visualization) 1264emotion_object_vis_supported(const Evas_Object *obj, Emotion_Vis visualization)
1265{ 1265{
1266 Emotion_Object_Data *sd; 1266 Efl_Canvas_Video_Data *sd;
1267 1267
1268 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EINA_FALSE); 1268 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EINA_FALSE);
1269 if (!sd->engine_instance) return EINA_FALSE; 1269 if (!sd->engine_instance) return EINA_FALSE;
@@ -1273,7 +1273,7 @@ emotion_object_vis_supported(const Evas_Object *obj, Emotion_Vis visualization)
1273EAPI void 1273EAPI void
1274emotion_object_priority_set(Evas_Object *obj, Eina_Bool priority) 1274emotion_object_priority_set(Evas_Object *obj, Eina_Bool priority)
1275{ 1275{
1276 Emotion_Object_Data *sd; 1276 Efl_Canvas_Video_Data *sd;
1277 1277
1278 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1278 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1279 if (!sd->engine_instance) return; 1279 if (!sd->engine_instance) return;
@@ -1283,7 +1283,7 @@ emotion_object_priority_set(Evas_Object *obj, Eina_Bool priority)
1283EAPI Eina_Bool 1283EAPI Eina_Bool
1284emotion_object_priority_get(const Evas_Object *obj) 1284emotion_object_priority_get(const Evas_Object *obj)
1285{ 1285{
1286 Emotion_Object_Data *sd; 1286 Efl_Canvas_Video_Data *sd;
1287 1287
1288 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EINA_FALSE); 1288 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EINA_FALSE);
1289 if (!sd->engine_instance) return EINA_FALSE; 1289 if (!sd->engine_instance) return EINA_FALSE;
@@ -1292,7 +1292,7 @@ emotion_object_priority_get(const Evas_Object *obj)
1292 1292
1293#ifdef HAVE_EIO 1293#ifdef HAVE_EIO
1294static void 1294static void
1295_eio_load_xattr_cleanup(Emotion_Object_Data *sd, Eio_File *handler) 1295_eio_load_xattr_cleanup(Efl_Canvas_Video_Data *sd, Eio_File *handler)
1296{ 1296{
1297 if (handler == sd->load_xattr) sd->load_xattr = NULL; 1297 if (handler == sd->load_xattr) sd->load_xattr = NULL;
1298 1298
@@ -1307,19 +1307,21 @@ _eio_load_xattr_cleanup(Emotion_Object_Data *sd, Eio_File *handler)
1307static void 1307static void
1308_eio_load_xattr_done(void *data, Eio_File *handler, double xattr_double) 1308_eio_load_xattr_done(void *data, Eio_File *handler, double xattr_double)
1309{ 1309{
1310 Emotion_Object_Data *sd = data; 1310 Efl_Canvas_Video_Data *sd = data;
1311 1311
1312 emotion_object_position_set(evas_object_smart_parent_get(sd->obj), xattr_double); 1312 emotion_object_position_set(evas_object_smart_parent_get(sd->obj), xattr_double);
1313 efl_event_callback_legacy_call(evas_object_smart_parent_get(sd->obj), EMOTION_OBJECT_EVENT_POSITION_LOAD_SUCCEED, NULL); 1313 efl_event_callback_call(evas_object_smart_parent_get(sd->obj), EFL_CANVAS_VIDEO_EVENT_POSITION_LOAD_DONE, NULL);
1314 evas_object_smart_callback_call(evas_object_smart_parent_get(sd->obj), "position_load,succeed", NULL);
1314 _eio_load_xattr_cleanup(sd, handler); 1315 _eio_load_xattr_cleanup(sd, handler);
1315} 1316}
1316 1317
1317static void 1318static void
1318_eio_load_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED) 1319_eio_load_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED)
1319{ 1320{
1320 Emotion_Object_Data *sd = data; 1321 Efl_Canvas_Video_Data *sd = data;
1321 1322
1322 efl_event_callback_legacy_call(evas_object_smart_parent_get(sd->obj), EMOTION_OBJECT_EVENT_POSITION_LOAD_FAILED, NULL); 1323 efl_event_callback_call(evas_object_smart_parent_get(sd->obj), EFL_CANVAS_VIDEO_EVENT_POSITION_LOAD_FAIL, NULL);
1324 evas_object_smart_callback_call(evas_object_smart_parent_get(sd->obj), "position_load,failed", NULL);
1323 _eio_load_xattr_cleanup(sd, handler); 1325 _eio_load_xattr_cleanup(sd, handler);
1324} 1326}
1325#endif 1327#endif
@@ -1327,7 +1329,7 @@ _eio_load_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED)
1327EAPI void 1329EAPI void
1328emotion_object_last_position_load(Evas_Object *obj) 1330emotion_object_last_position_load(Evas_Object *obj)
1329{ 1331{
1330 Emotion_Object_Data *sd; 1332 Efl_Canvas_Video_Data *sd;
1331 const char *tmp; 1333 const char *tmp;
1332#ifndef HAVE_EIO 1334#ifndef HAVE_EIO
1333 double xattr; 1335 double xattr;
@@ -1354,16 +1356,20 @@ emotion_object_last_position_load(Evas_Object *obj)
1354 if (eina_xattr_double_get(tmp, "user.e.time_seek", &xattr)) 1356 if (eina_xattr_double_get(tmp, "user.e.time_seek", &xattr))
1355 { 1357 {
1356 emotion_object_position_set(obj, xattr); 1358 emotion_object_position_set(obj, xattr);
1357 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_POSITION_LOAD_SUCCEED, NULL); 1359 efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_POSITION_LOAD_DONE, NULL);
1360 evas_object_smart_callback_call(obj, "position_load,succeed", NULL);
1358 } 1361 }
1359 else 1362 else
1360 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_POSITION_LOAD_FAILED, NULL); 1363 {
1364 efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_POSITION_LOAD_FAIL, NULL);
1365 evas_object_smart_callback_call(obj, "position_load,failed", NULL);
1366 }
1361#endif 1367#endif
1362} 1368}
1363 1369
1364#ifdef HAVE_EIO 1370#ifdef HAVE_EIO
1365static void 1371static void
1366_eio_save_xattr_cleanup(Emotion_Object_Data *sd, Eio_File *handler) 1372_eio_save_xattr_cleanup(Efl_Canvas_Video_Data *sd, Eio_File *handler)
1367{ 1373{
1368 if (handler == sd->save_xattr) sd->save_xattr = NULL; 1374 if (handler == sd->save_xattr) sd->save_xattr = NULL;
1369 1375
@@ -1378,18 +1384,20 @@ _eio_save_xattr_cleanup(Emotion_Object_Data *sd, Eio_File *handler)
1378static void 1384static void
1379_eio_save_xattr_done(void *data, Eio_File *handler) 1385_eio_save_xattr_done(void *data, Eio_File *handler)
1380{ 1386{
1381 Emotion_Object_Data *sd = data; 1387 Efl_Canvas_Video_Data *sd = data;
1382 1388
1383 efl_event_callback_legacy_call(sd->obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_SUCCEED, NULL); 1389 efl_event_callback_call(sd->obj, EFL_CANVAS_VIDEO_EVENT_POSITION_SAVE_DONE, NULL);
1390 evas_object_smart_callback_call(sd->obj, "position_save,succeed", NULL);
1384 _eio_save_xattr_cleanup(sd, handler); 1391 _eio_save_xattr_cleanup(sd, handler);
1385} 1392}
1386 1393
1387static void 1394static void
1388_eio_save_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED) 1395_eio_save_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED)
1389{ 1396{
1390 Emotion_Object_Data *sd = data; 1397 Efl_Canvas_Video_Data *sd = data;
1391 1398
1392 efl_event_callback_legacy_call(sd->obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_FAILED, NULL); 1399 efl_event_callback_call(sd->obj, EFL_CANVAS_VIDEO_EVENT_POSITION_SAVE_FAIL, NULL);
1400 evas_object_smart_callback_call(sd->obj, "position_save,failed", NULL);
1393 _eio_save_xattr_cleanup(sd, handler); 1401 _eio_save_xattr_cleanup(sd, handler);
1394} 1402}
1395#endif 1403#endif
@@ -1397,7 +1405,7 @@ _eio_save_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED)
1397EAPI void 1405EAPI void
1398emotion_object_last_position_save(Evas_Object *obj) 1406emotion_object_last_position_save(Evas_Object *obj)
1399{ 1407{
1400 Emotion_Object_Data *sd; 1408 Efl_Canvas_Video_Data *sd;
1401 const char *tmp; 1409 const char *tmp;
1402 1410
1403 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1411 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
@@ -1419,17 +1427,22 @@ emotion_object_last_position_save(Evas_Object *obj)
1419 sd); 1427 sd);
1420#else 1428#else
1421 if (eina_xattr_double_set(tmp, "user.e.time_seek", emotion_object_position_get(obj), 0)) 1429 if (eina_xattr_double_set(tmp, "user.e.time_seek", emotion_object_position_get(obj), 0))
1422 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_SUCCEED, NULL); 1430 {
1431 efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_POSITION_SAVE_DONE, NULL);
1432 evas_object_smart_callback_call(obj, "position_save,succeed", NULL);
1433 }
1423 else 1434 else
1424 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_FAILED, NULL); 1435 {
1425 1436 efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_POSITION_SAVE_FAIL, NULL);
1437 evas_object_smart_callback_call(obj, "position_save,failed", NULL);
1438 }
1426#endif 1439#endif
1427} 1440}
1428 1441
1429EAPI void 1442EAPI void
1430emotion_object_suspend_set(Evas_Object *obj, Emotion_Suspend state) 1443emotion_object_suspend_set(Evas_Object *obj, Emotion_Suspend state)
1431{ 1444{
1432 Emotion_Object_Data *sd; 1445 Efl_Canvas_Video_Data *sd;
1433 1446
1434 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1447 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1435 switch (state) 1448 switch (state)
@@ -1451,7 +1464,7 @@ emotion_object_suspend_set(Evas_Object *obj, Emotion_Suspend state)
1451EAPI Emotion_Suspend 1464EAPI Emotion_Suspend
1452emotion_object_suspend_get(Evas_Object *obj) 1465emotion_object_suspend_get(Evas_Object *obj)
1453{ 1466{
1454 Emotion_Object_Data *sd; 1467 Efl_Canvas_Video_Data *sd;
1455 1468
1456 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EMOTION_WAKEUP); 1469 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EMOTION_WAKEUP);
1457 return sd->state; 1470 return sd->state;
@@ -1464,7 +1477,7 @@ emotion_object_suspend_get(Evas_Object *obj)
1464EAPI void * 1477EAPI void *
1465_emotion_video_get(const Evas_Object *obj) 1478_emotion_video_get(const Evas_Object *obj)
1466{ 1479{
1467 Emotion_Object_Data *sd; 1480 Efl_Canvas_Video_Data *sd;
1468 1481
1469 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL); 1482 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
1470 return emotion_engine_instance_data_get(sd->engine_instance); 1483 return emotion_engine_instance_data_get(sd->engine_instance);
@@ -1474,7 +1487,7 @@ static Eina_Bool
1474_emotion_frame_anim(void *data) 1487_emotion_frame_anim(void *data)
1475{ 1488{
1476 Evas_Object *obj = data; 1489 Evas_Object *obj = data;
1477 Emotion_Object_Data *sd; 1490 Efl_Canvas_Video_Data *sd;
1478 1491
1479 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EINA_FALSE); 1492 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EINA_FALSE);
1480 1493
@@ -1483,14 +1496,15 @@ _emotion_frame_anim(void *data)
1483 _emotion_video_pos_update(obj, 1496 _emotion_video_pos_update(obj,
1484 emotion_engine_instance_pos_get(sd->engine_instance), 1497 emotion_engine_instance_pos_get(sd->engine_instance),
1485 emotion_engine_instance_len_get(sd->engine_instance)); 1498 emotion_engine_instance_len_get(sd->engine_instance));
1486 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_FRAME_DECODE, NULL); 1499 efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_FRAME_DECODE, NULL);
1500 evas_object_smart_callback_call(obj, "frame_decode", NULL);
1487 return EINA_FALSE; 1501 return EINA_FALSE;
1488} 1502}
1489 1503
1490EAPI void 1504EAPI void
1491_emotion_frame_new(Evas_Object *obj) 1505_emotion_frame_new(Evas_Object *obj)
1492{ 1506{
1493 Emotion_Object_Data *sd; 1507 Efl_Canvas_Video_Data *sd;
1494 1508
1495 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1509 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1496 if (!sd->anim) sd->anim = ecore_animator_add(_emotion_frame_anim, obj); 1510 if (!sd->anim) sd->anim = ecore_animator_add(_emotion_frame_anim, obj);
@@ -1499,7 +1513,7 @@ _emotion_frame_new(Evas_Object *obj)
1499EAPI void 1513EAPI void
1500_emotion_video_pos_update(Evas_Object *obj, double pos, double len) 1514_emotion_video_pos_update(Evas_Object *obj, double pos, double len)
1501{ 1515{
1502 Emotion_Object_Data *sd; 1516 Efl_Canvas_Video_Data *sd;
1503 int npos = 0, nlen = 0; 1517 int npos = 0, nlen = 0;
1504 1518
1505 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1519 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
@@ -1507,14 +1521,22 @@ _emotion_video_pos_update(Evas_Object *obj, double pos, double len)
1507 if (len != sd->len) nlen = 1; 1521 if (len != sd->len) nlen = 1;
1508 sd->pos = pos; 1522 sd->pos = pos;
1509 sd->len = len; 1523 sd->len = len;
1510 if (npos) efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_POSITION_UPDATE, NULL); 1524 if (npos)
1511 if (nlen) efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_LENGTH_CHANGE, NULL); 1525 {
1526 efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_POSITION_CHANGE, NULL);
1527 evas_object_smart_callback_call(obj, "position_update", NULL);
1528 }
1529 if (nlen)
1530 {
1531 efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_LENGTH_CHANGE, NULL);
1532 evas_object_smart_callback_call(obj, "length_change", NULL);
1533 }
1512} 1534}
1513 1535
1514EAPI void 1536EAPI void
1515_emotion_frame_resize(Evas_Object *obj, int w, int h, double ratio) 1537_emotion_frame_resize(Evas_Object *obj, int w, int h, double ratio)
1516{ 1538{
1517 Emotion_Object_Data *sd; 1539 Efl_Canvas_Video_Data *sd;
1518 double tmp; 1540 double tmp;
1519 int changed = 0; 1541 int changed = 0;
1520 1542
@@ -1537,16 +1559,17 @@ _emotion_frame_resize(Evas_Object *obj, int w, int h, double ratio)
1537 if (changed) 1559 if (changed)
1538 { 1560 {
1539 evas_object_size_hint_request_set(obj, w, h); 1561 evas_object_size_hint_request_set(obj, w, h);
1540 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_FRAME_RESIZE, NULL); 1562 efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_FRAME_RESIZE, NULL);
1563 evas_object_smart_callback_call(obj, "frame_resize", NULL);
1541 evas_object_geometry_get(obj, NULL, NULL, &w, &h); 1564 evas_object_geometry_get(obj, NULL, NULL, &w, &h);
1542 _emotion_object_aspect_border_apply(obj, sd, w, h); 1565 _efl_canvas_video_aspect_border_apply(obj, sd, w, h);
1543 } 1566 }
1544} 1567}
1545 1568
1546EAPI void 1569EAPI void
1547_emotion_image_reset(Evas_Object *obj) 1570_emotion_image_reset(Evas_Object *obj)
1548{ 1571{
1549 Emotion_Object_Data *sd; 1572 Efl_Canvas_Video_Data *sd;
1550 1573
1551 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1574 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1552 _emotion_image_data_zero(sd->obj); 1575 _emotion_image_data_zero(sd->obj);
@@ -1555,20 +1578,20 @@ _emotion_image_reset(Evas_Object *obj)
1555EAPI void 1578EAPI void
1556_emotion_decode_stop(Evas_Object *obj) 1579_emotion_decode_stop(Evas_Object *obj)
1557{ 1580{
1558 Emotion_Object_Data *sd; 1581 Efl_Canvas_Video_Data *sd;
1559 1582
1560 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1583 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1561 if (sd->play) 1584 if (sd->play)
1562 { 1585 {
1563 sd->play = 0; 1586 sd->play = 0;
1564 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_DECODE_STOP, NULL); 1587 evas_object_smart_callback_call(obj, "decode_stop", NULL);
1565 } 1588 }
1566} 1589}
1567 1590
1568EAPI void 1591EAPI void
1569_emotion_open_done(Evas_Object *obj) 1592_emotion_open_done(Evas_Object *obj)
1570{ 1593{
1571 Emotion_Object_Data *sd; 1594 Efl_Canvas_Video_Data *sd;
1572 1595
1573 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1596 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1574 sd->open = 1; 1597 sd->open = 1;
@@ -1577,94 +1600,109 @@ _emotion_open_done(Evas_Object *obj)
1577 emotion_object_position_set(obj, sd->remember_jump); 1600 emotion_object_position_set(obj, sd->remember_jump);
1578 if (sd->remember_play != sd->play) 1601 if (sd->remember_play != sd->play)
1579 emotion_object_play_set(obj, sd->remember_play); 1602 emotion_object_play_set(obj, sd->remember_play);
1580 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_OPEN_DONE, NULL); 1603 efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_OPEN_DONE, NULL);
1581 1604 evas_object_smart_callback_call(obj, "open_done", NULL);
1582} 1605}
1583 1606
1584EAPI void 1607EAPI void
1585_emotion_playback_started(Evas_Object *obj) 1608_emotion_playback_started(Evas_Object *obj)
1586{ 1609{
1587 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, NULL); 1610 efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_PLAYBACK_START, NULL);
1611 evas_object_smart_callback_call(obj, "playback_started", NULL);
1588} 1612}
1589 1613
1590EAPI void 1614EAPI void
1591_emotion_playback_finished(Evas_Object *obj) 1615_emotion_playback_finished(Evas_Object *obj)
1592{ 1616{
1593 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_PLAYBACK_FINISHED, NULL); 1617 Efl_Canvas_Video_Data *sd;
1618
1619 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1620 if (sd->play)
1621 {
1622 sd->play = 0;
1623 efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_PLAYBACK_STOP, NULL);
1624 evas_object_smart_callback_call(obj, "playback_finished", NULL);
1625 }
1594} 1626}
1595 1627
1596EAPI void 1628EAPI void
1597_emotion_audio_level_change(Evas_Object *obj) 1629_emotion_audio_level_change(Evas_Object *obj)
1598{ 1630{
1599 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_AUDIO_LEVEL_CHANGE, NULL); 1631 efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_VOLUME_CHANGE, NULL);
1632 evas_object_smart_callback_call(obj, "audio_level_change", NULL);
1600} 1633}
1601 1634
1602EAPI void 1635EAPI void
1603_emotion_channels_change(Evas_Object *obj) 1636_emotion_channels_change(Evas_Object *obj)
1604{ 1637{
1605 Emotion_Object_Data *sd; 1638 Efl_Canvas_Video_Data *sd;
1606 1639
1607 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1640 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1608 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_CHANNELS_CHANGE, NULL); 1641 efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_CHANNELS_CHANGE, NULL);
1642 evas_object_smart_callback_call(obj, "channels_change", NULL);
1609} 1643}
1610 1644
1611EAPI void 1645EAPI void
1612_emotion_title_set(Evas_Object *obj, char *title) 1646_emotion_title_set(Evas_Object *obj, char *title)
1613{ 1647{
1614 Emotion_Object_Data *sd; 1648 Efl_Canvas_Video_Data *sd;
1615 1649
1616 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1650 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1617 eina_stringshare_replace(&sd->title, title); 1651 eina_stringshare_replace(&sd->title, title);
1618 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_TITLE_CHANGE, NULL); 1652 efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_TITLE_CHANGE, NULL);
1619 1653 evas_object_smart_callback_call(obj, "title_change", NULL);
1620} 1654}
1621 1655
1622EAPI void 1656EAPI void
1623_emotion_progress_set(Evas_Object *obj, char *info, double st) 1657_emotion_progress_set(Evas_Object *obj, char *info, double st)
1624{ 1658{
1625 Emotion_Object_Data *sd; 1659 Efl_Canvas_Video_Data *sd;
1626 1660
1627 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1661 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1628 eina_stringshare_replace(&sd->progress.info, info); 1662 eina_stringshare_replace(&sd->progress.info, info);
1629 sd->progress.stat = st; 1663 sd->progress.stat = st;
1630 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, NULL); 1664 efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_PROGRESS_CHANGE, NULL);
1665 evas_object_smart_callback_call(obj, "progress_change", NULL);
1631} 1666}
1632 1667
1633EAPI void 1668EAPI void
1634_emotion_file_ref_set(Evas_Object *obj, const char *file, int num) 1669_emotion_file_ref_set(Evas_Object *obj, const char *file, int num)
1635{ 1670{
1636 Emotion_Object_Data *sd; 1671 Efl_Canvas_Video_Data *sd;
1637 1672
1638 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1673 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1639 eina_stringshare_replace(&sd->ref.file, file); 1674 eina_stringshare_replace(&sd->ref.file, file);
1640 sd->ref.num = num; 1675 sd->ref.num = num;
1641 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_REF_CHANGE, NULL); 1676 efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_REF_CHANGE, NULL);
1677 evas_object_smart_callback_call(obj, "ref_change", NULL);
1642} 1678}
1643 1679
1644EAPI void 1680EAPI void
1645_emotion_spu_button_num_set(Evas_Object *obj, int num) 1681_emotion_spu_button_num_set(Evas_Object *obj, int num)
1646{ 1682{
1647 Emotion_Object_Data *sd; 1683 Efl_Canvas_Video_Data *sd;
1648 1684
1649 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1685 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1650 sd->spu.button_num = num; 1686 sd->spu.button_num = num;
1651 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_BUTTON_NUM_CHANGE, NULL); 1687 efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_BUTTON_NUM_CHANGE, NULL);
1688 evas_object_smart_callback_call(obj, "button_num_change", NULL);
1652} 1689}
1653 1690
1654EAPI void 1691EAPI void
1655_emotion_spu_button_set(Evas_Object *obj, int button) 1692_emotion_spu_button_set(Evas_Object *obj, int button)
1656{ 1693{
1657 Emotion_Object_Data *sd; 1694 Efl_Canvas_Video_Data *sd;
1658 1695
1659 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1696 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1660 sd->spu.button = button; 1697 sd->spu.button = button;
1661 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_BUTTON_CHANGE, NULL); 1698 efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_BUTTON_CHANGE, NULL);
1699 evas_object_smart_callback_call(obj, "button_change", NULL);
1662} 1700}
1663 1701
1664EAPI void 1702EAPI void
1665_emotion_seek_done(Evas_Object *obj) 1703_emotion_seek_done(Evas_Object *obj)
1666{ 1704{
1667 Emotion_Object_Data *sd; 1705 Efl_Canvas_Video_Data *sd;
1668 1706
1669 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1707 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1670 if (sd->seeking) 1708 if (sd->seeking)
@@ -1677,7 +1715,7 @@ _emotion_seek_done(Evas_Object *obj)
1677EAPI void 1715EAPI void
1678_emotion_frame_refill(Evas_Object *obj, double w, double h) 1716_emotion_frame_refill(Evas_Object *obj, double w, double h)
1679{ 1717{
1680 Emotion_Object_Data *sd; 1718 Efl_Canvas_Video_Data *sd;
1681 1719
1682 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1720 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1683 if ((sd->fill.w != w) || (sd->fill.h != h)) 1721 if ((sd->fill.w != w) || (sd->fill.h != h))
@@ -1713,7 +1751,7 @@ static void
1713_mouse_move(void *data, Evas *ev EINA_UNUSED, Evas_Object *obj, void *event_info) 1751_mouse_move(void *data, Evas *ev EINA_UNUSED, Evas_Object *obj, void *event_info)
1714{ 1752{
1715 Evas_Event_Mouse_Move *e; 1753 Evas_Event_Mouse_Move *e;
1716 Emotion_Object_Data *sd; 1754 Efl_Canvas_Video_Data *sd;
1717 int x, y, iw, ih; 1755 int x, y, iw, ih;
1718 Evas_Coord ox, oy, ow, oh; 1756 Evas_Coord ox, oy, ow, oh;
1719 1757
@@ -1732,7 +1770,7 @@ static void
1732_mouse_down(void *data, Evas *ev EINA_UNUSED, Evas_Object *obj, void *event_info) 1770_mouse_down(void *data, Evas *ev EINA_UNUSED, Evas_Object *obj, void *event_info)
1733{ 1771{
1734 Evas_Event_Mouse_Down *e; 1772 Evas_Event_Mouse_Down *e;
1735 Emotion_Object_Data *sd; 1773 Efl_Canvas_Video_Data *sd;
1736 int x, y, iw, ih; 1774 int x, y, iw, ih;
1737 Evas_Coord ox, oy, ow, oh; 1775 Evas_Coord ox, oy, ow, oh;
1738 1776
@@ -1751,7 +1789,7 @@ static void
1751_pos_set_job(void *data) 1789_pos_set_job(void *data)
1752{ 1790{
1753 Evas_Object *obj; 1791 Evas_Object *obj;
1754 Emotion_Object_Data *sd; 1792 Efl_Canvas_Video_Data *sd;
1755 1793
1756 obj = data; 1794 obj = data;
1757 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1795 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
@@ -1771,7 +1809,7 @@ static void
1771_pixels_get(void *data, Evas_Object *obj) 1809_pixels_get(void *data, Evas_Object *obj)
1772{ 1810{
1773 int iw, ih, w, h; 1811 int iw, ih, w, h;
1774 Emotion_Object_Data *sd; 1812 Efl_Canvas_Video_Data *sd;
1775 Emotion_Format format; 1813 Emotion_Format format;
1776 unsigned char *bgra_data; 1814 unsigned char *bgra_data;
1777 1815
@@ -1829,7 +1867,7 @@ _pixels_get(void *data, Evas_Object *obj)
1829/*******************************************/ 1867/*******************************************/
1830 1868
1831EOLIAN static void 1869EOLIAN static void
1832_emotion_object_efl_canvas_group_group_add(Evas_Object *obj, Emotion_Object_Data *sd) 1870_efl_canvas_video_efl_canvas_group_group_add(Evas_Object *obj, Efl_Canvas_Video_Data *sd)
1833{ 1871{
1834 unsigned int *pixel; 1872 unsigned int *pixel;
1835 1873
@@ -1864,7 +1902,7 @@ _emotion_object_efl_canvas_group_group_add(Evas_Object *obj, Emotion_Object_Data
1864} 1902}
1865 1903
1866EOLIAN static void 1904EOLIAN static void
1867_emotion_object_efl_canvas_group_group_del(Evas_Object *obj EINA_UNUSED, Emotion_Object_Data *sd) 1905_efl_canvas_video_efl_canvas_group_group_del(Evas_Object *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
1868{ 1906{
1869 if (!sd) return; 1907 if (!sd) return;
1870 if (sd->engine_instance) 1908 if (sd->engine_instance)
@@ -1895,7 +1933,7 @@ _emotion_object_efl_canvas_group_group_del(Evas_Object *obj EINA_UNUSED, Emotion
1895} 1933}
1896 1934
1897EOLIAN static void 1935EOLIAN static void
1898_emotion_object_efl_canvas_group_group_move(Evas_Object *obj, Emotion_Object_Data *sd, Evas_Coord x, Evas_Coord y) 1936_efl_canvas_video_efl_canvas_group_group_move(Evas_Object *obj, Efl_Canvas_Video_Data *sd, Evas_Coord x, Evas_Coord y)
1899{ 1937{
1900 int w, h; 1938 int w, h;
1901 1939
@@ -1905,14 +1943,14 @@ _emotion_object_efl_canvas_group_group_move(Evas_Object *obj, Emotion_Object_Dat
1905} 1943}
1906 1944
1907EOLIAN static void 1945EOLIAN static void
1908_emotion_object_efl_canvas_group_group_resize(Evas_Object *obj, Emotion_Object_Data *sd, Evas_Coord w, Evas_Coord h) 1946_efl_canvas_video_efl_canvas_group_group_resize(Evas_Object *obj, Efl_Canvas_Video_Data *sd, Evas_Coord w, Evas_Coord h)
1909{ 1947{
1910 _emotion_object_aspect_border_apply(obj, sd, w, h); 1948 _efl_canvas_video_aspect_border_apply(obj, sd, w, h);
1911 evas_object_resize(sd->bg, w, h); 1949 evas_object_resize(sd->bg, w, h);
1912} 1950}
1913 1951
1914EOLIAN static void 1952EOLIAN static void
1915_emotion_object_efl_canvas_group_group_show(Evas_Object *obj EINA_UNUSED, Emotion_Object_Data *sd) 1953_efl_canvas_video_efl_canvas_group_group_show(Evas_Object *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
1916{ 1954{
1917 int a; 1955 int a;
1918 1956
@@ -1924,7 +1962,7 @@ _emotion_object_efl_canvas_group_group_show(Evas_Object *obj EINA_UNUSED, Emotio
1924} 1962}
1925 1963
1926EOLIAN static void 1964EOLIAN static void
1927_emotion_object_efl_canvas_group_group_hide(Evas_Object *obj EINA_UNUSED, Emotion_Object_Data *sd) 1965_efl_canvas_video_efl_canvas_group_group_hide(Evas_Object *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
1928{ 1966{
1929 evas_object_hide(sd->obj); 1967 evas_object_hide(sd->obj);
1930 if (sd->crop.clipper) evas_object_hide(sd->crop.clipper); 1968 if (sd->crop.clipper) evas_object_hide(sd->crop.clipper);
@@ -1932,14 +1970,14 @@ _emotion_object_efl_canvas_group_group_hide(Evas_Object *obj EINA_UNUSED, Emotio
1932} 1970}
1933 1971
1934EOLIAN static void 1972EOLIAN static void
1935_emotion_object_efl_canvas_group_group_color_set(Evas_Object *obj EINA_UNUSED, Emotion_Object_Data *sd, int r, int g, int b, int a) 1973_efl_canvas_video_efl_canvas_group_group_color_set(Evas_Object *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, int r, int g, int b, int a)
1936{ 1974{
1937 evas_object_color_set(sd->obj, r, g, b, a); 1975 evas_object_color_set(sd->obj, r, g, b, a);
1938 evas_object_color_set(sd->crop.clipper, r, g, b, a); 1976 evas_object_color_set(sd->crop.clipper, r, g, b, a);
1939} 1977}
1940 1978
1941EOLIAN static void 1979EOLIAN static void
1942_emotion_object_efl_canvas_group_group_clip_set(Evas_Object *obj EINA_UNUSED, Emotion_Object_Data *sd, Evas_Object * clip) 1980_efl_canvas_video_efl_canvas_group_group_clip_set(Evas_Object *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, Evas_Object * clip)
1943{ 1981{
1944 if (sd->crop.clipper) evas_object_clip_set(sd->crop.clipper, clip); 1982 if (sd->crop.clipper) evas_object_clip_set(sd->crop.clipper, clip);
1945 else evas_object_clip_set(sd->obj, clip); 1983 else evas_object_clip_set(sd->obj, clip);
@@ -1947,7 +1985,7 @@ _emotion_object_efl_canvas_group_group_clip_set(Evas_Object *obj EINA_UNUSED, Em
1947} 1985}
1948 1986
1949EOLIAN static void 1987EOLIAN static void
1950_emotion_object_efl_canvas_group_group_clip_unset(Evas_Object *obj EINA_UNUSED, Emotion_Object_Data *sd) 1988_efl_canvas_video_efl_canvas_group_group_clip_unset(Evas_Object *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
1951{ 1989{
1952 if (sd->crop.clipper) evas_object_clip_unset(sd->crop.clipper); 1990 if (sd->crop.clipper) evas_object_clip_unset(sd->crop.clipper);
1953 else evas_object_clip_unset(sd->obj); 1991 else evas_object_clip_unset(sd->obj);
@@ -1955,4 +1993,4 @@ _emotion_object_efl_canvas_group_group_clip_unset(Evas_Object *obj EINA_UNUSED,
1955 1993
1956} 1994}
1957 1995
1958#include "emotion_object.eo.c" 1996#include "efl_canvas_video.eo.c"