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. */
112 * Enumerations of Player Uri type
114 enum MMPlayerUriType {
115 MM_PLAYER_URI_TYPE_NONE, /**< Player URI type None */
116 MM_PLAYER_URI_TYPE_URL_RTSP, /**< Player URI type RTSP */
117 MM_PLAYER_URI_TYPE_URL_WFD, /**< Player URI type WFD */
118 MM_PLAYER_URI_TYPE_URL_HTTP,/**< Player URI type HTTP */
119 MM_PLAYER_URI_TYPE_URL_MMS,/**< Player URI type MMS */
120 MM_PLAYER_URI_TYPE_MEM, /**< Player URI type Mem */
121 MM_PLAYER_URI_TYPE_FILE, /**< Player URI type File */
122 MM_PLAYER_URI_TYPE_URL, /**< Player URI type URL */
123 MM_PLAYER_URI_TYPE_BUFF, /**< Player URI type Buffer */
124 MM_PLAYER_URI_TYPE_ES_BUFF, /**< Player URI type ES Buffer */
125 MM_PLAYER_URI_TYPE_HLS, /**< Player URI type http live streaming */
126 MM_PLAYER_URI_TYPE_SS, /**< Player URI type Smooth streaming */
127 MM_PLAYER_URI_TYPE_DASH, /**< Player URI type Mpeg Dash */
128 MM_PLAYER_URI_TYPE_NO_PERMISSION,/**< Player URI type No Permission */
129 MM_PLAYER_URI_TYPE_TEMP, /**< Player URI type Temp */
132 typedef enum _MissingCodec
134 MISSING_PLUGIN_NONE = 0x00,
135 MISSING_PLUGIN_AUDIO = 0x01,
136 MISSING_PLUGIN_VIDEO = 0x02
140 typedef enum _FoundCodec
142 FOUND_PLUGIN_NONE = 0x00,
143 FOUND_PLUGIN_AUDIO = 0x01,
144 FOUND_PLUGIN_VIDEO = 0x02
148 * Enumeration of signal type
151 MM_PLAYER_SIGNAL_TYPE_AUTOPLUG = 0,
152 MM_PLAYER_SIGNAL_TYPE_VIDEOBIN,
153 MM_PLAYER_SIGNAL_TYPE_AUDIOBIN,
154 MM_PLAYER_SIGNAL_TYPE_TEXTBIN,
155 MM_PLAYER_SIGNAL_TYPE_OTHERS,
156 MM_PLAYER_SIGNAL_TYPE_ALL,
157 MM_PLAYER_SIGNAL_TYPE_MAX = MM_PLAYER_SIGNAL_TYPE_ALL,
160 /* main pipeline's element id */
163 MMPLAYER_M_PIPE = 0, /* NOTE : MMPLAYER_M_PIPE should be zero */
165 MMPLAYER_M_2ND_SRC, /* 2nd Source Element for es buff src */
168 /* it could be a decodebin or could be a typefind. depends on player ini */
172 MMPLAYER_M_AUTOPLUG_V_DEC,
173 MMPLAYER_M_AUTOPLUG_A_DEC,
175 /* NOTE : we need two fakesink to autoplug without decodebin.
176 * first one will hold whole pipeline state. and second one will hold state of
177 * a sink-decodebin for an elementary stream. no metter if there's more then one
178 * elementary streams because MSL reuse it.
180 MMPLAYER_M_SRC_FAKESINK,
181 MMPLAYER_M_SRC_2ND_FAKESINK,
183 /* streaming plugin */
184 MMPLAYER_M_MUXED_S_BUFFER,
185 MMPLAYER_M_DEMUXED_S_BUFFER,
188 /* es buff src queue */
193 /* FIXIT : if there's really no usage for following IDs. remove it */
201 MMPLAYER_M_A_INPUT_SELECTOR, // audio input_select
202 MMPLAYER_M_T_INPUT_SELECTOR, // text input_select
208 MMPLAYER_M_A_DEINTERLEAVE,
209 MMPLAYER_M_A_SELECTOR,
213 /* audio pipeline's element id */
216 MMPLAYER_A_BIN = 0, /* NOTE : MMPLAYER_A_BIN should be zero */
221 MMPLAYER_A_FILTER_SEC,
223 MMPLAYER_A_CAPS_DEFAULT,
225 MMPLAYER_A_RESAMPLER,
226 MMPLAYER_A_DEINTERLEAVE,
230 /* video pipeline's element id */
233 MMPLAYER_V_BIN = 0, /* NOTE : MMPLAYER_V_BIN should be zero */
242 /* text pipeline's element id */
245 MMPLAYER_T_BIN = 0, /* NOTE : MMPLAYER_V_BIN should be zero */
247 MMPLAYER_T_VIDEO_QUEUE,
248 MMPLAYER_T_VIDEO_CONVERTER,
250 MMPLAYER_T_FAKE_SINK,
255 /* midi main pipeline's element id */
259 MMPLAYER_MIDI_PLAYER,
263 enum PlayerCommandState
265 MMPLAYER_COMMAND_NONE,
266 MMPLAYER_COMMAND_CREATE,
267 MMPLAYER_COMMAND_DESTROY,
268 MMPLAYER_COMMAND_UNREALIZE,
269 MMPLAYER_COMMAND_START,
270 MMPLAYER_COMMAND_REALIZE,
271 MMPLAYER_COMMAND_STOP,
272 MMPLAYER_COMMAND_PAUSE,
273 MMPLAYER_COMMAND_RESUME,
277 /* Note : StreamingSrcError is error enum for streaming source which post error message
278 * using custom message made by itself. The enum value must start with zero,
279 * because the streaming source(secrtspsrc) also does.
281 enum StreamingSrcError
283 MMPLAYER_STREAMING_ERROR_NONE = 0,
284 MMPLAYER_STREAMING_ERROR_UNSUPPORTED_AUDIO,
285 MMPLAYER_STREAMING_ERROR_UNSUPPORTED_VIDEO,
286 MMPLAYER_STREAMING_ERROR_CONNECTION_FAIL,
287 MMPLAYER_STREAMING_ERROR_DNS_FAIL,
288 MMPLAYER_STREAMING_ERROR_SERVER_DISCONNECTED,
289 MMPLAYER_STREAMING_ERROR_BAD_SERVER,
290 MMPLAYER_STREAMING_ERROR_INVALID_PROTOCOL,
291 MMPLAYER_STREAMING_ERROR_INVALID_URL,
292 MMPLAYER_STREAMING_ERROR_UNEXPECTED_MSG,
293 MMPLAYER_STREAMING_ERROR_OUT_OF_MEMORIES,
294 MMPLAYER_STREAMING_ERROR_RTSP_TIMEOUT,
295 MMPLAYER_STREAMING_ERROR_BAD_REQUEST,
296 MMPLAYER_STREAMING_ERROR_NOT_AUTHORIZED,
297 MMPLAYER_STREAMING_ERROR_PAYMENT_REQUIRED,
298 MMPLAYER_STREAMING_ERROR_FORBIDDEN,
299 MMPLAYER_STREAMING_ERROR_CONTENT_NOT_FOUND,
300 MMPLAYER_STREAMING_ERROR_METHOD_NOT_ALLOWED,
301 MMPLAYER_STREAMING_ERROR_NOT_ACCEPTABLE,
302 MMPLAYER_STREAMING_ERROR_PROXY_AUTHENTICATION_REQUIRED,
303 MMPLAYER_STREAMING_ERROR_SERVER_TIMEOUT,
304 MMPLAYER_STREAMING_ERROR_GONE,
305 MMPLAYER_STREAMING_ERROR_LENGTH_REQUIRED,
306 MMPLAYER_STREAMING_ERROR_PRECONDITION_FAILED,
307 MMPLAYER_STREAMING_ERROR_REQUEST_ENTITY_TOO_LARGE,
308 MMPLAYER_STREAMING_ERROR_REQUEST_URI_TOO_LARGE,
309 MMPLAYER_STREAMING_ERROR_UNSUPPORTED_MEDIA_TYPE,
310 MMPLAYER_STREAMING_ERROR_PARAMETER_NOT_UNDERSTOOD,
311 MMPLAYER_STREAMING_ERROR_CONFERENCE_NOT_FOUND,
312 MMPLAYER_STREAMING_ERROR_NOT_ENOUGH_BANDWIDTH,
313 MMPLAYER_STREAMING_ERROR_NO_SESSION_ID,
314 MMPLAYER_STREAMING_ERROR_METHOD_NOT_VALID_IN_THIS_STATE,
315 MMPLAYER_STREAMING_ERROR_HEADER_FIELD_NOT_VALID_FOR_SOURCE,
316 MMPLAYER_STREAMING_ERROR_INVALID_RANGE,
317 MMPLAYER_STREAMING_ERROR_PARAMETER_IS_READONLY,
318 MMPLAYER_STREAMING_ERROR_AGGREGATE_OP_NOT_ALLOWED,
319 MMPLAYER_STREAMING_ERROR_ONLY_AGGREGATE_OP_ALLOWED,
320 MMPLAYER_STREAMING_ERROR_BAD_TRANSPORT,
321 MMPLAYER_STREAMING_ERROR_DESTINATION_UNREACHABLE,
322 MMPLAYER_STREAMING_ERROR_INTERNAL_SERVER_ERROR,
323 MMPLAYER_STREAMING_ERROR_NOT_IMPLEMENTED,
324 MMPLAYER_STREAMING_ERROR_BAD_GATEWAY,
325 MMPLAYER_STREAMING_ERROR_SERVICE_UNAVAILABLE,
326 MMPLAYER_STREAMING_ERROR_GATEWAY_TIME_OUT ,
327 MMPLAYER_STREAMING_ERROR_RTSP_VERSION_NOT_SUPPORTED,
328 MMPLAYER_STREAMING_ERROR_OPTION_NOT_SUPPORTED,
331 /*---------------------------------------------------------------------------
332 | GLOBAL DATA TYPE DEFINITIONS: |
333 ---------------------------------------------------------------------------*/
339 } MMPlayerGstElement;
343 GstTagList *tag_list;
344 MMPlayerGstElement *mainbin;
345 MMPlayerGstElement *audiobin;
346 MMPlayerGstElement *videobin;
347 MMPlayerGstElement *textbin;
348 } MMPlayerGstPipelineInfo;
354 int bluetooth; /* enable/disable */
362 } tBuffer; /* FIXIT : choose better name */
369 char uri[MM_MAX_URL_LEN];
370 char urgent[MM_MAX_FILENAME_LEN];
371 } MMPlayerParseProfile;
375 MMPlayerPosFormatType format;
377 }MMPlayerPendingSeek;
382 } MMPlayerSignalItem;
388 bool video_zc; // video zero-copy
390 bool media_packet_video_stream;
394 GMainContext *global_default;
395 GMainContext *thread_default;
396 }MMPlayerGMainContext;
404 gint active_pad_index;
405 gint total_track_num;
407 } mm_player_selector_t;
409 /* Things needed to be done after output device has changed */
413 gboolean need_pause_and_resume;
415 guint required_cb_score;
417 } mm_player_post_proc_t;
421 int state; // player current state
422 int prev_state; // player previous state
423 int pending_state; // player state which is going to now
424 int target_state; // player state which user want to go to
425 guint state_change_timeout;
427 gboolean section_repeat;
428 gint section_repeat_start;
429 gint section_repeat_end;
438 GMutex playback_lock;
440 /* repeat thread lock */
441 GCond repeat_thread_cond;
442 GMutex repeat_thread_mutex;
443 GThread* repeat_thread;
444 gboolean repeat_thread_exit;
446 /* next play thread */
447 GThread* next_play_thread;
448 gboolean next_play_thread_exit;
449 GCond next_play_thread_cond;
450 GMutex next_play_thread_mutex;
453 GThread* capture_thread;
454 gboolean capture_thread_exit;
455 GCond capture_thread_cond;
456 GMutex capture_thread_mutex;
457 MMPlayerVideoCapture capture;
458 MMPlayerVideoColorspace video_cs;
459 MMVideoBuffer captured;
461 /* fakesink handling lock */
464 /* player attributes */
467 /* message callback */
468 MMMessageCallback msg_cb;
472 /* progressive download */
473 mm_player_pd_t *pd_downloader;
474 gchar *pd_file_save_path;
475 MMPlayerPDMode pd_mode;
477 /* streaming player */
478 mm_player_streaming_t *streamer;
480 /* gstreamer pipeline */
481 MMPlayerGstPipelineInfo *pipeline;
484 GstPad *ghost_pad_for_videobin;
486 guint64 media_stream_buffer_max_size[MM_PLAYER_STREAM_TYPE_MAX];
487 guint media_stream_buffer_min_percent[MM_PLAYER_STREAM_TYPE_MAX];
488 mm_player_media_stream_buffer_status_callback media_stream_buffer_status_cb[MM_PLAYER_STREAM_TYPE_MAX];
489 mm_player_media_stream_seek_data_callback media_stream_seek_data_cb[MM_PLAYER_STREAM_TYPE_MAX];
491 void* buffer_cb_user_param;
493 /* video stream changed callback */
494 mm_player_stream_changed_callback video_stream_changed_cb;
495 void* video_stream_changed_cb_user_param;
497 /* audio stream changed callback */
498 mm_player_stream_changed_callback audio_stream_changed_cb;
499 void* audio_stream_changed_cb_user_param;
501 /* video stream callback */
502 mm_player_video_stream_callback video_stream_cb;
503 void* video_stream_cb_user_param;
504 int use_video_stream;
506 /* audio stram callback */
507 mm_player_audio_stream_callback audio_stream_cb;
508 void* audio_stream_cb_user_param;
509 bool audio_stream_sink_sync;
511 /* audio buffer callback */
512 mm_player_audio_stream_callback_ex audio_stream_render_cb_ex;
514 /* video capture callback*/
515 gulong video_capture_cb_probe_id;
517 /* video frame render error callback */
518 mm_player_video_frame_render_error_callback video_frame_render_error_cb;
519 void* video_frame_render_error_cb_user_param;
522 MMPlayerSoundInfo sound;
527 /* video stream caps parsed by demuxer */
528 GstCaps* v_stream_caps;
530 /* audio effect infomation */
531 MMAudioEffectInfo audio_effect_info;
532 gboolean bypass_audio_effect;
534 gulong audio_cb_probe_id;
535 gulong video_cb_probe_id;
540 /* content profile */
541 MMPlayerParseProfile profile;
543 /* streaming service type */
544 MMStreamingType streaming_type;
548 gboolean have_dynamic_pad;
549 GList* parsers; // list of linked parser name
550 GList* audio_decoders; // list of linked audio name
551 gboolean no_more_pad;
552 gint num_dynamic_pad;
553 gboolean has_many_types;
555 /* progress callback timer */
556 /* FIXIT : since duplicated functionality with get_position
557 * this function will be deprecated after fixing all application
558 * which are using it.
560 guint progress_timer;
562 /* timer for sending delayed EOS */
565 /* last point (msec) that player is paused or seeking */
566 gint64 last_position;
571 /* data size of http streaming */
572 guint64 http_content_size;
575 gchar last_error_msg[1024]; /* FIXIT : should it be dynamic ? */
577 gboolean smooth_streaming;
579 gint videodec_linked;
580 gint audiodec_linked;
581 gint videosink_linked;
582 gint audiosink_linked;
583 gint textsink_linked;
585 /* missing plugin during autoplugging */
586 MissingCodec not_supported_codec;
588 /*unlinked audio/video mime type */
589 gchar *unlinked_video_mime;
590 gchar *unlinked_audio_mime;
591 gchar *unlinked_demuxer_mime;
593 /* found codec during autoplugging */
594 FoundCodec can_support_codec;
596 gboolean not_found_demuxer;
598 /* support seek even though player is not start */
599 MMPlayerPendingSeek pending_seek;
603 /* prevent to post msg over and over */
606 /* list of sink elements */
607 GList* sink_elements;
609 /* signal notifiers */
610 GList* signals[MM_PLAYER_SIGNAL_TYPE_MAX];
612 MMPlayerGMainContext context;
613 MMPlayerUriList uri_info;
615 gboolean is_sound_extraction;
617 gfloat playback_rate;
619 /* player state resumed by fast rewind */
620 gboolean resumed_by_rewind;
622 gboolean is_nv12_tiled;
623 gboolean is_drm_file;
627 gboolean is_subtitle_off;
628 gboolean is_external_subtitle_present;
630 /* contents bitrate for buffering management */
631 guint bitrate[MM_PLAYER_STREAM_COUNT_MAX];
633 guint updated_bitrate_count;
634 guint maximum_bitrate[MM_PLAYER_STREAM_COUNT_MAX];
635 guint total_maximum_bitrate;
636 guint updated_maximum_bitrate_count;
638 /* prevent it from posting duplicatly*/
641 /* timeout source for lazy pause */
642 guint lazy_pause_event_id;
643 guint resume_event_id;
644 guint resumable_cancel_id;
646 gboolean keep_detecting_vcodec;
648 gboolean play_subtitle;
649 gboolean use_textoverlay;
650 gboolean is_subtitle_force_drop; // set TRUE after bus_cb get EOS
652 /* PD downloader message callback and param */
653 MMMessageCallback pd_msg_cb;
654 void* pd_msg_cb_param;
656 /* adjust subtitle position store */
657 gint64 adjust_subtitle_pos;
658 GList *subtitle_language_list;
660 /* To store the current multiwindow status */
661 gboolean last_multiwin_status;
663 /* To store the current running audio pad index of demuxer */
664 gint demux_pad_index;
666 mm_player_selector_t selector[MM_PLAYER_TRACK_TYPE_MAX];
667 mm_player_selector_t audio_mode;
668 gboolean use_deinterleave;
669 guint max_audio_channels;
671 guint internal_text_idx;
672 guint external_text_idx;
674 MMPlayerSetMode set_mode;
677 gboolean use_decodebin;
679 /* initialize values */
682 /* check to use h/w codec */
683 GstCaps* state_tune_caps;
684 gboolean ignore_asyncdone;
686 /* video share sync */
687 gint64 video_share_api_delta;
688 gint64 video_share_clock_delta;
690 /* just for native app (video hub) */
691 gboolean video_hub_download_mode;
692 gboolean sync_handler;
694 /* seamless next playing */
695 gboolean src_changed;
696 gboolean pp_rebuilding;
698 /* store dump pad list */
702 /* audio/video deivce change handling */
703 mm_player_post_proc_t post_proc;
705 /* whether a video has closed caption or not */
706 gboolean has_closed_caption;
708 GstElement *video_fakesink;
710 /* audio stream caps parsed by demuxer or set by external demuxer */
711 GstCaps* a_stream_caps;
713 /* subtitle stream caps parsed by demuxer or set by external demuxer */
714 GstCaps* s_stream_caps;
716 /*es player using feed-data callback or calling app_src_push_buffer directly*/
717 gboolean es_player_push_mode;
719 /* tmb buffer manager for s/w codec tmb_bo */
728 gchar *language_code;
736 gulong probe_handle_id;
737 FILE *dump_element_file;
740 /*===========================================================================================
742 | GLOBAL FUNCTION PROTOTYPES |
744 ========================================================================================== */
749 int _mmplayer_create_player(MMHandleType hplayer);
750 int _mmplayer_destroy(MMHandleType hplayer);
751 int _mmplayer_realize(MMHandleType hplayer);
752 int _mmplayer_unrealize(MMHandleType hplayer);
753 int _mmplayer_get_state(MMHandleType hplayer, int* pstate);
754 int _mmplayer_set_volume(MMHandleType hplayer, MMPlayerVolumeType volume);
755 int _mmplayer_get_volume(MMHandleType hplayer, MMPlayerVolumeType *volume);
756 int _mmplayer_set_mute(MMHandleType hplayer, int mute);
757 int _mmplayer_get_mute(MMHandleType hplayer, int* pmute);
758 int _mmplayer_start(MMHandleType hplayer);
759 int _mmplayer_stop(MMHandleType hplayer);
760 int _mmplayer_pause(MMHandleType hplayer);
761 int _mmplayer_resume(MMHandleType hplayer);
762 int _mmplayer_set_position(MMHandleType hplayer, int format, int pos);
763 int _mmplayer_get_position(MMHandleType hplayer, int format, unsigned long *pos);
764 int _mmplayer_adjust_subtitle_postion(MMHandleType hplayer, int format, int pos);
765 int _mmplayer_adjust_video_postion(MMHandleType hplayer,int offset);
766 int _mmplayer_activate_section_repeat(MMHandleType hplayer, unsigned long start, unsigned long end);
767 int _mmplayer_deactivate_section_repeat(MMHandleType hplayer);
768 int _mmplayer_push_buffer(MMHandleType hplayer, unsigned char *buf, int size);
769 int _mmplayer_set_playspeed(MMHandleType hplayer, float rate);
770 int _mmplayer_set_playspeed_ex(MMHandleType hplayer, gdouble rate);
771 int _mmplayer_set_message_callback(MMHandleType hplayer, MMMessageCallback callback, void *user_param);
772 int _mmplayer_set_videostream_changed_cb(MMHandleType hplayer, mm_player_stream_changed_callback callback, void *user_param);
773 int _mmplayer_set_audiostream_changed_cb(MMHandleType hplayer, mm_player_stream_changed_callback callback, void *user_param);
774 int _mmplayer_set_videostream_cb(MMHandleType hplayer,mm_player_video_stream_callback callback, void *user_param);
775 int _mmplayer_set_audiostream_cb(MMHandleType hplayer,mm_player_audio_stream_callback callback, void *user_param);
776 int _mmplayer_set_videoframe_render_error_cb(MMHandleType hplayer, mm_player_video_frame_render_error_callback callback, void *user_param);
777 int _mmplayer_set_subtitle_silent (MMHandleType hplayer, int silent);
778 int _mmplayer_get_subtitle_silent (MMHandleType hplayer, int* silent);
779 int _mmplayer_set_external_subtitle_path(MMHandleType hplayer, const char* filepath);
780 int _mmplayer_get_buffer_position(MMHandleType hplayer, int format, unsigned long* start_pos, unsigned long* stop_pos);
782 /* test API for tuning audio gain. this API should be
783 * deprecated before the day of final release
785 int _mmplayer_set_volume_tune(MMHandleType hplayer, MMPlayerVolumeType volume);
786 int _mmplayer_update_video_param(mm_player_t* player);
787 int _mmplayer_set_audiobuffer_cb(MMHandleType hplayer, mm_player_audio_stream_callback callback, void *user_param);
788 int _mmplayer_change_videosink(MMHandleType handle, MMDisplaySurfaceType surface_type, void *display_overlay);
789 int _mmplayer_audio_effect_custom_apply(mm_player_t *player);
791 int _mmplayer_set_audiostream_cb_ex(MMHandleType hplayer, bool sync, mm_player_audio_stream_callback_ex callback, void *user_param);
792 gboolean __mmplayer_post_message(mm_player_t* player, enum MMMessageType msgtype, MMMessageParamType* param);
793 gboolean __mmplayer_is_streaming(mm_player_t* player);
796 int _mmplayer_gst_set_audio_channel(MMHandleType hplayer, MMPlayerAudioChannel ch_idx);
797 int _mmplayer_change_track_language (MMHandleType hplayer, MMPlayerTrackType type, int index);
798 int _mmplayer_sync_subtitle_pipeline(mm_player_t* player);
799 int _mmplayer_set_prepare_buffering_time(MMHandleType hplayer, int second);
800 int _mmplayer_set_runtime_buffering_mode(MMHandleType hplayer, MMPlayerBufferingMode mode, int second);
801 int _mmplayer_set_display_zoom(MMHandleType hplayer, float level, int x, int y);
802 int _mmplayer_get_display_zoom(MMHandleType hplayer, float *level, int *x, int *y);
803 int _mmplayer_set_video_hub_download_mode(MMHandleType hplayer, bool mode);
804 int _mmplayer_use_system_clock (MMHandleType hplayer);
805 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);
806 int _mmplayer_get_video_share_master_clock(MMHandleType hplayer, long long *video_time, long long *media_clock, long long *audio_time);
807 int _mmplayer_get_video_rotate_angle(MMHandleType hplayer, int *angle);
808 int _mmplayer_enable_sync_handler(MMHandleType hplayer, bool enable);
809 int _mmplayer_set_uri(MMHandleType hplayer, const char* uri);
810 int _mmplayer_set_next_uri(MMHandleType hplayer, const char* uri, bool is_first_path);
811 int _mmplayer_get_next_uri(MMHandleType hplayer, char** uri);
812 int _mmplayer_has_closed_caption(MMHandleType hplayer, bool* exist);
813 int _mmplayer_enable_media_packet_video_stream(MMHandleType hplayer, bool enable);
814 void * _mm_player_media_packet_video_stream_internal_buffer_ref(void *buffer);
815 void _mm_player_media_packet_video_stream_internal_buffer_unref(void *buffer);
816 int _mmplayer_set_pcm_spec(MMHandleType hplayer, int samplerate, int channel);
822 #endif /* __MM_PLAYER_PRIV_H__ */