summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/lib/emotion_smart.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2010-09-27 10:11:52 +0000
committerCarsten Haitzler <raster@rasterman.com>2010-09-27 10:11:52 +0000
commit2d488b5d32f3bfa7baedadd272092c74c37f4fb2 (patch)
tree5308eff8e7ac94664a81ec090bb834e484d76cf3 /legacy/emotion/src/lib/emotion_smart.c
parentb04f0b0360b1565487aa183b3a6cffa4c67fd6b3 (diff)
some fixes/improvements to emotion -> foound some buggers in xine -
tried making gst do it - should kind of work. i think gst is broken tho. SVN revision: 52800
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/lib/emotion_smart.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/legacy/emotion/src/lib/emotion_smart.c b/legacy/emotion/src/lib/emotion_smart.c
index 87ca600f28..34b63296f8 100644
--- a/legacy/emotion/src/lib/emotion_smart.c
+++ b/legacy/emotion/src/lib/emotion_smart.c
@@ -47,6 +47,7 @@ struct _Smart_Data
47 47
48 unsigned char play : 1; 48 unsigned char play : 1;
49 unsigned char seek : 1; 49 unsigned char seek : 1;
50 unsigned char seeking : 1;
50 51
51 char *title; 52 char *title;
52 struct { 53 struct {
@@ -99,6 +100,7 @@ static const char SIG_POSITION_UPDATE[] = "position_update";
99static const char SIG_LENGTH_CHANGE[] = "length_change"; 100static const char SIG_LENGTH_CHANGE[] = "length_change";
100static const char SIG_FRAME_RESIZE[] = "frame_resize"; 101static const char SIG_FRAME_RESIZE[] = "frame_resize";
101static const char SIG_DECODE_STOP[] = "decode_stop"; 102static const char SIG_DECODE_STOP[] = "decode_stop";
103static const char SIG_PLAYBACK_STARTED[] = "playback_started";
102static const char SIG_PLAYBACK_FINISHED[] = "playback_finished"; 104static const char SIG_PLAYBACK_FINISHED[] = "playback_finished";
103static const char SIG_AUDIO_LEVEL_CHANGE[] = "audio_level_change"; 105static const char SIG_AUDIO_LEVEL_CHANGE[] = "audio_level_change";
104static const char SIG_CHANNELS_CHANGE[] = "channels_change"; 106static const char SIG_CHANNELS_CHANGE[] = "channels_change";
@@ -107,12 +109,14 @@ static const char SIG_PROGRESS_CHANGE[] = "progress_change";
107static const char SIG_REF_CHANGE[] = "ref_change"; 109static const char SIG_REF_CHANGE[] = "ref_change";
108static const char SIG_BUTTON_NUM_CHANGE[] = "button_num_change"; 110static const char SIG_BUTTON_NUM_CHANGE[] = "button_num_change";
109static const char SIG_BUTTON_CHANGE[] = "button_change"; 111static const char SIG_BUTTON_CHANGE[] = "button_change";
112static const char SIG_OPEN_DONE[] = "open_done";
110static const Evas_Smart_Cb_Description _smart_callbacks[] = { 113static const Evas_Smart_Cb_Description _smart_callbacks[] = {
111 {SIG_FRAME_DECODE, ""}, 114 {SIG_FRAME_DECODE, ""},
112 {SIG_POSITION_UPDATE, ""}, 115 {SIG_POSITION_UPDATE, ""},
113 {SIG_LENGTH_CHANGE, ""}, 116 {SIG_LENGTH_CHANGE, ""},
114 {SIG_FRAME_RESIZE, ""}, 117 {SIG_FRAME_RESIZE, ""},
115 {SIG_DECODE_STOP, ""}, 118 {SIG_DECODE_STOP, ""},
119 {SIG_PLAYBACK_STARTED, ""},
116 {SIG_PLAYBACK_FINISHED, ""}, 120 {SIG_PLAYBACK_FINISHED, ""},
117 {SIG_AUDIO_LEVEL_CHANGE, ""}, 121 {SIG_AUDIO_LEVEL_CHANGE, ""},
118 {SIG_CHANNELS_CHANGE, ""}, 122 {SIG_CHANNELS_CHANGE, ""},
@@ -121,6 +125,7 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
121 {SIG_REF_CHANGE, ""}, 125 {SIG_REF_CHANGE, ""},
122 {SIG_BUTTON_NUM_CHANGE, ""}, 126 {SIG_BUTTON_NUM_CHANGE, ""},
123 {SIG_BUTTON_CHANGE, ""}, 127 {SIG_BUTTON_CHANGE, ""},
128 {SIG_OPEN_DONE, ""},
124 {NULL, NULL} 129 {NULL, NULL}
125}; 130};
126 131
@@ -1014,6 +1019,18 @@ _emotion_decode_stop(Evas_Object *obj)
1014} 1019}
1015 1020
1016EAPI void 1021EAPI void
1022_emotion_open_done(Evas_Object *obj)
1023{
1024 evas_object_smart_callback_call(obj, SIG_OPEN_DONE, NULL);
1025}
1026
1027EAPI void
1028_emotion_playback_started(Evas_Object *obj)
1029{
1030 evas_object_smart_callback_call(obj, SIG_PLAYBACK_STARTED, NULL);
1031}
1032
1033EAPI void
1017_emotion_playback_finished(Evas_Object *obj) 1034_emotion_playback_finished(Evas_Object *obj)
1018{ 1035{
1019 evas_object_smart_callback_call(obj, SIG_PLAYBACK_FINISHED, NULL); 1036 evas_object_smart_callback_call(obj, SIG_PLAYBACK_FINISHED, NULL);
@@ -1089,6 +1106,20 @@ _emotion_spu_button_set(Evas_Object *obj, int button)
1089 evas_object_smart_callback_call(obj, SIG_BUTTON_CHANGE, NULL); 1106 evas_object_smart_callback_call(obj, SIG_BUTTON_CHANGE, NULL);
1090} 1107}
1091 1108
1109EAPI void
1110_emotion_seek_done(Evas_Object *obj)
1111{
1112 Smart_Data *sd;
1113
1114 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1115 if (sd->seeking)
1116 {
1117 sd->seeking = 0;
1118 if (sd->seek) emotion_object_position_set(obj, sd->seek_pos);
1119 }
1120}
1121
1122
1092 1123
1093/****************************/ 1124/****************************/
1094/* Internal object routines */ 1125/* Internal object routines */
@@ -1143,8 +1174,10 @@ _pos_set_job(void *data)
1143 obj = data; 1174 obj = data;
1144 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1175 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1145 sd->job = NULL; 1176 sd->job = NULL;
1177 if (sd->seeking) return;
1146 if (sd->seek) 1178 if (sd->seek)
1147 { 1179 {
1180 sd->seeking = 1;
1148 sd->module->pos_set(sd->video, sd->seek_pos); 1181 sd->module->pos_set(sd->video, sd->seek_pos);
1149 sd->seek = 0; 1182 sd->seek = 0;
1150 } 1183 }