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 AUDIO_LATENCY_MODE_LOW = 0, /**< Low audio latency mode */
83 AUDIO_LATENCY_MODE_MID, /**< Middle audio latency mode */
84 AUDIO_LATENCY_MODE_HIGH, /**< High audio latency mode */
89 TAG_AUDIO_CODEC = 0x0001,
90 TAG_VIDEO_CODEC = 0x0002,
95 TAG_COPYRIGHT = 0x0040,
97 TAG_DESCRIPTION = 0x0100,
98 TAG_TRACK_NUMBER = 0x0200
101 enum content_attr_flag
103 ATTR_MISSING_ONLY = 0x0001,
104 ATTR_DURATION = 0x0002,
107 ATTR_BITRATE = 0x0010,
111 /* async mode makes trouble. alsasink sometimes fails to pause. */
119 * Enumerations of Player Uri type
121 enum MMPlayerUriType {
122 MM_PLAYER_URI_TYPE_NONE, /**< Player URI type None */
123 MM_PLAYER_URI_TYPE_URL_RTSP, /**< Player URI type RTSP */
124 MM_PLAYER_URI_TYPE_URL_WFD, /**< Player URI type WFD */
125 MM_PLAYER_URI_TYPE_URL_HTTP,/**< Player URI type HTTP */
126 MM_PLAYER_URI_TYPE_URL_MMS,/**< Player URI type MMS */
127 MM_PLAYER_URI_TYPE_MEM, /**< Player URI type Mem */
128 MM_PLAYER_URI_TYPE_FILE, /**< Player URI type File */
129 MM_PLAYER_URI_TYPE_URL, /**< Player URI type URL */
130 MM_PLAYER_URI_TYPE_BUFF, /**< Player URI type Buffer */
131 MM_PLAYER_URI_TYPE_ES_BUFF, /**< Player URI type ES Buffer */
132 MM_PLAYER_URI_TYPE_HLS, /**< Player URI type http live streaming */
133 MM_PLAYER_URI_TYPE_SS, /**< Player URI type Smooth streaming */
134 MM_PLAYER_URI_TYPE_DASH, /**< Player URI type Mpeg Dash */
135 MM_PLAYER_URI_TYPE_NO_PERMISSION,/**< Player URI type No Permission */
136 MM_PLAYER_URI_TYPE_TEMP, /**< Player URI type Temp */
139 typedef enum _MissingCodec
141 MISSING_PLUGIN_NONE = 0x00,
142 MISSING_PLUGIN_AUDIO = 0x01,
143 MISSING_PLUGIN_VIDEO = 0x02
147 typedef enum _FoundCodec
149 FOUND_PLUGIN_NONE = 0x00,
150 FOUND_PLUGIN_AUDIO = 0x01,
151 FOUND_PLUGIN_VIDEO = 0x02
155 * Enumeration of signal type
158 MM_PLAYER_SIGNAL_TYPE_AUTOPLUG = 0,
159 MM_PLAYER_SIGNAL_TYPE_VIDEOBIN,
160 MM_PLAYER_SIGNAL_TYPE_AUDIOBIN,
161 MM_PLAYER_SIGNAL_TYPE_TEXTBIN,
162 MM_PLAYER_SIGNAL_TYPE_OTHERS,
163 MM_PLAYER_SIGNAL_TYPE_ALL,
164 MM_PLAYER_SIGNAL_TYPE_MAX = MM_PLAYER_SIGNAL_TYPE_ALL,
167 /* main pipeline's element id */
170 MMPLAYER_M_PIPE = 0, /* NOTE : MMPLAYER_M_PIPE should be zero */
172 MMPLAYER_M_2ND_SRC, /* 2nd Source Element for es buff src */
175 /* it could be a decodebin or could be a typefind. depends on player ini */
179 MMPLAYER_M_AUTOPLUG_V_DEC,
180 MMPLAYER_M_AUTOPLUG_A_DEC,
182 /* NOTE : we need two fakesink to autoplug without decodebin.
183 * first one will hold whole pipeline state. and second one will hold state of
184 * a sink-decodebin for an elementary stream. no metter if there's more then one
185 * elementary streams because MSL reuse it.
187 MMPLAYER_M_SRC_FAKESINK,
188 MMPLAYER_M_SRC_2ND_FAKESINK,
190 /* streaming plugin */
191 MMPLAYER_M_MUXED_S_BUFFER,
192 MMPLAYER_M_DEMUXED_S_BUFFER,
195 /* es buff src queue */
200 /* FIXIT : if there's really no usage for following IDs. remove it */
208 MMPLAYER_M_A_INPUT_SELECTOR, // audio input_select
209 MMPLAYER_M_T_INPUT_SELECTOR, // text input_select
215 MMPLAYER_M_A_DEINTERLEAVE,
216 MMPLAYER_M_A_SELECTOR,
221 /* audio pipeline's element id */
224 MMPLAYER_A_BIN = 0, /* NOTE : MMPLAYER_A_BIN should be zero */
229 MMPLAYER_A_FILTER_SEC,
231 MMPLAYER_A_CAPS_DEFAULT,
233 MMPLAYER_A_RESAMPLER,
234 MMPLAYER_A_DEINTERLEAVE,
238 /* video pipeline's element id */
241 MMPLAYER_V_BIN = 0, /* NOTE : MMPLAYER_V_BIN should be zero */
250 /* text pipeline's element id */
253 MMPLAYER_T_BIN = 0, /* NOTE : MMPLAYER_V_BIN should be zero */
255 MMPLAYER_T_VIDEO_QUEUE,
256 MMPLAYER_T_VIDEO_CONVERTER,
258 MMPLAYER_T_FAKE_SINK,
263 /* midi main pipeline's element id */
267 MMPLAYER_MIDI_PLAYER,
271 enum PlayerCommandState
273 MMPLAYER_COMMAND_NONE,
274 MMPLAYER_COMMAND_CREATE,
275 MMPLAYER_COMMAND_DESTROY,
276 MMPLAYER_COMMAND_UNREALIZE,
277 MMPLAYER_COMMAND_START,
278 MMPLAYER_COMMAND_REALIZE,
279 MMPLAYER_COMMAND_STOP,
280 MMPLAYER_COMMAND_PAUSE,
281 MMPLAYER_COMMAND_RESUME,
285 /* Note : StreamingSrcError is error enum for streaming source which post error message
286 * using custom message made by itself. The enum value must start with zero,
287 * because the streaming source(secrtspsrc) also does.
289 enum StreamingSrcError
291 MMPLAYER_STREAMING_ERROR_NONE = 0,
292 MMPLAYER_STREAMING_ERROR_UNSUPPORTED_AUDIO,
293 MMPLAYER_STREAMING_ERROR_UNSUPPORTED_VIDEO,
294 MMPLAYER_STREAMING_ERROR_CONNECTION_FAIL,
295 MMPLAYER_STREAMING_ERROR_DNS_FAIL,
296 MMPLAYER_STREAMING_ERROR_SERVER_DISCONNECTED,
297 MMPLAYER_STREAMING_ERROR_BAD_SERVER,
298 MMPLAYER_STREAMING_ERROR_INVALID_PROTOCOL,
299 MMPLAYER_STREAMING_ERROR_INVALID_URL,
300 MMPLAYER_STREAMING_ERROR_UNEXPECTED_MSG,
301 MMPLAYER_STREAMING_ERROR_OUT_OF_MEMORIES,
302 MMPLAYER_STREAMING_ERROR_RTSP_TIMEOUT,
303 MMPLAYER_STREAMING_ERROR_BAD_REQUEST,
304 MMPLAYER_STREAMING_ERROR_NOT_AUTHORIZED,
305 MMPLAYER_STREAMING_ERROR_PAYMENT_REQUIRED,
306 MMPLAYER_STREAMING_ERROR_FORBIDDEN,
307 MMPLAYER_STREAMING_ERROR_CONTENT_NOT_FOUND,
308 MMPLAYER_STREAMING_ERROR_METHOD_NOT_ALLOWED,
309 MMPLAYER_STREAMING_ERROR_NOT_ACCEPTABLE,
310 MMPLAYER_STREAMING_ERROR_PROXY_AUTHENTICATION_REQUIRED,
311 MMPLAYER_STREAMING_ERROR_SERVER_TIMEOUT,
312 MMPLAYER_STREAMING_ERROR_GONE,
313 MMPLAYER_STREAMING_ERROR_LENGTH_REQUIRED,
314 MMPLAYER_STREAMING_ERROR_PRECONDITION_FAILED,
315 MMPLAYER_STREAMING_ERROR_REQUEST_ENTITY_TOO_LARGE,
316 MMPLAYER_STREAMING_ERROR_REQUEST_URI_TOO_LARGE,
317 MMPLAYER_STREAMING_ERROR_UNSUPPORTED_MEDIA_TYPE,
318 MMPLAYER_STREAMING_ERROR_PARAMETER_NOT_UNDERSTOOD,
319 MMPLAYER_STREAMING_ERROR_CONFERENCE_NOT_FOUND,
320 MMPLAYER_STREAMING_ERROR_NOT_ENOUGH_BANDWIDTH,
321 MMPLAYER_STREAMING_ERROR_NO_SESSION_ID,
322 MMPLAYER_STREAMING_ERROR_METHOD_NOT_VALID_IN_THIS_STATE,
323 MMPLAYER_STREAMING_ERROR_HEADER_FIELD_NOT_VALID_FOR_SOURCE,
324 MMPLAYER_STREAMING_ERROR_INVALID_RANGE,
325 MMPLAYER_STREAMING_ERROR_PARAMETER_IS_READONLY,
326 MMPLAYER_STREAMING_ERROR_AGGREGATE_OP_NOT_ALLOWED,
327 MMPLAYER_STREAMING_ERROR_ONLY_AGGREGATE_OP_ALLOWED,
328 MMPLAYER_STREAMING_ERROR_BAD_TRANSPORT,
329 MMPLAYER_STREAMING_ERROR_DESTINATION_UNREACHABLE,
330 MMPLAYER_STREAMING_ERROR_INTERNAL_SERVER_ERROR,
331 MMPLAYER_STREAMING_ERROR_NOT_IMPLEMENTED,
332 MMPLAYER_STREAMING_ERROR_BAD_GATEWAY,
333 MMPLAYER_STREAMING_ERROR_SERVICE_UNAVAILABLE,
334 MMPLAYER_STREAMING_ERROR_GATEWAY_TIME_OUT ,
335 MMPLAYER_STREAMING_ERROR_RTSP_VERSION_NOT_SUPPORTED,
336 MMPLAYER_STREAMING_ERROR_OPTION_NOT_SUPPORTED,
339 /*---------------------------------------------------------------------------
340 | GLOBAL DATA TYPE DEFINITIONS: |
341 ---------------------------------------------------------------------------*/
347 } MMPlayerGstElement;
351 GstTagList *tag_list;
352 MMPlayerGstElement *mainbin;
353 MMPlayerGstElement *audiobin;
354 MMPlayerGstElement *videobin;
355 MMPlayerGstElement *textbin;
356 } MMPlayerGstPipelineInfo;
362 int bluetooth; /* enable/disable */
370 } tBuffer; /* FIXIT : choose better name */
377 char uri[MM_MAX_URL_LEN];
378 char urgent[MM_MAX_FILENAME_LEN];
379 } MMPlayerParseProfile;
383 MMPlayerPosFormatType format;
385 }MMPlayerPendingSeek;
390 } MMPlayerSignalItem;
396 bool video_zc; // video zero-copy
398 bool media_packet_video_stream;
402 GMainContext *global_default;
403 GMainContext *thread_default;
404 }MMPlayerGMainContext;
412 gint active_pad_index;
413 gint total_track_num;
416 gulong event_probe_id;
417 } mm_player_selector_t;
419 /* Things needed to be done after output device has changed */
423 gboolean need_pause_and_resume;
425 guint required_cb_score;
427 } mm_player_post_proc_t;
432 gboolean stream_changed;
433 gboolean reconfigure;
435 GstClockTime next_pts; /* latest decoded buffer's pts+duration */
436 GstClockTime start_time; /* updated once get SEGMENT event */
438 gulong audio_data_probe_id;
439 } mm_player_gapless_t;
443 int state; // player current state
444 int prev_state; // player previous state
445 int pending_state; // player state which is going to now
446 int target_state; // player state which user want to go to
447 guint state_change_timeout;
449 gboolean section_repeat;
450 gint section_repeat_start;
451 gint section_repeat_end;
460 GMutex playback_lock;
462 /* repeat thread lock */
463 GCond repeat_thread_cond;
464 GMutex repeat_thread_mutex;
465 GThread* repeat_thread;
466 gboolean repeat_thread_exit;
468 /* next play thread */
469 GThread* next_play_thread;
470 gboolean next_play_thread_exit;
471 GCond next_play_thread_cond;
472 GMutex next_play_thread_mutex;
473 mm_player_gapless_t gapless;
476 GThread* capture_thread;
477 gboolean capture_thread_exit;
478 GCond capture_thread_cond;
479 GMutex capture_thread_mutex;
480 MMPlayerVideoCapture capture;
481 MMPlayerVideoColorspace video_cs;
482 MMVideoBuffer captured;
484 /* fakesink handling lock */
487 /* player attributes */
490 /* message callback */
491 MMMessageCallback msg_cb;
495 /* progressive download */
496 mm_player_pd_t *pd_downloader;
497 gchar *pd_file_save_path;
498 MMPlayerPDMode pd_mode;
500 /* streaming player */
501 mm_player_streaming_t *streamer;
503 /* gstreamer pipeline */
504 MMPlayerGstPipelineInfo *pipeline;
507 GstPad *ghost_pad_for_videobin;
509 guint64 media_stream_buffer_max_size[MM_PLAYER_STREAM_TYPE_MAX];
510 guint media_stream_buffer_min_percent[MM_PLAYER_STREAM_TYPE_MAX];
511 mm_player_media_stream_buffer_status_callback media_stream_buffer_status_cb[MM_PLAYER_STREAM_TYPE_MAX];
512 mm_player_media_stream_seek_data_callback media_stream_seek_data_cb[MM_PLAYER_STREAM_TYPE_MAX];
514 void* buffer_cb_user_param;
516 /* video stream changed callback */
517 mm_player_stream_changed_callback video_stream_changed_cb;
518 void* video_stream_changed_cb_user_param;
520 /* audio stream changed callback */
521 mm_player_stream_changed_callback audio_stream_changed_cb;
522 void* audio_stream_changed_cb_user_param;
524 /* video stream callback */
525 mm_player_video_stream_callback video_stream_cb;
526 void* video_stream_cb_user_param;
527 int use_video_stream;
529 /* audio stram callback */
530 mm_player_audio_stream_callback audio_stream_cb;
531 void* audio_stream_cb_user_param;
532 bool audio_stream_sink_sync;
534 /* audio buffer callback */
535 mm_player_audio_stream_callback_ex audio_stream_render_cb_ex;
537 /* video capture callback*/
538 gulong video_capture_cb_probe_id;
540 /* video frame render error callback */
541 mm_player_video_frame_render_error_callback video_frame_render_error_cb;
542 void* video_frame_render_error_cb_user_param;
545 MMPlayerSoundInfo sound;
550 /* video stream caps parsed by demuxer */
551 GstCaps* v_stream_caps;
553 /* audio effect infomation */
554 MMAudioEffectInfo audio_effect_info;
555 gboolean bypass_audio_effect;
557 gulong audio_cb_probe_id;
558 gulong video_cb_probe_id;
563 /* content profile */
564 MMPlayerParseProfile profile;
566 /* streaming service type */
567 MMStreamingType streaming_type;
571 gboolean have_dynamic_pad;
572 GList* parsers; // list of linked parser name
573 GList* audio_decoders; // list of linked audio name
574 gboolean no_more_pad;
575 gint num_dynamic_pad;
576 gboolean has_many_types;
578 /* progress callback timer */
579 /* FIXIT : since duplicated functionality with get_position
580 * this function will be deprecated after fixing all application
581 * which are using it.
583 guint progress_timer;
585 /* timer for sending delayed EOS */
588 /* last point (msec) that player is paused or seeking */
589 gint64 last_position;
594 /* data size of http streaming */
595 guint64 http_content_size;
598 gchar last_error_msg[1024]; /* FIXIT : should it be dynamic ? */
600 gboolean smooth_streaming;
602 gint videodec_linked;
603 gint audiodec_linked;
604 gint videosink_linked;
605 gint audiosink_linked;
606 gint textsink_linked;
608 /* missing plugin during autoplugging */
609 MissingCodec not_supported_codec;
611 /*unlinked audio/video mime type */
612 gchar *unlinked_video_mime;
613 gchar *unlinked_audio_mime;
614 gchar *unlinked_demuxer_mime;
616 /* found codec during autoplugging */
617 FoundCodec can_support_codec;
619 gboolean not_found_demuxer;
621 /* support seek even though player is not start */
622 MMPlayerPendingSeek pending_seek;
626 /* prevent to post msg over and over */
629 /* list of sink elements */
630 GList* sink_elements;
632 /* signal notifiers */
633 GList* signals[MM_PLAYER_SIGNAL_TYPE_MAX];
635 MMPlayerGMainContext context;
636 MMPlayerUriList uri_info;
638 gboolean is_sound_extraction;
640 gfloat playback_rate;
642 /* player state resumed by fast rewind */
643 gboolean resumed_by_rewind;
645 gboolean is_nv12_tiled;
646 gboolean is_drm_file;
650 gboolean is_subtitle_off;
651 gboolean is_external_subtitle_present;
653 /* contents bitrate for buffering management */
654 guint bitrate[MM_PLAYER_STREAM_COUNT_MAX];
656 guint updated_bitrate_count;
657 guint maximum_bitrate[MM_PLAYER_STREAM_COUNT_MAX];
658 guint total_maximum_bitrate;
659 guint updated_maximum_bitrate_count;
661 /* prevent it from posting duplicatly*/
664 /* timeout source for lazy pause */
665 guint lazy_pause_event_id;
666 guint resume_event_id;
667 guint resumable_cancel_id;
669 gboolean keep_detecting_vcodec;
671 gboolean play_subtitle;
672 gboolean use_textoverlay;
673 gboolean is_subtitle_force_drop; // set TRUE after bus_cb get EOS
675 /* PD downloader message callback and param */
676 MMMessageCallback pd_msg_cb;
677 void* pd_msg_cb_param;
679 /* adjust subtitle position store */
680 gint64 adjust_subtitle_pos;
681 GList *subtitle_language_list;
683 /* To store the current multiwindow status */
684 gboolean last_multiwin_status;
686 /* To store the current running audio pad index of demuxer */
687 gint demux_pad_index;
689 mm_player_selector_t selector[MM_PLAYER_TRACK_TYPE_MAX];
690 mm_player_selector_t audio_mode;
691 gboolean use_deinterleave;
692 guint max_audio_channels;
694 guint internal_text_idx;
695 guint external_text_idx;
697 MMPlayerSetMode set_mode;
700 gboolean use_decodebin;
702 /* initialize values */
705 /* check to use h/w codec */
706 GstCaps* state_tune_caps;
707 gboolean ignore_asyncdone;
709 /* video share sync */
710 gint64 video_share_api_delta;
711 gint64 video_share_clock_delta;
713 /* just for native app (video hub) */
714 gboolean video_hub_download_mode;
715 gboolean sync_handler;
717 /* store dump pad list */
721 /* audio/video deivce change handling */
722 mm_player_post_proc_t post_proc;
724 /* whether a video has closed caption or not */
725 gboolean has_closed_caption;
727 GstElement *video_fakesink;
729 /* audio stream caps parsed by demuxer or set by external demuxer */
730 GstCaps* a_stream_caps;
732 /* subtitle stream caps parsed by demuxer or set by external demuxer */
733 GstCaps* s_stream_caps;
735 /*es player using feed-data callback or calling app_src_push_buffer directly*/
736 gboolean es_player_push_mode;
738 /* tmb buffer manager for s/w codec tmb_bo */
747 gchar *language_code;
755 gulong probe_handle_id;
756 FILE *dump_element_file;
764 int valid_type; // validity type
765 int value_min; //<- set validity value range
769 /*===========================================================================================
771 | GLOBAL FUNCTION PROTOTYPES |
773 ========================================================================================== */
778 int _mmplayer_create_player(MMHandleType hplayer);
779 int _mmplayer_destroy(MMHandleType hplayer);
780 int _mmplayer_realize(MMHandleType hplayer);
781 int _mmplayer_unrealize(MMHandleType hplayer);
782 int _mmplayer_get_state(MMHandleType hplayer, int* pstate);
783 int _mmplayer_set_volume(MMHandleType hplayer, MMPlayerVolumeType volume);
784 int _mmplayer_get_volume(MMHandleType hplayer, MMPlayerVolumeType *volume);
785 int _mmplayer_set_mute(MMHandleType hplayer, int mute);
786 int _mmplayer_get_mute(MMHandleType hplayer, int* pmute);
787 int _mmplayer_start(MMHandleType hplayer);
788 int _mmplayer_stop(MMHandleType hplayer);
789 int _mmplayer_pause(MMHandleType hplayer);
790 int _mmplayer_resume(MMHandleType hplayer);
791 int _mmplayer_set_position(MMHandleType hplayer, int format, int pos);
792 int _mmplayer_get_position(MMHandleType hplayer, int format, unsigned long *pos);
793 int _mmplayer_adjust_subtitle_postion(MMHandleType hplayer, int format, int pos);
794 int _mmplayer_adjust_video_postion(MMHandleType hplayer,int offset);
795 int _mmplayer_activate_section_repeat(MMHandleType hplayer, unsigned long start, unsigned long end);
796 int _mmplayer_deactivate_section_repeat(MMHandleType hplayer);
797 int _mmplayer_push_buffer(MMHandleType hplayer, unsigned char *buf, int size);
798 int _mmplayer_set_playspeed(MMHandleType hplayer, float rate);
799 int _mmplayer_set_playspeed_ex(MMHandleType hplayer, gdouble rate);
800 int _mmplayer_set_message_callback(MMHandleType hplayer, MMMessageCallback callback, void *user_param);
801 int _mmplayer_set_videostream_changed_cb(MMHandleType hplayer, mm_player_stream_changed_callback callback, void *user_param);
802 int _mmplayer_set_audiostream_changed_cb(MMHandleType hplayer, mm_player_stream_changed_callback callback, void *user_param);
803 int _mmplayer_set_videostream_cb(MMHandleType hplayer,mm_player_video_stream_callback callback, void *user_param);
804 int _mmplayer_set_audiostream_cb(MMHandleType hplayer,mm_player_audio_stream_callback callback, void *user_param);
805 int _mmplayer_set_videoframe_render_error_cb(MMHandleType hplayer, mm_player_video_frame_render_error_callback callback, void *user_param);
806 int _mmplayer_set_subtitle_silent (MMHandleType hplayer, int silent);
807 int _mmplayer_get_subtitle_silent (MMHandleType hplayer, int* silent);
808 int _mmplayer_set_external_subtitle_path(MMHandleType hplayer, const char* filepath);
809 int _mmplayer_get_buffer_position(MMHandleType hplayer, int format, unsigned long* start_pos, unsigned long* stop_pos);
811 /* test API for tuning audio gain. this API should be
812 * deprecated before the day of final release
814 int _mmplayer_set_volume_tune(MMHandleType hplayer, MMPlayerVolumeType volume);
815 int _mmplayer_update_video_param(mm_player_t* player);
816 int _mmplayer_set_audiobuffer_cb(MMHandleType hplayer, mm_player_audio_stream_callback callback, void *user_param);
817 int _mmplayer_change_videosink(MMHandleType handle, MMDisplaySurfaceType surface_type, void *display_overlay);
818 int _mmplayer_audio_effect_custom_apply(mm_player_t *player);
820 int _mmplayer_set_audiostream_cb_ex(MMHandleType hplayer, bool sync, mm_player_audio_stream_callback_ex callback, void *user_param);
821 gboolean __mmplayer_post_message(mm_player_t* player, enum MMMessageType msgtype, MMMessageParamType* param);
822 gboolean __mmplayer_is_streaming(mm_player_t* player);
825 int _mmplayer_gst_set_audio_channel(MMHandleType hplayer, MMPlayerAudioChannel ch_idx);
826 int _mmplayer_change_track_language (MMHandleType hplayer, MMPlayerTrackType type, int index);
827 int _mmplayer_sync_subtitle_pipeline(mm_player_t* player);
828 int _mmplayer_set_prepare_buffering_time(MMHandleType hplayer, int second);
829 int _mmplayer_set_runtime_buffering_mode(MMHandleType hplayer, MMPlayerBufferingMode mode, int second);
830 int _mmplayer_set_display_zoom(MMHandleType hplayer, float level, int x, int y);
831 int _mmplayer_get_display_zoom(MMHandleType hplayer, float *level, int *x, int *y);
832 int _mmplayer_set_video_hub_download_mode(MMHandleType hplayer, bool mode);
833 int _mmplayer_use_system_clock (MMHandleType hplayer);
834 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);
835 int _mmplayer_get_video_share_master_clock(MMHandleType hplayer, long long *video_time, long long *media_clock, long long *audio_time);
836 int _mmplayer_get_video_rotate_angle(MMHandleType hplayer, int *angle);
837 int _mmplayer_enable_sync_handler(MMHandleType hplayer, bool enable);
838 int _mmplayer_set_uri(MMHandleType hplayer, const char* uri);
839 int _mmplayer_set_next_uri(MMHandleType hplayer, const char* uri, bool is_first_path);
840 int _mmplayer_get_next_uri(MMHandleType hplayer, char** uri);
841 int _mmplayer_has_closed_caption(MMHandleType hplayer, bool* exist);
842 int _mmplayer_enable_media_packet_video_stream(MMHandleType hplayer, bool enable);
843 void * _mm_player_media_packet_video_stream_internal_buffer_ref(void *buffer);
844 void _mm_player_media_packet_video_stream_internal_buffer_unref(void *buffer);
845 int _mmplayer_set_pcm_spec(MMHandleType hplayer, int samplerate, int channel);
846 int __mmplayer_gst_set_state (mm_player_t* player, GstElement * pipeline, GstState state, gboolean async, gint timeout );
847 int __mmplayer_set_state(mm_player_t* player, int state);
848 gboolean __mmplayer_gst_callback(GstBus *bus, GstMessage *msg, gpointer data);
849 int __mmplayer_check_state(mm_player_t* player, enum PlayerCommandState command);
850 gboolean __mmplayer_dump_pipeline_state( mm_player_t* player );
851 GstBusSyncReply __mmplayer_bus_sync_callback (GstBus * bus, GstMessage * message, gpointer data);
852 void __mmplayer_remove_g_source_from_context(GMainContext *context, guint source_id);
858 #endif /* __MM_PLAYER_PRIV_H__ */