Merge "[0.6.58] add rm and display handling about audio_only" into tizen
[platform/core/multimedia/libmm-player.git] / src / include / mm_player.h
old mode 100755 (executable)
new mode 100644 (file)
index 0a88670..29f9cdd
@@ -34,6 +34,7 @@
 
 #include <mm_types.h>
 #include <mm_message.h>
+#include <media_packet.h>
 
 #ifdef __cplusplus
        extern "C" {
  */
 #define MM_PLAYER_PD_MODE                                              "pd_mode"
 
+/**
+ * MM_PLAYER_DRC_MODE
+ *
+ * dynamic resolution change mode (int)
+ */
+#define MM_PLAYER_DRC_MODE                                             "drc_mode"
+
+/**
+ * MM_PLAYER_GAPLESS_MODE
+ *
+ * gapless playback mode (int)
+ */
+#define MM_PLAYER_GAPLESS_MODE                                 "gapless_mode"
+
+/**
+ * MM_PLAYER_ENABLE_VIDEO_DECODED_CB
+ *
+ * enable video decoded callback (int)
+ */
+#define MM_PLAYER_ENABLE_VIDEO_DECODED_CB              "enable_video_decoded_cb"
+
 #define BUFFER_MAX_PLANE_NUM (4)
 
 typedef struct {
@@ -659,9 +681,11 @@ typedef struct {
        int height;                                             /**< height of video buffer */
        unsigned int timestamp;                         /**< timestamp of stream buffer (msec)*/
        unsigned int length_total;                      /**< total length of stream buffer (in byte)*/
-       void *data;
+       void *data[BUFFER_MAX_PLANE_NUM];
        void *bo[BUFFER_MAX_PLANE_NUM];  /**< TBM buffer object */
        void *internal_buffer;                          /**< Internal buffer pointer */
+       int stride[BUFFER_MAX_PLANE_NUM];               /**< stride of plane */
+       int elevation[BUFFER_MAX_PLANE_NUM];    /**< elevation of plane */
 }MMPlayerVideoStreamDataType;
 
 /**
@@ -738,9 +762,7 @@ typedef enum {
  */
 typedef enum {
        MM_PLAYER_TRACK_TYPE_AUDIO = 0,
-#ifdef _USE_M_V_INPUT_SELECTOR_
        MM_PLAYER_TRACK_TYPE_VIDEO,
-#endif
        MM_PLAYER_TRACK_TYPE_TEXT,
        MM_PLAYER_TRACK_TYPE_MAX
 }MMPlayerTrackType;
@@ -755,23 +777,19 @@ typedef enum {
        MM_PLAYER_BUFFERING_MODE_MAX = MM_PLAYER_BUFFERING_MODE_SLINK,
 }MMPlayerBufferingMode;
 
-/**
- * Enumeration of audio channel for video share
- */
 typedef enum
 {
-       MM_PLAYER_AUDIO_CH_MONO_LEFT = 0,
-       MM_PLAYER_AUDIO_CH_MONO_RIGHT,
-       MM_PLAYER_AUDIO_CH_STEREO,
-} MMPlayerAudioChannel;
+       MM_PLAYER_FOCUS_CHANGED_COMPLETED = 0,
+       MM_PLAYER_FOCUS_CHANGED_BY_MEDIA,
+       MM_PLAYER_FOCUS_CHANGED_BY_CALL,
+       MM_PLAYER_FOCUS_CHANGED_BY_EARJACK_UNPLUG,
+       MM_PLAYER_FOCUS_CHANGED_BY_RESOURCE_CONFLICT,
+       MM_PLAYER_FOCUS_CHANGED_BY_ALARM,
+       MM_PLAYER_FOCUS_CHANGED_BY_EMERGENCY,
+       MM_PLAYER_FOCUS_CHANGED_BY_NOTIFICATION,
+       MM_PLAYER_FOCUS_CHANGED_BY_UNKNOWN,
+} MMPlayerFocusChangedMsg;
 
-typedef enum
-{
-       MM_PLAYER_SOUND_RESOURCE_PRELISTENING_RINGTONE = 0,
-       MM_PLAYER_SOUND_RESOURCE_PRELISTENING_NOTIFICATION,
-       MM_PLAYER_SOUND_RESOURCE_PRELISTENING_ALARM,
-       MM_PLAYER_SOUND_RESOURCE_PRELISTENING_MEDIA,
-} MMPlayerSoundResource;
 
 /**
  * Edge Properties of the text.
@@ -784,6 +802,26 @@ typedef enum {
        MM_PLAYER_EDGE_DROPSHADOW
 } MMPlayerSubtitleEdge;
 
+/**
+ * Enumeration of media stream buffer status
+ */
+typedef enum
+{
+       MM_PLAYER_MEDIA_STREAM_BUFFER_UNDERRUN,
+       MM_PLAYER_MEDIA_STREAM_BUFFER_OVERFLOW,
+} MMPlayerMediaStreamBufferStatus;
+
+/**
+ * Enumeration for stream type.
+ */
+typedef enum
+{
+       MM_PLAYER_STREAM_TYPE_DEFAULT,  /**< Container type */
+       MM_PLAYER_STREAM_TYPE_AUDIO,    /**< Audio element stream type */
+       MM_PLAYER_STREAM_TYPE_VIDEO,    /**< Video element stream type */
+       MM_PLAYER_STREAM_TYPE_TEXT,     /**< Text type */
+       MM_PLAYER_STREAM_TYPE_MAX,
+} MMPlayerStreamType;
 
 /**
  * Attribute validity structure
@@ -843,6 +881,54 @@ typedef struct {
 } MMPlayerVolumeType;
 
 /**
+ * Video stream info in external demux case
+ *
+**/
+typedef struct _VideoStreamInfo
+{
+       const char *mime;
+       unsigned int framerate_num;
+       unsigned int framerate_den;
+       unsigned int width;
+       unsigned int height;
+       unsigned char *codec_extradata;
+       unsigned int extradata_size;
+       unsigned int version;
+}MMPlayerVideoStreamInfo;
+
+/**
+ * Audio stream info in external demux case
+ *
+**/
+typedef struct _AudioStreamInfo
+{
+       const char *mime;
+       unsigned int channels;
+       unsigned int sample_rate;
+       unsigned char *codec_extradata;
+       unsigned int extradata_size;
+       unsigned int version;
+       unsigned int user_info;
+
+       /* for pcm */
+//     unsigned int width;
+//     unsigned int depth;
+//     unsigned int endianness;
+//     bool signedness;
+}MMPlayerAudioStreamInfo;
+
+/**
+ * Subtitle stream info in external demux case
+ *
+**/
+typedef struct _SubtitleStreamInfo
+{
+       const char *mime;
+       unsigned int codec_tag;
+       void *context;  //for smpte text
+}MMPlayerSubtitleStreamInfo;
+
+/**
  * Audio stream callback function type.
  *
  * @param      stream          [in]    Reference pointer to audio frame data
@@ -866,6 +952,37 @@ typedef bool       (*mm_player_audio_stream_callback) (void *stream, int stream_size,
  */
 typedef bool           (*mm_player_track_selected_subtitle_language_callback)(int track_num, void *user_param);
 
+/**
+ * Buffer underrun / overflow data callback function type.
+ *
+ * @param      status     [in] buffer status
+ * @param      user_param [in] User defined parameter which is passed when set
+ *                             to enough data callback or need data callback
+ *
+ * @return     This callback function have to return MM_ERROR_NONE.
+ */
+typedef bool   (*mm_player_media_stream_buffer_status_callback) (MMPlayerStreamType type, MMPlayerMediaStreamBufferStatus status, unsigned long long bytes, void *user_param);
+
+/**
+ * Buffer seek data callback function type.
+ *
+ * @param      offset     [in] offset for the buffer playback
+ * @param      user_param [in] User defined parameter which is passed when set
+ *                             to seek data callback
+ *
+ * @return     This callback function have to return MM_ERROR_NONE.
+ */
+typedef bool   (*mm_player_media_stream_seek_data_callback) (MMPlayerStreamType type, unsigned long long offset, void *user_param);
+
+/**
+ * Called to notify the stream changed.
+ *
+ * @param user_data [in] The user data passed from the callback registration function
+ *
+ * @return     This callback function have to return MM_ERROR_NONE.
+ */
+typedef bool   (*mm_player_stream_changed_callback) (void *user_param);
+
 
 /*===========================================================================================
 |                                                                                           |
@@ -896,7 +1013,7 @@ char *g_err_attr_name = NULL;
 
 if (mm_player_create(&g_player) != MM_ERROR_NONE)
 {
-       debug_error("failed to create player\n");
+       LOGE("failed to create player\n");
 }
 
 if (mm_player_set_attribute(g_player,
@@ -905,7 +1022,7 @@ if (mm_player_set_attribute(g_player,
                                                "display_overlay", (void*)&g_win.xid, sizeof(g_win.xid),
                                                NULL) != MM_ERROR_NONE)
 {
-       debug_error("failed to set %s attribute\n", g_err_attr_name);
+       LOGE("failed to set %s attribute\n", g_err_attr_name);
        free(g_err_attr_name);
 }
 
@@ -932,13 +1049,41 @@ int mm_player_create(MMHandleType *player);
  * @code
 if (mm_player_destroy(g_player) != MM_ERROR_NONE)
 {
-       debug_error("failed to destroy player\n");
+       LOGE("failed to destroy player\n");
 }
  * @endcode
  */
 int mm_player_destroy(MMHandleType player);
 
 /**
+ * This function register the sound focus using application PID \n
+ * So, application PID should be set before realizing with mm_player_set_attribute(). \n
+ *
+ * @param      player          [in]    Handle of player
+ * @param      pid                     [in]    application PID
+ *
+ * @return     This function returns zero on success, or negative value with error code.
+ *
+ * @pre                Player state should be MM_PLAYER_STATE_NULL.
+ * @remark     None
+ */
+int mm_player_sound_register(MMHandleType player, int pid);
+
+/**
+ * This function get the application PID that is registered \n
+ * So, application PID should be set before realizing with mm_player_set_attribute(). \n
+ *
+ * @param      player          [in]    Handle of player
+ * @param      pid                     [out]   application PID
+ *
+ * @return     This function returns zero on success, or negative value with error code.
+ *
+ * @pre                Player state should be MM_PLAYER_STATE_NULL.
+ * @remark     None
+ */
+int mm_player_get_client_pid (MMHandleType player, int* pid);
+
+/**
  * This function parses uri and makes gstreamer pipeline by uri scheme. \n
  * So, uri should be set before realizing with mm_player_set_attribute(). \n
  *
@@ -954,7 +1099,7 @@ int mm_player_destroy(MMHandleType player);
  * @code
 if (mm_player_realize(g_player) != MM_ERROR_NONE)
 {
-       debug_error("failed to realize player\n");
+       LOGE("failed to realize player\n");
 }
  * @endcode
  */
@@ -978,7 +1123,7 @@ int mm_player_realize(MMHandleType player) ;
  * @code
 if (mm_player_unrealize(g_player) != MM_ERROR_NONE)
 {
-       debug_error("failed to unrealize player\n");
+       LOGE("failed to unrealize player\n");
 }
  * @endcode
  */
@@ -999,7 +1144,7 @@ int mm_player_unrealize(MMHandleType player);
  * @code
 if (mm_player_get_state(g_player, &state) != MM_ERROR_NONE)
 {
-       debug_error("failed to get state\n");
+       LOGE("failed to get state\n");
 }
  * @endcode
  */
@@ -1026,7 +1171,7 @@ for (i = 0; i < MM_VOLUME_CHANNEL_NUM; i++)
 
 if (mm_player_set_volume(g_player, &volume) != MM_ERROR_NONE)
 {
-    debug_error("failed to set volume\n");
+    LOGE("failed to set volume\n");
 }
  * @endcode
  */
@@ -1049,11 +1194,11 @@ int i;
 
 if (mm_player_get_volume(g_player, &volume) != MM_ERROR_NONE)
 {
-        debug_warning("failed to get volume\n");
+        LOGW("failed to get volume\n");
 }
 
 for (i = 0; i < MM_VOLUME_CHANNEL_NUM; i++)
-       debug_log("channel[%d] = %d \n", i, volume.level[i]);
+       LOGD("channel[%d] = %d \n", i, volume.level[i]);
  * @endcode
  */
 int mm_player_get_volume(MMHandleType player, MMPlayerVolumeType *volume);
@@ -1076,7 +1221,7 @@ int mm_player_get_volume(MMHandleType player, MMPlayerVolumeType *volume);
  * @code
 if (mm_player_start(g_player) != MM_ERROR_NONE)
 {
-       debug_error("failed to start player\n");
+       LOGE("failed to start player\n");
 }
  * @endcode
  */
@@ -1099,7 +1244,7 @@ int mm_player_start(MMHandleType player);
  * @code
 if (mm_player_stop(g_player) != MM_ERROR_NONE)
 {
-       debug_error("failed to stop player\n");
+       LOGE("failed to stop player\n");
 }
  * @endcode
  */
@@ -1120,7 +1265,7 @@ int mm_player_stop(MMHandleType player);
  * @code
 if (mm_player_pause(g_player) != MM_ERROR_NONE)
 {
-       debug_error("failed to pause player\n");
+       LOGE("failed to pause player\n");
 }
  * @endcode
  */
@@ -1141,7 +1286,7 @@ int mm_player_pause(MMHandleType player);
  * @code
 if (mm_player_resume(g_player) != MM_ERROR_NONE)
 {
-       debug_error("failed to resume player\n");
+       LOGE("failed to resume player\n");
 }
  * @endcode
  */
@@ -1164,7 +1309,7 @@ int position = 1000; //1sec
 
 if (mm_player_set_position(g_player, MM_PLAYER_POS_FORMAT_TIME, position) != MM_ERROR_NONE)
 {
-       debug_error("failed to set position\n");
+       LOGE("failed to set position\n");
 }
  * @endcode
  */
@@ -1189,10 +1334,10 @@ mm_player_get_position(g_player, MM_PLAYER_POS_FORMAT_TIME, &position);
 
 mm_player_get_attribute(g_player, &g_err_name, "content_duration", &duration, NULL);
 
-debug_log("pos: [%d/%d] msec\n", position, duration);
+LOGD("pos: [%d/%d] msec\n", position, duration);
  * @endcode
  */
-int mm_player_get_position(MMHandleType player, MMPlayerPosFormatType format, int *pos);
+int mm_player_get_position(MMHandleType player, MMPlayerPosFormatType format, unsigned long *pos);
 
 /**
  * This function is to get current buffer position of playback content.
@@ -1211,10 +1356,10 @@ int start_pos = 0, stop_pos = 0;
 
 mm_player_get_buffer_position(g_player, MM_PLAYER_POS_FORMAT_PERCENT, &start_pos, &stop_pos );
 
-debug_log("buffer position: [%d] ~ [%d] \%\n", start_pos, stop_pos );
+LOGD("buffer position: [%d] ~ [%d] \%\n", start_pos, stop_pos );
  * @endcode
  */
-int mm_player_get_buffer_position(MMHandleType player, MMPlayerPosFormatType format, int *start_pos, int *stop_pos);
+int mm_player_get_buffer_position(MMHandleType player, MMPlayerPosFormatType format, unsigned long *start_pos, unsigned long *stop_pos);
 
 /**
  * This function is to activate the section repeat. If it's set, selected section will be played \n
@@ -1252,7 +1397,7 @@ int mm_player_activate_section_repeat(MMHandleType player, int start_pos, int en
  * @code
 if ( mm_player_deactivate_section_repeat(g_player) != MM_ERROR_NONE)
 {
-       debug_warning("failed to deactivate section repeat\n");
+       LOGW("failed to deactivate section repeat\n");
 }
  * @endcode
  */
@@ -1321,7 +1466,7 @@ int mm_player_set_message_callback(MMHandleType player, MMMessageCallback callba
  * @code
 bool audio_callback(void *stream, int stream_size, void *user_param)
 {
-       debug_log("audio stream callback\n");
+       LOGD("audio stream callback\n");
        return TRUE;
 }
 mm_player_set_audio_stream_callback(g_player, audio_callback, NULL);
@@ -1342,7 +1487,7 @@ mm_player_set_audio_stream_callback(g_player, audio_callback, NULL);
  * @code
 if (mm_player_set_mute(g_player, TRUE) != MM_ERROR_NONE)
 {
-       debug_warning("failed to set mute\n");
+       LOGW("failed to set mute\n");
 }
  * @endcode
  */
@@ -1363,10 +1508,10 @@ int mute;
 
 if (mm_player_get_mute(g_player, &mute) != MM_ERROR_NONE)
 {
-       debug_warning("failed to get mute\n");
+       LOGW("failed to get mute\n");
 }
 
-debug_log("mute status:%d\n", mute);
+LOGD("mute status:%d\n", mute);
  * @endcode
  */
 int mm_player_get_mute(MMHandleType player, int *mute);
@@ -1389,7 +1534,7 @@ int pos;
 pos = 5000;
 if (mm_player_adjust_subtitle_position(g_player, MM_PLAYER_POS_FORMAT_TIME, pos) != MM_ERROR_NONE)
 {
-       debug_warning("failed to adjust subtitle postion.\n");
+       LOGW("failed to adjust subtitle postion.\n");
 }
  * @endcode
  */
@@ -1429,7 +1574,7 @@ mm_player_set_attribute(g_player,
 
 if (mm_player_set_subtitle_silent(g_player, TRUE) != MM_ERROR_NONE)
 {
-       debug_warning("failed to set subtitle silent\n");
+       LOGW("failed to set subtitle silent\n");
 }
  * @endcode
  */
@@ -1451,7 +1596,7 @@ int silent = FALSE;
 
 if (mm_player_get_subtitle_silent(g_player, &silent) != MM_ERROR_NONE)
 {
-       debug_warning("failed to set subtitle silent\n");
+       LOGW("failed to set subtitle silent\n");
 }
  * @endcode
  */
@@ -1482,7 +1627,7 @@ if (mm_player_set_attribute(g_player,
                                                "profile_play_count", count,
                                                NULL) != MM_ERROR_NONE)
 {
-       debug_warning("failed to set %s attribute\n", g_err_attr_name);
+       LOGW("failed to set %s attribute\n", g_err_attr_name);
        free(g_err_attr_name);
 }
 
@@ -1510,7 +1655,7 @@ char *g_err_attr_name = NULL;
 
 if (mm_player_get_attribute(g_player, &g_err_attr_name, "content_duration", &duration, NULL) != MM_ERROR_NONE)
 {
-       debug_warning("failed to set %s attribute\n", g_err_attr_name);
+       LOGW("failed to set %s attribute\n", g_err_attr_name);
        free(g_err_attr_name);
 }
  * @endcode
@@ -1533,17 +1678,17 @@ int mm_player_get_attribute(MMHandleType player,  char **err_attr_name, const ch
  * @code
 if (mm_player_get_attribute_info (g_player, "display_method", &method_info) != MM_ERROR_NONE)
 {
-       debug_warning("failed to get info\n");
+       LOGW("failed to get info\n");
 }
 
-debug_log("type:%d \n", method_info.type); //int, double..
-debug_log("flag:%d \n", method_info.flag); //readable, writable..
-debug_log("validity type:%d \n", method_info.validity_type); //range, array..
+LOGD("type:%d \n", method_info.type); //int, double..
+LOGD("flag:%d \n", method_info.flag); //readable, writable..
+LOGD("validity type:%d \n", method_info.validity_type); //range, array..
 
 if (method_info. validity_type == MM_PLAYER_ATTRS_VALID_TYPE_INT_RANGE)
 {
-       debug_log("range min:%d\n", method_info.int_range.min);
-       debug_log("range max:%d\n", method_info.int_range.max);
+       LOGD("range min:%d\n", method_info.int_range.min);
+       LOGD("range max:%d\n", method_info.int_range.max);
 }
  * @endcode
  */
@@ -1567,7 +1712,7 @@ guint64 total_size = 0LLU;
 
 if (mm_player_get_pd_status(g_player, &current_pos, &total_size, NULL) != MM_ERROR_NONE)
 {
-       debug_log("current download pos = %llu, total size = %llu\n", current_pos, total_size);
+       LOGD("current download pos = %llu, total size = %llu\n", current_pos, total_size);
 }
  * @endcode
  */
@@ -1590,10 +1735,10 @@ int msg_callback(int message, MMMessageParamType *param, void *user_param)
        switch (message)
        {
                case MM_MESSAGE_PD_DOWNLOADER_START:
-                       debug_log("Progressive download is started...\n");
+                       LOGD("Progressive download is started...\n");
                        break;
                case MM_MESSAGE_PD_DOWNLOADER_END:
-                       debug_log("Progressive download is ended...\n");
+                       LOGD("Progressive download is ended...\n");
                        break;
                default:
                        break;
@@ -1624,10 +1769,10 @@ gint audio_count = 0;
 
 if (mm_player_get_track_count (g_player, MM_PLAYER_TRACK_TYPE_AUDIO, &audio_count) != MM_ERROR_NONE)
 {
-       debug_warning("failed to get audio track count\n");
+       LOGW("failed to get audio track count\n");
 }
 
-debug_log("audio track count : %d \n", audio_count);
+LOGD("audio track count : %d \n", audio_count);
  * @endcode
  */
 int mm_player_get_track_count(MMHandleType player,  MMPlayerTrackType type, int *count);
@@ -1736,7 +1881,7 @@ gint second = 10; //10sec
 
 if (mm_player_set_prepare_buffering_time(g_player, second) != MM_ERROR_NONE)
 {
-       debug_error("failed to set buffer size\n");
+       LOGE("failed to set buffer size\n");
 }
  * @endcode
  */
@@ -1757,7 +1902,7 @@ int mm_player_set_prepare_buffering_time(MMHandleType player, int second);
 
 if (mm_player_set_runtime_buffering_mode(g_player, MM_PLAYER_BUFFERING_MODE_ADAPTIVE, 10) != MM_ERROR_NONE)
 {
-       debug_error("failed to set buffering mode\n");
+       LOGE("failed to set buffering mode\n");
 }
  * @endcode
  */
@@ -1810,17 +1955,6 @@ int mm_player_get_display_zoom(MMHandleType player, float *level, int *x, int *y
 int mm_player_set_external_subtitle_path(MMHandleType player, const char* path);
 
 /**
- * This function is to change clock provider to system clock
- *
- * @param       player  [in]    handle of player
- * @return      This function returns zero on success, or negative value with error code.
- *
- * @see
- * @remark      None
- */
-int mm_player_use_system_clock(MMHandleType player);
-
-/**
  * This function is to set the clock which is from master player
  *
  * @param       player  [in]    handle of player
@@ -1848,17 +1982,6 @@ int mm_player_set_video_share_master_clock(MMHandleType player, long long clock,
  * @remark      None
  */
 int mm_player_get_video_share_master_clock(MMHandleType player, long long *video_time, long long *media_clock, long long *audio_time);
-/**
- * This function is to set audio channel
- *
- * @param       player         [in]    handle of player
- * @param       ch                     [in]    audio channel
- * @return      This function returns zero on success, or negative value with error code.
- *
- * @see
- * @remark      None
- */
-int mm_player_gst_set_audio_channel(MMHandleType player, MMPlayerAudioChannel ch);
 
 /**
  * This function is to get the content angle
@@ -1932,8 +2055,284 @@ int mm_player_set_next_uri(MMHandleType player, const char *uri);
  */
 int mm_player_get_next_uri(MMHandleType player, char **uri);
 
-int mm_player_enable_media_packet_video_stream(MMHandleType player, bool enable);
+/**
+ * This function is to increase reference count of internal buffer.
+ *
+ * @param       buffer                 [in]   video callback internal buffer
+ * @return      This function returns buffer point;
+ *
+ * @see
+ * @remark      None
+ */
+void * mm_player_media_packet_video_stream_internal_buffer_ref(void *buffer);
+
+/**
+ * This function is to decrease reference count of internal buffer.
+ *
+ * @param       buffer                 [in]   video callback internal buffer
+ * @return      None;
+ *
+ * @see
+ * @remark      None
+ */
+void mm_player_media_packet_video_stream_internal_buffer_unref(void *buffer);
+
+/**mm_player_submit_packet
+ * This function is to submit buffer to appsrc.  \n
+ * @param      player                  [in]    Handle of player.
+ * @param      buf             [in]    buffer to be submit in appsrc in external feeder case.
+ * @param      len                             [in]    length of buffer.
+ * @param      pts                             [in]    timestamp of buffer.
+ * @param      streamtype              [in]    stream type of buffer.
+ * @return      This function returns zero on success, or negative value with error code.
+ * @par Example
+ *
+ * @endcode
+ */
+int mm_player_submit_packet(MMHandleType player, media_packet_h packet);
+
+/**mm_player_set_video_info
+ * This function is to set caps of src pad of video appsrc in external feeder case.  \n
+ * @param       player                          [in]    Handle of player.
+ * @param       media_format_h                 [in]    Video stream info.
+ * @return      This function returns zero on success, or negative value with error code.
+ * @par Example
+ *
+ * @endcode
+ */
+int mm_player_set_video_info (MMHandleType player, media_format_h format);
+
+/**mm_player_set_audio_info
+ * This function is to set caps of src pad of Audio appsrc in external feeder case.  \n
+ * @param       player                       [in]    Handle of player.
+ * @param       media_format_h               [in]    Audio stream info.
+ * @return      This function returns zero on success, or negative value with error code.
+ * @par Example
+ *
+ * @endcode
+ */
+int mm_player_set_audio_info (MMHandleType player, media_format_h format);
+
+/**mm_player_set_subtitle_info
+ * This function is to set caps of src pad of subtitle appsrc in external feeder case.  \n
+ * @param       player                          [in]    Handle of player.
+ * @param       subtitle_stream_info               [in]    Subtitle stream info.
+ * @return      This function returns zero on success, or negative value with error code.
+ * @par Example
+ *
+ * @endcode
+ */
+int mm_player_set_subtitle_info (MMHandleType player, MMPlayerSubtitleStreamInfo *info);
+
+/**
+ * This function set callback function for receiving need or enough data message from player.
+ *
+ * @param       player          [in]    Handle of player.
+ * @param       type            [in]    stream type
+ * @param       callback        [in]    data callback function for stream type.
+ * @param       user_param      [in]    User parameter.
+ *
+ * @return      This function returns zero on success, or negative value with error
+ *                      code.
+ * @remark
+ * @see
+ * @since
+ */
+int mm_player_set_media_stream_buffer_status_callback(MMHandleType player, MMPlayerStreamType type, mm_player_media_stream_buffer_status_callback callback, void * user_param);
+
+/**
+ * This function set callback function for receiving seek data message from player.
+ *
+ * @param       player          [in]    Handle of player.
+ * @param       type            [in]    stream type
+ * @param       callback        [in]    Seek data callback function for stream type.
+ * @param       user_param      [in]    User parameter.
+ *
+ * @return      This function returns zero on success, or negative value with error
+ *                      code.
+ * @remark
+ * @see
+ * @since
+ */
+int mm_player_set_media_stream_seek_data_callback(MMHandleType player, MMPlayerStreamType type, mm_player_media_stream_seek_data_callback callback, void * user_param);
+
+/**
+ * This function is to set max size of buffer(appsrc).
+ *
+ * @param       player          [in]    Handle of player.
+ * @param       type            [in]    stream type
+ * @param       max_size        [in]    max bytes of buffer.
+ *
+ * @return      This function returns zero on success, or negative value with error
+ *                      code.
+ * @remark
+ * @see
+ * @since
+ */
+int mm_player_set_media_stream_buffer_max_size(MMHandleType player, MMPlayerStreamType type, unsigned long long max_size);
+
+/**
+ * This function is to get max size of buffer(appsrc).
+ *
+ * @param       player          [in]    Handle of player.
+ * @param       type            [in]    stream type
+ * @param       max_size        [out]   max bytes of buffer.
+ *
+ * @return      This function returns zero on success, or negative value with error
+ *                      code.
+ * @remark
+ * @see
+ * @since
+ */
+int mm_player_get_media_stream_buffer_max_size(MMHandleType player, MMPlayerStreamType type, unsigned long long *max_size);
+
+/**
+ * This function is to set min percent of buffer(appsrc).
+ *
+ * @param       player          [in]    Handle of player.
+ * @param       type            [in]    stream type
+ * @param       min_percent     [in]    min percent of buffer.
+ *
+ * @return      This function returns zero on success, or negative value with error
+ *                      code.
+ * @remark
+ * @see
+ * @since
+ */
+int mm_player_set_media_stream_buffer_min_percent(MMHandleType player, MMPlayerStreamType type, unsigned min_percent);
+
+/**
+ * This function is to get min percent of buffer(appsrc).
+ *
+ * @param       player          [in]    Handle of player.
+ * @param       type            [in]    stream type
+ * @param       min_percent     [out]   min percent of buffer.
+ *
+ * @return      This function returns zero on success, or negative value with error
+ *                      code.
+ * @remark
+ * @see
+ * @since
+ */
+int mm_player_get_media_stream_buffer_min_percent(MMHandleType player, MMPlayerStreamType type, unsigned int *min_percent);
+
+/**
+ * This function set callback function for changing audio stream from player. \n
+ * It's only supported when audio stream is included in file. \n
+ *
+ * @param      player   [in] Handle of player.
+ * @param      callback [in] Audio stream changed callback function.
+ * @param      user_param [in] User parameter.
+ *
+ * @return     This function returns zero on success, or negative value with error
+ *                     code.
+ * @see                mm_player_stream_changed_callback
+ * @since
+ */
+int mm_player_set_audio_stream_changed_callback(MMHandleType player, mm_player_stream_changed_callback callback, void *user_param);
+
+/**
+ * This function set callback function for changing video stream from player. \n
+ * It's only supported when video stream is included in file. \n
+ *
+ * @param      player   [in] Handle of player.
+ * @param      callback [in] Video stream changed callback function.
+ * @param      user_param [in] User parameter.
+ *
+ * @return     This function returns zero on success, or negative value with error
+ *                     code.
+ * @see                mm_player_stream_changed_callback
+ * @since
+ */
+int mm_player_set_video_stream_changed_callback(MMHandleType player, mm_player_stream_changed_callback callback, void *user_param);
 
+/**
+ * This function is to get timeout value according to the content type for muse. \n
+ * It's only supported when video stream is included in file. \n
+ *
+ * @param      player  [in] Handle of player.
+ * @param      timeout [out] timeout value (sec).
+ *
+ * @return     This function returns zero on success, or negative value with error
+ *                     code.
+ * @since 3.0
+ */
+int mm_player_get_timeout(MMHandleType player, int *timeout);
+
+/**
+ * This function is to get the number of video output buffers. \n
+ * It's only supported when video stream is included in file. \n
+ *
+ * @param      player  [in] Handle of player.
+ * @param      num     [out] num of buffers.
+ * @param      extra_num [out] extra num of buffers.
+ *
+ * @return     This function returns zero on success, or negative value with error
+ *                     code.
+ * @since 3.0
+ */
+int mm_player_get_num_of_video_out_buffers(MMHandleType player, int *num, int *extra_num);
+
+/**
+ * This function is to set the dynamic resolution information. \n
+ * It's only supported when video stream is included in file. \n
+ *
+ * @param      player  [in] Handle of player.
+ * @param      drc     [in] dynamic resolution info of media stream data
+ *
+ * @return     This function returns zero on success, or negative value with error
+ *                     code.
+ * @since 3.0
+ */
+int mm_player_set_media_stream_dynamic_resolution(MMHandleType player, bool drc);
+
+/**
+ * This function is to release the video stream bo to reuse. \n
+ * It's only supported when sw codec is used to decode video stream. \n
+ *
+ * @param      player  [in] Handle of player.
+ * @param      bo     [in] bo address to be released
+ *
+ * @return     This function returns zero on success, or negative value with error
+ *                     code.
+ * @since 3.0
+ */
+int mm_player_release_video_stream_bo(MMHandleType player, void* bo);
+
+/**
+ * This function is to set http file buffering path
+ *
+ * @param       player         [in]    handle of player
+ * @param       file_path      [in]    file path
+ * @return      This function returns zero on success, or negative value with error code.
+ *
+ * @see
+ * @remark      None
+ */
+int mm_player_set_file_buffering_path(MMHandleType player, const char *file_path);
+
+/**
+ * This function is to set sound stream info
+ */
+int mm_player_set_sound_stream_info(MMHandleType player, char *stream_type, int stream_index);
+
+/**
+ * This function is to manage the playback according to the external storage state
+ */
+int mm_player_manage_external_storage_state(MMHandleType player, int state);
+
+/**
+ * These functions are to set/get the max variant of HAS
+ */
+int mm_player_get_adaptive_variant_info(MMHandleType player, int *num, char **var_info);
+int mm_player_set_max_adaptive_variant_limit(MMHandleType player, int bandwidth, int width, int height);
+int mm_player_get_max_adaptive_variant_limit(MMHandleType player, int *bandwidth, int *width, int *height);
+
+/**
+ * These functions are to set/get the audio only mode
+ */
+int mm_player_set_audio_only(MMHandleType player, bool audio_only);
+int mm_player_get_audio_only(MMHandleType player, bool *audio_only);
 
 /**
        @}