X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Finclude%2Fmm_player_priv.h;h=53fb9547017924519b0a4e1c332b72998d82b0bf;hb=2203bcd71ad147b311c197443aca67f312f7512d;hp=7d019105f8b5cea3985e56362ee50e94d67b7013;hpb=a71e2867e5cc0608ef792f2f33d96f4c07757689;p=platform%2Fcore%2Fmultimedia%2Flibmm-player.git diff --git a/src/include/mm_player_priv.h b/src/include/mm_player_priv.h index 7d01910..53fb954 100644 --- a/src/include/mm_player_priv.h +++ b/src/include/mm_player_priv.h @@ -29,6 +29,7 @@ | | ========================================================================================== */ #include +#include #include #include #include @@ -165,7 +166,6 @@ typedef enum { /* it could be a decodebin or could be a typefind. depends on player ini */ MMPLAYER_M_TYPEFIND, MMPLAYER_M_AUTOPLUG, - MMPLAYER_M_AUTOPLUG_PARSEBIN, MMPLAYER_M_AUTOPLUG_V_DEC, MMPLAYER_M_AUTOPLUG_A_DEC, @@ -176,7 +176,6 @@ typedef enum { /* streaming plugin */ MMPLAYER_M_MUXED_S_BUFFER, MMPLAYER_M_DEMUXED_S_BUFFER, - MMPLAYER_M_ID3DEMUX, MMPLAYER_M_ADAPTIVE_DEMUX, /* es buff src queue */ @@ -191,9 +190,13 @@ typedef enum { MMPLAYER_M_Q2, MMPLAYER_M_DEMUX, MMPLAYER_M_SUBPARSE, + MMPLAYER_M_V_PARSE, MMPLAYER_M_V_INPUT_SELECTOR, // video input_select MMPLAYER_M_A_INPUT_SELECTOR, // audio input_select MMPLAYER_M_T_INPUT_SELECTOR, // text input_select + MMPLAYER_M_V_CONCAT, // video concat + MMPLAYER_M_A_CONCAT, // audio concat + MMPLAYER_M_T_CONCAT, // text concat MMPLAYER_M_NUM } main_element_id_e; @@ -450,12 +453,12 @@ typedef struct { } mmplayer_video_roi_t; typedef struct { - gint active_pad_index; + gint active_track_index; gint total_track_num; - GPtrArray *channels; - gulong block_id; - gulong event_probe_id; -} mmplayer_selector_t; + GPtrArray *streams; + gulong block_id; /* FIXME: will be removed */ + gulong event_probe_id; /* FIXME: will be removed */ +} mmplayer_track_t; typedef struct { gboolean running; @@ -501,6 +504,13 @@ typedef struct { } mmplayer_adaptive_variant_info_t; typedef struct { + GCond ticket_cond; + GMutex ticket_mutex; + guint ticket_queue_head; + guint ticket_queue_tail; +} mmplayer_ticket_lock_t; + +typedef struct { int is_spherical; int is_stitched; char *stitching_software; @@ -525,6 +535,19 @@ typedef struct { } mmplayer_spherical_metadata_t; typedef struct { + GModule *img_module; + GModule *imgp_module; + int (*create)(unsigned int, unsigned int, + int, const unsigned char *, size_t, void **); + void (*destroy)(void *); + int (*get)(void *, unsigned int *, unsigned int *, + int *, unsigned char **, size_t *); + void (*debug)(void *, const char *); + int (*rotate)(void *, int, void **); + int (*convert)(void *, int, void **); +} mm_img_util_interface_t; + +typedef struct { /* STATE */ int state; // player current state int prev_state; // player previous state @@ -537,7 +560,7 @@ typedef struct { int cmd; /* command lock */ - GMutex cmd_lock; + mmplayer_ticket_lock_t *cmd_lock; GMutex reconfigure_lock; GCond reconfigure_cond; @@ -556,6 +579,7 @@ typedef struct { mmplayer_video_capture_t capture; mmplayer_video_color_space_e video_cs; MMVideoBuffer captured; + mm_img_util_interface_t *img_util; /* gst bus msg thread, create during realize */ GThread *bus_msg_thread; @@ -616,11 +640,12 @@ typedef struct { /* type string */ gchar *type; + GstCaps *type_caps; /* video stream caps parsed by demuxer */ GstCaps *v_stream_caps; - /* audio effect infomation */ + /* audio effect information */ mm_audio_effect_info_t audio_effect_info; gboolean bypass_audio_effect; @@ -691,6 +716,10 @@ typedef struct { /* list of sink elements */ GList *sink_elements; + /* for destroy bus thread */ + GMutex bus_watcher_mutex; + GCond bus_watcher_cond; + /* signal notifiers */ GList *signals[MM_PLAYER_SIGNAL_TYPE_MAX]; guint bus_watcher; @@ -724,7 +753,7 @@ typedef struct { guint maximum_bitrate[MM_PLAYER_STREAM_COUNT_MAX]; guint total_maximum_bitrate; - /* prevent it from posting duplicatly*/ + /* prevent from posting duplicated BOS message */ gboolean sent_bos; gboolean play_subtitle; @@ -736,10 +765,11 @@ typedef struct { GCond subtitle_info_cond; GMutex subtitle_info_mutex; - /* To store the current running audio pad index of demuxer */ - gint demux_pad_index; + /* stream collection */ + GstStreamCollection *collection; + guint stream_notify_id; - mmplayer_selector_t selector[MM_PLAYER_TRACK_TYPE_MAX]; + mmplayer_track_t track[MM_PLAYER_TRACK_TYPE_MAX]; guint internal_text_idx; guint external_text_idx; @@ -765,7 +795,7 @@ typedef struct { /* es player using feed-data callback or calling app_src_push_buffer directly*/ gboolean es_player_push_mode; - /* tmb buffer manager for s/w codec tmb_bo */ + /* tbm buffer manager for s/w codec tmb_bo */ tbm_bufmgr bufmgr; mmplayer_adaptive_variant_info_t adaptive_info; @@ -831,7 +861,7 @@ int _mmplayer_abort_pause(MMHandleType hplayer); int _mmplayer_resume(MMHandleType hplayer); int _mmplayer_set_position(MMHandleType hplayer, gint64 pos); int _mmplayer_get_duration(MMHandleType hplayer, gint64 *duration); -int _mmplayer_adjust_subtitle_postion(MMHandleType hplayer, int pos); +int _mmplayer_adjust_subtitle_position(MMHandleType hplayer, int pos); int _mmplayer_set_playspeed(MMHandleType hplayer, float rate, bool streaming); int _mmplayer_set_message_callback(MMHandleType hplayer, MMMessageCallback callback, void *user_param); int _mmplayer_set_audiostream_changed_cb(MMHandleType hplayer, mm_player_stream_changed_callback callback, void *user_param); @@ -859,7 +889,6 @@ int _mmplayer_get_adaptive_variant_info(MMHandleType hplayer, int *num, char **v int _mmplayer_set_max_adaptive_variant_limit(MMHandleType hplayer, int bandwidth, int width, int height); int _mmplayer_get_max_adaptive_variant_limit(MMHandleType hplayer, int *bandwidth, int *width, int *height); int _mmplayer_set_audio_only(MMHandleType hplayer, bool audio_only); -int _mmplayer_get_audio_only(MMHandleType hplayer, bool *paudio_only); int _mmplayer_get_streaming_buffering_time(MMHandleType hplayer, int *prebuffer_ms, int *rebuffer_ms); int _mmplayer_set_codec_type(MMHandleType hplayer, mmplayer_stream_type_e stream_type, mmplayer_codec_type_e codec_type); int _mmplayer_set_replaygain_enabled(MMHandleType hplayer, bool enabled); @@ -871,6 +900,8 @@ int _mmplayer_is_audio_control_available(MMHandleType hplayer, mmplayer_audio_co /* internal */ void _mmplayer_bus_msg_thread_destroy(MMHandleType hplayer); +void _mmplayer_bus_watcher_remove(MMHandleType hplayer); +void _mmplayer_watcher_removed_notify(gpointer data); void _mmplayer_set_state(mmplayer_t *player, int state); int _mmplayer_check_state(mmplayer_t *player, mmplayer_command_state_e command); gboolean _mmplayer_update_content_attrs(mmplayer_t *player, enum content_attr_flag flag); @@ -884,7 +915,7 @@ void _mmplayer_gst_decode_pad_added(GstElement *elem, GstPad *pad, gpointer data gint _mmplayer_gst_decode_autoplug_select(GstElement *bin, GstPad *pad, GstCaps *caps, GstElementFactory *factory, gpointer data); GValueArray *_mmplayer_gst_decode_autoplug_sort(GstElement *bin, GstPad *pad, GstCaps *caps, GValueArray *factories, gpointer data); gboolean _mmplayer_gst_create_decoder(mmplayer_t *player, GstPad *srcpad, const GstCaps *caps); -void _mmplayer_gst_element_added(GstElement *bin, GstElement *element, gpointer data); +void _mmplayer_gst_element_added(GstBin *bin, GstElement *element, gpointer data); GstElement *_mmplayer_gst_make_decodebin(mmplayer_t *player); int _mmplayer_gst_element_add_bucket_to_bin(GstBin *bin, GList *element_bucket); int _mmplayer_gst_element_link_bucket(GList *element_bucket); @@ -895,9 +926,13 @@ void _mmplayer_set_reconfigure_state(mmplayer_t *player, gboolean state); void _mmplayer_gst_decode_pad_removed(GstElement *elem, GstPad *new_pad, gpointer data); void _mmplayer_gst_decode_no_more_pads(GstElement *elem, gpointer data); void _mmplayer_gst_decode_drained(GstElement *bin, gpointer data); +void _mmplayer_gst_about_to_finish(GstElement *bin, gpointer data); +int _mmplayer_update_not_supported_codec_info(mmplayer_t *player, const gchar *factory_class, const gchar *mime); void _mmplayer_gst_decode_unknown_type(GstElement *elem, GstPad *pad, GstCaps *caps, gpointer data); gboolean _mmplayer_gst_decode_autoplug_continue(GstElement *bin, GstPad *pad, GstCaps *caps, gpointer data); void _mmplayer_pipeline_complete(GstElement *decodebin, gpointer data); +void _mmplayer_set_audio_attrs(mmplayer_t *player, GstCaps *caps); +int _mmplayer_acquire_hw_resource(mmplayer_t *player, mmplayer_resource_type_e type); #ifdef __cplusplus }