4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: JongHyuk Choi <jhchoi.choi@samsung.com>, YeJin Cho <cho.yejin@samsung.com>,
7 * YoungHwan An <younghwan_.an@samsung.com>
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
23 #ifndef __MM_PLAYER_ATTRS_H__
24 #define __MM_PLAYER_ATTRS_H__
31 MMPLAYER_ATTRS_PROFILE_URI, /* 0 */
32 MMPLAYER_ATTRS_PROFILE_USER_PARAM,
33 MMPLAYER_ATTRS_PROFILE_PLAY_COUNT,
34 MMPLAYER_ATTRS_PROFILE_PREPARE_ASYNC,
35 MMPLAYER_ATTRS_STREAMING_USER_AGENT,
36 MMPLAYER_ATTRS_STREAMING_COOKIE, /* 5 */
37 MMPLAYER_ATTRS_SUBTITLE_URI,
38 MMPLAYER_ATTRS_CONTENT_BITRATE,
39 MMPLAYER_ATTRS_CONTENT_MAX_BITRATE,
40 MMPLAYER_ATTRS_CONTENT_VIDEO_FOUND,
41 MMPLAYER_ATTRS_CONTENT_VIDEO_CODEC, /* 10 */
42 MMPLAYER_ATTRS_CONTENT_VIDEO_BITRATE,
43 MMPLAYER_ATTRS_CONTENT_VIDEO_FPS,
44 MMPLAYER_ATTRS_CONTENT_VIDEO_WIDTH,
45 MMPLAYER_ATTRS_CONTENT_VIDEO_HEIGHT,
46 MMPLAYER_ATTRS_CONTENT_VIDEO_ORIENTATION,
47 MMPLAYER_ATTRS_CONTENT_VIDEO_IS_SPHERICAL,
48 MMPLAYER_ATTRS_CONTENT_AUDIO_CODEC,
49 MMPLAYER_ATTRS_CONTENT_AUDIO_BITRATE,
50 MMPLAYER_ATTRS_CONTENT_AUDIO_CHANNELS,
51 MMPLAYER_ATTRS_CONTENT_AUDIO_SAMPLERATE, /* 20 */
52 MMPLAYER_ATTRS_CONTENT_AUDIO_FORMAT,
53 MMPLAYER_ATTRS_CONTENT_TEXT_TRACK_NUM,
54 MMPLAYER_ATTRS_CONTENT_TEXT_TRACK_INDEX,
55 MMPLAYER_ATTRS_TAG_ARTIST,
56 MMPLAYER_ATTRS_TAG_TITLE,
57 MMPLAYER_ATTRS_TAG_ALBUM,
58 MMPLAYER_ATTRS_TAG_GENRE,
59 MMPLAYER_ATTRS_TAG_AUTHOR,
60 MMPLAYER_ATTRS_TAG_COPYRIGHT,
61 MMPLAYER_ATTRS_TAG_DATE, /* 30 */
62 MMPLAYER_ATTRS_TAG_DESCRIPTION,
63 MMPLAYER_ATTRS_TAG_TRACK_NUM,
64 MMPLAYER_ATTRS_TAG_ALBUM_COVER,
65 MMPLAYER_ATTRS_DISPLAY_ROTATION,
66 MMPLAYER_ATTRS_DISPLAY_VISIBLE,
67 MMPLAYER_ATTRS_DISPLAY_METHOD,
68 MMPLAYER_ATTRS_DISPLAY_OVERLAY,
69 MMPLAYER_ATTRS_DISPLAY_WIN_ROI_X,
70 MMPLAYER_ATTRS_DISPLAY_WIN_ROI_Y,
71 MMPLAYER_ATTRS_DISPLAY_WIN_ROI_WIDTH, /* 40 */
72 MMPLAYER_ATTRS_DISPLAY_WIN_ROI_HEIGHT,
73 MMPLAYER_ATTRS_DISPLAY_SURFACE_TYPE,
74 MMPLAYER_ATTRS_SOUND_STREAM_TYPE,
75 MMPLAYER_ATTRS_SOUND_STREAM_INDEX,
76 MMPLAYER_ATTRS_SOUND_LATENCY_MODE,
77 MMPLAYER_ATTRS_PCM_EXTRACTION_SAMPLERATE,
78 MMPLAYER_ATTRS_PCM_EXTRACTION_CHANNELS,
79 MMPLAYER_ATTRS_ACCURATE_SEEK,
80 MMPLAYER_ATTRS_PCM_EXTRACTION_FORMAT,
81 MMPLAYER_ATTRS_DRC_MODE, /* 50 */
82 MMPLAYER_ATTRS_GAPLESS_MODE,
83 MMPLAYER_ATTRS_ENABLE_VIDEO_DECODED_CB,
84 MMPLAYER_ATTRS_VIDEO_CODEC_TYPE,
85 MMPLAYER_ATTRS_AUDIO_CODEC_TYPE,
86 MMPLAYER_ATTRS_VIDEO_BUFFER_TOTAL_SIZE,
87 MMPLAYER_ATTRS_VIDEO_BUFFER_EXTRA_SIZE,
88 MMPLAYER_ATTRS_PREBUFFER_MS,
89 MMPLAYER_ATTRS_REBUFFER_MS,
90 MMPLAYER_ATTRS_PITCH_CONTROL,
91 MMPLAYER_ATTRS_PITCH_VALUE, /* 60 */
92 MMPLAYER_ATTRS_AUDIO_OFFLOAD,
93 MMPLAYER_ATTRS_AUDIO_OFFLOAD_FORMAT,
95 } mmplayer_attrs_id_e;
97 typedef bool (*mmplayer_commit_func_t)(MMHandleType handle, int attr_idx, const MMAttrsValue *value);
100 mmplayer_attrs_id_e attrid;
110 MMAttrsValidType valid_type;
114 double *double_array;
122 mmplayer_commit_func_t attr_commit; /* called before committing attr */
123 } mmplayer_attrs_spec_t;
126 * This function set values of attributes.
128 * @param[in] handle Handle of player.
129 * @param[in] err_atr_name Name of attribute that is failed (NULL can be set if it's not require to check. )
130 * @param[in] attribute_name Name of the first attribute to set
131 * @param[in] args_list List of attributes and values
132 * @return This function returns zero on success, or negative value with error code.
134 * @see _mmplayer_get_attribute()
137 int _mmplayer_set_attribute(MMHandleType handle, char **err_atr_name, const char *attribute_name, va_list args_list);
139 * This function get values of attributes.
141 * @param[in] handle Handle of player.
142 * @param[in] err_atr_name Name of attribute that is failed (NULL can be set if it's not require to check. )
143 * @param[in] attribute_name Name of the first attribute to set
144 * @param[in] args_list List of attributes and values
145 * @return This function returns zero on success, or negative value with error code.
147 * @see _mmplayer_set_attribute()
150 int _mmplayer_get_attribute(MMHandleType handle, char **err_atr_name, const char *attribute_name, va_list args_list);
152 * This function get configuration values of attribute.
154 * @param[in] handle Handle of player.
155 * @param[in] attribute_name Name of the first attribute to set
156 * @param[in] info Configuration values
157 * @return This function returns zero on success, or negative value with error code.
162 int _mmplayer_get_attributes_info(MMHandleType handle, const char *attribute_name, mmplayer_attrs_info_t *info);
164 * This function allocates structure of attributes and sets initial values.
166 * @param[in] handle Handle of player.
167 * @return This function returns allocated structure of attributes.
169 * @see _mmplayer_deconstruct_attribute()
172 MMHandleType _mmplayer_construct_attribute(MMHandleType handle);
174 * This function release allocated attributes.
176 * @param[in] handle Handle of player.
177 * @return This function returns true on success or false on failure.
179 * @see _mmplayer_construct_attribute()
182 bool _mmplayer_deconstruct_attribute(MMHandleType handle);
188 #endif /* __MM_PLAYER_ATTRS_H__ */