6 * @brief Emotion Media Library
8 * These routines are used for Emotion.
13 * @mainpage Emotion Library Documentation
18 * @section intro What is Emotion?
20 * A media object library for Evas and Ecore.
22 * Emotion is a library that allows playing audio and video files, using one of
23 * its backends (gstreamer or xine).
25 * It is integrated into Ecore through its mainloop, and is transparent to the
26 * user of the library how the decoding of audio and video is being done. Once
27 * the objects are created, the user can set callbacks to the specific events
28 * and set options to this object, all in the main loop (no threads are needed).
30 * Emotion is also integrated with Evas. The emotion object returned by
31 * emotion_object_add() is an Evas smart object, so it can be manipulated with
32 * default Evas object functions. Callbacks can be added to the signals emitted
33 * by this object with evas_object_smart_callback_add().
35 * @section work How does Emotion work?
37 * The Emotion library uses Evas smart objects to allow you to manipulate the
38 * created object as any other Evas object, and to connect to its signals,
39 * handling them when needed. It's also possible to swallow Emotion objects
40 * inside Edje themes, and expect it to behave as a normal image or rectangle
41 * when regarding to its dimensions.
43 * To instantiate an Emotion object, the simple code below is enough:
46 * em = emotion_object_add(e);
47 * emotion_object_init(em, NULL);
49 * emotion_object_file_set(em, file_path);
51 * evas_object_move(em, 0, 0);
52 * evas_object_resize(em, WIDTH, HEIGHT);
53 * evas_object_show(em);
55 * emotion_object_play_set(em, EINA_TRUE);
58 * See the @ref Emotion_API for a better reference.
60 * Please see the @ref authors page for contact details.
66 * @page authors Authors
68 * @author Carsten Haitzler <raster@rasterman.com>
69 * @author Vincent Torri <torri@maths.univ-evry.fr>
70 * @author Nicolas Aguirre <aguirre.nicolas@gmail.com>
71 * @author Sebastian Dransfeld <sd@tango.flipp.net>
72 * @author Cedric Bail <cedric.bail@free.fr>
74 * Please contact <enlightenment-devel@lists.sourceforge.net> to get in
75 * contact with the developers and maintainers.
86 # ifdef EFL_EMOTION_BUILD
88 # define EAPI __declspec(dllexport)
91 # endif /* ! DLL_EXPORT */
93 # define EAPI __declspec(dllimport)
94 # endif /* ! EFL_EMOTION_BUILD */
98 # define EAPI __attribute__ ((visibility("default")))
105 #endif /* ! _WIN32 */
109 * @brief The file that provides Emotion the API, with functions available for
110 * play, seek, change volume, etc.
116 EMOTION_MODULE_GSTREAMER
121 EMOTION_EVENT_MENU1, // Escape Menu
122 EMOTION_EVENT_MENU2, // Title Menu
123 EMOTION_EVENT_MENU3, // Root Menu
124 EMOTION_EVENT_MENU4, // Subpicture Menu
125 EMOTION_EVENT_MENU5, // Audio Menu
126 EMOTION_EVENT_MENU6, // Angle Menu
127 EMOTION_EVENT_MENU7, // Part Menu
132 EMOTION_EVENT_SELECT,
135 EMOTION_EVENT_ANGLE_NEXT,
136 EMOTION_EVENT_ANGLE_PREV,
152 * @enum _Emotion_Meta_Info
154 * Used for retrieving information about the media file being played.
156 * @see emotion_object_meta_info_get()
158 * @ingroup Emotion_Info
160 enum _Emotion_Meta_Info
162 EMOTION_META_INFO_TRACK_TITLE, /**< track title */
163 EMOTION_META_INFO_TRACK_ARTIST, /**< artist name */
164 EMOTION_META_INFO_TRACK_ALBUM, /**< album name */
165 EMOTION_META_INFO_TRACK_YEAR, /**< track year */
166 EMOTION_META_INFO_TRACK_GENRE, /**< track genre */
167 EMOTION_META_INFO_TRACK_COMMENT, /**< track comments */
168 EMOTION_META_INFO_TRACK_DISC_ID, /**< track disc ID */
169 EMOTION_META_INFO_TRACK_COUNT /**< track count - number of the track in the album */
175 * Used for displaying a visualization on the emotion object.
177 * @see emotion_object_vis_set()
179 * @ingroup Emotion_Visualization
183 EMOTION_VIS_NONE, /**< no visualization set */
184 EMOTION_VIS_GOOM, /**< goom */
185 EMOTION_VIS_LIBVISUAL_BUMPSCOPE, /**< bumpscope */
186 EMOTION_VIS_LIBVISUAL_CORONA, /**< corona */
187 EMOTION_VIS_LIBVISUAL_DANCING_PARTICLES, /**< dancing particles */
188 EMOTION_VIS_LIBVISUAL_GDKPIXBUF, /**< gdkpixbuf */
189 EMOTION_VIS_LIBVISUAL_G_FORCE, /**< G force */
190 EMOTION_VIS_LIBVISUAL_GOOM, /**< goom */
191 EMOTION_VIS_LIBVISUAL_INFINITE, /**< infinite */
192 EMOTION_VIS_LIBVISUAL_JAKDAW, /**< jakdaw */
193 EMOTION_VIS_LIBVISUAL_JESS, /**< jess */
194 EMOTION_VIS_LIBVISUAL_LV_ANALYSER, /**< lv analyser */
195 EMOTION_VIS_LIBVISUAL_LV_FLOWER, /**< lv flower */
196 EMOTION_VIS_LIBVISUAL_LV_GLTEST, /**< lv gltest */
197 EMOTION_VIS_LIBVISUAL_LV_SCOPE, /**< lv scope */
198 EMOTION_VIS_LIBVISUAL_MADSPIN, /**< madspin */
199 EMOTION_VIS_LIBVISUAL_NEBULUS, /**< nebulus */
200 EMOTION_VIS_LIBVISUAL_OINKSIE, /**< oinksie */
201 EMOTION_VIS_LIBVISUAL_PLASMA, /**< plasma */
202 EMOTION_VIS_LAST /* sentinel */
213 typedef enum _Emotion_Module Emotion_Module;
214 typedef enum _Emotion_Event Emotion_Event;
215 typedef enum _Emotion_Meta_Info Emotion_Meta_Info; /**< Meta info type to be retrieved. */
216 typedef enum _Emotion_Vis Emotion_Vis; /**< Type of visualization. */
218 #define EMOTION_CHANNEL_AUTO -1
219 #define EMOTION_CHANNEL_DEFAULT 0
225 /* api calls available */
228 * @brief How to create, initialize, manipulate and connect to signals of an
230 * @defgroup Emotion_API API available for manipulating Emotion object.
234 * Emotion provides an Evas smart object that allows to play, control and
235 * display a video or audio file. The API is synchronous but not everything
236 * happens immediately. There are also some signals to report changed states.
238 * Basically, once the object is created and initialized, a file will be set to
239 * it, and then it can be resized, moved, and controlled by other Evas object
242 * However, the decoding of the music and video occurs not in the Ecore main
243 * loop, but usually in another thread (this depends on the module being used).
244 * The synchronization between this other thread and the main loop not visible
245 * to the end user of the library. The user can just register callbacks to the
246 * available signals to receive information about the changed states, and can
247 * call other functions from the API to request more changes on the current
250 * There will be a delay between an API being called and it being really
251 * executed, since this request will be done in the main thread, and it needs to
252 * be sent to the decoding thread. For this reason, always call functions like
253 * emotion_object_size_get() or emotion_object_length_get() after some signal
254 * being sent, like "playback_started" or "open_done". @ref
255 * emotion_signals_example.c "This example demonstrates this behavior".
257 * @section signals Available signals
258 * The Evas_Object returned by emotion_object_add() has a number of signals that
259 * can be listened to using evas' smart callbacks mechanism. All signals have
260 * NULL as event info. The following is a list of interesting signals:
261 * @li "playback_started" - Emitted when the playback starts
262 * @li "playback_finished" - Emitted when the playback finishes
263 * @li "frame_decode" - Emitted every time a frame is decoded
264 * @li "open_done" - Emitted when the media file is opened
265 * @li "position_update" - Emitted when emotion_object_position_set is called
266 * @li "decode_stop" - Emitted after the last frame is decoded
270 * The following examples exemplify the emotion usage. There's also the
271 * emotion_test binary that is distributed with this library and cover the
272 * entire API, but since it is too long and repetitive to be explained, its code
273 * is just displayed as another example.
275 * @li @ref emotion_basic_example_c
276 * @li @ref emotion_signals_example.c "Emotion signals"
277 * @li @ref emotion_test_main.c "emotion_test - full API usage"
282 * @defgroup Emotion_Init Creation and initialization functions
286 * @defgroup Emotion_Audio Audio control functions
290 * @defgroup Emotion_Video Video control functions
294 * @defgroup Emotion_Visualization Visualization control functions
298 * @defgroup Emotion_Info Miscellaneous information retrieval functions
301 EAPI Eina_Bool emotion_init(void);
302 EAPI Eina_Bool emotion_shutdown(void);
305 * @brief Add an emotion object to the canvas.
307 * @param evas The canvas where the object will be added to.
308 * @return The emotion object just created.
310 * This function creates an emotion object and adds it to the specified @p evas.
311 * The returned object can be manipulated as any other Evas object, using the
312 * default object manipulation functions - evas_object_*.
314 * After creating the object with this function, it's still necessary to
315 * initialize it with emotion_object_init(), and if an audio file is going to be
316 * played with this object instead of a video, use
317 * emotion_object_video_mute_set().
319 * The next step is to open the desired file with emotion_object_file_set(), and
320 * start playing it with emotion_object_play_set().
322 * @see emotion_object_init()
323 * @see emotion_object_video_mute_set()
324 * @see emotion_object_file_set()
325 * @see emotion_object_play_set()
327 * @ingroup Emotion_Init
329 EAPI Evas_Object *emotion_object_add (Evas *evas);
332 * @brief Set the specified option for the current module.
334 * @param obj The emotion object which the option is being set to.
335 * @param opt The option that is being set. Currently supported optiosn: "video"
337 * @param val The value of the option. Currently only supports "off" (?!?!?!)
339 * This function allows one to mute the video or audio of the emotion object.
341 * @note Please don't use this function, consider using
342 * emotion_object_audio_mute_set() and emotion_object_video_mute_set() instead.
344 * @see emotion_object_audio_mute_set()
345 * @see emotion_object_video_mute_set()
347 * @ingroup Emotion_Audio
348 * @ingroup Emotion_Video
350 EAPI void emotion_object_module_option_set (Evas_Object *obj, const char *opt, const char *val);
353 * @brief Initializes an emotion object with the specified module.
355 * @param obj The emotion object to be initialized.
356 * @param module_filename The name of the module to be used (gstreamer or xine).
357 * @return @c EINA_TRUE if the specified module was successfully initialized for
358 * this object, @c EINA_FALSE otherwise.
360 * This function is required after creating the emotion object, in order to
361 * specify which module will be used with this object. Different objects can
362 * use different modules to play a media file. The current supported modules are
363 * @b gstreamer and @b xine.
365 * To use any of them, you need to make sure that support for them was compiled
368 * @note It's possible to disable the build of a module with
369 * --disable-module_name.
371 * @see emotion_object_add()
372 * @see emotion_object_file_set()
374 * @ingroup Emotion_Init
376 EAPI Eina_Bool emotion_object_init (Evas_Object *obj, const char *module_filename);
379 * @brief Set the file to be played in the Emotion object.
381 * @param obj The emotion object where the file is being loaded.
382 * @param filename Path to the file to be loaded. It can be absolute or relative
384 * @return EINA_TRUE if the new file could be loaded successfully, and
385 * EINA_FALSE if the file could not be loaded. This happens when the filename is
386 * could not be found, when the module couldn't open the file, when no module is
387 * initialized in this object, or when the @p filename is the same as the
388 * one previously set.
390 * This function sets the file to be used with this emotion object. If the
391 * object already has another file set, this file will be unset and unloaded,
392 * and the new file will be loaded to this emotion object. The seek position
393 * will be set to 0, and the emotion object will be paused, instead of playing.
395 * If there was already a filename set, and it's the same as the one being set
396 * now, this function does nothing and returns EINA_FALSE.
398 * Use @c NULL as argument to @p filename if you want to unload the current file
399 * but don't want to load anything else.
401 * @see emotion_object_init()
402 * @see emotion_object_play_set()
403 * @see emotion_object_file_get()
405 * @ingroup Emotion_Init
407 EAPI Eina_Bool emotion_object_file_set (Evas_Object *obj, const char *filename);
410 * @brief Get the filename of the file associated with the emotion object.
412 * @param obj The emotion object from which the filename will be retrieved.
413 * @return The path to the file loaded into this emotion object.
415 * This function returns the path of the file loaded in this emotion object. If
416 * no object is loaded, it will return @c NULL.
418 * @note Don't free or change the string returned by this function in any way.
419 * If you want to unset it, use @c emotion_object_file_set(obj, NULL).
421 * @see emotion_object_file_set()
423 * @ingroup Emotion_Init
425 EAPI const char *emotion_object_file_get (const Evas_Object *obj);
427 * @defgroup Emotion_Play Play control functions
433 * @brief Set play/pause state of the media file.
435 * @param obj The emotion object whose state will be changed.
436 * @param play EINA_TRUE to play, EINA_FALSE to pause.
438 * This functions sets the currently playing status of the video. Using this
439 * function to play or pause the video doesn't alter it's current position.
441 EAPI void emotion_object_play_set (Evas_Object *obj, Eina_Bool play);
443 * @brief Get play/pause state of the media file.
445 * @param obj The emotion object from which the state will be retrieved.
446 * @return EINA_TRUE if playing. EINA_FALSE if not playing.
448 EAPI Eina_Bool emotion_object_play_get (const Evas_Object *obj);
450 * @brief Set the position in the media file.
452 * @param obj The emotion object whose position will be changed.
453 * @param sec The position(in seconds) to which the media file will be set.
455 * This functions sets the current position of the media file to @p sec, this
456 * only works on seekable streams. Setting the position doesn't change the
457 * playing state of the media file.
459 * @see emotion_object_seekable_get
461 EAPI void emotion_object_position_set (Evas_Object *obj, double sec);
463 * @brief Get the position in the media file.
465 * @param obj The emotion object from which the position will be retrieved.
466 * @return The position of the media file.
468 * The position is returned as the number of seconds since the beginning of the
471 EAPI double emotion_object_position_get (const Evas_Object *obj);
473 * @brief Get whether the media file is seekable.
475 * @param obj The emotion object from which the seekable status will be
477 * @return EINA_TRUE if the media file is seekable, EINA_FALSE otherwise.
479 EAPI Eina_Bool emotion_object_seekable_get (const Evas_Object *obj);
481 * @brief Get the length of play for the media file.
483 * @param obj The emotion object from which the length will be retrieved.
484 * @return The length of the media file in seconds.
486 * This function returns the length of the media file in seconds.
488 * @warning This will return 0 if called before the "length_change" signal has,
491 EAPI double emotion_object_play_length_get (const Evas_Object *obj);
494 * @brief Set the play speed of the media file.
496 * @param obj The emotion object whose speed will be set.
497 * @param speed The speed to be set in the range [0,infinity)
499 * This function sets the speed with which the media file will be played. 1.0
500 * represents the normal speed, 2 double speed, 0.5 half speed and so on.
502 * @warning The only backend that implements this is the experimental VLC
505 EAPI void emotion_object_play_speed_set (Evas_Object *obj, double speed);
507 * @brief Get the play speed of the media file.
509 * @param obj The emotion object from which the filename will be retrieved.
510 * @return The current speed of the media file.
512 * @see emotion_object_play_speed_set
514 EAPI double emotion_object_play_speed_get (const Evas_Object *obj);
516 * @brief Get how much of the file has been played.
518 * @param obj The emotion object from which the filename will be retrieved.
519 * @return The progress of the media file.
521 * @warning Don't change of free the returned string.
522 * @warning gstreamer xine backends don't implement this(will return NULL).
524 EAPI const char *emotion_object_progress_info_get (const Evas_Object *obj);
526 * @brief Get how much of the file has been played.
528 * @param obj The emotion object from which the filename will be retrieved
529 * @return The progress of the media file.
531 * This function gets the progress in playing the file, the return value is in
534 * @warning gstreamer xine backends don't implement this(will return 0).
536 EAPI double emotion_object_progress_status_get (const Evas_Object *obj);
540 EAPI Eina_Bool emotion_object_video_handled_get (const Evas_Object *obj);
541 EAPI Eina_Bool emotion_object_audio_handled_get (const Evas_Object *obj);
544 * @brief Retrieve the video aspect ratio of the media file loaded.
546 * @param obj The emotion object which the video aspect ratio will be retrieved
548 * @return The video aspect ratio of the file loaded.
550 * This function returns the video aspect ratio (width / height) of the file
551 * loaded. It can be used to adapt the size of the emotion object in the canvas,
552 * so the aspect won't be changed (by wrongly resizing the object). Or to crop
553 * the video correctly, if necessary.
555 * The described behavior can be applied like following. Consider a given
556 * emotion object that we want to position inside an area, which we will
557 * represent by @c w and @c h. Since we want to position this object either
558 * stretching, or filling the entire area but overflowing the video, or just
559 * adjust the video to fit inside the area without keeping the aspect ratio, we
560 * must compare the video aspect ratio with the area aspect ratio:
562 * int w = 200, h = 300; // an arbitrary value which represents the area where
563 * // the video would be placed
565 * double r, vr = emotion_object_ratio_get(obj);
569 * Now, if we want to make the video fit inside the area, the following code
572 * if (vr > r) // the video is wider than the area
577 * else // the video is taller than the area
582 * evas_object_resize(obj, vw, vh);
585 * And for keeping the aspect ratio but making the video fill the entire area,
586 * overflowing the content which can't fit inside it, we would do:
588 * if (vr > r) // the video is wider than the area
593 * else // the video is taller than the area
598 * evas_object_resize(obj, vw, vh);
601 * Finally, by just resizing the video to the video area, we would have the
606 * evas_object_resize(obj, vw, vh);
609 * The following diagram exemplifies what would happen to the video,
610 * respectively, in each case:
612 * @image html emotion_ratio.png
613 * @image latex emotion_ratio.eps width=\textwidth
615 * @note This function returns the aspect ratio that the video @b should be, but
616 * sometimes the reported size from emotion_object_size_get() represents a
617 * different aspect ratio. You can safely resize the video to respect the aspect
618 * ratio returned by @b this function.
620 * @see emotion_object_size_get()
622 * @ingroup Emotion_Video
624 EAPI double emotion_object_ratio_get (const Evas_Object *obj);
627 * @brief Retrieve the video size of the loaded file.
629 * @param obj The object from which we are retrieving the video size.
630 * @param iw A pointer to a variable where the width will be stored.
631 * @param iw A pointer to a variable where the height will be stored.
633 * This function returns the reported size of the loaded video file. If a file
634 * that doesn't contain a video channel is loaded, then this size can be
637 * The value reported by this function should be consistent with the aspect
638 * ratio returned by emotion_object_ratio_get(), but sometimes the information
639 * stored in the file is wrong. So use the ratio size reported by
640 * emotion_object_ratio_get(), since it is more likely going to be accurate.
642 * @note Use @c NULL for @p iw or @p ih if you don't need one of these values.
644 * @see emotion_object_ratio_get()
646 * @ingroup Emotion_Video
648 EAPI void emotion_object_size_get (const Evas_Object *obj, int *iw, int *ih);
651 * @brief Sets whether to use of high-quality image scaling algorithm
652 * of the given video object.
654 * When enabled, a higher quality video scaling algorithm is used when
655 * scaling videos to sizes other than the source video. This gives
656 * better results but is more computationally expensive.
658 * @param obj The given video object.
659 * @param smooth Whether to use smooth scale or not.
661 * @see emotion_object_smooth_scale_get()
663 * @ingroup Emotion_Video
665 EAPI void emotion_object_smooth_scale_set (Evas_Object *obj, Eina_Bool smooth);
668 * @brief Gets whether the high-quality image scaling algorithm
669 * of the given video object is used.
671 * @param obj The given video object.
672 * @return Whether the smooth scale is used or not.
674 * @see emotion_object_smooth_scale_set()
676 * @ingroup Emotion_Video
678 EAPI Eina_Bool emotion_object_smooth_scale_get (const Evas_Object *obj);
679 EAPI void emotion_object_event_simple_send (Evas_Object *obj, Emotion_Event ev);
682 * @brief Set the audio volume.
684 * @param obj The object where the volume is being set.
685 * @param vol The new volume parameter. Range is from 0.0 to 1.0.
687 * Sets the audio volume of the stream being played. This has nothing to do with
688 * the system volume. This volume will be multiplied by the system volume. e.g.:
689 * if the current volume level is 0.5, and the system volume is 50%, it will be
692 * The default value depends on the module used. This value doesn't get changed
693 * when another file is loaded.
695 * @see emotion_object_audio_volume_get()
697 * @ingroup Emotion_Audio
699 EAPI void emotion_object_audio_volume_set (Evas_Object *obj, double vol);
702 * @brief Get the audio volume.
704 * @param obj The object from which we are retrieving the volume.
705 * @return The current audio volume level for this object.
707 * Get the current value for the audio volume level. Range is from 0.0 to 1.0.
708 * This volume is set with emotion_object_audio_volume_set().
710 * @see emotion_object_audio_volume_set()
712 * @ingroup Emotion_Audio
714 EAPI double emotion_object_audio_volume_get (const Evas_Object *obj);
717 * @brief Set the mute audio option for this object.
719 * @param obj The object which we are setting the mute audio option.
720 * @param mute Whether the audio should be muted (@c EINA_TRUE) or not (@c
723 * This function sets the mute audio option for this emotion object. The current
724 * module used for this object can use this to avoid decoding the audio portion
725 * of the loaded media file.
727 * @see emotion_object_audio_mute_get()
728 * @see emotion_object_video_mute_set()
730 * @ingroup Emotion_Audio
732 EAPI void emotion_object_audio_mute_set (Evas_Object *obj, Eina_Bool mute);
735 * @brief Get the mute audio option of this object.
737 * @param obj The object which we are retrieving the mute audio option from.
738 * @return Whether the audio is muted (@c EINA_TRUE) or not (@c EINA_FALSE).
740 * This function return the mute audio option from this emotion object. It can
741 * be set with emotion_object_audio_mute_set().
743 * @see emotion_object_audio_mute_set()
745 * @ingroup Emotion_Audio
747 EAPI Eina_Bool emotion_object_audio_mute_get (const Evas_Object *obj);
748 EAPI int emotion_object_audio_channel_count (const Evas_Object *obj);
749 EAPI const char *emotion_object_audio_channel_name_get(const Evas_Object *obj, int channel);
750 EAPI void emotion_object_audio_channel_set (Evas_Object *obj, int channel);
751 EAPI int emotion_object_audio_channel_get (const Evas_Object *obj);
754 * @brief Set the mute video option for this object.
756 * @param obj The object which we are setting the mute video option.
757 * @param mute Whether the video should be muted (@c EINA_TRUE) or not (@c
760 * This function sets the mute video option for this emotion object. The
761 * current module used for this object can use this information to avoid
762 * decoding the video portion of the loaded media file.
764 * @see emotion_object_video_mute_get()
765 * @see emotion_object_audio_mute_set()
767 * @ingroup Emotion_Video
769 EAPI void emotion_object_video_mute_set (Evas_Object *obj, Eina_Bool mute);
772 * @brief Get the mute video option of this object.
774 * @param obj The object which we are retrieving the mute video option from.
775 * @return Whether the video is muted (@c EINA_TRUE) or not (@c EINA_FALSE).
777 * This function returns the mute video option from this emotion object. It can
778 * be set with emotion_object_video_mute_set().
780 * @see emotion_object_video_mute_set()
782 * @ingroup Emotion_Video
784 EAPI Eina_Bool emotion_object_video_mute_get (const Evas_Object *obj);
785 EAPI int emotion_object_video_channel_count (const Evas_Object *obj);
786 EAPI const char *emotion_object_video_channel_name_get(const Evas_Object *obj, int channel);
787 EAPI void emotion_object_video_channel_set (Evas_Object *obj, int channel);
788 EAPI int emotion_object_video_channel_get (const Evas_Object *obj);
789 EAPI void emotion_object_spu_mute_set (Evas_Object *obj, Eina_Bool mute);
790 EAPI Eina_Bool emotion_object_spu_mute_get (const Evas_Object *obj);
791 EAPI int emotion_object_spu_channel_count (const Evas_Object *obj);
792 EAPI const char *emotion_object_spu_channel_name_get (const Evas_Object *obj, int channel);
793 EAPI void emotion_object_spu_channel_set (Evas_Object *obj, int channel);
794 EAPI int emotion_object_spu_channel_get (const Evas_Object *obj);
795 EAPI int emotion_object_chapter_count (const Evas_Object *obj);
796 EAPI void emotion_object_chapter_set (Evas_Object *obj, int chapter);
797 EAPI int emotion_object_chapter_get (const Evas_Object *obj);
798 EAPI const char *emotion_object_chapter_name_get (const Evas_Object *obj, int chapter);
799 EAPI void emotion_object_eject (Evas_Object *obj);
802 * @brief Get the dvd title from this emotion object.
804 * @param obj The object which the title will be retrieved from.
805 * @return A string containing the title.
807 * This function is only useful when playing a DVD.
809 * @note Don't change or free the string returned by this function.
811 * @ingroup Emotion_Info
813 EAPI const char *emotion_object_title_get (const Evas_Object *obj);
814 EAPI const char *emotion_object_ref_file_get (const Evas_Object *obj);
815 EAPI int emotion_object_ref_num_get (const Evas_Object *obj);
816 EAPI int emotion_object_spu_button_count_get (const Evas_Object *obj);
817 EAPI int emotion_object_spu_button_get (const Evas_Object *obj);
820 * @brief Retrieve meta information from this file being played.
822 * @param obj The object which the meta info will be extracted from.
823 * @param meta The type of meta information that will be extracted.
825 * This function retrieves information about the file loaded. It can retrieve
826 * the track title, artist name, album name, etc. See @ref Emotion_Meta_Info
827 * for all the possibilities.
829 * The meta info may be not available on all types of files. It will return @c
830 * NULL if the the file doesn't have meta info, or if this specific field is
833 * @note Don't change or free the string returned by this function.
835 * @see Emotion_Meta_Info
837 * @ingroup Emotion_Info
839 EAPI const char *emotion_object_meta_info_get (const Evas_Object *obj, Emotion_Meta_Info meta);
842 * @brief Set the visualization to be used with this object.
844 * @param obj The object where the visualization will be set on.
845 * @param visualization The type of visualization to be used.
847 * The @p visualization specified will be played instead of a video. This is
848 * commonly used to display a visualization for audio only files (musics).
850 * The available visualizations are @ref Emotion_Vis.
853 * @see emotion_object_vis_get()
854 * @see emotion_object_vis_supported()
856 * @ingroup Emotion_Visualization
858 EAPI void emotion_object_vis_set (Evas_Object *obj, Emotion_Vis visualization);
861 * @brief Get the type of visualization in use by this emotion object.
863 * @param obj The emotion object which the visualization is being retrieved
865 * @return The type of visualization in use by this object.
867 * The type of visualization can be set by emotion_object_vis_set().
870 * @see emotion_object_vis_set()
871 * @see emotion_object_vis_supported()
873 * @ingroup Emotion_Visualization
875 EAPI Emotion_Vis emotion_object_vis_get (const Evas_Object *obj);
878 * @brief Query whether a type of visualization is supported by this object.
880 * @param obj The object which the query is being ran on.
881 * @param visualization The type of visualization that is being queried.
882 * @return EINA_TRUE if the visualization is supported, EINA_FALSE otherwise.
884 * This can be used to check if a visualization is supported. e.g.: one wants to
885 * display a list of available visualizations for a specific object.
888 * @see emotion_object_vis_set()
889 * @see emotion_object_vis_get()
891 * @ingroup Emotion_Visualization
893 EAPI Eina_Bool emotion_object_vis_supported (const Evas_Object *obj, Emotion_Vis visualization);
895 EAPI void emotion_object_last_position_load (Evas_Object *obj);
896 EAPI void emotion_object_last_position_save (Evas_Object *obj);
898 EAPI void emotion_object_suspend_set (Evas_Object *obj, Emotion_Suspend state);
899 EAPI Emotion_Suspend emotion_object_suspend_get (Evas_Object *obj);
901 EAPI Eina_Bool emotion_object_extension_may_play_fast_get(const char *file);
902 EAPI Eina_Bool emotion_object_extension_may_play_get(const char *file);
904 EAPI Evas_Object *emotion_object_image_get(const Evas_Object *obj);
906 typedef struct _Emotion_Webcam Emotion_Webcam;
908 extern int EMOTION_WEBCAM_UPDATE;
910 EAPI const Eina_List *emotion_webcams_get(void);
911 EAPI const char *emotion_webcam_name_get(const Emotion_Webcam *ew);
912 EAPI const char *emotion_webcam_device_get(const Emotion_Webcam *ew);