#include <stdlib.h>
#include <stdio.h>
#include <tbm_bufmgr.h>
-#include <Evas.h>
+#include <storage.h>
#include "mm_player.h"
#include "mm_player_internal.h"
#include "mm_player_audioeffect.h"
#include "mm_message.h"
#include "mm_player_ini.h"
-#include "mm_player_resource.h"
-#include "mm_player_sound_focus.h"
-#include "mm_player_pd.h"
+#include <mm_resource_manager.h>
#include "mm_player_streaming.h"
/*===========================================================================================
/**
* @x_player: MMHandleType of player
*
- * Get the PD downloader of this player.
- */
-#define MM_PLAYER_GET_PD(x_player) (MM_PLAYER_CAST(x_player)->pd_downloader)
-/**
- * @x_player: MMHandleType of player
- *
* Get the attributes handle of this player.
*/
#define MM_PLAYER_GET_ATTRS(x_player) (MM_PLAYER_CAST(x_player)->attrs)
-#define ROTATION_USING_SINK 0
-#define ROTATION_USING_CUSTOM 1
-#define ROTATION_USING_FLIP 2
+#define MM_MAX_STRING_LENGTH 4000 /* have to be less than MUSE_MSG_MAX_LENGTH */
+
+#define VIDEO360_MAX_ZOOM 10.0f
/*---------------------------------------------------------------------------
| GLOBAL CONSTANT DEFINITIONS: |
ATTR_ALL = 0x0020,
};
-/* async mode makes trouble. alsasink sometimes fails to pause. */
-enum alassink_sync {
- ALSASINK_SYNC,
- ALSASINK_ASYNC
+enum MMPlayerSinkType {
+ MMPLAYER_VIDEO_SINK = 0x01,
+ MMPLAYER_AUDIO_SINK = 0x02,
+ MMPLAYER_TEXT_SINK = 0x04,
+ MMPLAYER_SINK_ALL = 0x07,
};
/**
enum MMPlayerUriType {
MM_PLAYER_URI_TYPE_NONE, /**< Player URI type None */
MM_PLAYER_URI_TYPE_URL_RTSP, /**< Player URI type RTSP */
- MM_PLAYER_URI_TYPE_URL_WFD, /**< Player URI type WFD */
MM_PLAYER_URI_TYPE_URL_HTTP, /**< Player URI type HTTP */
MM_PLAYER_URI_TYPE_URL_MMS, /**< Player URI type MMS */
MM_PLAYER_URI_TYPE_MEM, /**< Player URI type Mem */
MMPLAYER_M_AUTOPLUG_V_DEC,
MMPLAYER_M_AUTOPLUG_A_DEC,
- /* NOTE : we need two fakesink to autoplug without decodebin.
- * first one will hold whole pipeline state. and second one will hold state of
- * a sink-decodebin for an elementary stream. no metter if there's more then one
- * elementary streams because MSL reuse it.
- */
+ /*fakesink will hold whole pipeline state. */
MMPLAYER_M_SRC_FAKESINK,
- MMPLAYER_M_SRC_2ND_FAKESINK,
/* streaming plugin */
MMPLAYER_M_MUXED_S_BUFFER,
MMPLAYER_M_DEMUXED_S_BUFFER,
MMPLAYER_M_ID3DEMUX,
+ MMPLAYER_M_ADAPTIVE_DEMUX,
/* es buff src queue */
MMPLAYER_M_V_BUFFER,
MMPLAYER_M_Q2,
MMPLAYER_M_DEMUX,
MMPLAYER_M_SUBPARSE,
- MMPLAYER_M_DEMUX_EX,
MMPLAYER_M_V_INPUT_SELECTOR, // video input_select
MMPLAYER_M_A_INPUT_SELECTOR, // audio input_select
MMPLAYER_M_T_INPUT_SELECTOR, // text input_select
- MMPLAYER_M_A_TEE,
- MMPLAYER_M_A_Q1,
- MMPLAYER_M_A_Q2,
- MMPLAYER_M_A_CONV,
- MMPLAYER_M_A_FILTER,
- MMPLAYER_M_A_DEINTERLEAVE,
- MMPLAYER_M_A_SELECTOR,
- MMPLAYER_M_V_SINK,
- MMPLAYER_M_V_CONV,
MMPLAYER_M_NUM
};
/* audio pipeline's element id */
enum AudioElementID {
MMPLAYER_A_BIN = 0, /* NOTE : MMPLAYER_A_BIN should be zero */
- MMPLAYER_A_TP,
MMPLAYER_A_CONV,
MMPLAYER_A_VOL,
MMPLAYER_A_FILTER,
MMPLAYER_A_FILTER_SEC,
- MMPLAYER_A_VSP,
MMPLAYER_A_CAPS_DEFAULT,
+ MMPLAYER_A_CONV_BFORMAT,
+ MMPLAYER_A_CAPS_360,
MMPLAYER_A_SINK,
MMPLAYER_A_RESAMPLER,
MMPLAYER_A_DEINTERLEAVE,
+ MMPLAYER_A_RGVOL,
MMPLAYER_A_NUM
};
MMPLAYER_V_BIN = 0, /* NOTE : MMPLAYER_V_BIN should be zero */
MMPLAYER_V_FLIP,
MMPLAYER_V_CONV,
- MMPLAYER_V_SCALE,
MMPLAYER_V_CAPS,
MMPLAYER_V_SINK,
+ MMPLAYER_V_360,
MMPLAYER_V_NUM
};
MMPLAYER_STREAMING_ERROR_OPTION_NOT_SUPPORTED,
};
+typedef enum {
+ MMPLAYER_SEEK_NONE = 0,
+ MMPLAYER_SEEK_IN_PROGRESS,
+ MMPLAYER_SEEK_COMPLETED, /* after getting async done but before posting seek complete */
+} MMPlayerSeekState;
+
+typedef enum {
+ MMPLAYER_PATH_VOD = 0,
+ MMPLAYER_PATH_TEXT,
+ MMPLAYER_PATH_MAX
+} MMPlayerPathType;
+
+/* Video360 related enums. These are duplication from video360.h from
+ * gst-plugins-tizen.
+ * */
+typedef enum {
+ VIDEO360_MODE_UNKNOWN = -1,
+ VIDEO360_MODE_MONOSCOPIC = 0,
+ VIDEO360_MODE_STEREOSCOPIC_TOP_BOTTOM = 1,
+ VIDEO360_MODE_STEREOSCOPIC_LEFT_RIGHT = 2,
+ VIDEO360_MODE_STEREOSCOPIC_STEREO_MESH = 3,
+ VIDEO360_MODE_LAST_ITEM
+} mm_player_stereo_mode_e;
+
+typedef enum {
+ VIDEO360_PROJECTION_TYPE_UNKNOWN = -1,
+ VIDEO360_PROJECTION_TYPE_EQUIRECTANGULAR = 0,
+ VIDEO360_PROJECTION_TYPE_CUBEMAP = 1,
+ VIDEO360_PROJECTION_TYPE_MESH = 2,
+ VIDEO360_PROJECTION_TYPE_LAST_ITEM
+} mm_player_projection_type_e;
+
+/* Spatial audio related enums. These are duplication from mm_file.h from
+ * libmm-fileinfo.
+ * */
+typedef enum {
+ MMFILE_AMBISONIC_TYPE_UNKNOWN = 0,
+ MMFILE_AMBISONIC_TYPE_PERIPHONIC = 1, /**< To comply with Google's Spatial Audio RFC*/
+ MMFILE_AMBISONIC_TYPE_NON_PERIPHONIC = 2,
+} MMFILE_AMBISONIC_TYPE;
+
+typedef enum {
+ MMFILE_AMBISONIC_FORMAT_UNKNOWN = 0,
+ MMFILE_AMBISONIC_FORMAT_AMBIX = 1, /**< AMBIX (Channel sequence: ACN, Normalization: SN3D) */
+ MMFILE_AMBISONIC_FORMAT_AMB = 2, /**< .AMB, Tetraproc (Channel sequence: FuMa, Normalization: FuMa) */
+ MMFILE_AMBISONIC_FORMAT_UA = 3, /**< Universal Ambisonics (Channel sequence: SID, Normalization: N3D) */
+} MMFILE_AMBISONIC_FORMAT;
+
+typedef enum {
+ MMFILE_AMBISONIC_ORDER_UNKNOWN = 0,
+ MMFILE_AMBISONIC_ORDER_FOA = 1, /**< First order Ambisonics */
+ MMFILE_AMBISONIC_ORDER_SOA = 2, /**< Second order Ambisonics */
+ MMFILE_AMBISONIC_ORDER_TOA = 3, /**< Third order Ambisonics */
+} MMFILE_AMBISONIC_ORDER;
+
/*---------------------------------------------------------------------------
| GLOBAL DATA TYPE DEFINITIONS: |
---------------------------------------------------------------------------*/
float volume;
int mute;
int bluetooth; /* enable/disable */
+ int focus_id;
+ bool rg_enable;
} MMPlayerSoundInfo;
typedef struct {
char *buf;
int len;
int offset;
-
-} tBuffer; /* FIXIT : choose better name */
+} MMPlayerInputBuffer;
typedef struct {
int uri_type;
int play_mode;
- void *mem;
- int mem_size;
+ MMPlayerInputBuffer input_mem;
char uri[MM_MAX_URL_LEN];
char urgent[MM_MAX_FILENAME_LEN];
} MMPlayerParseProfile;
typedef struct {
+ storage_type_e type;
+ storage_state_e state;
+ int id;
+ char path[MM_MAX_URL_LEN];
+} MMPlayerStorageInfo;
+
+typedef struct {
bool is_pending;
- MMPlayerPosFormatType format;
- unsigned long pos;
+ gint64 pos;
} MMPlayerPendingSeek;
typedef struct {
- GObject* obj;
+ GObject *obj;
gulong sig;
} MMPlayerSignalItem;
typedef struct {
bool rich_audio;
bool safety_volume;
- bool pcm_extraction;
bool video_zc; // video zero-copy
bool subtitle_off;
bool media_packet_video_stream;
} MMPlayerUriList;
typedef struct {
+ double scale_x;
+ double scale_y;
+ double scale_width;
+ double scale_height;
+} MMPlayerVideoROI;
+
+typedef struct {
gint active_pad_index;
gint total_track_num;
GPtrArray *channels;
* @since_tizen 3.0
*/
typedef struct {
- gboolean using;
- void* bo;
+ gboolean used;
+ void *bo;
} mm_player_video_bo_info_t;
typedef struct {
+ gint bandwidth;
+ gint width;
+ gint height;
+} VariantData;
+
+typedef struct {
+ GList *var_list;
+ VariantData limit;
+} MMAdaptiveVariantInfo;
+
+typedef struct {
+ int is_spherical;
+ int is_stitched;
+ char *stitching_software;
+ char *projection_type_string;
+ char *stereo_mode_string;
+ mm_player_projection_type_e projection_type;
+ mm_player_stereo_mode_e stereo_mode;
+ int source_count;
+ int init_view_heading;
+ int init_view_pitch;
+ int init_view_roll;
+ int timestamp;
+ int full_pano_width_pixels;
+ int full_pano_height_pixels;
+ int cropped_area_image_width;
+ int cropped_area_image_height;
+ int cropped_area_left;
+ int cropped_area_top;
+ int ambisonic_type;
+ int ambisonic_format;
+ int ambisonic_order;
+} mm_player_spherical_metadata_t;
+
+typedef struct {
/* STATE */
int state; // player current state
int prev_state; // player previous state
int target_state; // player state which user want to go to
guint state_change_timeout;
- gboolean section_repeat;
- gint section_repeat_start;
- gint section_repeat_end;
- guint play_count;
-
gchar *album_art;
int cmd;
GMutex cmd_lock;
GMutex playback_lock;
- /* repeat thread lock */
- GCond repeat_thread_cond;
- GMutex repeat_thread_mutex;
- GThread* repeat_thread;
- gboolean repeat_thread_exit;
-
- /* next play thread */
- GThread* next_play_thread;
- gboolean next_play_thread_exit;
- GCond next_play_thread_cond;
- GMutex next_play_thread_mutex;
+ /* gapless play thread */
+ GThread *gapless_play_thread;
+ gboolean gapless_play_thread_exit;
+ GCond gapless_play_thread_cond;
+ GMutex gapless_play_thread_mutex;
mm_player_gapless_t gapless;
/* capture thread */
- GThread* capture_thread;
+ GThread *capture_thread;
gboolean capture_thread_exit;
GCond capture_thread_cond;
GMutex capture_thread_mutex;
MMPlayerVideoColorspace video_cs;
MMVideoBuffer captured;
+ /* gst bus msg thread, create during realize */
+ GThread *bus_msg_thread;
+ gboolean bus_msg_thread_exit;
+ GCond bus_msg_thread_cond;
+ GMutex bus_msg_thread_mutex;
+
/* fakesink handling lock */
GMutex fsink_lock;
/* message callback */
MMMessageCallback msg_cb;
- void* msg_cb_param;
-
- /* progressive download */
- mm_player_pd_t *pd_downloader;
- gchar *pd_file_save_path;
- MMPlayerPDMode pd_mode;
+ void *msg_cb_param;
/* streaming player */
mm_player_streaming_t *streamer;
int video_num_buffers; /* total num of buffers in vcodec */
int video_extra_num_buffers; /* extra num of buffers in vcodec */
- void* buffer_cb_user_param;
+ void *buffer_cb_user_param[MM_PLAYER_STREAM_TYPE_MAX];
+ void *seek_cb_user_param[MM_PLAYER_STREAM_TYPE_MAX];
/* video stream changed callback */
mm_player_stream_changed_callback video_stream_changed_cb;
- void* video_stream_changed_cb_user_param;
+ void *video_stream_changed_cb_user_param;
/* audio stream changed callback */
mm_player_stream_changed_callback audio_stream_changed_cb;
- void* audio_stream_changed_cb_user_param;
+ void *audio_stream_changed_cb_user_param;
/* video stream callback */
mm_player_video_stream_callback video_stream_cb;
- void* video_stream_cb_user_param;
+ void *video_stream_cb_user_param;
GCond video_bo_cond;
GMutex video_bo_mutex;
- GList* video_bo_list; /* mm_player_video_bo_info_t, bo list for decoded video data by sw codec */
+ GList *video_bo_list; /* mm_player_video_bo_info_t, bo list for decoded video data by sw codec */
int video_bo_size;
bool video_stream_prerolled;
- /* audio stram callback */
- mm_player_audio_stream_callback audio_stream_cb;
- void* audio_stream_cb_user_param;
+ /* audio stream callback */
+ mm_player_audio_stream_callback audio_stream_render_cb;
+ void *audio_stream_cb_user_param;
bool audio_stream_sink_sync;
- GList* audio_stream_buff_list; /* mm_player_audio_stream_buff_t, buff list of extract pcm data */
-
- /* audio buffer callback */
- mm_player_audio_stream_callback_ex audio_stream_render_cb_ex;
+ GList *audio_stream_buff_list; /* mm_player_audio_stream_buff_t, buff list of extract pcm data */
/* video capture callback*/
gulong video_capture_cb_probe_id;
gchar *type;
/* video stream caps parsed by demuxer */
- GstCaps* v_stream_caps;
+ GstCaps *v_stream_caps;
/* audio effect infomation */
MMAudioEffectInfo audio_effect_info;
gboolean bypass_audio_effect;
- gulong audio_cb_probe_id;
-
- /* for appsrc */
- tBuffer mem_buf;
-
/* content profile */
MMPlayerParseProfile profile;
+ MMPlayerStorageInfo storage_info[MMPLAYER_PATH_MAX];
/* streaming service type */
MMStreamingType streaming_type;
/* autoplugging */
- GList* factories;
- gboolean have_dynamic_pad;
- GList* parsers; // list of linked parser name
- GList* audio_decoders; // list of linked audio name
+ GList *factories;
+ GList *parsers; // list of linked parser name
+ GList *audio_decoders; // list of linked audio name
gboolean no_more_pad;
gint num_dynamic_pad;
gboolean has_many_types;
/* timer for sending delayed EOS */
guint eos_timer;
- /* last point (msec) that player is paused or seeking */
+ /* last point that player is paused or seeking */
gint64 last_position;
/* duration */
gint videodec_linked;
gint audiodec_linked;
- gint videosink_linked;
- gint audiosink_linked;
gint textsink_linked;
/* missing plugin during autoplugging */
/* support seek even though player is not start */
MMPlayerPendingSeek pending_seek;
-
- gboolean doing_seek;
+ MMPlayerSeekState seek_state;
/* prevent to post msg over and over */
gboolean msg_posted;
/* list of sink elements */
- GList* sink_elements;
+ GList *sink_elements;
/* signal notifiers */
- GList* signals[MM_PLAYER_SIGNAL_TYPE_MAX];
+ GList *signals[MM_PLAYER_SIGNAL_TYPE_MAX];
guint bus_watcher;
+ GQueue *bus_msg_q;
+ GMutex bus_msg_q_lock;
MMPlayerGMainContext context;
MMPlayerUriList uri_info;
gboolean is_nv12_tiled;
/* resource manager for H/W resources */
- MMPlayerResourceManager resource_manager;
-
- /* sound focus for being compatible with legacy session policy internally */
- MMPlayerSoundFocus sound_focus;
+ mm_resource_manager_h resource_manager;
+ mm_resource_manager_res_h video_overlay_resource;
+ mm_resource_manager_res_h video_decoder_resource;
+ gboolean interrupted_by_resource;
gboolean is_subtitle_off;
gboolean is_external_subtitle_present;
/* contents bitrate for buffering management */
guint bitrate[MM_PLAYER_STREAM_COUNT_MAX];
guint total_bitrate;
- guint updated_bitrate_count;
guint maximum_bitrate[MM_PLAYER_STREAM_COUNT_MAX];
guint total_maximum_bitrate;
- guint updated_maximum_bitrate_count;
/* prevent it from posting duplicatly*/
gboolean sent_bos;
- /* timeout source for lazy pause */
- guint lazy_pause_event_id;
- guint resume_event_id;
- guint resumable_cancel_id;
-
- gboolean keep_detecting_vcodec;
-
gboolean play_subtitle;
- gboolean use_textoverlay;
gboolean is_subtitle_force_drop; // set TRUE after bus_cb get EOS
- /* PD downloader message callback and param */
- MMMessageCallback pd_msg_cb;
- void* pd_msg_cb_param;
-
/* adjust subtitle position store */
gint64 adjust_subtitle_pos;
GList *subtitle_language_list;
+ GCond subtitle_info_cond;
+ GMutex subtitle_info_mutex;
/* To store the current multiwindow status */
gboolean last_multiwin_status;
gint demux_pad_index;
mm_player_selector_t selector[MM_PLAYER_TRACK_TYPE_MAX];
- mm_player_selector_t audio_mode;
- gboolean use_deinterleave;
- guint max_audio_channels;
guint internal_text_idx;
guint external_text_idx;
MMPlayerSetMode set_mode;
- /* decodbin usage */
- gboolean use_decodebin;
-
/* initialize values */
mm_player_ini_t ini;
- /* check to use h/w codec */
- GstCaps* state_tune_caps;
- gboolean ignore_asyncdone;
-
- /* video share sync */
- gint64 video_share_api_delta;
- gint64 video_share_clock_delta;
-
- /* just for native app (video hub) */
- gboolean video_hub_download_mode;
- gboolean sync_handler;
-
/* store dump pad list */
- GList* dump_list;
+ GList *dump_list;
/* whether a video has closed caption or not */
gboolean has_closed_caption;
- GstElement *video_fakesink;
/* audio stream caps parsed by demuxer or set by external demuxer */
- GstCaps* a_stream_caps;
+ GstCaps *a_stream_caps;
/* subtitle stream caps parsed by demuxer or set by external demuxer */
- GstCaps* s_stream_caps;
+ GstCaps *s_stream_caps;
/* es player using feed-data callback or calling app_src_push_buffer directly*/
gboolean es_player_push_mode;
/* tmb buffer manager for s/w codec tmb_bo */
tbm_bufmgr bufmgr;
- int pcm_samplerate;
- int pcm_channel;
+ MMAdaptiveVariantInfo adaptive_info;
+
+ /* Video360 related stuff
+ * */
+ gboolean is_360_feature_enabled;
+ gboolean is_content_spherical;
+ mm_player_spherical_metadata_t video360_metadata;
+ gboolean is_openal_plugin_used;
+ /* User settable values */
+ gboolean is_video360_enabled;
+ float video360_yaw_radians;
+ float video360_pitch_radians;
+ float video360_zoom;
+ int video360_horizontal_fov;
+ int video360_vertical_fov;
+
+ /* Video ROI area scale value */
+ MMPlayerVideoROI video_roi;
} mm_player_t;
typedef struct {
int _mmplayer_destroy(MMHandleType hplayer);
int _mmplayer_realize(MMHandleType hplayer);
int _mmplayer_unrealize(MMHandleType hplayer);
-int _mmplayer_get_state(MMHandleType hplayer, int* pstate);
+int _mmplayer_get_state(MMHandleType hplayer, int *pstate);
int _mmplayer_set_volume(MMHandleType hplayer, MMPlayerVolumeType volume);
int _mmplayer_get_volume(MMHandleType hplayer, MMPlayerVolumeType *volume);
int _mmplayer_set_mute(MMHandleType hplayer, int mute);
-int _mmplayer_get_mute(MMHandleType hplayer, int* pmute);
+int _mmplayer_get_mute(MMHandleType hplayer, int *pmute);
int _mmplayer_start(MMHandleType hplayer);
int _mmplayer_stop(MMHandleType hplayer);
int _mmplayer_pause(MMHandleType hplayer);
+int _mmplayer_abort_pause(MMHandleType hplayer);
int _mmplayer_resume(MMHandleType hplayer);
-int _mmplayer_set_position(MMHandleType hplayer, int format, int pos);
-int _mmplayer_get_position(MMHandleType hplayer, int format, unsigned long *pos);
+int _mmplayer_set_position(MMHandleType hplayer, gint64 pos);
+int _mmplayer_get_position(MMHandleType hplayer, gint64 *pos);
+int _mmplayer_get_duration(MMHandleType hplayer, gint64 *duration);
int _mmplayer_adjust_subtitle_postion(MMHandleType hplayer, int format, int pos);
-int _mmplayer_adjust_video_postion(MMHandleType hplayer, int offset);
-int _mmplayer_activate_section_repeat(MMHandleType hplayer, unsigned long start, unsigned long end);
-int _mmplayer_deactivate_section_repeat(MMHandleType hplayer);
int _mmplayer_set_playspeed(MMHandleType hplayer, float rate, bool streaming);
int _mmplayer_set_message_callback(MMHandleType hplayer, MMMessageCallback callback, void *user_param);
int _mmplayer_set_videostream_changed_cb(MMHandleType hplayer, mm_player_stream_changed_callback callback, void *user_param);
int _mmplayer_set_audiostream_changed_cb(MMHandleType hplayer, mm_player_stream_changed_callback callback, void *user_param);
int _mmplayer_set_videostream_cb(MMHandleType hplayer, mm_player_video_stream_callback callback, void *user_param);
-int _mmplayer_set_audiostream_cb(MMHandleType hplayer, mm_player_audio_stream_callback callback, void *user_param);
int _mmplayer_set_subtitle_silent(MMHandleType hplayer, int silent);
-int _mmplayer_get_subtitle_silent(MMHandleType hplayer, int* silent);
-int _mmplayer_set_external_subtitle_path(MMHandleType hplayer, const char* filepath);
-int _mmplayer_get_buffer_position(MMHandleType hplayer, int format, unsigned long* start_pos, unsigned long* stop_pos);
-
-/* test API for tuning audio gain. this API should be
- * deprecated before the day of final release
- */
-int _mmplayer_set_volume_tune(MMHandleType hplayer, MMPlayerVolumeType volume);
-int _mmplayer_update_video_param(mm_player_t* player, char *param_name);
-int _mmplayer_set_audiobuffer_cb(MMHandleType hplayer, mm_player_audio_stream_callback callback, void *user_param);
+int _mmplayer_get_subtitle_silent(MMHandleType hplayer, int *silent);
+int _mmplayer_set_external_subtitle_path(MMHandleType hplayer, const char *filepath);
+int _mmplayer_get_buffer_position(MMHandleType hplayer, int *start_pos, int *end_pos);
+int _mmplayer_update_video_param(mm_player_t *player, char *param_name);
int _mmplayer_change_videosink(MMHandleType handle, MMDisplaySurfaceType surface_type, void *display_overlay);
int _mmplayer_audio_effect_custom_apply(mm_player_t *player);
-
-int _mmplayer_set_audiostream_cb_ex(MMHandleType hplayer, bool sync, mm_player_audio_stream_callback_ex callback, void *user_param);
-gboolean __mmplayer_post_message(mm_player_t* player, enum MMMessageType msgtype, MMMessageParamType* param);
-
-int _mmplayer_gst_set_audio_channel(MMHandleType hplayer, MMPlayerAudioChannel ch_idx);
+int _mmplayer_set_audiostream_cb(MMHandleType hplayer, bool sync, mm_player_audio_stream_callback callback, void *user_param);
int _mmplayer_change_track_language(MMHandleType hplayer, MMPlayerTrackType type, int index);
-int _mmplayer_sync_subtitle_pipeline(mm_player_t* player);
-int _mmplayer_set_prepare_buffering_time(MMHandleType hplayer, int second);
-int _mmplayer_set_runtime_buffering_mode(MMHandleType hplayer, MMPlayerBufferingMode mode, int second);
-int _mmplayer_set_display_zoom(MMHandleType hplayer, float level, int x, int y);
-int _mmplayer_get_display_zoom(MMHandleType hplayer, float *level, int *x, int *y);
-int _mmplayer_set_video_hub_download_mode(MMHandleType hplayer, bool mode);
+int _mmplayer_sync_subtitle_pipeline(mm_player_t *player);
int _mmplayer_use_system_clock(MMHandleType hplayer);
-int _mmplayer_set_video_share_master_clock(MMHandleType hplayer, long long clock, long long clock_delta, long long video_time, long long media_clock, long long audio_time);
-int _mmplayer_get_video_share_master_clock(MMHandleType hplayer, long long *video_time, long long *media_clock, long long *audio_time);
-int _mmplayer_get_video_rotate_angle(MMHandleType hplayer, int *angle);
-int _mmplayer_enable_sync_handler(MMHandleType hplayer, bool enable);
-int _mmplayer_set_file_buffering_path(MMHandleType hplayer, const char* file_path);
-int _mmplayer_set_uri(MMHandleType hplayer, const char* uri);
-int _mmplayer_set_next_uri(MMHandleType hplayer, const char* uri, bool is_first_path);
-int _mmplayer_get_next_uri(MMHandleType hplayer, char** uri);
-int _mmplayer_has_closed_caption(MMHandleType hplayer, bool* exist);
-void * _mm_player_media_packet_video_stream_internal_buffer_ref(void *buffer);
-void _mm_player_media_packet_video_stream_internal_buffer_unref(void *buffer);
-int _mmplayer_set_pcm_spec(MMHandleType hplayer, int samplerate, int channel);
+int _mmplayer_set_file_buffering_path(MMHandleType hplayer, const char *file_path);
+int _mmplayer_set_uri(MMHandleType hplayer, const char *uri);
+int _mmplayer_set_next_uri(MMHandleType hplayer, const char *uri, bool is_first_path);
+int _mmplayer_get_next_uri(MMHandleType hplayer, char **uri);
+int _mmplayer_has_closed_caption(MMHandleType hplayer, bool *exist);
+void _mm_player_video_stream_internal_buffer_unref(void *buffer);
int _mmplayer_get_timeout(MMHandleType hplayer, int *timeout);
int _mmplayer_get_num_of_video_out_buffers(MMHandleType hplayer, int *num, int *extra_num);
-int __mmplayer_gst_set_state(mm_player_t* player, GstElement * pipeline, GstState state, gboolean async, gint timeout);
-int __mmplayer_set_state(mm_player_t* player, int state);
-int __mmplayer_check_state(mm_player_t* player, enum PlayerCommandState command);
-gboolean __mmplayer_dump_pipeline_state(mm_player_t* player);
-void __mmplayer_remove_g_source_from_context(GMainContext *context, guint source_id);
-/* util */
-const gchar * __get_state_name(int state);
-gboolean __mmplayer_can_do_interrupt(mm_player_t *player);
-gboolean __is_streaming(mm_player_t* player);
-gboolean __is_rtsp_streaming(mm_player_t* player);
-gboolean __is_wfd_streaming(mm_player_t* player);
-gboolean __is_live_streaming(mm_player_t* player);
-gboolean __is_http_streaming(mm_player_t* player);
-gboolean __is_http_live_streaming(mm_player_t* player);
-gboolean __is_dash_streaming(mm_player_t* player);
-gboolean __is_smooth_streaming(mm_player_t* player);
-gboolean __is_http_progressive_down(mm_player_t* player);
-
-gboolean __mmplayer_check_useful_message(mm_player_t *player, GstMessage * message);
-gboolean __mmplayer_handle_gst_error(mm_player_t* player, GstMessage * message, GError* error);
-gint __gst_handle_core_error(mm_player_t* player, int code);
-gint __gst_handle_library_error(mm_player_t* player, int code);
-gint __gst_handle_resource_error(mm_player_t* player, int code);
-gint __gst_handle_stream_error(mm_player_t* player, GError* error, GstMessage * message);
-int _mmplayer_sound_register_with_pid(MMHandleType hplayer, int pid);
-int _mmplayer_get_client_pid(MMHandleType hplayer, int* pid);
-int __mmplayer_get_video_angle(mm_player_t* player, int *user_angle, int *org_angle);
-int _mmplayer_video_stream_release_bo(mm_player_t* player, void* bo);
+int _mmplayer_manage_external_storage_state(MMHandleType hplayer, int id, int state);
+int _mmplayer_video_stream_release_bo(mm_player_t *player, void *bo);
+int _mmplayer_get_adaptive_variant_info(MMHandleType hplayer, int *num, char **var_info);
+int _mmplayer_set_max_adaptive_variant_limit(MMHandleType hplayer, int bandwidth, int width, int height);
+int _mmplayer_get_max_adaptive_variant_limit(MMHandleType hplayer, int *bandwidth, int *width, int *height);
+int _mmplayer_set_audio_only(MMHandleType hplayer, bool audio_only);
+int _mmplayer_get_audio_only(MMHandleType hplayer, bool *paudio_only);
+int _mmplayer_set_streaming_buffering_time(MMHandleType hplayer, int buffer_ms, int rebuffer_ms);
+int _mmplayer_get_streaming_buffering_time(MMHandleType hplayer, int *buffer_ms, int *rebuffer_ms);
+int _mmplayer_set_codec_type(MMHandleType hplayer, MMPlayerStreamType stream_type, MMPlayerVideoCodecType codec_type);
+int _mmplayer_set_replaygain_enabled(MMHandleType hplayer, bool enabled);
+int _mmplayer_is_replaygain_enabled(MMHandleType hplayer, bool *enabled);
+int _mmplayer_set_video_roi_area(MMHandleType hplayer, double scale_x, double scale_y, double scale_width, double scale_height);
+int _mmplayer_get_video_roi_area(MMHandleType hplayer, double *scale_x, double *scale_y, double *scale_width, double *scale_height);
+
+/* internal */
+void __mmplayer_bus_msg_thread_destroy(MMHandleType hplayer);
+
+void __mmplayer_set_state(mm_player_t *player, int state);
+int __mmplayer_check_state(mm_player_t *player, enum PlayerCommandState command);
+gboolean __mmplayer_update_content_attrs(mm_player_t *player, enum content_attr_flag flag);
+void __mmplayer_cancel_eos_timer(mm_player_t *player);
+void __mmplayer_audio_stream_clear_buffer(mm_player_t *player, gboolean send_all);
+MMStreamingType __mmplayer_get_stream_service_type(mm_player_t *player);
+int __mmplayer_get_video_angle(mm_player_t *player, int *display_angle, int *orientations);
+gboolean __mmplayer_gst_remove_fakesink(mm_player_t *player, MMPlayerGstElement *fakesink);
+void __mmplayer_add_signal_connection(mm_player_t *player, GObject *object, MMPlayerSignalType type, const gchar *signal, GCallback cb_funct, gpointer u_data);
+void __mmplayer_gst_decode_pad_added(GstElement *elem, GstPad *pad, gpointer data);
+gint __mmplayer_gst_decode_autoplug_select(GstElement *bin, GstPad *pad, GstCaps *caps, GstElementFactory *factory, gpointer data);
+gboolean __mmplayer_gst_create_decoder(mm_player_t *player, GstPad *srcpad, const GstCaps *caps);
+void __mmplayer_gst_element_added(GstElement *bin, GstElement *element, gpointer data);
+GstElement *__mmplayer_gst_make_decodebin(mm_player_t *player);
+int __mmplayer_gst_element_add_bucket_to_bin(GstBin *bin, GList *element_bucket);
+int __mmplayer_gst_element_link_bucket(GList *element_bucket);
+void __mmplayer_typefind_have_type(GstElement *tf, guint probability, GstCaps *caps, gpointer data);
+int __mmplayer_parse_profile(const char *uri, void *param, MMPlayerParseProfile *data);
+
#ifdef __cplusplus
}