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 ========================================================================================== */
37 #include "mm_player.h"
38 #include "mm_player_internal.h"
39 #include "mm_player_audioeffect.h"
40 #include "mm_message.h"
41 #include "mm_player_ini.h"
42 #include "mm_player_asm.h"
43 #include "mm_player_pd.h"
44 #include "mm_player_streaming.h"
46 /*===========================================================================================
48 | GLOBAL DEFINITIONS AND DECLARATIONS FOR MODULE |
50 ========================================================================================== */
52 /*---------------------------------------------------------------------------
54 ---------------------------------------------------------------------------*/
56 #define MM_PLAYER_IMGB_MPLANE_MAX 4
57 #define MM_PLAYER_STREAM_COUNT_MAX 3
59 #define MM_PLAYER_CAST(x_player) ((mm_player_t *)(x_player))
61 * @x_player: MMHandleType of player
63 * Get the PD downloader of this player.
65 #define MM_PLAYER_GET_PD(x_player) (MM_PLAYER_CAST(x_player)->pd_downloader)
67 * @x_player: MMHandleType of player
69 * Get the attributes handle of this player.
71 #define MM_PLAYER_GET_ATTRS(x_player) (MM_PLAYER_CAST(x_player)->attrs)
73 /*---------------------------------------------------------------------------
74 | GLOBAL CONSTANT DEFINITIONS: |
75 ---------------------------------------------------------------------------*/
78 TAG_AUDIO_CODEC = 0x0001,
79 TAG_VIDEO_CODEC = 0x0002,
84 TAG_COPYRIGHT = 0x0040,
86 TAG_DESCRIPTION = 0x0100,
87 TAG_TRACK_NUMBER = 0x0200
90 enum content_attr_flag
92 ATTR_MISSING_ONLY = 0x0001,
93 ATTR_DURATION = 0x0002,
96 ATTR_BITRATE = 0x0010,
100 /* async mode makes trouble. alsasink sometimes fails to pause. */
109 * Enumerations of Player Mode
112 MM_PLAYER_MODE_NONE, /**< Player mode None */
113 MM_PLAYER_MODE_MIDI, /**< Player mode Midi */
114 MM_PLAYER_MODE_GST, /**< Player mode Gstreamer */
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_HLS, /**< Player URI type http live streaming */
132 MM_PLAYER_URI_TYPE_SS, /**< Player URI type Smooth streaming */
133 MM_PLAYER_URI_TYPE_DASH, /**< Player URI type Mpeg Dash */
134 MM_PLAYER_URI_TYPE_NO_PERMISSION,/**< Player URI type No Permission */
135 MM_PLAYER_URI_TYPE_TEMP, /**< Player URI type Temp */
138 typedef enum _MissingCodec
140 MISSING_PLUGIN_NONE = 0x00,
141 MISSING_PLUGIN_AUDIO = 0x01,
142 MISSING_PLUGIN_VIDEO = 0x02
146 typedef enum _FoundCodec
148 FOUND_PLUGIN_NONE = 0x00,
149 FOUND_PLUGIN_AUDIO = 0x01,
150 FOUND_PLUGIN_VIDEO = 0x02
155 MMPLAYER_DISPLAY_STATUS_NULL = 0,
156 MMPLAYER_DISPLAY_STATUS_HDMI_ACTIVE,
157 MMPLAYER_DISPLAY_STATUS_UNKNOWN_ACTIVE,
158 }MMPlayerDisplayStatus;
161 * Enumeration of signal type
164 MM_PLAYER_SIGNAL_TYPE_AUTOPLUG = 0,
165 MM_PLAYER_SIGNAL_TYPE_VIDEOBIN,
166 MM_PLAYER_SIGNAL_TYPE_AUDIOBIN,
167 MM_PLAYER_SIGNAL_TYPE_TEXTBIN,
168 MM_PLAYER_SIGNAL_TYPE_OTHERS,
169 MM_PLAYER_SIGNAL_TYPE_ALL,
170 MM_PLAYER_SIGNAL_TYPE_MAX = MM_PLAYER_SIGNAL_TYPE_ALL,
173 /* main pipeline's element id */
176 MMPLAYER_M_PIPE = 0, /* NOTE : MMPLAYER_M_PIPE should be zero */
180 /* it could be a decodebin or could be a typefind. depends on player ini */
184 /* NOTE : we need two fakesink to autoplug without decodebin.
185 * first one will hold whole pipeline state. and second one will hold state of
186 * a sink-decodebin for an elementary stream. no metter if there's more then one
187 * elementary streams because MSL reuse it.
189 MMPLAYER_M_SRC_FAKESINK,
190 MMPLAYER_M_SRC_2ND_FAKESINK,
192 /* streaming plugin */
193 MMPLAYER_M_MUXED_S_BUFFER,
194 MMPLAYER_M_DEMUXED_S_BUFFER,
197 /* FIXIT : if there's really no usage for following IDs. remove it */
204 MMPLAYER_M_V_INPUT_SELECTOR, // video input_select // not yet
205 MMPLAYER_M_A_INPUT_SELECTOR, // audio input_select
206 MMPLAYER_M_T_INPUT_SELECTOR, // text input_select
207 MMPLAYER_M_T_SUBMUX_EXTERNAL,
208 MMPLAYER_M_T_SUBMUX_INTERNAL,
214 MMPLAYER_M_A_DEINTERLEAVE,
215 MMPLAYER_M_A_SELECTOR,
219 /* audio pipeline's element id */
222 MMPLAYER_A_BIN = 0, /* NOTE : MMPLAYER_A_BIN should be zero */
227 MMPLAYER_A_FILTER_SEC,
229 MMPLAYER_A_CAPS_DEFAULT,
231 MMPLAYER_A_RESAMPLER,
235 /* video pipeline's element id */
238 MMPLAYER_V_BIN = 0, /* NOTE : MMPLAYER_V_BIN should be zero */
247 /* text pipeline's element id */
250 MMPLAYER_T_BIN = 0, /* NOTE : MMPLAYER_V_BIN should be zero */
251 MMPLAYER_T_TEXT_FAKE_QUEUE,
252 MMPLAYER_T_TEXT_QUEUE,
253 MMPLAYER_T_VIDEO_QUEUE,
254 MMPLAYER_T_VIDEO_CONVERTER,
256 MMPLAYER_T_FAKE_SINK,
257 MMPLAYER_T_VIDEO_SINK,
260 MMPLAYER_T_CAPSFILTER,
261 MMPLAYER_T_TEXT_FAKE_IDENTITY,
262 MMPLAYER_T_TEXT_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;
414 /* image buffer definition ***************************************************
416 +------------------------------------------+ ---
419 | +---------------------------+ --- | |
421 | |<---------- w[] ---------->| | | |
429 | +---------------------------+ --- | |
431 +------------------------------------------+ ---
433 |<----------------- s[] ------------------>|
437 /* width of each image plane */
438 int w[MM_PLAYER_IMGB_MPLANE_MAX];
439 /* height of each image plane */
440 int h[MM_PLAYER_IMGB_MPLANE_MAX];
441 /* stride of each image plane */
442 int s[MM_PLAYER_IMGB_MPLANE_MAX];
443 /* elevation of each image plane */
444 int e[MM_PLAYER_IMGB_MPLANE_MAX];
445 /* user space address of each image plane */
446 void *a[MM_PLAYER_IMGB_MPLANE_MAX];
447 /* physical address of each image plane, if needs */
448 void *p[MM_PLAYER_IMGB_MPLANE_MAX];
449 /* color space type of image */
451 /* left postion, if needs */
453 /* top position, if needs */
455 /* to align memory */
459 /* dmabuf or ion fd */
460 int fd[MM_PLAYER_IMGB_MPLANE_MAX];
461 /* flag for buffer share */
462 int buf_share_method;
467 /* Tizen buffer object of each image plane */
468 void *bo[MM_PLAYER_IMGB_MPLANE_MAX];
475 } MMPlayerMPlaneImage;
478 gint active_pad_index;
479 gint total_track_num;
481 } mm_player_selector_t;
483 /* Things needed to be done after output device has changed */
487 gboolean need_pause_and_resume;
489 guint required_cb_score;
491 } mm_player_post_proc_t;
495 int state; // player current state
496 int prev_state; // player previous state
497 int pending_state; // player state which is going to now
498 int target_state; // player state which user want to go to
499 guint state_change_timeout;
501 gboolean section_repeat;
502 gint section_repeat_start;
503 gint section_repeat_end;
512 GMutex* playback_lock;
514 /* repeat thread lock */
515 GCond* repeat_thread_cond;
516 GMutex* repeat_thread_mutex;
517 GThread* repeat_thread;
518 gboolean repeat_thread_exit;
520 /* next play thread */
521 GThread* next_play_thread;
522 gboolean next_play_thread_exit;
523 GCond* next_play_thread_cond;
524 GMutex* next_play_thread_mutex;
527 GThread* capture_thread;
528 gboolean capture_thread_exit;
529 GCond* capture_thread_cond;
530 GMutex* capture_thread_mutex;
531 MMPlayerVideoCapture capture;
532 MMPlayerVideoColorspace video_cs;
533 MMPlayerMPlaneImage captured;
535 /* fakesink handling lock */
538 /* player attributes */
541 /* message callback */
542 MMMessageCallback msg_cb;
546 /* progressive download */
547 mm_player_pd_t *pd_downloader;
548 gchar *pd_file_save_path;
549 MMPlayerPDMode pd_mode;
551 /* streaming player */
552 mm_player_streaming_t *streamer;
554 /* gstreamer pipeline */
555 MMPlayerGstPipelineInfo *pipeline;
558 GstPad *ghost_pad_for_videobin;
560 /* buffering support cbs*/
561 mm_player_buffer_need_data_callback need_data_cb;
562 mm_player_buffer_enough_data_callback enough_data_cb;
563 mm_player_buffer_seek_data_callback seek_data_cb;
565 void* buffer_cb_user_param;
567 /* video stream callback */
568 mm_player_video_stream_callback video_stream_cb;
569 void* video_stream_cb_user_param;
570 int use_video_stream;
572 /* audio stram callback */
573 mm_player_audio_stream_callback audio_stream_cb;
574 void* audio_stream_cb_user_param;
576 /* video capture callback*/
577 gulong video_capture_cb_probe_id;
579 /* video frame render error callback */
580 mm_player_video_frame_render_error_callback video_frame_render_error_cb;
581 void* video_frame_render_error_cb_user_param;
584 MMPlayerSoundInfo sound;
589 /* video stream caps parsed by demuxer */
590 GstCaps* v_stream_caps;
592 /* audio effect infomation */
593 MMAudioEffectInfo audio_effect_info;
594 gboolean bypass_audio_effect;
596 gulong audio_cb_probe_id;
597 gulong video_cb_probe_id;
602 /* content profile */
603 MMPlayerParseProfile profile;
605 /* streaming service type */
606 MMStreamingType streaming_type;
610 gboolean have_dynamic_pad;
611 GList* parsers; // list of linked parser name
612 GList* audio_decoders; // list of linked audio name
613 gboolean no_more_pad;
614 gint num_dynamic_pad;
615 gboolean has_many_types;
617 /* progress callback timer */
618 /* FIXIT : since duplicated functionality with get_position
619 * this function will be deprecated after fixing all application
620 * which are using it.
622 guint progress_timer;
624 /* timer for sending delayed EOS */
627 /* last point (msec) that player is paused or seeking */
628 gint64 last_position;
633 /* data size of http streaming */
634 guint64 http_content_size;
637 gchar last_error_msg[1024]; /* FIXIT : should it be dynamic ? */
639 gboolean needed_v_parser;
640 gboolean smooth_streaming;
642 gint videodec_linked;
643 gint audiodec_linked;
644 gint videosink_linked;
645 gint audiosink_linked;
646 gint textsink_linked;
648 /* missing plugin during autoplugging */
649 MissingCodec not_supported_codec;
651 /*unlinked audio/video mime type */
652 gchar *unlinked_video_mime;
653 gchar *unlinked_audio_mime;
654 gchar *unlinked_demuxer_mime;
656 /* found codec during autoplugging */
657 FoundCodec can_support_codec;
659 gboolean not_found_demuxer;
661 /* support seek even though player is not start */
662 MMPlayerPendingSeek pending_seek;
666 /* prevent to post msg over and over */
669 /* list of sink elements */
670 GList* sink_elements;
672 /* signal notifiers */
673 GList* signals[MM_PLAYER_SIGNAL_TYPE_MAX];
675 MMPlayerGMainContext context;
676 MMPlayerUriList uri_info;
678 gboolean is_sound_extraction;
680 gfloat playback_rate;
682 /* player state resumed by fast rewind */
683 gboolean resumed_by_rewind;
685 gboolean is_nv12_tiled;
686 gboolean is_drm_file;
690 gboolean is_subtitle_off;
691 gboolean is_external_subtitle_present;
693 /* contents bitrate for buffering management */
694 guint bitrate[MM_PLAYER_STREAM_COUNT_MAX];
696 guint updated_bitrate_count;
697 guint maximum_bitrate[MM_PLAYER_STREAM_COUNT_MAX];
698 guint total_maximum_bitrate;
699 guint updated_maximum_bitrate_count;
701 /* prevent it from posting duplicatly*/
704 /* timeout source for lazy pause */
705 guint lazy_pause_event_id;
706 guint resume_event_id;
707 guint resumable_cancel_id;
709 gboolean keep_detecting_vcodec;
711 gboolean play_subtitle;
712 gboolean use_textoverlay;
713 MMPlayerDisplayStatus display_stat;
714 gboolean is_subtitle_force_drop; // set TRUE after bus_cb get EOS
716 /* PD downloader message callback and param */
717 MMMessageCallback pd_msg_cb;
718 void* pd_msg_cb_param;
720 /* adjust subtitle position store */
721 gint64 adjust_subtitle_pos;
722 GList *subtitle_language_list;
724 /* To store the current multiwindow status */
725 gboolean last_multiwin_status;
727 /* To store the current running audio pad index of demuxer */
728 gint demux_pad_index;
730 mm_player_selector_t selector[MM_PLAYER_TRACK_TYPE_MAX];
731 mm_player_selector_t audio_mode;
732 gboolean use_deinterleave;
733 guint max_audio_channels;
735 guint internal_text_idx;
736 guint external_text_idx;
738 MMPlayerSetMode set_mode;
741 gboolean use_decodebin;
743 /* initialize values */
746 /* check to use h/w codec */
747 GstCaps* state_tune_caps;
748 gboolean ignore_asyncdone;
750 /* video share sync */
751 gint64 video_share_api_delta;
752 gint64 video_share_clock_delta;
754 /* subtitle option */
758 gboolean subtitle_ignore_markup;
760 /* just for native app (video hub) */
761 gboolean video_hub_download_mode;
762 gboolean sync_handler;
764 /* seamless next playing */
765 gboolean src_changed;
766 gboolean pp_rebuilding;
768 /* store dump pad list */
772 /* audio/video deivce change handling */
773 mm_player_post_proc_t post_proc;
775 /* whether a video has closed caption or not */
776 gboolean has_closed_caption;
778 GstElement *video_fakesink;
783 gchar *language_code;
791 gulong probe_handle_id;
792 FILE *dump_element_file;
795 /*===========================================================================================
797 | GLOBAL FUNCTION PROTOTYPES |
799 ========================================================================================== */
804 int _mmplayer_create_player(MMHandleType hplayer);
805 int _mmplayer_destroy(MMHandleType hplayer);
806 int _mmplayer_realize(MMHandleType hplayer);
807 int _mmplayer_unrealize(MMHandleType hplayer);
808 int _mmplayer_get_state(MMHandleType hplayer, int* pstate);
809 int _mmplayer_set_volume(MMHandleType hplayer, MMPlayerVolumeType volume);
810 int _mmplayer_get_volume(MMHandleType hplayer, MMPlayerVolumeType *volume);
811 int _mmplayer_set_mute(MMHandleType hplayer, int mute);
812 int _mmplayer_get_mute(MMHandleType hplayer, int* pmute);
813 int _mmplayer_start(MMHandleType hplayer);
814 int _mmplayer_stop(MMHandleType hplayer);
815 int _mmplayer_pause(MMHandleType hplayer);
816 int _mmplayer_resume(MMHandleType hplayer);
817 int _mmplayer_set_position(MMHandleType hplayer, int format, int pos);
818 int _mmplayer_get_position(MMHandleType hplayer, int format, unsigned long *pos);
819 int _mmplayer_adjust_subtitle_postion(MMHandleType hplayer, int format, int pos);
820 int _mmplayer_adjust_video_postion(MMHandleType hplayer,int offset);
821 int _mmplayer_activate_section_repeat(MMHandleType hplayer, unsigned long start, unsigned long end);
822 int _mmplayer_deactivate_section_repeat(MMHandleType hplayer);
823 int _mmplayer_push_buffer(MMHandleType hplayer, unsigned char *buf, int size);
824 int _mmplayer_set_buffer_need_data_cb(MMHandleType hplayer,mm_player_buffer_need_data_callback callback, void *user_param);
825 int _mmplayer_set_buffer_enough_data_cb(MMHandleType hplayer,mm_player_buffer_enough_data_callback callback, void *user_param);
826 int _mmplayer_set_buffer_seek_data_cb(MMHandleType hplayer,mm_player_buffer_seek_data_callback callback, void *user_param);
827 int _mmplayer_set_playspeed(MMHandleType hplayer, float rate);
828 int _mmplayer_set_playspeed_ex(MMHandleType hplayer, gdouble rate);
829 int _mmplayer_set_message_callback(MMHandleType hplayer, MMMessageCallback callback, void *user_param);
830 int _mmplayer_set_videostream_cb(MMHandleType hplayer,mm_player_video_stream_callback callback, void *user_param);
831 int _mmplayer_set_audiostream_cb(MMHandleType hplayer,mm_player_audio_stream_callback callback, void *user_param);
832 int _mmplayer_set_videoframe_render_error_cb(MMHandleType hplayer, mm_player_video_frame_render_error_callback callback, void *user_param);
833 int _mmplayer_set_subtitle_silent (MMHandleType hplayer, int silent);
834 int _mmplayer_get_subtitle_silent (MMHandleType hplayer, int* silent);
835 int _mmplayer_set_external_subtitle_path(MMHandleType hplayer, const char* filepath);
836 int _mmplayer_set_external_subtitle_font(MMHandleType hplayer, char *font_desc);
837 int _mmplayer_set_external_subtitle_font_color(MMHandleType hplayer, unsigned int font_color, unsigned int font_bg_color);
838 int _mmplayer_external_subtitle_ignore_markup_tags(MMHandleType hplayer, bool ignore_markup);
839 int _mmplayer_external_subtitle_set_alignment_in_line(MMHandleType hplayer, unsigned int alignment);
840 int _mmplayer_external_subtitle_set_alignment_horizontal(MMHandleType hplayer, unsigned int alignment);
841 int _mmplayer_external_subtitle_apply_alignment_right_away(MMHandleType hplayer);
842 int _mmplayer_set_external_subtitle_edge(MMHandleType hplayer, MMPlayerSubtitleEdge edge_mode);
843 int _mmplayer_get_buffer_position(MMHandleType hplayer, int format, unsigned long* start_pos, unsigned long* stop_pos);
844 int _mmplayer_keep_external_video_fullscreen(MMHandleType hplayer);
846 /* test API for tuning audio gain. this API should be
847 * deprecated before the day of final release
849 int _mmplayer_set_volume_tune(MMHandleType hplayer, MMPlayerVolumeType volume);
850 int _mmplayer_update_video_param(mm_player_t* player);
851 int _mmplayer_set_audiobuffer_cb(MMHandleType hplayer, mm_player_audio_stream_callback callback, void *user_param);
852 int _mmplayer_change_videosink(MMHandleType handle, MMDisplaySurfaceType surface_type, void *display_overlay);
853 int _mmplayer_audio_effect_custom_apply(mm_player_t *player);
855 gboolean __mmplayer_post_message(mm_player_t* player, enum MMMessageType msgtype, MMMessageParamType* param);
856 gboolean __mmplayer_is_streaming(mm_player_t* player);
859 int _mmplayer_gst_set_audio_channel(MMHandleType hplayer, MMPlayerAudioChannel ch_idx);
860 int _mmplayer_change_track_language (MMHandleType hplayer, MMPlayerTrackType type, int index);
861 int _mmplayer_sync_subtitle_pipeline(mm_player_t* player);
862 int _mmplayer_set_prepare_buffering_time(MMHandleType hplayer, int second);
863 int _mmplayer_set_runtime_buffering_mode(MMHandleType hplayer, MMPlayerBufferingMode mode, int second);
864 int _mmplayer_set_display_zoom(MMHandleType hplayer, float level, int x, int y);
865 int _mmplayer_get_display_zoom(MMHandleType hplayer, float *level, int *x, int *y);
866 int _mmplayer_set_video_hub_download_mode(MMHandleType hplayer, bool mode);
867 int _mmplayer_use_system_clock (MMHandleType hplayer);
868 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);
869 int _mmplayer_get_video_share_master_clock(MMHandleType hplayer, long long *video_time, long long *media_clock, long long *audio_time);
870 int _mmplayer_get_video_rotate_angle(MMHandleType hplayer, int *angle);
871 int _mmplayer_enable_sync_handler(MMHandleType hplayer, bool enable);
872 int _mmplayer_set_uri(MMHandleType hplayer, const char* uri);
873 int _mmplayer_set_next_uri(MMHandleType hplayer, const char* uri, bool is_first_path);
874 int _mmplayer_get_next_uri(MMHandleType hplayer, char** uri);
875 int _mmplayer_has_closed_caption(MMHandleType hplayer, bool* exist);
876 int _mmplayer_enable_media_packet_video_stream(MMHandleType hplayer, bool enable);
881 #endif /* __MM_PLAYER_PRIV_H__ */