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 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
80 * This function will explicitly define a file or URI as a source
81 * for the video of the Elm_Video object.
83 * @see elm_video_add()
84 * @see elm_player_add()
88 EAPI Eina_Bool elm_video_file_set(Evas_Object *video, const char *filename);
91 * @brief Get the underlying Emotion object.
93 * @param video The video object to proceed the request on.
94 * @return the underlying Emotion object.
98 EAPI Evas_Object *elm_video_emotion_get(const Evas_Object *video);
101 * @brief Start to play the video
103 * @param video The video object to proceed the request on.
105 * Start to play the video and cancel all suspend state.
109 EAPI void elm_video_play(Evas_Object *video);
112 * @brief Pause the video
114 * @param video The video object to proceed the request on.
116 * Pause the video and start a timer to trigger suspend mode.
120 EAPI void elm_video_pause(Evas_Object *video);
123 * @brief Stop the video
125 * @param video The video object to proceed the request on.
127 * Stop the video and put the emotion in deep sleep mode.
131 EAPI void elm_video_stop(Evas_Object *video);
134 * @brief Is the video actually playing.
136 * @param video The video object to proceed the request on.
137 * @return EINA_TRUE if the video is actually playing.
139 * You should consider watching event on the object instead of polling
144 EAPI Eina_Bool elm_video_is_playing_get(const Evas_Object *video);
147 * @brief Is it possible to seek inside the video.
149 * @param video The video object to proceed the request on.
150 * @return EINA_TRUE if is possible to seek inside the video.
154 EAPI Eina_Bool elm_video_is_seekable_get(const Evas_Object *video);
157 * @brief Is the audio muted.
159 * @param video The video object to proceed the request on.
160 * @return EINA_TRUE if the audio is muted.
164 EAPI Eina_Bool elm_video_audio_mute_get(const Evas_Object *video);
167 * @brief Change the mute state of the Elm_Video object.
169 * @param video The video object to proceed the request on.
170 * @param mute The new mute state.
174 EAPI void elm_video_audio_mute_set(Evas_Object *video, Eina_Bool mute);
177 * @brief Get the audio level of the current video.
179 * @param video The video object to proceed the request on.
180 * @return the current audio level.
184 EAPI double elm_video_audio_level_get(const Evas_Object *video);
187 * @brief Set the audio level of an Elm_Video object.
189 * @param video The video object to proceed the request on.
190 * @param volume The new audio volume.
194 EAPI void elm_video_audio_level_set(Evas_Object *video, double volume);
197 * @brief Get the current position (in seconds) being played in the
200 * @param video The video object.
201 * @return the time(in seconds) since the beginning of the media file.
205 EAPI double elm_video_play_position_get(const Evas_Object *video);
208 * @brief Set the current position (in seconds) to be played in the
211 * @param video The video object.
212 * @param position the time(in seconds) since the beginning of the media file.
216 EAPI void elm_video_play_position_set(Evas_Object *video, double position);
218 * @brief Get the total playing time (in seconds) of the Elm_Video object.
220 * @param video The video object.
221 * @return the total duration(in seconds) of the media file.
225 EAPI double elm_video_play_length_get(const Evas_Object *video);
228 * @brief Set whether the object can remember the last played position.
230 * @param video The video object.
231 * @param remember the last played position of the Elm_Video object.
233 * @note This API only serves as indication. System support is required.
237 EAPI void elm_video_remember_position_set(Evas_Object *video, Eina_Bool remember);
240 * @brief Set whether the object can remember the last played position.
242 * @param video The video object.
243 * @return whether the object remembers the last played position (EINA_TRUE)
246 * @note This API only serves as indication. System support is required.
250 EAPI Eina_Bool elm_video_remember_position_get(const Evas_Object *video);
253 * @brief Get the title (for ex. DVD title) from this emotion object.
255 * @param video The Elm_Video object.
256 * @return A string containing the title.
258 * This function is only useful when playing a DVD.
260 * @note Don't change or free the string returned by this function.
264 EAPI const char *elm_video_title_get(const Evas_Object *video);