IF (CMAKE_DISABLE_FEATURE_MMS)
message("##Disable mms##")
ADD_DEFINITIONS("-DMP_FEATURE_DISABLE_MMS")
-# ADD_DEFINITIONS("-DMP_FEATURE_ALBUMART_UPDATE")
ENDIF (CMAKE_DISABLE_FEATURE_MMS)
IF (CMAKE_ENABLE_FEATURE_DROPBOX)
message("##enable dropbox##")
IF (CMAKE_DEBUG_MODE)
ADD_DEFINITIONS("-DMP_DEBUG_MODE")
-# ADD_DEFINITIONS("-DMP_FEATURE_ALBUMART_UPDATE")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
ENDIF (CMAKE_DEBUG_MODE)
#START_PUBLIC_REMOVED_STRING
if("${CMAKE_SYSTEM_VERSION}" STREQUAL "arm" OR "${CMAKE_SYSTEM_VERSION}" STREQUAL "armv7l")
ADD_DEFINITIONS("-D__ARM__")
-#ADD_DEFINITIONS("-DMP_3D_FEATURE")
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} -lstdc++ -lm -ldl)
#TARGET_LINK_LIBRARIES(${PROJECT_NAME} -ldali-adaptor -ldali-core -ldali-toolkit dali)
profile = mobile-3.0
# C Sources
-USER_SRCS = src/widget/mp-now-playing.c src/widget/mp-index.c src/widget/mp-shortcut.c src/core/mp-http-mgr.c src/view/mp-edit-view.c src/view/mp-genre-detail-view.c src/widget/mp-all-list.c src/widget/mp-artist-detail-list.c src/setting/src/ms-playlist.c src/widget/mp-track-list.c src/view/mp-folder-view.c src/core/mp-streaming-mgr.c src/view/mp-folder-detail-view.c src/core/mp-file-tag-info.c src/widget/mp-player-volume-widget.c src/widget/mp-notification.c src/core/mp-floating-widget-mgr.c src/widget/mp-folder-list.c src/view/mp-add-track-view.c src/core/mp-lyric-mgr.c src/common/mp-media-info.c src/widget/mp-genre-list.c src/common/mp-ta.c src/view/mp-create-playlist-view.c src/view/mp-all-view.c src/common/mp-util.c src/common/mp-edit-callback.c src/view/mp-player-view.c src/common/mp-file-util.c src/widget/mp-album-detail-list.c src/widget/mp-ctxpopup.c src/common/mp-menu.c src/core/mp-view-mgr.c src/core/mp-player-mgr.c src/common/mp-app.c src/widget/mp-album-list.c src/widget/mp-artist-list.c src/view/mp-search-view.c src/mp-main.c src/core/mp-player-drm.c src/view/mp-album-detail-view.c src/widget/mp-lyric.c src/view/mp-list-view.c src/setting/src/ms-util.c src/view/mp-now-playing-list-view.c src/common/mp-widget.c src/core/mp-inotify.c src/view/mp-artist-detail-view.c src/core/mp-collect-color-sort.c src/widget/mp-scroll-page.c src/widget/mp-lockscreenmini.c src/view/mp-playlist-detail-view.c src/view/mp-select-track-view.c src/widget/mp-smart-event-box.c src/common/mp-ug-launch.c src/common/mp-common.c src/widget/mp-search.c src/view/mp-set-as-view.c src/setting/src/ms-key-ctrl.c src/view/mp-setting-view.c src/widget/mp-popup.c src/core/mp-setting-ctrl.c src/core/mp-playlist-mgr.c src/view/mp-detail-view.c src/widget/mp-now-playing-list.c src/core/mp-volume.c src/setting/src/ms-auto-off.c src/core/mp-collect-color.c src/setting/src/ms-play-speed.c src/view/mp-view.c src/widget/mp-edit-playlist.c src/widget/mp-list.c src/core/mp-language-mgr.c src/core/mp-player-control.c src/common/mp-item.c src/widget/mp-playlist-list.c src/widget/mp-minicontroller.c src/common/mp-play.c src/widget/mp-search-list.c
+USER_SRCS = src/widget/mp-now-playing.c src/widget/mp-index.c src/widget/mp-shortcut.c src/core/mp-http-mgr.c src/view/mp-edit-view.c src/view/mp-genre-detail-view.c src/widget/mp-all-list.c src/widget/mp-artist-detail-list.c src/setting/src/ms-playlist.c src/widget/mp-track-list.c src/view/mp-folder-view.c src/core/mp-streaming-mgr.c src/view/mp-folder-detail-view.c src/core/mp-file-tag-info.c src/widget/mp-player-volume-widget.c src/widget/mp-notification.c src/core/mp-floating-widget-mgr.c src/widget/mp-folder-list.c src/view/mp-add-track-view.c src/core/mp-lyric-mgr.c src/common/mp-media-info.c src/widget/mp-genre-list.c src/common/mp-ta.c src/view/mp-create-playlist-view.c src/view/mp-all-view.c src/common/mp-util.c src/common/mp-edit-callback.c src/view/mp-player-view.c src/common/mp-file-util.c src/widget/mp-album-detail-list.c src/widget/mp-ctxpopup.c src/common/mp-menu.c src/core/mp-view-mgr.c src/core/mp-player-mgr.c src/common/mp-app.c src/widget/mp-album-list.c src/widget/mp-artist-list.c src/view/mp-search-view.c src/mp-main.c src/core/mp-player-drm.c src/view/mp-album-detail-view.c src/widget/mp-lyric.c src/view/mp-list-view.c src/setting/src/ms-util.c src/view/mp-now-playing-list-view.c src/common/mp-widget.c src/view/mp-artist-detail-view.c src/core/mp-collect-color-sort.c src/widget/mp-scroll-page.c src/widget/mp-lockscreenmini.c src/view/mp-playlist-detail-view.c src/view/mp-select-track-view.c src/widget/mp-smart-event-box.c src/common/mp-ug-launch.c src/common/mp-common.c src/widget/mp-search.c src/view/mp-set-as-view.c src/setting/src/ms-key-ctrl.c src/view/mp-setting-view.c src/widget/mp-popup.c src/core/mp-setting-ctrl.c src/core/mp-playlist-mgr.c src/view/mp-detail-view.c src/widget/mp-now-playing-list.c src/core/mp-volume.c src/setting/src/ms-auto-off.c src/core/mp-collect-color.c src/setting/src/ms-play-speed.c src/view/mp-view.c src/widget/mp-edit-playlist.c src/widget/mp-list.c src/core/mp-language-mgr.c src/core/mp-player-control.c src/common/mp-item.c src/widget/mp-playlist-list.c src/widget/mp-minicontroller.c src/common/mp-play.c src/widget/mp-search-list.c
# EDC Sources
USER_EDCS =
+++ /dev/null
-/*
-* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-*/
-
-#ifdef MP_3D_FEATURE
-#define COVER_FLOW_VOLUME_W 626
-#define COVER_FLOW_VOLUME_H 112
-#define COVER_FLOW_VOLUME_START_Y 400
-#define COVER_FLOW_INDICATOR_H 50
-#define COVER_FLOW_W 1280
-#define COVER_FLOW_H (720-COVER_FLOW_INDICATOR_H)
-#define COVER_FLOW_VOLUME_SX (((COVER_FLOW_W-COVER_FLOW_VOLUME_W)/2)/COVER_FLOW_VOLUME_W)
-#define COVER_FLOW_VOLUME_SY (COVER_FLOW_VOLUME_START_Y/COVER_FLOW_H)
-#define COVER_FLOW_VOLUME_EX (1-COVER_FLOW_VOLUME_SX)
-#define COVER_FLOW_VOLUME_EY ((COVER_FLOW_VOLUME_START_Y+COVER_FLOW_VOLUME_H)/COVER_FLOW_H)
-
-#define COVER_FLOW_PAD_W 8
-#define COVER_FLOW_BACK_BUTTON_W 104
-#define COVER_FLOW_BACK_BUTTON_H 74
-#define COVER_FLOW_TAP 10
-#define COVER_FLOW_ALL_TRACKS_PAD_W 20
-
-#define COVER_FLOW_CIRCLE_BACK_BT_BG "Cover_flow/T02_music_player_back_button.png"
-
-/* for now playing */
-#define COVER_FLOW_CIRCLE_BG "T02_music_player_circle_bg.png"
-#define COVER_FLOW_CIRCLE_PLAY "T02_music_player_circle_play.png"
-#define COVER_FLOW_CIRCLE_PAUSE "T02_music_player_circle_pause.png"
-#define COVER_FLOW_NOW_PLAYING_H 88
-#define COVER_FLOW_THUMB_SIZE COVER_FLOW_NOW_PLAYING_H
-#define COVER_FLOW_CIRCLE_BG_SIZE 64
-#define COVER_FLOW_CIRCLE_BG_SX ((COVER_FLOW_THUMB_SIZE-COVER_FLOW_CIRCLE_BG_SIZE)/2)
-#define COVER_FLOW_CIRCLE_BG_EX (COVER_FLOW_CIRCLE_BG_SIZE+COVER_FLOW_CIRCLE_BG_SX)
-#define COVER_FLOW_CIRCLE_BG_SY ((COVER_FLOW_THUMB_SIZE-COVER_FLOW_CIRCLE_BG_SIZE)/2)
-#define COVER_FLOW_CIRCLE_BG_EY (COVER_FLOW_CIRCLE_BG_SIZE+COVER_FLOW_CIRCLE_BG_SY)
-
-/* for all tracks */
-#define COVER_FLOW_EXPAND_CIRCLE_BG "Cover_flow/T02_music_expand_circle_bg.png"
-#define COVER_FLOW_EXPAND_CIRCLE_OPEN "Cover_flow/T02_music_expand_circle_open.png"
-#define COVER_FLOW_EXPAND_CIRCLE_CLOSE "Cover_flow/T02_music_expand_circle_close.png"
-#define COVER_FLOW_EXPAND_CIRCLE_BG_SIZE COVER_FLOW_CIRCLE_BG_SIZE
-#define COVER_FLOW_EXPAND_CIRCLE_CLICK_OFFSET 25
-#define COVER_FLOW_ALL_TRACKS_PAD_W 20
-
-#define COVER_FLOW_DIM_COLOR 0 0 0 100
-group {
- name: "3d-layout";
-
- images {
- image: COVER_FLOW_CIRCLE_BACK_BT_BG COMP;
- }
-
- parts {
- part { name: "background";
- type: RECT;
- mouse_events: 1;
- description {
- state: "default" 0.0;
- rel1 { relative: 0.0 0.0; }
- rel2 { relative: 1.0 1.0; }
- color: 0 0 0 0;
- }
- }
-
- part {
- name : "content";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- rel1 { relative: 0.0 0.0;to: "background";}
- rel2 { relative: 1.0 1.0;to: "background";}
- }
- }
-
- part {
- name : "genlist_ly";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- visible:0;
- state: "default" 0.0;
- rel1 { relative: 0.3 1.0;to: "content";}
- rel2 { relative: 0.7 2.0;to: "content";}
- }
- description {
- visible:1;
- state: "normal" 0.0;
- rel1 { relative: 0.3 0.0;to: "content";}
- rel2 { relative: 0.7 1.0;to: "content";}
- }
- description {
- visible:1;
- state: "bottom" 0.0;
- rel1 { relative: 0.3 1.0;to: "content";}
- rel2 { relative: 0.7 2.0;to: "content";}
- }
- }
-
- part {
- name : "now_playing";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 COVER_FLOW_NOW_PLAYING_H;
- fixed: 0 1;
- visible: 1;
- align: 0 0;
- rel1 { relative: 0.02 0.02;to: "content";}
- rel2 { relative: 0.27 0.02;to: "content";}
- }
- }
-
- part {
- name : "all_tracks";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 COVER_FLOW_EXPAND_CIRCLE_BG_SIZE;
- fixed: 0 1;
- visible: 1;
- align: 1 0;
- rel1 { relative: 0.8 0.02; to: "content";}
- rel2 { relative: 1.0 0.02; offset: 0 COVER_FLOW_EXPAND_CIRCLE_BG_SIZE; to: "content";}
- }
- }
-
- part { name: "back_button_bg";
- type : IMAGE;
- scale: 1;
- mouse_events: 1;
- description { state: "default" 0.0;
- visible: 1;
- min: COVER_FLOW_BACK_BUTTON_W COVER_FLOW_BACK_BUTTON_H;
- fixed: 1 1;
- align: 1.0 1.0;
- rel1 { relative: 1.0 1.0;
- offset: (-COVER_FLOW_TAP) (-COVER_FLOW_TAP);
- to, "background";
- }
- rel2 { relative: 1.0 1.0;
- offset: (-COVER_FLOW_TAP) (-COVER_FLOW_TAP);
- to, "background";
- }
- image {
- normal: COVER_FLOW_CIRCLE_BACK_BT_BG;
- border : 6 6 0 0;
- border_scale: 1;
- }
- }
- }
-
- part { name: "back_button";
- type : SWALLOW;
- scale: 1;
- mouse_events: 1;
- description { state: "default" 0.0;
- visible: 1;
- min: COVER_FLOW_BACK_BUTTON_W COVER_FLOW_BACK_BUTTON_H;
- fixed: 1 1;
- align: 0.5 0.5;
- rel1 { relative: 0.0 0.0;
- offset: 0.0 0.0;
- to, "back_button_bg";
- }
- rel2 { relative: 1.0 1.0;
- offset: 0.0 0.0;
- to, "back_button_bg";
- }
- }
- }
- part {
- name : "dim_area1";
- type: RECT;
- mouse_events: 1;
- scale: 1;
- description {
- visible:0;
- state: "default" 0.0;
- rel1 { relative: 0.0 0.0;to: "content";}
- rel2 { relative: 0.3 1.0;to: "content";}
- color: COVER_FLOW_DIM_COLOR;
- }
-
- description {
- state: "dim" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
-
- part {
- name : "dim_area2";
- type: RECT;
- mouse_events: 1;
- scale: 1;
- description {
- visible:0;
- state: "default" 0.0;
- rel1 { relative: 0.7 0.0;to: "content";}
- rel2 { relative: 1.0 1.0;to: "content";}
- color: COVER_FLOW_DIM_COLOR;
- }
-
- description {
- state: "dim" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
-
- part { name: "volume_layout";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- rel1 { relative: COVER_FLOW_VOLUME_SX COVER_FLOW_VOLUME_SY; to: "background"; }
- rel2 { relative: COVER_FLOW_VOLUME_EX COVER_FLOW_VOLUME_EY; to: "background"; }
- }
- }
- }
-
- programs {
- program { name: "show_track_list";
- signal: "show_track_list";
- source: "genlist_ly";
- action: STATE_SET "bottom" 0.0;
- target: "genlist_ly";
- after :"set_normal";
- }
-
- program { name: "set_normal";
- signal: "set_normal";
- source: "genlist_ly";
- action: STATE_SET "normal" 0.0;
- target: "genlist_ly";
- transition: LINEAR 0.5;
- after :"show_dim";
- }
-
- program { name: "hide_track_list";
- signal: "hide_track_list";
- source: "genlist_ly";
- action: STATE_SET "normal" 0.0;
- target: "genlist_ly";
- after :"set_bottom";
- }
-
- program { name: "set_bottom";
- signal: "set_bottom";
- source: "genlist_ly";
- action: STATE_SET "bottom" 0.0;
- target: "genlist_ly";
- transition: LINEAR 0.5;
- after :"hide_dim";
- }
-
- program { name: "show_dim";
- signal: "show_dim";
- source: "dim_area1";
- source: "dim_area2";
- action: STATE_SET "dim" 0.0;
- target: "dim_area1";
- target: "dim_area2";
- }
-
- program { name: "hide_dim";
- signal: "hide_dim";
- source: "dim_area1";
- source: "dim_area2";
- action: STATE_SET "default" 0.0;
- target: "dim_area1";
- target: "dim_area2";
- }
-
- program {
- name: "dim_area1_clicked";
- source: "dim_area1";
- signal: "mouse,up,1";
- after: "hide_track_list";
- }
-
- program {
- name: "dim_area2_clicked";
- source: "dim_area2";
- signal: "mouse,up,1";
- after: "hide_track_list";
- }
- }
-}
-
-group {
- name: "3d-genlist";
- parts {
- part { name: "background";
- type: RECT;
- mouse_events: 1;
- description {
- state: "default" 0.0;
- rel1 { relative: 0.0 0.0; }
- rel2 { relative: 1.0 1.0; }
- color: 0 0 0 229;
- }
- }
-
- part {
- name : "list_content";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- rel1 { relative: 0.0 0.0;to: "background";}
- rel2 { relative: 1.0 1.0;to: "background";}
- }
- }
- }
-}
-
-group {
- name: "3d-now-playing";
-
- images {
- image: COVER_FLOW_CIRCLE_BG COMP;
- image: COVER_FLOW_CIRCLE_PLAY COMP;
- image: COVER_FLOW_CIRCLE_PAUSE COMP;
- }
-
- parts {
- part { name: "background";
- type: RECT;
- mouse_events: 1;
- description {
- state: "default" 0.0;
- min: 0 COVER_FLOW_NOW_PLAYING_H;
- fixed: 0 1;
- align: 0 0;
- rel1 { relative: 0.0 0.0; }
- rel2 { relative: 1.0 1.0; }
- color: 0 0 0 0;
- }
- }
-
- part {
- name : "thumb_image";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- min: COVER_FLOW_THUMB_SIZE COVER_FLOW_THUMB_SIZE;
- max: COVER_FLOW_THUMB_SIZE COVER_FLOW_THUMB_SIZE;
- visible: 1;
- fixed: 1 1;
- align: 0.0 0.5;
- rel1 { relative: 0 0;to: "background";}
- rel2 { relative: 1 1;to: "background";}
- }
- }
-
- part { name: "innerline.top";
- type: RECT;
- scale: 1;
- mouse_events: 0;
- description { state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- align: 0 0;
- min: 1 1;
- rel1 {relative: 0.0 0.0; to, "thumb_image";}
- rel2 {relative: 1.0 0.0; to, "thumb_image";}
- color: MP_COLOR_BG_BLACK;
- }
- }
-
- part { name: "innerline.bottom";
- type: RECT;
- scale: 1;
- mouse_events: 0;
- description { state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- align: 0 0;
- min: 1 1;
- rel1 {relative: 0.0 1.0; to, "thumb_image";}
- rel2 {relative: 1.0 1.0; to, "thumb_image";}
- color: MP_COLOR_BG_BLACK;
- }
- }
-
- part { name: "innerline.left";
- type: RECT;
- scale: 1;
- mouse_events: 0;
- description { state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- align: 0 0;
- min: 1 1;
- rel1 {relative: 0.0 0.0; to, "thumb_image";}
- rel2 {relative: 0.0 1.0; to, "thumb_image";}
- color: MP_COLOR_BG_BLACK;
- }
- }
-
- part { name: "innerline.right";
- type: RECT;
- scale: 1;
- mouse_events: 0;
- description { state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- align: 0 0;
- min: 1 1;
- rel1 {relative: 1.0 0.0; to, "thumb_image";}
- rel2 {relative: 1.0 1.0; to, "thumb_image";}
- color: MP_COLOR_BG_BLACK;
- }
- }
-
- part { name, "now_playing_bg";
- type, IMAGE;
- scale: 1;
- mouse_events: 1;
- description {
- state: "default" 0.0;
- image { normal: COVER_FLOW_CIRCLE_BG; }
- //min: COVER_FLOW_CIRCLE_BG_SIZE COVER_FLOW_CIRCLE_BG_SIZE;
- //max: COVER_FLOW_CIRCLE_BG_SIZE COVER_FLOW_CIRCLE_BG_SIZE;
- visible: 1;
- fixed: 1 1;
- align: 0.5 0.5;
- rel1 {
- relative: COVER_FLOW_CIRCLE_BG_SX/COVER_FLOW_THUMB_SIZE COVER_FLOW_CIRCLE_BG_SY/COVER_FLOW_THUMB_SIZE;
- offset: 0 0;
- to: "thumb_image";
- }
- rel2 {
- relative: COVER_FLOW_CIRCLE_BG_EX/COVER_FLOW_THUMB_SIZE COVER_FLOW_CIRCLE_BG_EY/COVER_FLOW_THUMB_SIZE;
- offset: 0 0;
- to: "thumb_image";
- }
- }
- }
-
- part { name, "now_playing_arrow";
- type, IMAGE;
- scale: 1;
- mouse_events: 0;
- description {
- state: "default" 0.0;
- image { normal: COVER_FLOW_CIRCLE_PLAY; }
- visible: 1;
- align: 0.5 0.5;
- rel1 {
- relative: 0.0 0.0;
- offset: 0 0;
- to: "now_playing_bg";
- }
- rel2 {
- relative: 1.0 1.0;
- offset: 0 0;
- to: "now_playing_bg";
- }
- }
- description {
- state: "pause" 0.0;
- inherit: "default" 0.0;
- image { normal: COVER_FLOW_CIRCLE_PAUSE; }
- }
- }
-
- part { name: "track_name";
- type: TEXT;
- scale: 1;
- description { state: "default" 0.0;
- align: 0.0 0.5;
- rel1 {
- relative: 1.0 0.0;
- offset: COVER_FLOW_PAD_W 0;
- to: "thumb_image";
- }
- rel2 {
- relative: 1.0 0.5;
- offset: 0 0;
- to: "background";
- }
- color: 7 180 211 255;
- text {
- font: FONT_STYLE_REGULAR;
- size: 35;
- min: 0 1;
- align: 0.0 0.5;
- }
- }
- }
-
- part { name: "artist_name";
- type: TEXT;
- scale: 1;
- description { state: "default" 0.0;
- align: 0.0 0.0;
- rel1 {
- relative: 1.0 0.5;
- offset: COVER_FLOW_PAD_W 0;
- to: "thumb_image";
- }
- rel2 {
- relative: 1.0 1.0;
- offset: 0 0;
- to: "background";
- }
- color: 122 122 122 255;
- text {
- font: FONT_STYLE_REGULAR;
- size: 28;
- min: 0 1;
- align: 0.0 0.0;
- }
- }
- }
- }
-
- programs {
- program {
- name: "now_playing_clicked";
- source: "now_playing_bg";
- signal: "mouse,clicked,1";
- action: SIGNAL_EMIT "now_playing_clicked" 0.0;
- }
- program {
- name: "pause";
- source: "now_playing_arrow";
- signal: "pause";
- action: STATE_SET "pause" 0.0;
- target: "now_playing_arrow";
- }
- program {
- name: "play";
- source: "now_playing_arrow";
- signal: "play";
- action: STATE_SET "default" 0.0;
- target: "now_playing_arrow";
- }
-
- }
-}
-
-group {
- name: "3d-all-tracks";
- parts {
-
- images {
- image: COVER_FLOW_EXPAND_CIRCLE_BG COMP;
- image: COVER_FLOW_EXPAND_CIRCLE_OPEN COMP;
- image: COVER_FLOW_EXPAND_CIRCLE_CLOSE COMP;
- }
-
- part { name: "background";
- type: RECT;
- mouse_events: 1;
- description {
- state: "default" 0.0;
- min: COVER_FLOW_EXPAND_CIRCLE_BG_SIZE COVER_FLOW_EXPAND_CIRCLE_BG_SIZE;
- fixed: 0 1;
- align: 0 0;
- rel1 { relative: 0.0 0.0; }
- rel2 { relative: 1.0 1.0; }
- color: 0 0 0 0;
- }
- }
-
- part { name, "expand_circle_bg";
- type, IMAGE;
- scale: 1;
- mouse_events: 1;
- description {
- state: "default" 0.0;
- image { normal: COVER_FLOW_CIRCLE_BG; }
- min: COVER_FLOW_EXPAND_CIRCLE_BG_SIZE COVER_FLOW_EXPAND_CIRCLE_BG_SIZE;
- max: COVER_FLOW_EXPAND_CIRCLE_BG_SIZE COVER_FLOW_EXPAND_CIRCLE_BG_SIZE;
- visible: 1;
- fixed: 1 1;
- align: 1.0 0.5;
- rel1 {
- relative: 0.0 0.0;
- offset: 0 0;
- to: "background";
- }
- rel2 {
- relative: 1.0 1.0;
- offset: -COVER_FLOW_ALL_TRACKS_PAD_W 0;
- to: "background";
- }
- }
- }
-
- part { name, "expand_circle";
- type, IMAGE;
- scale: 1;
- mouse_events: 1;
- description {
- state: "default" 0.0;
- image { normal: COVER_FLOW_EXPAND_CIRCLE_CLOSE; }
- visible: 1;
- align: 0.5 0.5;
- rel1 {
- relative: 0.0 0.0;
- offset: 0 0;
- to: "expand_circle_bg";
- }
- rel2 {
- relative: 1.0 1.0;
- offset: 0 0;
- to: "expand_circle_bg";
- }
- }
- description {
- state: "open" 0.0;
- inherit: "default" 0.0;
- image { normal: COVER_FLOW_EXPAND_CIRCLE_OPEN; }
- }
- }
-
- part { name: "click_area";
- type: RECT;
- mouse_events: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- align: 0 0;
- rel1 {
- relative: 0.0 0.0;
- offset: (-COVER_FLOW_EXPAND_CIRCLE_CLICK_OFFSET) (-COVER_FLOW_EXPAND_CIRCLE_CLICK_OFFSET);
- to: "expand_circle";
- }
- rel2 {
- relative: 1.0 1.0;
- offset: COVER_FLOW_EXPAND_CIRCLE_CLICK_OFFSET COVER_FLOW_EXPAND_CIRCLE_CLICK_OFFSET;
- to: "expand_circle";
- }
- color: 0 0 0 0;
- }
- }
-
- part { name: "all_tracks_text";
- type: TEXT;
- scale: 1;
- mouse_events: 1;
- description { state: "default" 0.0;
- align: 1.0 0.5;
- rel1 {
- relative: 0.0 0.0;
- offset: 0 0;
- to: "background";
- }
- rel2 {
- relative: 0.0 1.0;
- offset: -COVER_FLOW_ALL_TRACKS_PAD_W 0;
- to_x: "expand_circle_bg";
- to_y: "background";
- }
- color: 255 255 255 255;
- text {
- font: FONT_STYLE_REGULAR;
- size: 32;
- min: 0 1;
- //text: "All Tracks";
- text: "";
- align: 1.0 0.5;
- }
- }
- }
- }
-
- programs {
- program {
- name: "expand_circle_clicked";
- source: "click_area";
- signal: "mouse,clicked,1";
- action: SIGNAL_EMIT "expand_circle_clicked" 0.0;
- }
- program {
- name: "open";
- source: "expand_circle";
- signal: "open";
- action: STATE_SET "open" 0.0;
- target: "expand_circle";
- }
- program {
- name: "close";
- source: "expand_circle";
- signal: "close";
- action: STATE_SET "default" 0.0;
- target: "expand_circle";
- }
- }
-}
-#endif
transition: LINEAR 0.3;\
}
-#ifdef MP_3D_FEATURE
-group {
- name: "mp_play_view_base";
-
- parts {
- part {
- name: "bg";
- mouse_events: 0;
- type: RECT;
- description {
- state: "default" 0.0;
- visible: 1;
- rel1 { relative: 0.0 0.0;}
- rel2 { relative: 1.0 1.0;}
- color: 0 0 0 0;
- }
- }
-
- part {
- name : "now_playing";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- align: 0 0;
- min: 0 100;
- fixed: 0 1;
- visible: 0;
- rel1 { relative: 0.0 0.0;}
- rel2 { relative: 1.0 0.0;}
-
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
-
- part {
- name : "content";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- rel1 { relative: 0.0 0.0;}
- rel2 { relative: 1.0 1.0;}
- }
- description {
- state: "show" 0.0;
- rel1 { relative: 0.0 1.0; to_y: "now_playing"; offset: 0 1;}
- rel2 { relative: 1.0 1.0;}
- }
- }
-
- part {
- name: "elm.swallow.content.selectioninfo";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- align: 0.0 1.0;
- min: 0 PLAYVIEW_SELECTINFO_H;
- fixed: 0 1;
- visible: 1;
- rel1 {
- relative: 0.0 PLAYVIEW_CONTROLBAR_SY;
- }
- rel2 {
- relative: 1.0 PLAYVIEW_CONTROLBAR_SY;
- }
- }
- description { state: "hide" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }
- }
-
- programs {
- program {
- name : "show_now_playng";
- signal : "SHOW_NOW_PLAING";
- source : "music_app";
- action : STATE_SET "show" 0.0;
- target : "now_playing";
- target : "content";
- }
- program {
- name : "hide_now_playng";
- signal : "HIDE_NOW_PLAING";
- source : "music_app";
- action : STATE_SET "default" 0.0;
- target : "now_playing";
- target : "content";
- }
- program {
- name: "show";
- signal: "show,selection,info";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "elm.swallow.content.selectioninfo";
- }
- program {
- name: "hide";
- signal: "hide,selection,info";
- source: "elm";
- action: STATE_SET "hide" 0.0;
- target: "elm.swallow.content.selectioninfo";
- }
- }
-}
-#endif
-
group {
name: "mp_play_view_layout";
#include "mp-play-mini-app.edc"
#include "mp-play-option.edc"
#include "mp-motion-popup.edc"
-#ifdef MP_3D_FEATURE
- #include "mp-3d-view.edc"
-#endif
#ifdef MP_SQUARE_FEATURE
#include "mp-square-view.edc"
bool mp_app_noti_init(void *data);
bool mp_app_noti_ignore(void *data);
-#ifdef MP_ENABLE_INOTIFY
-int mp_app_inotify_init(void *data);
-void mp_app_inotify_finalize(struct appdata *ad);
-int mp_app_inotify_add_watch(const char *path, mp_inotify_cb callback, void *user_data);
-int mp_app_inotify_rm_watch(int index);
-#endif
-
Eina_Bool mp_app_key_down_cb(void *data, int type, void *event);
Eina_Bool mp_app_key_up_cb(void *data, int type, void *event);
Eina_Bool mp_app_mouse_event_cb(void *data, int type, void *event);
#include "mp-common.h"
#endif
-#ifdef MP_3D_FEATURE
-#include "dali-music.h"
-#endif
-
#include <storage/storage.h>
void mp_play_next_and_updateview(void *data);
#define USB_STORAGE_REMOVED "removed"
#endif
-#ifdef MP_ENABLE_INOTIFY
-static void _mp_add_inofity_refresh_watch(struct appdata *ad);
-#endif
-
static Eina_Bool
_mp_app_ear_key_timer_cb(void *data)
{
}
#endif
-#ifdef MP_ENABLE_INOTIFY
- _mp_add_inofity_refresh_watch(ad);
-#endif
MpView_t *view = mp_view_mgr_get_view(GET_VIEW_MGR, MP_VIEW_PLAYER);
if (view) {
mp_view_update_options((MpView_t *)view);
#include "mp-edit-playlist.h"
#include "mp-file-util.h"
-#ifdef MP_3D_FEATURE
-#endif
-
#define MP_POPUP_DETAIL_ITEM_W 568
#define MP_POPUP_DETAIL_ITEM_H 50
#define MP_STR_LEN_MAX 4096
static int __mp_media_info_get_thumbnail_path(media_info_h media, char **path)
{
int res = 0;
-#ifdef MP_FEATURE_ALBUMART_UPDATE
- char *media_id = NULL;
- char *albumart_path = NULL;
- media_info_get_media_id(media, &media_id);
- albumart_path = mp_albumart_path_get(media_id);
-
- IF_FREE(media_id);
- if (albumart_path) {
- *path = albumart_path;
- } else
-#endif
- {
- media_info_get_thumbnail_path(media, path);
- if (res != MEDIA_CONTENT_ERROR_NONE) {
- ERROR_TRACE("Error code 0x%x", res);
- }
+ media_info_get_thumbnail_path(media, path);
+ if (res != MEDIA_CONTENT_ERROR_NONE) {
+ ERROR_TRACE("Error code 0x%x", res);
}
return res;
#include "mp-common.h"
#endif
-#ifdef MP_FEATURE_CONTEXT_ENGINE
-#include "mp-context.h"
-#endif
-
extern bool track_deleted;
static Eina_Bool
#endif
mp_setting_set_nowplaying_id(getpid());
-#ifdef MP_3D_FEATURE
- /* Get latest playing info */
- mp_coverflow_view_update(ad, MP_CF_VIEW_UPDATE_NOWPLAYING);
- /* Get latest album */
- mp_coverflow_view_update(ad, MP_CF_VIEW_UPDATE_SELECTED_ALBUM);
-#endif
- endfunc;
return TRUE;
}
ad->live_pos_timer = ecore_timer_add(1, _mp_play_set_pos, ad);
}
mp_util_set_livebox_update_timer();
-
-#ifdef MP_FEATURE_DRM_CONSUMPTION
- mp_drm_start_consumption(item->uri);
-#endif
mp_util_sleep_lock_set(TRUE, FALSE);
if (!ad->win_minicon) {
mp_setting_set_player_state(MP_PLAY_STATE_PLAYING);
mp_app_grab_mm_keys(ad);
-#ifdef MP_FEATURE_CONTEXT_ENGINE
- mp_context_log_insert(ad, true);
- mp_context_notify_playback(true, item->uri);
-#endif
-
#ifdef MP_FEATURE_AUTO_OFF
mp_ecore_timer_del(ad->pause_off_timer);
#endif
preference_set_int(PREF_MUSIC_STATE, PREF_MUSIC_PAUSE);
}
-#ifdef MP_FEATURE_DRM_CONSUMPTION
- mp_drm_pause_consumption();
-#endif
mp_util_sleep_lock_set(FALSE, FALSE);
if (ad->win_minicon) {
mp_setting_save_playing_info(ad);
#endif
-#ifdef MP_FEATURE_DRM_CONSUMPTION
- mp_drm_stop_consumption();
- mp_drm_set_consumption(FALSE);
-#endif
mp_util_sleep_lock_set(FALSE, FALSE);
if (ad->current_track_info) {
mp_setting_set_player_state(MP_PLAY_STATE_STOP);
mp_player_view_update_buffering_progress(GET_PLAYER_VIEW, -1);
-#ifdef MP_FEATURE_CONTEXT_ENGINE
- mp_context_log_insert(ad, false);
- mp_context_notify_playback(false, NULL);
-#endif
-
endfunc;
}
preference_set_int(PREF_MUSIC_STATE, PREF_MUSIC_PLAY);
-#ifdef MP_FEATURE_DRM_CONSUMPTION
- mp_drm_resume_consumption();
-#endif
mp_util_sleep_lock_set(TRUE, FALSE);
if (!ad->win_minicon) {
mp_view_mgr_post_event(GET_VIEW_MGR, MP_UNSET_NOW_PLAYING);
mp_view_mgr_post_event(GET_VIEW_MGR, MP_PAUSE_PLAYBACK);
mp_view_update(mp_view_mgr_get_view(GET_VIEW_MGR, MP_VIEW_ALL));
-#ifdef MP_3D_FEATURE
- if (ad->coverflow_view && ad->coverflow_view->back_button) {
- mp_coverflow_view_back_2d_view(ad);
- }
-#endif
-
#endif
if (ad->b_minicontroller_show) {
int mp_music_view_mgr_init(void);
int mp_music_view_mgr_release(void);
-//#ifdef MP_FEATURE_MUSIC_VIEW
char * mp_music_view_mgr_exe(char *filename, int *length);
-
-//#endif
-
#endif
bool mp_drm_get_content_info(const char *path, drm_content_info_e first_info, ...);
void mp_drm_set_notify(void *data, char *message);
-#ifdef MP_FEATURE_DRM_CONSUMPTION
-void mp_drm_set_consumption(bool enabled);
-bool mp_drm_get_consumption(void);
-void mp_drm_start_consumption(char *path);
-void mp_drm_pause_consumption(void);
-void mp_drm_resume_consumption(void);
-void mp_drm_stop_consumption(void);
-#endif
bool mp_drm_file_right(char *path);
bool mp_drm_is_initialized(char *path);
bool mp_drm_has_valid_ro(char *path);
+++ /dev/null
-/*
-* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-*/
-
-#ifdef MP_ENABLE_INOTIFY
-/* #define MP_WATCH_FLAGS IN_CREATE | IN_DELETE | IN_CLOSE_WRITE | IN_MODIFY */
-#define MP_WATCH_FLAGS IN_CREATE | IN_DELETE | IN_DELETE_SELF | IN_CLOSE_WRITE | IN_MOVED_TO
-
-#define MP_EVENT_SIZE (sizeof (struct inotify_event))
-/** reasonable guess as to size of 1024 events */
-#define MP_EVENT_BUF_LEN (1024 * (MP_EVENT_SIZE + 16))
-#define INOTI_FOLDER_COUNT_MAX 1024
-
-typedef struct _mp_inotify_t {
- int fd;
- GList *wd_list;
- unsigned int prev_event;
- pthread_t monitor;
- mp_inotify_cb callback;
- void *u_data;
-} mp_inotify_t;
-
-static pthread_mutex_t mp_noti_lock;
-static mp_inotify_t *g_handle;
-
-static void
-_mp_app_inotify_handle_free(void)
-{
- pthread_mutex_destroy(&mp_noti_lock);
-
- if (g_handle) {
- if (g_handle->fd >= 0) {
- close(g_handle->fd);
- g_handle->fd = -1;
- }
- g_free(g_handle);
- g_handle = NULL;
- }
-
- return;
-}
-
-static mp_inotify_t *
-_mp_app_inotify_handle_init(void)
-{
- _mp_app_inotify_handle_free();
- g_handle = g_new0(mp_inotify_t, 1);
-
- if (g_handle) {
- g_handle->fd = -1;
- pthread_mutex_init(&mp_noti_lock, NULL);
- }
-
- return g_handle;
-}
-
-static void
-_mp_app_inotify_thread_clean_up(void *data)
-{
- pthread_mutex_t *lock = (pthread_mutex_t *) data;
- DEBUG_TRACE("Thread cancel Clean_up function");
- if (lock) {
- pthread_mutex_unlock(lock);
- }
- return;
-}
-
-
-static gpointer
-_mp_app_inotify_watch_thread(gpointer user_data)
-{
- mp_inotify_t *handle = (mp_inotify_t *) user_data;
- int oldtype = 0;
-
- mp_retvm_if(handle == NULL, NULL, "handle is NULL");
- DEBUG_TRACE("Create _mp_app_inotify_watch_thread!!! ");
-
- pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);
-
- while (1) {
- ssize_t len = 0;
- ssize_t i = 0;
- char event_buff[MP_EVENT_BUF_LEN] = { 0, };
-
- if (handle->fd < 0) {
- ERROR_TRACE("fd is not a vaild one");
- pthread_exit(NULL);
- }
-
- len = read(handle->fd, event_buff, sizeof(event_buff) - 1);
- if (len <= 0 || len > sizeof(event_buff) - 1) {
-
- }
-
- while (i < len) {
- struct inotify_event *pevent = (struct inotify_event *)&event_buff[i];
- mp_inotify_event s_event = MP_INOTI_NONE;
-
- if (pevent->len && strncmp(pevent->name, ".", 1) == 0) {
- s_event = MP_INOTI_NONE;
- } else if (pevent->mask & IN_ISDIR) { /* directory */
- /*
- if (pevent->mask & IN_DELETE_SELF)
- s_event = MP_INOTI_DELETE_SELF;
-
- if (pevent->mask & IN_MOVE_SELF)
- s_event = MP_INOTI_MOVE_SELF;
-
- if (pevent->mask & IN_CREATE)
- s_event = MP_INOTI_CREATE;
-
- if (pevent->mask & IN_DELETE)
- s_event = MP_INOTI_DELETE;
-
- if (pevent->mask & IN_MOVED_FROM)
- s_event = MP_INOTI_MOVE_OUT;
-
- if (pevent->mask & IN_MOVED_TO)
- s_event = MP_INOTI_MOVE_IN;
- */
- } else { /* file */
- if (pevent->mask & IN_CREATE) {
- s_event = MP_INOTI_NONE;
- handle->prev_event = IN_CREATE;
- }
-
- if (pevent->mask & IN_CLOSE_WRITE) {
- if (handle->prev_event == IN_CREATE) {
- s_event = MP_INOTI_CREATE;
- }
- handle->prev_event = MP_INOTI_NONE;
- }
-
- if (pevent->mask & IN_DELETE) {
- s_event = MP_INOTI_DELETE;
- }
-
- if (pevent->mask & IN_MODIFY) {
- s_event = MP_INOTI_MODIFY;
- }
-
- if (pevent->mask & IN_MOVED_TO) {
- s_event = MP_INOTI_MOVE_OUT;
- }
- }
-
- if (s_event != MP_INOTI_NONE) {
- pthread_cleanup_push(_mp_app_inotify_thread_clean_up, (void *)&mp_noti_lock);
- pthread_mutex_lock(&mp_noti_lock);
- if (handle->callback) {
- handle->callback(s_event, (pevent->len) ? pevent->name : NULL, handle->u_data);
- }
- pthread_mutex_unlock(&mp_noti_lock);
- pthread_cleanup_pop(0);
- }
-
- i += sizeof(struct inotify_event) + pevent->len;
-
- if (i >= MP_EVENT_BUF_LEN) {
- break;
- }
- }
- }
-
- DEBUG_TRACE("end _mp_app_inotify_watch_thread!!! ");
-
- return NULL;
-}
-
-Ecore_Timer *_g_inotyfy_timer = NULL;
-
-static Eina_Bool
-_mp_app_inotify_timer_cb(void *data)
-{
- TIMER_TRACE();
- bool b_invalid_playing_file = false;
- struct appdata *ad = (struct appdata *)data;
- MP_CHECK_FALSE(ad);
-
- if (ad->edit_in_progress) {
- DEBUG_TRACE("editing in progress. not refresh list...");
- return false;
- }
-
- DEBUG_TRACE("update view");
-
- mp_plst_item *current_item = mp_playlist_mgr_get_current(ad->playlist_mgr);
-
- if (current_item) {
- if (mp_util_is_streaming(current_item->uri)) {
- mp_debug("http uri path");
- } else if (!g_file_test(current_item->uri, G_FILE_TEST_EXISTS)) {
- mp_play_stop_and_updateview(ad, FALSE);
- b_invalid_playing_file = true;
- }
- }
-
-#ifndef MP_SOUND_PLAYER
- mp_library_update_view(ad);
-#endif
- _g_inotyfy_timer = NULL;
- return EINA_FALSE;
-}
-
-static void
-_mp_app_inotify_cb(mp_inotify_event event, char *path, void *data)
-{
- DEBUG_TRACE("file operation occured...");
-
- struct appdata *ad = (struct appdata *)data;
-
- MP_CHECK(path);
-
- ecore_pipe_write(ad->inotify_pipe, path, strlen(path));
-}
-
-void
-_mp_app_inotify_add_recursive_watch(const char *path, void *ad)
-{
-
- DIR *dp = NULL;
- struct dirent *entry = NULL;
- char *sub_path = NULL;
- sub_path = strdup(path);
- if (mp_app_inotify_add_watch(sub_path, _mp_app_inotify_cb, ad) < 0) {
- IF_FREE(sub_path);
- return;
- }
-
- dp = opendir(sub_path);
- if (dp == NULL) {
- return;
- }
-
- while ((entry = (struct dirent *)readdir(dp)) != NULL) {
- if (entry->d_name[0] == '.') {
- continue;
- }
-
- IF_FREE(sub_path);
- sub_path = g_strdup_printf("%s/%s", path, entry->d_name);
- if (entry->d_type == DT_DIR) {
- _mp_app_inotify_add_recursive_watch(sub_path, ad);
- }
- }
- IF_FREE(sub_path);
-
- closedir(dp);
-
-}
-
-static void
-_mp_app_pipe_cb(void *data, void *path, unsigned int nbyte)
-{
- struct appdata *ad = (struct appdata *)data;
- mp_retm_if(ad == NULL, "appdata is NULL");
-
- DEBUG_TRACE("%s modified..", path);
- mp_retm_if(ad->app_is_foreground, "Do not refresh list");
-
- if (_g_inotyfy_timer) {
- ecore_timer_del(_g_inotyfy_timer);
- }
- _g_inotyfy_timer = ecore_timer_add(0.5, _mp_app_inotify_timer_cb, data);
-
-
-}
-
-static void
-_mp_add_inofity_refresh_watch(struct appdata *ad)
-{
- mp_inotify_t *handle = NULL;
- handle = g_handle;
-
- MP_CHECK(handle);
-
- GList *wd_list = handle->wd_list;
- while (wd_list) {
- if (wd_list->data >= 0) {
- mp_app_inotify_rm_watch((int)wd_list->data);
- }
- wd_list = g_list_delete_link(wd_list, wd_list);
- }
-
- _mp_app_inotify_add_recursive_watch(MP_MMC_ROOT_PATH, ad);
- _mp_app_inotify_add_recursive_watch(MP_PHONE_ROOT_PATH, ad);
-
-}
-
-int
-mp_app_inotify_init(void *data)
-{
-
- struct appdata *ad = data;
-
- mp_inotify_t *handle = NULL;
- handle = _mp_app_inotify_handle_init();
- mp_retvm_if(handle == NULL, -1, "fail to _mp_app_inotify_handle_init()");
-
- handle->fd = inotify_init();
-
- if (handle->fd < 0) {
- switch (errno) {
- case EMFILE:
- ERROR_TRACE("The user limit on the total number of inotify instances has been reached.\n");
- break;
- case ENFILE:
- ERROR_TRACE("The system limit on the total number of file descriptors has been reached.\n");
- break;
- case ENOMEM:
- ERROR_TRACE("Insufficient kernel memory is available.\n");
- break;
- default:
- ERROR_TRACE("Fail to inotify_init(), Unknown error.\n");
- break;
- }
- return -1;
- }
- pthread_create(&handle->monitor, NULL, _mp_app_inotify_watch_thread, handle);
-
- _mp_app_inotify_add_recursive_watch(MP_MMC_ROOT_PATH, ad);
- _mp_app_inotify_add_recursive_watch(MP_PHONE_ROOT_PATH, ad);
-
- ad->inotify_pipe = ecore_pipe_add(_mp_app_pipe_cb, (const void *)ad);
-
- return 0;
-}
-
-int
-mp_app_inotify_add_watch(const char *path, mp_inotify_cb callback, void *user_data)
-{
- mp_inotify_t *handle = NULL;
- GList *wd_list;
- int wd;
-
- handle = g_handle;
- MP_CHECK_VAL(handle, -1);
-
- pthread_mutex_lock(&mp_noti_lock);
-
- wd_list = handle->wd_list;
- wd = inotify_add_watch(handle->fd, path, MP_WATCH_FLAGS);
- if (wd < 0) {
- switch (errno) {
- case EACCES:
- ERROR_TRACE("Read access to the given file is not permitted.\n");
- break;
- case EBADF:
- ERROR_TRACE("The given file descriptor is not valid.\n");
- handle->fd = -1;
- break;
- case EFAULT:
- ERROR_TRACE("pathname points outside of the process's accessible address space.\n");
- break;
- case EINVAL:
- ERROR_TRACE
- ("The given event mask contains no legal events; or fd is not an inotify file descriptor.\n");
- break;
- case ENOMEM:
- ERROR_TRACE("Insufficient kernel memory is available.\n");
- break;
- case ENOSPC:
- ERROR_TRACE
- ("The user limit on the total number of inotify watches was reached or the kernel failed to allocate a needed resource.\n");
- break;
- default:
- ERROR_TRACE("Fail to mp_inotify_add_watch(), Unknown error.\n");
- break;
- }
- pthread_mutex_unlock(&mp_noti_lock);
- return -1;
- }
-
- wd_list = g_list_append(wd_list, (gpointer)wd);
- if (!wd_list) {
- DEBUG_TRACE("g_list_append failed");
- pthread_mutex_unlock(&mp_noti_lock);
- return -1;
- }
-
- handle->callback = callback;
- handle->u_data = user_data;
- pthread_mutex_unlock(&mp_noti_lock);
-
- return 0;
-}
-
-int
-mp_app_inotify_rm_watch(int wd)
-{
- int ret = -1;
- mp_inotify_t *handle = NULL;
-
- handle = g_handle;
- mp_retvm_if(handle == NULL, -1, "handle is NULL");
-
- if (handle->fd < 0 || wd < 0) {
- WARN_TRACE
- ("inotify is not initialized or has no watching dir - fd [%d] wd [%d]",
- handle->fd, wd);
- return 0;
- }
-
- pthread_mutex_lock(&mp_noti_lock);
-
- ret = inotify_rm_watch(handle->fd, wd);
- if (ret < 0) {
- switch (errno) {
- case EBADF:
- ERROR_TRACE("fd is not a valid file descriptor\n");
- handle->fd = -1;
- break;
- case EINVAL:
- ERROR_TRACE("The watch descriptor wd is not valid; or fd is not an inotify file descriptor.\n");
- break;
- default:
- ERROR_TRACE("Fail to mp_inotify_add_watch(), Unknown error.\n");
- break;
- }
- pthread_mutex_unlock(&mp_noti_lock);
- return -1;
- }
- pthread_mutex_unlock(&mp_noti_lock);
-
- return 0;
-}
-
-static void
-_mp_app_inotify_wd_list_destroy(gpointer data)
-{
- mp_app_inotify_rm_watch((int)data);
-}
-
-void
-mp_app_inotify_finalize(struct appdata *ad)
-{
- mp_inotify_t *handle = NULL;
- handle = g_handle;
-
- mp_retm_if(handle == NULL, "handle is NULL");
-
- if (ad->inotify_pipe) {
- ecore_pipe_del(ad->inotify_pipe);
- ad->inotify_pipe = NULL;
- }
-
- g_list_free_full(handle->wd_list, _mp_app_inotify_wd_list_destroy);
- handle->wd_list = NULL;
-
- pthread_cancel(handle->monitor);
- pthread_join(handle->monitor, NULL);
-
- _mp_app_inotify_handle_free();
-
- return;
-}
-#endif
-
+++ /dev/null
-/*
-* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-*/
-
-#include "mp-music-view-mgr.h"
-
-#include "mp-player-debug.h"
-#include "MusicView.h"
-#include "SmartVolume.h"
-#include "stdbool.h"
-
-#ifdef MP_FEATURE_MUSIC_VIEW
-static bool g_music_view_init;
-
-int mp_music_view_mgr_init(void)
-{
- startfunc;
- int res = MusicViewInit();
-
- if (res) {
- WARN_TRACE("Fail to init music view res: 0x%x", res);
- } else {
- g_music_view_init = 1;
- }
-
- return res;
-}
-
-int mp_music_view_mgr_release(void)
-{
- startfunc;
- MP_CHECK_VAL(g_music_view_init, -1);
- int res = MusicViewRelease();
-
- if (res) {
- WARN_TRACE("Fail to init music view");
- }
-
- g_music_view_init = 0;
-
- return res;
-}
-
-char *mp_music_view_mgr_exe(char *filename, int *length)
-{
- MP_CHECK_NULL(g_music_view_init);
-
- char *wave_pcm = MusicViewEXE(filename, length);
- MP_CHECK_NULL(wave_pcm);
-
- return wave_pcm;
-}
-#endif
-
#endif
#include "mp-view-mgr.h"
-#ifdef MP_3D_FEATURE
-#endif
#include "mp-player-view.h"
#include "mp-file-tag-info.h"
#define SIGNAL_CONTROL_QUEUE "control_playlist_queue"
-//2 FEATURE define
+// Defining Music Player Features
#define MP_FEATURE_SUPPORT_ID3_TAG
#define MP_FEATURE_PLAY_SPEED
-#undef MP_ALLSHARE_DISCONNECT_WHEN_MIRRORING
-#ifndef MP_SOUND_PLAYER /* music player only*/
-//#define MP_FEATURE_ADD_TO_INCLUDE_PLAYLIST_TAB
-//#define MP_FEATURE_ADD_TO_HOME
+#ifndef MP_SOUND_PLAYER
#define MP_FEATURE_AUTO_OFF
-//#define MP_FEATURE_SPLIT_WINDOW
-#endif //MP_SOUND_PLAYER
+#endif
#ifdef MP_SOUND_PLAYER
-#undef MP_3D_FEATURE
#define MP_FEATURE_EXIT_ON_BACK
#define MP_FEATURE_USB_OTG
#endif
#ifdef MP_DEBUG_MODE
#endif
-#define MP_FUNC_ALLSHARE_PLAYLIST "music-player:allshare_"
-
#define MP_POPUP_YES 1
-#define MP_POPUP_NO 0
+#define MP_POPUP_NO 0
#define MP_POPUP_TIMEOUT (2.0)
#define MP_STR_UNKNOWN "Unknown"
mp_track_info_t *current_track_info;
-#ifdef MP_3D_FEATURE
- mp_coverflow_view *coverflow_view;
-#endif
-
#ifdef MP_FEATURE_AUTO_OFF
Ecore_Timer *auto_off_timer;
Ecore_Timer *pause_off_timer;
#endif
#include "mp-view-mgr.h"
-#ifdef MP_3D_FEATURE
-#include "dali-music.h"
-#endif
-
-#ifdef MP_FEATURE_CONTEXT_ENGINE
-#include "mp-context.h"
-#endif
-
#include <system_settings.h>
static char *test_uri;
struct appdata *ad = data;
MP_CHECK_FALSE(ad);
- /* mp_setting_init(ad); */
-
mp_player_mgr_vol_type_set();
mp_player_mgr_safety_volume_set(ad->app_is_foreground);
if (!mp_app_noti_init(ad)) {
}
ad->key_down = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, mp_app_key_down_cb, ad);
ad->key_up = ecore_event_handler_add(ECORE_EVENT_KEY_UP, mp_app_key_up_cb, ad);
- /*ad->mouse_button_down = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, mp_app_mouse_event_cb, ad);
- ad->mouse_button_up = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, mp_app_mouse_event_cb, ad);
- ad->mouse_move = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, mp_app_mouse_event_cb, ad);*/
- /* window visibility change event */
- /* for event->fully_obscured==1, event is withdrawn otherwise normal */
evas_object_smart_callback_add(ad->win_main, "withdrawn", _mp_main_win_visibility_withdrawn_cb, ad);
evas_object_smart_callback_add(ad->win_main, "normal", _mp_main_win_visibility_normal_cb, ad);
-// ad->client_msg = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, _mp_main_client_message_cb, ad);
int port_id = message_port_register_local_port(MP_MESSAGE_PORT_LIVEBOX, _mp_main_message_port_cb, NULL);
DEBUG_TRACE("message port id = %d", port_id);
-#ifdef MP_ENABLE_INOTIFY
- mp_app_inotify_init(ad);
-#endif
-
#ifdef MP_FEATURE_AUTO_OFF
mp_setting_auto_off_set_callback(mp_app_auto_off_changed_cb, ad);
#endif
mp_setting_set_play_speed_change_callback(mp_app_play_speed_changed_cb, ad);
#endif
- /* TEMP_BLOCK
- power_set_changed_cb(__mp_main_lcd_state_changed_cb, ad);*/
device_add_callback(DEVICE_CALLBACK_DISPLAY_STATE, __mp_main_lcd_state_changed_cb, ad);
-#ifdef MP_FEATURE_CONTEXT_ENGINE
- mp_context_log_connect();
-#endif
-
-#ifdef MP_FEATURE_MUSIC_VIEW
- mp_music_view_mgr_init();
-#endif
-
if (!ad->playlist_mgr) {
mp_common_create_playlist_mgr();
if (!mp_player_mgr_session_finish()) {
ERROR_TRACE("Error when set session");
}
-#ifdef MP_ENABLE_INOTIFY
- mp_app_inotify_finalize(ad);
-#endif
mp_http_mgr_destory(ad);
mp_playlist_mgr_destroy(ad->playlist_mgr);
mp_view_mgr_destory(GET_VIEW_MGR);
-#ifdef MP_3D_FEATURE
- mp_coverflow_view_destroy(ad);
-#endif
-
MP_TA_ACUM_ITEM_SHOW_RESULT_TO(MP_TA_SHOW_FILE);
MP_TA_RELEASE();
-#ifdef MP_FEATURE_CONTEXT_ENGINE
- mp_context_log_disconnect();
-#endif
-
-#ifdef MP_FEATURE_MUSIC_VIEW
- mp_music_view_mgr_release();
-#endif
-
int music_state = PREF_PLAYER_OFF;
int sound_state = PREF_PLAYER_OFF;
ret = PREFERENCE_ERROR_NONE;
+++ /dev/null
-/*
-* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-*/
-
-
-#ifndef __MP_MW_LYRIC_VIEW_H__
-#define __MP_MW_LYRIC_VIEW_H__
-
-#include "mp-define.h"
-
-typedef struct
-{
- struct appdata *ad;
- int win_w;
- int win_h;
-
- Evas_Object *layout;
- Evas_Object *scroller;
- Evas_Object *box;
- Evas_Object *cur_line;
- Evas_Object *prev_line;
-
- int cur_line_index;
- int prev_line_index;
-
-#ifdef MP_FEATURE_SUPPORT_ID3_TAG
- char *lyric_buffer;
- Eina_List *synclrc_list;
-#else
- char *lyric_path;
-#endif
-
- char *music_path;
- bool b_drag;
- bool b_show;
-}mp_mw_lyric_view_t;
-
-void mp_mw_lyric_view_create(void *data);
-void mp_mw_lyric_view_destroy(void *data);
-void mp_mw_lyric_view_show(void *data);
-void mp_mw_lyric_view_hide(void *data);
-void mp_test_lyric_view_hide(void *data);
-void mp_mw_lyric_view_refresh(void *data);
-
-#endif /* __MP_LYRIC_VIEW_H__ */
#define __MP_PLAYER_VIEW_H_
#include "music.h"
-#ifdef MP_FEATURE_MUSIC_VIEW
-#include <cairo.h>
-#endif
enum
{
int move_direction;
bool transition_state;
bool loaded;
-#ifdef MP_FEATURE_MUSIC_VIEW
- /* wave view */
- bool wave_view_status;
- char *wave_data;
- int wave_length;
- void *pixels;
- cairo_t *cr;
- cairo_surface_t *surface;
- Evas_Object *overlay;
- Evas_Object *wave_progress_bar;
- Evas_Object *wave_progress_bar_bg;
- Ecore_Timer *wave_progressbar_timer;
- Ecore_Timer *timer_wave;
-#endif
-#ifdef MP_IMAGE_ROTATE_FEATURE
- /* rotate image & timer */
- int imgId;
- Evas_Object *rotation_image;
- Ecore_Timer *timer_rotate;
-#endif
#ifdef MP_FEATURE_SPLIT_WINDOW
Evas_Object *popup_win;
static bool _mp_player_view_init_progress_bar(void *data);
static void _mp_player_view_volume_popup_hide(void *data);
static bool _mp_player_view_show_lyric(void *data);
-#ifdef MP_FEATURE_MUSIC_VIEW
-static void _mp_player_view_show_wave_view_set_cb(void *data, Evas_Object *obj, void *event_info);
-static void _mp_player_view_hide_wave_view_set_cb(void *data, Evas_Object *obj, void *event_info);
-static void _mp_player_wave_view_destory(void *data);
-#endif
static Eina_Bool _mp_player_view_update_progressbar_cb(void *data);
static void _mp_player_view_show_detail_view(MpPlayerView_t *view);
}
#endif
-#ifndef MP_SOUND_PLAYER
-/*static void _ctxpopup_group_play_cb(void *data, Evas_Object * obj, void *event_info)
-{
- EVENT_TRACE("");
- struct appdata *ad = mp_util_get_appdata();
- MP_CHECK(ad);
-
- MpPlayerView_t *view = (MpPlayerView_t *)data;
- MP_CHECK(view); CHECK_VIEW(view);
- mp_evas_object_del(view->more_btn_ctxpopup);
-
-
- mp_track_info_t *track_info = ad->current_track_info;
- MP_CHECK(track_info);
-
- app_control_h service = NULL;
- app_control_create (&service);
- app_control_set_app_id(service, "com.samsung.group-cast");
- app_control_add_extra_data(service, APP_CONTROL_DATA_SELECTED, track_info->uri);*/
-//app_control_set_mime(service, "audio/*");
-/*app_control_send_launch_request(service, NULL, NULL);
-app_control_destroy(service);
-}*/
-
-#ifdef MP_FEATURE_ALBUMART_UPDATE
-static void _ctxpopup_update_albumart_cb(void *data, Evas_Object *obj, void *event_info)
-{
- MpPlayerView_t *view = (MpPlayerView_t *)data;
- MP_CHECK(view);
- CHECK_VIEW(view);
- mp_evas_object_del(view->more_btn_ctxpopup);
-
- struct appdata *ad = mp_util_get_appdata();
- MP_CHECK(ad);
-
- mp_track_info_t *track_info = ad->current_track_info;
- MP_CHECK(track_info);
-
- mp_albumart_update(track_info->uri, track_info->media_id);
-}
-#endif
-#endif
-
static void _ctxpopup_detail_cb(void *data, Evas_Object *obj, void *event_info)
{
EVENT_TRACE();
mp_util_ctxpopup_item_append(view->more_btn_ctxpopup,
STR_MP_DELETE, MP_PLAYER_MORE_BTN_DELETE_IMAGE, mp_common_track_delete_cb, view);
-#ifdef MP_FEATURE_ALBUMART_UPDATE
- if (mp_check_file_exist(track_info->uri) && mp_util_file_playable(track_info->uri))
- mp_util_ctxpopup_item_append(view->more_btn_ctxpopup,
- STR_MP_UPDATE_ALBUM_ART, MP_PLAYER_MORE_BTN_UPDATE_ALBUMART, _ctxpopup_update_albumart_cb, view);
-#endif
-
mp_util_ctxpopup_item_append(view->more_btn_ctxpopup,
STR_MP_DETAILS, MP_PLAYER_MORE_BTN_DETAIL_IMAGE, _ctxpopup_detail_cb, view);
CHECK_VIEW(view);
mp_evas_object_del(view->more_btn_ctxpopup);
-#ifdef MP_FEATURE_MUSIC_VIEW
- _mp_player_wave_view_destory(view);
-#endif
-
mp_player_mgr_unset_seek_done_cb();
struct appdata *ad = mp_util_get_appdata();
mp_player_view_progress_timer_thaw(playing_view);
}
-#ifdef MP_FEATURE_MUSIC_VIEW
- if (playing_view->timer_wave) {
- ecore_timer_reset(playing_view->timer_wave);
- }
-#endif
-
endfunc;
}
}
}
-#ifdef MP_FEATURE_MUSIC_VIEW
-static Eina_Bool
-_mp_player_view_update_wave_progressbar_cb(void *data)
-{
- TIMER_TRACE();
- struct appdata *ad = mp_util_get_appdata();
- MP_CHECK_FALSE(ad);
-
- MpPlayerView_t *playing_view = (MpPlayerView_t *)data;
- MP_CHECK_FALSE(playing_view);
-
- if (ad->music_length > 0.) {
- elm_progressbar_value_set(playing_view->wave_progress_bar, ad->music_pos / ad->music_length);
- }
-
- return ECORE_CALLBACK_RENEW;
-
-}
-
-static void _mp_player_view_create_wave_progress(void *thiz)
-{
- startfunc;
- MpPlayerView_t *view = (MpPlayerView_t *)thiz;
- MP_CHECK(view);
- CHECK_VIEW(view);
- MP_CHECK(view->player_view_layout);
-
- view->wave_progress_bar = elm_progressbar_add(view->player_view_layout);
- elm_object_style_set(view->wave_progress_bar, "wave/list_progres");
- elm_progressbar_horizontal_set(view->wave_progress_bar, EINA_TRUE);
- evas_object_size_hint_align_set(view->wave_progress_bar, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(view->wave_progress_bar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_progressbar_value_set(view->wave_progress_bar, 0.0);
-
- if (NULL == view->wave_progressbar_timer) {
- view->wave_progressbar_timer = ecore_timer_add(0.1, _mp_player_view_update_wave_progressbar_cb, view);
- }
-
- evas_object_show(view->wave_progress_bar);
-
- edje_object_signal_emit(_EDJ(view->progress_box), "set_hide", "progress_bar");
-
- elm_object_part_content_set(view->player_view_layout, "wave_progress", view->wave_progress_bar);
-
- view->wave_progress_bar_bg = (Evas_Object *)edje_object_part_object_get(_EDJ(view->player_view_layout), "wave_progress_bg");
-
- evas_object_event_callback_add(view->wave_progress_bar_bg, EVAS_CALLBACK_MOUSE_DOWN,
- _mp_player_view_progressbar_down_cb, view);
- evas_object_event_callback_add(view->wave_progress_bar_bg, EVAS_CALLBACK_MOUSE_UP,
- _mp_player_view_progressbar_up_cb, view);
- evas_object_event_callback_add(view->wave_progress_bar_bg, EVAS_CALLBACK_MOUSE_MOVE,
- _mp_player_view_progressbar_move_cb, view);
-
- endfunc;
-}
-
-static void _draw_wave_view(void *data, int show_status)
-{
- /*startfunc;*/
-
- MpPlayerView_t *view = (MpPlayerView_t *)data;
- MP_CHECK(view);
- CHECK_VIEW(view);
- mp_evas_object_del(view->more_btn_ctxpopup);
-
- MP_CHECK(view->wave_data);
-
- struct appdata *ad = mp_util_get_appdata();
- MP_CHECK(ad);
-
- mp_plst_item *item = mp_playlist_mgr_get_current(ad->playlist_mgr);
- MP_CHECK(item);
-
- int w = 496 * elm_config_scale_get();
- int h = 160 * elm_config_scale_get();
- int index = 0;
- int max_pos = w;
- int hight = 0;
- double step = view->wave_length / w;
-
- Evas_Object *image = evas_object_image_add(evas_object_evas_get(view->player_view_layout));
- evas_object_smart_member_add(image , view->player_view_layout);
- view->overlay = image;
- evas_object_size_hint_weight_set(image, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_image_alpha_set(image, EINA_TRUE);
- evas_object_image_size_set(image, w , h);
- evas_object_image_colorspace_set(image, EVAS_COLORSPACE_ARGB8888);
-
- evas_object_resize(view->overlay, w, h);
- evas_object_image_size_set(view->overlay, w, h);
- evas_object_image_fill_set(view->overlay, 0, 0, w, h);
-
- evas_object_smart_changed(view->player_view_layout);
- evas_object_show(view->overlay);
-
- elm_object_part_content_set(view->player_view_layout, "wave_graph", view->overlay);
-
- view->pixels = evas_object_image_data_get(view->overlay, EINA_TRUE);
- view->surface = cairo_image_surface_create_for_data((unsigned char *)view->pixels, CAIRO_FORMAT_RGB24, w, h, w * 4);
- view->cr = cairo_create(view->surface);
-
- cairo_set_line_width(view->cr, 1.0);
-
- cairo_set_source_rgba(view->cr, 0.0, 0.0, 0.0, 0.0);
- cairo_set_operator(view->cr, CAIRO_OPERATOR_SOURCE);
- cairo_paint(view->cr);
- cairo_set_source_rgba(view->cr, 0.97, 0.96, 0.93, 1.0);
- cairo_set_source_rgb(view->cr, 0.97, 0.96, 0.93);
- cairo_move_to(view->cr, 1, 0);
-
- while (index < max_pos) {
- /*DEBUG_TRACE("****data: %d", view->wave_data[hight]);*/
- int drawpos = (h - 1) - (view->wave_data[hight] * ((h - 1) / 100));
- cairo_line_to(view->cr, index, drawpos);
- index++;
- hight = index * step;
- }
- cairo_line_to(view->cr, w , 0);
- cairo_line_to(view->cr, 1, 0);
- cairo_stroke_preserve(view->cr);
- cairo_set_source_rgba(view->cr, 0.97, 0.96, 0.93, 1.0);
- cairo_set_source_rgb(view->cr, 0.97, 0.96, 0.93);
- cairo_fill(view->cr);
-
- cairo_destroy(view->cr);
- evas_object_image_data_set(view->overlay, view->pixels);
- evas_object_image_smooth_scale_set(view->overlay, EINA_TRUE);
- evas_object_image_data_update_add(view->overlay, 0, 0, w, h);
-
-}
-
-static void _mp_player_wave_view_destory(void *data)
-{
- startfunc;
-
- MpPlayerView_t *playing_view = (MpPlayerView_t *)data;
- MP_CHECK(playing_view);
- CHECK_VIEW(playing_view);
- if (playing_view->player_view_layout) {
- elm_object_signal_emit(playing_view->player_view_layout, "wave_view_hide", "*");
- }
-
- IF_FREE(playing_view->wave_data);
- mp_ecore_timer_del(playing_view->timer_wave);
- mp_ecore_timer_del(playing_view->wave_progressbar_timer);
- if (playing_view->progress_box) {
- elm_object_signal_emit(playing_view->progress_box, "set_show", "progress_bar");
- }
-
- playing_view->wave_view_status = FALSE;
-}
-
-static Eina_Bool _mp_player_view_timer_wave_update_cb(void *data)
-{
- TIMER_TRACE();
- MpPlayerView_t *playing_view = (MpPlayerView_t *)data;
- MP_CHECK_FALSE(playing_view);
-
- _mp_player_wave_view_destory(data);
-
- return ECORE_CALLBACK_RENEW;
-}
-
-static void _mp_player_view_show_wave_view_set(void *data)
-{
- startfunc;
-
- MpPlayerView_t *view = (MpPlayerView_t *)data;
- MP_CHECK(view);
- CHECK_VIEW(view);
- mp_evas_object_del(view->more_btn_ctxpopup);
-
- struct appdata *ad = mp_util_get_appdata();
- MP_CHECK(ad);
-
- mp_plst_item *item = mp_playlist_mgr_get_current(ad->playlist_mgr);
- MP_CHECK(item);
-
- view->wave_data = mp_music_view_mgr_exe(item->uri, &view->wave_length);
- if (!view->wave_data) {
- mp_error("fail to get music_view data[%s]", item->uri);
- mp_widget_text_popup(ad, GET_STR(STR_MP_FILE_TYPE_NOT_SUPPORTED));
- return;
- }
-
- view->wave_view_status = TRUE;
- _mp_player_view_create_wave_progress(view);
- _draw_wave_view(data, 0);
-
- edje_object_signal_emit(_EDJ(view->player_view_layout), "wave_view_show", "*");
-
- if (NULL == view->timer_wave) {
- view->timer_wave = ecore_timer_add(20, _mp_player_view_timer_wave_update_cb, view);
- }
-
-}
-
-static void _mp_player_view_show_wave_view_set_cb(void *data, Evas_Object * obj, void *event_info)
-{
- startfunc;
-
- _mp_player_view_show_wave_view_set(data);
-}
-static void _mp_player_view_hide_wave_view_set_cb(void *data, Evas_Object * obj, void *event_info)
-{
- startfunc;
-
- MpPlayerView_t *view = (MpPlayerView_t *)data;
- MP_CHECK(view);
- CHECK_VIEW(view);
- mp_evas_object_del(view->more_btn_ctxpopup);
-
- _mp_player_wave_view_destory(data);
-}
-#endif
-
static void
_mp_player_view_ff_rew_btn_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
mp_playlist_mgr_get_prev(ad->playlist_mgr));
elm_object_part_content_set(playing_view->player_view_layout, "album_image_left", image);
-#ifdef MP_FEATURE_MUSIC_VIEW
- _mp_player_wave_view_destory(thiz);
-#endif
endfunc;
}
free(list);
}
-/*static void
-_mp_album_detail_list_item_longpressed_cb(void *data, Evas_Object *obj, void *event_info)
-{
- startfunc;
-
- MpAlbumDetailList_t *list = (MpAlbumDetailList_t*)data;
- MP_CHECK(list);
-
- struct appdata *ad = mp_util_get_appdata();
- MP_CHECK(ad);
-
- Elm_Object_Item *item = event_info;
- MP_CHECK(item);
-
- char *title = NULL;
- char *file_path = NULL;
- int pop_item_count = 5;
- Elm_Object_Item *temp = NULL;
- Evas_Object *popup = NULL;
- mp_list_item_data_t *item_data = NULL;
-
- MpView_t *top_view = mp_view_mgr_get_top_view(GET_VIEW_MGR);
- MP_CHECK(top_view);
-
- if (list->scroll_drag_status || list->edit_mode == 1 || list->reorderable ||
- MP_VIEW_SEARCH == top_view->view_type || list->shuffle_it == item)
- return;
-
- temp = elm_genlist_item_next_get(list->shuffle_it);
- while (temp) {
- item_data = elm_object_item_data_get(temp);
- item_data->checked = false;
- temp = elm_genlist_item_next_get(temp);
- }
-
- item_data = elm_object_item_data_get(item);
- MP_CHECK(item_data);
-
- item_data->checked = true;
-
- mp_media_info_get_title(item_data->handle, &title);
- mp_media_info_get_file_path(item_data->handle, &file_path);
-
- popup = mp_genlist_popup_create(obj, MP_POPUP_LIST_LONGPRESSED, &pop_item_count, ad);
- MP_CHECK(popup);
-
- char *up_title = g_strdup(title);
-
- elm_object_part_text_set(popup, "title,text", up_title);
- IF_FREE(up_title);
-
- mp_genlist_popup_item_append(popup, STR_MP_SET_AS, NULL, NULL, NULL,
- mp_common_list_set_as_cb, list);
-
- mp_genlist_popup_item_append(popup, STR_MP_ADD_TO_PLAYLIST, NULL, NULL, NULL,
- mp_common_list_add_to_playlist_cb, list);
- if (list->track_type != MP_TRACK_BY_FAVORITE) {
- bool favourite = false;
- char *str = NULL;
- Evas_Smart_Cb cb = NULL;
-
- mp_media_info_get_favorite(item_data->handle, &favourite);
- if (favourite) {
- str = STR_MP_POPUP_REMOVE_FROM_FAVORITE;
- cb = mp_common_list_unfavorite_cb;
- }
- else {
- str = STR_MP_ADD_TO_FAVOURITES;
- cb = mp_common_list_add_to_favorite_cb;
- }
-
- mp_genlist_popup_item_append(popup, str, NULL, NULL, NULL, cb, list);
- }
-
- mp_genlist_popup_item_append(popup, STR_MP_DELETE, NULL, NULL, NULL,
- mp_common_list_delete_cb, list);
-
-#ifdef MP_FEATURE_PERSONAL_PAGE
- if (mp_util_is_personal_page_on())
- {
- if (mp_util_is_in_personal_page((const char *)file_path))
- {
- DEBUG_TRACE("remove from personal page");
- list->personal_page_storage = MP_LIST_PERSONAL_PAGE_PRIVATE;
- mp_genlist_popup_item_append(popup, STR_MP_REMOVE_FROM_PERSONAL_PAGE, NULL, NULL, NULL,
- mp_common_longpress_private_move_cb, list);
- }
- else
- {
- DEBUG_TRACE("add to personal page");
- list->personal_page_storage = MP_LIST_PERSONAL_PAGE_NORMAL;
- mp_genlist_popup_item_append(popup, STR_MP_ADD_TO_PERSONAL_PAGE, NULL, NULL, NULL,
- mp_common_longpress_private_move_cb, list);
- }
- }
-#endif
- mp_genlist_popup_item_append(popup, STR_MP_POPUP_MORE_INFO, NULL, NULL, NULL,
- mp_common_list_more_info_cb, list);
-#ifdef MP_FEATURE_ALBUMART_UPDATE
- mp_genlist_popup_item_append(popup, STR_MP_UPDATE_ALBUM_ART, NULL, NULL, NULL,
- mp_common_list_update_albumart_cb, list);
-#endif
-
- MP_GENLIST_ITEM_LONG_PRESSED(obj, popup, event_info);
-}*/
-
static void _mp_album_detail_list_item_highlighted(void *data, Evas_Object *obj, void *event_info)
{
MpAlbumDetailList_t *list = data;
free(list);
}
-
-/*static void
-_mp_artist_list_item_longpressed_cb(void *data, Evas_Object *obj, void *event_info)
-{
- startfunc;
-
- MpArtistDetailList_t *list = (MpArtistDetailList_t*)data;
- MP_CHECK(list);
-
- struct appdata *ad = mp_util_get_appdata();
- MP_CHECK(ad);
-
- Elm_Object_Item *item = event_info;
- MP_CHECK(item);
-
- char *title = NULL;
- char *file_path = NULL;
- int pop_item_count = 5;
-
- Elm_Object_Item *temp = NULL;
- Evas_Object *popup = NULL;
- mp_list_item_data_t *item_data = NULL;
-
- if (list->scroll_drag_status || list->edit_mode == 1 || list->shuffle_it == item)
- return;
-
- temp = elm_genlist_item_next_get(list->shuffle_it);
- while (temp) {
- item_data = elm_object_item_data_get(temp);
- item_data->checked = false;
- temp = elm_genlist_item_next_get(temp);
- }
-
- item_data = elm_object_item_data_get(item);
- MP_CHECK(item_data);
-
- item_data->checked = true;
-
- mp_media_info_get_title(item_data->handle, &title);
- mp_media_info_get_file_path(item_data->handle, &file_path);
-
- popup = mp_genlist_popup_create(obj, MP_POPUP_LIST_LONGPRESSED, &pop_item_count, ad);
- MP_CHECK(popup);
-
- char *up_title = g_strdup(title);
-
- elm_object_part_text_set(popup, "title,text", up_title);
- IF_FREE(up_title);
-
- mp_genlist_popup_item_append(popup, STR_MP_SET_AS, NULL, NULL, NULL,
- mp_common_list_set_as_cb, list);
- mp_genlist_popup_item_append(popup, STR_MP_ADD_TO_PLAYLIST, NULL, NULL, NULL,
- mp_common_list_add_to_playlist_cb, list);
- bool favourite = false;
- char *str = NULL;
- Evas_Smart_Cb cb = NULL;
-
- mp_media_info_get_favorite(item_data->handle, &favourite);
- if (favourite) {
- str = STR_MP_POPUP_REMOVE_FROM_FAVORITE;
- cb = mp_common_list_unfavorite_cb;
- } else {
- str = STR_MP_ADD_TO_FAVOURITES;
- cb = mp_common_list_add_to_favorite_cb;
- }
- mp_genlist_popup_item_append(popup, str, NULL, NULL, NULL, cb, list);
- //mp_genlist_popup_item_append(popup, GET_STR(STR_MP_REMOVE), NULL, NULL,
- // mp_common_list_delete_cb, list);
- mp_genlist_popup_item_append(popup, STR_MP_DELETE, NULL, NULL, NULL,
- mp_common_list_delete_cb, list);
-#ifdef MP_FEATURE_PERSONAL_PAGE
- if (mp_util_is_personal_page_on())
- {
- if (mp_util_is_in_personal_page((const char *)file_path))
- {
- DEBUG_TRACE("remove from personal page");
- list->personal_page_storage = MP_LIST_PERSONAL_PAGE_PRIVATE;
- mp_genlist_popup_item_append(popup, STR_MP_REMOVE_FROM_PERSONAL_PAGE, NULL, NULL, NULL,
- mp_common_longpress_private_move_cb, list);
- }
- else
- {
- DEBUG_TRACE("add to personal page");
- list->personal_page_storage = MP_LIST_PERSONAL_PAGE_NORMAL;
- mp_genlist_popup_item_append(popup, STR_MP_ADD_TO_PERSONAL_PAGE, NULL, NULL, NULL,
- mp_common_longpress_private_move_cb, list);
- }
- }
-#endif
-
- mp_genlist_popup_item_append(popup, STR_MP_POPUP_MORE_INFO, NULL, NULL, NULL,
- mp_common_list_more_info_cb, list);
-#ifdef MP_FEATURE_ALBUMART_UPDATE
- mp_genlist_popup_item_append(popup, STR_MP_UPDATE_ALBUM_ART, NULL, NULL, NULL,
- mp_common_list_update_albumart_cb, list);
-#endif
- MP_GENLIST_ITEM_LONG_PRESSED(obj, popup, event_info);
-}*/
-
static void _mp_artist_detail_list_item_highlighted(void *data, Evas_Object *obj, void *event_info)
{
MpArtistDetailList_t *list = data;
free(list);
}
-/*
-static void
-_mp_track_list_item_moved_cb(void *data, Evas_Object *obj, void *event_info)
-{
- startfunc;
- MpTrackList_t *list = data;
- MP_CHECK(list);
-
- Elm_Object_Item *item = event_info;
- MP_CHECK(item);
-
- int index = -1;
- int ret = 0;
- int member_id = 0;
-
- void *playlist_handle = mp_list_get_playlist_handle((MpList_t *)list);
- Elm_Object_Item *temp = elm_genlist_first_item_get(obj);
- while (temp) {
- index = elm_genlist_item_index_get(temp);
- mp_list_item_data_t *item_data = elm_object_item_data_get(temp);
- MP_CHECK(item_data);
-
- ret = mp_media_info_get_playlist_member_id(item_data->handle, &member_id);
- MP_CHECK(ret==MEDIA_CONTENT_ERROR_NONE);
-
- ret = mp_media_info_playlist_set_play_order(playlist_handle, member_id, index);
- MP_CHECK(ret==MEDIA_CONTENT_ERROR_NONE);
- temp = elm_genlist_item_next_get(temp);
- }
-
- ret = mp_media_info_playlist_update_db(playlist_handle);
- MP_CHECK(ret==MEDIA_CONTENT_ERROR_NONE);
-
- //mp_view_mgr_post_event(GET_VIEW_MGR, MP_PLAYLIST_REORDER);
-}
-*/
-
-/*static void
-_mp_track_list_item_longpressed_cb(void *data, Evas_Object *obj, void *event_info)
-{
- startfunc;
-
- MpTrackList_t *list = (MpTrackList_t*)data;
- MP_CHECK(list);
-
- if (list->edit_mode)
- {
- return ;
- }
-
- struct appdata *ad = mp_util_get_appdata();
- MP_CHECK(ad);
-
- Elm_Object_Item *item = event_info;
- MP_CHECK(item);
-
- char *title = NULL;
-
- int pop_item_count = 5;
-#ifdef MP_FEATURE_ALBUMART_UPDATE
- pop_item_count = 6;
-#endif
- Elm_Object_Item *temp = NULL;
- Evas_Object *popup = NULL;
- mp_list_item_data_t *item_data = NULL;
-
- MpView_t *top_view = mp_view_mgr_get_top_view(GET_VIEW_MGR);
- MP_CHECK(top_view);
-
- if (list->scroll_drag_status || list->edit_mode == 1 || list->reorderable ||
- MP_VIEW_SEARCH == top_view->view_type || list->shuffle_it == item)
- return;
-
- temp = elm_genlist_item_next_get(list->shuffle_it);
- while (temp) {
- item_data = elm_object_item_data_get(temp);
- item_data->checked = false;
- temp = elm_genlist_item_next_get(temp);
- }
-
- item_data = elm_object_item_data_get(item);
- MP_CHECK(item_data);
- if (item_data->item_type == MP_LIST_ITEM_TYPE_ALBUMART_INDEX)
- return;
-
- item_data->checked = true;
-
- mp_media_info_get_title(item_data->handle, &title);
-
- popup = mp_genlist_popup_create(obj, MP_POPUP_LIST_LONGPRESSED, &pop_item_count, ad);
- MP_CHECK(popup);
-
- char *up_title = g_strdup(title);
-
- MpViewMgr_t *view_mgr = mp_view_mgr_get_view_manager();
- MpView_t *view = mp_view_mgr_get_top_view(view_mgr);
-
- elm_object_part_text_set(popup, "title,text", up_title);
- IF_FREE(up_title);
-
-#ifdef MP_FEATURE_PERSONAL_PAGE
- char *file_path = NULL;
- bool personal_page_flag = false;
- mp_media_info_get_file_path(item_data->handle, &file_path);
- if (file_path)
- {
- personal_page_flag = mp_util_is_in_personal_page((const char *)file_path);
- }
-
- if (!personal_page_flag)
- {
-#endif
- mp_genlist_popup_item_append(popup, STR_MP_SET_AS, NULL, NULL, NULL,
- mp_common_list_set_as_cb, list);
-#ifdef MP_FEATURE_PERSONAL_PAGE
- }
-#endif
- mp_genlist_popup_item_append(popup, STR_MP_ADD_TO_PLAYLIST, NULL, NULL, NULL,
- mp_common_list_add_to_playlist_cb, list);
- if (list->track_type != MP_TRACK_BY_FAVORITE) {
- char *str = NULL;
- Evas_Smart_Cb cb = NULL;
- mp_media_info_h favourite_handle = NULL;
- char *uid = NULL;
- bool favorite = false;
- mp_media_info_get_media_id(item_data->handle, &uid);
- mp_media_info_create(&favourite_handle, uid);
- mp_media_info_get_favorite(favourite_handle, &favorite);
- SAFE_FREE(favourite_handle);
- if (favorite)
- {
- str = STR_MP_POPUP_REMOVE_FROM_FAVORITE;
- cb = mp_common_list_unfavorite_cb;
- }
- else {
- str = STR_MP_ADD_TO_FAVOURITES;
- cb = mp_common_list_add_to_favorite_cb;
- }
-
- mp_genlist_popup_item_append(popup, str, NULL, NULL, NULL, cb, list);
- }
- if (MP_VIEW_PLAYLIST_DETAIL == view->view_type)
- {
- mp_genlist_popup_item_append(popup, STR_MP_REMOVE, NULL, NULL, NULL,
- mp_common_list_remove_cb, list);
- }
- else
- {
- mp_genlist_popup_item_append(popup, STR_MP_DELETE, NULL, NULL, NULL,
- mp_common_list_delete_cb, list);
- }
-
-#ifdef MP_FEATURE_PERSONAL_PAGE
- if (mp_util_is_personal_page_on() && top_view->view_type != MP_VIEW_PLAYLIST_DETAIL) // personal storage function is not provided in playlist detail view
- {
- if (mp_util_is_in_personal_page((const char *)file_path))
- {
- DEBUG_TRACE("remove from personal page");
- list->personal_page_storage = MP_LIST_PERSONAL_PAGE_PRIVATE;
- mp_genlist_popup_item_append(popup, STR_MP_REMOVE_FROM_PERSONAL_PAGE, NULL, NULL, NULL,
- mp_common_longpress_private_move_cb, list);
- }
- else
- {
- DEBUG_TRACE("add to personal page");
- list->personal_page_storage = MP_LIST_PERSONAL_PAGE_NORMAL;
- mp_genlist_popup_item_append(popup, STR_MP_ADD_TO_PERSONAL_PAGE, NULL, NULL, NULL,
- mp_common_longpress_private_move_cb, list);
- }
- }
-#endif
-
- mp_genlist_popup_item_append(popup, STR_MP_POPUP_MORE_INFO, NULL, NULL, NULL,
- mp_common_list_more_info_cb, list);
-#ifdef MP_FEATURE_ALBUMART_UPDATE
- mp_genlist_popup_item_append(popup, STR_MP_UPDATE_ALBUM_ART, NULL, NULL, NULL,
- mp_common_list_update_albumart_cb, list);
-#endif
-
- MP_GENLIST_ITEM_LONG_PRESSED(obj, popup, event_info);
-}
-
-static void mp_track_list_add_tracks_to_playlist_cb(void *data, Evas_Object *obj, void *event_info)
-{
- startfunc;
- MpTrackList_t *list = data;
- MP_CHECK(list);
- mp_common_show_add_tracks_view(list->playlist_id);
-}*/
-
static void _mp_track_list_item_highlighted(void *data, Evas_Object *obj, void *event_info)
{
MpTrackList_t *list = data;