emotion: add webcam detection, cleanup code and add timing detection.
[profile/ivi/emotion.git] / src / lib / Emotion.h
1 #ifndef EMOTION_H
2 #define EMOTION_H
3
4 #include <Evas.h>
5
6 #ifdef EAPI
7 # undef EAPI
8 #endif
9
10 #ifdef _WIN32
11 # ifdef EFL_EMOTION_BUILD
12 #  ifdef DLL_EXPORT
13 #   define EAPI __declspec(dllexport)
14 #  else
15 #   define EAPI
16 #  endif /* ! DLL_EXPORT */
17 # else
18 #  define EAPI __declspec(dllimport)
19 # endif /* ! EFL_EMOTION_BUILD */
20 #else
21 # ifdef __GNUC__
22 #  if __GNUC__ >= 4
23 #   define EAPI __attribute__ ((visibility("default")))
24 #  else
25 #   define EAPI
26 #  endif
27 # else
28 #  define EAPI
29 # endif
30 #endif /* ! _WIN32 */
31
32 /**
33  * @file Emotion.h
34  * @brief The file that provides Emotion the API, with functions available for
35  *        play, seek, change volume, etc.
36  */
37
38 enum _Emotion_Module
39 {
40   EMOTION_MODULE_XINE,
41   EMOTION_MODULE_GSTREAMER
42 };
43
44 enum _Emotion_Event
45 {
46    EMOTION_EVENT_MENU1, // Escape Menu
47    EMOTION_EVENT_MENU2, // Title Menu
48    EMOTION_EVENT_MENU3, // Root Menu
49    EMOTION_EVENT_MENU4, // Subpicture Menu
50    EMOTION_EVENT_MENU5, // Audio Menu
51    EMOTION_EVENT_MENU6, // Angle Menu
52    EMOTION_EVENT_MENU7, // Part Menu
53    EMOTION_EVENT_UP,
54    EMOTION_EVENT_DOWN,
55    EMOTION_EVENT_LEFT,
56    EMOTION_EVENT_RIGHT,
57    EMOTION_EVENT_SELECT,
58    EMOTION_EVENT_NEXT,
59    EMOTION_EVENT_PREV,
60    EMOTION_EVENT_ANGLE_NEXT,
61    EMOTION_EVENT_ANGLE_PREV,
62    EMOTION_EVENT_FORCE,
63    EMOTION_EVENT_0,
64    EMOTION_EVENT_1,
65    EMOTION_EVENT_2,
66    EMOTION_EVENT_3,
67    EMOTION_EVENT_4,
68    EMOTION_EVENT_5,
69    EMOTION_EVENT_6,
70    EMOTION_EVENT_7,
71    EMOTION_EVENT_8,
72    EMOTION_EVENT_9,
73    EMOTION_EVENT_10
74 };
75
76 /**
77  * @enum _Emotion_Meta_Info
78  *
79  * Used for retrieving information about the media file being played.
80  *
81  * @see emotion_object_meta_info_get()
82  *
83  * @ingroup Emotion_Info
84  */
85 enum _Emotion_Meta_Info
86 {
87    EMOTION_META_INFO_TRACK_TITLE, /**< track title */
88    EMOTION_META_INFO_TRACK_ARTIST, /**< artist name */
89    EMOTION_META_INFO_TRACK_ALBUM, /**< album name */
90    EMOTION_META_INFO_TRACK_YEAR, /**< track year */
91    EMOTION_META_INFO_TRACK_GENRE, /**< track genre */
92    EMOTION_META_INFO_TRACK_COMMENT, /**< track comments */
93    EMOTION_META_INFO_TRACK_DISC_ID, /**< track disc ID */
94    EMOTION_META_INFO_TRACK_COUNT /**< track count - number of the track in the album */
95 };
96
97 /**
98  * @enum _Emotion_Vis
99  *
100  * Used for displaying a visualization on the emotion object.
101  *
102  * @see emotion_object_vis_set()
103  *
104  * @ingroup Emotion_Visualization
105  */
106 enum _Emotion_Vis
107 {
108   EMOTION_VIS_NONE, /**< no visualization set */
109   EMOTION_VIS_GOOM, /**< goom */
110   EMOTION_VIS_LIBVISUAL_BUMPSCOPE, /**< bumpscope */
111   EMOTION_VIS_LIBVISUAL_CORONA, /**< corona */
112   EMOTION_VIS_LIBVISUAL_DANCING_PARTICLES, /**< dancing particles */
113   EMOTION_VIS_LIBVISUAL_GDKPIXBUF, /**< gdkpixbuf */
114   EMOTION_VIS_LIBVISUAL_G_FORCE, /**< G force */
115   EMOTION_VIS_LIBVISUAL_GOOM, /**< goom */
116   EMOTION_VIS_LIBVISUAL_INFINITE, /**< infinite */
117   EMOTION_VIS_LIBVISUAL_JAKDAW, /**< jakdaw */
118   EMOTION_VIS_LIBVISUAL_JESS, /**< jess */
119   EMOTION_VIS_LIBVISUAL_LV_ANALYSER, /**< lv analyser */
120   EMOTION_VIS_LIBVISUAL_LV_FLOWER, /**< lv flower */
121   EMOTION_VIS_LIBVISUAL_LV_GLTEST, /**< lv gltest */
122   EMOTION_VIS_LIBVISUAL_LV_SCOPE, /**< lv scope */
123   EMOTION_VIS_LIBVISUAL_MADSPIN, /**< madspin */
124   EMOTION_VIS_LIBVISUAL_NEBULUS, /**< nebulus */
125   EMOTION_VIS_LIBVISUAL_OINKSIE, /**< oinksie */
126   EMOTION_VIS_LIBVISUAL_PLASMA, /**< plasma */
127   EMOTION_VIS_LAST /* sentinel */
128 };
129
130 typedef enum
131 {
132   EMOTION_WAKEUP,
133   EMOTION_SLEEP,
134   EMOTION_DEEP_SLEEP,
135   EMOTION_HIBERNATE
136 } Emotion_Suspend;
137
138 typedef enum _Emotion_Module    Emotion_Module;
139 typedef enum _Emotion_Event     Emotion_Event;
140 typedef enum _Emotion_Meta_Info Emotion_Meta_Info; /**< Meta info type to be retrieved. */
141 typedef enum _Emotion_Vis       Emotion_Vis; /**< Type of visualization. */
142
143 #define EMOTION_CHANNEL_AUTO -1
144 #define EMOTION_CHANNEL_DEFAULT 0
145
146 #ifdef __cplusplus
147 extern "C" {
148 #endif
149
150 /* api calls available */
151
152 /**
153  * @brief How to create, initialize, manipulate and connect to signals of an
154  * Emotion object.
155  * @defgroup Emotion_API API available for manipulating Emotion object.
156  *
157  * @{
158  *
159  * Emotion provides an Evas smart object that allows to play, control and
160  * display a video or audio file. The API is synchronous but not everything
161  * happens immediately. There are also some signals to report changed states.
162  *
163  * Basically, once the object is created and initialized, a file will be set to
164  * it, and then it can be resized, moved, and controlled by other Evas object
165  * functions.
166  *
167  * However, the decoding of the music and video occurs not in the Ecore main
168  * loop, but usually in another thread (this depends on the module being used).
169  * The synchronization between this other thread and the main loop not visible
170  * to the end user of the library. The user can just register callbacks to the
171  * available signals to receive information about the changed states, and can
172  * call other functions from the API to request more changes on the current
173  * loaded file.
174  *
175  * There will be a delay between an API being called and it being really
176  * executed, since this request will be done in the main thread, and it needs to
177  * be sent to the decoding thread. For this reason, always call functions like
178  * emotion_object_size_get() or emotion_object_length_get() after some signal
179  * being sent, like "playback_started" or "open_done". @ref
180  * emotion_signals_example.c "This example demonstrates this behavior".
181  *
182  * @section signals Available signals
183  * The Evas_Object returned by emotion_object_add() has a number of signals that
184  * can be listened to using evas' smart callbacks mechanism. All signals have
185  * NULL as event info. The following is a list of interesting signals:
186  * @li "playback_started" - Emitted when the playback starts
187  * @li "playback_finished" - Emitted when the playback finishes
188  * @li "frame_decode" - Emitted every time a frame is decoded
189  * @li "open_done" - Emitted when the media file is opened
190  * @li "position_update" - Emitted when emotion_object_position_set is called
191  * @li "decode_stop" - Emitted after the last frame is decoded
192  *
193  * @section Examples
194  *
195  * The following examples exemplify the emotion usage. There's also the
196  * emotion_test binary that is distributed with this library and cover the
197  * entire API, but since it is too long and repetitive to be explained, its code
198  * is just displayed as another example.
199  *
200  * @li @ref emotion_basic_example_c
201  * @li @ref emotion_signals_example.c "Emotion signals"
202  * @li @ref emotion_test_main.c "emotion_test - full API usage"
203  *
204  */
205
206 /**
207  * @defgroup Emotion_Init Creation and initialization functions
208  */
209
210 /**
211  * @defgroup Emotion_Audio Audio control functions
212  */
213
214 /**
215  * @defgroup Emotion_Video Video control functions
216  */
217
218 /**
219  * @defgroup Emotion_Visualization Visualization control functions
220  */
221
222 /**
223  * @defgroup Emotion_Info Miscellaneous information retrieval functions
224  */
225
226 EAPI Eina_Bool emotion_init(void);
227 EAPI Eina_Bool emotion_shutdown(void);
228
229 /**
230  * @brief Add an emotion object to the canvas.
231  *
232  * @param evas The canvas where the object will be added to.
233  * @return The emotion object just created.
234  *
235  * This function creates an emotion object and adds it to the specified @p evas.
236  * The returned object can be manipulated as any other Evas object, using the
237  * default object manipulation functions - evas_object_*.
238  *
239  * After creating the object with this function, it's still necessary to
240  * initialize it with emotion_object_init(), and if an audio file is going to be
241  * played with this object instead of a video, use
242  * emotion_object_video_mute_set().
243  *
244  * The next step is to open the desired file with emotion_object_file_set(), and
245  * start playing it with emotion_object_play_set().
246  *
247  * @see emotion_object_init()
248  * @see emotion_object_video_mute_set()
249  * @see emotion_object_file_set()
250  * @see emotion_object_play_set()
251  *
252  * @ingroup Emotion_Init
253  */
254 EAPI Evas_Object *emotion_object_add                   (Evas *evas);
255
256 /**
257  * @brief Set the specified option for the current module.
258  *
259  * @param obj The emotion object which the option is being set to.
260  * @param opt The option that is being set. Currently supported optiosn: "video"
261  * and "audio".
262  * @param val The value of the option. Currently only supports "off" (?!?!?!)
263  *
264  * This function allows one to mute the video or audio of the emotion object.
265  *
266  * @note Please don't use this function, consider using
267  * emotion_object_audio_mute_set() and emotion_object_video_mute_set() instead.
268  *
269  * @see emotion_object_audio_mute_set()
270  * @see emotion_object_video_mute_set()
271  *
272  * @ingroup Emotion_Audio
273  * @ingroup Emotion_Video
274  */
275 EAPI void         emotion_object_module_option_set     (Evas_Object *obj, const char *opt, const char *val);
276
277 /**
278  * @brief Initializes an emotion object with the specified module.
279  *
280  * @param obj The emotion object to be initialized.
281  * @param module_filename The name of the module to be used (gstreamer or xine).
282  * @return @c EINA_TRUE if the specified module was successfully initialized for
283  * this object, @c EINA_FALSE otherwise.
284  *
285  * This function is required after creating the emotion object, in order to
286  * specify which module will be used with this object. Different objects can
287  * use different modules to play a media file. The current supported modules are
288  * @b gstreamer and @b xine.
289  *
290  * To use any of them, you need to make sure that support for them was compiled
291  * correctly.
292  *
293  * @note It's possible to disable the build of a module with
294  * --disable-module_name.
295  *
296  * @see emotion_object_add()
297  * @see emotion_object_file_set()
298  *
299  * @ingroup Emotion_Init
300  */
301 EAPI Eina_Bool    emotion_object_init                  (Evas_Object *obj, const char *module_filename);
302
303 /**
304  * @brief Set the file to be played in the Emotion object.
305  *
306  * @param obj The emotion object where the file is being loaded.
307  * @param filename Path to the file to be loaded. It can be absolute or relative
308  * path.
309  * @return EINA_TRUE if the new file could be loaded successfully, and
310  * EINA_FALSE if the file could not be loaded. This happens when the filename is
311  * could not be found, when the module couldn't open the file, when no module is
312  * initialized in this object, or when the @p filename is the same as the
313  * one previously set.
314  *
315  * This function sets the file to be used with this emotion object. If the
316  * object already has another file set, this file will be unset and unloaded,
317  * and the new file will be loaded to this emotion object. The seek position
318  * will be set to 0, and the emotion object will be paused, instead of playing.
319  *
320  * If there was already a filename set, and it's the same as the one being set
321  * now, this function does nothing and returns EINA_FALSE.
322  *
323  * Use @c NULL as argument to @p filename if you want to unload the current file
324  * but don't want to load anything else.
325  *
326  * @see emotion_object_init()
327  * @see emotion_object_play_set()
328  * @see emotion_object_file_get()
329  *
330  * @ingroup Emotion_Init
331  */
332 EAPI Eina_Bool    emotion_object_file_set              (Evas_Object *obj, const char *filename);
333
334 /**
335  * @brief Get the filename of the file associated with the emotion object.
336  *
337  * @param obj The emotion object from which the filename will be retrieved.
338  * @return The path to the file loaded into this emotion object.
339  *
340  * This function returns the path of the file loaded in this emotion object. If
341  * no object is loaded, it will return @c NULL.
342  *
343  * @note Don't free or change the string returned by this function in any way.
344  * If you want to unset it, use @c emotion_object_file_set(obj, NULL).
345  *
346  * @see emotion_object_file_set()
347  *
348  * @ingroup Emotion_Init
349  */
350 EAPI const char  *emotion_object_file_get              (const Evas_Object *obj);
351 /**
352  * @defgroup Emotion_Play Play control functions
353  *
354  * @{
355  */
356 /**
357  *
358  * @brief Set play/pause state of the media file.
359  *
360  * @param obj The emotion object whose state will be changed.
361  * @param play EINA_TRUE to play, EINA_FALSE to pause.
362  *
363  * This functions sets the currently playing status of the video. Using this
364  * function to play or pause the video doesn't alter it's current position.
365  */
366 EAPI void         emotion_object_play_set              (Evas_Object *obj, Eina_Bool play);
367 /**
368  * @brief Get play/pause state of the media file.
369  *
370  * @param obj The emotion object from which the state will be retrieved.
371  * @return EINA_TRUE if playing. EINA_FALSE if not playing.
372  */
373 EAPI Eina_Bool    emotion_object_play_get              (const Evas_Object *obj);
374 /**
375  * @brief Set the position in the media file.
376  *
377  * @param obj The emotion object whose position will be changed.
378  * @param sec The position(in seconds) to which the media file will be set.
379  *
380  * This functions sets the current position of the media file to @p sec, this
381  * only works on seekable streams. Setting the position doesn't change the
382  * playing state of the media file.
383  *
384  * @see emotion_object_seekable_get
385  */
386 EAPI void         emotion_object_position_set          (Evas_Object *obj, double sec);
387 /**
388  * @brief Get the position in the media file.
389  *
390  * @param obj The emotion object from which the position will be retrieved.
391  * @return The position of the media file.
392  *
393  * The position is returned as the number of seconds since the beginning of the
394  * media file.
395  */
396 EAPI double       emotion_object_position_get          (const Evas_Object *obj);
397 /**
398  * @brief Get whether the media file is seekable.
399  *
400  * @param obj The emotion object from which the seekable status will be
401  * retrieved.
402  * @return EINA_TRUE if the media file is seekable, EINA_FALSE otherwise.
403  */
404 EAPI Eina_Bool    emotion_object_seekable_get          (const Evas_Object *obj);
405 /**
406  * @brief Get the length of play for the media file.
407  *
408  * @param obj The emotion object from which the length will be retrieved.
409  * @return The length of the media file in seconds.
410  *
411  * This function returns the length of the media file in seconds.
412  *
413  * @warning This will return 0 if called before the "length_change" signal has,
414  * been emitted.
415  */
416 EAPI double       emotion_object_play_length_get       (const Evas_Object *obj);
417
418 /**
419  * @brief Set the play speed of the media file.
420  *
421  * @param obj The emotion object whose speed will be set.
422  * @param speed The speed to be set in the range [0,infinity)
423  *
424  * This function sets the speed with which the media file will be played. 1.0
425  * represents the normal speed, 2 double speed, 0.5 half speed and so on.
426  *
427  * @warning The only backend that implements this is the experimental VLC
428  * backend.
429  */
430 EAPI void         emotion_object_play_speed_set        (Evas_Object *obj, double speed);
431 /**
432  * @brief Get  the play speed of the media file.
433  *
434  * @param obj The emotion object from which the filename will be retrieved.
435  * @return The current speed of the media file.
436  *
437  * @see emotion_object_play_speed_set
438  */
439 EAPI double       emotion_object_play_speed_get        (const Evas_Object *obj);
440 /**
441  * @brief Get how much of the file has been played.
442  *
443  * @param obj The emotion object from which the filename will be retrieved.
444  * @return The progress of the media file.
445  *
446  * @warning Don't change of free the returned string.
447  * @warning gstreamer xine backends don't implement this(will return NULL).
448  */
449 EAPI const char  *emotion_object_progress_info_get     (const Evas_Object *obj);
450 /**
451  * @brief Get how much of the file has been played.
452  *
453  * @param obj The emotion object from which the filename will be retrieved
454  * @return The progress of the media file.
455  *
456  * This function gets the progress in playing the file, the return value is in
457  * the [0, 1] range.
458  *
459  * @warning gstreamer xine backends don't implement this(will return 0).
460  */
461 EAPI double       emotion_object_progress_status_get   (const Evas_Object *obj);
462 /**
463  * @}
464  */
465 EAPI Eina_Bool    emotion_object_video_handled_get     (const Evas_Object *obj);
466 EAPI Eina_Bool    emotion_object_audio_handled_get     (const Evas_Object *obj);
467
468 /**
469  * @brief Retrieve the video aspect ratio of the media file loaded.
470  *
471  * @param obj The emotion object which the video aspect ratio will be retrieved
472  * from.
473  * @return The video aspect ratio of the file loaded.
474  *
475  * This function returns the video aspect ratio (width / height) of the file
476  * loaded. It can be used to adapt the size of the emotion object in the canvas,
477  * so the aspect won't be changed (by wrongly resizing the object). Or to crop
478  * the video correctly, if necessary.
479  *
480  * @note This function returns the aspect ratio that the video @b should be, but
481  * sometimes the reported size from emotion_object_size_get() represents a
482  * different aspect ratio. You can safely resize the video to respect the aspect
483  * ratio returned by @b this function.
484  *
485  * @see emotion_object_size_get()
486  *
487  * @ingroup Emotion_Video
488  */
489 EAPI double       emotion_object_ratio_get             (const Evas_Object *obj);
490
491 /**
492  * @brief Retrieve the video size of the loaded file.
493  *
494  * @param obj The object from which we are retrieving the video size.
495  * @param iw A pointer to a variable where the width will be stored.
496  * @param iw A pointer to a variable where the height will be stored.
497  *
498  * This function returns the reported size of the loaded video file. If a file
499  * that doesn't contain a video channel is loaded, then this size can be
500  * ignored.
501  *
502  * The value reported by this function should be consistent with the aspect
503  * ratio returned by emotion_object_ratio_get(), but sometimes the information
504  * stored in the file is wrong. So use the ratio size reported by
505  * emotion_object_ratio_get(), since it is more likely going to be accurate.
506  *
507  * @note Use @c NULL for @p iw or @p ih if you don't need one of these values.
508  *
509  * @see emotion_object_ratio_get()
510  *
511  * @ingroup Emotion_Video
512  */
513 EAPI void         emotion_object_size_get              (const Evas_Object *obj, int *iw, int *ih);
514
515 /**
516  * @brief Sets whether to use of high-quality image scaling algorithm
517  * of the given video object.
518  *
519  * When enabled, a higher quality video scaling algorithm is used when
520  * scaling videos to sizes other than the source video. This gives
521  * better results but is more computationally expensive.
522  *
523  * @param obj The given video object.
524  * @param smooth Whether to use smooth scale or not.
525  *
526  * @see emotion_object_smooth_scale_get()
527  *
528  * @ingroup Emotion_Video
529  */
530 EAPI void         emotion_object_smooth_scale_set      (Evas_Object *obj, Eina_Bool smooth);
531
532 /**
533  * @brief Gets whether the high-quality image scaling algorithm
534  * of the given video object is used.
535  *
536  * @param obj The given video object.
537  * @return Whether the smooth scale is used or not.
538  *
539  * @see emotion_object_smooth_scale_set()
540  *
541  * @ingroup Emotion_Video
542  */
543 EAPI Eina_Bool    emotion_object_smooth_scale_get      (const Evas_Object *obj);
544 EAPI void         emotion_object_event_simple_send     (Evas_Object *obj, Emotion_Event ev);
545
546 /**
547  * @brief Set the audio volume.
548  *
549  * @param obj The object where the volume is being set.
550  * @param vol The new volume parameter. Range is from 0.0 to 1.0.
551  *
552  * Sets the audio volume of the stream being played. This has nothing to do with
553  * the system volume. This volume will be multiplied by the system volume. e.g.:
554  * if the current volume level is 0.5, and the system volume is 50%, it will be
555  * 0.5 * 0.5 = 0.25.
556  *
557  * The default value depends on the module used. This value doesn't get changed
558  * when another file is loaded.
559  *
560  * @see emotion_object_audio_volume_get()
561  *
562  * @ingroup Emotion_Audio
563  */
564 EAPI void         emotion_object_audio_volume_set      (Evas_Object *obj, double vol);
565
566 /**
567  * @brief Get the audio volume.
568  *
569  * @param obj The object from which we are retrieving the volume.
570  * @return The current audio volume level for this object.
571  *
572  * Get the current value for the audio volume level. Range is from 0.0 to 1.0.
573  * This volume is set with emotion_object_audio_volume_set().
574  *
575  * @see emotion_object_audio_volume_set()
576  *
577  * @ingroup Emotion_Audio
578  */
579 EAPI double       emotion_object_audio_volume_get      (const Evas_Object *obj);
580
581 /**
582  * @brief Set the mute audio option for this object.
583  *
584  * @param obj The object which we are setting the mute audio option.
585  * @param mute Whether the audio should be muted (@c EINA_TRUE) or not (@c
586  * EINA_FALSE).
587  *
588  * This function sets the mute audio option for this emotion object. The current
589  * module used for this object can use this to avoid decoding the audio portion
590  * of the loaded media file.
591  *
592  * @see emotion_object_audio_mute_get()
593  * @see emotion_object_video_mute_set()
594  *
595  * @ingroup Emotion_Audio
596  */
597 EAPI void         emotion_object_audio_mute_set        (Evas_Object *obj, Eina_Bool mute);
598
599 /**
600  * @brief Get the mute audio option of this object.
601  *
602  * @param obj The object which we are retrieving the mute audio option from.
603  * @return Whether the audio is muted (@c EINA_TRUE) or not (@c EINA_FALSE).
604  *
605  * This function return the mute audio option from this emotion object. It can
606  * be set with emotion_object_audio_mute_set().
607  *
608  * @see emotion_object_audio_mute_set()
609  *
610  * @ingroup Emotion_Audio
611  */
612 EAPI Eina_Bool    emotion_object_audio_mute_get        (const Evas_Object *obj);
613 EAPI int          emotion_object_audio_channel_count   (const Evas_Object *obj);
614 EAPI const char  *emotion_object_audio_channel_name_get(const Evas_Object *obj, int channel);
615 EAPI void         emotion_object_audio_channel_set     (Evas_Object *obj, int channel);
616 EAPI int          emotion_object_audio_channel_get     (const Evas_Object *obj);
617
618 /**
619  * @brief Set the mute video option for this object.
620  *
621  * @param obj The object which we are setting the mute video option.
622  * @param mute Whether the video should be muted (@c EINA_TRUE) or not (@c
623  * EINA_FALSE).
624  *
625  * This function sets the mute video option for this emotion object. The
626  * current module used for this object can use this information to avoid
627  * decoding the video portion of the loaded media file.
628  *
629  * @see emotion_object_video_mute_get()
630  * @see emotion_object_audio_mute_set()
631  *
632  * @ingroup Emotion_Video
633  */
634 EAPI void         emotion_object_video_mute_set        (Evas_Object *obj, Eina_Bool mute);
635
636 /**
637  * @brief Get the mute video option of this object.
638  *
639  * @param obj The object which we are retrieving the mute video option from.
640  * @return Whether the video is muted (@c EINA_TRUE) or not (@c EINA_FALSE).
641  *
642  * This function returns the mute video option from this emotion object. It can
643  * be set with emotion_object_video_mute_set().
644  *
645  * @see emotion_object_video_mute_set()
646  *
647  * @ingroup Emotion_Video
648  */
649 EAPI Eina_Bool    emotion_object_video_mute_get        (const Evas_Object *obj);
650 EAPI int          emotion_object_video_channel_count   (const Evas_Object *obj);
651 EAPI const char  *emotion_object_video_channel_name_get(const Evas_Object *obj, int channel);
652 EAPI void         emotion_object_video_channel_set     (Evas_Object *obj, int channel);
653 EAPI int          emotion_object_video_channel_get     (const Evas_Object *obj);
654 EAPI void         emotion_object_spu_mute_set          (Evas_Object *obj, Eina_Bool mute);
655 EAPI Eina_Bool    emotion_object_spu_mute_get          (const Evas_Object *obj);
656 EAPI int          emotion_object_spu_channel_count     (const Evas_Object *obj);
657 EAPI const char  *emotion_object_spu_channel_name_get  (const Evas_Object *obj, int channel);
658 EAPI void         emotion_object_spu_channel_set       (Evas_Object *obj, int channel);
659 EAPI int          emotion_object_spu_channel_get       (const Evas_Object *obj);
660 EAPI int          emotion_object_chapter_count         (const Evas_Object *obj);
661 EAPI void         emotion_object_chapter_set           (Evas_Object *obj, int chapter);
662 EAPI int          emotion_object_chapter_get           (const Evas_Object *obj);
663 EAPI const char  *emotion_object_chapter_name_get      (const Evas_Object *obj, int chapter);
664 EAPI void         emotion_object_eject                 (Evas_Object *obj);
665
666 /**
667  * @brief Get the dvd title from this emotion object.
668  *
669  * @param obj The object which the title will be retrieved from.
670  * @return A string containing the title.
671  *
672  * This function is only useful when playing a DVD.
673  *
674  * @note Don't change or free the string returned by this function.
675  *
676  * @ingroup Emotion_Info
677  */
678 EAPI const char  *emotion_object_title_get             (const Evas_Object *obj);
679 EAPI const char  *emotion_object_ref_file_get          (const Evas_Object *obj);
680 EAPI int          emotion_object_ref_num_get           (const Evas_Object *obj);
681 EAPI int          emotion_object_spu_button_count_get  (const Evas_Object *obj);
682 EAPI int          emotion_object_spu_button_get        (const Evas_Object *obj);
683
684 /**
685  * @brief Retrieve meta information from this file being played.
686  *
687  * @param obj The object which the meta info will be extracted from.
688  * @param meta The type of meta information that will be extracted.
689  *
690  * This function retrieves information about the file loaded. It can retrieve
691  * the track title, artist name, album name, etc. See @ref Emotion_Meta_Info
692  * for all the possibilities.
693  *
694  * The meta info may be not available on all types of files. It will return @c
695  * NULL if the the file doesn't have meta info, or if this specific field is
696  * empty.
697  *
698  * @note Don't change or free the string returned by this function.
699  *
700  * @see Emotion_Meta_Info
701  *
702  * @ingroup Emotion_Info
703  */
704 EAPI const char  *emotion_object_meta_info_get         (const Evas_Object *obj, Emotion_Meta_Info meta);
705
706 /**
707  * @brief Set the visualization to be used with this object.
708  *
709  * @param obj The object where the visualization will be set on.
710  * @param visualization The type of visualization to be used.
711  *
712  * The @p visualization specified will be played instead of a video. This is
713  * commonly used to display a visualization for audio only files (musics).
714  *
715  * The available visualizations are @ref Emotion_Vis.
716  *
717  * @see Emotion_Vis
718  * @see emotion_object_vis_get()
719  * @see emotion_object_vis_supported()
720  *
721  * @ingroup Emotion_Visualization
722  */
723 EAPI void         emotion_object_vis_set               (Evas_Object *obj, Emotion_Vis visualization);
724
725 /**
726  * @brief Get the type of visualization in use by this emotion object.
727  *
728  * @param obj The emotion object which the visualization is being retrieved
729  * from.
730  * @return The type of visualization in use by this object.
731  *
732  * The type of visualization can be set by emotion_object_vis_set().
733  *
734  * @see Emotion_Vis
735  * @see emotion_object_vis_set()
736  * @see emotion_object_vis_supported()
737  *
738  * @ingroup Emotion_Visualization
739  */
740 EAPI Emotion_Vis  emotion_object_vis_get               (const Evas_Object *obj);
741
742 /**
743  * @brief Query whether a type of visualization is supported by this object.
744  *
745  * @param obj The object which the query is being ran on.
746  * @param visualization The type of visualization that is being queried.
747  * @return EINA_TRUE if the visualization is supported, EINA_FALSE otherwise.
748  *
749  * This can be used to check if a visualization is supported. e.g.: one wants to
750  * display a list of available visualizations for a specific object.
751  *
752  * @see Emotion_Vis
753  * @see emotion_object_vis_set()
754  * @see emotion_object_vis_get()
755  *
756  * @ingroup Emotion_Visualization
757  */
758 EAPI Eina_Bool    emotion_object_vis_supported         (const Evas_Object *obj, Emotion_Vis visualization);
759
760 EAPI void         emotion_object_last_position_load    (Evas_Object *obj);
761 EAPI void         emotion_object_last_position_save    (Evas_Object *obj);
762
763 EAPI void         emotion_object_suspend_set           (Evas_Object *obj, Emotion_Suspend state);
764 EAPI Emotion_Suspend emotion_object_suspend_get        (Evas_Object *obj);
765
766 EAPI Eina_Bool    emotion_object_extension_may_play_fast_get(const char *file);
767 EAPI Eina_Bool    emotion_object_extension_may_play_get(const char *file);
768
769 typedef struct _Emotion_Webcam Emotion_Webcam;
770
771 EAPI const Eina_List *emotion_webcams_get(void);
772 EAPI const char      *emotion_webcam_name_get(Emotion_Webcam *ew);
773 EAPI const char      *emotion_webcam_device_get(Emotion_Webcam *ew);
774
775 /**
776  * @}
777  */
778
779 #ifdef __cplusplus
780 }
781 #endif
782
783 #endif