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