From: Eunhae Choi Date: Thu, 5 Apr 2018 12:02:05 +0000 (+0900) Subject: [0.6.102] Remove unused attr X-Git-Tag: submit/tizen/20180419.035601~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c3ca63050b6b747263782b330abbddc0a82005e;p=platform%2Fcore%2Fmultimedia%2Flibmm-player.git [0.6.102] Remove unused attr Change-Id: Ib79e78eda75be26d1f32852c4373e1d150695a2e --- diff --git a/packaging/libmm-player.spec b/packaging/libmm-player.spec index 2da992b..08bab75 100644 --- a/packaging/libmm-player.spec +++ b/packaging/libmm-player.spec @@ -1,6 +1,6 @@ Name: libmm-player Summary: Multimedia Framework Player Library -Version: 0.6.101 +Version: 0.6.102 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 diff --git a/src/include/mm_player.h b/src/include/mm_player.h index 3735e1b..9e0e76a 100644 --- a/src/include/mm_player.h +++ b/src/include/mm_player.h @@ -40,374 +40,6 @@ extern "C" { #endif -/** - @addtogroup PLAYER - @{ - - @par - This part describes APIs used for playback of multimedia contents. - All multimedia contents are created by a media player through handle of playback. - In creating a player, it displays the player's status or information - by registering callback function. - - @par - In case of streaming playback, network has to be opend by using datanetwork API. - If proxy, cookies and the other attributes for streaming playback are needed, - set those attributes using mm_player_set_attribute() before create player. - - @par - The subtitle for local video playback is supported. Set "subtitle_uri" attribute - using mm_player_set_attribute() before the application creates the player. - Then the application could receive MMMessageParamType which includes subtitle string and duration. - - @par - Player can have 5 states, and each state can be changed by calling - described functions on "Figure1. State of Player". - - @par - @image html player_state.jpg "Figure1. State of Player" width=12cm - @image latex player_state.jpg "Figure1. State of Player" width=12cm - - @par - Most of functions which change player state work as synchronous. But, mm_player_start() should be used - asynchronously. Both mm_player_pause() and mm_player_resume() should also be used asynchronously - in the case of streaming data. - So, application have to confirm the result of those APIs through message callback function. - - @par - Note that "None" and Null" state could be reached from any state - by calling mm_player_destroy() and mm_player_unrealize(). - - @par -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FUNCTIONPRE-STATEPOST-STATESYNC TYPE
mm_player_create()NONENULLSYNC
mm_player_destroy()NULLNONESYNC
mm_player_realize()NULLREADYSYNC
mm_player_unrealize()READYNULLSYNC
mm_player_start()READYPLAYINGASYNC
mm_player_stop()PLAYINGREADYSYNC
mm_player_pause()PLAYINGPAUSEDASYNC
mm_player_resume()PAUSEDPLAYINGASYNC
mm_player_set_message_callback()N/AN/ASYNC
mm_player_get_state()N/AN/ASYNC
mm_player_set_volume()N/AN/ASYNC
mm_player_get_volume()N/AN/ASYNC
mm_player_set_position()N/AN/ASYNC
mm_player_get_position()N/AN/ASYNC
mm_player_get_attribute()N/AN/ASYNC
mm_player_set_attribute()N/AN/ASYNC
- - @par - Following are the attributes supported in player which may be set after initialization. \n - Those are handled as a string. - - @par -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROPERTYTYPEVALID TYPE
"profile_uri"stringN/A
"content_duration"intrange
"content_video_width"intrange
"content_video_height"intrange
"display_evas_do_scaling"intrange
"display_evas_surface_sink"stringN/A
"profile_user_param"dataN/A
"profile_play_count"intrange
"streaming_type"intrange
"streaming_udp_timeout"intrange
"streaming_user_agent"stringN/A
"streaming_wap_profile"stringN/A
"streaming_network_bandwidth"intrange
"streaming_cookie"stringN/A
"streaming_proxy_ip"stringN/A
"streaming_proxy_port"intrange
"streaming_timeout"intrange
"display_overlay"dataN/A
"display_rotation"intrange
"subtitle_uri"stringN/A
- - @par - Following attributes are supported for playing stream data. Those value can be readable only and valid after starting playback.\n - Please use mm_fileinfo for local playback. - - @par -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROPERTYTYPEVALID TYPE
"content_video_found"stringN/A
"content_video_codec"stringN/A
"content_video_track_num"intrange
"content_audio_found"stringN/A
"content_audio_codec"stringN/A
"content_audio_bitrate"intarray
"content_audio_channels"intrange
"content_audio_samplerate"intarray
"content_audio_track_num"intrange
"content_text_track_num"intrange
"tag_artist"stringN/A
"tag_title"stringN/A
"tag_album"stringN/A
"tag_genre"stringN/A
"tag_author"stringN/A
"tag_copyright"stringN/A
"tag_date"stringN/A
"tag_description"stringN/A
"tag_track_num"intrange
- - */ - - /*=========================================================================================== | | | GLOBAL DEFINITIONS AND DECLARATIONS | @@ -452,15 +84,6 @@ * */ #define MM_PLAYER_VIDEO_HEIGHT "content_video_height" -/** - * MM_PLAYER_VIDEO_EVAS_SURFACE_DO_SCALING: - * - * set whether or not to scale frames size for evas surface. - * if TRUE, it scales down width, height size of frames with given size. - * if FALSE, it does not scale down any frames. - * - */ -#define MM_PLAYER_VIDEO_EVAS_SURFACE_DO_SCALING "display_evas_do_scaling" /** * MM_PLAYER_VIDEO_EVAS_SURFACE_SINK: * @@ -488,73 +111,24 @@ * set the subtitle path (string) */ #define MM_PLAYER_SUBTITLE_URI "subtitle_uri" -/** - * MM_PLAYER_STREAMING_TYPE - * - * set the streaming type (int) - * @see MMStreamingType - */ -#define MM_PLAYER_STREAMING_TYPE "streaming_type" -/** - * MM_PLAYER_STREAMING_UDP_TIMEOUT - * - * set the streaming udp timeout(int) - */ -#define MM_PLAYER_STREAMING_UDP_TIMEOUT "streaming_udp_timeout" /** * MM_PLAYER_STREAMING_USER_AGENT * * set the streaming user agent (string) */ #define MM_PLAYER_STREAMING_USER_AGENT "streaming_user_agent" -/** - * MM_PLAYER_STREAMING_WAP_PROFILE - * - * set the streaming wap profile (int) - */ -#define MM_PLAYER_STREAMING_WAP_PROFILE "streaming_wap_profile" -/** - * MM_PLAYER_STREAMING_NET_BANDWIDTH - * - * set the streaming network bandwidth (int) - */ -#define MM_PLAYER_STREAMING_NET_BANDWIDTH "streaming_network_bandwidth" /** * MM_PLAYER_STREAMING_COOKIE * * set the streaming cookie (int) */ #define MM_PLAYER_STREAMING_COOKIE "streaming_cookie" -/** - * MM_PLAYER_STREAMING_PROXY_IP - * - * set the streaming proxy ip (string) - */ -#define MM_PLAYER_STREAMING_PROXY_IP "streaming_proxy_ip" -/** - * MM_PLAYER_STREAMING_PROXY_PORT - * - * set the streaming proxy port (int) - */ -#define MM_PLAYER_STREAMING_PROXY_PORT "streaming_proxy_port" -/** - * MM_PLAYER_STREAMING_TIMEOUT - * - * set the streaming timeout (int) - */ -#define MM_PLAYER_STREAMING_TIMEOUT "streaming_timeout" /** * MM_PLAYER_VIDEO_CODEC * * codec the video data is stored in (string) */ #define MM_PLAYER_VIDEO_CODEC "content_video_codec" -/** - * MM_PLAYER_VIDEO_TRACK_NUM - * - * track number inside a collection (int) - */ -#define MM_PLAYER_VIDEO_TRACK_NUM "content_video_track_num" /** * MM_PLAYER_AUDIO_CODEC * @@ -598,49 +172,49 @@ */ #define MM_PLAYER_TAG_ARTIST "tag_artist" /** - * MM_PLAYER_TAG_ARTIST + * MM_PLAYER_TAG_TITLE * * title (string) */ #define MM_PLAYER_TAG_TITLE "tag_title" /** - * MM_PLAYER_TAG_ARTIST + * MM_PLAYER_TAG_ALBUM * * album containing this data (string) */ #define MM_PLAYER_TAG_ALBUM "tag_album" /** - * MM_PLAYER_TAG_ARTIST + * MM_PLAYER_TAG_GENRE * * genre this data belongs to (string) */ #define MM_PLAYER_TAG_GENRE "tag_genre" /** - * MM_PLAYER_TAG_ARTIST + * MM_PLAYER_TAG_AUTHOUR * * author (string) */ #define MM_PLAYER_TAG_AUTHOUR "tag_author" /** - * MM_PLAYER_TAG_ARTIST + * MM_PLAYER_TAG_COPYRIGHT * * copyright notice of the data (string) */ #define MM_PLAYER_TAG_COPYRIGHT "tag_copyright" /** - * MM_PLAYER_TAG_ARTIST + * MM_PLAYER_TAG_DATE * * date the data was created (string) */ #define MM_PLAYER_TAG_DATE "tag_date" /** - * MM_PLAYER_TAG_ARTIST + * MM_PLAYER_TAG_DESCRIPRION * * short text describing the content of the data (string) */ #define MM_PLAYER_TAG_DESCRIPRION "tag_description" /** - * MM_PLAYER_TAG_ARTIST + * MM_PLAYER_TAG_TRACK_NUM * * track number inside a collection (int) */ diff --git a/src/include/mm_player_internal.h b/src/include/mm_player_internal.h index d0c33f2..0d4d034 100755 --- a/src/include/mm_player_internal.h +++ b/src/include/mm_player_internal.h @@ -29,69 +29,6 @@ extern "C" { #endif -/** - @addtogroup PLAYER-INTERNAL - @{ - - @par -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROPERTYTYPEVALID TYPEDEFAULT VALUE
"display_roi_x"intrange0
"display_roi_y"intrange0
"display_roi_width"intrange640
"display_roi_height"intrange480
"display_method"intrangeMM_DISPLAY_METHOD_LETTER_BOX
"sound_volume_type"intrangeMM_SOUND_VOLUME_TYPE_CALL
"sound_route"intrangeMM_AUDIOROUTE_USE_EXTERNAL_SETTING
"sound_stop_when_unplugged"intrange
- -*/ - /* * Enumerations of video colorspace */ diff --git a/src/include/mm_player_utils.h b/src/include/mm_player_utils.h index 281250d..da33c5c 100644 --- a/src/include/mm_player_utils.h +++ b/src/include/mm_player_utils.h @@ -264,7 +264,6 @@ LOGD("-- prev %s, current %s, pending %s, target %s --\n", \ bool util_is_sdp_file(const char *path); int util_exist_file_path(const char *file_path); char** util_get_cookie_list(const char *cookies); -bool util_check_valid_url(const char *proxy); const char* util_get_charset(const char *file_path); int util_get_pixtype(unsigned int fourcc); bool util_get_storage_info(const char *path, MMPlayerStorageInfo *storage_info); diff --git a/src/mm_player_attrs.c b/src/mm_player_attrs.c index c058c6b..cb25e29 100644 --- a/src/mm_player_attrs.c +++ b/src/mm_player_attrs.c @@ -272,33 +272,6 @@ _mmplayer_construct_attribute(MMHandleType handle) 0, 1 }, - { /* update registry for downloadable codec */ - "profile_update_registry", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 0, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - 1 - }, - { - "streaming_type", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) STREAMING_SERVICE_NONE, - MM_ATTRS_VALID_TYPE_INT_RANGE, - STREAMING_SERVICE_VOD, - STREAMING_SERVICE_NUM - }, - { - "streaming_udp_timeout", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 10000, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, { "streaming_user_agent", MM_ATTRS_TYPE_STRING, @@ -308,24 +281,6 @@ _mmplayer_construct_attribute(MMHandleType handle) 0, 0 }, - { - "streaming_wap_profile", - MM_ATTRS_TYPE_STRING, - MM_ATTRS_FLAG_RW, - (void *) NULL, - MM_ATTRS_VALID_TYPE_NONE, - 0, - 0 - }, - { - "streaming_network_bandwidth", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 128000, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, { "streaming_cookie", MM_ATTRS_TYPE_STRING, @@ -335,24 +290,6 @@ _mmplayer_construct_attribute(MMHandleType handle) 0, 0 }, - { - "streaming_proxy", - MM_ATTRS_TYPE_STRING, - MM_ATTRS_FLAG_RW, - (void *) NULL, - MM_ATTRS_VALID_TYPE_NONE, - 0, - 0 - }, - { - "streaming_timeout", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) -1, // DEFAULT_HTTP_TIMEOUT - MM_ATTRS_VALID_TYPE_INT_RANGE, - -1, - MMPLAYER_MAX_INT - }, { "subtitle_uri", MM_ATTRS_TYPE_STRING, @@ -443,24 +380,6 @@ _mmplayer_construct_attribute(MMHandleType handle) 0, MMPLAYER_MAX_INT }, - { - "content_video_track_num", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 0, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, - { - "content_audio_found", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 0, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - 1 - }, { "content_audio_codec", MM_ATTRS_TYPE_STRING, @@ -506,15 +425,6 @@ _mmplayer_construct_attribute(MMHandleType handle) 0, MMPLAYER_MAX_INT }, - { - "content_audio_format", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 0, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, { "content_text_track_num", MM_ATTRS_TYPE_INT, @@ -611,87 +521,6 @@ _mmplayer_construct_attribute(MMHandleType handle) 0, 0 }, - { - "display_src_crop_x", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 0, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, - { - "display_src_crop_y", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 0, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, - { - "display_src_crop_width", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 0, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, - { - "display_src_crop_height", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 0, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, - { - "display_roi_x", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 0, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, - { - "display_roi_y", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 0, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, - { - "display_roi_width", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 480, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, - { - "display_roi_height", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 800, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, - { - "display_roi_mode", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) MM_DISPLAY_METHOD_CUSTOM_ROI_FULL_SCREEN, - MM_ATTRS_VALID_TYPE_INT_RANGE, - MM_DISPLAY_METHOD_CUSTOM_ROI_FULL_SCREEN, - MM_DISPLAY_METHOD_CUSTOM_ROI_LETER_BOX - }, { "display_rotation", MM_ATTRS_TYPE_INT, @@ -728,15 +557,6 @@ _mmplayer_construct_attribute(MMHandleType handle) 0, 0 }, - { - "wl_display", - MM_ATTRS_TYPE_DATA, - MM_ATTRS_FLAG_RW, - (void *) NULL, - MM_ATTRS_VALID_TYPE_NONE, - 0, - 0 - }, { "wl_window_render_x", MM_ATTRS_TYPE_INT, @@ -773,15 +593,6 @@ _mmplayer_construct_attribute(MMHandleType handle) 0, MMPLAYER_MAX_INT }, - { - "display_overlay_user_data", - MM_ATTRS_TYPE_DATA, - MM_ATTRS_FLAG_RW, - (void *) NULL, - MM_ATTRS_VALID_TYPE_NONE, - 0, - 0 - }, { "display_surface_type", MM_ATTRS_TYPE_INT, @@ -791,69 +602,6 @@ _mmplayer_construct_attribute(MMHandleType handle) MM_DISPLAY_SURFACE_OVERLAY, MM_DISPLAY_SURFACE_NUM - 1 }, - { - "display_force_aspect_ration", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 1, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, - { - "display_width", // dest width of fimcconvert ouput - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 0, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, - { - "display_height", // dest height of fimcconvert ouput - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 0, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, - { - "display_evas_do_scaling", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) TRUE, - MM_ATTRS_VALID_TYPE_INT_RANGE, - FALSE, - TRUE - }, - { - "sound_fadeup", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) FALSE, - MM_ATTRS_VALID_TYPE_INT_RANGE, - FALSE, - TRUE - }, - { - "sound_fadedown", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) FALSE, - MM_ATTRS_VALID_TYPE_INT_RANGE, - FALSE, - TRUE - }, - { - "sound_volume_type", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) MM_SOUND_VOLUME_TYPE_MEDIA, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, { "sound_stream_type", MM_ATTRS_TYPE_STRING, @@ -872,60 +620,6 @@ _mmplayer_construct_attribute(MMHandleType handle) -1, MMPLAYER_MAX_INT }, - { - "sound_route", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) MM_AUDIOROUTE_USE_EXTERNAL_SETTING, - MM_ATTRS_VALID_TYPE_INT_RANGE, - MM_AUDIOROUTE_USE_EXTERNAL_SETTING, - MM_AUDIOROUTE_CAPTURE_STEREOMIC_ONLY - }, - { - "sound_stop_when_unplugged", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) TRUE, - MM_ATTRS_VALID_TYPE_INT_RANGE, - FALSE, - TRUE - }, - { - "sound_application_pid", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 0, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, - { - "sound_spk_out_only", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) FALSE, - MM_ATTRS_VALID_TYPE_INT_RANGE, - FALSE, - TRUE - }, - { - "sound_priority", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 0, // 0: normal, 1: high 2: high with sound transition 3: mix with others regardless of priority - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - 3 - }, - { - "sound_close_resource", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 0, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - 1 - }, { "sound_latency_mode", MM_ATTRS_TYPE_INT, @@ -989,42 +683,6 @@ _mmplayer_construct_attribute(MMHandleType handle) 0, MMPLAYER_MAX_INT }, - { - "profile_smooth_repeat", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) FALSE, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, - { - "profile_progress_interval", // will be deprecated - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 500, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, - { - "display_x", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 0, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, - { - "display_y", - MM_ATTRS_TYPE_INT, - MM_ATTRS_FLAG_RW, - (void *) 0, - MM_ATTRS_VALID_TYPE_INT_RANGE, - 0, - MMPLAYER_MAX_INT - }, { "pd_mode", MM_ATTRS_TYPE_INT, diff --git a/src/mm_player_priv.c b/src/mm_player_priv.c index f850611..debf1b5 100755 --- a/src/mm_player_priv.c +++ b/src/mm_player_priv.c @@ -208,10 +208,6 @@ static gboolean __gst_send_event_to_sink(mm_player_t* player, GstEvent* event); static int __mmplayer_set_pcm_extraction(mm_player_t* player); static gboolean __mmplayer_can_extract_pcm(mm_player_t* player); -/*fadeout */ -static void __mmplayer_do_sound_fadedown(mm_player_t* player, unsigned int time); -static void __mmplayer_undo_sound_fadedown(mm_player_t* player); - /* util */ static gboolean __is_ms_buff_src(mm_player_t* player); static gboolean __has_suffix(mm_player_t * player, const gchar * suffix); @@ -298,7 +294,6 @@ _mmplayer_update_content_attrs(mm_player_t* player, enum content_attr_flag flag) GstStructure* p = NULL; MMHandleType attrs = 0; gchar *path = NULL; - MMStreamingType stream_service_type = STREAMING_SERVICE_NONE; struct stat sb; MMPLAYER_FENTER(); @@ -355,10 +350,8 @@ _mmplayer_update_content_attrs(mm_player_t* player, enum content_attr_flag flag) player->duration = 0; } - /* try to get streaming service type */ - stream_service_type = __mmplayer_get_stream_service_type(player); - if (stream_service_type < STREAMING_SERVICE_NONE) - mm_attrs_set_int_by_name(attrs, "streaming_type", stream_service_type); + /* update streaming service type */ + player->streaming_type = __mmplayer_get_stream_service_type(player); /* check duration is OK */ if (dur_nsec == 0 && !MMPLAYER_IS_LIVE_STREAMING(player)) { @@ -554,7 +547,6 @@ static MMStreamingType __mmplayer_get_stream_service_type(mm_player_t* player) LOGE("should not get here"); } - player->streaming_type = streaming_type; MMPLAYER_FLEAVE(); return streaming_type; @@ -595,32 +587,19 @@ __mmplayer_set_state(mm_player_t* player, int state) case MM_PLAYER_STATE_PAUSED: { - if (!player->sent_bos) { - int found = 0; - #define MMPLAYER_MAX_SOUND_PRIORITY 3 - + if (!player->sent_bos) { /* rtsp case, get content attrs by GstMessage */ if (!MMPLAYER_IS_RTSP_STREAMING(player)) { /* it's first time to update all content attrs. */ _mmplayer_update_content_attrs(player, ATTR_ALL); } - - /* set max sound priority to keep own sound and not to mute other's one */ - mm_attrs_get_int_by_name(player->attrs, "content_video_found", &found); - if (found) { - mm_attrs_get_int_by_name(player->attrs, "content_audio_found", &found); - if (found) { - LOGD("set max audio priority"); - g_object_set(player->pipeline->audiobin[MMPLAYER_A_SINK].gst, "priority", MMPLAYER_MAX_SOUND_PRIORITY, NULL); - } - } - - } + } /* add audio callback probe if condition is satisfied */ if (!player->audio_cb_probe_id && player->set_mode.pcm_extraction && !player->audio_stream_render_cb_ex) __mmplayer_configure_audio_callback(player); - /* FIXIT : handle return value */ + + /* FIXIT : handle return value */ } break; @@ -1168,46 +1147,34 @@ __mmplayer_gst_callback(GstMessage *msg, gpointer data) attrs = MMPLAYER_GET_ATTRS(player); if (attrs) { - gboolean smooth_repeat = FALSE; - mm_attrs_get_int_by_name(attrs, "profile_play_count", &count); - mm_attrs_get_int_by_name(attrs, "profile_smooth_repeat", &smooth_repeat); - player->play_count = count; LOGD("remaining play count: %d, playback rate: %f\n", count, player->playback_rate); if (count > 1 || count == -1 || player->playback_rate < 0.0) /* default value is 1 */ { - if (smooth_repeat) { - LOGD("smooth repeat enabled. seeking operation will be excuted in new thread\n"); + gint ret_value = 0; - MMPLAYER_REPEAT_THREAD_SIGNAL(player); - - break; + if (player->section_repeat) { + ret_value = _mmplayer_activate_section_repeat((MMHandleType)player, player->section_repeat_start, player->section_repeat_end); } else { - gint ret_value = 0; - - if (player->section_repeat) { - ret_value = _mmplayer_activate_section_repeat((MMHandleType)player, player->section_repeat_start, player->section_repeat_end); - } else { - if (player->playback_rate < 0.0) { - player->resumed_by_rewind = TRUE; - _mmplayer_set_mute((MMHandleType)player, 0); - MMPLAYER_POST_MSG(player, MM_MESSAGE_RESUMED_BY_REW, NULL); - } - - __mmplayer_handle_eos_delay(player, player->ini.delay_before_repeat); - - /* initialize */ - player->sent_bos = FALSE; + if (player->playback_rate < 0.0) { + player->resumed_by_rewind = TRUE; + _mmplayer_set_mute((MMHandleType)player, 0); + MMPLAYER_POST_MSG(player, MM_MESSAGE_RESUMED_BY_REW, NULL); } - if (MM_ERROR_NONE != ret_value) - LOGE("failed to set position to zero for rewind\n"); + __mmplayer_handle_eos_delay(player, player->ini.delay_before_repeat); - /* not posting eos when repeating */ - break; + /* initialize */ + player->sent_bos = FALSE; } + + if (MM_ERROR_NONE != ret_value) + LOGE("failed to set position to zero for rewind\n"); + + /* not posting eos when repeating */ + break; } } @@ -1681,7 +1648,7 @@ __mmplayer_gst_callback(GstMessage *msg, gpointer data) gst_structure_get(gst_message_get_structure(msg), "rtsp_duration", G_TYPE_UINT64, &player->duration, NULL); LOGD("rtsp duration : %lld msec", GST_TIME_AS_MSECONDS(player->duration)); - __mmplayer_get_stream_service_type(player); + player->streaming_type = __mmplayer_get_stream_service_type(player); mm_attrs_set_int_by_name(attrs, "content_duration", GST_TIME_AS_MSECONDS(player->duration)); gst_structure_get(gst_message_get_structure(msg), "rtsp_audio_codec", G_TYPE_STRING, &audio_codec, NULL); @@ -3507,8 +3474,6 @@ __mmplayer_gst_decode_callback(GstElement *elem, GstPad *pad, gpointer data) _mmplayer_update_content_attrs(player, ATTR_VIDEO); } - /* FIXIT : track number shouldn't be hardcoded */ - mm_attrs_set_int_by_name(attrs, "content_video_track_num", 1); player->videosink_linked = 1; sinkpad = gst_element_get_static_pad(GST_ELEMENT(sinkbin), "sink"); @@ -4849,9 +4814,6 @@ __mmplayer_gst_create_audio_pipeline(mm_player_t* player) gst_object_unref(pad); g_list_free(element_bucket); - - mm_attrs_set_int_by_name(attrs, "content_audio_found", TRUE); - MMPLAYER_FLEAVE(); return MM_ERROR_NONE; @@ -6409,8 +6371,7 @@ __mmplayer_gst_create_pipeline(mm_player_t* player) /* rtsp streamming */ case MM_PLAYER_URI_TYPE_URL_RTSP: { - gint network_bandwidth; - gchar *user_agent, *wap_profile; + gchar *user_agent; element = gst_element_factory_make("rtspsrc", "rtsp source"); @@ -6420,23 +6381,17 @@ __mmplayer_gst_create_pipeline(mm_player_t* player) } /* make it zero */ - network_bandwidth = 0; - user_agent = wap_profile = NULL; + user_agent = NULL; /* get attribute */ mm_attrs_get_string_by_name(attrs, "streaming_user_agent", &user_agent); - mm_attrs_get_string_by_name(attrs, "streaming_wap_profile", &wap_profile); - mm_attrs_get_int_by_name(attrs, "streaming_network_bandwidth", &network_bandwidth); SECURE_LOGD("user_agent : %s\n", user_agent); - SECURE_LOGD("wap_profile : %s\n", wap_profile); /* setting property to streaming source */ g_object_set(G_OBJECT(element), "location", player->profile.uri, NULL); if (user_agent) g_object_set(G_OBJECT(element), "user-agent", user_agent, NULL); - if (wap_profile) - g_object_set(G_OBJECT(element), "wap_profile", wap_profile, NULL); MMPLAYER_SIGNAL_CONNECT(player, G_OBJECT(element), MM_PLAYER_SIGNAL_TYPE_AUTOPLUG, "pad-added", G_CALLBACK(__mmplayer_gst_rtp_dynamic_pad), player); @@ -6448,9 +6403,9 @@ __mmplayer_gst_create_pipeline(mm_player_t* player) /* http streaming*/ case MM_PLAYER_URI_TYPE_URL_HTTP: { - gchar *user_agent, *proxy, *cookies, **cookie_list; + gchar *user_agent, *cookies, **cookie_list; gint http_timeout = DEFAULT_HTTP_TIMEOUT; - user_agent = proxy = cookies = NULL; + user_agent = cookies = NULL; cookie_list = NULL; gint mode = MM_PLAYER_PD_MODE_NONE; @@ -6471,11 +6426,8 @@ __mmplayer_gst_create_pipeline(mm_player_t* player) /* get attribute */ mm_attrs_get_string_by_name(attrs, "streaming_cookie", &cookies); mm_attrs_get_string_by_name(attrs, "streaming_user_agent", &user_agent); - mm_attrs_get_string_by_name(attrs, "streaming_proxy", &proxy); - mm_attrs_get_int_by_name(attrs, "streaming_timeout", &http_timeout); - if ((http_timeout == DEFAULT_HTTP_TIMEOUT) && - (player->ini.http_timeout != DEFAULT_HTTP_TIMEOUT)) { + if (player->ini.http_timeout != DEFAULT_HTTP_TIMEOUT) { LOGD("get timeout from ini\n"); http_timeout = player->ini.http_timeout; } @@ -6483,7 +6435,6 @@ __mmplayer_gst_create_pipeline(mm_player_t* player) /* get attribute */ SECURE_LOGD("location : %s\n", player->profile.uri); SECURE_LOGD("cookies : %s\n", cookies); - SECURE_LOGD("proxy : %s\n", proxy); SECURE_LOGD("user_agent : %s\n", user_agent); LOGD("timeout : %d\n", http_timeout); @@ -6492,9 +6443,6 @@ __mmplayer_gst_create_pipeline(mm_player_t* player) g_object_set(G_OBJECT(element), "timeout", http_timeout, NULL); g_object_set(G_OBJECT(element), "blocksize", (unsigned long)(64*1024), NULL); - /* check if proxy is valid or not */ - if (util_check_valid_url(proxy)) - g_object_set(G_OBJECT(element), "proxy", proxy, NULL); /* parsing cookies */ if ((cookie_list = util_get_cookie_list((const char*)cookies))) { g_object_set(G_OBJECT(element), "cookies", cookie_list, NULL); @@ -6576,10 +6524,7 @@ __mmplayer_gst_create_pipeline(mm_player_t* player) break; } - mm_attrs_get_int_by_name(attrs, "streaming_timeout", &http_timeout); - - if ((http_timeout == DEFAULT_HTTP_TIMEOUT) && - (player->ini.http_timeout != DEFAULT_HTTP_TIMEOUT)) { + if (player->ini.http_timeout != DEFAULT_HTTP_TIMEOUT) { LOGD("get timeout from ini\n"); http_timeout = player->ini.http_timeout; } @@ -7341,41 +7286,10 @@ static int __gst_start(mm_player_t* player) return ret; } -static void __mmplayer_do_sound_fadedown(mm_player_t* player, unsigned int time) -{ - MMPLAYER_FENTER(); - - MMPLAYER_RETURN_IF_FAIL(player - && player->pipeline - && player->pipeline->audiobin - && player->pipeline->audiobin[MMPLAYER_A_SINK].gst); - - g_object_set(G_OBJECT(player->pipeline->audiobin[MMPLAYER_A_SINK].gst), "mute", TRUE, NULL); - - usleep(time); - - MMPLAYER_FLEAVE(); -} - -static void __mmplayer_undo_sound_fadedown(mm_player_t* player) -{ - MMPLAYER_FENTER(); - - MMPLAYER_RETURN_IF_FAIL(player - && player->pipeline - && player->pipeline->audiobin - && player->pipeline->audiobin[MMPLAYER_A_SINK].gst); - - g_object_set(G_OBJECT(player->pipeline->audiobin[MMPLAYER_A_SINK].gst), "mute", FALSE, NULL); - - MMPLAYER_FLEAVE(); -} - static int __gst_stop(mm_player_t* player) { GstStateChangeReturn change_ret = GST_STATE_CHANGE_SUCCESS; MMHandleType attrs = 0; - gboolean fadedown = FALSE; gboolean rewind = FALSE; gint timeout = 0; int ret = MM_ERROR_NONE; @@ -7396,12 +7310,6 @@ static int __gst_stop(mm_player_t* player) return MM_ERROR_PLAYER_INTERNAL; } - mm_attrs_get_int_by_name(attrs, "sound_fadedown", &fadedown); - - /* enable fadedown */ - if (fadedown) - __mmplayer_do_sound_fadedown(player, MM_PLAYER_FADEOUT_TIME_DEFAULT); - /* Just set state to PAUESED and the rewind. it's usual player behavior. */ timeout = MMPLAYER_STATE_CHANGE_TIMEOUT(player); @@ -7414,10 +7322,6 @@ static int __gst_stop(mm_player_t* player) /* set gst state */ ret = __mmplayer_gst_set_state(player, player->pipeline->mainbin[MMPLAYER_M_PIPE].gst, GST_STATE_PAUSED, async, timeout); - /* disable fadeout */ - if (fadedown) - __mmplayer_undo_sound_fadedown(player); - /* return if set_state has failed */ if (ret != MM_ERROR_NONE) { LOGE("failed to set state.\n"); @@ -8799,7 +8703,6 @@ _mmplayer_realize(MMHandleType hplayer) mm_player_t* player = (mm_player_t*)hplayer; char *uri = NULL; void *param = NULL; - gboolean update_registry = FALSE; MMHandleType attrs = 0; int ret = MM_ERROR_NONE; @@ -8863,14 +8766,6 @@ _mmplayer_realize(MMHandleType hplayer) /* set the subtitle ON default */ player->is_subtitle_off = FALSE; - /* registry should be updated for downloadable codec */ - mm_attrs_get_int_by_name(attrs, "profile_update_registry", &update_registry); - - if (update_registry) { - LOGD("updating registry...\n"); - gst_update_registry(); - } - /* realize pipeline */ ret = __gst_realize(player); if (ret != MM_ERROR_NONE) @@ -10543,7 +10438,6 @@ __mmplayer_initialize_next_play(mm_player_t *player) } mm_attrs_set_int_by_name(player->attrs, "content_video_found", 0); - mm_attrs_set_int_by_name(player->attrs, "content_audio_found", 0); /* clean found parsers */ if (player->parsers) { @@ -10639,9 +10533,9 @@ __mmplayer_activate_next_source(mm_player_t *player, GstState target) } case MM_PLAYER_URI_TYPE_URL_HTTP: { - gchar *user_agent, *proxy, *cookies, **cookie_list; + gchar *user_agent, *cookies, **cookie_list; gint http_timeout = DEFAULT_HTTP_TIMEOUT; - user_agent = proxy = cookies = NULL; + user_agent = cookies = NULL; cookie_list = NULL; element = gst_element_factory_make(player->ini.httpsrc_element, "http_streaming_source"); @@ -10654,11 +10548,8 @@ __mmplayer_activate_next_source(mm_player_t *player, GstState target) /* get attribute */ mm_attrs_get_string_by_name(attrs, "streaming_cookie", &cookies); mm_attrs_get_string_by_name(attrs, "streaming_user_agent", &user_agent); - mm_attrs_get_string_by_name(attrs, "streaming_proxy", &proxy); - mm_attrs_get_int_by_name(attrs, "streaming_timeout", &http_timeout); - if ((http_timeout == DEFAULT_HTTP_TIMEOUT) && - (player->ini.http_timeout != DEFAULT_HTTP_TIMEOUT)) { + if (player->ini.http_timeout != DEFAULT_HTTP_TIMEOUT) { LOGD("get timeout from ini\n"); http_timeout = player->ini.http_timeout; } @@ -10666,7 +10557,6 @@ __mmplayer_activate_next_source(mm_player_t *player, GstState target) /* get attribute */ SECURE_LOGD("location : %s\n", player->profile.uri); SECURE_LOGD("cookies : %s\n", cookies); - SECURE_LOGD("proxy : %s\n", proxy); SECURE_LOGD("user_agent : %s\n", user_agent); LOGD("timeout : %d\n", http_timeout); @@ -10675,9 +10565,6 @@ __mmplayer_activate_next_source(mm_player_t *player, GstState target) g_object_set(G_OBJECT(element), "timeout", http_timeout, NULL); g_object_set(G_OBJECT(element), "blocksize", (unsigned long)(64*1024), NULL); - /* check if prosy is vailid or not */ - if (util_check_valid_url(proxy)) - g_object_set(G_OBJECT(element), "proxy", proxy, NULL); /* parsing cookies */ if ((cookie_list = util_get_cookie_list((const char*)cookies))) g_object_set(G_OBJECT(element), "cookies", cookie_list, NULL); @@ -11710,7 +11597,6 @@ __mmplayer_release_misc_post(mm_player_t* player) MMPLAYER_RETURN_IF_FAIL(player); mm_attrs_set_int_by_name(player->attrs, "content_video_found", 0); - mm_attrs_set_int_by_name(player->attrs, "content_audio_found", 0); /* clean found parsers */ if (player->parsers) { diff --git a/src/mm_player_tracks.c b/src/mm_player_tracks.c index 3398bb9..5001bee 100644 --- a/src/mm_player_tracks.c +++ b/src/mm_player_tracks.c @@ -352,7 +352,6 @@ void _mmplayer_track_destroy(mm_player_t* player) attrs = MMPLAYER_GET_ATTRS(player); if (attrs) { mm_attrs_set_int_by_name(attrs, "content_audio_track_num", 0); - mm_attrs_set_int_by_name(attrs, "content_video_track_num", 0); mm_attrs_set_int_by_name(attrs, "content_text_track_num", 0); if (mmf_attrs_commit(attrs)) diff --git a/src/mm_player_utils.c b/src/mm_player_utils.c index 20bb756..37b6057 100644 --- a/src/mm_player_utils.c +++ b/src/mm_player_utils.c @@ -108,22 +108,6 @@ util_get_cookie_list(const char *cookies) return cookie_list; } -bool util_check_valid_url(const char *proxy) -{ - struct in_addr proxy_addr; - bool ret = TRUE; - - MMPLAYER_RETURN_VAL_IF_FAIL(proxy, FALSE); - MMPLAYER_RETURN_VAL_IF_FAIL(strlen(proxy), FALSE); - - if (inet_aton(proxy, &proxy_addr) != 0) { - LOGW("invalid proxy is set. \n"); - ret = FALSE; - } - - return ret; -} - /* check the given path is indicating sdp file */ bool util_is_sdp_file(const char *path)