2 * @defgroup Video Video
7 * Elementary comes with two object that help design application that need
10 * The first one, Elm_Video, display a video by using Emotion.
11 * It embeds the video inside an Edje object, so you can do some
12 * animation depending on the video state change. It also implements a
13 * resource management policy to remove this burden from the application.
16 * Elm_Player is a video player that need to be linked with an Elm_Video.
17 * It take care of updating its content according to Emotion event and provide a
18 * way to theme itself. It also automatically raises the priority of the
19 * linked Elm_Video so it will use the video decoder, if available. It also
20 * activates the "remember" function on the linked Elm_Video object.
22 * Signals that you can add callback for are :
24 * "forward,clicked" - the user clicked the forward button.
25 * "info,clicked" - the user clicked the info button.
26 * "next,clicked" - the user clicked the next button.
27 * "pause,clicked" - the user clicked the pause button.
28 * "play,clicked" - the user clicked the play button.
29 * "prev,clicked" - the user clicked the prev button.
30 * "rewind,clicked" - the user clicked the rewind button.
31 * "stop,clicked" - the user clicked the stop button.
33 * Default content parts of the player widget that you can use for are:
34 * @li "video" - A video of the player
39 * @brief Add a new Elm_Player object to the given parent Elementary (container) object.
41 * @param parent The parent object
42 * @return a new player widget handle or @c NULL, on errors.
44 * This function inserts a new player widget on the canvas.
46 * @see elm_object_part_content_set()
50 EAPI Evas_Object *elm_player_add(Evas_Object *parent);
53 * @brief Add a new Elm_Video object to the given parent Elementary (container) object.
55 * @param parent The parent object
56 * @return a new video widget handle or @c NULL, on errors.
58 * This function inserts a new video widget on the canvas.
60 * @see elm_video_file_set()
64 EAPI Evas_Object *elm_video_add(Evas_Object *parent);
67 * @brief Define the file or URI that will be the video source.
69 * @param video The video object to define the file or URI for the video
70 * of the Elm_Video object.
72 * @param filename The file or URI to target.
73 * Local files can be specified using file:// or by using full file paths.
74 * URI could be remote source of video, like http:// or local source like
75 * WebCam (v4l2://). (You can use Emotion API to request and list
76 * the available Webcam on your system).
78 * This function will explicitly define a file or URI as a source
79 * for the video of the Elm_Video object.
81 * @see elm_video_add()
82 * @see elm_player_add()
86 EAPI void elm_video_file_set(Evas_Object *video, const char *filename);
89 * @brief Get the underlying Emotion object.
91 * @param video The video object to proceed the request on.
92 * @return the underlying Emotion object.
96 EAPI Evas_Object *elm_video_emotion_get(const Evas_Object *video);
99 * @brief Start to play the video
101 * @param video The video object to proceed the request on.
103 * Start to play the video and cancel all suspend state.
107 EAPI void elm_video_play(Evas_Object *video);
110 * @brief Pause the video
112 * @param video The video object to proceed the request on.
114 * Pause the video and start a timer to trigger suspend mode.
118 EAPI void elm_video_pause(Evas_Object *video);
121 * @brief Stop the video
123 * @param video The video object to proceed the request on.
125 * Stop the video and put the emotion in deep sleep mode.
129 EAPI void elm_video_stop(Evas_Object *video);
132 * @brief Is the video actually playing.
134 * @param video The video object to proceed the request on.
135 * @return EINA_TRUE if the video is actually playing.
137 * You should consider watching event on the object instead of polling
142 EAPI Eina_Bool elm_video_is_playing_get(const Evas_Object *video);
145 * @brief Is it possible to seek inside the video.
147 * @param video The video object to proceed the request on.
148 * @return EINA_TRUE if is possible to seek inside the video.
152 EAPI Eina_Bool elm_video_is_seekable_get(const Evas_Object *video);
155 * @brief Is the audio muted.
157 * @param video The video object to proceed the request on.
158 * @return EINA_TRUE if the audio is muted.
162 EAPI Eina_Bool elm_video_audio_mute_get(const Evas_Object *video);
165 * @brief Change the mute state of the Elm_Video object.
167 * @param video The video object to proceed the request on.
168 * @param mute The new mute state.
172 EAPI void elm_video_audio_mute_set(Evas_Object *video, Eina_Bool mute);
175 * @brief Get the audio level of the current video.
177 * @param video The video object to proceed the request on.
178 * @return the current audio level.
182 EAPI double elm_video_audio_level_get(const Evas_Object *video);
185 * @brief Set the audio level of an Elm_Video object.
187 * @param video The video object to proceed the request on.
188 * @param volume The new audio volume.
192 EAPI void elm_video_audio_level_set(Evas_Object *video, double volume);
195 * @brief Get the current position (in seconds) being played in the
198 * @param video The video object.
199 * @return the time(in seconds) since the beginnig of the media file.
203 EAPI double elm_video_play_position_get(const Evas_Object *video);
206 * @brief Set the current position (in seconds) to be played in the
209 * @param video The video object.
210 * @param position the time(in seconds) since the beginnig of the media file.
214 EAPI void elm_video_play_position_set(Evas_Object *video, double position);
216 * @brief Get the total playing time (in seconds) of the Elm_Video object.
218 * @param video The video object.
219 * @return the total duration(in seconds) of the media file.
223 EAPI double elm_video_play_length_get(const Evas_Object *video);
226 * @brief Set whether the object can remember the last played position.
228 * @param video The video object.
229 * @param remember the last played position of the Elm_Video object.
231 * @note This API only serves as indication. System support is required.
235 EAPI void elm_video_remember_position_set(Evas_Object *video, Eina_Bool remember);
238 * @brief Set whether the object can remember the last played position.
240 * @param video The video object.
241 * @return whether the object remembers the last played position (EINA_TRUE)
244 * @note This API only serves as indication. System support is required.
248 EAPI Eina_Bool elm_video_remember_position_get(const Evas_Object *video);
251 * @brief Get the title (for ex. dvd title) from this emotion object.
253 * @param video The Elm_Video object.
254 * @return A string containing the title.
256 * This function is only useful when playing a DVD.
258 * @note Don't change or free the string returned by this function.
262 EAPI const char *elm_video_title_get(const Evas_Object *video);