2 * @defgroup Video Video
7 * Elementary comes with two object that help design application that need
9 * to display video. The main one, Elm_Video, display a video by using Emotion.
10 * It does embedded the video inside an Edje object, so you can do some
11 * animation depending on the video state change. It does also implement a
12 * ressource management policy to remove this burden from the application writer.
14 * The second one, Elm_Player is a video player that need to be linked with and Elm_Video.
15 * It take care of updating its content according to Emotion event and provide a
16 * way to theme itself. It also does automatically raise the priority of the
17 * linked Elm_Video so it will use the video decoder if available. It also does
18 * activate the remember function on the linked Elm_Video object.
22 * The first one, Elm_Video, display a video by using Emotion.
23 * It embeds the video inside an Edje object, so you can do some
24 * animation depending on the video state change. It also implements a
25 * resource management policy to remove this burden from the application.
28 * Elm_Player is a video player that need to be linked with an Elm_Video.
29 * It take care of updating its content according to Emotion event and provide a
30 * way to theme itself. It also automatically raises the priority of the
31 * linked Elm_Video so it will use the video decoder, if available. It also
32 * activates the "remember" function on the linked Elm_Video object.
33 >>>>>>> remotes/origin/upstream
35 * Signals that you can add callback for are :
37 * "forward,clicked" - the user clicked the forward button.
38 * "info,clicked" - the user clicked the info button.
39 * "next,clicked" - the user clicked the next button.
40 * "pause,clicked" - the user clicked the pause button.
41 * "play,clicked" - the user clicked the play button.
42 * "prev,clicked" - the user clicked the prev button.
43 * "rewind,clicked" - the user clicked the rewind button.
44 * "stop,clicked" - the user clicked the stop button.
47 * Default contents parts of the player widget that you can use for are:
49 * Default content parts of the player widget that you can use for are:
50 >>>>>>> remotes/origin/upstream
51 * @li "video" - A video of the player
56 * @brief Add a new Elm_Player object to the given parent Elementary (container) object.
58 * @param parent The parent object
59 * @return a new player widget handle or @c NULL, on errors.
61 * This function inserts a new player widget on the canvas.
63 * @see elm_object_part_content_set()
67 EAPI Evas_Object *elm_player_add(Evas_Object *parent);
70 * @brief Add a new Elm_Video object to the given parent Elementary (container) object.
72 * @param parent The parent object
73 * @return a new video widget handle or @c NULL, on errors.
75 * This function inserts a new video widget on the canvas.
77 * @see elm_video_file_set()
79 * @see elm_video_uri_set()
81 >>>>>>> remotes/origin/upstream
85 EAPI Evas_Object *elm_video_add(Evas_Object *parent);
89 * @brief Define the file that will be the video source.
91 * @param video The video object to define the file for.
92 * @param filename The file to target.
94 * This function will explicitly define a filename as a source
95 * for the video of the Elm_Video object.
97 * @see elm_video_uri_set()
98 * @see elm_video_add()
99 * @see elm_player_add()
103 EAPI void elm_video_file_set(Evas_Object *video, const char *filename);
106 * @brief Define the uri that will be the video source.
108 * @param video The video object to define the file for.
109 * @param uri The uri to target.
111 * This function will define an uri as a source for the video of the
112 * Elm_Video object. URI could be remote source of video, like http:// or local source
113 * like for example WebCam who are most of the time v4l2:// (but that depend and
114 * you should use Emotion API to request and list the available Webcam on your system).
116 * @see elm_video_file_set()
118 * @brief Define the file or URI that will be the video source.
120 * @param video The video object to define the file or URI for the video
121 * of the Elm_Video object.
123 * @param filename The file or URI to target.
124 * Local files can be specified using file:// or by using full file paths.
125 * URI could be remote source of video, like http:// or local source like
126 * WebCam (v4l2://). (You can use Emotion API to request and list
127 * the available Webcam on your system).
129 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
131 * This function will explicitly define a file or URI as a source
132 * for the video of the Elm_Video object.
134 >>>>>>> remotes/origin/upstream
135 * @see elm_video_add()
136 * @see elm_player_add()
141 EAPI void elm_video_uri_set(Evas_Object *video, const char *uri);
143 EAPI Eina_Bool elm_video_file_set(Evas_Object *video, const char *filename);
144 >>>>>>> remotes/origin/upstream
147 * @brief Get the underlying Emotion object.
149 * @param video The video object to proceed the request on.
150 * @return the underlying Emotion object.
154 EAPI Evas_Object *elm_video_emotion_get(const Evas_Object *video);
157 * @brief Start to play the video
159 * @param video The video object to proceed the request on.
161 * Start to play the video and cancel all suspend state.
165 EAPI void elm_video_play(Evas_Object *video);
168 * @brief Pause the video
170 * @param video The video object to proceed the request on.
172 * Pause the video and start a timer to trigger suspend mode.
176 EAPI void elm_video_pause(Evas_Object *video);
179 * @brief Stop the video
181 * @param video The video object to proceed the request on.
183 * Stop the video and put the emotion in deep sleep mode.
187 EAPI void elm_video_stop(Evas_Object *video);
190 * @brief Is the video actually playing.
192 * @param video The video object to proceed the request on.
193 * @return EINA_TRUE if the video is actually playing.
195 * You should consider watching event on the object instead of polling
201 EAPI Eina_Bool elm_video_is_playing(const Evas_Object *video);
203 EAPI Eina_Bool elm_video_is_playing_get(const Evas_Object *video);
204 >>>>>>> remotes/origin/upstream
207 * @brief Is it possible to seek inside the video.
209 * @param video The video object to proceed the request on.
210 * @return EINA_TRUE if is possible to seek inside the video.
215 EAPI Eina_Bool elm_video_is_seekable(const Evas_Object *video);
217 EAPI Eina_Bool elm_video_is_seekable_get(const Evas_Object *video);
218 >>>>>>> remotes/origin/upstream
221 * @brief Is the audio muted.
223 * @param video The video object to proceed the request on.
224 * @return EINA_TRUE if the audio is muted.
228 EAPI Eina_Bool elm_video_audio_mute_get(const Evas_Object *video);
231 * @brief Change the mute state of the Elm_Video object.
233 * @param video The video object to proceed the request on.
234 * @param mute The new mute state.
238 EAPI void elm_video_audio_mute_set(Evas_Object *video, Eina_Bool mute);
241 * @brief Get the audio level of the current video.
243 * @param video The video object to proceed the request on.
244 * @return the current audio level.
248 EAPI double elm_video_audio_level_get(const Evas_Object *video);
252 * @brief Set the audio level of anElm_Video object.
254 * @brief Set the audio level of an Elm_Video object.
255 >>>>>>> remotes/origin/upstream
257 * @param video The video object to proceed the request on.
258 * @param volume The new audio volume.
262 EAPI void elm_video_audio_level_set(Evas_Object *video, double volume);
265 EAPI double elm_video_play_position_get(const Evas_Object *video);
266 EAPI void elm_video_play_position_set(Evas_Object *video, double position);
267 EAPI double elm_video_play_length_get(const Evas_Object *video);
268 EAPI void elm_video_remember_position_set(Evas_Object *video, Eina_Bool remember);
269 EAPI Eina_Bool elm_video_remember_position_get(const Evas_Object *video);
272 * @brief Get the current position (in seconds) being played in the
275 * @param video The video object.
276 * @return the time(in seconds) since the beginning of the media file.
280 EAPI double elm_video_play_position_get(const Evas_Object *video);
283 * @brief Set the current position (in seconds) to be played in the
286 * @param video The video object.
287 * @param position the time(in seconds) since the beginning of the media file.
291 EAPI void elm_video_play_position_set(Evas_Object *video, double position);
293 * @brief Get the total playing time (in seconds) of the Elm_Video object.
295 * @param video The video object.
296 * @return the total duration(in seconds) of the media file.
300 EAPI double elm_video_play_length_get(const Evas_Object *video);
303 * @brief Set whether the object can remember the last played position.
305 * @param video The video object.
306 * @param remember the last played position of the Elm_Video object.
308 * @note This API only serves as indication. System support is required.
312 EAPI void elm_video_remember_position_set(Evas_Object *video, Eina_Bool remember);
315 * @brief Set whether the object can remember the last played position.
317 * @param video The video object.
318 * @return whether the object remembers the last played position (EINA_TRUE)
321 * @note This API only serves as indication. System support is required.
325 EAPI Eina_Bool elm_video_remember_position_get(const Evas_Object *video);
328 * @brief Get the title (for ex. DVD title) from this emotion object.
330 * @param video The Elm_Video object.
331 * @return A string containing the title.
333 * This function is only useful when playing a DVD.
335 * @note Don't change or free the string returned by this function.
339 >>>>>>> remotes/origin/upstream
340 EAPI const char *elm_video_title_get(const Evas_Object *video);