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_PRIV_H__
24 #define __MM_PLAYER_PRIV_H__
26 /*===========================================================================================
30 ========================================================================================== */
40 #include <tbm_bufmgr.h>
41 #include "mm_player.h"
42 #include "mm_player_internal.h"
43 #include "mm_player_audioeffect.h"
44 #include "mm_message.h"
45 #include "mm_player_ini.h"
46 #include "mm_player_asm.h"
47 #include "mm_player_pd.h"
48 #include "mm_player_streaming.h"
50 /*===========================================================================================
52 | GLOBAL DEFINITIONS AND DECLARATIONS FOR MODULE |
54 ========================================================================================== */
56 /*---------------------------------------------------------------------------
58 ---------------------------------------------------------------------------*/
60 #define MM_PLAYER_IMGB_MPLANE_MAX 4
61 #define MM_PLAYER_STREAM_COUNT_MAX 3
63 #define MM_PLAYER_CAST(x_player) ((mm_player_t *)(x_player))
65 * @x_player: MMHandleType of player
67 * Get the PD downloader of this player.
69 #define MM_PLAYER_GET_PD(x_player) (MM_PLAYER_CAST(x_player)->pd_downloader)
71 * @x_player: MMHandleType of player
73 * Get the attributes handle of this player.
75 #define MM_PLAYER_GET_ATTRS(x_player) (MM_PLAYER_CAST(x_player)->attrs)
77 /*---------------------------------------------------------------------------
78 | GLOBAL CONSTANT DEFINITIONS: |
79 ---------------------------------------------------------------------------*/
82 TAG_AUDIO_CODEC = 0x0001,
83 TAG_VIDEO_CODEC = 0x0002,
88 TAG_COPYRIGHT = 0x0040,
90 TAG_DESCRIPTION = 0x0100,
91 TAG_TRACK_NUMBER = 0x0200
94 enum content_attr_flag
96 ATTR_MISSING_ONLY = 0x0001,
97 ATTR_DURATION = 0x0002,
100 ATTR_BITRATE = 0x0010,
104 /* async mode makes trouble. alsasink sometimes fails to pause. */
113 * Enumerations of Player Mode
116 MM_PLAYER_MODE_NONE, /**< Player mode None */
117 MM_PLAYER_MODE_MIDI, /**< Player mode Midi */
118 MM_PLAYER_MODE_GST, /**< Player mode Gstreamer */
123 * Enumerations of Player Uri type
125 enum MMPlayerUriType {
126 MM_PLAYER_URI_TYPE_NONE, /**< Player URI type None */
127 MM_PLAYER_URI_TYPE_URL_RTSP, /**< Player URI type RTSP */
128 MM_PLAYER_URI_TYPE_URL_WFD, /**< Player URI type WFD */
129 MM_PLAYER_URI_TYPE_URL_HTTP,/**< Player URI type HTTP */
130 MM_PLAYER_URI_TYPE_URL_MMS,/**< Player URI type MMS */
131 MM_PLAYER_URI_TYPE_MEM, /**< Player URI type Mem */
132 MM_PLAYER_URI_TYPE_FILE, /**< Player URI type File */
133 MM_PLAYER_URI_TYPE_URL, /**< Player URI type URL */
134 MM_PLAYER_URI_TYPE_BUFF, /**< Player URI type Buffer */
135 MM_PLAYER_URI_TYPE_ES_BUFF, /**< Player URI type ES Buffer */
136 MM_PLAYER_URI_TYPE_HLS, /**< Player URI type http live streaming */
137 MM_PLAYER_URI_TYPE_SS, /**< Player URI type Smooth streaming */
138 MM_PLAYER_URI_TYPE_DASH, /**< Player URI type Mpeg Dash */
139 MM_PLAYER_URI_TYPE_NO_PERMISSION,/**< Player URI type No Permission */
140 MM_PLAYER_URI_TYPE_TEMP, /**< Player URI type Temp */
143 typedef enum _MissingCodec
145 MISSING_PLUGIN_NONE = 0x00,
146 MISSING_PLUGIN_AUDIO = 0x01,
147 MISSING_PLUGIN_VIDEO = 0x02
151 typedef enum _FoundCodec
153 FOUND_PLUGIN_NONE = 0x00,
154 FOUND_PLUGIN_AUDIO = 0x01,
155 FOUND_PLUGIN_VIDEO = 0x02
159 * Enumeration of signal type
162 MM_PLAYER_SIGNAL_TYPE_AUTOPLUG = 0,
163 MM_PLAYER_SIGNAL_TYPE_VIDEOBIN,
164 MM_PLAYER_SIGNAL_TYPE_AUDIOBIN,
165 MM_PLAYER_SIGNAL_TYPE_TEXTBIN,
166 MM_PLAYER_SIGNAL_TYPE_OTHERS,
167 MM_PLAYER_SIGNAL_TYPE_ALL,
168 MM_PLAYER_SIGNAL_TYPE_MAX = MM_PLAYER_SIGNAL_TYPE_ALL,
171 /* main pipeline's element id */
174 MMPLAYER_M_PIPE = 0, /* NOTE : MMPLAYER_M_PIPE should be zero */
176 MMPLAYER_M_2ND_SRC, /* 2nd Source Element for es buff src */
179 /* it could be a decodebin or could be a typefind. depends on player ini */
183 MMPLAYER_M_AUTOPLUG_V_DEC,
184 MMPLAYER_M_AUTOPLUG_A_DEC,
186 /* NOTE : we need two fakesink to autoplug without decodebin.
187 * first one will hold whole pipeline state. and second one will hold state of
188 * a sink-decodebin for an elementary stream. no metter if there's more then one
189 * elementary streams because MSL reuse it.
191 MMPLAYER_M_SRC_FAKESINK,
192 MMPLAYER_M_SRC_2ND_FAKESINK,
194 /* streaming plugin */
195 MMPLAYER_M_MUXED_S_BUFFER,
196 MMPLAYER_M_DEMUXED_S_BUFFER,
199 /* es buff src queue */
204 /* FIXIT : if there's really no usage for following IDs. remove it */
212 MMPLAYER_M_A_INPUT_SELECTOR, // audio input_select
213 MMPLAYER_M_T_INPUT_SELECTOR, // text input_select
219 MMPLAYER_M_A_DEINTERLEAVE,
220 MMPLAYER_M_A_SELECTOR,
224 /* audio pipeline's element id */
227 MMPLAYER_A_BIN = 0, /* NOTE : MMPLAYER_A_BIN should be zero */
232 MMPLAYER_A_FILTER_SEC,
234 MMPLAYER_A_CAPS_DEFAULT,
236 MMPLAYER_A_RESAMPLER,
237 MMPLAYER_A_DEINTERLEAVE,
241 /* video pipeline's element id */
244 MMPLAYER_V_BIN = 0, /* NOTE : MMPLAYER_V_BIN should be zero */
253 /* text pipeline's element id */
256 MMPLAYER_T_BIN = 0, /* NOTE : MMPLAYER_V_BIN should be zero */
257 MMPLAYER_T_TEXT_FAKE_QUEUE,
258 MMPLAYER_T_VIDEO_QUEUE,
259 MMPLAYER_T_VIDEO_CONVERTER,
261 MMPLAYER_T_FAKE_SINK,
262 MMPLAYER_T_TEXT_FAKE_IDENTITY,
266 /* midi main pipeline's element id */
270 MMPLAYER_MIDI_PLAYER,
274 enum PlayerCommandState
276 MMPLAYER_COMMAND_NONE,
277 MMPLAYER_COMMAND_CREATE,
278 MMPLAYER_COMMAND_DESTROY,
279 MMPLAYER_COMMAND_UNREALIZE,
280 MMPLAYER_COMMAND_START,
281 MMPLAYER_COMMAND_REALIZE,
282 MMPLAYER_COMMAND_STOP,
283 MMPLAYER_COMMAND_PAUSE,
284 MMPLAYER_COMMAND_RESUME,
288 /* Note : StreamingSrcError is error enum for streaming source which post error message
289 * using custom message made by itself. The enum value must start with zero,
290 * because the streaming source(secrtspsrc) also does.
292 enum StreamingSrcError
294 MMPLAYER_STREAMING_ERROR_NONE = 0,
295 MMPLAYER_STREAMING_ERROR_UNSUPPORTED_AUDIO,
296 MMPLAYER_STREAMING_ERROR_UNSUPPORTED_VIDEO,
297 MMPLAYER_STREAMING_ERROR_CONNECTION_FAIL,
298 MMPLAYER_STREAMING_ERROR_DNS_FAIL,
299 MMPLAYER_STREAMING_ERROR_SERVER_DISCONNECTED,
300 MMPLAYER_STREAMING_ERROR_BAD_SERVER,
301 MMPLAYER_STREAMING_ERROR_INVALID_PROTOCOL,
302 MMPLAYER_STREAMING_ERROR_INVALID_URL,
303 MMPLAYER_STREAMING_ERROR_UNEXPECTED_MSG,
304 MMPLAYER_STREAMING_ERROR_OUT_OF_MEMORIES,
305 MMPLAYER_STREAMING_ERROR_RTSP_TIMEOUT,
306 MMPLAYER_STREAMING_ERROR_BAD_REQUEST,
307 MMPLAYER_STREAMING_ERROR_NOT_AUTHORIZED,
308 MMPLAYER_STREAMING_ERROR_PAYMENT_REQUIRED,
309 MMPLAYER_STREAMING_ERROR_FORBIDDEN,
310 MMPLAYER_STREAMING_ERROR_CONTENT_NOT_FOUND,
311 MMPLAYER_STREAMING_ERROR_METHOD_NOT_ALLOWED,
312 MMPLAYER_STREAMING_ERROR_NOT_ACCEPTABLE,
313 MMPLAYER_STREAMING_ERROR_PROXY_AUTHENTICATION_REQUIRED,
314 MMPLAYER_STREAMING_ERROR_SERVER_TIMEOUT,
315 MMPLAYER_STREAMING_ERROR_GONE,
316 MMPLAYER_STREAMING_ERROR_LENGTH_REQUIRED,
317 MMPLAYER_STREAMING_ERROR_PRECONDITION_FAILED,
318 MMPLAYER_STREAMING_ERROR_REQUEST_ENTITY_TOO_LARGE,
319 MMPLAYER_STREAMING_ERROR_REQUEST_URI_TOO_LARGE,
320 MMPLAYER_STREAMING_ERROR_UNSUPPORTED_MEDIA_TYPE,
321 MMPLAYER_STREAMING_ERROR_PARAMETER_NOT_UNDERSTOOD,
322 MMPLAYER_STREAMING_ERROR_CONFERENCE_NOT_FOUND,
323 MMPLAYER_STREAMING_ERROR_NOT_ENOUGH_BANDWIDTH,
324 MMPLAYER_STREAMING_ERROR_NO_SESSION_ID,
325 MMPLAYER_STREAMING_ERROR_METHOD_NOT_VALID_IN_THIS_STATE,
326 MMPLAYER_STREAMING_ERROR_HEADER_FIELD_NOT_VALID_FOR_SOURCE,
327 MMPLAYER_STREAMING_ERROR_INVALID_RANGE,
328 MMPLAYER_STREAMING_ERROR_PARAMETER_IS_READONLY,
329 MMPLAYER_STREAMING_ERROR_AGGREGATE_OP_NOT_ALLOWED,
330 MMPLAYER_STREAMING_ERROR_ONLY_AGGREGATE_OP_ALLOWED,
331 MMPLAYER_STREAMING_ERROR_BAD_TRANSPORT,
332 MMPLAYER_STREAMING_ERROR_DESTINATION_UNREACHABLE,
333 MMPLAYER_STREAMING_ERROR_INTERNAL_SERVER_ERROR,
334 MMPLAYER_STREAMING_ERROR_NOT_IMPLEMENTED,
335 MMPLAYER_STREAMING_ERROR_BAD_GATEWAY,
336 MMPLAYER_STREAMING_ERROR_SERVICE_UNAVAILABLE,
337 MMPLAYER_STREAMING_ERROR_GATEWAY_TIME_OUT ,
338 MMPLAYER_STREAMING_ERROR_RTSP_VERSION_NOT_SUPPORTED,
339 MMPLAYER_STREAMING_ERROR_OPTION_NOT_SUPPORTED,
342 /*---------------------------------------------------------------------------
343 | GLOBAL DATA TYPE DEFINITIONS: |
344 ---------------------------------------------------------------------------*/
350 } MMPlayerGstElement;
354 GstTagList *tag_list;
355 MMPlayerGstElement *mainbin;
356 MMPlayerGstElement *audiobin;
357 MMPlayerGstElement *videobin;
358 MMPlayerGstElement *textbin;
359 } MMPlayerGstPipelineInfo;
365 int bluetooth; /* enable/disable */
373 } tBuffer; /* FIXIT : choose better name */
380 char uri[MM_MAX_URL_LEN];
381 char urgent[MM_MAX_FILENAME_LEN];
382 } MMPlayerParseProfile;
386 MMPlayerPosFormatType format;
388 }MMPlayerPendingSeek;
393 } MMPlayerSignalItem;
399 bool video_zc; // video zero-copy
401 bool media_packet_video_stream;
405 GMainContext *global_default;
406 GMainContext *thread_default;
407 }MMPlayerGMainContext;
415 gint active_pad_index;
416 gint total_track_num;
418 } mm_player_selector_t;
420 /* Things needed to be done after output device has changed */
424 gboolean need_pause_and_resume;
426 guint required_cb_score;
428 } mm_player_post_proc_t;
432 int state; // player current state
433 int prev_state; // player previous state
434 int pending_state; // player state which is going to now
435 int target_state; // player state which user want to go to
436 guint state_change_timeout;
438 gboolean section_repeat;
439 gint section_repeat_start;
440 gint section_repeat_end;
449 GMutex playback_lock;
451 /* repeat thread lock */
452 GCond repeat_thread_cond;
453 GMutex repeat_thread_mutex;
454 GThread* repeat_thread;
455 gboolean repeat_thread_exit;
457 /* next play thread */
458 GThread* next_play_thread;
459 gboolean next_play_thread_exit;
460 GCond next_play_thread_cond;
461 GMutex next_play_thread_mutex;
464 GThread* capture_thread;
465 gboolean capture_thread_exit;
466 GCond capture_thread_cond;
467 GMutex capture_thread_mutex;
468 MMPlayerVideoCapture capture;
469 MMPlayerVideoColorspace video_cs;
470 MMVideoBuffer captured;
472 /* fakesink handling lock */
475 /* player attributes */
478 /* message callback */
479 MMMessageCallback msg_cb;
483 /* progressive download */
484 mm_player_pd_t *pd_downloader;
485 gchar *pd_file_save_path;
486 MMPlayerPDMode pd_mode;
488 /* streaming player */
489 mm_player_streaming_t *streamer;
491 /* gstreamer pipeline */
492 MMPlayerGstPipelineInfo *pipeline;
495 GstPad *ghost_pad_for_videobin;
497 guint64 media_stream_buffer_max_size[MM_PLAYER_STREAM_TYPE_MAX];
498 guint media_stream_buffer_min_percent[MM_PLAYER_STREAM_TYPE_MAX];
499 mm_player_media_stream_buffer_status_callback media_stream_buffer_status_cb[MM_PLAYER_STREAM_TYPE_MAX];
500 mm_player_media_stream_seek_data_callback media_stream_seek_data_cb[MM_PLAYER_STREAM_TYPE_MAX];
502 void* buffer_cb_user_param;
504 /* video stream changed callback */
505 mm_player_stream_changed_callback video_stream_changed_cb;
506 void* video_stream_changed_cb_user_param;
508 /* audio stream changed callback */
509 mm_player_stream_changed_callback audio_stream_changed_cb;
510 void* audio_stream_changed_cb_user_param;
512 /* video stream callback */
513 mm_player_video_stream_callback video_stream_cb;
514 void* video_stream_cb_user_param;
515 int use_video_stream;
517 /* audio stram callback */
518 mm_player_audio_stream_callback audio_stream_cb;
519 void* audio_stream_cb_user_param;
520 bool audio_stream_sink_sync;
522 /* audio buffer callback */
523 mm_player_audio_stream_callback_ex audio_stream_render_cb_ex;
525 /* video capture callback*/
526 gulong video_capture_cb_probe_id;
528 /* video frame render error callback */
529 mm_player_video_frame_render_error_callback video_frame_render_error_cb;
530 void* video_frame_render_error_cb_user_param;
533 MMPlayerSoundInfo sound;
538 /* video stream caps parsed by demuxer */
539 GstCaps* v_stream_caps;
541 /* audio effect infomation */
542 MMAudioEffectInfo audio_effect_info;
543 gboolean bypass_audio_effect;
545 gulong audio_cb_probe_id;
546 gulong video_cb_probe_id;
551 /* content profile */
552 MMPlayerParseProfile profile;
554 /* streaming service type */
555 MMStreamingType streaming_type;
559 gboolean have_dynamic_pad;
560 GList* parsers; // list of linked parser name
561 GList* audio_decoders; // list of linked audio name
562 gboolean no_more_pad;
563 gint num_dynamic_pad;
564 gboolean has_many_types;
566 /* progress callback timer */
567 /* FIXIT : since duplicated functionality with get_position
568 * this function will be deprecated after fixing all application
569 * which are using it.
571 guint progress_timer;
573 /* timer for sending delayed EOS */
576 /* last point (msec) that player is paused or seeking */
577 gint64 last_position;
582 /* data size of http streaming */
583 guint64 http_content_size;
586 gchar last_error_msg[1024]; /* FIXIT : should it be dynamic ? */
588 gboolean smooth_streaming;
590 gint videodec_linked;
591 gint audiodec_linked;
592 gint videosink_linked;
593 gint audiosink_linked;
594 gint textsink_linked;
596 /* missing plugin during autoplugging */
597 MissingCodec not_supported_codec;
599 /*unlinked audio/video mime type */
600 gchar *unlinked_video_mime;
601 gchar *unlinked_audio_mime;
602 gchar *unlinked_demuxer_mime;
604 /* found codec during autoplugging */
605 FoundCodec can_support_codec;
607 gboolean not_found_demuxer;
609 /* support seek even though player is not start */
610 MMPlayerPendingSeek pending_seek;
614 /* prevent to post msg over and over */
617 /* list of sink elements */
618 GList* sink_elements;
620 /* signal notifiers */
621 GList* signals[MM_PLAYER_SIGNAL_TYPE_MAX];
623 MMPlayerGMainContext context;
624 MMPlayerUriList uri_info;
626 gboolean is_sound_extraction;
628 gfloat playback_rate;
630 /* player state resumed by fast rewind */
631 gboolean resumed_by_rewind;
633 gboolean is_nv12_tiled;
634 gboolean is_drm_file;
638 gboolean is_subtitle_off;
639 gboolean is_external_subtitle_present;
641 /* contents bitrate for buffering management */
642 guint bitrate[MM_PLAYER_STREAM_COUNT_MAX];
644 guint updated_bitrate_count;
645 guint maximum_bitrate[MM_PLAYER_STREAM_COUNT_MAX];
646 guint total_maximum_bitrate;
647 guint updated_maximum_bitrate_count;
649 /* prevent it from posting duplicatly*/
652 /* timeout source for lazy pause */
653 guint lazy_pause_event_id;
654 guint resume_event_id;
655 guint resumable_cancel_id;
657 gboolean keep_detecting_vcodec;
659 gboolean play_subtitle;
660 gboolean use_textoverlay;
661 gboolean is_subtitle_force_drop; // set TRUE after bus_cb get EOS
663 /* PD downloader message callback and param */
664 MMMessageCallback pd_msg_cb;
665 void* pd_msg_cb_param;
667 /* adjust subtitle position store */
668 gint64 adjust_subtitle_pos;
669 GList *subtitle_language_list;
671 /* To store the current multiwindow status */
672 gboolean last_multiwin_status;
674 /* To store the current running audio pad index of demuxer */
675 gint demux_pad_index;
677 mm_player_selector_t selector[MM_PLAYER_TRACK_TYPE_MAX];
678 mm_player_selector_t audio_mode;
679 gboolean use_deinterleave;
680 guint max_audio_channels;
682 guint internal_text_idx;
683 guint external_text_idx;
685 MMPlayerSetMode set_mode;
688 gboolean use_decodebin;
690 /* initialize values */
693 /* check to use h/w codec */
694 GstCaps* state_tune_caps;
695 gboolean ignore_asyncdone;
697 /* video share sync */
698 gint64 video_share_api_delta;
699 gint64 video_share_clock_delta;
701 /* just for native app (video hub) */
702 gboolean video_hub_download_mode;
703 gboolean sync_handler;
705 /* seamless next playing */
706 gboolean src_changed;
707 gboolean pp_rebuilding;
709 /* store dump pad list */
713 /* audio/video deivce change handling */
714 mm_player_post_proc_t post_proc;
716 /* whether a video has closed caption or not */
717 gboolean has_closed_caption;
719 GstElement *video_fakesink;
721 /* audio stream caps parsed by demuxer or set by external demuxer */
722 GstCaps* a_stream_caps;
724 /* subtitle stream caps parsed by demuxer or set by external demuxer */
725 GstCaps* s_stream_caps;
727 /*es player using feed-data callback or calling app_src_push_buffer directly*/
728 gboolean es_player_push_mode;
730 /* tmb buffer manager for s/w codec tmb_bo */
739 gchar *language_code;
747 gulong probe_handle_id;
748 FILE *dump_element_file;
751 /*===========================================================================================
753 | GLOBAL FUNCTION PROTOTYPES |
755 ========================================================================================== */
760 int _mmplayer_create_player(MMHandleType hplayer);
761 int _mmplayer_destroy(MMHandleType hplayer);
762 int _mmplayer_realize(MMHandleType hplayer);
763 int _mmplayer_unrealize(MMHandleType hplayer);
764 int _mmplayer_get_state(MMHandleType hplayer, int* pstate);
765 int _mmplayer_set_volume(MMHandleType hplayer, MMPlayerVolumeType volume);
766 int _mmplayer_get_volume(MMHandleType hplayer, MMPlayerVolumeType *volume);
767 int _mmplayer_set_mute(MMHandleType hplayer, int mute);
768 int _mmplayer_get_mute(MMHandleType hplayer, int* pmute);
769 int _mmplayer_start(MMHandleType hplayer);
770 int _mmplayer_stop(MMHandleType hplayer);
771 int _mmplayer_pause(MMHandleType hplayer);
772 int _mmplayer_resume(MMHandleType hplayer);
773 int _mmplayer_set_position(MMHandleType hplayer, int format, int pos);
774 int _mmplayer_get_position(MMHandleType hplayer, int format, unsigned long *pos);
775 int _mmplayer_adjust_subtitle_postion(MMHandleType hplayer, int format, int pos);
776 int _mmplayer_adjust_video_postion(MMHandleType hplayer,int offset);
777 int _mmplayer_activate_section_repeat(MMHandleType hplayer, unsigned long start, unsigned long end);
778 int _mmplayer_deactivate_section_repeat(MMHandleType hplayer);
779 int _mmplayer_push_buffer(MMHandleType hplayer, unsigned char *buf, int size);
780 int _mmplayer_set_playspeed(MMHandleType hplayer, float rate);
781 int _mmplayer_set_playspeed_ex(MMHandleType hplayer, gdouble rate);
782 int _mmplayer_set_message_callback(MMHandleType hplayer, MMMessageCallback callback, void *user_param);
783 int _mmplayer_set_videostream_changed_cb(MMHandleType hplayer, mm_player_stream_changed_callback callback, void *user_param);
784 int _mmplayer_set_audiostream_changed_cb(MMHandleType hplayer, mm_player_stream_changed_callback callback, void *user_param);
785 int _mmplayer_set_videostream_cb(MMHandleType hplayer,mm_player_video_stream_callback callback, void *user_param);
786 int _mmplayer_set_audiostream_cb(MMHandleType hplayer,mm_player_audio_stream_callback callback, void *user_param);
787 int _mmplayer_set_videoframe_render_error_cb(MMHandleType hplayer, mm_player_video_frame_render_error_callback callback, void *user_param);
788 int _mmplayer_set_subtitle_silent (MMHandleType hplayer, int silent);
789 int _mmplayer_get_subtitle_silent (MMHandleType hplayer, int* silent);
790 int _mmplayer_set_external_subtitle_path(MMHandleType hplayer, const char* filepath);
791 int _mmplayer_get_buffer_position(MMHandleType hplayer, int format, unsigned long* start_pos, unsigned long* stop_pos);
793 /* test API for tuning audio gain. this API should be
794 * deprecated before the day of final release
796 int _mmplayer_set_volume_tune(MMHandleType hplayer, MMPlayerVolumeType volume);
797 int _mmplayer_update_video_param(mm_player_t* player);
798 int _mmplayer_set_audiobuffer_cb(MMHandleType hplayer, mm_player_audio_stream_callback callback, void *user_param);
799 int _mmplayer_change_videosink(MMHandleType handle, MMDisplaySurfaceType surface_type, void *display_overlay);
800 int _mmplayer_audio_effect_custom_apply(mm_player_t *player);
802 int _mmplayer_set_audiostream_cb_ex(MMHandleType hplayer, bool sync, mm_player_audio_stream_callback_ex callback, void *user_param);
803 gboolean __mmplayer_post_message(mm_player_t* player, enum MMMessageType msgtype, MMMessageParamType* param);
804 gboolean __mmplayer_is_streaming(mm_player_t* player);
807 int _mmplayer_gst_set_audio_channel(MMHandleType hplayer, MMPlayerAudioChannel ch_idx);
808 int _mmplayer_change_track_language (MMHandleType hplayer, MMPlayerTrackType type, int index);
809 int _mmplayer_sync_subtitle_pipeline(mm_player_t* player);
810 int _mmplayer_set_prepare_buffering_time(MMHandleType hplayer, int second);
811 int _mmplayer_set_runtime_buffering_mode(MMHandleType hplayer, MMPlayerBufferingMode mode, int second);
812 int _mmplayer_set_display_zoom(MMHandleType hplayer, float level, int x, int y);
813 int _mmplayer_get_display_zoom(MMHandleType hplayer, float *level, int *x, int *y);
814 int _mmplayer_set_video_hub_download_mode(MMHandleType hplayer, bool mode);
815 int _mmplayer_use_system_clock (MMHandleType hplayer);
816 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);
817 int _mmplayer_get_video_share_master_clock(MMHandleType hplayer, long long *video_time, long long *media_clock, long long *audio_time);
818 int _mmplayer_get_video_rotate_angle(MMHandleType hplayer, int *angle);
819 int _mmplayer_enable_sync_handler(MMHandleType hplayer, bool enable);
820 int _mmplayer_set_uri(MMHandleType hplayer, const char* uri);
821 int _mmplayer_set_next_uri(MMHandleType hplayer, const char* uri, bool is_first_path);
822 int _mmplayer_get_next_uri(MMHandleType hplayer, char** uri);
823 int _mmplayer_has_closed_caption(MMHandleType hplayer, bool* exist);
824 int _mmplayer_enable_media_packet_video_stream(MMHandleType hplayer, bool enable);
825 void * _mm_player_media_packet_video_stream_internal_buffer_ref(void *buffer);
826 void _mm_player_media_packet_video_stream_internal_buffer_unref(void *buffer);
827 int _mmplayer_set_pcm_spec(MMHandleType hplayer, int samplerate, int channel);
833 #endif /* __MM_PLAYER_PRIV_H__ */