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 * Seungbae Shin <seungbae.shin@samsung.com>, 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_H__
24 #define __MM_PLAYER_H__
27 /*===========================================================================================
31 ========================================================================================== */
36 #include <mm_message.h>
37 #include <media_packet.h>
43 /*===========================================================================================
45 | GLOBAL DEFINITIONS AND DECLARATIONS |
47 ========================================================================================== */
52 * uri to play (string)
55 #define MM_PLAYER_CONTENT_URI "profile_uri"
57 * MM_PLAYER_VIDEO_ROTATION
59 * can change video angle (int)
60 * @see MMDisplayRotationType
62 #define MM_PLAYER_VIDEO_ROTATION "display_rotation"
64 * MM_PLAYER_VIDEO_WIDTH:
66 * get the video width (int), It's guaranteed after calling mm_player_start() or
67 * receiving MM_MESSAGE_BEGIN_OF_STREAM.
70 #define MM_PLAYER_VIDEO_WIDTH "content_video_width"
72 * MM_PLAYER_VIDEO_HEIGHT:
74 * get the video height (int), It's guaranteed after calling mm_player_start() or
75 * receiving MM_MESSAGE_BEGIN_OF_STREAM.
78 #define MM_PLAYER_VIDEO_HEIGHT "content_video_height"
80 * MM_PLAYER_VIDEO_EVAS_SURFACE_SINK:
82 * get the video evas surface sink plugin name (string), It's guaranteed after calling mm_player_create()
85 #define MM_PLAYER_VIDEO_EVAS_SURFACE_SINK "display_evas_surface_sink"
89 * set memory pointer to play (data)
92 #define MM_PLAYER_MEMORY_SRC "profile_user_param"
94 * MM_PLAYER_PLAYBACK_COUNT
96 * can set playback count (int), Default value is 1 and -1 is for infinity playing until releasing it.
99 #define MM_PLAYER_PLAYBACK_COUNT "profile_play_count"
101 * MM_PLAYER_SUBTITLE_URI
103 * set the subtitle path (string)
105 #define MM_PLAYER_SUBTITLE_URI "subtitle_uri"
107 * MM_PLAYER_STREAMING_USER_AGENT
109 * set the streaming user agent (string)
111 #define MM_PLAYER_STREAMING_USER_AGENT "streaming_user_agent"
113 * MM_PLAYER_STREAMING_COOKIE
115 * set the streaming cookie (int)
117 #define MM_PLAYER_STREAMING_COOKIE "streaming_cookie"
119 * MM_PLAYER_VIDEO_CODEC
121 * codec the video data is stored in (string)
123 #define MM_PLAYER_VIDEO_CODEC "content_video_codec"
125 * MM_PLAYER_AUDIO_CODEC
127 * codec the audio data is stored in (string)
129 #define MM_PLAYER_AUDIO_CODEC "content_audio_codec"
131 * MM_PLAYER_AUDIO_BITRATE
133 * set the streaming proxy port (int)
135 #define MM_PLAYER_AUDIO_BITRATE "content_audio_bitrate"
137 * MM_PLAYER_AUDIO_CHANNEL
139 * the number of audio channel (int)
141 #define MM_PLAYER_AUDIO_CHANNEL "content_audio_channels"
143 * MM_PLAYER_AUDIO_SAMPLERATE
145 * audio samplerate (int)
147 #define MM_PLAYER_AUDIO_SAMPLERATE "content_audio_samplerate"
149 * MM_PLAYER_AUDIO_TRACK_NUM
151 * track number inside a collection (int)
153 #define MM_PLAYER_AUDIO_TRACK_NUM "content_audio_track_num"
155 * MM_PLAYER_TEXT_TRACK_NUM
157 * track number inside a collection (int)
159 #define MM_PLAYER_TEXT_TRACK_NUM "content_text_track_num"
161 * MM_PLAYER_TAG_ARTIST
163 * person(s) responsible for the recording (string)
165 #define MM_PLAYER_TAG_ARTIST "tag_artist"
167 * MM_PLAYER_TAG_TITLE
171 #define MM_PLAYER_TAG_TITLE "tag_title"
173 * MM_PLAYER_TAG_ALBUM
175 * album containing this data (string)
177 #define MM_PLAYER_TAG_ALBUM "tag_album"
179 * MM_PLAYER_TAG_GENRE
181 * genre this data belongs to (string)
183 #define MM_PLAYER_TAG_GENRE "tag_genre"
185 * MM_PLAYER_TAG_AUTHOUR
189 #define MM_PLAYER_TAG_AUTHOUR "tag_author"
191 * MM_PLAYER_TAG_COPYRIGHT
193 * copyright notice of the data (string)
195 #define MM_PLAYER_TAG_COPYRIGHT "tag_copyright"
199 * date the data was created (string)
201 #define MM_PLAYER_TAG_DATE "tag_date"
203 * MM_PLAYER_TAG_DESCRIPRION
205 * short text describing the content of the data (string)
207 #define MM_PLAYER_TAG_DESCRIPRION "tag_description"
209 * MM_PLAYER_TAG_TRACK_NUM
211 * track number inside a collection (int)
213 #define MM_PLAYER_TAG_TRACK_NUM "tag_track_num"
217 * progressive download mode (int)
219 #define MM_PLAYER_PD_MODE "pd_mode"
224 * dynamic resolution change mode (int)
226 #define MM_PLAYER_DRC_MODE "drc_mode"
229 * MM_PLAYER_GAPLESS_MODE
231 * gapless playback mode (int)
233 #define MM_PLAYER_GAPLESS_MODE "gapless_mode"
236 * MM_PLAYER_ENABLE_VIDEO_DECODED_CB
238 * enable video decoded callback (int)
240 #define MM_PLAYER_ENABLE_VIDEO_DECODED_CB "enable_video_decoded_cb"
243 * MM_PLAYER_VIDEO_CODEC_TYPE
245 * video codec type (int)
247 #define MM_PLAYER_VIDEO_CODEC_TYPE "video_codec_type"
250 * MM_PLAYER_AUDIO_CODEC_TYPE
252 * audio codec type (int)
254 #define MM_PLAYER_AUDIO_CODEC_TYPE "audio_codec_type"
256 #define BUFFER_MAX_PLANE_NUM (4)
259 MMPixelFormatType format; /**< image format */
260 int width; /**< width of video buffer */
261 int height; /**< height of video buffer */
262 unsigned int timestamp; /**< timestamp of stream buffer (msec)*/
263 unsigned int length_total; /**< total length of stream buffer (in byte)*/
264 void *data[BUFFER_MAX_PLANE_NUM];
265 void *bo[BUFFER_MAX_PLANE_NUM]; /**< TBM buffer object */
266 void *internal_buffer; /**< Internal buffer pointer */
267 int stride[BUFFER_MAX_PLANE_NUM]; /**< stride of plane */
268 int elevation[BUFFER_MAX_PLANE_NUM]; /**< elevation of plane */
269 int orientation; /**< orientation */
270 } MMPlayerVideoStreamDataType;
273 * Enumerations of player state.
276 MM_PLAYER_STATE_NULL, /**< Player is created, but not realized yet */
277 MM_PLAYER_STATE_READY, /**< Player is ready to play media */
278 MM_PLAYER_STATE_PLAYING, /**< Player is now playing media */
279 MM_PLAYER_STATE_PAUSED, /**< Player is paused while playing media */
280 MM_PLAYER_STATE_NONE, /**< Player is not created yet */
281 MM_PLAYER_STATE_NUM, /**< Number of player states */
285 * Enumerations of position formats.
286 * Used while invoking mm_player_get_position/mm_player_set_position APIs
289 MM_PLAYER_POS_FORMAT_TIME, /**< Format for time based */
290 MM_PLAYER_POS_FORMAT_PERCENT, /**< Format for percentage */
291 MM_PLAYER_POS_FORMAT_NUM, /**< Number of position formats */
292 } MMPlayerPosFormatType;
295 * Enumeration for attribute values types.
298 MM_PLAYER_ATTRS_TYPE_INVALID = -1, /**< Type is invalid */
299 MM_PLAYER_ATTRS_TYPE_INT, /**< Integer type */
300 MM_PLAYER_ATTRS_TYPE_DOUBLE, /**< Double type */
301 MM_PLAYER_ATTRS_TYPE_STRING, /**< UTF-8 String type */
302 MM_PLAYER_ATTRS_TYPE_DATA, /**< Pointer type */
303 MM_PLAYER_ATTRS_TYPE_ARRAY, /**< Array type */
304 MM_PLAYER_ATTRS_TYPE_RANGE, /**< Range type */
305 MM_PLAYER_ATTRS_TYPE_NUM, /**< Number of attribute type */
309 * Enumeration for attribute validation type.
312 MM_PLAYER_ATTRS_VALID_TYPE_INVALID = -1, /**< Invalid validation type */
313 MM_PLAYER_ATTRS_VALID_TYPE_NONE, /**< Do not check validity */
314 MM_PLAYER_ATTRS_VALID_TYPE_INT_ARRAY, /**< validity checking type of integer array */
315 MM_PLAYER_ATTRS_VALID_TYPE_INT_RANGE, /**< validity checking type of integer range */
316 MM_PLAYER_ATTRS_VALID_TYPE_DOUBLE_ARRAY, /**< validity checking type of double array */
317 MM_PLAYER_ATTRS_VALID_TYPE_DOUBLE_RANGE, /**< validity checking type of double range */
318 } MMPlayerAttrsValidType;
321 * Enumeration for attribute access flag.
324 MM_PLAYER_ATTRS_FLAG_NONE = 0, /**< None flag is set */
325 MM_PLAYER_ATTRS_FLAG_READABLE = 1 << 0, /**< Readable */
326 MM_PLAYER_ATTRS_FLAG_WRITABLE = 1 << 1, /**< Writable */
327 MM_PLAYER_ATTRS_FLAG_MODIFIED = 1 << 2, /**< Modified */
329 MM_PLAYER_ATTRS_FLAG_RW = MM_PLAYER_ATTRS_FLAG_READABLE | MM_PLAYER_ATTRS_FLAG_WRITABLE, /**< Readable and Writable */
333 * Enumeration for progressive download
336 MM_PLAYER_PD_MODE_NONE,
337 MM_PLAYER_PD_MODE_URI,
338 MM_PLAYER_PD_MODE_FILE // not tested yet, because of no fixed scenario
342 * Enumeration of track types
345 MM_PLAYER_TRACK_TYPE_AUDIO = 0,
346 MM_PLAYER_TRACK_TYPE_VIDEO,
347 MM_PLAYER_TRACK_TYPE_TEXT,
348 MM_PLAYER_TRACK_TYPE_MAX
352 * Enumeration of runtime buffering mode
355 MM_PLAYER_BUFFERING_MODE_ADAPTIVE = 0, /**< default, If buffering is occurred, player will consider the bandwidth to adjust buffer setting. */
356 MM_PLAYER_BUFFERING_MODE_FIXED, /**< player will set buffer size with this fixed size value. */
357 MM_PLAYER_BUFFERING_MODE_MAX,
358 } MMPlayerBufferingMode;
361 * Edge Properties of the text.
365 MM_PLAYER_EDGE_RAISED,
366 MM_PLAYER_EDGE_DEPRESSED,
367 MM_PLAYER_EDGE_UNIFORM,
368 MM_PLAYER_EDGE_DROPSHADOW
369 } MMPlayerSubtitleEdge;
372 * Enumeration of media stream buffer status
375 MM_PLAYER_MEDIA_STREAM_BUFFER_UNDERRUN,
376 MM_PLAYER_MEDIA_STREAM_BUFFER_OVERFLOW,
377 } MMPlayerMediaStreamBufferStatus;
380 * Enumeration for stream type.
383 MM_PLAYER_STREAM_TYPE_DEFAULT, /**< Container type */
384 MM_PLAYER_STREAM_TYPE_AUDIO, /**< Audio element stream type */
385 MM_PLAYER_STREAM_TYPE_VIDEO, /**< Video element stream type */
386 MM_PLAYER_STREAM_TYPE_TEXT, /**< Text type */
387 MM_PLAYER_STREAM_TYPE_MAX,
388 } MMPlayerStreamType;
391 MM_PLAYER_CODEC_TYPE_DEFAULT = 0, /**< codec is selected by the priority */
392 MM_PLAYER_CODEC_TYPE_HW, /**< HW codec can only be selected */
393 MM_PLAYER_CODEC_TYPE_SW, /**< SW codec can only be selected */
394 } MMPlayerVideoCodecType;
397 * Attribute validity structure
400 MMPlayerAttrsType type;
401 MMPlayerAttrsValidType validity_type;
402 MMPlayerAttrsFlag flag;
404 * a union that describes validity of the attribute.
405 * Only when type is 'MM_ATTRS_TYPE_INT' or 'MM_ATTRS_TYPE_DOUBLE',
406 * the attribute can have validity.
410 * Validity structure for integer array.
413 int *array; /**< a pointer of array */
414 int count; /**< size of array */
418 * Validity structure for integer range.
421 int min; /**< minimum range */
422 int max; /**< maximum range */
426 * Validity structure for double array.
429 double * array; /**< a pointer of array */
430 int count; /**< size of array */
434 * Validity structure for double range.
437 double min; /**< minimum range */
438 double max; /**< maximum range */
447 * @see mm_player_set_volume, mm_player_get_volume
450 float level[MM_VOLUME_CHANNEL_NUM]; /**< Relative volume factor for each channels */
451 } MMPlayerVolumeType;
454 * Video stream info in external demux case
457 typedef struct _VideoStreamInfo {
459 unsigned int framerate_num;
460 unsigned int framerate_den;
463 unsigned char *codec_extradata;
464 unsigned int extradata_size;
465 unsigned int version;
466 } MMPlayerVideoStreamInfo;
469 * Audio stream info in external demux case
472 typedef struct _AudioStreamInfo {
474 unsigned int channels;
475 unsigned int sample_rate;
476 unsigned char *codec_extradata;
477 unsigned int extradata_size;
478 unsigned int version;
479 unsigned int user_info;
482 // unsigned int width;
483 // unsigned int depth;
484 // unsigned int endianness;
486 } MMPlayerAudioStreamInfo;
489 * Subtitle stream info in external demux case
492 typedef struct _SubtitleStreamInfo {
494 unsigned int codec_tag;
495 void *context; //for smpte text
496 } MMPlayerSubtitleStreamInfo;
499 * Audio stream callback function type.
501 * @param stream [in] Reference pointer to audio frame data
502 * @param stream_size [in] Size of audio frame data
503 * @param user_param [in] User defined parameter which is passed when set
504 * audio stream callback
506 * @return This callback function have to return MM_ERROR_NONE.
508 typedef bool (*mm_player_audio_stream_callback) (void *stream, int stream_size, void *user_param);
512 * selected subtitle track number callback function type.
514 * @param track_num [in] Track number of subtitle
515 * @param user_param [in] User defined parameter
518 * @return This callback function have to return MM_ERROR_NONE.
520 typedef bool (*mm_player_track_selected_subtitle_language_callback)(int track_num, void *user_param);
523 * Buffer underrun / overflow data callback function type.
525 * @param status [in] buffer status
526 * @param user_param [in] User defined parameter which is passed when set
527 * to enough data callback or need data callback
529 * @return This callback function have to return MM_ERROR_NONE.
531 typedef bool (*mm_player_media_stream_buffer_status_callback) (MMPlayerStreamType type, MMPlayerMediaStreamBufferStatus status, unsigned long long bytes, void *user_param);
534 * Buffer seek data callback function type.
536 * @param offset [in] offset for the buffer playback
537 * @param user_param [in] User defined parameter which is passed when set
538 * to seek data callback
540 * @return This callback function have to return MM_ERROR_NONE.
542 typedef bool (*mm_player_media_stream_seek_data_callback) (MMPlayerStreamType type, unsigned long long offset, void *user_param);
545 * Called to notify the stream changed.
547 * @param user_data [in] The user data passed from the callback registration function
549 * @return This callback function have to return MM_ERROR_NONE.
551 typedef bool (*mm_player_stream_changed_callback) (void *user_param);
554 /*===========================================================================================
556 | GLOBAL FUNCTION PROTOTYPES |
558 ========================================================================================== */
561 * This function creates a player object for playing multimedia contents. \n
562 * The attributes of player are created to get/set some values with application. \n
563 * And, mutex, gstreamer and other resources are initialized at this time. \n
564 * If player is created, the state will become MM_PLAYER_STATE_NULL.
566 * @param player [out] Handle of player
568 * @return This function returns zero on success, or negative value with error code. \n
569 * Please refer 'mm_error.h' to know it in detail.
571 * @post MM_PLAYER_STATE_NULL
572 * @see mm_player_destroy
573 * @remark You can create multiple handles on a context at the same time. \n
574 * However, player cannot guarantee proper operation because of limitation of resources, \n
575 * such as audio device or display device.
579 char *g_err_attr_name = NULL;
581 if (mm_player_create(&g_player) != MM_ERROR_NONE) {
582 LOGE("failed to create player\n");
585 if (mm_player_set_attribute(g_player,
587 "profile_uri", filename, strlen(filename),
588 "display_overlay", (void*)&g_win.xid, sizeof(g_win.xid),
589 NULL) != MM_ERROR_NONE) {
590 LOGE("failed to set %s attribute\n", g_err_attr_name);
591 free(g_err_attr_name);
594 mm_player_set_message_callback(g_player, msg_callback, (void*)g_player);
597 int mm_player_create(MMHandleType *player);
600 * This function releases player object and all resources which were created by mm_player_create(). \n
601 * And, player handle will also be destroyed.
603 * @param player [in] Handle of player
605 * @return This function returns zero on success, or negative value with error code.
606 * @pre Player state may be MM_PLAYER_STATE_NULL. \n
607 * But, it can be called in any state.
608 * @post Because handle is released, there is no any state.
609 * @see mm_player_create
610 * @remark This method can be called with a valid player handle from any state to \n
611 * completely shutdown the player operation.
615 if (mm_player_destroy(g_player) != MM_ERROR_NONE) {
616 LOGE("failed to destroy player\n");
620 int mm_player_destroy(MMHandleType player);
623 * This function parses uri and makes gstreamer pipeline by uri scheme. \n
624 * So, uri should be set before realizing with mm_player_set_attribute(). \n
626 * @param player [in] Handle of player
628 * @return This function returns zero on success, or negative value with error code.
630 * @pre Player state should be MM_PLAYER_STATE_NULL.
631 * @post player state will be MM_PLAYER_STATE_READY.
632 * @see mm_player_unrealize
636 if (mm_player_realize(g_player) != MM_ERROR_NONE) {
637 LOGE("failed to realize player\n");
641 int mm_player_realize(MMHandleType player);
644 * This function uninitializes player object. So, resources and allocated memory \n
645 * will be freed. And, gstreamer pipeline is also destroyed. So, if you want to play \n
646 * other contents, player should be created again after destruction or realized with new uri.
648 * @param player [in] Handle of player
650 * @return This function returns zero on success, or negative value with error code.
651 * @pre Player state may be MM_PLAYER_STATE_READY to unrealize. \n
652 * But, it can be called in any state.
653 * @post Player state will be MM_PLAYER_STATE_NULL.
654 * @see mm_player_realize
655 * @remark This method can be called with a valid player handle from any state.
659 if (mm_player_unrealize(g_player) != MM_ERROR_NONE) {
660 LOGE("failed to unrealize player\n");
664 int mm_player_unrealize(MMHandleType player);
667 * This function is to get current state of player. \n
668 * Application have to check current state before doing some action.
670 * @param player [in] Handle of player
671 * @param state [out] current state of player on success
673 * @return This function returns zero on success, or negative value with error code.
675 * @see MMPlayerStateType
679 if (mm_player_get_state(g_player, &state) != MM_ERROR_NONE) {
680 LOGE("failed to get state\n");
684 int mm_player_get_state(MMHandleType player, MMPlayerStateType *state);
687 * This function is to set relative volume of player. \n
688 * So, It controls logical volume value. \n
689 * But, if developer want to change system volume, mm sound api should be used.
691 * @param player [in] Handle of player
692 * @param volume [in] Volume factor of each channel
694 * @return This function returns zero on success, or negative value with error code.
695 * @see MMPlayerVolumeType, mm_player_get_volume
696 * @remark The range of factor range is from 0 to 1.0. (1.0 = 100%) And, default value is 1.0.
699 MMPlayerVolumeType volume;
702 for (i = 0; i < MM_VOLUME_CHANNEL_NUM; i++)
703 volume.level[i] = MM_VOLUME_LEVEL_MAX;
705 if (mm_player_set_volume(g_player, &volume) != MM_ERROR_NONE)
707 LOGE("failed to set volume\n");
711 int mm_player_set_volume(MMHandleType player, MMPlayerVolumeType *volume);
714 * This function is to get current volume factor of player.
716 * @param player [in] Handle of player.
717 * @param volume [out] Volume factor of each channel.
719 * @return This function returns zero on success, or negative value with error code.
721 * @see MMPlayerVolumeType, mm_player_set_volume
725 MMPlayerVolumeType volume;
728 if (mm_player_get_volume(g_player, &volume) != MM_ERROR_NONE)
730 LOGW("failed to get volume\n");
733 for (i = 0; i < MM_VOLUME_CHANNEL_NUM; i++)
734 LOGD("channel[%d] = %d \n", i, volume.level[i]);
737 int mm_player_get_volume(MMHandleType player, MMPlayerVolumeType *volume);
740 * This function is to start playing media contents. Demux(parser), codec and related plugins are decided \n
741 * at this time. And, MM_MESSAGE_BEGIN_OF_STREAM will be posted through callback function registered \n
742 * by mm_player_set_message_callback().
744 * @param player [in] Handle of player
746 * @return This function returns zero on success, or negative value with error code.
749 * @pre Player state may be MM_PLAYER_STATE_READY.
750 * @post Player state will be MM_PLAYER_STATE_PLAYING.
751 * @see mm_player_stop
755 if (mm_player_start(g_player) != MM_ERROR_NONE)
757 LOGE("failed to start player\n");
761 int mm_player_start(MMHandleType player);
764 * This function is to stop playing media contents and it's different with pause. \n
765 * If mm_player_start() is called after this, content will be started again from the beginning. \n
766 * So, it can be used to close current playback.
768 * @param player [in] Handle of player
770 * @return This function returns zero on success, or negative value with error code.
772 * @pre Player state may be MM_PLAYER_STATE_PLAYING.
773 * @post Player state will be MM_PLAYER_STATE_READY.
774 * @see mm_player_start
778 if (mm_player_stop(g_player) != MM_ERROR_NONE)
780 LOGE("failed to stop player\n");
784 int mm_player_stop(MMHandleType player);
787 * This function is to pause playing media contents.
789 * @param player [in] Handle of player.
791 * @return This function returns zero on success, or negative value with error code.
793 * @pre Player state may be MM_PLAYER_STATE_PLAYING.
794 * @post Player state will be MM_PLAYER_STATE_PAUSED.
795 * @see mm_player_resume
799 if (mm_player_pause(g_player) != MM_ERROR_NONE)
801 LOGE("failed to pause player\n");
805 int mm_player_pause(MMHandleType player);
808 * This function is to resume paused media contents.
810 * @param player [in] Handle of player.
812 * @return This function returns zero on success, or negative value with error code.
814 * @pre Player state may be MM_PLAYER_STATE_PAUSED.
815 * @post Player state will be MM_PLAYER_STATE_PLAYING.
816 * @see mm_player_pause
820 if (mm_player_resume(g_player) != MM_ERROR_NONE)
822 LOGE("failed to resume player\n");
826 int mm_player_resume(MMHandleType player);
829 * This function is to set the position for playback. \n
830 * So, it can be seeked to requested position. \n
832 * @param player [in] Handle of player
833 * @param format [in] Format of position.
834 * @param pos [in] Position for playback
836 * @return This function returns zero on success, or negative value with error code.
837 * @see MMPlayerPosFormatType, mm_player_get_position
838 * @remark the unit of time-based format is millisecond and other case is percent.
840 int mm_player_set_position(MMHandleType player, MMPlayerPosFormatType format, int64_t pos);
843 * This function is to get current position of playback content.
845 * @param player [in] Handle of player.
846 * @param format [in] Format of position.
847 * @param pos [out] contains current position on success or zero in case of failure.
849 * @return This function returns zero on success, or negative value with errors
850 * @see MMPlayerPosFormatType, mm_player_set_position
851 * @remark the unit of time-based format is millisecond and other case is percent.
853 int mm_player_get_position(MMHandleType player, MMPlayerPosFormatType format, int64_t *pos);
856 * This function is to get the content time duration.
858 int mm_player_get_duration(MMHandleType player, int64_t *dur);
861 * This function is to get current buffer position of playback content.
863 * @param player [in] Handle of player.
864 * @param format [in] Format of position.
865 * @param start_pos [out] contains buffer start position on success or zero in case of failure.
866 * @param stop_pos [out] contains buffer current position on success or zero in case of failure.
868 * @return This function returns zero on success, or negative value with errors
869 * @see MMPlayerPosFormatType, mm_player_set_position
870 * @remark the unit of time-based format is millisecond and other case is percent.
873 int start_pos = 0, stop_pos = 0;
875 mm_player_get_buffer_position(g_player, MM_PLAYER_POS_FORMAT_PERCENT, &start_pos, &stop_pos );
877 LOGD("buffer position: [%d] ~ [%d] \%\n", start_pos, stop_pos );
880 int mm_player_get_buffer_position(MMHandleType player, MMPlayerPosFormatType format, unsigned long *start_pos, unsigned long *stop_pos);
883 * This function sets callback function for receiving messages from player.
884 * So, player can notify warning, error and normal cases to application.
886 * @param player [in] Handle of player.
887 * @param callback [in] Message callback function.
888 * @param user_param [in] User parameter which is passed to callback function.
890 * @return This function returns zero on success, or negative value with error code.
891 * @see MMMessageCallback
895 int msg_callback(int message, MMMessageParamType *param, void *user_param)
899 case MM_MESSAGE_ERROR:
903 case MM_MESSAGE_END_OF_STREAM:
907 case MM_MESSAGE_STATE_CHANGED:
911 case MM_MESSAGE_BEGIN_OF_STREAM:
921 mm_player_set_message_callback(g_player, msg_callback, (void*)g_player);
924 int mm_player_set_message_callback(MMHandleType player, MMMessageCallback callback, void *user_param);
927 * This function set callback function for receiving audio stream from player. \n
928 * So, application can get raw audio data and modify it. \n
929 * But, if callback don't return or holds it for long time, performance can be deteriorated. \n
930 * It's only supported when audio stream is included in file. \n
931 * So, if there is video stream or DRM content, it can't be used.
933 * @param player [in] Handle of player.
934 * @param callback [in] Audio stream callback function.
935 * @param user_param [in] User parameter.
937 * @return This function returns zero on success, or negative value with error
939 * @see mm_player_audio_stream_callback
940 * @remark It can be used for audio playback only.
943 bool audio_callback(void *stream, int stream_size, void *user_param)
945 LOGD("audio stream callback\n");
948 mm_player_set_audio_stream_callback(g_player, audio_callback, NULL);
951 int mm_player_set_audio_stream_callback(MMHandleType player, mm_player_audio_stream_callback callback, void *user_param);
954 * This function is to mute volume of player
956 * @param player [in] Handle of player
957 * @param mute [in] Mute(1) or not mute(0)
959 * @return This function returns zero on success, or negative value with error code
960 * @see mm_player_get_mute
964 if (mm_player_set_mute(g_player, TRUE) != MM_ERROR_NONE)
966 LOGW("failed to set mute\n");
970 int mm_player_set_mute(MMHandleType player, int mute);
973 * This function is to get mute value of player
975 * @param player [in] Handle of player
976 * @param mute [out] Sound is muted
978 * @return This function returns zero on success, or negative value with error code
979 * @see mm_player_set_mute
985 if (mm_player_get_mute(g_player, &mute) != MM_ERROR_NONE)
987 LOGW("failed to get mute\n");
990 LOGD("mute status:%d\n", mute);
993 int mm_player_get_mute(MMHandleType player, int *mute);
996 * This function is to adjust subtitle postion. So, subtitle can show at the adjusted position. \n
997 * If pos is negative, subtitle will be displayed previous time, the other hand forward time. \n
999 * @param player [in] Handle of player
1000 * @param pos [in] postion to be adjusted
1002 * @return This function returns zero on success, or negative value with error
1004 * @see mm_player_adjust_subtitle_position
1011 if (mm_player_adjust_subtitle_position(g_player, MM_PLAYER_POS_FORMAT_TIME, pos) != MM_ERROR_NONE)
1013 LOGW("failed to adjust subtitle postion.\n");
1018 int mm_player_adjust_subtitle_position(MMHandleType player, MMPlayerPosFormatType format, int pos);
1021 * This function is to set subtitle silent status. So, subtitle can show or hide during playback \n
1022 * by this value. But, one subtitle file should be set with "subtitle_uri" attribute before calling mm_player_realize(); \n
1023 * Player FW parses subtitle file and send text data including timestamp to application \n
1024 * through message callback with MM_MESSAGE_UPDATE_SUBTITLE will be. \n
1025 * So, application have to render it. And, subtitle can be supported only in a seprate file. \n
1026 * So, it's not supported for embedded case.
1028 * @param player [in] Handle of player
1029 * @param silent [in] silent(integer value except 0) or not silent(0)
1031 * @return This function returns zero on success, or negative value with error
1033 * @see mm_player_get_subtitle_silent, MM_MESSAGE_UPDATE_SUBTITLE
1037 mm_player_set_attribute(g_player,
1039 "subtitle_uri", g_subtitle_uri, strlen(g_subtitle_uri),
1043 if (mm_player_set_subtitle_silent(g_player, TRUE) != MM_ERROR_NONE)
1045 LOGW("failed to set subtitle silent\n");
1049 int mm_player_set_subtitle_silent(MMHandleType player, int silent);
1052 * This function is to get silent status of subtitle.
1054 * @param player [in] Handle of player
1055 * @param silent [out] subtitle silent property
1057 * @return This function returns zero on success, or negative value with error
1059 * @see mm_player_set_subtitle_silent, MM_MESSAGE_UPDATE_SUBTITLE
1065 if (mm_player_get_subtitle_silent(g_player, &silent) != MM_ERROR_NONE)
1067 LOGW("failed to set subtitle silent\n");
1071 int mm_player_get_subtitle_silent(MMHandleType player, int *silent);
1074 * This function is to set attributes into player. Multiple attributes can be set simultaneously. \n
1075 * If one of attribute fails, this function will stop at the point and let you know the name which is failed. \n
1077 * @param player [in] Handle of player.
1078 * @param err_attr_name [out] Name of attribute which is failed to set
1079 * @param first_attribute_name [in] Name of the first attribute to set
1080 * @param ... [in] Value for the first attribute, followed optionally by more name/value pairs, terminated by NULL.
1081 * But, in the case of data or string type, it should be name/value/size.
1083 * @return This function returns zero on success, or negative value with error code.
1085 * @see mm_player_get_attribute
1086 * @remark This function must be terminated by NULL argument.
1087 * And, if this function is failed, err_attr_name param must be free.
1090 char *g_err_attr_name = NULL;
1092 if (mm_player_set_attribute(g_player,
1094 "profile_uri", filename, strlen(filename),
1095 "profile_play_count", count,
1096 NULL) != MM_ERROR_NONE) {
1097 LOGW("failed to set %s attribute\n", g_err_attr_name);
1098 free(g_err_attr_name);
1103 int mm_player_set_attribute(MMHandleType player, char **err_attr_name, const char *first_attribute_name, ...)G_GNUC_NULL_TERMINATED;
1106 * This function is to get attributes from player. Multiple attributes can be got simultaneously.
1108 * @param player [in] Handle of player.
1109 * @param err_attr_name [out] Name of attribute which is failed to get
1110 * @param first_attribute_name [in] Name of the first attribute to get
1111 * @param ... [out] Value for the first attribute, followed optionally by more name/value pairs, terminated by NULL.
1112 * But, in the case of data or string type, it should be name/value/size.
1114 * @return This function returns zero on success, or negative value with error
1116 * @see mm_player_set_attribute
1117 * @remark This function must be terminated by NULL argument.
1118 * And, if this function is failed, err_attr_name param must be free.
1120 int mm_player_get_attribute(MMHandleType player, char **err_attr_name, const char *first_attribute_name, ...)G_GNUC_NULL_TERMINATED;
1123 * This function is to get detail information of attribute.
1125 * @param player [in] Handle of player.
1126 * @param attribute_name [in] Name of the attribute to get
1127 * @param info [out] Attribute infomation
1129 * @return This function returns zero on success, or negative value with error
1132 * @see mm_player_set_attribute, mm_player_get_attribute
1136 if (mm_player_get_attribute_info(g_player, "display_method", &method_info) != MM_ERROR_NONE) {
1137 LOGW("failed to get info\n");
1140 LOGD("type:%d \n", method_info.type); //int, double..
1141 LOGD("flag:%d \n", method_info.flag); //readable, writable..
1142 LOGD("validity type:%d \n", method_info.validity_type); //range, array..
1144 if (method_info. validity_type == MM_PLAYER_ATTRS_VALID_TYPE_INT_RANGE) {
1145 LOGD("range min:%d\n", method_info.int_range.min);
1146 LOGD("range max:%d\n", method_info.int_range.max);
1150 int mm_player_get_attribute_info(MMHandleType player, const char *attribute_name, MMPlayerAttrsInfo *info);
1153 * This function is to get download position and total size of progressive download
1155 * @param player [in] Handle of player.
1156 * @param current_pos [in] Download position currently (bytes)
1157 * @param total_size [in] Total size of file (bytes)
1159 * @return This function returns zero on success, or negative value with error code.
1162 guint64 current_pos = 0LLU;
1163 guint64 total_size = 0LLU;
1165 if (mm_player_get_pd_status(g_player, ¤t_pos, &total_size, NULL) != MM_ERROR_NONE)
1167 LOGD("current download pos = %llu, total size = %llu\n", current_pos, total_size);
1171 int mm_player_get_pd_status(MMHandleType player, guint64 *current_pos, guint64 *total_size);
1174 * This function sets callback function for receiving messages of PD downloader.
1176 * @param player [in] Handle of player.
1177 * @param callback [in] Message callback function.
1178 * @param user_param [in] User parameter which is passed to callback function.
1180 * @return This function returns zero on success, or negative value with error code.
1185 int msg_callback(int message, MMMessageParamType *param, void *user_param)
1189 case MM_MESSAGE_PD_DOWNLOADER_START:
1190 LOGD("Progressive download is started...\n");
1192 case MM_MESSAGE_PD_DOWNLOADER_END:
1193 LOGD("Progressive download is ended...\n");
1201 mm_player_set_pd_message_callback(g_player, msg_callback, NULL);
1204 int mm_player_set_pd_message_callback(MMHandleType player, MMMessageCallback callback, void *user_param);
1207 * This function is to get the track count
1209 * @param player [in] handle of player.
1210 * @param track [in] type of the track type
1211 * @param info [out] the count of the track
1213 * @return This function returns zero on success, or negative value with error
1218 gint audio_count = 0;
1220 if (mm_player_get_track_count(g_player, MM_PLAYER_TRACK_TYPE_AUDIO, &audio_count) != MM_ERROR_NONE) {
1221 LOGW("failed to get audio track count\n");
1224 LOGD("audio track count : %d \n", audio_count);
1227 int mm_player_get_track_count(MMHandleType player, MMPlayerTrackType type, int *count);
1230 * This function is to select the track
1232 * @param player [in] handle of player.
1233 * @param type [in] type of the track type
1234 * @param index [in] the index of the track
1236 * @return This function returns zero on success, or negative value with error
1239 int mm_player_select_track(MMHandleType player, MMPlayerTrackType type, int index);
1242 * This function is to add the track when user want multi subtitle
1244 * @param player [in] handle of player.
1245 * @param index [in] the index of the track
1247 * @return This function returns zero on success, or negative value with error
1250 int mm_player_track_add_subtitle_language(MMHandleType player, int index);
1253 * This function is to remove the track when user want multi subtitle
1255 * @param player [in] handle of player.
1256 * @param index [in] the index of the track
1258 * @return This function returns zero on success, or negative value with error
1261 int mm_player_track_remove_subtitle_language(MMHandleType player, int index);
1264 * This function is to notify which sutitle track is in use
1266 * @param player [in] handle of player.
1267 * @param callback [in] callback function to register
1268 * @param user_data [in] user data to be passed to the callback function
1270 * @return This function returns zero on success, or negative value with error
1273 int mm_player_track_foreach_selected_subtitle_language(MMHandleType player, mm_player_track_selected_subtitle_language_callback callback, void *user_param);
1276 * This function is to get the track language
1278 * @param player [in] handle of player.
1279 * @param type [in] type of the track type
1280 * @param index [in] the index of the track
1281 * @param code [out] language code in ISO 639-1(string)
1283 * @return This function returns zero on success, or negative value with error
1286 int mm_player_get_track_language_code(MMHandleType player, MMPlayerTrackType type, int index, char **code);
1289 * This function is to get the current running track
1291 * @param player [in] handle of player.
1292 * @param type [in] type of the track type
1293 * @param index [out] the index of the track
1295 * @return This function returns zero on success, or negative value with error
1299 int mm_player_get_current_track(MMHandleType hplayer, MMPlayerTrackType type, int *index);
1302 * This function is to set the subtitle path
1304 * @param player [in] handle of player
1305 * @param path [in] subtitle path
1307 * @return This function returns zero on success, or negative value with error code.
1309 int mm_player_set_external_subtitle_path(MMHandleType player, const char* path);
1312 * This function is to set the clock which is from master player
1314 * @param player [in] handle of player
1315 * @param clock [in] clock of master player
1316 * @param clock_delta [in] clock difference between master and slave
1317 * @param video_time [in] current playing position
1318 * @param media_clock [in] media clock information
1319 * @param audio_time [in] audio timestamp information
1320 * @return This function returns zero on success, or negative value with error code.
1322 int mm_player_set_video_share_master_clock(MMHandleType player, int64_t clock, int64_t clock_delta, int64_t video_time, int64_t media_clock, int64_t audio_time);
1324 * This function is to get the master clock
1326 * @param player [in] handle of player
1327 * @param video_time [out] current playing position
1328 * @param media_clock [out] media clock information
1329 * @param audio_time [out] audio timestamp information
1330 * @return This function returns zero on success, or negative value with error code.
1332 int mm_player_get_video_share_master_clock(MMHandleType player, int64_t *video_time, int64_t *media_clock, int64_t *audio_time);
1335 * This function is to set download mode of video hub
1337 * @param player [in] handle of player
1338 * @param mode [in] download mode
1339 * @return This function returns zero on success, or negative value with error code.
1341 int mm_player_set_video_hub_download_mode(MMHandleType player, bool mode);
1344 * This function is to set using sync handler.
1346 * @param player [in] handle of player
1347 * @param enable [in] enable/disable
1348 * @return This function returns zero on success, or negative value with error code.
1350 int mm_player_enable_sync_handler(MMHandleType player, bool enable);
1353 * This function is to set uri.
1355 * @param player [in] handle of player
1356 * @param uri [in] uri
1357 * @return This function returns zero on success, or negative value with error code.
1359 int mm_player_set_uri(MMHandleType player, const char *uri);
1362 * This function is to set next uri.
1364 * @param player [in] handle of player
1365 * @param uri [in] uri
1366 * @return This function returns zero on success, or negative value with error code.
1368 int mm_player_set_next_uri(MMHandleType player, const char *uri);
1371 * This function is to get next uri.
1373 * @param player [in] handle of player
1374 * @param uri [out] uri
1375 * @return This function returns zero on success, or negative value with error code.
1377 int mm_player_get_next_uri(MMHandleType player, char **uri);
1380 * This function is to decrease reference count of internal buffer.
1382 * @param buffer [in] video callback internal buffer
1385 void mm_player_video_stream_internal_buffer_unref(void *buffer);
1387 /**mm_player_submit_packet
1388 * This function is to submit buffer to appsrc. \n
1389 * @param player [in] Handle of player.
1390 * @param buf [in] buffer to be submit in appsrc in external feeder case.
1391 * @param len [in] length of buffer.
1392 * @param pts [in] timestamp of buffer.
1393 * @param streamtype [in] stream type of buffer.
1394 * @return This function returns zero on success, or negative value with error code.
1396 int mm_player_submit_packet(MMHandleType player, media_packet_h packet);
1398 /**mm_player_set_video_info
1399 * This function is to set caps of src pad of video appsrc in external feeder case. \n
1400 * @param player [in] Handle of player.
1401 * @param media_format_h [in] Video stream info.
1402 * @return This function returns zero on success, or negative value with error code.
1404 int mm_player_set_video_info(MMHandleType player, media_format_h format);
1406 /**mm_player_set_audio_info
1407 * This function is to set caps of src pad of Audio appsrc in external feeder case. \n
1408 * @param player [in] Handle of player.
1409 * @param media_format_h [in] Audio stream info.
1410 * @return This function returns zero on success, or negative value with error code.
1412 int mm_player_set_audio_info(MMHandleType player, media_format_h format);
1414 /**mm_player_set_subtitle_info
1415 * This function is to set caps of src pad of subtitle appsrc in external feeder case. \n
1416 * @param player [in] Handle of player.
1417 * @param subtitle_stream_info [in] Subtitle stream info.
1418 * @return This function returns zero on success, or negative value with error code.
1420 int mm_player_set_subtitle_info(MMHandleType player, MMPlayerSubtitleStreamInfo *info);
1423 * This function set callback function for receiving need or enough data message from player.
1425 * @param player [in] Handle of player.
1426 * @param type [in] stream type
1427 * @param callback [in] data callback function for stream type.
1428 * @param user_param [in] User parameter.
1430 * @return This function returns zero on success, or negative value with error
1433 int mm_player_set_media_stream_buffer_status_callback(MMHandleType player, MMPlayerStreamType type, mm_player_media_stream_buffer_status_callback callback, void * user_param);
1436 * This function set callback function for receiving seek data message from player.
1438 * @param player [in] Handle of player.
1439 * @param type [in] stream type
1440 * @param callback [in] Seek data callback function for stream type.
1441 * @param user_param [in] User parameter.
1443 * @return This function returns zero on success, or negative value with error
1446 int mm_player_set_media_stream_seek_data_callback(MMHandleType player, MMPlayerStreamType type, mm_player_media_stream_seek_data_callback callback, void * user_param);
1449 * This function is to set max size of buffer(appsrc).
1451 * @param player [in] Handle of player.
1452 * @param type [in] stream type
1453 * @param max_size [in] max bytes of buffer.
1455 * @return This function returns zero on success, or negative value with error
1458 int mm_player_set_media_stream_buffer_max_size(MMHandleType player, MMPlayerStreamType type, unsigned long long max_size);
1461 * This function is to get max size of buffer(appsrc).
1463 * @param player [in] Handle of player.
1464 * @param type [in] stream type
1465 * @param max_size [out] max bytes of buffer.
1467 * @return This function returns zero on success, or negative value with error
1470 int mm_player_get_media_stream_buffer_max_size(MMHandleType player, MMPlayerStreamType type, unsigned long long *max_size);
1473 * This function is to set min percent of buffer(appsrc).
1475 * @param player [in] Handle of player.
1476 * @param type [in] stream type
1477 * @param min_percent [in] min percent of buffer.
1479 * @return This function returns zero on success, or negative value with error
1482 int mm_player_set_media_stream_buffer_min_percent(MMHandleType player, MMPlayerStreamType type, unsigned min_percent);
1485 * This function is to get min percent of buffer(appsrc).
1487 * @param player [in] Handle of player.
1488 * @param type [in] stream type
1489 * @param min_percent [out] min percent of buffer.
1491 * @return This function returns zero on success, or negative value with error
1494 int mm_player_get_media_stream_buffer_min_percent(MMHandleType player, MMPlayerStreamType type, unsigned int *min_percent);
1497 * This function set callback function for changing audio stream from player. \n
1498 * It's only supported when audio stream is included in file. \n
1500 * @param player [in] Handle of player.
1501 * @param callback [in] Audio stream changed callback function.
1502 * @param user_param [in] User parameter.
1504 * @return This function returns zero on success, or negative value with error
1506 * @see mm_player_stream_changed_callback
1509 int mm_player_set_audio_stream_changed_callback(MMHandleType player, mm_player_stream_changed_callback callback, void *user_param);
1512 * This function set callback function for changing video stream from player. \n
1513 * It's only supported when video stream is included in file. \n
1515 * @param player [in] Handle of player.
1516 * @param callback [in] Video stream changed callback function.
1517 * @param user_param [in] User parameter.
1519 * @return This function returns zero on success, or negative value with error
1521 * @see mm_player_stream_changed_callback
1523 int mm_player_set_video_stream_changed_callback(MMHandleType player, mm_player_stream_changed_callback callback, void *user_param);
1526 * This function is to get timeout value according to the content type for muse. \n
1527 * It's only supported when video stream is included in file. \n
1529 * @param player [in] Handle of player.
1530 * @param timeout [out] timeout value (sec).
1532 * @return This function returns zero on success, or negative value with error
1536 int mm_player_get_timeout(MMHandleType player, int *timeout);
1539 * This function is to get the number of video output buffers. \n
1540 * It's only supported when video stream is included in file. \n
1542 * @param player [in] Handle of player.
1543 * @param num [out] num of buffers.
1544 * @param extra_num [out] extra num of buffers.
1546 * @return This function returns zero on success, or negative value with error
1550 int mm_player_get_num_of_video_out_buffers(MMHandleType player, int *num, int *extra_num);
1553 * This function is to set the dynamic resolution information. \n
1554 * It's only supported when video stream is included in file. \n
1556 * @param player [in] Handle of player.
1557 * @param drc [in] dynamic resolution info of media stream data
1559 * @return This function returns zero on success, or negative value with error
1563 int mm_player_set_media_stream_dynamic_resolution(MMHandleType player, bool drc);
1566 * This function is to release the video stream bo to reuse. \n
1567 * It's only supported when sw codec is used to decode video stream. \n
1569 * @param player [in] Handle of player.
1570 * @param bo [in] bo address to be released
1572 * @return This function returns zero on success, or negative value with error
1576 int mm_player_release_video_stream_bo(MMHandleType player, void* bo);
1579 * This function is to set http file buffering path
1581 * @param player [in] handle of player
1582 * @param file_path [in] file path
1583 * @return This function returns zero on success, or negative value with error code.
1585 int mm_player_set_file_buffering_path(MMHandleType player, const char *file_path);
1588 * This function is to set sound stream info
1590 int mm_player_set_sound_stream_info(MMHandleType player, char *stream_type, int stream_index);
1593 * This function is to manage the playback according to the external storage state
1595 int mm_player_manage_external_storage_state(MMHandleType player, int id, int state);
1598 * These functions are to set/get the max variant of HAS
1600 int mm_player_get_adaptive_variant_info(MMHandleType player, int *num, char **var_info);
1601 int mm_player_set_max_adaptive_variant_limit(MMHandleType player, int bandwidth, int width, int height);
1602 int mm_player_get_max_adaptive_variant_limit(MMHandleType player, int *bandwidth, int *width, int *height);
1605 * These functions are to set/get the audio only mode
1607 int mm_player_set_audio_only(MMHandleType player, bool audio_only);
1608 int mm_player_get_audio_only(MMHandleType player, bool *audio_only);
1611 * These functions are to set/get the streaming bufferint time
1613 int mm_player_set_streaming_buffering_time(MMHandleType player, int buffer_ms, int rebuffer_ms);
1614 int mm_player_get_streaming_buffering_time(MMHandleType player, int *buffer_ms, int *rebuffer_ms);
1617 * These functions are to display the 360 video content
1619 int mm_player_360_is_content_spherical(MMHandleType player, bool *is_spherical);
1620 int mm_player_360_set_enabled(MMHandleType player, bool enabled);
1621 int mm_player_360_is_enabled(MMHandleType player, bool *enabled);
1623 int mm_player_360_set_direction_of_view(MMHandleType player, float yaw, float pitch);
1624 int mm_player_360_get_direction_of_view(MMHandleType player, float *yaw, float *pitch);
1626 int mm_player_360_set_zoom(MMHandleType player, float level);
1627 int mm_player_360_get_zoom(MMHandleType player, float *level);
1629 int mm_player_360_set_field_of_view(MMHandleType player, int horizontal_degrees, int vertical_degrees);
1630 int mm_player_360_get_field_of_view(MMHandleType player, int *horizontal_degrees, int *vertical_degrees);
1633 * This function is to set codec type
1635 int mm_player_set_codec_type(MMHandleType player, MMPlayerStreamType stream_type, MMPlayerVideoCodecType codec_type);
1638 * These functions are to apply the replaygain
1640 int mm_player_set_replaygain_enabled(MMHandleType player, bool enabled);
1641 int mm_player_is_replaygain_enabled(MMHandleType player, bool *enabled);
1650 #endif /* __MM_PLAYER_H__ */