summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/lib/Emotion.h
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2011-10-05 02:54:27 +0000
committerCedric BAIL <cedric.bail@free.fr>2011-10-05 02:54:27 +0000
commit7c5cbe6e3d59e318d7a273595333f0cab75dcd13 (patch)
treeb3a1ffb5961c363daf7ddf41e0558179c5e68b66 /legacy/emotion/src/lib/Emotion.h
parent2dde82d2168d126465a03e4a2b01b23c6b96f1ed (diff)
emotion: some docs.
SVN revision: 63820
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/lib/Emotion.h195
1 files changed, 185 insertions, 10 deletions
diff --git a/legacy/emotion/src/lib/Emotion.h b/legacy/emotion/src/lib/Emotion.h
index d03e1dc84b..f6b3f57c43 100644
--- a/legacy/emotion/src/lib/Emotion.h
+++ b/legacy/emotion/src/lib/Emotion.h
@@ -202,12 +202,22 @@ enum _Emotion_Vis
202 EMOTION_VIS_LAST /* sentinel */ 202 EMOTION_VIS_LAST /* sentinel */
203}; 203};
204 204
205/**
206 * @enum Emotion_Suspend
207 *
208 * Used for emotion pipeline ressource management.
209 *
210 * @see emotion_object_suspend_set()
211 * @see emotion_object_suspend_get()
212 *
213 * @ingroup Emotion_Ressource
214 */
205typedef enum 215typedef enum
206{ 216{
207 EMOTION_WAKEUP, 217 EMOTION_WAKEUP, /**< pipeline is up and running */
208 EMOTION_SLEEP, 218 EMOTION_SLEEP, /**< turn off hardware ressource usage like overlay */
209 EMOTION_DEEP_SLEEP, 219 EMOTION_DEEP_SLEEP, /**< destroy the pipeline, but keep full resolution pixels output around */
210 EMOTION_HIBERNATE 220 EMOTION_HIBERNATE /**< destroy the pipeline, and keep half resolution or object resolution if lower */
211} Emotion_Suspend; 221} Emotion_Suspend;
212 222
213enum _Emotion_Aspect 223enum _Emotion_Aspect
@@ -309,6 +319,10 @@ extern "C" {
309 * @defgroup Emotion_Info Miscellaneous information retrieval functions 319 * @defgroup Emotion_Info Miscellaneous information retrieval functions
310 */ 320 */
311 321
322/**
323 * @defgroup Emotion_Ressource Video ressource management
324 */
325
312EAPI Eina_Bool emotion_init(void); 326EAPI Eina_Bool emotion_init(void);
313EAPI Eina_Bool emotion_shutdown(void); 327EAPI Eina_Bool emotion_shutdown(void);
314 328
@@ -931,6 +945,17 @@ EAPI void emotion_object_video_mute_set (Evas_Object *obj, Eina_B
931 * @ingroup Emotion_Video 945 * @ingroup Emotion_Video
932 */ 946 */
933EAPI Eina_Bool emotion_object_video_mute_get (const Evas_Object *obj); 947EAPI Eina_Bool emotion_object_video_mute_get (const Evas_Object *obj);
948
949/**
950 * @brief Get the number of available video channel
951 *
952 * @param obj The object which we are retrieving the channel count from
953 * @return the number of available channel.
954 *
955 * @see emotion_object_video_channel_name_get()
956 *
957 * @ingroup Emotion_Video
958 */
934EAPI int emotion_object_video_channel_count (const Evas_Object *obj); 959EAPI int emotion_object_video_channel_count (const Evas_Object *obj);
935EAPI const char *emotion_object_video_channel_name_get(const Evas_Object *obj, int channel); 960EAPI const char *emotion_object_video_channel_name_get(const Evas_Object *obj, int channel);
936EAPI void emotion_object_video_channel_set (Evas_Object *obj, int channel); 961EAPI void emotion_object_video_channel_set (Evas_Object *obj, int channel);
@@ -1041,26 +1066,176 @@ EAPI Emotion_Vis emotion_object_vis_get (const Evas_Object *obj);
1041 */ 1066 */
1042EAPI Eina_Bool emotion_object_vis_supported (const Evas_Object *obj, Emotion_Vis visualization); 1067EAPI Eina_Bool emotion_object_vis_supported (const Evas_Object *obj, Emotion_Vis visualization);
1043 1068
1069/**
1070 * @brief Raise priority of an object so it will have a priviledged access to hardware ressource.
1071 *
1072 * @param obj The object which the query is being ran on.
1073 * @param priority EINA_TRUE means give me a priority access to the hardware ressource.
1074 *
1075 * Hardware have a few dedicated hardware pipeline that process the video at no cost for the CPU.
1076 * Especially on SoC, you mostly have one (on mobile phone SoC) or two (on Set Top Box SoC) when
1077 * Picture in Picture is needed. And most application just have a few video stream that really
1078 * deserve high frame rate, hiogh quality output. That's why this call is for.
1079 *
1080 * Please note that if Emotion can't acquire a priviledged hardware ressource, it will fallback
1081 * to the no-priority path. This work on the first asking first get basis system.
1082 *
1083 * @see emotion_object_priority_get()
1084 *
1085 * @ingroup Emotion_Ressource
1086 */
1044EAPI void emotion_object_priority_set(Evas_Object *obj, Eina_Bool priority); 1087EAPI void emotion_object_priority_set(Evas_Object *obj, Eina_Bool priority);
1088
1089/**
1090 * @brief Get the actual priority of an object.
1091 *
1092 * @param obj The object which the query is being ran on.
1093 * @return EINA_TRUE if the object has a priority access to the hardware.
1094 *
1095 * This actually return the priority status of an object. If it failed to have a priviledged
1096 * access to the hardware, it will return EINA_FALSE.
1097 *
1098 * @see emotion_object_priority_get()
1099 *
1100 * @ingroup Emotion_Ressource
1101 */
1045EAPI Eina_Bool emotion_object_priority_get(const Evas_Object *obj); 1102EAPI Eina_Bool emotion_object_priority_get(const Evas_Object *obj);
1046 1103
1047EAPI void emotion_object_last_position_load (Evas_Object *obj); 1104/**
1048EAPI void emotion_object_last_position_save (Evas_Object *obj); 1105 * @brief Change the state of an object pipeline.
1106 *
1107 * @param obj The object which the query is being ran on.
1108 * @param state The new state for the object.
1109 *
1110 * Changing the state of a pipeline should help preserve the battery of an embedded device.
1111 * But it will only work sanely if the pipeline is not playing at the time you change its
1112 * state. Depending on the engine all state may be not implemented.
1113 *
1114 * @see Emotion_Suspend
1115 * @see emotion_object_suspend_get()
1116 *
1117 * @ingroup Emotion_Ressource
1118 */
1119EAPI void emotion_object_suspend_set(Evas_Object *obj, Emotion_Suspend state);
1049 1120
1050EAPI void emotion_object_suspend_set (Evas_Object *obj, Emotion_Suspend state); 1121/**
1051EAPI Emotion_Suspend emotion_object_suspend_get (Evas_Object *obj); 1122 * @brief Get the current state of the pipeline
1123 *
1124 * @param obj The object which the query is being ran on.
1125 * @return the current state of the pipeline.
1126 *
1127 * @see Emotion_Suspend
1128 * @see emotion_object_suspend_set()
1129 *
1130 * @ingroup Emotion_Ressource
1131 */
1132EAPI Emotion_Suspend emotion_object_suspend_get(Evas_Object *obj);
1052 1133
1134/**
1135 * @brief Load the last known position if available
1136 *
1137 * @param obj The object which the query is being ran on.
1138 *
1139 * By using Xattr, Emotion is able, if the system permitt it, to store and retrieve
1140 * the latest position. It should trigger some smart callback to let the application
1141 * know when it succeed or fail. Every operation is fully asynchronous and not
1142 * linked to the actual engine used to play the vide.
1143 *
1144 * @see emotion_object_last_position_save()
1145 *
1146 * @ingroup Emotion_Info
1147 */
1148EAPI void emotion_object_last_position_load(Evas_Object *obj);
1149
1150/**
1151 * @brief Save the lastest position if possible
1152 *
1153 * @param obj The object which the query is being ran on.
1154 *
1155 * By using Xattr, Emotion is able, if the system permitt it, to store and retrieve
1156 * the latest position. It should trigger some smart callback to let the application
1157 * know when it succeed or fail. Every operation is fully asynchronous and not
1158 * linked to the actual engine used to play the vide.
1159 *
1160 * @see emotion_object_last_position_load()
1161 *
1162 * @ingroup Emotion_Info
1163 */
1164EAPI void emotion_object_last_position_save(Evas_Object *obj);
1165
1166/**
1167 * @brief Do we have a chance to play that file
1168 *
1169 * @param file A stringshared filename that we want to know if Emotion can play.
1170 *
1171 * This just actually look at the extention of the file, it doesn't check the mime-type
1172 * nor if the file is actually sane. So this is just an hint for your application.
1173 *
1174 * @see emotion_object_extension_may_play_get()
1175 */
1053EAPI Eina_Bool emotion_object_extension_may_play_fast_get(const char *file); 1176EAPI Eina_Bool emotion_object_extension_may_play_fast_get(const char *file);
1177
1178/**
1179 * @brief Do we have a chance to play that file
1180 *
1181 * @param file A filename that we want to know if Emotion can play.
1182 *
1183 * This just actually look at the extention of the file, it doesn't check the mime-type
1184 * nor if the file is actually sane. So this is just an hint for your application.
1185 *
1186 * @see emotion_object_extension_may_play_fast_get()
1187 */
1054EAPI Eina_Bool emotion_object_extension_may_play_get(const char *file); 1188EAPI Eina_Bool emotion_object_extension_may_play_get(const char *file);
1055 1189
1190/**
1191 * @brief Get the actual image object that contains the pixels of the video stream
1192 *
1193 * @param obj The object which the query is being ran on.
1194 *
1195 * This function is usefull when you want to get a direct access to the pixels.
1196 *
1197 * @see emotion_object_image_get()
1198 */
1056EAPI Evas_Object *emotion_object_image_get(const Evas_Object *obj); 1199EAPI Evas_Object *emotion_object_image_get(const Evas_Object *obj);
1057 1200
1058typedef struct _Emotion_Webcam Emotion_Webcam; 1201/**
1202 * @defgroup Emotion_Webcam
1203 */
1204
1205typedef struct _Emotion_Webcam Emotion_Webcam; /**< Webcam description */
1059 1206
1060extern int EMOTION_WEBCAM_UPDATE; 1207extern int EMOTION_WEBCAM_UPDATE; /**< Ecore_Event triggered when a new webcam is plugged in */
1061 1208
1209/**
1210 * @brief Get a list of active and available webcam
1211 *
1212 * @return the list of available webcam at the time of the call.
1213 *
1214 * It will return the current live list of webcam. It is updated before
1215 * triggering EMOTION_WEBCAM_UPDATE and should never be modified.
1216 *
1217 * @ingroup Emotion_Webcam
1218 */
1062EAPI const Eina_List *emotion_webcams_get(void); 1219EAPI const Eina_List *emotion_webcams_get(void);
1220
1221/**
1222 * @brief Get the human understandable name of a Webcam
1223 *
1224 * @param ew The webcam to get the name from.
1225 * @return the actual human readable name.
1226 *
1227 * @ingroup Emotion_Webcam
1228 */
1063EAPI const char *emotion_webcam_name_get(const Emotion_Webcam *ew); 1229EAPI const char *emotion_webcam_name_get(const Emotion_Webcam *ew);
1230
1231/**
1232 * @brief Get the uri of a Webcam that will be understood by emotion
1233 *
1234 * @param ew The webcam to get the uri from.
1235 * @return the actual uri that emotion will later understood.
1236 *
1237 * @ingroup Emotion_Webcam
1238 */
1064EAPI const char *emotion_webcam_device_get(const Emotion_Webcam *ew); 1239EAPI const char *emotion_webcam_device_get(const Emotion_Webcam *ew);
1065 1240
1066/** 1241/**