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 Add a new Elm_Video object to the given parent Elementary (container) object.
52 * @param parent The parent object
53 * @return a new video widget handle or @c NULL, on errors.
55 * This function inserts a new video widget on the canvas.
57 * @see elm_video_file_set()
58 * @see elm_video_uri_set()
62 EAPI Evas_Object *elm_video_add(Evas_Object *parent);
65 * @brief Define the file that will be the video source.
67 * @param video The video object to define the file for.
68 * @param filename The file to target.
70 * This function will explicitly define a filename as a source
71 * for the video of the Elm_Video object.
73 * @see elm_video_uri_set()
74 * @see elm_video_add()
75 * @see elm_player_add()
79 EAPI void elm_video_file_set(Evas_Object *video, const char *filename);
82 * @brief Define the uri that will be the video source.
84 * @param video The video object to define the file for.
85 * @param uri The uri to target.
87 * This function will define an uri as a source for the video of the
88 * Elm_Video object. URI could be remote source of video, like http:// or local source
89 * like for example WebCam who are most of the time v4l2:// (but that depend and
90 * you should use Emotion API to request and list the available Webcam on your system).
92 * @see elm_video_file_set()
93 * @see elm_video_add()
94 * @see elm_player_add()
98 EAPI void elm_video_uri_set(Evas_Object *video, const char *uri);
101 * @brief Get the underlying Emotion object.
103 * @param video The video object to proceed the request on.
104 * @return the underlying Emotion object.
108 EAPI Evas_Object *elm_video_emotion_get(const Evas_Object *video);
111 * @brief Start to play the video
113 * @param video The video object to proceed the request on.
115 * Start to play the video and cancel all suspend state.
119 EAPI void elm_video_play(Evas_Object *video);
122 * @brief Pause the video
124 * @param video The video object to proceed the request on.
126 * Pause the video and start a timer to trigger suspend mode.
130 EAPI void elm_video_pause(Evas_Object *video);
133 * @brief Stop the video
135 * @param video The video object to proceed the request on.
137 * Stop the video and put the emotion in deep sleep mode.
141 EAPI void elm_video_stop(Evas_Object *video);
144 * @brief Is the video actually playing.
146 * @param video The video object to proceed the request on.
147 * @return EINA_TRUE if the video is actually playing.
149 * You should consider watching event on the object instead of polling
154 EAPI Eina_Bool elm_video_is_playing(const Evas_Object *video);
157 * @brief Is it possible to seek inside the video.
159 * @param video The video object to proceed the request on.
160 * @return EINA_TRUE if is possible to seek inside the video.
164 EAPI Eina_Bool elm_video_is_seekable(const Evas_Object *video);
167 * @brief Is the audio muted.
169 * @param video The video object to proceed the request on.
170 * @return EINA_TRUE if the audio is muted.
174 EAPI Eina_Bool elm_video_audio_mute_get(const Evas_Object *video);
177 * @brief Change the mute state of the Elm_Video object.
179 * @param video The video object to proceed the request on.
180 * @param mute The new mute state.
184 EAPI void elm_video_audio_mute_set(Evas_Object *video, Eina_Bool mute);
187 * @brief Get the audio level of the current video.
189 * @param video The video object to proceed the request on.
190 * @return the current audio level.
194 EAPI double elm_video_audio_level_get(const Evas_Object *video);
197 * @brief Set the audio level of anElm_Video object.
199 * @param video The video object to proceed the request on.
200 * @param volume The new audio volume.
204 EAPI void elm_video_audio_level_set(Evas_Object *video, double volume);
206 EAPI double elm_video_play_position_get(const Evas_Object *video);
207 EAPI void elm_video_play_position_set(Evas_Object *video, double position);
208 EAPI double elm_video_play_length_get(const Evas_Object *video);
209 EAPI void elm_video_remember_position_set(Evas_Object *video, Eina_Bool remember);
210 EAPI Eina_Bool elm_video_remember_position_get(const Evas_Object *video);
211 EAPI const char *elm_video_title_get(const Evas_Object *video);