2 * @defgroup Video Video
7 * Elementary comes with two object that help design application that need
8 * to display video. The main one, Elm_Video, display a video by using Emotion.
9 * It does embedded the video inside an Edje object, so you can do some
10 * animation depending on the video state change. It does also implement a
11 * ressource management policy to remove this burden from the application writer.
13 * The second one, Elm_Player is a video player that need to be linked with and Elm_Video.
14 * It take care of updating its content according to Emotion event and provide a
15 * way to theme itself. It also does automatically raise the priority of the
16 * linked Elm_Video so it will use the video decoder if available. It also does
17 * activate the remember function on the linked Elm_Video object.
19 * Signals that you can add callback for are :
21 * "forward,clicked" - the user clicked the forward button.
22 * "info,clicked" - the user clicked the info button.
23 * "next,clicked" - the user clicked the next button.
24 * "pause,clicked" - the user clicked the pause button.
25 * "play,clicked" - the user clicked the play button.
26 * "prev,clicked" - the user clicked the prev button.
27 * "rewind,clicked" - the user clicked the rewind button.
28 * "stop,clicked" - the user clicked the stop button.
30 * Default contents parts of the player widget that you can use for are:
31 * @li "video" - A video of the player
36 * @brief Add a new Elm_Player object to the given parent Elementary (container) object.
38 * @param parent The parent object
39 * @return a new player widget handle or @c NULL, on errors.
41 * This function inserts a new player widget on the canvas.
43 * @see elm_object_part_content_set()
47 EAPI Evas_Object *elm_player_add(Evas_Object *parent);
50 * @brief Link a Elm_Payer with an Elm_Video object.
52 * @param player the Elm_Player object.
53 * @param video The Elm_Video object.
55 * This mean that action on the player widget will affect the
56 * video object and the state of the video will be reflected in
59 * @see elm_player_add()
60 * @see elm_video_add()
61 * @deprecated use elm_object_part_content_set() instead
65 EINA_DEPRECATED EAPI void elm_player_video_set(Evas_Object *player, Evas_Object *video);
68 * @brief Add a new Elm_Video object to the given parent Elementary (container) object.
70 * @param parent The parent object
71 * @return a new video widget handle or @c NULL, on errors.
73 * This function inserts a new video widget on the canvas.
75 * @see elm_video_file_set()
76 * @see elm_video_uri_set()
80 EAPI Evas_Object *elm_video_add(Evas_Object *parent);
83 * @brief Define the file that will be the video source.
85 * @param video The video object to define the file for.
86 * @param filename The file to target.
88 * This function will explicitly define a filename as a source
89 * for the video of the Elm_Video object.
91 * @see elm_video_uri_set()
92 * @see elm_video_add()
93 * @see elm_player_add()
97 EAPI void elm_video_file_set(Evas_Object *video, const char *filename);
100 * @brief Define the uri that will be the video source.
102 * @param video The video object to define the file for.
103 * @param uri The uri to target.
105 * This function will define an uri as a source for the video of the
106 * Elm_Video object. URI could be remote source of video, like http:// or local source
107 * like for example WebCam who are most of the time v4l2:// (but that depend and
108 * you should use Emotion API to request and list the available Webcam on your system).
110 * @see elm_video_file_set()
111 * @see elm_video_add()
112 * @see elm_player_add()
116 EAPI void elm_video_uri_set(Evas_Object *video, const char *uri);
119 * @brief Get the underlying Emotion object.
121 * @param video The video object to proceed the request on.
122 * @return the underlying Emotion object.
126 EAPI Evas_Object *elm_video_emotion_get(const Evas_Object *video);
129 * @brief Start to play the video
131 * @param video The video object to proceed the request on.
133 * Start to play the video and cancel all suspend state.
137 EAPI void elm_video_play(Evas_Object *video);
140 * @brief Pause the video
142 * @param video The video object to proceed the request on.
144 * Pause the video and start a timer to trigger suspend mode.
148 EAPI void elm_video_pause(Evas_Object *video);
151 * @brief Stop the video
153 * @param video The video object to proceed the request on.
155 * Stop the video and put the emotion in deep sleep mode.
159 EAPI void elm_video_stop(Evas_Object *video);
162 * @brief Is the video actually playing.
164 * @param video The video object to proceed the request on.
165 * @return EINA_TRUE if the video is actually playing.
167 * You should consider watching event on the object instead of polling
172 EAPI Eina_Bool elm_video_is_playing(const Evas_Object *video);
175 * @brief Is it possible to seek inside the video.
177 * @param video The video object to proceed the request on.
178 * @return EINA_TRUE if is possible to seek inside the video.
182 EAPI Eina_Bool elm_video_is_seekable(const Evas_Object *video);
185 * @brief Is the audio muted.
187 * @param video The video object to proceed the request on.
188 * @return EINA_TRUE if the audio is muted.
192 EAPI Eina_Bool elm_video_audio_mute_get(const Evas_Object *video);
195 * @brief Change the mute state of the Elm_Video object.
197 * @param video The video object to proceed the request on.
198 * @param mute The new mute state.
202 EAPI void elm_video_audio_mute_set(Evas_Object *video, Eina_Bool mute);
205 * @brief Get the audio level of the current video.
207 * @param video The video object to proceed the request on.
208 * @return the current audio level.
212 EAPI double elm_video_audio_level_get(const Evas_Object *video);
215 * @brief Set the audio level of anElm_Video object.
217 * @param video The video object to proceed the request on.
218 * @param volume The new audio volume.
222 EAPI void elm_video_audio_level_set(Evas_Object *video, double volume);
224 EAPI double elm_video_play_position_get(const Evas_Object *video);
225 EAPI void elm_video_play_position_set(Evas_Object *video, double position);
226 EAPI double elm_video_play_length_get(const Evas_Object *video);
227 EAPI void elm_video_remember_position_set(Evas_Object *video, Eina_Bool remember);
228 EAPI Eina_Bool elm_video_remember_position_get(const Evas_Object *video);
229 EAPI const char *elm_video_title_get(const Evas_Object *video);