2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #ifndef __TIZEN_MEDIA_PLAYER_DOC_H__
19 #define __TIZEN_MEDIA_PLAYER_DOC_H__
24 * @brief This file contains high level documentation on the Player API.
28 * @ingroup CAPI_MEDIA_FRAMEWORK
29 * @defgroup CAPI_MEDIA_PLAYER_MODULE Player
30 * @brief The @ref CAPI_MEDIA_PLAYER_MODULE API provides functions for media playback and controlling media playback attributes.
32 * @section CAPI_MEDIA_PLAYER_MODULE_HEADER Required Header
33 * \#include <player.h>
35 * @section CAPI_MEDIA_PLAYER_OVERVIEW Overview
36 * The Player API provides a way to play multimedia content. Content can be played from a file, from the network, or from memory.
37 * It gives the ability to start/stop/pause/mute, set the playback position (that is, seek), perform various status queries, and control the display.
39 * Additional functions allow registering notifications via callback functions for various state change events.
41 * This API also enables collaboration with the GUI service to present a video.
43 * @subsection CAPI_MEDIA_PLAYER_LIFE_CYCLE_STATE_DIAGRAM State Diagram
44 * Playback of multimedia content is controlled by a state machine.
45 * The following diagram shows the life cycle and states of the Player.
47 * @image html capi_media_player_state_diagram.png
49 * @subsection CAPI_MEDIA_PLAYER_LIFE_CYCLE_STATE_TRANSITIONS State Transitions
50 * <div><table class="doxtable" >
52 * <th><b>FUNCTION</b></th>
53 * <th><b>PRE-STATE</b></th>
54 * <th><b>POST-STATE</b></th>
55 * <th><b>SYNC TYPE</b></th>
58 * <td>player_create()</td>
64 * <td>player_destroy()</td>
70 * <td>player_prepare()</td>
76 * <td>player_prepare_async()</td>
82 * <td>player_unprepare()</td>
83 * <td>READY, PLAYING or PAUSED</td>
88 * <td>player_start()</td>
89 * <td>READY or PAUSED</td>
94 * <td>player_stop()</td>
100 * <td>player_pause()</td>
107 * @subsection CAPI_MEDIA_PLAYER_LIFE_CYCLE_STATE_DEPENDENT_FUNCTIONS State Dependent Function Calls
108 * The following table shows state-dependent function calls.
109 * It is forbidden to call the functions listed below in wrong states.
110 * Violation of this rule may result in unpredictable behavior.
111 * <div><table class="doxtable" >
113 * <th><b>FUNCTION</b></th>
114 * <th><b>VALID STATES</b></th>
115 * <th><b>DESCRIPTION</b></th>
118 * <td>player_create()</td>
123 * <td>player_destroy()</td>
128 * <td>player_prepare()</td>
130 * <td>This function must be called after player_create()</td>
133 * <td>player_unprepare()</td>
134 * <td>READY/PAUSED/PLAYING</td>
135 * <td>This function must be called after player_stop() or player_start() or player_pause()</td>
138 * <td>player_start()</td>
139 * <td>READY/ PAUSED</td>
140 * <td>This function must be called after player_prepare()</td>
143 * <td>player_stop()</td>
144 * <td>PLAYING/ PAUSED</td>
145 * <td>This function must be called after player_start() or player_pause()</td>
148 * <td>player_pause()</td>
150 * <td>This function must be called after player_start()</td>
153 * <td>player_set_completed_cb()<BR> player_set_interrupted_cb()<BR> player_set_error_cb()<BR> player_set_buffering_cb()<BR> player_set_subtitle_updated_cb()</td>
154 * <td>IDLE/ READY/ PLAYING/ PAUSED</td>
155 * <td>This function must be called after player_create()</td>
158 * <td>player_unset_completed_cb()<BR> player_unset_interrupted_cb()<BR> player_unset_error_cb()<BR> player_unset_buffering_cb()<BR> player_unset_subtitle_updated_cb()</td>
159 * <td>IDLE/ READY/ PLAYING/ PAUSED</td>
160 * <td>This function must be called after register callback functions such as player_set_completed_cb()</td>
163 * <td>player_get_state()</td>
168 * <td>player_set_uri()</td>
170 * <td>This function must be called before player_prepare() </td>
173 * <td>player_set_memory_buffer()</td>
175 * <td>This function must be called before player_prepare() </td>
178 * <td>player_set_subtitle_path()</td>
180 * <td>This function must be called before player_prepare() </td>
183 * <td>player_set_volume()</td>
184 * <td>IDLE/ READY/ PLAYING/ PAUSED</td>
185 * <td>This function must be called after player_create()</td>
188 * <td>player_get_volume()</td>
189 * <td>IDLE/ READY/ PLAYING/ PAUSED</td>
190 * <td>This function must be called after player_create()</td>
193 * <td>player_set_sound_type()</td>
195 * <td>This function must be called after player_create()</td>
198 * <td>player_set_mute()</td>
199 * <td>IDLE/ READY/ PLAYING/ PAUSED</td>
200 * <td>This function must be called after player_create()</td>
203 * <td>player_is_muted()</td>
204 * <td>IDLE/ READY/ PLAYING/ PAUSED</td>
205 * <td>This function must be called after player_create()</td>
208 * <td>player_set_looping()</td>
209 * <td>IDLE/ READY/ PLAYING/ PAUSED</td>
210 * <td>This function must be called after player_create()</td>
213 * <td>player_is_looping()</td>
214 * <td>IDLE/ READY/ PLAYING/ PAUSED</td>
215 * <td>This function must be called after player_create()</td>
218 * <td>player_get_duration()</td>
219 * <td>PLAYING/ PAUSED</td>
220 * <td>This function must be called after player_start()</td>
223 * <td>player_set_display()</td>
225 * <td>This function must be called before player_prepare()</td>
228 * <td>player_set_display_mode() <BR> player_set_display_visible()</td>
229 * <td>IDLE/ READY/ PLAYING/ PAUSED</td>
230 * <td>This function must be called after player_create()</td>
233 * <td>player_get_display_rotation() <BR> player_is_display_visible()</td>
234 * <td>IDLE/ READY/ PLAYING/ PAUSED</td>
235 * <td>This function must be called after player_create()</td>
238 * <td>player_get_video_size()</td>
239 * <td>READY/ PLAYING/ PAUSED</td>
240 * <td>This function must be called after player_prepare()</td>
244 * @subsection CAPI_MEDIA_PLAYER_LIFE_CYCLE_ASYNCHRONOUS_OPERATIONS Asynchronous Operations
245 * All functions that change the player state are synchronous except player_prepare_async(), player_set_play_position(), and player_capture_video().
246 * Thus the result is passed to the application via the callback mechanism.
248 * @subsection CAPI_MEDIA_PLAYER_LIFE_CYCLE_CALLBACK_OPERATIONS Callback(Event) Operations
249 * <div><table class="doxtable" >
251 * <th><b>REGISTER</b></th>
252 * <th><b>UNREGISTER</b></th>
253 * <th><b>CALLBACK</b></th>
254 * <th><b>DESCRIPTION</b></th>
257 * <td>player_set_completed_cb()</td>
258 * <td>player_unset_completed_cb()</td>
259 * <td>player_completed_cb()</td>
260 * <td>called when playback is completed </td>
263 * <td>player_set_interrupted_cb()</td>
264 * <td>player_unset_interrupted_cb()</td>
265 * <td>player_interrupted_cb()</td>
266 * <td>called when playback is interrupted by #player_interrupted_code_e </td>
269 * <td>player_set_error_cb()</td>
270 * <td>player_unset_error_cb()</td>
271 * <td>player_error_cb()</td>
272 * <td>called when an error has occurred</td>
275 * <td>player_set_buffering_cb()</td>
276 * <td>player_unset_buffering_cb()</td>
277 * <td>player_buffering_cb()</td>
278 * <td>called during content buffering </td>
281 * <td>player_set_progressive_download_message_cb()</td>
282 * <td>player_unset_progressive_download_message_cb()</td>
283 * <td>player_pd_message_cb()</td>
284 * <td>called when a progressive download starts or completes</td>
287 * <td>player_set_subtitle_updated_cb()</td>
288 * <td>player_unset_subtitle_updated_cb()</td>
289 * <td>player_subtitle_updated_cb()</td>
290 * <td>called when a subtitle updates </td>
293 * <td>player_set_media_packet_video_frame_decoded_cb()</td>
294 * <td>player_unset_media_packet_video_frame_decoded_cb()</td>
295 * <td>player_media_packet_video_decoded_cb()</td>
296 * <td>called when a video frame is decoded </td>
305 * @ingroup CAPI_MEDIA_PLAYER_MODULE
306 * @defgroup CAPI_MEDIA_PLAYER_DISPLAY_MODULE Display
307 * @brief The @ref CAPI_MEDIA_PLAYER_DISPLAY_MODULE API provides functions to control the display.
308 * @section CAPI_MEDIA_PLAYER_DISPLAY_MODULE_HEADER Required Header
309 * \#include <player.h>
311 * @section CAPI_MEDIA_PLAYER_DISPLAY_MODULE_OVERVIEW Overview
312 * The API allows you to manage the display of the player.
313 * This API provides functions to set and get various display properties:
321 * @ingroup CAPI_MEDIA_PLAYER_MODULE
322 * @defgroup CAPI_MEDIA_PLAYER_STREAM_INFO_MODULE Stream Information
323 * @brief The @ref CAPI_MEDIA_PLAYER_STREAM_INFO_MODULE API provides functions to get audio and video stream information, such as codec type, video width or height, bit rate, and so on.
324 * @section CAPI_MEDIA_PLAYER_AUDIO_EFFECT_MODULE_HEADER Required Header
325 * \#include <player.h>
327 * @section CAPI_MEDIA_PLAYER_STREAM_INFO_MODULE_OVERVIEW Overview
328 * The Player stream information API allows you to get media stream information, including:
329 * - Content metadata, such as the tile, artist, album title and genre.
330 * - Audio stream information, such as audio codec type, sample rate, channels, and bit rate.
331 * - Video stream information, such as video codec type, video width and height.
336 * @ingroup CAPI_MEDIA_PLAYER_MODULE
337 * @defgroup CAPI_MEDIA_PLAYER_AUDIO_EFFECT_MODULE Audio Effect
338 * @brief The @ref CAPI_MEDIA_PLAYER_AUDIO_EFFECT_MODULE API provides functions to control the audio effect.
339 * @section CAPI_MEDIA_PLAYER_AUDIO_EFFECT_MODULE_HEADER Required Header
340 * \#include <player.h>
342 * @section CAPI_MEDIA_PLAYER_AUDIO_EFFECT_MODULE_MODULE_OVERVIEW Overview
343 * The Audio effect API allows you to apply effects to the player:
350 * @ingroup CAPI_MEDIA_PLAYER_MODULE
351 * @defgroup CAPI_MEDIA_PLAYER_SUBTITLE_MODULE Subtitle
352 * @brief The @ref CAPI_MEDIA_PLAYER_SUBTITLE_MODULE API provides functions to control the subtitle.
353 * @section CAPI_MEDIA_PLAYER_SUBTITLE_MODULE_HEADER Required Header
354 * \#include <player.h>
359 #endif /* __TIZEN_MEDIA_PLAYER_DOC_H__ */