+++ /dev/null
-# Appendix\r
+++ /dev/null
-# Add inputs and outputs from these tool invocations to the build variables
-
-C_DEPS +=
-
-SYSROOT := $(SBI_SYSROOT)
-
-ROOTSTRAP_INCS := $(addprefix -I $(SYSROOT)/,$(PLATFORM_INCS_EX))
-EFL_INCS :=
-
-RS_LIBRARIES := $(addprefix -l,$(RS_LIBRARIES_EX))
-
-PLATFORM_INCS := $(ROOTSTRAP_INCS) $(EFL_INCS) \
- -I"$(SDK_PATH)/library"
-
+++ /dev/null
-
-DEBUG_OP = -g3
-CPP_DEBUG_OP =
-
-OPTIMIZATION_OP = -O0
-CPP_OPTIMIZATION_OP =
-
-COMPILE_FLAGS = $(DEBUG_OP) $(OPTIMIZATION_OP) -Wall -c -fmessage-length=0 -fPIC
-
-CPP_COMPILE_FLAGS = $(CPP_DEBUG_OP) $(CPP_OPTIMIZATION_OP)
-
-LINK_FLAGS = -shared -Wl,--no-undefined
-
-AR_FLAGS =
-
-EDC_COMPILE_FLAGS =
\ No newline at end of file
+++ /dev/null
-BUILD_SCRIPT_VERSION := 1.0.7
-
-all : app_build
-
-clean : app_clean
-
-version : make_version
-
-
-BSLASH := \\#
-BSLASH2SLASH = $(subst $(BSLASH),/,$(1))
-REMOVE_TAIL = $(patsubst %/,%,$(1))
-
-PROJ_ROOT := $(call BSLASH2SLASH,$(PROJPATH))
-
--include $(PROJ_ROOT)/project_def.prop
--include basedef.mk
--include tooldef.mk
--include flags.mk
--include prepost.mk
-
-APPTYPE := $(type)
-
-OBJ_OUTPUT := $(call BSLASH2SLASH,$(OUTPUT_DIR)/objs)
-
-OS_NAME = $(shell $(UNAME))
-
-#LOWER_APPNAME := $(shell echo translit($(APPNAME),[A-Z],[a-z])|$(M4))
-LOWER_APPNAME := $(shell echo $(APPNAME)|$(TR) [A-Z] [a-z])
-
-ifeq ($(strip $(APPTYPE)),app)
-APPFILE := $(OUTPUT_DIR)/$(LOWER_APPNAME)
-endif
-ifeq ($(strip $(APPTYPE)),staticLib)
-APPFILE := $(OUTPUT_DIR)/lib$(LOWER_APPNAME).a
-endif
-ifeq ($(strip $(APPTYPE)),sharedLib)
-APPFILE := $(OUTPUT_DIR)/lib$(LOWER_APPNAME).so
-endif
-
-ifneq ($(strip $(PLATFORM_INCS)),)
-PLATFORM_INCS_FILE := $(OBJ_OUTPUT)/platform_incs_file.inc
-endif
-
-FIND_FILES = $(shell $(FIND) $(PROJ_ROOT)/$(dir $(1)) -type f -name $(notdir $(1)) -printf '$(dir $(1))%P ')
-
-NORMAL_SRCS := $(filter-out %*.c %*.cpp,$(USER_SRCS))
-WIDLCARD_SRCS := $(filter %*.c %*.cpp,$(USER_SRCS))
-ALL_SRCS := $(NORMAL_SRCS) $(foreach var,$(WIDLCARD_SRCS),$(call FIND_FILES,$(var)))
-
-C_SRCS := $(filter %.c,$(ALL_SRCS))
-CPP_SRCS := $(filter %.cpp,$(ALL_SRCS))
-
-USER_EDCS := $(subst $(BSLASH),/,$(USER_EDCS))
-NORMAL_EDCS := $(filter-out %*.edc,$(USER_EDCS))
-WIDLCARD_EDCS := $(filter %*.edc,$(USER_EDCS))
-EDCS := $(NORMAL_EDCS) $(foreach var,$(WIDLCARD_EDCS),$(call FIND_FILES,$(var)))
-
-NORMAL_POS := $(filter-out %*.po,$(USER_POS))
-WIDLCARD_POS := $(filter %*.po,$(USER_POS))
-POS := $(NORMAL_POS) $(foreach var,$(WIDLCARD_POS),$(call FIND_FILES,$(var)))
-
-LIBPATHS := $(addprefix -L$(PROJ_ROOT)/,$(USER_LIB_DIRS)) \
- $(addprefix -L,$(USER_LIB_DIRS_ABS))
-LIBS += $(addprefix -l,$(USER_LIBS))
-UOBJS := $(addprefix $(PROJ_ROOT)/,$(USER_OBJS)) \
- $(USER_OBJS_ABS)
-
-M_OPT = -MMD -MP -MF"$(@:%.o=%.d)"
-
-FUNC_C2O = $(patsubst %.c,$(OBJ_OUTPUT)/%.o,$(1))
-FUNC_CPP2O = $(patsubst %.cpp,$(OBJ_OUTPUT)/%.o,$(1))
-FUNC_EDC2EDJ = $(patsubst %.edc,$(OUTPUT_DIR)/%.edj,$(1))
-FUNC_PO2MO = $(patsubst %.po,$(OUTPUT_DIR)/res/locale/%/LC_MESSAGES/$(LOWER_APPNAME).mo,$(notdir $(1)))
-
-
-C_OBJS := $(call FUNC_C2O,$(C_SRCS))
-CPP_OBJS := $(call FUNC_CPP2O,$(CPP_SRCS))
-OBJS := $(C_OBJS) $(CPP_OBJS)
-EDJ_FILES := $(call FUNC_EDC2EDJ,$(EDCS))
-MO_FILES := $(call FUNC_PO2MO,$(POS))
-DEPS := $(OBJS:.o=.d)
-
-
-ifneq ($(strip $(DEPS)),)
--include $(DEPS)
-endif
-
-ifeq ($(strip $(APPTYPE)),app)
-$(APPFILE) : $(OBJS) $(UOBJS)
- @echo ' Building target: $@'
- @echo ' Invoking: C/C++ Linker'
- @$(MKDIR) $(MKDIR_OP) $(subst $(BSLASH),/,$(@D))
- $(CXX) -o "$(APPFILE)" $(OBJS) $(UOBJS) $(LIBPATHS) -Xlinker --as-needed $(LIBS) $(LINK_FLAGS) $(TC_LINKER_MISC) $(RS_LINKER_MISC) -pie -lpthread -Xlinker -rpath="/home/developer/sdk_tools/lib" --sysroot="$(SYSROOT)" -Xlinker --version-script="$(PROJ_PATH)/.exportMap" -L"$(SBI_SYSROOT)/usr/lib" $(RS_LIBRARIES) -Xlinker -rpath="/opt/usr/apps/$(APPID)/lib" -Werror-implicit-function-declaration
- @echo ' Finished building target: $@'
-endif
-ifeq ($(strip $(APPTYPE)),staticLib)
-$(APPFILE) : $(OBJS) $(UOBJS)
- @echo ' Building target: $@'
- @echo ' Invoking: Archive utility'
- @$(MKDIR) $(MKDIR_OP) $(subst $(BSLASH),/,$(@D))
- $(AR) -r "$(APPFILE)" $(OBJS) $(UOBJS) $(AR_FLAGS)
- @echo ' Finished building target: $@'
-endif
-ifeq ($(strip $(APPTYPE)),sharedLib)
-$(APPFILE) : $(OBJS) $(UOBJS)
- @echo ' Building target: $@'
- @echo ' Invoking: C/C++ Linker'
- @$(MKDIR) $(MKDIR_OP) $(subst $(BSLASH),/,$(@D))
- $(CXX) -o "$(APPFILE)" $(OBJS) $(UOBJS) $(LIBPATHS) -Xlinker --as-needed $(LIBS) $(LINK_FLAGS) $(TC_LINKER_MISC) $(RS_LINKER_MISC) -shared -lpthread --sysroot="$(SYSROOT)" -L"$(SYSROOT)/usr/lib" $(RS_LIBRARIES)
- @echo ' Finished building target: $@'
-endif
-
-
-ifneq ($(strip $(C_SRCS)),)
-CDEFS += $(addprefix -D,$(USER_DEFS))
-CDEFS += $(addprefix -U,$(USER_UNDEFS))
-
-INCS := $(addprefix -I$(PROJ_ROOT)/,$(USER_INC_DIRS)) \
- $(addprefix -I,$(USER_INC_DIRS_ABS)) \
- $(addprefix -include$(PROJ_ROOT)/,$(USER_INC_FILES)) \
- $(addprefix -include,$(USER_INC_FILES_ABS))
-
-$(C_OBJS) : $(OBJ_OUTPUT)/%.o : $(PROJ_ROOT)/%.c $(PLATFORM_INCS_FILE)
- @echo ' Building file: $<'
- @echo ' Invoking: C Compiler'
- @$(MKDIR) $(MKDIR_OP) $(subst $(BSLASH),/,$(@D))
-ifeq ($(strip $(APPTYPE)),sharedLib)
- $(CC) -c $< -o $@ $(CDEFS) $(INCS) -I"pch" $(COMPILE_FLAGS) $(TC_COMPILER_MISC) $(RS_COMPILER_MISC) -fPIC --sysroot="$(SYSROOT)" -Werror-implicit-function-declaration $(M_OPT) @$(PLATFORM_INCS_FILE)
-else
- $(CC) -c $< -o $@ $(CDEFS) $(INCS) -I"pch" $(COMPILE_FLAGS) $(TC_COMPILER_MISC) $(RS_COMPILER_MISC) -fPIE --sysroot="$(SYSROOT)" -Werror-implicit-function-declaration $(M_OPT) @$(PLATFORM_INCS_FILE)
-endif
- @echo ' Finished building: $<'
-endif
-
-ifneq ($(strip $(CPP_SRCS)),)
-CPPDEFS += $(addprefix -D,$(USER_CPP_DEFS))
-CPPDEFS += $(addprefix -U,$(USER_CPP_UNDEFS))
-
-CPP_INCS := $(addprefix -I$(PROJ_ROOT)/,$(USER_CPP_INC_DIRS)) \
- $(addprefix -I,$(USER_CPP_INC_DIRS_ABS)) \
- $(addprefix -include$(PROJ_ROOT)/,$(USER_CPP_INC_FILES)) \
- $(addprefix -include,$(USER_CPP_INC_FILES_ABS))
-
-$(CPP_OBJS) : $(OBJ_OUTPUT)/%.o : $(PROJ_ROOT)/%.cpp $(PLATFORM_INCS_FILE)
- @echo ' Building file: $<'
- @echo ' Invoking: C++ Compiler'
- @$(MKDIR) $(MKDIR_OP) $(subst $(BSLASH),/,$(@D))
-ifeq ($(strip $(APPTYPE)),sharedLib)
- $(CXX) -c $< -o $@ $(CPPDEFS) $(CPP_INCS) -I"pch" $(CPP_COMPILE_FLAGS) $(TC_COMPILER_MISC) $(RS_COMPILER_MISC) -fPIC --sysroot="$(SYSROOT)" -Werror-implicit-function-declaration $(M_OPT) @$(PLATFORM_INCS_FILE)
-else
- $(CXX) -c $< -o $@ $(CPPDEFS) $(CPP_INCS) -I"pch" $(CPP_COMPILE_FLAGS) $(TC_COMPILER_MISC) $(RS_COMPILER_MISC) -fPIE --sysroot="$(SYSROOT)" -Werror-implicit-function-declaration $(M_OPT) @$(PLATFORM_INCS_FILE)
-endif
- @echo ' Finished building: $<'
-endif
-
-
-$(OBJ_OUTPUT) :
- @echo ' Building directory: $@'
- @$(MKDIR) $(MKDIR_OP) $(OBJ_OUTPUT)
-
-preproc : $(OBJ_OUTPUT)
-ifneq ($(strip $(PREBUILD_COMMAND)),)
-ifneq ($(strip $(PREBUILD_DESC)),)
- @echo $(PREBUILD_DESC)
-endif
- @echo $(shell $(PREBUILD_COMMAND))
-endif
-
-
-postproc :
-ifneq ($(strip $(POSTBUILD_COMMAND)),)
-ifneq ($(strip $(POSTBUILD_DESC)),)
- @echo $(POSTBUILD_DESC)
-endif
- @echo $(shell $(POSTBUILD_COMMAND))
-endif
-
-ifneq ($(strip $(PLATFORM_INCS)),)
-$(PLATFORM_INCS_FILE) : $(OBJ_OUTPUT)
- @echo ' Building inc file: $@'
-ifneq ($(findstring Linux,$(OS_NAME)),)
- @echo $(PLATFORM_INCS) > $@
-else
-ifneq ($(findstring 3.82,$(MAKE_VERSION)),)
- $(file > $@,$(PLATFORM_INCS))
-else
- @echo $(PLATFORM_INCS) > $@
-endif
-endif
-endif
-
-ALL_EDJ_FILES :=
-
-define EDJ_PROC
-ALL_EDCS := $$(subst $(BSLASH),/,$$($(2)))
-NORMAL_EDCS := $$(filter-out %*.edc,$$(ALL_EDCS))
-WIDLCARD_EDCS := $$(filter %*.edc,$$(ALL_EDCS))
-EDCS := $$(NORMAL_EDCS) $$(foreach var_edc,$$(WIDLCARD_EDCS),$$(call FIND_FILES,$$(var_edc)))
-
-ifneq ($$(strip $$(EDCS)),)
-EDJ_FILES := $$(call FUNC_EDC2EDJ,$$(EDCS))
-
-ALL_EDJ_FILES += $$(EDJ_FILES)
-
-EDC_$(1)_COMPILER_FLAGS := -id "$$(SDK_TOOLPATH)/enventor/share/enventor/images"
-EDC_$(1)_COMPILER_FLAGS += -sd "$$(SDK_TOOLPATH)/enventor/share/enventor/sounds"
-EDC_$(1)_COMPILER_FLAGS += -fd "$$(SDK_TOOLPATH)/enventor/share/enventor/fonts"
-
-ifneq ($$(strip $(3)),)
-EDC_$(1)_COMPILER_FLAGS += $$(addprefix -id $$(PROJ_PATH)/,$$($(3)))
-endif
-ifneq ($$(strip $(4)),)
-EDC_$(1)_COMPILER_FLAGS += $$(addprefix -id ,$$($(4)))
-endif
-ifneq ($$(strip $(5)),)
-EDC_$(1)_COMPILER_FLAGS += $$(addprefix -sd $$(PROJ_PATH)/,$$($(5)))
-endif
-ifneq ($$(strip $(6)),)
-EDC_$(1)_COMPILER_FLAGS += $$(addprefix -sd ,$$($(6)))
-endif
-ifneq ($$(strip $(7)),)
-EDC_$(1)_COMPILER_FLAGS += $$(addprefix -fd $$(PROJ_PATH)/,$$($(7)))
-endif
-ifneq ($$(strip $(8)),)
-EDC_$(1)_COMPILER_FLAGS += $$(addprefix -fd ,$$($(8)))
-endif
-
-$$(EDJ_FILES) : $$(OUTPUT_DIR)/%.edj : $$(PROJ_ROOT)/%.edc
- @echo ' Building file: $$<'
- @echo ' Invoking: EDC Resource Compiler'
- @$$(MKDIR) $$(MKDIR_OP) $$(subst $$(BSLASH),/,$$(@D))
- $$(EDJE_CC) $$(EDC_$(1)_COMPILER_FLAGS) $$(CDEFS) "$$<" "$$@"
- @echo ' Finished building: $$<'
-endif
-endef
-
-# Global EDCs
-ifneq ($(strip $(USER_EDCS)),)
-$(eval $(call EDJ_PROC,,USER_EDCS,USER_EDCS_IMAGE_DIRS,USER_EDCS_IMAGE_DIRS_ABS,USER_EDCS_SOUND_DIRS,USER_EDCS_SOUND_DIRS_ABS,USER_EDCS_FONT_DIRS,USER_EDCS_FONT_DIRS_ABS))
-endif
-
-# Individual EDCs
-ifneq ($(strip $(USER_EXT_EDC_KEYS)),)
-$(foreach var,$(USER_EXT_EDC_KEYS),$(eval $(call EDJ_PROC,$(var),USER_EXT_$(var)_EDCS,USER_EXT_$(var)_EDCS_IMAGE_DIRS,USER_EXT_$(var)_EDCS_IMAGE_DIRS_ABS,USER_EXT_$(var)_EDCS_SOUND_DIRS,USER_EXT_$(var)_EDCS_SOUND_DIRS_ABS,USER_EXT_$(var)_EDCS_FONT_DIRS,USER_EXT_$(var)_EDCS_FONT_DIRS_ABS)))
-endif
-
-
-ifneq ($(strip $(POS)),)
-define MO_RULE
-$(call FUNC_PO2MO,$(1)) : $(PROJ_ROOT)/$(1)
- @echo ' Building file: $$<'
- @echo ' Invoking: msgfmt String Formatter'
- @$$(MKDIR) $$(MKDIR_OP) $$(subst $$(BSLASH),/,$$(@D))
- $$(MSGFMT) -o $$@ $$<
- @echo ' Finished building: $$<'
-endef
-
-$(foreach var,$(POS),$(eval $(call MO_RULE,$(var))))
-endif
-
-
-secondary-outputs : $(ALL_EDJ_FILES) $(MO_FILES)
-
--include appendix.mk
-
-
-app_build : preproc $(APPFILE) secondary-outputs postproc
-
-app_clean :
- rm -f "$(APPFILE)"
- rm -rf "$(OUTPUT_DIR)"
-
-make_version :
- @echo $(BUILD_SCRIPT_VERSION)
+++ /dev/null
-# Add pre/post build process
-
-PREBUILD_COMMAND =
-PREBUILD_DESC =
-
-POSTBUILD_COMMAND =
-POSTBUILD_DESC =
+++ /dev/null
-# Add inputs and outputs from these tool invocations to the build variables
-
-ifeq ($(strip $(BUILD_CONFIG)),)
-BUILD_CONFIG = Debug
-endif
-
-ifeq ($(strip $(OUTPUT_DIR)),)
-OUTPUT_DIR := $(PROJPATH)/$(BUILD_CONFIG)
-endif
-
-
-ifneq ($(strip $(MKDIR_BIN)),)
-MKDIR = $(MKDIR_BIN)
-MKDIR_OP = -p
-else
-MKDIR = mkdir
-MKDIR_OP = -p
-endif
-
-ifneq ($(strip $(UNAME_BIN)),)
-UNAME = $(UNAME_BIN)
-else
-UNAME = uname
-endif
-
-ifneq ($(strip $(M4_BIN)),)
-M4 = $(M4_BIN)
-else
-M4 = m4
-endif
-
-ifneq ($(strip $(TR_BIN)),)
-TR = $(TR_BIN)
-else
-TR = tr
-endif
-
-ifneq ($(strip $(FIND_BIN)),)
-FIND = $(FIND_BIN)
-else
-FIND = find
-endif
-
-ifneq ($(strip $(GREP_BIN)),)
-GREP = $(GREP_BIN)
-else
-GREP = grep
-endif
-
-ifneq ($(strip $(EDJE_CC_BIN)),)
-EDJE_CC = $(EDJE_CC_BIN)
-else
-EDJE_CC = edje_cc
-endif
-
-ifneq ($(strip $(MSGFMT_BIN)),)
-MSGFMT = $(MSGFMT_BIN)
-else
-MSGFMT = msgfmt
-endif
-
#video-player
ADD_SUBDIRECTORY(vp-main)
-
Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
+ Flora License
+ Version 1.1, April, 2013
+ http://floralicense.org/license
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
+ "Tizen Certified Platform" shall mean a software platform that complies
+ with the standards set forth in the Tizen Compliance Specification and
+ passes the Tizen Compliance Tests as defined from time to time by the
+ Tizen Technical Steering Group and certified by the Tizen Association
+ or its designated agent.
+
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
+ use, offer to sell, sell, import, and otherwise transfer the Work
+ solely as incorporated into a Tizen Certified Platform, where
+ such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
+ with the Work solely as incorporated into a Tizen Certified Platform
+ to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
+ Work or Derivative Works thereof pursuant to the copyright
+ license above, in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
+ the conditions stated in this License and your own copyright statement
+ or terms and conditions do not conflict the conditions stated in this
+ License including section 3.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
END OF TERMS AND CONDITIONS
- APPENDIX: How to apply the Apache License to your work.
+ APPENDIX: How to apply the Flora License to your work
- To apply the Apache License to your work, attach the following
+ To apply the Flora License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
Copyright [yyyy] [name of copyright owner]
- Licensed under the Apache License, Version 2.0 (the "License");
+ Licensed under the Flora License, Version 1.1 (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
+ http://floralicense.org/license
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.
+
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
#include <glib.h>
-typedef void *vp_chapter_db_h;
+typedef void *vp_chapter_db_h;
typedef struct _ChapterDBItem {
- int nIdx;
- char *szChapterPath;
- int nFileSize;
-}ChapterDBItem;
+ int nIdx;
+ char *szChapterPath;
+ int nFileSize;
+} ChapterDBItem;
#ifdef _cplusplus
-extern "C"
-{
+extern "C" {
#endif
-vp_chapter_db_h vp_chapter_db_create();
-void vp_chapter_db_destroy(vp_chapter_db_h hChapterDB);
-bool vp_chapter_db_set_media_id(vp_chapter_db_h hChapterDB, const char *szMediaID);
-bool vp_chapter_db_set_media_url(vp_chapter_db_h hChapterDB, const char *szMediaURL);
-bool vp_chapter_db_get_items(vp_chapter_db_h hChapterDB, GList **pChapterList);
-bool vp_chapter_db_get_all_items_media_id(vp_chapter_db_h hChapterDB, GList **pChapterList);
-bool vp_chapter_db_insert(vp_chapter_db_h hChapterDB, const char *szChapterPath, int nIdx);
-bool vp_chapter_db_delete(vp_chapter_db_h hChapterDB);
-bool vp_chapter_db_item_count(vp_chapter_db_h hChapterDB, int *nCount);
-bool vp_chapter_db_item_free(ChapterDBItem *pItem);
+ vp_chapter_db_h vp_chapter_db_create();
+ void vp_chapter_db_destroy(vp_chapter_db_h hChapterDB);
+ bool vp_chapter_db_set_media_id(vp_chapter_db_h hChapterDB,
+ const char *szMediaID);
+ bool vp_chapter_db_set_media_url(vp_chapter_db_h hChapterDB,
+ const char *szMediaURL);
+ bool vp_chapter_db_get_items(vp_chapter_db_h hChapterDB,
+ GList ** pChapterList);
+ bool vp_chapter_db_get_all_items_media_id(vp_chapter_db_h hChapterDB,
+ GList ** pChapterList);
+ bool vp_chapter_db_insert(vp_chapter_db_h hChapterDB,
+ const char *szChapterPath, int nIdx);
+ bool vp_chapter_db_delete(vp_chapter_db_h hChapterDB);
+ bool vp_chapter_db_item_count(vp_chapter_db_h hChapterDB, int *nCount);
+ bool vp_chapter_db_item_free(ChapterDBItem * pItem);
#ifdef _cplusplus
}
#endif
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
#ifdef _cplusplus
-extern "C"
-{
+extern "C" {
#endif
#define FONT_COLOR_GRAY "\033[37m"
#ifdef _USE_LOG_FILE_
-FILE *g_log_fp;
-#endif // _USE_LOG_FILE_
+ FILE *g_log_fp;
+#endif // _USE_LOG_FILE_
#ifdef _USE_LOG_FILE_
#elif defined _USE_DLOG_
-#define vp_dbg_tid(fmt,arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d %lu]" fmt "\n", __func__, __LINE__, syscall(__NR_gettid), ##arg)
+#define vp_dbg_tid(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d %lu]" fmt "\n", __func__, __LINE__, syscall(__NR_gettid), ##arg)
#define vp_dbg(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
#define vp_dbgW(fmt, arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
#define vp_dbgE(fmt, arg...) dlog_print(DLOG_ERROR, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
-#define vp_sdbg(fmt,arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
-#define vp_sdbg_tid(fmt,arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s : %05d %lu]" fmt "\n", __func__, __LINE__, syscall(__NR_gettid), ##arg)
-#define vp_sdbgE( fmt,arg...) dlog_print(DLOG_ERROR, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
+#define vp_sdbg(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
+#define vp_sdbg_tid(fmt, arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s : %05d %lu]" fmt "\n", __func__, __LINE__, syscall(__NR_gettid), ##arg)
+#define vp_sdbgE(fmt, arg...) dlog_print(DLOG_ERROR, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
#elif defined _USE_LOG_CONSOLE_
#else
-#define vp_dbg(fmt,arg...)
+#define vp_dbg(fmt, arg...)
#define vp_dbgW(fmt, arg...)
#define vp_dbgE(fmt, arg...)
#endif
#define vp_retm_if(expr, fmt, arg...) do { \
- if(expr) { \
+ if (expr) { \
vp_dbgE(fmt, ##arg); \
vp_dbgE("(%s) -> %s() return", #expr, __FUNCTION__); \
return; \
} while (0)
#define vp_retvm_if(expr, val, fmt, arg...) do { \
- if(expr) { \
+ if (expr) { \
vp_dbgE(fmt, ##arg); \
vp_dbgE("(%s) -> %s() return", #expr, __FUNCTION__); \
return (val); \
} while (0)
#define CHECK_EXCEP(expr) do { \
- if(!(expr)) { \
+ if (!(expr)) { \
vp_dbgE("Critical ERROR ########################################## Check below item.");\
goto EXCEPTION;\
} \
} while (0)
-#define VP_CHECK_VAL(expr, val) vp_retvm_if(!(expr), val, "Invalid parameter, return ERROR code!")
-#define VP_CHECK_NULL(expr) vp_retvm_if(!(expr), NULL, "Invalid parameter, return NULL!")
-#define VP_CHECK_FALSE(expr) vp_retvm_if(!(expr), false, "Invalid parameter, return FALSE!")
-#define VP_CHECK_CANCEL(expr) vp_retvm_if(!(expr), ECORE_CALLBACK_CANCEL, "Invalid parameter, return ECORE_CALLBACK_CANCEL!")
-#define VP_CHECK(expr) vp_retm_if(!(expr), "Invalid parameter, return!")
+#define VP_CHECK_VAL(expr, val) vp_retvm_if(!(expr), val, "Invalid parameter, return ERROR code!")
+#define VP_CHECK_NULL(expr) vp_retvm_if(!(expr), NULL, "Invalid parameter, return NULL!")
+#define VP_CHECK_FALSE(expr) vp_retvm_if(!(expr), false, "Invalid parameter, return FALSE!")
+#define VP_CHECK_CANCEL(expr) vp_retvm_if(!(expr), ECORE_CALLBACK_CANCEL, "Invalid parameter, return ECORE_CALLBACK_CANCEL!")
+#define VP_CHECK(expr) vp_retm_if(!(expr), "Invalid parameter, return!")
-#define VP_START_FUNC() dlog_print(DLOG_DEBUG, "*********************** [Func: %s] enter!! ********************* \n", __func__)
-#define VP_END_FUNC() dlog_print(DLOG_DEBUG, "*********************** [Func: %s] leave!! ********************* \n", __func__)
+#define VP_START_FUNC() dlog_print(DLOG_DEBUG, "*********************** [Func: %s] enter!! ********************* \n", __func__)
+#define VP_END_FUNC() dlog_print(DLOG_DEBUG, "*********************** [Func: %s] leave!! ********************* \n", __func__)
#ifdef _cplusplus
}
#endif
-
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 __VP_FILE_UTIL_H__
#define __VP_FILE_UTIL_H__
#include <dirent.h>
#include <Elementary.h>
-const char* vp_file_get(const char path[]);
-char* vp_dir_get(const char path[]);
+const char *vp_file_get(const char path[]);
+char *vp_dir_get(const char path[]);
int vp_file_exists(const char *path);
Eina_Bool vp_is_dir(const char *path);
int vp_is_dir_empty(const char *path);
int vp_mkdir(const char *dir);
int vp_mkpath(const char *path);
char *vp_strip_ext(const char *path);
-int vp_file_unlink (const char *filename);
+int vp_file_unlink(const char *filename);
int vp_file_size(const char *filename);
int vp_file_rmdir(const char *filename);
Eina_List *vp_file_ls(const char *dir);
int vp_file_recursive_rm(const char *dir);
-int vp_file_cp(const char *src,const char *dst);
+int vp_file_cp(const char *src, const char *dst);
int vp_file_mv(const char *src, const char *dst);
-#endif //__VP_FILE_UTIL_H__
-
+#endif //__VP_FILE_UTIL_H__
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <stdio.h>
#include <stdlib.h>
#define _EDJ(o) elm_layout_edje_get(o)
#define VP_SCALE elm_config_scale_get()
-#define VP_MAX_HEAP_SIZE 5*1024*1024 /*Malloc more than this will not be allowd*/
+#define VP_MAX_HEAP_SIZE 5*1024*1024 /*Malloc more than this will not be allowd */
#define VP_ASSERT(scalar_exp) \
assert(scalar_exp); \
#define VP_CALLOC(ptr, no_elements, type) \
do { \
- if((int)(no_elements) <= 0) \
- { \
+ if ((int)(no_elements) <= 0) { \
ptr = NULL; \
} \
- else if(VP_MAX_HEAP_SIZE < no_elements* sizeof (type)) \
- { \
+ else if (VP_MAX_HEAP_SIZE < no_elements * sizeof(type)) { \
assert(0); \
} \
- else \
- { \
- ptr = (type *) calloc (no_elements , sizeof (type)); \
+ else {\
+ ptr = (type *) calloc(no_elements , sizeof(type)); \
VP_ASSERT(ptr); \
- }\
- }while(0);
+ } \
+ } while (0);
-#define VP_SNPRINTF(dest,size,format,arg...) \
+#define VP_SNPRINTF(dest, size, format, arg...) \
do { \
- if(dest != NULL && format != NULL) \
- { \
- snprintf(dest,size,format,##arg); \
+ if (dest != NULL && format != NULL) { \
+ snprintf(dest, size, format, ##arg); \
} \
- }while(0);
+ } while (0);
- /* If the same pointer is passed to free twice, known as a double free.
- To avoid this, set pointers to NULL after passing them to free:
- free(NULL) is safe (it does nothing). */
+ /* If the same pointer is passed to free twice, known as a double free.
+ To avoid this, set pointers to NULL after passing them to free:
+ free(NULL) is safe (it does nothing). */
#define VP_FREE(ptr) \
do { \
- if(ptr != NULL) \
- { \
+ if (ptr != NULL) {\
free(ptr); \
ptr = NULL; \
} \
- }while(0);
+ } while (0);
-#define VP_STRNCPY(dest,src,size) \
+#define VP_STRNCPY(dest, src, size) \
do { \
- if(src != NULL && dest != NULL && size > 0) \
- { \
- strncpy(dest,src,size); \
+ if (src != NULL && dest != NULL && size > 0) {\
+ strncpy(dest, src, size); \
} \
- }while(0);
+ } while (0);
/*
* string wrappers
*/
-#define VP_STRDUP(destptr,sourceptr)\
- do{\
- if(sourceptr == NULL)\
+#define VP_STRDUP(destptr, sourceptr)\
+ do {\
+ if (sourceptr == NULL)\
destptr = NULL; \
else \
destptr = strdup(sourceptr); \
- }while(0);
+ } while (0);
#define VP_EVAS_DEL(evas_obj) \
do { \
- if(evas_obj != NULL) \
- { \
+ if (evas_obj != NULL) {\
evas_object_del(evas_obj); \
evas_obj = NULL; \
} \
- }while(0);
+ } while (0);
#define VP_EVAS_TIMER_DEL(evas_obj) \
do { \
- if(evas_obj != NULL) \
- { \
+ if (evas_obj != NULL) {\
ecore_timer_del(evas_obj); \
evas_obj = NULL; \
} \
- }while(0);
+ } while (0);
#define VP_EVAS_IDLER_DEL(evas_obj) \
do { \
- if(evas_obj != NULL) \
- { \
+ if (evas_obj != NULL) {\
ecore_idler_del(evas_obj); \
evas_obj = NULL; \
} \
- }while(0);
+ } while (0);
#define VP_EVAS_EVENT_HANDLER_DEL(evas_obj) \
do { \
- if(evas_obj != NULL) \
- { \
+ if (evas_obj != NULL) {\
ecore_event_handler_del(evas_obj); \
evas_obj = NULL; \
} \
- }while(0);
+ } while (0);
#ifdef __cplusplus
- }
-#endif /* __cplusplus */
-
-
+}
+#endif /* __cplusplus */
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
-bool vp_media_content_util_get_video_id(const char *szFilePath, char **szVideoID);
+bool vp_media_content_util_get_video_id(const char *szFilePath,
+ char **szVideoID);
bool vp_media_content_util_get_first_video(char **szFilePath);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
#include <glib.h>
typedef struct _vp_gesture_t vp_gesture_s;
typedef struct _vp_pinch_event_t vp_pinch_event_s;
typedef enum _vp_pinch_plan_t vp_pinch_plan_e;
-typedef Eina_Bool (*vp_gesture_cb) (Evas_Object *gesture, void *data);
+typedef Eina_Bool(*vp_gesture_cb) (Evas_Object * gesture, void *data);
struct _vp_gesture_t {
st_VideoListViewMainViewWidget *ad;
Evas_Coord h;
Evas_Object *object;
Ecore_Timer *hold_timer;
- int ts; /* Time stamp to calculate whether scrolling or moving */
- int v; /* Velocity */
+ int ts; /* Time stamp to calculate whether scrolling or moving */
+ int v; /* Velocity */
int pinch_dis;
- Evas_Object *pinch_obj; /* Object between thumb and index */
- Evas_Object *test; /* To see dis center */
+ Evas_Object *pinch_obj; /* Object between thumb and index */
+ Evas_Object *test; /* To see dis center */
};
enum _vp_pinch_plan_t {
#define VP_IF_DEL_TIMER(timer) \
do { \
- if(timer != NULL) { \
+ if (timer != NULL) { \
ecore_timer_del(timer); \
timer = NULL; \
} \
#define VP_IF_DEL_JOB(job) \
do { \
- if(job != NULL) { \
+ if (job != NULL) { \
ecore_job_del(job); \
job = NULL; \
} \
#define VP_PINCH_HOLD_TIME_DELAY 0.35f
#define VP_GESTURE_KEY_DATA "gesture_data"
-int _vp_gesture_set_zoom_in_cb(Evas_Object *gesture, vp_gesture_cb cb, void *data);
-int _vp_gesture_set_zoom_out_cb(Evas_Object *gesture, vp_gesture_cb cb, void *data);
-int _vp_pinch_add_event(void *data, Evas_Object *layout);
-Eina_Bool __vp_pinch_zoom_out_cb(Evas_Object *gesture, void *data);
-Eina_Bool __vp_pinch_zoom_in_cb(Evas_Object *gesture, void *data);
+int _vp_gesture_set_zoom_in_cb(Evas_Object * gesture, vp_gesture_cb cb,
+ void *data);
+int _vp_gesture_set_zoom_out_cb(Evas_Object * gesture, vp_gesture_cb cb,
+ void *data);
+int _vp_pinch_add_event(void *data, Evas_Object * layout);
+Eina_Bool __vp_pinch_zoom_out_cb(Evas_Object * gesture, void *data);
+Eina_Bool __vp_pinch_zoom_in_cb(Evas_Object * gesture, void *data);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
#include <glib.h>
-typedef void *vp_preview_db_h;
+typedef void *vp_preview_db_h;
#ifdef _cplusplus
-extern "C"
-{
+extern "C" {
#endif
-vp_preview_db_h vp_preview_db_create();
-void vp_preview_db_destroy(vp_preview_db_h hPreviewDB);
-bool vp_preview_db_set_media_id(vp_preview_db_h hPreviewDB, const char *szMediaURL);
-bool vp_preview_db_set_media_url(vp_preview_db_h hPreviewDB, const char *szMediaURL);
-bool vp_preview_db_get_file_path(vp_preview_db_h hPreviewDB, char **szFilePath);
-bool vp_preview_db_get_file_size(vp_preview_db_h hPreviewDB, int *nFileSize);
-bool vp_preview_db_item_count(vp_preview_db_h hPreviewDB, int *nCount);
-bool vp_preview_db_get_all_items_media_id(vp_preview_db_h hPreviewDB, GList **pPreviewList);
-bool vp_preview_db_insert(vp_preview_db_h hPreviewDB, const char *szPreviewPath);
-bool vp_preview_db_delete(vp_preview_db_h hPreviewDB);
+ vp_preview_db_h vp_preview_db_create();
+ void vp_preview_db_destroy(vp_preview_db_h hPreviewDB);
+ bool vp_preview_db_set_media_id(vp_preview_db_h hPreviewDB,
+ const char *szMediaURL);
+ bool vp_preview_db_set_media_url(vp_preview_db_h hPreviewDB,
+ const char *szMediaURL);
+ bool vp_preview_db_get_file_path(vp_preview_db_h hPreviewDB,
+ char **szFilePath);
+ bool vp_preview_db_get_file_size(vp_preview_db_h hPreviewDB,
+ int *nFileSize);
+ bool vp_preview_db_item_count(vp_preview_db_h hPreviewDB, int *nCount);
+ bool vp_preview_db_get_all_items_media_id(vp_preview_db_h hPreviewDB,
+ GList ** pPreviewList);
+ bool vp_preview_db_insert(vp_preview_db_h hPreviewDB,
+ const char *szPreviewPath);
+ bool vp_preview_db_delete(vp_preview_db_h hPreviewDB);
#ifdef _cplusplus
}
#endif
-
-
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
#include <glib.h>
-typedef void *vp_thumb_db_h;
+typedef void *vp_thumb_db_h;
typedef struct _ThumbDBItem {
- int nIdx;
- char *szThumbPath;
- int nFileSize;
-}ThumbDBItem;
+ int nIdx;
+ char *szThumbPath;
+ int nFileSize;
+} ThumbDBItem;
#ifdef _cplusplus
-extern "C"
-{
+extern "C" {
#endif
-vp_thumb_db_h vp_thumb_db_create();
-void vp_thumb_db_destroy(vp_thumb_db_h hThumbDB);
-bool vp_thumb_db_set_media_id(vp_thumb_db_h hThumbDB, const char *szMediaID);
-bool vp_thumb_db_set_media_url(vp_thumb_db_h hThumbDB, const char *szMediaURL);
-bool vp_thumb_db_get_items(vp_thumb_db_h hThumbDB, GList **pThumbList);
-bool vp_thumb_db_get_all_items_media_id(vp_thumb_db_h hThumbDB, GList **pThumbList);
-bool vp_thumb_db_insert(vp_thumb_db_h hThumbDB, const char *szThumbPath, int nIdx);
-bool vp_thumb_db_delete(vp_thumb_db_h hThumbDB);
-bool vp_thumb_db_item_count(vp_thumb_db_h hThumbDB, int *nCount);
-bool vp_thumb_db_item_free(ThumbDBItem *pItem);
+ vp_thumb_db_h vp_thumb_db_create();
+ void vp_thumb_db_destroy(vp_thumb_db_h hThumbDB);
+ bool vp_thumb_db_set_media_id(vp_thumb_db_h hThumbDB,
+ const char *szMediaID);
+ bool vp_thumb_db_set_media_url(vp_thumb_db_h hThumbDB,
+ const char *szMediaURL);
+ bool vp_thumb_db_get_items(vp_thumb_db_h hThumbDB,
+ GList ** pThumbList);
+ bool vp_thumb_db_get_all_items_media_id(vp_thumb_db_h hThumbDB,
+ GList ** pThumbList);
+ bool vp_thumb_db_insert(vp_thumb_db_h hThumbDB,
+ const char *szThumbPath, int nIdx);
+ bool vp_thumb_db_delete(vp_thumb_db_h hThumbDB);
+ bool vp_thumb_db_item_count(vp_thumb_db_h hThumbDB, int *nCount);
+ bool vp_thumb_db_item_free(ThumbDBItem * pItem);
#ifdef _cplusplus
}
#endif
-
-
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <Elementary.h>
#include <image_util_type.h>
-char* vp_util_convert_file_location(const char *szFileLocation);
-int vp_util_image_rotate(unsigned char *dest, int *dest_width, int *dest_height, const image_util_rotation_e dest_rotation,
- const unsigned char *src, const int src_w, const int src_h, const image_util_colorspace_e colorspace);
-int vp_util_image_resize(unsigned char *dest, const int *dest_width , const int *dest_height, const unsigned char *src,
- const int src_w, const int src_h, const image_util_colorspace_e colorspace);
+char *vp_util_convert_file_location(const char *szFileLocation);
+int vp_util_image_rotate(unsigned char *dest, int *dest_width,
+ int *dest_height,
+ const image_util_rotation_e dest_rotation,
+ const unsigned char *src, const int src_w,
+ const int src_h,
+ const image_util_colorspace_e colorspace);
+int vp_util_image_resize(unsigned char *dest, const int *dest_width,
+ const int *dest_height, const unsigned char *src,
+ const int src_w, const int src_h,
+ const image_util_colorspace_e colorspace);
void vp_util_lock_cpu();
void vp_util_release_cpu();
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <Ecore.h>
#include "vp-debug.h"
#include "vp-macro.h"
-
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
bool vp_db_util_connect();
void vp_db_util_disconnect();
bool vp_db_util_is_connect();
-bool vp_db_util_query_prepare(char *szQuery, sqlite3_stmt **stmt);
-
-
+bool vp_db_util_query_prepare(char *szQuery, sqlite3_stmt ** stmt);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-db-common.h"
#include "vp-db-util.h"
} ChapterDB;
-static void _vp_chapter_db_destory_handle(ChapterDB *pChapterDB);
+static void _vp_chapter_db_destory_handle(ChapterDB * pChapterDB);
/* callback functions */
/* internal functions */
-static void _vp_chapter_db_destory_handle(ChapterDB *pChapterDB)
+static void _vp_chapter_db_destory_handle(ChapterDB * pChapterDB)
{
if (pChapterDB == NULL) {
vp_dbgE("pChapterDB is NULL");
}
bool vp_chapter_db_set_media_id(vp_chapter_db_h hChapterDB,
- const char *szMediaID)
+ const char *szMediaID)
{
if (hChapterDB == NULL) {
vp_dbgE("hChapterDB is NULL");
}
bool vp_chapter_db_set_media_url(vp_chapter_db_h hChapterDB,
- const char *szMediaURL)
+ const char *szMediaURL)
{
if (hChapterDB == NULL) {
vp_dbgE("hChapterDB is NULL");
VP_STRDUP(pChapterDB->szMediaURL, szMediaURL);
if (!vp_media_content_util_get_video_id
- (szMediaURL, &(pChapterDB->szMediaID))) {
+ (szMediaURL, &(pChapterDB->szMediaID))) {
vp_dbgE("vp_media_content_util_get_video_id is fail");
return FALSE;
}
}
bool vp_chapter_db_get_items(vp_chapter_db_h hChapterDB,
- GList **pChapterList)
+ GList ** pChapterList)
{
if (hChapterDB == NULL) {
vp_dbgE("hChapterDB is NULL");
}
char *szSql =
- sqlite3_mprintf(CHAPTER_DB_SELECT_QUERY, pChapterDB->szMediaID);
+ sqlite3_mprintf(CHAPTER_DB_SELECT_QUERY, pChapterDB->szMediaID);
sqlite3_stmt *stmt = NULL;
if (!vp_db_util_query_prepare(szSql, &stmt)) {
pItem->nIdx = (int) sqlite3_column_int(stmt, 1);
VP_STRDUP(pItem->szChapterPath,
- (char *) sqlite3_column_text(stmt, 2));
+ (char *) sqlite3_column_text(stmt, 2));
pItem->nFileSize = (int) sqlite3_column_int(stmt, 3);
*pChapterList = g_list_append(*pChapterList, pItem);
}
bool vp_chapter_db_get_all_items_media_id(vp_chapter_db_h hChapterDB,
- GList **pChapterList)
+ GList ** pChapterList)
{
if (hChapterDB == NULL) {
vp_dbgE("hChapterDB is NULL");
}
bool vp_chapter_db_insert(vp_chapter_db_h hChapterDB,
- const char *szChapterPath, int nIdx)
+ const char *szChapterPath, int nIdx)
{
if (hChapterDB == NULL) {
vp_dbgE("hChapterDB is NULL");
long long nSize = vp_file_size(szChapterPath);
char *szSql =
- sqlite3_mprintf(CHAPTER_DB_INSERT_QUERY, nIdx, szChapterPath,
- (int) nSize, pChapterDB->szMediaID);
+ sqlite3_mprintf(CHAPTER_DB_INSERT_QUERY, nIdx, szChapterPath,
+ (int) nSize, pChapterDB->szMediaID);
vp_sdbg("%s", szSql);
sqlite3_stmt *stmt = NULL;
_vp_chapter_db_delete_items(pChapterDB->szMediaID);
char *szSql =
- sqlite3_mprintf(CHAPTER_DB_DELETE_QUERY, pChapterDB->szMediaID);
+ sqlite3_mprintf(CHAPTER_DB_DELETE_QUERY, pChapterDB->szMediaID);
vp_sdbg("%s", szSql);
sqlite3_stmt *stmt = NULL;
return _vp_chapter_db_get_count(pChapterDB->szMediaID, nCount);
}
-bool vp_chapter_db_item_free(ChapterDBItem *pItem)
+bool vp_chapter_db_item_free(ChapterDBItem * pItem)
{
if (pItem == NULL) {
vp_dbgE("ChapterDBItem is 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-db-common.h"
#include "vp-db-util.h"
vp_dbgE("cannot retrieve app install path");
return NULL;
}
- char db_path[1024] = {0,};
+ char db_path[1024] = { 0, };
snprintf(db_path, 1024, "%s%s", app_path, ".video-thumb.db");
- //vp_dbgI("db_path: %s", db_path);
/*Connect DB */
ret = sqlite3_open(db_path, &pSqlite);
if (SQLITE_OK != ret) {
vp_dbgE("sqlite3_open fail [0x%x] : %s", ret,
- sqlite3_errmsg(pSqlite));
+ sqlite3_errmsg(pSqlite));
return NULL;
}
return pSqlite;
}
-static void _vp_db_util_disconnect_db(sqlite3 *db_handle)
+static void _vp_db_util_disconnect_db(sqlite3 * db_handle)
{
if (db_handle == NULL) {
vp_dbgE("db_handle is NULL");
}
-bool vp_db_util_query_prepare(char *szQuery, sqlite3_stmt **stmt)
+bool vp_db_util_query_prepare(char *szQuery, sqlite3_stmt ** stmt)
{
if (g_sqlite3_handle == NULL) {
vp_dbgE("database is not connect");
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-file-util.h"
#define PATH_MAX_SIZE 256
#define BUF_MAX 16384
static mode_t default_mode =
- S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
+ S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
const char *vp_file_get(const char path[])
{
while ((readdir_r(dirp, &ent_struct, &dp) == 0) && dp) {
if (stat(dp->d_name, &info) == 0 && (strcmp(dp->d_name, "."))
- && (strcmp(dp->d_name, ".."))) {
+ && (strcmp(dp->d_name, ".."))) {
closedir(dirp);
return 0;
}
closedir(dirp);
list =
- eina_list_sort(list, eina_list_count(list),
- EINA_COMPARE_CB(strcoll));
+ eina_list_sort(list, eina_list_count(list),
+ EINA_COMPARE_CB(strcoll));
return list;
}
if (dirp) {
while ((readdir_r(dirp, &ent_struct, &dp) == 0) && dp) {
if ((strcmp(dp->d_name, "."))
- && (strcmp(dp->d_name, ".."))) {
+ && (strcmp(dp->d_name, ".."))) {
if (!vp_file_recursive_rm(dp->d_name)) {
ret = 0;
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-db-common.h"
/* callback functions */
static bool __vp_media_content_info_cb(media_info_h pMediaHandle,
- void *pUserData)
+ void *pUserData)
{
media_info_h *pAssignItem = (media_info_h *) pUserData;
/* external functions */
bool vp_media_content_util_get_video_id(const char *szFilePath,
- char **szVideoID)
+ char **szVideoID)
{
if (szFilePath == NULL) {
vp_dbgE("szFilePath is NULL");
}
nRet =
- media_filter_set_condition(pFilterHandle, szTmpStr,
- MEDIA_CONTENT_COLLATE_DEFAULT);
+ media_filter_set_condition(pFilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
vp_dbgE("media_filter_set_condition is fail : 0x%x", nRet);
goto Execption;
}
nRet =
- media_info_foreach_media_from_db(pFilterHandle,
- __vp_media_content_info_cb,
- &pMediaHandle);
+ media_info_foreach_media_from_db(pFilterHandle,
+ __vp_media_content_info_cb,
+ &pMediaHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
vp_dbgE("media_filter_set_condition is fail : 0x%x", nRet);
goto Execption;
return TRUE;
-Execption:
+ Execption:
VP_FREE(szMediaID);
if (pFilterHandle) {
}
nRet =
- media_filter_set_condition(pFilterHandle, szTmpStr,
- MEDIA_CONTENT_COLLATE_DEFAULT);
+ media_filter_set_condition(pFilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
vp_dbgE("media_filter_set_condition is fail : 0x%x", nRet);
goto Execption;
}
nRet =
- media_filter_set_order(pFilterHandle, MEDIA_CONTENT_ORDER_DESC,
- MEDIA_MODIFIED_TIME,
- MEDIA_CONTENT_COLLATE_NOCASE);
+ media_filter_set_order(pFilterHandle, MEDIA_CONTENT_ORDER_DESC,
+ MEDIA_MODIFIED_TIME,
+ MEDIA_CONTENT_COLLATE_NOCASE);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
vp_dbgE("media_filter_set_order is fail : 0x%x", nRet);
goto Execption;
}
nRet =
- media_info_foreach_media_from_db(pFilterHandle,
- __vp_media_content_info_cb,
- &pMediaHandle);
+ media_info_foreach_media_from_db(pFilterHandle,
+ __vp_media_content_info_cb,
+ &pMediaHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
vp_dbgE("media_info_foreach_media_from_db is fail : 0x%x", nRet);
goto Execption;
return TRUE;
-Execption:
+ Execption:
VP_FREE(szMediaID);
if (pFilterHandle) {
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-play-log.h"
#include "vp-pinch-zoom.h"
static vp_pinch_event_s *__vp_gesture_create_event_obj(void *data,
- Evas_Object *
- object, int device)
+ Evas_Object *
+ object, int device)
{
- vp_gesture_s *gesture_d = (vp_gesture_s *)data;
+ vp_gesture_s *gesture_d = (vp_gesture_s *) data;
vp_pinch_event_s *ev = NULL;
ev = calloc(1, sizeof(vp_pinch_event_s));
if (ev == NULL) {
evas_object_geometry_get(object, &ev->x, &ev->y, &ev->w, &ev->h);
gesture_d->s_event_elist =
- eina_list_append(gesture_d->s_event_elist, ev);
+ eina_list_append(gesture_d->s_event_elist, ev);
return ev;
}
static int __vp_gesture_destroy_event_obj(void *data,
- vp_pinch_event_s *ev)
+ vp_pinch_event_s * ev)
{
- vp_gesture_s *gesture_d = (vp_gesture_s *)data;
+ vp_gesture_s *gesture_d = (vp_gesture_s *) data;
ev->pinch_obj = NULL;
ev->pinch_dis = 0;
gesture_d->s_event_elist =
- eina_list_remove(gesture_d->s_event_elist, ev);
+ eina_list_remove(gesture_d->s_event_elist, ev);
VP_IF_DEL_TIMER(ev->hold_timer);
VP_FREE(ev);
return 0;
}
-static vp_pinch_event_s *__vp_gesture_get_event_obj(void *data,
- int device)
+static vp_pinch_event_s *__vp_gesture_get_event_obj(void *data, int device)
{
- vp_gesture_s *gesture_d = (vp_gesture_s *)data;
+ vp_gesture_s *gesture_d = (vp_gesture_s *) data;
Eina_List *l = NULL;
vp_pinch_event_s *ev = NULL;
}
static int __vp_gesture_get_distance(Evas_Coord x1, Evas_Coord y1,
- Evas_Coord x2, Evas_Coord y2)
+ Evas_Coord x2, Evas_Coord y2)
{
int dis, dx, dy;
dx = x1 - x2;
dy = y1 - y2;
- dis = (int)sqrt(dx * dx + dy * dy);
+ dis = (int) sqrt(dx * dx + dy * dy);
return dis;
}
static Eina_Bool __vp_gesture_hold_timer_cb(void *data)
{
- vp_pinch_event_s *ev0 = (vp_pinch_event_s *)data;
+ vp_pinch_event_s *ev0 = (vp_pinch_event_s *) data;
VP_IF_DEL_TIMER(ev0->hold_timer);
return ECORE_CALLBACK_CANCEL;
}
static int __vp_gesture_get_multi_device(void *data)
{
- vp_gesture_s *gesture_d = (vp_gesture_s *)data;
+ vp_gesture_s *gesture_d = (vp_gesture_s *) data;
Eina_List *l = NULL;
vp_pinch_event_s *ev = NULL;
return 0;
}
-static void __vp_gesture_mouse_down_event(void *data, Evas *e,
- Evas_Object *evas_obj,
- void *ei)
+static void __vp_gesture_mouse_down_event(void *data, Evas * e,
+ Evas_Object * evas_obj, void *ei)
{
- Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down *)ei;
+ Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down *) ei;
vp_pinch_event_s *ev0;
ev0 = __vp_gesture_get_event_obj(data, 0);
if (ev0) {
ev0->prev.y = ev->output.y;
}
-static void __vp_gesture_multi_down_event(void *data, Evas *evas,
- Evas_Object *obj, void *ei)
+static void __vp_gesture_multi_down_event(void *data, Evas * evas,
+ Evas_Object * obj, void *ei)
{
vp_pinch_event_s *ev;
- Evas_Event_Multi_Down *down = (Evas_Event_Multi_Down *)ei;
+ Evas_Event_Multi_Down *down = (Evas_Event_Multi_Down *) ei;
ev = __vp_gesture_get_event_obj(data, down->device);
if (ev) {
return;
ev->prev.y = down->output.y;
}
-static void __vp_gesture_mouse_up_event(void *data, Evas *e,
- Evas_Object *obj, void *ei)
+static void __vp_gesture_mouse_up_event(void *data, Evas * e,
+ Evas_Object * obj, void *ei)
{
int mdevice;
vp_pinch_event_s *ev0;
VP_IF_DEL_TIMER(ev->hold_timer);
ev->hold_timer =
- ecore_timer_add(VP_PINCH_HOLD_TIME_DELAY,
- __vp_gesture_hold_timer_cb, ev);
+ ecore_timer_add(VP_PINCH_HOLD_TIME_DELAY,
+ __vp_gesture_hold_timer_cb, ev);
}
__vp_gesture_destroy_event_obj(data, ev0);
}
-static void __vp_gesture_multi_up_event(void *data, Evas *evas,
- Evas_Object *obj, void *ei)
+static void __vp_gesture_multi_up_event(void *data, Evas * evas,
+ Evas_Object * obj, void *ei)
{
- vp_gesture_s *gesture_d = (vp_gesture_s *)data;
- Evas_Event_Multi_Up *up = (Evas_Event_Multi_Up *)ei;
+ vp_gesture_s *gesture_d = (vp_gesture_s *) data;
+ Evas_Event_Multi_Up *up = (Evas_Event_Multi_Up *) ei;
vp_pinch_event_s *ev0 = NULL;
vp_pinch_event_s *ev = NULL;
ev = __vp_gesture_get_event_obj(data, up->device);
if (ev0) {
VP_IF_DEL_TIMER(ev0->hold_timer);
ev0->hold_timer =
- ecore_timer_add(VP_PINCH_HOLD_TIME_DELAY,
- __vp_gesture_hold_timer_cb, ev0);
+ ecore_timer_add(VP_PINCH_HOLD_TIME_DELAY,
+ __vp_gesture_hold_timer_cb, ev0);
} else {
/* up when device 0 is off */
}
__vp_gesture_destroy_event_obj(data, ev);
}
-static void __vp_gesture_mouse_move_event(void *data, Evas *e,
- Evas_Object *obj, void *ei)
+static void __vp_gesture_mouse_move_event(void *data, Evas * e,
+ Evas_Object * obj, void *ei)
{
- Evas_Event_Mouse_Move *ev = (Evas_Event_Mouse_Move *)ei;
+ Evas_Event_Mouse_Move *ev = (Evas_Event_Mouse_Move *) ei;
vp_pinch_event_s *ev0;
ev0 = __vp_gesture_get_event_obj(data, 0);
if (ev0 == NULL) {
static void __vp_gesture_zoom_out_job_cb(void *data)
{
- vp_gesture_s *gesture_d = (vp_gesture_s *)data;
+ vp_gesture_s *gesture_d = (vp_gesture_s *) data;
if (gesture_d->next_plan != VP_PINCH_PLAN_OUT) {
VideoLogWarning("State is wrong[plan:%d]!", gesture_d->next_plan);
VP_IF_DEL_JOB(gesture_d->pinch_job);
if (gesture_d->zoom_out_cb)
gesture_d->zoom_out_cb(gesture_d->gesture,
- gesture_d->zoom_out_data);
+ gesture_d->zoom_out_data);
VP_IF_DEL_JOB(gesture_d->pinch_job);
}
static void __vp_gesture_zoom_in_job_cb(void *data)
{
- vp_gesture_s *gesture_d = (vp_gesture_s *)data;
+ vp_gesture_s *gesture_d = (vp_gesture_s *) data;
if (gesture_d->next_plan != VP_PINCH_PLAN_IN) {
VideoLogWarning("State is wrong[plan:%d]!", gesture_d->next_plan);
VP_IF_DEL_JOB(gesture_d->pinch_job);
}
if (gesture_d->zoom_in_cb)
- gesture_d->zoom_in_cb(gesture_d->gesture,
- gesture_d->zoom_in_data);
+ gesture_d->zoom_in_cb(gesture_d->gesture, gesture_d->zoom_in_data);
VP_IF_DEL_JOB(gesture_d->pinch_job);
}
-static void __vp_gesture_multi_move_event(void *data, Evas *evas,
- Evas_Object *obj, void *ei)
+static void __vp_gesture_multi_move_event(void *data, Evas * evas,
+ Evas_Object * obj, void *ei)
{
vp_gesture_s *gesture_d = (vp_gesture_s *) data;
- Evas_Event_Multi_Move *move = (Evas_Event_Multi_Move *)ei;
+ Evas_Event_Multi_Move *move = (Evas_Event_Multi_Move *) ei;
int dis_new;
vp_pinch_event_s *ev0;
vp_pinch_event_s *ev;
}
dis_new = __vp_gesture_get_distance(ev0->prev.x, ev0->prev.y,
- ev->prev.x, ev->prev.y);
+ ev->prev.x, ev->prev.y);
int dis_old = gesture_d->dis_old;
if (dis_old != 0) {
if (dis_old - dis_new > 0
- && ev->pinch_dis > VP_PINCH_TOUCH_HOLD_RANGE) {
+ && ev->pinch_dis > VP_PINCH_TOUCH_HOLD_RANGE) {
if (gesture_d->pinch_dis_old
- && ev->pinch_dis <
- (gesture_d->pinch_dis_old * VP_PINCH_TOUCH_FACTOR)) {
+ && ev->pinch_dis <
+ (gesture_d->pinch_dis_old * VP_PINCH_TOUCH_FACTOR)) {
ev->pinch_dis += (dis_old - dis_new);
gesture_d->dis_old = dis_new;
return;
gesture_d->next_plan = VP_PINCH_PLAN_OUT; /* plan to zoom-out */
if (!gesture_d->pinch_job) {
gesture_d->pinch_job =
- ecore_job_add(__vp_gesture_zoom_out_job_cb, data);
+ ecore_job_add(__vp_gesture_zoom_out_job_cb, data);
} else {
VideoLogInfo("Added job pinch zoom out");
}
gesture_d->pinch_dis_old = ev->pinch_dis;
ev->pinch_dis = 0;
} else if (dis_old - dis_new < 0
- && ev->pinch_dis < -VP_PINCH_TOUCH_HOLD_RANGE) {
+ && ev->pinch_dis < -VP_PINCH_TOUCH_HOLD_RANGE) {
if (gesture_d->pinch_dis_old
- && ev->pinch_dis >
- (gesture_d->pinch_dis_old * VP_PINCH_TOUCH_FACTOR)) {
+ && ev->pinch_dis >
+ (gesture_d->pinch_dis_old * VP_PINCH_TOUCH_FACTOR)) {
ev->pinch_dis += (dis_old - dis_new);
gesture_d->dis_old = dis_new;
return;
if (!gesture_d->pinch_job) {
VideoLogInfo("Add job pinch zoom in");
gesture_d->pinch_job =
- ecore_job_add(__vp_gesture_zoom_in_job_cb, data);
+ ecore_job_add(__vp_gesture_zoom_in_job_cb, data);
} else {
VideoLogWarning("Added job pinch zoom in");
}
ev->pinch_dis += (dis_old - dis_new);
}
VideoLogInfo("dis_new: %d, dis_old: %d, pinch_dis %d", dis_new,
- dis_old, ev->pinch_dis);
+ dis_old, ev->pinch_dis);
/* Reset dis_old value */
gesture_d->dis_old = dis_new;
}
-static void __vp_gesture_del_cb(void *data, Evas *e, Evas_Object *obj,
- void *ei)
+static void __vp_gesture_del_cb(void *data, Evas * e, Evas_Object * obj,
+ void *ei)
{
VideoLogWarning("Delete gesture ---");
if (data) {
- vp_gesture_s *gesture_d = (vp_gesture_s *)data;
+ vp_gesture_s *gesture_d = (vp_gesture_s *) data;
VP_IF_DEL_JOB(gesture_d->pinch_job);
evas_object_data_del(gesture_d->gesture, VP_GESTURE_KEY_DATA);
VP_FREE(gesture_d);
VideoLogWarning("Delete gesture +++");
}
-Evas_Object *_vp_gesture_add(void *data, Evas_Object *parent)
+Evas_Object *_vp_gesture_add(void *data, Evas_Object * parent)
{
if (data == NULL || parent == NULL) {
VideoLogInfo("Error input parameters");
evas_object_color_set(gesture, 0, 0, 0, 0);
vp_gesture_s *gesture_d =
- (vp_gesture_s *)calloc(1, sizeof(vp_gesture_s));
+ (vp_gesture_s *) calloc(1, sizeof(vp_gesture_s));
if (gesture_d == NULL) {
evas_object_del(gesture);
return NULL;
gesture_d->gesture = gesture;
evas_object_event_callback_add(gesture, EVAS_CALLBACK_MOUSE_DOWN,
- __vp_gesture_mouse_down_event,
- gesture_d);
+ __vp_gesture_mouse_down_event,
+ gesture_d);
evas_object_event_callback_add(gesture, EVAS_CALLBACK_MOUSE_UP,
- __vp_gesture_mouse_up_event,
- gesture_d);
+ __vp_gesture_mouse_up_event, gesture_d);
evas_object_event_callback_add(gesture, EVAS_CALLBACK_MOUSE_MOVE,
- __vp_gesture_mouse_move_event,
- gesture_d);
+ __vp_gesture_mouse_move_event,
+ gesture_d);
evas_object_event_callback_add(gesture, EVAS_CALLBACK_MULTI_DOWN,
- __vp_gesture_multi_down_event,
- gesture_d);
+ __vp_gesture_multi_down_event,
+ gesture_d);
evas_object_event_callback_add(gesture, EVAS_CALLBACK_MULTI_UP,
- __vp_gesture_multi_up_event,
- gesture_d);
+ __vp_gesture_multi_up_event, gesture_d);
evas_object_event_callback_add(gesture, EVAS_CALLBACK_MULTI_MOVE,
- __vp_gesture_multi_move_event,
- gesture_d);
+ __vp_gesture_multi_move_event,
+ gesture_d);
- evas_object_data_set(gesture, VP_GESTURE_KEY_DATA,
- (void *)gesture_d);
+ evas_object_data_set(gesture, VP_GESTURE_KEY_DATA, (void *) gesture_d);
evas_object_event_callback_add(gesture, EVAS_CALLBACK_DEL,
- __vp_gesture_del_cb, gesture_d);
+ __vp_gesture_del_cb, gesture_d);
return gesture;
}
-int _vp_gesture_set_zoom_in_cb(Evas_Object *gesture, vp_gesture_cb cb,
- void *data)
+int _vp_gesture_set_zoom_in_cb(Evas_Object * gesture, vp_gesture_cb cb,
+ void *data)
{
if (gesture == NULL || data == NULL) {
VideoLogInfo("Event Object is NULL");
vp_gesture_s *gesture_d = NULL;
gesture_d =
- (vp_gesture_s *)evas_object_data_get(gesture,
- VP_GESTURE_KEY_DATA);
+ (vp_gesture_s *) evas_object_data_get(gesture,
+ VP_GESTURE_KEY_DATA);
if (gesture_d) {
gesture_d->zoom_in_cb = cb;
gesture_d->zoom_in_data = data;
return 0;
}
-int _vp_gesture_set_zoom_out_cb(Evas_Object *gesture, vp_gesture_cb cb,
- void *data)
+int _vp_gesture_set_zoom_out_cb(Evas_Object * gesture, vp_gesture_cb cb,
+ void *data)
{
if (gesture == NULL || data == NULL) {
VideoLogInfo("Event Object is NULL");
vp_gesture_s *gesture_d = NULL;
gesture_d =
- (vp_gesture_s *)evas_object_data_get(gesture,
- VP_GESTURE_KEY_DATA);
+ (vp_gesture_s *) evas_object_data_get(gesture,
+ VP_GESTURE_KEY_DATA);
if (gesture_d != NULL) {
gesture_d->zoom_out_cb = cb;
return 0;
}
-Eina_Bool __vp_pinch_zoom_out_cb(Evas_Object *gesture, void *data)
+Eina_Bool __vp_pinch_zoom_out_cb(Evas_Object * gesture, void *data)
{
if (gesture == NULL || data == NULL) {
VideoLogInfo("Event Object is NULL");
}
st_VideoListViewMainViewWidget *ad =
- (st_VideoListViewMainViewWidget *)data;
+ (st_VideoListViewMainViewWidget *) data;
VideoLogInfo("%d", ad->zoom_level);
if (ad->zoom_level > VP_ZOOM_IN_DEFAULT) {
ad->zoom_level--;
return ECORE_CALLBACK_CANCEL;
}
-Eina_Bool __vp_pinch_zoom_in_cb(Evas_Object *gesture, void *data)
+Eina_Bool __vp_pinch_zoom_in_cb(Evas_Object * gesture, void *data)
{
if (gesture == NULL || data == NULL) {
VideoLogInfo("Event Object is NULL");
}
st_VideoListViewMainViewWidget *ad =
- (st_VideoListViewMainViewWidget *) data;
+ (st_VideoListViewMainViewWidget *) data;
if ((ad->zoom_level >= VP_ZOOM_IN_DEFAULT) &&
- (ad->zoom_level < VP_ZOOM_IN_MAX)) {
+ (ad->zoom_level < VP_ZOOM_IN_MAX)) {
ad->zoom_level++;
if (_grid_view_zoom_in(data, NULL) == 0) {
ad->zoom_level = VP_ZOOM_IN_MAX;
return ECORE_CALLBACK_CANCEL;
}
-int _vp_pinch_add_event(void *data, Evas_Object *layout)
+int _vp_pinch_add_event(void *data, Evas_Object * layout)
{
if (data == NULL || layout == NULL) {
VideoLogError("Error input parameters");
}
st_VideoListViewMainViewWidget *ad =
- (st_VideoListViewMainViewWidget *)data;
+ (st_VideoListViewMainViewWidget *) data;
/* Set initialize level */
ad->zoom_level = VP_ZOOM_IN_DEFAULT;
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-db-common.h"
#include "vp-db-util.h"
} PreviewDB;
-static void _vp_preview_db_destory_handle(PreviewDB *pPreviewDB);
+static void _vp_preview_db_destory_handle(PreviewDB * pPreviewDB);
/* callback functions */
/* internal functions */
-static void _vp_preview_db_destory_handle(PreviewDB *pPreviewDB)
+static void _vp_preview_db_destory_handle(PreviewDB * pPreviewDB)
{
if (pPreviewDB == NULL) {
vp_dbgE("pPreviewDB is NULL");
}
bool vp_preview_db_set_media_id(vp_preview_db_h hPreviewDB,
- const char *szMediaID)
+ const char *szMediaID)
{
if (hPreviewDB == NULL) {
vp_dbgE("hPreviewDB is NULL");
}
bool vp_preview_db_set_media_url(vp_preview_db_h hPreviewDB,
- const char *szMediaURL)
+ const char *szMediaURL)
{
if (hPreviewDB == NULL) {
vp_dbgE("hPreviewDB is NULL");
VP_STRDUP(pPreviewDB->szMediaURL, szMediaURL);
if (!vp_media_content_util_get_video_id
- (szMediaURL, &(pPreviewDB->szMediaID))) {
+ (szMediaURL, &(pPreviewDB->szMediaID))) {
vp_dbgE("vp_media_content_util_get_video_id is fail");
return FALSE;
}
bool vp_preview_db_get_file_path(vp_preview_db_h hPreviewDB,
- char **szFilePath)
+ char **szFilePath)
{
if (hPreviewDB == NULL) {
vp_dbgE("hPreviewDB is NULL");
}
char *szSql =
- sqlite3_mprintf(PREVIEW_DB_SELECT_QUERY, pPreviewDB->szMediaID);
+ sqlite3_mprintf(PREVIEW_DB_SELECT_QUERY, pPreviewDB->szMediaID);
sqlite3_stmt *stmt = NULL;
if (!vp_db_util_query_prepare(szSql, &stmt)) {
}
bool vp_preview_db_get_file_size(vp_preview_db_h hPreviewDB,
- int *nFileSize)
+ int *nFileSize)
{
if (hPreviewDB == NULL) {
vp_dbgE("hPreviewDB is NULL");
}
char *szSql =
- sqlite3_mprintf(PREVIEW_DB_SELECT_QUERY, pPreviewDB->szMediaID);
+ sqlite3_mprintf(PREVIEW_DB_SELECT_QUERY, pPreviewDB->szMediaID);
sqlite3_stmt *stmt = NULL;
if (!vp_db_util_query_prepare(szSql, &stmt)) {
}
bool vp_preview_db_get_all_items_media_id(vp_preview_db_h hPreviewDB,
- GList **pPreviewList)
+ GList ** pPreviewList)
{
if (hPreviewDB == NULL) {
vp_dbgE("hPreviewDB is NULL");
}
bool vp_preview_db_insert(vp_preview_db_h hPreviewDB,
- const char *szPreviewPath)
+ const char *szPreviewPath)
{
if (hPreviewDB == NULL) {
vp_dbgE("hPreviewDB is NULL");
long long nSize = vp_file_size(szPreviewPath);
- char *szSql =
- sqlite3_mprintf(PREVIEW_DB_INSERT_QUERY, szPreviewPath,
- (int) nSize, pPreviewDB->szMediaID);
+ char *szSql = sqlite3_mprintf(PREVIEW_DB_INSERT_QUERY, szPreviewPath,
+ (int) nSize, pPreviewDB->szMediaID);
vp_sdbg("%s", szSql);
sqlite3_stmt *stmt = NULL;
_vp_preview_db_delete_item(pPreviewDB->szMediaID);
char *szSql =
- sqlite3_mprintf(PREVIEW_DB_DELETE_QUERY, pPreviewDB->szMediaID);
+ sqlite3_mprintf(PREVIEW_DB_DELETE_QUERY, pPreviewDB->szMediaID);
vp_sdbg("%s", szSql);
sqlite3_stmt *stmt = 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-db-common.h"
#include "vp-db-util.h"
#include "vp-file-util.h"
} ThumbDB;
-static void _vp_thumb_db_destory_handle(ThumbDB *pThumbDB);
+static void _vp_thumb_db_destory_handle(ThumbDB * pThumbDB);
/* callback functions */
/* internal functions */
-static void _vp_thumb_db_destory_handle(ThumbDB *pThumbDB)
+static void _vp_thumb_db_destory_handle(ThumbDB * pThumbDB)
{
if (pThumbDB == NULL) {
vp_dbgE("pThumbDB is NULL");
}
bool vp_thumb_db_set_media_id(vp_thumb_db_h hThumbDB,
- const char *szMediaID)
+ const char *szMediaID)
{
if (hThumbDB == NULL) {
vp_dbgE("hThumbDB is NULL");
}
bool vp_thumb_db_set_media_url(vp_thumb_db_h hThumbDB,
- const char *szMediaURL)
+ const char *szMediaURL)
{
if (hThumbDB == NULL) {
vp_dbgE("hThumbDB is NULL");
VP_STRDUP(pThumbDB->szMediaURL, szMediaURL);
if (!vp_media_content_util_get_video_id
- (szMediaURL, &(pThumbDB->szMediaID))) {
+ (szMediaURL, &(pThumbDB->szMediaID))) {
vp_dbgE("vp_media_content_util_get_video_id is fail");
return FALSE;
}
}
-bool vp_thumb_db_get_items(vp_thumb_db_h hThumbDB, GList **pThumbList)
+bool vp_thumb_db_get_items(vp_thumb_db_h hThumbDB, GList ** pThumbList)
{
if (hThumbDB == NULL) {
vp_dbgE("hThumbDB is NULL");
}
char *szSql =
- sqlite3_mprintf(THUMB_DB_SELECT_QUERY, pThumbDB->szMediaID);
+ sqlite3_mprintf(THUMB_DB_SELECT_QUERY, pThumbDB->szMediaID);
sqlite3_stmt *stmt = NULL;
if (!vp_db_util_query_prepare(szSql, &stmt)) {
pItem->nIdx = (int) sqlite3_column_int(stmt, 1);
VP_STRDUP(pItem->szThumbPath,
- (char *) sqlite3_column_text(stmt, 2));
+ (char *) sqlite3_column_text(stmt, 2));
pItem->nFileSize = (int) sqlite3_column_int(stmt, 3);
*pThumbList = g_list_append(*pThumbList, pItem);
}
bool vp_thumb_db_get_all_items_media_id(vp_thumb_db_h hThumbDB,
- GList **pThumbList)
+ GList ** pThumbList)
{
if (hThumbDB == NULL) {
vp_dbgE("hThumbDB is NULL");
bool vp_thumb_db_insert(vp_thumb_db_h hThumbDB, const char *szThumbPath,
- int nIdx)
+ int nIdx)
{
if (hThumbDB == NULL) {
vp_dbgE("hThumbDB is NULL");
long long nSize = vp_file_size(szThumbPath);
- char *szSql =
- sqlite3_mprintf(THUMB_DB_INSERT_QUERY, nIdx, szThumbPath,
- (int) nSize, pThumbDB->szMediaID);
+ char *szSql = sqlite3_mprintf(THUMB_DB_INSERT_QUERY, nIdx, szThumbPath,
+ (int) nSize, pThumbDB->szMediaID);
vp_sdbg("%s", szSql);
sqlite3_stmt *stmt = NULL;
_vp_thumb_db_delete_items(pThumbDB->szMediaID);
char *szSql =
- sqlite3_mprintf(THUMB_DB_DELETE_QUERY, pThumbDB->szMediaID);
+ sqlite3_mprintf(THUMB_DB_DELETE_QUERY, pThumbDB->szMediaID);
vp_sdbg("%s", szSql);
sqlite3_stmt *stmt = NULL;
return _vp_thumb_db_get_count(pThumbDB->szMediaID, nCount);
}
-bool vp_thumb_db_item_free(ThumbDBItem *pItem)
+bool vp_thumb_db_item_free(ThumbDBItem * pItem)
{
if (pItem == NULL) {
vp_dbgE("ThumbDBItem is 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
#include <string.h>
#define OTG_FOLDER "/opt/storage/usb"
#define PERSONAL_PAGE_FOLDER "/opt/storage/PersonalStorage"
-#define PKGNAME "videos"
+#define PKGNAME "videos"
#define VP_UTIL_LABEL_DEVICE_MEMORY __vp_util_get_string("IDS_VIDEO_SBODY_DEVICE_STORAGE")
#define VP_UTIL_LABEL_SD_CARD __vp_util_get_string("IDS_ST_BODY_SD_CARD")
return VP_STORAGE_NONE;
}
- char* PHONE_FOLDER = NULL;
- char* MEMORY_FOLDER = NULL;
+ char *PHONE_FOLDER = NULL;
+ char *MEMORY_FOLDER = NULL;
Vp_Storage store_type = VP_STORAGE_NONE;
storage_get_root_directory(STORAGE_TYPE_INTERNAL, &PHONE_FOLDER);
storage_get_root_directory(STORAGE_TYPE_EXTERNAL, &MEMORY_FOLDER);
if (g_str_has_prefix(filepath, CLOUD_FOLDER)) {
- store_type = VP_STORAGE_CLOUD;/*store in cloud server*/
+ store_type = VP_STORAGE_CLOUD; /*store in cloud server */
} else if (g_str_has_prefix(filepath, PHONE_FOLDER)) {
- store_type = VP_STORAGE_PHONE;/*store in phone*/
+ store_type = VP_STORAGE_PHONE; /*store in phone */
} else if (g_str_has_prefix(filepath, MEMORY_FOLDER)) {
- store_type = VP_STORAGE_MMC; /*store in MMC*/
+ store_type = VP_STORAGE_MMC; /*store in MMC */
} else if (g_str_has_prefix(filepath, OTG_FOLDER)) {
- store_type = VP_STORAGE_OTG; /*store in OTG*/
+ store_type = VP_STORAGE_OTG; /*store in OTG */
} else if (g_str_has_prefix(filepath, PERSONAL_PAGE_FOLDER)) {
- store_type = VP_STORAGE_PERSONAL_PAGE; /*store in persona page*/
+ store_type = VP_STORAGE_PERSONAL_PAGE; /*store in persona page */
} else {
store_type = VP_STORAGE_NONE;
}
return NULL;
}
- char* PHONE_FOLDER = NULL;
- char* MEMORY_FOLDER = NULL;
+ char *PHONE_FOLDER = NULL;
+ char *MEMORY_FOLDER = NULL;
Vp_Storage store_type = VP_STORAGE_NONE;
int root_len = 0;
free(PHONE_FOLDER);
free(MEMORY_FOLDER);
- /*size of path is DIR_PATH_LEN_MAX+1*/
+ /*size of path is DIR_PATH_LEN_MAX+1 */
char *logic_path = NULL;
- logic_path = (char *)malloc(DIR_PATH_LEN_MAX + 1);
+ logic_path = (char *) malloc(DIR_PATH_LEN_MAX + 1);
if (logic_path == NULL) {
return NULL;
}
}
if (store_type == VP_STORAGE_MMC) {
- file_location = g_strconcat(VP_UTIL_LABEL_SD_CARD, logic_path, NULL);
+ file_location =
+ g_strconcat(VP_UTIL_LABEL_SD_CARD, logic_path, NULL);
} else if (store_type == VP_STORAGE_PHONE) {
- file_location = g_strconcat(VP_UTIL_LABEL_DEVICE_MEMORY, logic_path, NULL);
+ file_location =
+ g_strconcat(VP_UTIL_LABEL_DEVICE_MEMORY, logic_path, NULL);
} else if (store_type == VP_STORAGE_OTG) {
file_location = g_strconcat(VP_UTIL_LABEL_OTG, logic_path, NULL);
} else if (store_type == VP_STORAGE_PERSONAL_PAGE) {
- file_location = g_strconcat(VP_UTIL_LABEL_PERSONAL_PAGE, logic_path, NULL);
+ file_location =
+ g_strconcat(VP_UTIL_LABEL_PERSONAL_PAGE, logic_path, NULL);
} else {
file_location = g_strdup(VP_UTIL_LABEL_UNKNOWN);
}
return file_location;
}
-int vp_util_image_rotate(unsigned char *dest, int *dest_width, int *dest_height, const image_util_rotation_e dest_rotation,
- const unsigned char *src, const int src_w, const int src_h, const image_util_colorspace_e colorspace)
+int vp_util_image_rotate(unsigned char *dest, int *dest_width,
+ int *dest_height,
+ const image_util_rotation_e dest_rotation,
+ const unsigned char *src, const int src_w,
+ const int src_h,
+ const image_util_colorspace_e colorspace)
{
if (!dest || !dest_width || !dest_height || !src) {
return IMAGE_UTIL_ERROR_INVALID_PARAMETER;
}
- if (IMAGE_UTIL_COLORSPACE_RGB888 != colorspace || src_w <= 0 || src_h <= 0
- || dest_rotation <= IMAGE_UTIL_ROTATION_NONE || dest_rotation > IMAGE_UTIL_ROTATION_FLIP_VERT) {
+ if (IMAGE_UTIL_COLORSPACE_RGB888 != colorspace || src_w <= 0
+ || src_h <= 0 || dest_rotation <= IMAGE_UTIL_ROTATION_NONE
+ || dest_rotation > IMAGE_UTIL_ROTATION_FLIP_VERT) {
return IMAGE_UTIL_ERROR_INVALID_PARAMETER;
}
- const int dest_w = (IMAGE_UTIL_ROTATION_180 == dest_rotation ? src_w : src_h);
- const int dest_h = (IMAGE_UTIL_ROTATION_180 == dest_rotation ? src_h : src_w);
+ const int dest_w =
+ (IMAGE_UTIL_ROTATION_180 == dest_rotation ? src_w : src_h);
+ const int dest_h =
+ (IMAGE_UTIL_ROTATION_180 == dest_rotation ? src_h : src_w);
const unsigned int src_stride = src_w * sizeof(rgb888);
const unsigned int dest_stride = dest_w * sizeof(rgb888);
int x = 0, y = 0;
switch (dest_rotation) {
- case IMAGE_UTIL_ROTATION_90: {
- const rgb888 * const src_col_0 = (rgb888*)(src + (src_h - 1) * src_stride);
- for (y = 0; y < dest_h; y++) {
- rgb888 * const dest_row = (rgb888*)(dest + y * dest_stride);
- const rgb888 * const src_col = (src_col_0 + y);
- for (x = 0; x < dest_w; x++) {
- dest_row[x] = *(rgb888*)((uchar*)src_col - x * src_stride);
+ case IMAGE_UTIL_ROTATION_90:{
+ const rgb888 *const src_col_0 =
+ (rgb888 *) (src + (src_h - 1) * src_stride);
+ for (y = 0; y < dest_h; y++) {
+ rgb888 *const dest_row =
+ (rgb888 *) (dest + y * dest_stride);
+ const rgb888 *const src_col = (src_col_0 + y);
+ for (x = 0; x < dest_w; x++) {
+ dest_row[x] =
+ *(rgb888 *) ((uchar *) src_col - x * src_stride);
+ }
}
}
- }
- break;
-
- case IMAGE_UTIL_ROTATION_180: {
- const rgb888 * const src_row_rev_0 = (rgb888*)(src + (src_h - 1) * src_stride
- + (src_w - 1) * sizeof(rgb888));
- for (y = 0; y < dest_h; y++) {
- rgb888 * const dest_row = (rgb888*)(dest + y * dest_stride);
- const rgb888 * const src_row_rev = (rgb888*)((uchar*)src_row_rev_0 - y * src_stride);
- for (x = 0; x < dest_w; x++) {
- dest_row[x] = *(src_row_rev - x);
+ break;
+
+ case IMAGE_UTIL_ROTATION_180:{
+ const rgb888 *const src_row_rev_0 =
+ (rgb888 *) (src + (src_h - 1) * src_stride +
+ (src_w - 1) * sizeof(rgb888));
+ for (y = 0; y < dest_h; y++) {
+ rgb888 *const dest_row =
+ (rgb888 *) (dest + y * dest_stride);
+ const rgb888 *const src_row_rev =
+ (rgb888 *) ((uchar *) src_row_rev_0 - y * src_stride);
+ for (x = 0; x < dest_w; x++) {
+ dest_row[x] = *(src_row_rev - x);
+ }
}
}
- }
- break;
-
- case IMAGE_UTIL_ROTATION_270: {
- const rgb888 * const src_col_rev_0 = (rgb888*)(src + (src_w - 1) * sizeof(rgb888));
- for (y = 0; y < dest_h; y++) {
- rgb888 * const dest_row = (rgb888*)(dest + y * dest_stride);
- const rgb888 * const src_col_rev = (src_col_rev_0 - y);
- for (x = 0; x < dest_w; x++) {
- dest_row[x] = *(rgb888*)((uchar*)src_col_rev + x * src_stride);
+ break;
+
+ case IMAGE_UTIL_ROTATION_270:{
+ const rgb888 *const src_col_rev_0 =
+ (rgb888 *) (src + (src_w - 1) * sizeof(rgb888));
+ for (y = 0; y < dest_h; y++) {
+ rgb888 *const dest_row =
+ (rgb888 *) (dest + y * dest_stride);
+ const rgb888 *const src_col_rev = (src_col_rev_0 - y);
+ for (x = 0; x < dest_w; x++) {
+ dest_row[x] =
+ *(rgb888 *) ((uchar *) src_col_rev +
+ x * src_stride);
+ }
}
}
- }
- break;
+ break;
default:
return IMAGE_UTIL_ERROR_INVALID_PARAMETER;
}
}
-int vp_util_image_resize(unsigned char *dest, const int *dest_width , const int *dest_height, const unsigned char *src,
- const int src_w, const int src_h, const image_util_colorspace_e colorspace)
+int vp_util_image_resize(unsigned char *dest, const int *dest_width,
+ const int *dest_height, const unsigned char *src,
+ const int src_w, const int src_h,
+ const image_util_colorspace_e colorspace)
{
if (!dest || !dest_width || !dest_height || !src) {
return IMAGE_UTIL_ERROR_INVALID_PARAMETER;
int dest_w = *dest_width;
int dest_h = *dest_height;
- if ((IMAGE_UTIL_COLORSPACE_RGB888 != colorspace && IMAGE_UTIL_COLORSPACE_RGBA8888 != colorspace)
- || src_w <= 0 || src_h <= 0 || dest_w <= 0 || dest_h <= 0) {
+ if ((IMAGE_UTIL_COLORSPACE_RGB888 != colorspace
+ && IMAGE_UTIL_COLORSPACE_RGBA8888 != colorspace)
+ || src_w <= 0 || src_h <= 0 || dest_w <= 0 || dest_h <= 0) {
return IMAGE_UTIL_ERROR_INVALID_PARAMETER;
}
- const unsigned int bpp = (IMAGE_UTIL_COLORSPACE_RGBA8888 == colorspace ? RGBA_BPP : RGB_BPP);
+ const unsigned int bpp =
+ (IMAGE_UTIL_COLORSPACE_RGBA8888 ==
+ colorspace ? RGBA_BPP : RGB_BPP);
const unsigned int src_stride = bpp * src_w;
const unsigned int dest_stride = bpp * dest_w;
float coef = 0.0f;
u_int32_t red, green, blue, alpha;
red = green = blue = alpha = 0;
int x = 0, y = 0;
- const float coef_x = (float)(src_w) / (float)(dest_w);
- const float coef_y = (float)(src_h) / (float)(dest_h);
+ const float coef_x = (float) (src_w) / (float) (dest_w);
+ const float coef_y = (float) (src_h) / (float) (dest_h);
const float add_x = 0.5f * coef_x - 0.5f;
const float add_y = 0.5f * coef_y - 0.5f;
transform *transform_x = NULL, *transform_y = NULL;
for (x = 0; x < dest_w; ++x) {
coef = x * coef_x + add_x;
- transform_x[x].index = (int)coef;
+ transform_x[x].index = (int) coef;
transform_x[x].coef = 1 - coef + transform_x[x].index;
}
if (transform_x[0].index < 0) {
for (y = 0; y < dest_h; ++y) {
coef = y * coef_y + add_y;
- transform_y[y].index = (int)coef;
+ transform_y[y].index = (int) coef;
transform_y[y].coef = 1 - coef + transform_y[y].index;
}
if (transform_y[0].index < 0) {
if (colorspace == IMAGE_UTIL_COLORSPACE_RGBA8888) {
for (y = 0; y < dest_h; ++y) {
const transform t_y = transform_y[y];
- rgba8888 * const dest_row = (rgba8888*)(dest + y * dest_stride);
- const rgba8888 * const src_row_1 = (rgba8888*)(src + t_y.index * src_stride);
- const rgba8888 * const src_row_2 = (rgba8888*)(src + (t_y.index + 1) * src_stride);
+ rgba8888 *const dest_row =
+ (rgba8888 *) (dest + y * dest_stride);
+ const rgba8888 *const src_row_1 =
+ (rgba8888 *) (src + t_y.index * src_stride);
+ const rgba8888 *const src_row_2 =
+ (rgba8888 *) (src + (t_y.index + 1) * src_stride);
for (x = 0; x < dest_w; ++x) {
const transform t_x = transform_x[x];
c3 = t_x.coef * (1 - t_y.coef);
c4 = (1 - t_x.coef) * (1 - t_y.coef);
red = pixel1.r * c1 + pixel2.r * c2 + pixel3.r * c3
- + pixel4.r * c4;
+ + pixel4.r * c4;
green = pixel1.g * c1 + pixel2.g * c2 + pixel3.g * c3
- + pixel4.g * c4;
+ + pixel4.g * c4;
blue = pixel1.b * c1 + pixel2.b * c2 + pixel3.b * c3
- + pixel4.b * c4;
+ + pixel4.b * c4;
alpha = pixel1.a * c1 + pixel2.a * c2 + pixel3.a * c3
- + pixel4.a * c4;
+ + pixel4.a * c4;
dest_row[x].r = red;
dest_row[x].g = green;
dest_row[x].b = blue;
} else {
for (y = 0; y < dest_h; ++y) {
const transform t_y = transform_y[y];
- rgb888 * const dest_row = (rgb888*)(dest + y * dest_stride);
- const rgb888 * const src_row_1 = (rgb888*)(src + t_y.index * src_stride);
- const rgb888 * const src_row_2 = (rgb888*)(src + (t_y.index + 1) * src_stride);
+ rgb888 *const dest_row = (rgb888 *) (dest + y * dest_stride);
+ const rgb888 *const src_row_1 =
+ (rgb888 *) (src + t_y.index * src_stride);
+ const rgb888 *const src_row_2 =
+ (rgb888 *) (src + (t_y.index + 1) * src_stride);
for (x = 0; x < dest_w; ++x) {
const transform t_x = transform_x[x];
c3 = t_x.coef * (1 - t_y.coef);
c4 = (1 - t_x.coef) * (1 - t_y.coef);
red = pixel1.r * c1 + pixel2.r * c2 + pixel3.r * c3
- + pixel4.r * c4;
+ + pixel4.r * c4;
green = pixel1.g * c1 + pixel2.g * c2 + pixel3.g * c3
- + pixel4.g * c4;
+ + pixel4.g * c4;
blue = pixel1.b * c1 + pixel2.b * c2 + pixel3.b * c3
- + pixel4.b * c4;
+ + pixel4.b * c4;
dest_row[x].r = red;
dest_row[x].g = green;
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 ENABLE_DRM_FEATURE
#pragma once
VP_DRM_CONSTRAINT_TYPE_INVALID_DRM_VERSION,
VP_DRM_CONSTRAINT_TYPE_UNKNOWN_TYPE,
VP_DRM_CONSTRAINT_TYPE_GENERAL_ERROR
-}vp_drm_constraint_status_t;
+} vp_drm_constraint_status_t;
-typedef struct _vp_drm_constraint_info
-{
+typedef struct _vp_drm_constraint_info {
vp_drm_constraint_status_t status;
int constraints;
int remaining_interval_sec;
int remaining_timed_count;
int remaining_acc_sec;
-}vp_drm_constraint_info;
+} vp_drm_constraint_info;
typedef enum {
- VP_DRM_CONSTRAINT_UNLIMITED = 0x0,
- VP_DRM_CONSTRAINT_COUNT = 0x01,
- VP_DRM_CONSTRAINT_DATE_TIME = 0x02,
- VP_DRM_CONSTRAINT_INTERVAL = 0x04,
- VP_DRM_CONSTRAINT_TIMED_COUNT = 0x08,
- VP_DRM_CONSTRAINT_ACCUMLATED_TIME = 0x10,
-}vp_drm_constraint_type_t;
+ VP_DRM_CONSTRAINT_UNLIMITED = 0x0,
+ VP_DRM_CONSTRAINT_COUNT = 0x01,
+ VP_DRM_CONSTRAINT_DATE_TIME = 0x02,
+ VP_DRM_CONSTRAINT_INTERVAL = 0x04,
+ VP_DRM_CONSTRAINT_TIMED_COUNT = 0x08,
+ VP_DRM_CONSTRAINT_ACCUMLATED_TIME = 0x10,
+} vp_drm_constraint_type_t;
-bool vp_drm_is_drm_file(const char *szMediaURL, bool *bIsDRM);
-bool vp_drm_is_divx_drm_file(const char *szMediaURL, bool *bIsDivXDRM);
-bool vp_drm_is_playready_drm_file(const char *szMediaURL, bool *bIsPlayReadyDRM);
-bool vp_drm_is_check_license(const char *szMediaURL, bool *bCheckLicense);
-bool vp_drm_is_check_forward_lock(const char *szMediaURL, bool *bIsFowardLock);
-bool vp_drm_get_constarint_info(const char *szMediaURL, vp_drm_constraint_info *pConstraintInfo);
+bool vp_drm_is_drm_file(const char *szMediaURL, bool * bIsDRM);
+bool vp_drm_is_divx_drm_file(const char *szMediaURL, bool * bIsDivXDRM);
+bool vp_drm_is_playready_drm_file(const char *szMediaURL,
+ bool * bIsPlayReadyDRM);
+bool vp_drm_is_check_license(const char *szMediaURL, bool * bCheckLicense);
+bool vp_drm_is_check_forward_lock(const char *szMediaURL,
+ bool * bIsFowardLock);
+bool vp_drm_get_constarint_info(const char *szMediaURL,
+ vp_drm_constraint_info * pConstraintInfo);
bool vp_drm_get_file_mime_type(const char *szMediaURL, char **szMime);
-bool vp_drm_get_store_item_license( char *pPath, char *pStoreAppId, char *pUserId, char *pImei, char *pOrderId, char *pMvId, char *pServerId );
+bool vp_drm_get_store_item_license(char *pPath, char *pStoreAppId,
+ char *pUserId, char *pImei,
+ char *pOrderId, char *pMvId,
+ char *pServerId);
-#endif //ENABLE_DRM_FEATURE
+#endif //ENABLE_DRM_FEATURE
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include "vp-debug.h"
#include "vp-macro.h"
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 ENABLE_DRM_FEATURE
}
/* external functions */
-bool vp_drm_is_drm_file(const char *szMediaURL, bool *bIsDRM)
+bool vp_drm_is_drm_file(const char *szMediaURL, bool * bIsDRM)
{
if (!szMediaURL) {
vp_dbgE("szMediaURL is NULL");
return TRUE;
}
-bool vp_drm_is_divx_drm_file(const char *szMediaURL, bool *bIsDivXDRM)
+bool vp_drm_is_divx_drm_file(const char *szMediaURL, bool * bIsDivXDRM)
{
if (!szMediaURL) {
vp_dbgE("szMediaURL is NULL");
}
bool vp_drm_is_playready_drm_file(const char *szMediaURL,
- bool *bIsPlayReadyDRM)
+ bool * bIsPlayReadyDRM)
{
if (!szMediaURL) {
vp_dbgE("szMediaURL is NULL");
}
if (drm_type == DRM_TYPE_PLAYREADY
- || drm_type == DRM_TYPE_PLAYREADY_ENVELOPE) {
+ || drm_type == DRM_TYPE_PLAYREADY_ENVELOPE) {
*bIsPlayReadyDRM = TRUE;
vp_dbgW("%s file is PlayReady", szMediaURL);
} else {
}
-bool vp_drm_is_check_license(const char *szMediaURL, bool *bCheckLicense)
+bool vp_drm_is_check_license(const char *szMediaURL, bool * bCheckLicense)
{
if (!szMediaURL) {
vp_dbgE("szMediaURL is NULL");
*bCheckLicense = TRUE;
drm_license_status_e nLicenseStatus = DRM_LICENSE_STATUS_UNDEFINED;
- int nRet =
- drm_get_license_status(szMediaURL, DRM_PERMISSION_TYPE_PLAY,
- &nLicenseStatus);
+ int nRet = drm_get_license_status(szMediaURL, DRM_PERMISSION_TYPE_PLAY,
+ &nLicenseStatus);
if (nRet != DRM_RETURN_SUCCESS) {
vp_dbgE("drm_get_license_status is fail");
_vp_drm_print_error_code(nRet);
}
bool vp_drm_is_check_forward_lock(const char *szMediaURL,
- bool *bIsFowardLock)
+ bool * bIsFowardLock)
{
if (!szMediaURL) {
vp_dbgE("szMediaURL is NULL");
if (st_DrmFileInfo.oma_info.method == DRM_METHOD_TYPE_FORWARD_LOCK) {
vp_dbgW
- ("st_DrmFileInfo.oma_info.method == DRM_METHOD_TYPE_FORWARD_LOCK");
+ ("st_DrmFileInfo.oma_info.method == DRM_METHOD_TYPE_FORWARD_LOCK");
*bIsFowardLock = TRUE;
}
}
bool vp_drm_get_constarint_info(const char *szMediaURL,
- vp_drm_constraint_info *pConstraintInfo)
+ vp_drm_constraint_info * pConstraintInfo)
{
if (!szMediaURL) {
vp_dbgE("szMediaURL is NULL");
memset(&sDrmConstraintInfo, 0, sizeof(drm_constraint_info_s));
int nRet =
- drm_get_constraint_info(szMediaURL, DRM_PERMISSION_TYPE_PLAY,
- &sDrmConstraintInfo);
+ drm_get_constraint_info(szMediaURL, DRM_PERMISSION_TYPE_PLAY,
+ &sDrmConstraintInfo);
if (nRet != DRM_RETURN_SUCCESS) {
vp_dbgE("drm_get_constraint_info is fail");
_vp_drm_print_error_code(nRet);
case DRM_CONSTRAINT_TYPE_INVALID_DRM_VERSION:
vp_dbgW("DRM_CONSTRAINT_TYPE_INVALID_DRM_VERSION");
pConstraintInfo->status =
- VP_DRM_CONSTRAINT_TYPE_INVALID_DRM_VERSION;
+ VP_DRM_CONSTRAINT_TYPE_INVALID_DRM_VERSION;
break;
case DRM_CONSTRAINT_TYPE_UNKNOWN_TYPE:
vp_dbgW("DRM_CONSTRAINT_TYPE_UNKNOWN_TYPE");
vp_dbgW("DRM_COUNT [%d]", sDrmConstraintInfo.remaining_count);
pConstraintInfo->constraints |= VP_DRM_CONSTRAINT_COUNT;
pConstraintInfo->original_count =
- sDrmConstraintInfo.original_count;
+ sDrmConstraintInfo.original_count;
pConstraintInfo->remaining_count =
- sDrmConstraintInfo.remaining_count;
+ sDrmConstraintInfo.remaining_count;
}
if (sDrmConstraintInfo.const_type.is_datetime) {
vp_dbgW("DRM_DATETIME");
pConstraintInfo->constraints |= VP_DRM_CONSTRAINT_DATE_TIME;
vp_dbgW("%d.%d.%d %d:%d~%d.%d.%d %d:%d",
- sDrmConstraintInfo.start_time.tm_mday,
- sDrmConstraintInfo.start_time.tm_mon,
- sDrmConstraintInfo.start_time.tm_year,
- sDrmConstraintInfo.start_time.tm_hour,
- sDrmConstraintInfo.start_time.tm_min,
- sDrmConstraintInfo.end_time.tm_mday,
- sDrmConstraintInfo.end_time.tm_mon,
- sDrmConstraintInfo.end_time.tm_year,
- sDrmConstraintInfo.end_time.tm_hour,
- sDrmConstraintInfo.end_time.tm_min);
+ sDrmConstraintInfo.start_time.tm_mday,
+ sDrmConstraintInfo.start_time.tm_mon,
+ sDrmConstraintInfo.start_time.tm_year,
+ sDrmConstraintInfo.start_time.tm_hour,
+ sDrmConstraintInfo.start_time.tm_min,
+ sDrmConstraintInfo.end_time.tm_mday,
+ sDrmConstraintInfo.end_time.tm_mon,
+ sDrmConstraintInfo.end_time.tm_year,
+ sDrmConstraintInfo.end_time.tm_hour,
+ sDrmConstraintInfo.end_time.tm_min);
struct timeval tv;
gettimeofday(&tv, NULL);
vp_dbgW("%d.%d.%d %d:%d",
- ptm->tm_mday, ptm->tm_mon, ptm->tm_year,
- ptm->tm_hour, ptm->tm_min);
+ ptm->tm_mday, ptm->tm_mon, ptm->tm_year,
+ ptm->tm_hour, ptm->tm_min);
if (local_t >= start_t && local_t <= end_t) {
pConstraintInfo->date_time_expired = FALSE;
vp_dbgW("DRM_INTERVAL");
pConstraintInfo->constraints |= VP_DRM_CONSTRAINT_INTERVAL;
vp_dbgW("Remain... %d.%d.%d %d:%d",
- sDrmConstraintInfo.interval_time.tm_mon,
- sDrmConstraintInfo.interval_time.tm_mday,
- sDrmConstraintInfo.interval_time.tm_year,
- sDrmConstraintInfo.interval_time.tm_hour,
- sDrmConstraintInfo.interval_time.tm_min);
+ sDrmConstraintInfo.interval_time.tm_mon,
+ sDrmConstraintInfo.interval_time.tm_mday,
+ sDrmConstraintInfo.interval_time.tm_year,
+ sDrmConstraintInfo.interval_time.tm_hour,
+ sDrmConstraintInfo.interval_time.tm_min);
pConstraintInfo->remaining_interval_sec =
- sDrmConstraintInfo.interval_time.tm_sec +
- sDrmConstraintInfo.interval_time.tm_min * 60 +
- sDrmConstraintInfo.interval_time.tm_hour * 3600;
+ sDrmConstraintInfo.interval_time.tm_sec +
+ sDrmConstraintInfo.interval_time.tm_min * 60 +
+ sDrmConstraintInfo.interval_time.tm_hour * 3600;
pConstraintInfo->remaining_interval_sec +=
- (sDrmConstraintInfo.interval_time.tm_mday +
- sDrmConstraintInfo.interval_time.tm_mon * 30 +
- sDrmConstraintInfo.interval_time.tm_year * 365) * (3600 *
- 24);
+ (sDrmConstraintInfo.interval_time.tm_mday +
+ sDrmConstraintInfo.interval_time.tm_mon * 30 +
+ sDrmConstraintInfo.interval_time.tm_year * 365) * (3600 * 24);
}
if (sDrmConstraintInfo.const_type.is_timedcount) {
vp_dbgW("DRM_TIMED_COUNT");
vp_dbgW("%d left (%d sec)",
- sDrmConstraintInfo.timed_remaining_count,
- sDrmConstraintInfo.timed_count_timer);
+ sDrmConstraintInfo.timed_remaining_count,
+ sDrmConstraintInfo.timed_count_timer);
pConstraintInfo->constraints |= VP_DRM_CONSTRAINT_TIMED_COUNT;
pConstraintInfo->remaining_timed_count =
- sDrmConstraintInfo.timed_remaining_count;
+ sDrmConstraintInfo.timed_remaining_count;
}
if (sDrmConstraintInfo.const_type.is_accumulated) {
vp_dbgW("DRM_ACCUMULATED [%d]",
- sDrmConstraintInfo.accumulated_remaining_seconds);
+ sDrmConstraintInfo.accumulated_remaining_seconds);
pConstraintInfo->constraints |= VP_DRM_CONSTRAINT_ACCUMLATED_TIME;
pConstraintInfo->remaining_acc_sec =
- sDrmConstraintInfo.accumulated_remaining_seconds;
+ sDrmConstraintInfo.accumulated_remaining_seconds;
}
if (sDrmConstraintInfo.const_type.is_individual) {
vp_sdbg("DRM_INDIVISUAL_ID [%s]",
- sDrmConstraintInfo.individual_id);
+ sDrmConstraintInfo.individual_id);
}
if (sDrmConstraintInfo.const_type.is_system) {
vp_sdbg("DRM_SYSTEM [ID:%s, type:%d]",
- sDrmConstraintInfo.system_id,
- sDrmConstraintInfo.system_identity_type);
+ sDrmConstraintInfo.system_id,
+ sDrmConstraintInfo.system_identity_type);
}
return TRUE;
}
if (drm_type == DRM_TYPE_PLAYREADY
- || drm_type == DRM_TYPE_PLAYREADY_ENVELOPE) {
+ || drm_type == DRM_TYPE_PLAYREADY_ENVELOPE) {
vp_sdbg("contentType: video/vnd.ms-playready.media.pyv");
return FALSE;
} else if (drm_type == DRM_TYPE_OMA_V1 || drm_type == DRM_TYPE_OMA_V2) {
bool
vp_drm_get_store_item_license(char *pPath, char *pStoreAppId,
- char *pUserId, char *pImei, char *pOrderId,
- char *pMvId, char *pServerId)
+ char *pUserId, char *pImei, char *pOrderId,
+ char *pMvId, char *pServerId)
{
int nRet = -1;
}
vp_sdbg
- ("pPath: [%s], pStoreAppId: [%s], pUserId: [%s], pImei: [%s], pOrderId: [%s], pMvId: [%s], pServerId: [%s]",
- pPath, pStoreAppId, pUserId, pImei, pOrderId, pMvId, pServerId);
+ ("pPath: [%s], pStoreAppId: [%s], pUserId: [%s], pImei: [%s], pOrderId: [%s], pMvId: [%s], pServerId: [%s]",
+ pPath, pStoreAppId, pUserId, pImei, pOrderId, pMvId, pServerId);
initiator_info.init_type = DRM_INITIATOR_TYPE_LICENSE_ACQ;
initiator_info.initiator_url_len = strlen(pPath);
snprintf(initiator_info.initiator_url, DRM_MAX_LEN_INITIATOR_URL,
- "%s", pPath);
+ "%s", pPath);
snprintf(initiator_info.custom_data.app_id, DRM_MAX_LEN_APP_ID + 1,
- "%s", pStoreAppId);
+ "%s", pStoreAppId);
snprintf(initiator_info.custom_data.user_guid,
- DRM_MAX_LEN_USER_GUID + 1, "%s", pUserId);
+ DRM_MAX_LEN_USER_GUID + 1, "%s", pUserId);
snprintf(initiator_info.custom_data.device_id,
- DRM_MAX_LEN_DEVICE_ID + 1, "%s", pImei);
+ DRM_MAX_LEN_DEVICE_ID + 1, "%s", pImei);
snprintf(initiator_info.custom_data.order_id,
- DRM_MAX_LEN_ORDER_ID + 1, "%s", pOrderId);
+ DRM_MAX_LEN_ORDER_ID + 1, "%s", pOrderId);
snprintf(initiator_info.custom_data.mv_id, DRM_MAX_LEN_MV_ID + 1,
- "%s", pMvId);
+ "%s", pMvId);
snprintf(initiator_info.custom_data.svr_id, DRM_MAX_LEN_SVR_ID + 1,
- "%s", pServerId);
+ "%s", pServerId);
nRet =
- drm_process_request(DRM_REQUEST_TYPE_SUBMIT_INITIATOR_URL,
- (void *)(&initiator_info),
- (void *)(&ws_resp_data));
+ drm_process_request(DRM_REQUEST_TYPE_SUBMIT_INITIATOR_URL,
+ (void *) (&initiator_info),
+ (void *) (&ws_resp_data));
if (nRet == DRM_RETURN_SUCCESS) {
vp_dbg("Server Error Code = %d", ws_resp_data.result_code);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
-typedef void *vp_thumb_gen_h;
+typedef void *vp_thumb_gen_h;
-typedef void(* vp_thumb_gen_progress_cb)(bool bSucess, int nIdx, char *szFileName, int nPosition, void *pUserData);
-typedef void(* vp_thumb_gen_complete_cb)(int nItemCount, void *pUserData);
-typedef void(* vp_thumb_gen_cancle_cb)(void *pUserData);
+typedef void (*vp_thumb_gen_progress_cb) (bool bSucess, int nIdx,
+ char *szFileName, int nPosition,
+ void *pUserData);
+typedef void (*vp_thumb_gen_complete_cb) (int nItemCount, void *pUserData);
+typedef void (*vp_thumb_gen_cancle_cb) (void *pUserData);
#ifdef _cplusplus
-extern "C"
-{
+extern "C" {
#endif
-vp_thumb_gen_h vp_thumb_gen_create(const char *szMediaURL);
-void vp_thumb_gen_destroy(vp_thumb_gen_h hThumbGen);
+ vp_thumb_gen_h vp_thumb_gen_create(const char *szMediaURL);
+ void vp_thumb_gen_destroy(vp_thumb_gen_h hThumbGen);
-bool vp_thumb_gen_realize(vp_thumb_gen_h hThumbGen);
-bool vp_thumb_gen_unrealize(vp_thumb_gen_h hThumbGen);
+ bool vp_thumb_gen_realize(vp_thumb_gen_h hThumbGen);
+ bool vp_thumb_gen_unrealize(vp_thumb_gen_h hThumbGen);
-bool vp_thumb_gen_is_realize(vp_thumb_gen_h hThumbGen, bool *bIsRealize);
+ bool vp_thumb_gen_is_realize(vp_thumb_gen_h hThumbGen,
+ bool * bIsRealize);
-bool vp_thumb_gen_set_dest_size(vp_thumb_gen_h hThumbGen, int nWidth, int nHeight);
-bool vp_thumb_gen_set_save_directory(vp_thumb_gen_h hThumbGen, char *szSaveDir);
-bool vp_thumb_gen_set_start_position(vp_thumb_gen_h hThumbGen, int nPosition);
-bool vp_thumb_gen_set_end_position(vp_thumb_gen_h hThumbGen, int nPosition);
-bool vp_thumb_gen_set_start_index(vp_thumb_gen_h hThumbGen, int nIdx);
-bool vp_thumb_gen_set_count(vp_thumb_gen_h hThumbGen, int nCount);
-bool vp_thumb_gen_set_acuurate(vp_thumb_gen_h hThumbGen, bool bAcuurate);
-bool vp_thumb_gen_set_scale(vp_thumb_gen_h hThumbGen, bool bSacle);
+ bool vp_thumb_gen_set_dest_size(vp_thumb_gen_h hThumbGen, int nWidth,
+ int nHeight);
+ bool vp_thumb_gen_set_save_directory(vp_thumb_gen_h hThumbGen,
+ char *szSaveDir);
+ bool vp_thumb_gen_set_start_position(vp_thumb_gen_h hThumbGen,
+ int nPosition);
+ bool vp_thumb_gen_set_end_position(vp_thumb_gen_h hThumbGen,
+ int nPosition);
+ bool vp_thumb_gen_set_start_index(vp_thumb_gen_h hThumbGen, int nIdx);
+ bool vp_thumb_gen_set_count(vp_thumb_gen_h hThumbGen, int nCount);
+ bool vp_thumb_gen_set_acuurate(vp_thumb_gen_h hThumbGen,
+ bool bAcuurate);
+ bool vp_thumb_gen_set_scale(vp_thumb_gen_h hThumbGen, bool bSacle);
-bool vp_thumb_gen_start(vp_thumb_gen_h hThumbGen);
-bool vp_thumb_gen_cancle(vp_thumb_gen_h hThumbGen);
+ bool vp_thumb_gen_start(vp_thumb_gen_h hThumbGen);
+ bool vp_thumb_gen_cancle(vp_thumb_gen_h hThumbGen);
-bool vp_thumb_gen_set_user_data(vp_thumb_gen_h hThumbGen, void *pUserData);
-bool vp_thumb_gen_set_progress_cb(vp_thumb_gen_h hThumbGen, vp_thumb_gen_progress_cb progress_cb);
-bool vp_thumb_gen_set_complete_cb(vp_thumb_gen_h hThumbGen, vp_thumb_gen_complete_cb complete_cb);
-bool vp_thumb_gen_set_cancle_cb(vp_thumb_gen_h hThumbGen, vp_thumb_gen_cancle_cb cancle_cb);
+ bool vp_thumb_gen_set_user_data(vp_thumb_gen_h hThumbGen,
+ void *pUserData);
+ bool vp_thumb_gen_set_progress_cb(vp_thumb_gen_h hThumbGen,
+ vp_thumb_gen_progress_cb
+ progress_cb);
+ bool vp_thumb_gen_set_complete_cb(vp_thumb_gen_h hThumbGen,
+ vp_thumb_gen_complete_cb
+ complete_cb);
+ bool vp_thumb_gen_set_cancle_cb(vp_thumb_gen_h hThumbGen,
+ vp_thumb_gen_cancle_cb cancle_cb);
#ifdef _cplusplus
}
#endif
-
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <Ecore.h>
#include "vp-debug.h"
#include "vp-macro.h"
-
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-feature-common.h"
#include "vp-feature-util.h"
bool vp_feature_util_calc_aspect_size(int nSrcW, int nSrcH, int nDestW,
- int nDestH, int nMinW, int nMinH,
- int *nResultW, int *nResultH)
+ int nDestH, int nMinW, int nMinH,
+ int *nResultW, int *nResultH)
{
if (nSrcH == 0 || nSrcW == 0 || nDestW == 0 || nDestW == 0) {
vp_dbgE("invalid param : (src %d x %d) , (dest %d x %d)", nSrcW,
- nSrcH, nDestW, nDestH);
+ nSrcH, nDestW, nDestH);
return FALSE;
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
-bool vp_feature_util_calc_aspect_size(int nSrcW, int nSrcH, int nDestW, int nDestH, int nMinW, int nMinH, int *nResultW, int *nResultH);
-
+bool vp_feature_util_calc_aspect_size(int nSrcW, int nSrcH, int nDestW,
+ int nDestH, int nMinW, int nMinH,
+ int *nResultW, int *nResultH);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <pthread.h>
#include <metadata_extractor.h>
} ThumbGen;
-static void _vp_thumb_gen_destroy_handle(ThumbGen *pThumbGen);
+static void _vp_thumb_gen_destroy_handle(ThumbGen * pThumbGen);
/* callback functions */
int nSaveWidth = pThumbGen->nDestWidth;
int nSaveHeight = pThumbGen->nDestHeight;
int nFileNameSize =
- strlen(pThumbGen->szSaveDir) +
- THUMB_GEN_FILE_NAME_PREFIX_LEN;
+ strlen(pThumbGen->szSaveDir) +
+ THUMB_GEN_FILE_NAME_PREFIX_LEN;
bool bResize = pThumbGen->bResize;
szURL = calloc(1, sizeof(char) * nFileNameSize);
if (szURL != NULL) {
snprintf(szURL, nFileNameSize,
- THUMB_GEN_FILE_NAME_PREFIX,
- pThumbGen->szSaveDir,
- pThumbGen->nGenIdx + pThumbGen->nStartIdx);
+ THUMB_GEN_FILE_NAME_PREFIX,
+ pThumbGen->szSaveDir,
+ pThumbGen->nGenIdx + pThumbGen->nStartIdx);
}
nPosition =
- pThumbGen->nStartPosition +
- (pThumbGen->nGenIdx * pThumbGen->nInterval);
+ pThumbGen->nStartPosition +
+ (pThumbGen->nGenIdx * pThumbGen->nInterval);
nRet =
- metadata_extractor_get_frame_at_time(pThumbGen->meta_h,
- nPosition,
- pThumbGen->bAcuurate,
- &pFrame,
- &nFrameSize);
+ metadata_extractor_get_frame_at_time(pThumbGen->meta_h,
+ nPosition,
+ pThumbGen->bAcuurate,
+ &pFrame, &nFrameSize);
if (nRet != METADATA_EXTRACTOR_ERROR_NONE) {
vp_dbgE
- ("metadata_extractor_get_frame_at_time is fail : [0x%x]",
- nRet);
+ ("metadata_extractor_get_frame_at_time is fail : [0x%x]",
+ nRet);
bSuccess = FALSE;
}
_vp_thumb_gen_unlock();
unsigned int nResizBufSize = 0;
nRet = image_util_calculate_buffer_size(nSaveWidth,
- nSaveHeight,
- IMAGE_UTIL_COLORSPACE_RGB888,
- &nResizBufSize);
+ nSaveHeight,
+ IMAGE_UTIL_COLORSPACE_RGB888,
+ &nResizBufSize);
if (nRet != IMAGE_UTIL_ERROR_NONE) {
vp_dbgE
- ("image_util_calculate_buffer_size is fail : [0x%x]",
- nRet);
+ ("image_util_calculate_buffer_size is fail : [0x%x]",
+ nRet);
bSuccess = FALSE;
}
vp_dbgW("ResizeBuf Size : %d", nResizBufSize);
pSaveBuf =
- calloc(1, sizeof(unsigned char) * nResizBufSize);
+ calloc(1, sizeof(unsigned char) * nResizBufSize);
if (pSaveBuf == NULL) {
vp_dbgE("pSaveBuf alloc fail");
bSuccess = FALSE;
} else {
nRet = vp_util_image_resize(pSaveBuf,
- &nSaveWidth,
- &nSaveHeight,
- (unsigned char *)
- pFrame, nSrcWidth,
- nSrcHeight,
- IMAGE_UTIL_COLORSPACE_RGB888);
+ &nSaveWidth,
+ &nSaveHeight,
+ (unsigned char *)
+ pFrame, nSrcWidth,
+ nSrcHeight,
+ IMAGE_UTIL_COLORSPACE_RGB888);
if (nRet != IMAGE_UTIL_ERROR_NONE) {
vp_dbgE
- ("vp_util_image_resize is fail : [0x%x]",
- nRet);
+ ("vp_util_image_resize is fail : [0x%x]",
+ nRet);
bSuccess = FALSE;
}
}
int nSrcW = nSaveWidth;
int nSrcH = nSaveHeight;
nRet = image_util_calculate_buffer_size(nSaveWidth,
- nSaveHeight,
- IMAGE_UTIL_COLORSPACE_RGB888,
- &nResizBufSize);
+ nSaveHeight,
+ IMAGE_UTIL_COLORSPACE_RGB888,
+ &nResizBufSize);
if (nRet != IMAGE_UTIL_ERROR_NONE) {
vp_dbgE
- ("image_util_calculate_buffer_size is fail : [0x%x]",
- nRet);
+ ("image_util_calculate_buffer_size is fail : [0x%x]",
+ nRet);
bSuccess = FALSE;
}
pRotBuf =
- calloc(1, sizeof(unsigned char) * nResizBufSize);
+ calloc(1, sizeof(unsigned char) * nResizBufSize);
if (pRotBuf == NULL) {
vp_dbgE("pRotBuf alloc fail");
bSuccess = FALSE;
} else {
vp_dbgW("ResizeBuf Size : %d", nResizBufSize);
nRet = vp_util_image_rotate(pRotBuf,
- &nSaveWidth,
- &nSaveHeight,
- nRot, pSaveBuf,
- nSrcW, nSrcH,
- IMAGE_UTIL_COLORSPACE_RGB888);
+ &nSaveWidth,
+ &nSaveHeight,
+ nRot, pSaveBuf,
+ nSrcW, nSrcH,
+ IMAGE_UTIL_COLORSPACE_RGB888);
if (nRet != IMAGE_UTIL_ERROR_NONE) {
vp_dbgE
- ("vp_util_image_rotate is fail : [0x%x]",
- nRet);
+ ("vp_util_image_rotate is fail : [0x%x]",
+ nRet);
bSuccess = FALSE;
}
}
if (bSuccess) {
vp_sdbg("w:%d, h:%d, URL : %s", nSaveWidth, nSaveHeight,
- szURL);
+ szURL);
if (pRotBuf) {
nRet = image_util_encode_jpeg(pRotBuf,
- nSaveWidth,
- nSaveHeight,
- IMAGE_UTIL_COLORSPACE_RGB888,
- 100, szURL);
+ nSaveWidth,
+ nSaveHeight,
+ IMAGE_UTIL_COLORSPACE_RGB888,
+ 100, szURL);
if (nRet != IMAGE_UTIL_ERROR_NONE) {
vp_dbgE("image_util_encode_jpeg is fail : [0x%x]",
- nRet);
+ nRet);
bSuccess = FALSE;
}
} else {
nRet = image_util_encode_jpeg(pSaveBuf,
- nSaveWidth,
- nSaveHeight,
- IMAGE_UTIL_COLORSPACE_RGB888,
- 100, szURL);
+ nSaveWidth,
+ nSaveHeight,
+ IMAGE_UTIL_COLORSPACE_RGB888,
+ 100, szURL);
if (nRet != IMAGE_UTIL_ERROR_NONE) {
vp_dbgE("image_util_encode_jpeg is fail : [0x%x]",
- nRet);
+ nRet);
bSuccess = FALSE;
}
}
if (pThumbGen->progress_cb) {
vp_dbgW(" ==> %p, %p", pThumbGen, pThumbGen->progress_cb);
pThumbGen->progress_cb(bSuccess, pThumbGen->nGenIdx,
- szURL, nPosition,
- pThumbGen->pUserData);
+ szURL, nPosition,
+ pThumbGen->pUserData);
}
pThumbGen->nGenIdx++;
}
-static void _vp_thumb_gen_destroy_handle(ThumbGen *pThumbGen)
+static void _vp_thumb_gen_destroy_handle(ThumbGen * pThumbGen)
{
if (pThumbGen == NULL) {
vp_dbgE("hThumbGen is NULL");
char *szVal = NULL;
nRet =
- metadata_extractor_get_metadata(pThumbGen->meta_h,
- METADATA_DURATION, &szVal);
+ metadata_extractor_get_metadata(pThumbGen->meta_h,
+ METADATA_DURATION, &szVal);
if (nRet != METADATA_EXTRACTOR_ERROR_NONE) {
_vp_thumb_gen_destroy_handle(pThumbGen);
vp_dbgE("metadata_extractor_get_metadata is fail : [0x%x]", nRet);
VP_FREE(szVal);
nRet =
- metadata_extractor_get_metadata(pThumbGen->meta_h,
- METADATA_ROTATE, &szVal);
+ metadata_extractor_get_metadata(pThumbGen->meta_h,
+ METADATA_ROTATE, &szVal);
if (nRet != METADATA_EXTRACTOR_ERROR_NONE) {
_vp_thumb_gen_destroy_handle(pThumbGen);
vp_dbgE("metadata_extractor_get_metadata is fail : [0x%x]", nRet);
}
nRet =
- metadata_extractor_get_metadata(pThumbGen->meta_h,
- METADATA_VIDEO_WIDTH, &szVal);
+ metadata_extractor_get_metadata(pThumbGen->meta_h,
+ METADATA_VIDEO_WIDTH, &szVal);
if (nRet != METADATA_EXTRACTOR_ERROR_NONE) {
_vp_thumb_gen_destroy_handle(pThumbGen);
vp_dbgE("metadata_extractor_get_metadata is fail : [0x%x]", nRet);
}
nRet =
- metadata_extractor_get_metadata(pThumbGen->meta_h,
- METADATA_VIDEO_HEIGHT, &szVal);
+ metadata_extractor_get_metadata(pThumbGen->meta_h,
+ METADATA_VIDEO_HEIGHT, &szVal);
if (nRet != METADATA_EXTRACTOR_ERROR_NONE) {
_vp_thumb_gen_destroy_handle(pThumbGen);
vp_dbgE("metadata_extractor_get_metadata is fail : [0x%x]", nRet);
int nResultW = 0;
int nResultH = 0;
if (!vp_feature_util_calc_aspect_size(pThumbGen->nSrcWidth,
- pThumbGen->nSrcHeight,
- pThumbGen->nDestWidth,
- pThumbGen->nDestHeight,
- 0, 0,
- &nResultW, &nResultH)) {
+ pThumbGen->nSrcHeight,
+ pThumbGen->nDestWidth,
+ pThumbGen->nDestHeight,
+ 0, 0,
+ &nResultW, &nResultH)) {
vp_dbgE("vp_feature_util_calc_aspect_size is fail");
} else {
}
}
-#if 1
+
if (pthread_create
- (&g_thread_id, NULL, _vp_thumb_gen_thread_loop,
- (void *) pThumbGen) != 0) {
+ (&g_thread_id, NULL, _vp_thumb_gen_thread_loop,
+ (void *) pThumbGen) != 0) {
vp_dbgE("pthread_create fail");
pThumbGen->bIsRealize = FALSE;
return FALSE;
}
-#else
- int status = 0;
- pthread_attr_t thread_attr;
-
- status = pthread_attr_init(&thread_attr);
- if (0 == status) {
- status = pthread_attr_setdetachstate(&thread_attr,
- PTHREAD_CREATE_DETACHED);
- if (0 == status) {
- if (pthread_create
- (&g_thread_id, &thread_attr, _vp_thumb_gen_thread_loop,
- (void *) pThumbGen) != 0) {
- vp_dbgE("pthread_create fail");
- pThumbGen->bIsRealize = FALSE;
- return FALSE;
- }
- } else {
- vp_dbgE("pthread_attr_setdetachstate fail");
- pThumbGen->bIsRealize = FALSE;
- return FALSE;
- }
- } else {
- vp_dbgE("pthread_attr_init fail");
- pThumbGen->bIsRealize = FALSE;
- return FALSE;
- }
-
- if (pthread_attr_destroy(&thread_attr) != 0) {
- vp_dbgE("Cannot destroy the attribute object");
- pThumbGen->bIsRealize = FALSE;
- return FALSE;
- }
-#endif
return TRUE;
}
int status = 0;
pthread_join(g_thread_id, (void **) &status);
-
- //pthread_detach(g_thread_id);
}
return TRUE;
}
-bool vp_thumb_gen_is_realize(vp_thumb_gen_h hThumbGen, bool *bIsRealize)
+bool vp_thumb_gen_is_realize(vp_thumb_gen_h hThumbGen, bool * bIsRealize)
{
if (hThumbGen == NULL) {
vp_dbgE("hThumbGen is NULL");
}
bool vp_thumb_gen_set_dest_size(vp_thumb_gen_h hThumbGen, int nWidth,
- int nHeight)
+ int nHeight)
{
if (hThumbGen == NULL) {
vp_dbgE("hThumbGen is NULL");
pThumbGen->nDestWidth = nWidth;
pThumbGen->nDestHeight = nHeight;
- if (nWidth != pThumbGen->nSrcWidth
- || nHeight != pThumbGen->nSrcHeight) {
+ if (nWidth != pThumbGen->nSrcWidth || nHeight != pThumbGen->nSrcHeight) {
pThumbGen->bResize = TRUE;
}
}
bool vp_thumb_gen_set_save_directory(vp_thumb_gen_h hThumbGen,
- char *szSaveDir)
+ char *szSaveDir)
{
if (hThumbGen == NULL) {
vp_dbgE("hThumbGen is NULL");
}
bool vp_thumb_gen_set_start_position(vp_thumb_gen_h hThumbGen,
- int nPosition)
+ int nPosition)
{
if (hThumbGen == NULL) {
vp_dbgE("hThumbGen is NULL");
return TRUE;
}
-bool vp_thumb_gen_set_end_position(vp_thumb_gen_h hThumbGen,
- int nPosition)
+bool vp_thumb_gen_set_end_position(vp_thumb_gen_h hThumbGen, int nPosition)
{
if (hThumbGen == NULL) {
vp_dbgE("hThumbGen is NULL");
pThumbGen->nEndPosition = pThumbGen->nDuration;
}
pThumbGen->nInterval =
- (pThumbGen->nEndPosition - pThumbGen->nStartPosition) / nCount;
+ (pThumbGen->nEndPosition - pThumbGen->nStartPosition) / nCount;
_vp_thumb_gen_unlock();
}
bool vp_thumb_gen_set_progress_cb(vp_thumb_gen_h hThumbGen,
- vp_thumb_gen_progress_cb progress_cb)
+ vp_thumb_gen_progress_cb progress_cb)
{
if (hThumbGen == NULL) {
vp_dbgE("hThumbGen is NULL");
}
bool vp_thumb_gen_set_complete_cb(vp_thumb_gen_h hThumbGen,
- vp_thumb_gen_complete_cb complete_cb)
+ vp_thumb_gen_complete_cb complete_cb)
{
if (hThumbGen == NULL) {
vp_dbgE("hThumbGen is NULL");
}
bool vp_thumb_gen_set_cancle_cb(vp_thumb_gen_h hThumbGen,
- vp_thumb_gen_cancle_cb cancle_cb)
+ vp_thumb_gen_cancle_cb cancle_cb)
{
if (hThumbGen == NULL) {
vp_dbgE("hThumbGen is NULL");
-#ifdef ENABLE_DRM_FEATURE
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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_DRM_CTRL_H_
typedef enum {
- DRM_CONTENT_INFO_NULL = -1,
+ DRM_CONTENT_INFO_NULL = -1,
DRM_CONTENT_INFO_AUTHOR,
DRM_CONTENT_INFO_RIGHTS_URL,
DRM_CONTENT_INFO_DESCRIPTION,
} MpVideoDrmContentInfoType;
-typedef enum
-{
+typedef enum {
MP_VIDEO_DRM_ERROR_NONE = 0,
MP_VIDEO_DRM_ERROR_INTERNAL,
MP_VIDEO_DRM_ERROR_TIME_BASED,
MP_VIDEO_DRM_ERROR_TIME_INDIVIDULAL,
MP_VIDEO_DRM_ERROR_TIME_SYSTEM,
MP_VIDEO_DRM_ERROR_MAX,
-}MpVideoDrmErrorType;
+} MpVideoDrmErrorType;
-typedef struct
-{
+typedef struct {
int constraints;
int remaining_count;
int remaining_interval_sec;
int remaining_timed_count;
int remaining_acc_sec;
-}st_MpConstraintsInfo;
+} st_MpConstraintsInfo;
typedef enum {
- MP_DRM_CONSTRAINT_UNLIMITED = 0x0,
- MP_DRM_CONSTRAINT_COUNT = 0x01,
- MP_DRM_CONSTRAINT_DATE_TIME = 0x02,
- MP_DRM_CONSTRAINT_INTERVAL = 0x04,
- MP_DRM_CONSTRAINT_TIMED_COUNT = 0x08,
- MP_DRM_CONSTRAINT_ACCUMLATED_TIME = 0x10,
-}MpDrmConstraintInfoType;
-
-bool mp_drm_is_drm_file(char* szPath);
+ MP_DRM_CONSTRAINT_UNLIMITED = 0x0,
+ MP_DRM_CONSTRAINT_COUNT = 0x01,
+ MP_DRM_CONSTRAINT_DATE_TIME = 0x02,
+ MP_DRM_CONSTRAINT_INTERVAL = 0x04,
+ MP_DRM_CONSTRAINT_TIMED_COUNT = 0x08,
+ MP_DRM_CONSTRAINT_ACCUMLATED_TIME = 0x10,
+} MpDrmConstraintInfoType;
+
+bool mp_drm_is_drm_file(char *szPath);
bool mp_drm_check_foward_lock(char *szPath);
bool mp_drm_is_divx(char *szPath);
-bool mp_drm_check_divx_rental_expired(char *szPath,int *use_count, int *total_count);
-void mp_drm_get_file_extension(char *szPath, char *szContentType, int nContentTypeStrSize);
+bool mp_drm_check_divx_rental_expired(char *szPath, int *use_count,
+ int *total_count);
+void mp_drm_get_file_extension(char *szPath, char *szContentType,
+ int nContentTypeStrSize);
+
+#endif //_MP_DRM_CTRL_H_
-#endif //_MP_DRM_CTRL_H_
-#endif
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_ROTATE_CTRL_
#include <stdbool.h>
#include <Ecore_Evas.h>
-typedef enum
-{
+typedef enum {
VIDEOS_ROTATE_NONE = 0x00,
VIDEOS_ROTATE_90,
VIDEOS_ROTATE_180,
VIDEOS_ROTATE_270
-}VideosRotateStatus_t;
+} VideosRotateStatus_t;
void mp_rotate_ctrl_init(void);
void mp_rotate_ctrl_destroy(void);
-VideosRotateStatus_t mp_rotate_ctrl_get_current_state(void);
+VideosRotateStatus_t mp_rotate_ctrl_get_current_state(void);
void mp_rotate_ctrl_set_state(int nAngle);
bool mp_rotate_ctrl_check_landspace();
-bool mp_rotate_ctrl_check_landspace_by_win(Evas_Object *pWin);
+bool mp_rotate_ctrl_check_landspace_by_win(Evas_Object * pWin);
#endif
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 __VIDEO_MP_UTIL_CONFIG__
#define __VIDEO_MP_UTIL_CONFIG__
#include <app_preference.h>
bool mp_util_config_set_multi_play_status(bool bMultiPlay);
-bool mp_util_config_get_multi_play_status(bool *bMultiPlay);
+bool mp_util_config_get_multi_play_status(bool * bMultiPlay);
-bool mp_util_config_set_preview(char* szPreviewUrl);
-char* mp_util_config_get_preview(void);
-bool mp_util_config_preview_key_changed_cb(preference_changed_cb callback, void *pUserData);
+bool mp_util_config_set_preview(char *szPreviewUrl);
+char *mp_util_config_get_preview(void);
+bool mp_util_config_preview_key_changed_cb(preference_changed_cb callback,
+ void *pUserData);
bool mp_util_config_ignore_preview_key_changed_cb();
#endif
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define RECENTLY_PLAYED_VIDEO_ITEM_MAX 20
-typedef enum
-{
- MP_MEDIA_VIDEO_FILE_TYPE = 0,
+typedef enum {
+ MP_MEDIA_VIDEO_FILE_TYPE = 0,
MP_MEDIA_CAMERA_FILE_TYPE,
MP_MEDIA_ALL_FILE_TYPE,
MP_MEDIA_FILE_TYPE_MAX,
-}MpMediaSvcVideoFileType;
+} MpMediaSvcVideoFileType;
-typedef enum
-{
- MP_MEDIA_SORT_BY_NONE = 0,
+typedef enum {
+ MP_MEDIA_SORT_BY_NONE = 0,
MP_MEDIA_SORT_BY_RECENTLY_VIEWED,
MP_MEDIA_SORT_BY_RECENTLY_ADDED,
MP_MEDIA_SORT_BY_NAME,
MP_MEDIA_SORT_BY_SIZE,
MP_MEDIA_SORT_BY_TYPE,
MP_MEDIA_SORT_BY_MAX,
-}MpMediaSvcSortType;
+} MpMediaSvcSortType;
-typedef enum
-{
- MP_MEDIA_LIST_TYPE_FOLDER = 0,
+typedef enum {
+ MP_MEDIA_LIST_TYPE_FOLDER = 0,
MP_MEDIA_LIST_TYPE_ALL_FOLDER_GALLERY,
MP_MEDIA_LIST_TYPE_TAG_GALLERY,
MP_MEDIA_LIST_TYPE_FAVORITE,
MP_MEDIA_LIST_TYPE_MAX,
-}MpMediaSvcListType;
+} MpMediaSvcListType;
-typedef enum
-{
- MP_MEDIA_TYPE_STORAGE_UNKNOWN = 0,
+typedef enum {
+ MP_MEDIA_TYPE_STORAGE_UNKNOWN = 0,
MP_MEDIA_TYPE_STORAGE_INTERNAL,
MP_MEDIA_TYPE_STORAGE_EXTERNAL,
MP_MEDIA_TYPE_STORAGE_DROPBOX,
MP_MEDIA_TYPE_STORAGE_MAX,
-}MpMediaStorageType;
+} MpMediaStorageType;
-typedef void (*UpdateDatabaseCbFunc)(void *pUserData, float fTimer, int UpdateStyle);
+typedef void (*UpdateDatabaseCbFunc) (void *pUserData, float fTimer,
+ int UpdateStyle);
void mp_util_svc_init_session(void);
void mp_util_svc_finish_session(void);
// Manage video item list
// For gallery list
-bool mp_util_svc_extract_video_list_from_folder(char *szFolderPath, int nSortType, int nItemType); // For myfiles.
-bool mp_util_svc_extract_video_list_by_item_type(int nSortType, int nItemType); // For video list by item type. (All/Phone/Cloud)
-bool mp_util_svc_extract_video_list_from_favorite(int nSortType); // For favorite naming of gallery.
-bool mp_util_svc_extract_video_list_for_search_view(const char *keyword, int nItemType); // For only video type files of video search view
-bool mp_util_svc_index_list_for_search_view(const char *keyword, void **index_list); // For only video type files of video search view
-bool mp_util_svc_index_list_for_cloud_view(void **index_list, int *nListSize); // get cloud data from media list
+bool mp_util_svc_extract_video_list_from_folder(char *szFolderPath, int nSortType, int nItemType); // For myfiles.
+bool mp_util_svc_extract_video_list_by_item_type(int nSortType, int nItemType); // For video list by item type. (All/Phone/Cloud)
+bool mp_util_svc_extract_video_list_from_favorite(int nSortType); // For favorite naming of gallery.
+bool mp_util_svc_extract_video_list_for_search_view(const char *keyword, int nItemType); // For only video type files of video search view
+bool mp_util_svc_index_list_for_search_view(const char *keyword, void **index_list); // For only video type files of video search view
+bool mp_util_svc_index_list_for_cloud_view(void **index_list, int *nListSize); // get cloud data from media list
void mp_util_svc_destory_video_list(void);
bool mp_util_svc_destory_video_item_list(void);
bool mp_util_svc_remove_item_by_url_with_list(char *szFilePath);
bool mp_util_svc_remove_item_by_list_index(int nVideoItemIndex);
-bool mp_util_svc_get_video_id_by_video_url(const char *szPath, char **szVideoID);
-char* mp_util_svc_get_video_Thumbnail_by_video_url(const char *szMediaUri);
+bool mp_util_svc_get_video_id_by_video_url(const char *szPath,
+ char **szVideoID);
+char *mp_util_svc_get_video_Thumbnail_by_video_url(const char *szMediaUri);
int mp_util_svc_get_video_width_by_video_url(const char *szMediaUri);
int mp_util_svc_get_video_height_by_video_url(const char *szMediaUri);
-unsigned int mp_util_svc_get_video_last_play_time_by_video_url(const char *szPath);
-unsigned int mp_util_svc_get_video_duration_by_video_url(const char *szPath);
+unsigned int mp_util_svc_get_video_last_play_time_by_video_url(const char
+ *szPath);
+unsigned int mp_util_svc_get_video_duration_by_video_url(const char
+ *szPath);
int mp_util_svc_get_video_file_size_by_video_url(const char *szPath);
-void mp_util_svc_set_video_last_played_time_by_url(char* szMediaUri, unsigned int nPosition);
-bool mp_util_svc_get_video_current_url_pre_next_item(char* szCurrMediaUri, char* szPreMediaUri, char* szNextMediaUri,bool bLoop);
+void mp_util_svc_set_video_last_played_time_by_url(char *szMediaUri,
+ unsigned int nPosition);
+bool mp_util_svc_get_video_current_url_pre_next_item(char *szCurrMediaUri,
+ char *szPreMediaUri,
+ char *szNextMediaUri,
+ bool bLoop);
// For video list
-char* mp_util_svc_get_video_url(const int nVideoItemIndex);
-char* mp_util_svc_get_video_thumbnail(const int nVideoItemIndex);
-char* mp_util_svc_get_video_title(const int nVideoItemIndex);
+char *mp_util_svc_get_video_url(const int nVideoItemIndex);
+char *mp_util_svc_get_video_thumbnail(const int nVideoItemIndex);
+char *mp_util_svc_get_video_title(const int nVideoItemIndex);
int mp_util_svc_get_video_duration_time(const int nVideoItemIndex);
int mp_util_svc_get_video_last_played_pos(const int nVideoItemIndex);
-unsigned long long mp_util_svc_get_video_item_size(const int nVideoItemIndex);
+unsigned long long mp_util_svc_get_video_item_size(const int
+ nVideoItemIndex);
int mp_util_svc_get_video_item_width(const int nVideoItemIndex);
int mp_util_svc_get_video_item_height(const int nVideoItemIndex);
double mp_util_svc_get_video_item_latitude(const int nVideoItemIndex);
char *mp_util_svc_get_video_item_modified_time(const int nVideoItemIndex);
-//void MpUtilMediaSvcUpdateVideoItem(const int nVideoItemIndex);
int mp_util_svc_get_video_list_size_for_checking_index(void);
int mp_util_svc_get_number_of_video_item_by_type(void);
int mp_util_svc_get_total_video_type_files(void);
void mp_util_svc_print_list_info(void);
int mp_util_svc_find_video_item_index_by_url(const char *szPath);
char *mp_util_svc_get_video_id_by_index(const int nVideoItemIndex);
-MpMediaStorageType mp_util_svc_get_video_storage(const int nVideoItemIndex);
+MpMediaStorageType mp_util_svc_get_video_storage(const int
+ nVideoItemIndex);
bool mp_util_svc_is_cloud_storage(const int nVideoItemIndex);
int mp_util_svc_get_cloud_total_from_video_list(void);
bool mp_util_svc_remove_item_from_db_by_list_index(int nVideoItemIndex);
// For folder list
-bool mp_util_svc_extract_video_folder_list_by_type(int nSortType, int nItemType);
+bool mp_util_svc_extract_video_folder_list_by_type(int nSortType,
+ int nItemType);
bool mp_util_svc_destory_video_folder_list(void);
int mp_util_svc_get_video_folder_size(void);
-char* mp_util_svc_get_video_folder_name(int nVideoFolderIndex);
-char* mp_util_svc_get_video_folder_url(int nVideoFolderIndex);
-MpMediaStorageType mp_util_svc_get_folder_storage(const int nVideoFolderIndex);
-char* mp_util_svc_get_video_folder_id(int nVideoFolderIndex);
-char* mp_util_get_folder_thumbnail(int nVideoFolderIndex, int nSortType);
-
-void mp_util_svc_register_thumbnail_update_func(int nVideoItemIndex, void* pUserCallbackFunc, void* pUserData);
+char *mp_util_svc_get_video_folder_name(int nVideoFolderIndex);
+char *mp_util_svc_get_video_folder_url(int nVideoFolderIndex);
+MpMediaStorageType mp_util_svc_get_folder_storage(const int
+ nVideoFolderIndex);
+char *mp_util_svc_get_video_folder_id(int nVideoFolderIndex);
+char *mp_util_get_folder_thumbnail(int nVideoFolderIndex, int nSortType);
+
+void mp_util_svc_register_thumbnail_update_func(int nVideoItemIndex,
+ void *pUserCallbackFunc,
+ void *pUserData);
void mp_util_svc_cancel_thumbnail_update(int nVideoItemIndex);
void mp_util_svc_update_thumbnail_info(const int nVideoItemIndex);
bool mp_util_svc_remove_folder_list_item_from_list(int nVideoItemIndex);
// For livebox list
bool mp_util_svc_extract_last_played_item(void);
bool mp_util_svc_destory_last_played_item_list(void);
-char* mp_util_svc_get_last_played_video_item_thumbnail(const int nVideoItemIndex);
+char *mp_util_svc_get_last_played_video_item_thumbnail(const int
+ nVideoItemIndex);
////////////////////////////////////////////////////////
// Util
-bool mp_util_svc_insert_file_to_media_content_db(const char* szFilePath);
-bool mp_util_svc_set_update_db_cb_func(UpdateDatabaseCbFunc pUpdateDbCbFunc);
+bool mp_util_svc_insert_file_to_media_content_db(const char *szFilePath);
+bool mp_util_svc_set_update_db_cb_func(UpdateDatabaseCbFunc
+ pUpdateDbCbFunc);
void mp_util_svc_unset_update_db_cb_func(void);
-char* mp_util_svc_get_duration_str_time(int nVideoItemIndex);
+char *mp_util_svc_get_duration_str_time(int nVideoItemIndex);
bool mp_util_svc_filter_drm_video_item_list(void);
bool mp_util_svc_check_no_drm_video(void);
bool mp_util_svc_scan_file(const char *szFilePath);
/*need to free szTitle, output nWidth, nHeight, szTitle, nDuration, nPlayedTime*/
bool mp_util_svc_get_video_detail_by_video_url(const char *szPath,
- int *nWidth, int *nHeight, char **szTitle, unsigned int *nDuration, unsigned int *nPlayedTime);
+ int *nWidth, int *nHeight,
+ char **szTitle,
+ unsigned int *nDuration,
+ unsigned int *nPlayedTime);
//personal
-bool mp_util_svc_extract_personal_video_folder_list(int nSortType, bool bPersonal);
-bool mp_util_svc_extract_video_list_by_personal(int nSortType, int nItemType, int nViewType);
-bool mp_util_svc_extract_video_list_from_folder_by_personal(char *szFolderPath, int nSortType, int nItemType, int nViewType);
+bool mp_util_svc_extract_personal_video_folder_list(int nSortType,
+ bool bPersonal);
+bool mp_util_svc_extract_video_list_by_personal(int nSortType,
+ int nItemType,
+ int nViewType);
+bool mp_util_svc_extract_video_list_from_folder_by_personal(char
+ *szFolderPath,
+ int nSortType,
+ int nItemType,
+ int nViewType);
bool mp_util_svc_check_valid_personal(int nViewType);
-void* mp_util_svc_get_video_item(const int nVideoItemIndex);
+void *mp_util_svc_get_video_item(const int nVideoItemIndex);
int mp_util_svc_move_from_db(const char *path);
-void mp_util_svc_move_to_db(const int nVideoItemIndex, const char *szVideoPath);
+void mp_util_svc_move_to_db(const int nVideoItemIndex,
+ const char *szVideoPath);
bool mp_util_svc_remove_list_item_from_list(int nVideoItemIndex);
bool mp_util_svc_is_device_storage(const int nVideoItemIndex);
bool mp_util_svc_is_personal_data(const int nVideoItemIndex);
//sort by
void mp_util_svc_ctrl_sort_list(int SortType);
-bool mp_util_svc_get_frame_by_position(const char *szFilePath, const char *szDestImage, int nPosition, int nWidth, int nHeight);
+bool mp_util_svc_get_frame_by_position(const char *szFilePath,
+ const char *szDestImage,
+ int nPosition, int nWidth,
+ int nHeight);
int mp_util_svc_get_wall_video_index(void *pInvalidList);
//used for check videoid and folderid
-bool mp_util_svc_check_valid_media_id(char *pMediaId, int style, int *nMediaIndex);
+bool mp_util_svc_check_valid_media_id(char *pMediaId, int style,
+ int *nMediaIndex);
bool mp_util_folder_is_cloud_storage(const int nFolderIndex);
-#endif // _MP_UTIL_DATABASE_
-
+#endif // _MP_UTIL_DATABASE_
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 __VIDEO_MP_UTIL_PREFERENCE__
#define __VIDEO_MP_UTIL_PREFERENCE__
bool mp_util_preference_set_multi_play_status(bool set);
-bool mp_util_preference_get_multi_play_status(bool *bMultiPlay);
+bool mp_util_preference_get_multi_play_status(bool * bMultiPlay);
-char* mp_util_preference_get_preview(void);
-bool mp_util_preference_set_preview(char* szPreview);
-bool mp_util_preference_set_preview_change(preference_changed_cb callback, void *pUserData);
+char *mp_util_preference_get_preview(void);
+bool mp_util_preference_set_preview(char *szPreview);
+bool mp_util_preference_set_preview_change(preference_changed_cb callback,
+ void *pUserData);
bool mp_util_preference_unset_preview_change(void);
void mp_util_preference_init();
#endif
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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-video-list-auto-play-ctrl.h"
#include <efl_extension.h>
-typedef void (*MpUtilExitCbFunc)(void);
-typedef void (*mpColorThemeChangedCb)(void *pUserData);
+typedef void (*MpUtilExitCbFunc) (void);
+typedef void (*mpColorThemeChangedCb) (void *pUserData);
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
-#define MP_FREE_STRING(str) do { if(str){free(str); str = NULL;} } while(0)
-#define MP_DEL_OBJ(obj) do { if(obj){evas_object_del(obj); obj = NULL;} } while(0)
-#define MP_DEL_TIMER(timer) do { if(timer){ecore_timer_del(timer); timer = NULL;} } while(0)
-#define MP_DEL_IDLER(idler) do { if(idler){ecore_idler_del(idler); idler = NULL;} } while(0)
-#define MP_DEL_PIPE(pipe) do { if(pipe){ecore_pipe_del(pipe); pipe = NULL;} } while(0)
-#define MP_DEL_ITC(Itc) do { if(Itc){elm_genlist_item_class_free(Itc); Itc = NULL;} } while(0)
-#define MP_DEL_GRID_ITC(Itc) do { if(Itc){elm_gengrid_item_class_free(Itc); Itc = NULL;} } while(0)
+#define MP_FREE_STRING(str) do { if (str) { free(str); str = NULL; } } while (0)
+#define MP_DEL_OBJ(obj) do { if (obj) { evas_object_del(obj); obj = NULL; } } while (0)
+#define MP_DEL_TIMER(timer) do { if (timer) { ecore_timer_del(timer); timer = NULL; } } while (0)
+#define MP_DEL_IDLER(idler) do { if (idler) { ecore_idler_del(idler); idler = NULL; } } while (0)
+#define MP_DEL_PIPE(pipe) do { if (pipe) { ecore_pipe_del(pipe); pipe = NULL; } } while (0)
+#define MP_DEL_ITC(Itc) do { if (Itc) { elm_genlist_item_class_free(Itc); Itc = NULL; } } while (0)
+#define MP_DEL_GRID_ITC(Itc) do { if (Itc) { elm_gengrid_item_class_free(Itc); Itc = NULL; } } while (0)
#define MP_SCALE elm_config_scale_get()
-typedef enum
-{
- NORMAL_POPUP_RETURN_TYPE_UNKNOW = 0,
+typedef enum {
+ NORMAL_POPUP_RETURN_TYPE_UNKNOW = 0,
NORMAL_POPUP_RETURN_TYPE_YES,
NORMAL_POPUP_RETURN_TYPE_NO,
NORMAL_POPUP_RETURN_TYPE_ERR,
-}NormalPopUpRetType;
+} NormalPopUpRetType;
-typedef enum
-{
- VIDEO_ROTATE_UNKNOWN = 0,
+typedef enum {
+ VIDEO_ROTATE_UNKNOWN = 0,
VIDEO_ROTATE_PORTRAIT_NORMAL,
VIDEO_ROTATE_PORTRAIT_REVERSE,
VIDEO_ROTATE_LANDSCAPE_NORMAL,
VIDEO_ROTATE_LANDSCAPE_REVERSE,
-}MpVideoRotateType;
+} MpVideoRotateType;
-typedef enum
-{
- POPUP_PROCESSING_NO_BUTTON = 0,
+typedef enum {
+ POPUP_PROCESSING_NO_BUTTON = 0,
POPUP_PROCESSING_ONE_BUTTON,
-}MpLoadingPopUpType;
+} MpLoadingPopUpType;
/////////////////////////////////////////
// tap type
int mp_util_get_main_tab_type();
-void mp_util_set_main_tab_type( int nType );
+void mp_util_set_main_tab_type(int nType);
/////////////////////////////////////////
// Windows utility
void mp_util_reset_for_relauching(void);
void mp_util_set_main_window_handle(void *pWindowHandle);
-void* mp_util_get_main_window_handle(void);
+void *mp_util_get_main_window_handle(void);
void mp_util_set_main_conformat(void *pConformant);
-void* mp_util_get_main_conformat(void);
+void *mp_util_get_main_conformat(void);
void mp_util_create_main_theme(void);
void mp_util_set_color_theme_changed_cb(mpColorThemeChangedCb fChanged);
/////////////////////////////////////////
// Popup utility
void mp_util_delete_popup_handle(void);
-bool mp_util_notify_popup(void *pUserData, char *szTitle, char *szContents, void *PopupButtonCallbackFunc);
-bool mp_util_yes_no_popup(void *pUserData, char *szTitle, char *szContents, void *PopupYesButtonCallbackFunc, void *PopupNoButtonCallbackFunc);
-bool mp_util_remove_all_videos_question_popup(void *pUserData, MpListViewAsType viewType, void *PopupDeleteButtonCallbackFunc, void *PopupCancelButtonCallbackFunc, void *PopupHWMouseBackUpCbFunc, void *PopupHWKeyBackCbFunc);
-bool mp_util_remove_question_popup(int pUserData, MpListViewAsType viewType, void *PopupDeleteButtonCallbackFunc, void *PopupCancelButtonCallbackFunc, void *PopupHWMouseBackUpCbFunc, void *PopupHWKeyBackCbFunc);
-bool mp_util_remove_folder_question_popup(void *pUserData, void *PopupDeleteButtonCallbackFunc, void *PopupCancelButtonCallbackFunc, void *PopupHWMouseBackUpCbFunc, void *PopupHWKeyBackCbFunc);
-bool mp_util_download_question_popup(void *pUserData, char *szTitle, char *szContents, void *PopupCancelBtnCallbackFunc, void *PopupDownloadBtnCallbackFunc);
-bool mp_util_progress_popup(char* szLabel);
+bool mp_util_notify_popup(void *pUserData, char *szTitle, char *szContents,
+ void *PopupButtonCallbackFunc);
+bool mp_util_yes_no_popup(void *pUserData, char *szTitle, char *szContents,
+ void *PopupYesButtonCallbackFunc,
+ void *PopupNoButtonCallbackFunc);
+bool mp_util_remove_all_videos_question_popup(void *pUserData,
+ MpListViewAsType viewType,
+ void
+ *PopupDeleteButtonCallbackFunc,
+ void
+ *PopupCancelButtonCallbackFunc,
+ void
+ *PopupHWMouseBackUpCbFunc,
+ void *PopupHWKeyBackCbFunc);
+bool mp_util_remove_question_popup(int pUserData,
+ MpListViewAsType viewType,
+ void *PopupDeleteButtonCallbackFunc,
+ void *PopupCancelButtonCallbackFunc,
+ void *PopupHWMouseBackUpCbFunc,
+ void *PopupHWKeyBackCbFunc);
+bool mp_util_remove_folder_question_popup(void *pUserData,
+ void
+ *PopupDeleteButtonCallbackFunc,
+ void
+ *PopupCancelButtonCallbackFunc,
+ void *PopupHWMouseBackUpCbFunc,
+ void *PopupHWKeyBackCbFunc);
+bool mp_util_download_question_popup(void *pUserData, char *szTitle,
+ char *szContents,
+ void *PopupCancelBtnCallbackFunc,
+ void *PopupDownloadBtnCallbackFunc);
+bool mp_util_progress_popup(char *szLabel);
void mp_util_status_bar_noti_popup_show(const char *szStr);
-void* mp_util_create_button_icon(void *pParent, const char *szIconPath, bool bSizeUp, bool bSizeDown, int nAspectWidth, int nAspectHeight, void *pUserData, char* szButtonStyle, void *func);
-void* mp_util_create_style_button(void *pParent, const char* szButtonText, const void *pUserData, char* szButtonStyle, void *func);
-bool mp_util_ticker_toast_popup(const char *text, bool info_style, bool bottom);
-bool mp_util_ticker_toast_with_timeout_cb_popup(const char *text, Evas_Smart_Cb timeout_func);
-
-void* mp_util_create_title_icon_btn(void *pParent, const char*icon_path, Evas_Smart_Cb pFunc, void *pUserData);
-bool mp_util_loading_popup(MpLoadingPopUpType style ,char *szLabel, Evas_Smart_Cb response_cb, void *pUserData);
-bool mp_util_info_popup(char *szLabel, Evas_Smart_Cb response_cb, Evas_Event_Cb focus_cb, void *pUserData, const char *szDomain);
-bool mp_util_info_second_popup(Evas_Object *pParent, char *szLabel, Evas_Smart_Cb response_cb, Evas_Event_Cb focus_cb, void *pUserData, const char *szDomain);
-void* mp_util_get_current_popup_object();
-void mp_util_text_and_check_popup(Evas_Smart_Cb response_cb, void *cancel_cb, void *ok_cb, void *check_changed_cb, char *szLabel,void *pUserData);
-bool mp_util_loading_left_text_popup(MpLoadingPopUpType style ,char *szLabel, Evas_Smart_Cb response_cb, void *pUserData);
+void *mp_util_create_button_icon(void *pParent, const char *szIconPath,
+ bool bSizeUp, bool bSizeDown,
+ int nAspectWidth, int nAspectHeight,
+ void *pUserData, char *szButtonStyle,
+ void *func);
+void *mp_util_create_style_button(void *pParent, const char *szButtonText,
+ const void *pUserData,
+ char *szButtonStyle, void *func);
+bool mp_util_ticker_toast_popup(const char *text, bool info_style,
+ bool bottom);
+bool mp_util_ticker_toast_with_timeout_cb_popup(const char *text,
+ Evas_Smart_Cb
+ timeout_func);
+
+void *mp_util_create_title_icon_btn(void *pParent, const char *icon_path,
+ Evas_Smart_Cb pFunc, void *pUserData);
+bool mp_util_loading_popup(MpLoadingPopUpType style, char *szLabel,
+ Evas_Smart_Cb response_cb, void *pUserData);
+bool mp_util_info_popup(char *szLabel, Evas_Smart_Cb response_cb,
+ Evas_Event_Cb focus_cb, void *pUserData,
+ const char *szDomain);
+bool mp_util_info_second_popup(Evas_Object * pParent, char *szLabel,
+ Evas_Smart_Cb response_cb,
+ Evas_Event_Cb focus_cb, void *pUserData,
+ const char *szDomain);
+void *mp_util_get_current_popup_object();
+void mp_util_text_and_check_popup(Evas_Smart_Cb response_cb,
+ void *cancel_cb, void *ok_cb,
+ void *check_changed_cb, char *szLabel,
+ void *pUserData);
+bool mp_util_loading_left_text_popup(MpLoadingPopUpType style,
+ char *szLabel,
+ Evas_Smart_Cb response_cb,
+ void *pUserData);
bool mp_util_check_video_file(const char *szFullPath);
bool mp_util_check_empty_dir(const char *szDir);
bool mp_util_call_off(void);
bool mp_util_check_local_file_exist(char *uri);
-char* mp_util_get_file_size(unsigned long long size);
-bool mp_util_get_file_title_from_file_path(char* szFilepath, char* szTitle, int nLengthTitle);
+char *mp_util_get_file_size(unsigned long long size);
+bool mp_util_get_file_title_from_file_path(char *szFilepath, char *szTitle,
+ int nLengthTitle);
char *mp_util_get_file_name_from_file_path(const char *szFilePath);
-bool mp_util_get_icon_path_from_thumbnail(const char *szMediaURL, char **szIconURL);
-char *mp_util_get_display_name_from_path_and_title(const char *szFilePath, const char *szTitle);
+bool mp_util_get_icon_path_from_thumbnail(const char *szMediaURL,
+ char **szIconURL);
+char *mp_util_get_display_name_from_path_and_title(const char *szFilePath,
+ const char *szTitle);
char *mp_util_get_title_from_path(char *szFilePath);
-int mp_util_rename_the_same_file(const char *old_path, char **szNewestPath);
+int mp_util_rename_the_same_file(const char *old_path,
+ char **szNewestPath);
-void mp_util_convert_time(int nVideoTime, char* szRetTime, bool bIsHideHour);
+void mp_util_convert_time(int nVideoTime, char *szRetTime,
+ bool bIsHideHour);
int mp_util_get_pid(void);
-const char* mp_util_str_str_same_case(const char* str, const char* subStr);
+const char *mp_util_str_str_same_case(const char *str, const char *subStr);
bool mp_util_get_network_result();
char *mp_util_get_dir_by_path(const char *file_path);
char *mp_util_get_folder_icon_path(int nVideoFolderIndex);
bool mp_util_get_subtitle_path(const char *szMediaURL, char **szSubtitle);
-bool mp_util_get_file_size_by_path(const char *szMediaURL, unsigned long long *nSize);
+bool mp_util_get_file_size_by_path(const char *szMediaURL,
+ unsigned long long *nSize);
-bool mp_util_get_image_size(Evas_Object *pParent, const char *szMediaURL, int *nWidth, int *nHeight);
+bool mp_util_get_image_size(Evas_Object * pParent, const char *szMediaURL,
+ int *nWidth, int *nHeight);
//personal page
bool mp_util_get_personal_status(void);
-bool mp_util_check_video_personal_status(const char* szPreviewUrl);
-int mp_util_rename_file(const char *old_path, const char *new_path, char **szNewestPath);
+bool mp_util_check_video_personal_status(const char *szPreviewUrl);
+int mp_util_rename_file(const char *old_path, const char *new_path,
+ char **szNewestPath);
int mp_util_set_dest_file(const char *pDestPath);
//drm
-bool mp_util_check_drm_lock(const char *szMediaURL, bool *bLock);
-void mp_util_convert_sec_time(int nVideoTime, char* szRetTime, bool bIsHideHour);
+bool mp_util_check_drm_lock(const char *szMediaURL, bool * bLock);
+void mp_util_convert_sec_time(int nVideoTime, char *szRetTime,
+ bool bIsHideHour);
-Evas_Object* mp_util_create_preload_image(Evas_Object *parent, const char *path, int nIconWidth);
+Evas_Object *mp_util_create_preload_image(Evas_Object * parent,
+ const char *path,
+ int nIconWidth);
bool mp_util_save_preview_image(const char *szFilePath);
char *mp_util_get_preview_image_path(const char *szFilePath);
// progresss loading object
-Evas_Object* mp_util_create_embedded_progress();
-void mp_util_destroy_embedded_progress( Evas_Object *pProgress );
+Evas_Object *mp_util_create_embedded_progress();
+void mp_util_destroy_embedded_progress(Evas_Object * pProgress);
-Evas_Object* mp_util_create_wall_preload_image(Evas_Object *parent, int nIconWidth);
+Evas_Object *mp_util_create_wall_preload_image(Evas_Object * parent,
+ int nIconWidth);
-bool mp_util_meta_get_width_and_height(const char *szFilePath, int *nWidth, int *nHeight);
+bool mp_util_meta_get_width_and_height(const char *szFilePath, int *nWidth,
+ int *nHeight);
bool mp_util_delete_wall_file(char *szVideoId);
-Evas_Object* mp_util_create_gengrid(Evas_Object *parent, int nWidth, int nHeight, bool bHorizontal);
+Evas_Object *mp_util_create_gengrid(Evas_Object * parent, int nWidth,
+ int nHeight, bool bHorizontal);
-Evas_Object *mp_util_create_folder_icon(void *pParent, const char*icon_path);
+Evas_Object *mp_util_create_folder_icon(void *pParent,
+ const char *icon_path);
bool mp_util_create_folder_sub_icon(void *pLayout, int nVideoFolderIndex);
bool mp_util_create_video_sub_icon(void *pLayout, int nVideoItemIndex);
-unsigned long long mp_util_get_disk_available_space(const char *szFilePath);
+unsigned long long mp_util_get_disk_available_space(const char
+ *szFilePath);
void mp_util_virtual_keypad_disabled_set(Eina_Bool bDisabled);
-int mp_util_set_translate_str(Evas_Object *obj, const char *str);
+int mp_util_set_translate_str(Evas_Object * obj, const char *str);
bool vp_is_auto_play_on();
void vp_set_auto_play(bool val);
#define PREF_MP_VIDEO_AUTO_PLAY_TYPE_KEY "preference/org.tizen.videos/auto_play_type"
-#endif // _MP_UTIL_
-
+#endif // _MP_UTIL_
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_INFO_CTRL_
#define _VIDEO_INFO_CTRL_
-bool mp_info_ctrl_get_gps(char *szUriPath, double *dLongitude, double *dLatitude);
-char* mp_info_ctrl_get_file_extension(char *szPath);
-bool mp_info_ctrl_get_resolution(char *szWidthResolution, char *szHeightResolution, void *pUserData);
-bool mp_info_ctrl_get_file_info(char *szUriPath, char *szFileDate, int nFileDateSize, char *szFileExtension, int nFileExtensionSize, char *szFileSize, int nFilesizeSize);
-char* mp_info_ctrl_get_data_of_file(time_t mtime);
+bool mp_info_ctrl_get_gps(char *szUriPath, double *dLongitude,
+ double *dLatitude);
+char *mp_info_ctrl_get_file_extension(char *szPath);
+bool mp_info_ctrl_get_resolution(char *szWidthResolution,
+ char *szHeightResolution,
+ void *pUserData);
+bool mp_info_ctrl_get_file_info(char *szUriPath, char *szFileDate,
+ int nFileDateSize, char *szFileExtension,
+ int nFileExtensionSize, char *szFileSize,
+ int nFilesizeSize);
+char *mp_info_ctrl_get_data_of_file(time_t mtime);
#endif
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_SOUND_MANAGER_H_
#ifdef _cplusplus
-extern "C"
-{
+extern "C" {
#endif
-void mp_sound_mgr_init();
-void mp_sound_mgr_deinit();
+ void mp_sound_mgr_init();
+ void mp_sound_mgr_deinit();
#ifdef _cplusplus
}
#endif
-
-
-#endif // _VIDEO_SOUND_MANAGER_H_
-
+#endif // _VIDEO_SOUND_MANAGER_H_
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 __VIDEO_MP_UTIL_DB_CONTROLLER__
#define __VIDEO_MP_UTIL_DB_CONTROLLER__
#include <stdbool.h>
#include <Elementary.h>
-typedef enum
-{
- MP_DB_UPDATE_LEV_0 = 0,
+typedef enum {
+ MP_DB_UPDATE_LEV_0 = 0,
MP_DB_UPDATE_LEV_1,
MP_DB_UPDATE_LEV_2,
MP_DB_UPDATE_LEV_3,
MP_DB_UPDATE_LEV_4,
MP_DB_UPDATE_LEV_MAX,
-}MpDbUpdateViewLev;
+} MpDbUpdateViewLev;
-typedef void (*MpDbUpdateCbFunc)(void *pUserData);
+typedef void (*MpDbUpdateCbFunc) (void *pUserData);
-bool mp_util_db_set_update_fun(MpDbUpdateViewLev nLev, MpDbUpdateCbFunc pUpdateFun);
+bool mp_util_db_set_update_fun(MpDbUpdateViewLev nLev,
+ MpDbUpdateCbFunc pUpdateFun);
void mp_util_db_reset_update_fun_except_lev0(void);
void mp_util_db_reset_all_update_fun(void);
void mp_util_db_reset_update_fun_up_self(MpDbUpdateViewLev nLev);
bool mp_util_db_run_update_fun(MpDbUpdateViewLev nLev, void *pUserData);
-bool mp_util_db_run_all_update_fun(void *pUserData0, void *pUserData1, void *pUserData2, void *pUserData3, void *pUserData4);
-bool mp_util_db_run_update_fun_except_lev0(void *pUserData1, void *pUserData2, void *pUserData3, void *pUserData4);
+bool mp_util_db_run_all_update_fun(void *pUserData0, void *pUserData1,
+ void *pUserData2, void *pUserData3,
+ void *pUserData4);
+bool mp_util_db_run_update_fun_except_lev0(void *pUserData1,
+ void *pUserData2,
+ void *pUserData3,
+ void *pUserData4);
void mp_util_db_reset_backup_fun_up_self(MpDbUpdateViewLev nLev);
void mp_util_db_reset_backup_fun_except_lev0(void);
void mp_util_db_reset_all_backup_fun(void);
-bool mp_util_db_set_backup_fun(MpDbUpdateViewLev nLev, MpDbUpdateCbFunc pUpdateFun);
-bool mp_util_db_run_backup_fun_except_lev0(void *pUserData1, void *pUserData2, void *pUserData3, void *pUserData4);
-bool mp_util_db_run_all_backup_fun(void *pUserData0, void *pUserData1, void *pUserData2, void *pUserData3, void *pUserData4);
+bool mp_util_db_set_backup_fun(MpDbUpdateViewLev nLev,
+ MpDbUpdateCbFunc pUpdateFun);
+bool mp_util_db_run_backup_fun_except_lev0(void *pUserData1,
+ void *pUserData2,
+ void *pUserData3,
+ void *pUserData4);
+bool mp_util_db_run_all_backup_fun(void *pUserData0, void *pUserData1,
+ void *pUserData2, void *pUserData3,
+ void *pUserData4);
#endif
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 __LAUNCHING_VIDEO_DISPLAYER__
#define __LAUNCHING_VIDEO_DISPLAYER__
-typedef enum
-{
- MP_PLAYER_TYPE_VIDEO = 0,
+typedef enum {
+ MP_PLAYER_TYPE_VIDEO = 0,
MP_PLAYER_TYPE_STREAMING,
MP_PLAYER_TYPE_MAX,
-}MpPlayerType;
+} MpPlayerType;
-void mp_launch_video_play(char* szMediaUrl, MpPlayerType nPlayerType, char *szDeviceID);
+void mp_launch_video_play(char *szMediaUrl, MpPlayerType nPlayerType,
+ char *szDeviceID);
void mp_launch_video_stop(void);
bool mp_launch_video_allow_check(void);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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_UTIL_COPY_CTRL__
#define __MP_UTIL_COPY_CTRL__
} euThreadFeedback;
-typedef void (*mp_util_copy_cb) (euThreadFeedback msg_type, unsigned long long size, int nErrorCode, void *userData);
+typedef void (*mp_util_copy_cb) (euThreadFeedback msg_type,
+ unsigned long long size, int nErrorCode,
+ void *userData);
-int mp_util_move_push(const char *szSrcPath, const char *szDstPath, mp_util_copy_cb cbFun, void *userData, unsigned long long nTotalSize);
+int mp_util_move_push(const char *szSrcPath, const char *szDstPath,
+ mp_util_copy_cb cbFun, void *userData,
+ unsigned long long nTotalSize);
bool mp_util_move_cancel_check(void);
void mp_util_move_set_cancel_state(bool bCancel);
-bool mp_util_move_get_total_dir_size(const char *szDir, unsigned long long *size);
+bool mp_util_move_get_total_dir_size(const char *szDir,
+ unsigned long long *size);
-int mp_util_move_delete_video_folder(const char *szFolderPath, void *userData);
+int mp_util_move_delete_video_folder(const char *szFolderPath,
+ void *userData);
#endif
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_LOG_H_
#define _VIDEO_LOG_H_
#define LOG_TAG "VIDEOS"
-#define VideoLogInfoWithTid(fmt,arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d %lu]" fmt "\n", __func__, __LINE__, syscall(__NR_gettid), ##arg)
-#define VideoLogInfo(fmt,arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
-#define VideoLogDebug(fmt,arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
-#define VideoLogWarning(fmt,arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
-#define VideoLogError( fmt,arg...) dlog_print(DLOG_ERROR, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
+#define VideoLogInfoWithTid(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d %lu]" fmt "\n", __func__, __LINE__, syscall(__NR_gettid), ##arg)
+#define VideoLogInfo(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
+#define VideoLogDebug(fmt, arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
+#define VideoLogWarning(fmt, arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
+#define VideoLogError(fmt, arg...) dlog_print(DLOG_ERROR, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
-#define VideoSecureLogInfoWithTid(fmt,arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s : %05d %lu]" fmt "\n", __func__, __LINE__, syscall(__NR_gettid), ##arg)
-#define VideoSecureLogDebug(fmt,arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
-#define VideoSecureLogInfo(fmt,arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
-#define VideoSecureLogError( fmt,arg...) dlog_print(DLOG_ERROR, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
+#define VideoSecureLogInfoWithTid(fmt, arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s : %05d %lu]" fmt "\n", __func__, __LINE__, syscall(__NR_gettid), ##arg)
+#define VideoSecureLogDebug(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
+#define VideoSecureLogInfo(fmt, arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
+#define VideoSecureLogError(fmt, arg...) dlog_print(DLOG_ERROR, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
#define PERF_CHECK_IN(fmt, arg...) dlog_print(DLOG_INFO, "LAUNCH", "[video-player:Application:" fmt ":IN]", ##arg)
#define PERF_CHECK_OUT(fmt, arg...) dlog_print(DLOG_INFO, "LAUNCH", "[video-player:Application:" fmt ":OUT]", ##arg)
#define VideoLogAssert(expr) do { \
- if(!(expr)) { \
+ if (!(expr)) { \
VideoLogError("Critical ERROR ########################################## Check below item.");\
assert(0); \
} \
} while (0)
-//#define video_info(fmt,arg...) printf( "[%s %s : %d] " fmt "\n",__FILE__, __FUNCTION__,__LINE__, ##arg)
-//#define video_debug(fmt,arg...) printf( "[%s %s : %d] " fmt "\n",__FILE__, __FUNCTION__,__LINE__, ##arg)
-//#define video_warning(fmt,arg...) printf( "[%s %s : %d] " fmt "\n",__FILE__, __FUNCTION__,__LINE__, ##arg)
-//#define video_error( fmt,arg...) printf( "[%s %s : %d] " fmt "\n", __FILE__,__FUNCTION__,__LINE__, ##arg)
-
-
#endif /*_MPVIDEO_LOG_H_*/
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_STRING_DEFINE_
/*--------------------------------------------String Define---------------------------------------------------*/
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// Title, System
+// Title, System
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define VIDEOS_TITLE_VIDEO VIDEOS_GET_STR("IDS_VIDEO_OPT_VIDEOS")
#define VIDEOS_TITLE_VIDEO_PLAYER (dgettext(MP_SYS_STRING, "IDS_COM_BODY_VIDEO_PLAYER"))
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// Popup
+// Popup
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// Common //
+// Common //
#define VIDEOS_COMMON_BUTTON_YES_IDS ("IDS_COM_SK_YES")
#define VIDEOS_COMMON_BUTTON_NO_IDS ("IDS_COM_SK_NO")
#define VIDEOS_COMMON_BUTTON_OK (dgettext(MP_SYS_STRING, "IDS_COM_SK_OK"))
#define VIDEOS_COMMON_MSG_DONT_ASK_AGAIN_IDS ("IDS_MUSIC_BUTTON_DONT_ASK_AGAIN")
#define VIDEOS_COMMON_BUTTON_RENAME_IDS ("IDS_VIDEO_OPT_RENAME")
-// Context popup //
+// Context popup //
#define VIDEOS_CTXPOP_MENU_DOWNLOAD VIDEOS_GET_STR("IDS_VIDEO_BUTTON_DOWNLOAD")
#define VIDEOS_CTXPOP_MENU_DOWNLOAD_IDS ("IDS_VIDEO_BUTTON_DOWNLOAD")
#define VIDEOS_CTXPOP_MENU_SEARCH VIDEOS_GET_STR("IDS_VIDEO_OPT_SEARCH")
#define VIDEOS_CTXPOP_MENU_MOVE_TO_PRIVATE VIDEOS_GET_STR("IDS_GALLERY_OPT_MOVE_TO_PRIVATE")
#define VIDEOS_CTXPOP_MENU_REMOVE_FROM_PRIVATE VIDEOS_GET_STR("IDS_GALLERY_OPT_REMOVE_FROM_PRIVATE")
-// Delete popup //
+// Delete popup //
#define VIDEOS_DELETEPOP_HEADER_DELETE VIDEOS_GET_STR("IDS_VIDEO_BUTTON_DELETE")
#define VIDEOS_DELETEPOP_BUTTON_DELETE VIDEOS_GET_STR("IDS_VIDEO_BUTTON_DELETE")
#define VIDEOS_DELETEPOP_BUTTON_DELETE_ALL VIDEOS_GET_STR("IDS_ST_OPT_DELETE_ALL")
#define VIDEOS_DELETEPOP_HEADER_DELETE_VIDEOS VIDEOS_GET_STR("IDS_VIDEO_HEADER_DELETE_VIDEOS") // not be used in lite
#define MP_COM_POP_DELETED (dgettext(MP_SYS_STRING, "IDS_COM_POP_DELETED")) // not be used in lite
-// Rename popup //
+// Rename popup //
#define VIDEOS_RENAMEPOP_HEADER_RENAME VIDEOS_GET_STR("IDS_VIDEO_OPT_RENAME")
#define VIDEOS_RENAMEPOP_HEADER_RENAME_IDS ("IDS_VIDEO_OPT_RENAME")
#define VIDEOS_RENAMEPOP_BUTTON_RENAME VIDEOS_GET_STR("IDS_VIDEO_OPT_RENAME")
#define VIDEOS_RENAMEPOP_BUTTON_RENAME_IDS ("IDS_VIDEO_OPT_RENAME")
-// View as popup //
+// View as popup //
#define VIDEOS_VIEWASPOP_HEADER_VIEW_AS VIDEOS_GET_STR("IDS_VIDEO_OPT_VIEW_AS")
#define VIDEOS_VIEWASPOP_HEADER_VIEW_AS_IDS ("IDS_VIDEO_OPT_VIEW_AS")
-// Sort by popup //
+// Sort by popup //
#define VIDEOS_SORTBYPOP_HEADER_SORT_BY VIDEOS_GET_STR("IDS_VIDEO_OPT_SORT_BY")
#define VIDEOS_SORTBYPOP_HEADER_SORT_BY_IDS ("IDS_VIDEO_OPT_SORT_BY")
//Auto Play next Popup
#define VIDEOS_MENU_AUTO_PLAY_NEXT_POP_HEADER VIDEOS_GET_STR("IDS_VPL_OPT_AUTO_PLAY_NEXT_ABB")
-// Download popup //
+// Download popup //
#define VIDEOS_DOWNLOADPOP_MSG_1_VIDEO_WILL_BE_DOWNLOADED "1 video will be downloaded." // TODO. need to change STMS string after release new ID
#define VIDEOS_DOWNLOADPOP_MSG_PD_VIDEOS_WILL_BE_DOWNLOADED "%d videos will be downloaded." // TODO. need to change STMS string after release new ID
#define VIDEOS_DOWNLOADPOP_MSG_ALL_VIDEOS_WILL_BE_DOWNLOADED "All videos will be downloaded." // TODO. need to change STMS string after release new ID
#define VIDEOS_DOWNLOADPOP_BUTTON_DOWNLOAD VIDEOS_GET_STR("IDS_VIDEO_BUTTON_DOWNLOAD")
-// Move popup (not be used for lite) //
+// Move popup (not be used for lite) //
#define MP_PERSONAL_ITEM_MOVE_TO VIDEOS_GET_STR_FMT("IDS_VIDEO_POP_THE_SELECTED_ITEM_WILL_BE_MOVED_TO_PS")
#define MP_PERSONAL_ITEMS_MOVE_TO VIDEOS_GET_STR_FMT("IDS_VIDEO_POP_THE_SELECTED_ITEMS_WILL_BE_MOVED_TO_PS")
#define MP_PERSONAL_DONT_ASK_AGAIN VIDEOS_GET_STR("IDS_MUSIC_BUTTON_DONT_ASK_AGAIN")
#define MP_COM_OPT_UNABLE_ADDED (dgettext(MP_SYS_STRING, "IDS_COM_BODY_UNABLE_TO_ADD")) // status bar noti
#define MP_COM_BODY_MOVE (dgettext(MP_SYS_STRING, "IDS_COM_BODY_MOVE"))
-// Share panel (not used at lite) //
+// Share panel (not used at lite) //
#define MP_SHARE_BLUETOOTH (dgettext(MP_SYS_STRING, "IDS_COM_BODY_BLUETOOTH"))
#define MP_SHARE_FTM (dgettext(MP_SYS_STRING, "IDS_COM_OPT1_WI_FI_DIRECT"))
-#define MP_SHARE_MESSAGE VIDEOS_GET_STR("IDS_VIDEO_OPT_MESSAGE_ABB")
+#define MP_SHARE_MESSAGE VIDEOS_GET_STR("IDS_VIDEO_OPT_MESSAGE_ABB")
#define MP_SHARE_EMAIL VIDEOS_GET_STR("IDS_VIDEO_OPT_EMAIL_ABB")
-// Notificatioin msg (noti, toast popup) //
+// Notificatioin msg (noti, toast popup) //
#define VIDEOS_NOTIPOP_MSG_ALREADY_EXISTS VIDEOS_GET_STR("IDS_VIDEO_TPOP_FILE_NAME_ALREADY_IN_USE")
#define VIDEOS_NOTIPOP_MSG_ALREADY_EXISTS_IDS ("IDS_VIDEO_TPOP_FILE_NAME_ALREADY_IN_USE")
#define VIDEOS_NOTIPOP_MSG_SHARE_ITEM_MAX VIDEOS_GET_STR_FMT("IDS_VIDEO_TPOP_MAXIMUM_NUMBER_OF_ATTACHMENTS_HPD_EXCEEDED")
#define VIDEOS_NOTIPOP_MSG_UNABLE_TO_PLAY_THIS_VIDEO_SIDESYNC VIDEOS_GET_STR("IDS_VIDEO_POP_UNABLE_TO_PLAY_THIS_VIDEO_WHILE_USING_SIDESYNC")
-#define VIDEOS_NOTIPOP_MSG_INVALID_CHARACTERS VIDEOS_GET_STR("IDS_SWALL_HEADER_INVALID_CHARACTER")
+#define VIDEOS_NOTIPOP_MSG_INVALID_CHARACTERS VIDEOS_GET_STR("IDS_SWALL_HEADER_INVALID_CHARACTER")
#define VIDEOS_NOTIPOP_MSG_MAX_NUM_OF_CHARACTERS dgettext(MP_SYS_STRING, "IDS_COM_POP_MAXIMUM_NUMBER_OF_CHARACTERS_REACHED")
#define VIDEOS_NOTIPOP_MSG_CONNECTION_FAIL (dgettext(MP_SYS_STRING, "IDS_COM_POP_CONNECTION_ERROR"))
#define VIDEOS_NOTIPOP_MSG_FILE_NOT_EXIST (dgettext(MP_SYS_STRING, "IDS_COM_POP_FILE_NOT_EXIST"))
-#define VIDEOS_NOTIPOP_MSG_UNABLE_TO_SHARE_DRM_FILE VIDEOS_GET_STR("IDS_MUSIC_POP_UNABLE_TO_SHARE_DRM_FILE") // it will be removed. // not be used for lite
-#define VIDEOS_NOTIPOP_MSG_UNABLE_TO_PLAY_VIDEO_DURING_CALL VIDEOS_GET_STR("IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL")
+#define VIDEOS_NOTIPOP_MSG_UNABLE_TO_SHARE_DRM_FILE VIDEOS_GET_STR("IDS_MUSIC_POP_UNABLE_TO_SHARE_DRM_FILE") // it will be removed. // not be used for lite
+#define VIDEOS_NOTIPOP_MSG_UNABLE_TO_PLAY_VIDEO_DURING_CALL VIDEOS_GET_STR("IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL")
#define VIDEOS_NOTIPOP_MSG_TURN_PHONE_OVER_TO_MUTE_IDS ("IDS_VPL_BODY_TURN_PHONE_OVER_TO_MUTE_INCOMING_CALLS_MESSAGE_ALERTS_AND_ALARMS")
#define VIDEOS_NOTIPOP_MSG_CLOUD_FILE_CONNECT_FAIL ("IDS_VIDEO_POP_THIS_FILE_IS_UNAVAILABLE_WHILE_OFFLINE_CHECK_NETWORK_CONNECTION_AND_TRY_AGAIN")
#define VIDEOS_NOTIPOP_MSG_MOVE_TO_PERSONAL_STORAGE_FAILED VIDEOS_GET_STR("IDS_VIDEO_POP_FAILED_TO_MOVE_TO_PERSONAL_STORAGE")
#define VIDEOS_NOTIPOP_MSG_MOVE_TO_NORMAL_STORAGE_FAILED VIDEOS_GET_STR("IDS_VIDEO_POP_FAILED_TO_MOVE_TO_NORMAL_STORAGE")
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// Option
+// Option
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// Sort by //
+// Sort by //
#define VIDEOS_SORTBYOPT_OPT_DATE_MOST_RECENT VIDEOS_GET_STR("IDS_VIDEO_OPT_DATE_HMOST_RECENT_ABB")
#define VIDEOS_SORTBYOPT_OPT_NAME VIDEOS_GET_STR("IDS_VIDEO_OPT_NAME_HA_Z_ABB")
#define VIDEOS_SORTBYOPT_OPT_RECENTLY_VIEWED VIDEOS_GET_STR("IDS_VIDEO_OPT_RECENTLY_VIEWED_ABB")
#define VIDEOS_SORTBYOPT_OPT_SIZE VIDEOS_GET_STR("IDS_VIDEO_OPT_SIZE")
#define VIDEOS_SORTBYOPT_OPT_TYPE VIDEOS_GET_STR("IDS_VIDEO_OPT_TYPE")
-// Veiw as //
+// Veiw as //
#define VIDEOS_VIEWASOPT_OPT_LIST VIDEOS_GET_STR("IDS_VIDEO_OPT_LIST")
#define VIDEOS_VIEWASOPT_OPT_THUMBNAIL VIDEOS_GET_STR("IDS_VIDEO_OPT_VIDEOS") // not be used for lite
#define VIDEOS_VIEWASOPT_OPT_FOLDER VIDEOS_GET_STR("IDS_VIDEO_OPT_FOLDERS_ABB")
#define VIDEOS_TITLE_OPT_FOLDER VIDEOS_GET_STR("IDS_VIDEO_OPT_FOLDERS_ABB")
-// Content to display //
+// Content to display //
#define VIDEOS_CONTENTTODISPLAYOPT_OPT_ALLCONTENT VIDEOS_GET_STR("IDS_VPL_OPT_ALL_CONTENT_ABB")
#define VIDEOS_CONTENTTODISPLAYOPT_OPT_PHONE VIDEOS_GET_STR("IDS_VPL_OPT_CONTENT_ON_DEVICE_ABB")
#define VIDEOS_CONTENTTODISPLAYOPT_OPT_CLOUD VIDEOS_GET_STR("IDS_VPL_OPT_CONTENT_IN_DROPBOX_ABB")
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// View
+// View
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// Nocontent //
+// Nocontent //
#define VIDEOS_NOCONTENT_MSG_NO_VIDEOS VIDEOS_GET_STR("IDS_VIDEO_NPBODY_NO_VIDEOS")
#define VIDEOS_NOCONTENT_MSG_NO_VIDEOS_IDS VIDEOS_GET_STR("IDS_VIDEO_NPBODY_NO_VIDEOS")
#define VIDEOS_NOCONTENT_MSG_NO_VIDEOS_DESC VIDEOS_GET_STR("IDS_VIDEO_BODY_AFTER_YOU_RECORD_VIDEOS_USING_THE_CAMERA_THEY_WILL_BE_SHOWN_HERE")
#define VIDEOS_NOCONTENT_MSG_NO_VIDEOS_DESC_IDS ("IDS_VIDEO_BODY_AFTER_YOU_RECORD_VIDEOS_USING_THE_CAMERA_THEY_WILL_BE_SHOWN_HERE")
-// List view //
+// List view //
#define VIDEOS_LISTVIEW_BODY_ONE_VIDEO VIDEOS_GET_STR("IDS_VPL_BODY_1_VIDEO")
#define VIDEOS_LISTVIEW_BODY_PD_VIDEOS VIDEOS_GET_STR_FMT("IDS_VIDEO_HEADER_PD_VIDEOS")
-// Folder view //
+// Folder view //
#define VIDEOS_FOLDERVIEW_BODY_ONE_FOLDER VIDEOS_GET_STR("IDS_VPL_BODY_1_FOLDER")
#define VIDEOS_FOLDERVIEW_BODY_PD_FOLDERS VIDEOS_GET_STR_FMT("IDS_VIDEO_HEADER_PD_FOLDERS")
#define VIDEOS_FOLDERVIEW_BODY_DEVICE_MEMORY VIDEOS_GET_STR("IDS_IS_BODY_DEVICE_MEMORY_ABB")
#define VIDEOS_FOLDERVIEW_BODY_SD_CARD VIDEOS_GET_STR("IDS_IS_BODY_SD_CARD")
#define VIDEOS_FOLDERVIEW_BODY_USB_MEMORY VIDEOS_GET_STR("IDS_IS_BODY_SD_CARD") // need to add IDS about USB memory
-// Folder item view //
+// Folder item view //
-// Search view //
+// Search view //
#define VIDEOS_SEARCHVIEW_MSG_NO_RESULTS_FOUND_IDS ("IDS_MUSIC_BODY_NO_RESULTS_FOUND")
#define VIDEOS_SEARCHVIEW_MSG_NO_SEARCH_RESULTS VIDEOS_GET_STR("IDS_VIDEO_BODY_NO_SEARCH_RESULTS")
#define VIDEOS_SEARCHVIEW_MSG_NO_SEARCH_RESULTS_IDS ("IDS_VIDEO_BODY_NO_SEARCH_RESULTS")
-// Share view //
+// Share view //
#define VIDEOS_SHAREVIEW_DONE_IDS VIDEOS_GET_STR("IDS_TPLATFORM_ACBUTTON_DONE_ABB")
#define VIDEOS_SHAREVIEW_CANCEL_IDS VIDEOS_GET_STR("IDS_TPLATFORM_ACBUTTON_CANCEL_ABB")
-// Delete view //
+// Delete view //
#define VIDEOS_DELETEVIEW_DELETE_IDS VIDEOS_GET_STR("IDS_TPLATFORM_ACBUTTON_DELETE_ABB")
#define VIDEOS_DELETEVIEW_CANCEL_IDS VIDEOS_GET_STR("IDS_TPLATFORM_ACBUTTON_CANCEL_ABB")
-// Select view //
+// Select view //
#define VIDEOS_SELECTVIEW_HEADER_PD_SELECTED VIDEOS_GET_STR_FMT("IDS_VIDEO_HEADER_PD_SELECTED")
#define VIDEOS_SELECTVIEW_BODY_SELECT_ALL VIDEOS_GET_STR_FMT("IDS_VIDEO_HEADER_SELECT_ALL")
#define VIDEOS_SELECTVIEW_BODY_SELECT_ALL_IDS ("IDS_VIDEO_HEADER_SELECT_ALL")
#define VIDEOS_SELECTVIEW_HEADER_SELECT_IDS ("IDS_GALLERY_HEADER_SELECT")
#define VIDEOS_SELECTVIEW_HEADER_SELECT_VIDEO VIDEOS_GET_STR("IDS_GALLERY_HEADER_SELECT_VIDEO")
-// Rename view //
+// Rename view //
#define VIDEOS_RENAMEVIEW_HEADER_RENAME VIDEOS_GET_STR("IDS_VIDEO_OPT_RENAME")
#define VIDEOS_RENAMEVIEW_HEADER_RENAME_IDS ("IDS_VIDEO_OPT_RENAME")
-// Detail view //
+// Detail view //
#define VIDEOS_DETAILVIEW_HEADER_DETAILS VIDEOS_GET_STR("IDS_VIDEO_OPT_DETAILS")
#define VIDEOS_DETAILVIEW_HEADER_DETAILS_IDS ("IDS_VIDEO_OPT_DETAILS")
#define VIDEOS_DETAILVIEW_BODY_TITLE VIDEOS_GET_STR("IDS_VIDEO_OPT_TITLE")
#define VIDEOS_DETAILVIEW_BODY_SIZE VIDEOS_GET_STR("IDS_VIDEO_OPT_SIZE")
-#define VIDEOS_DETAILVIEW_BODY_DATE (dgettext(MP_SYS_STRING, "IDS_COM_BODY_DATE" ))
+#define VIDEOS_DETAILVIEW_BODY_DATE (dgettext(MP_SYS_STRING, "IDS_COM_BODY_DATE"))
#define VIDEOS_DETAILVIEW_BODY_FORMAT VIDEOS_GET_STR("IDS_VPL_OPT_FORMAT")
#define VIDEOS_DETAILVIEW_BODY_RESOLUTION VIDEOS_GET_STR("IDS_VIDEO_BODY_RESOLUTION")
#define VIDEOS_DETAILVIEW_BODY_LAST_MODIFIED ("Last modified")
#define VIDEOS_DETAILVIEW_BODY_MB (dgettext(MP_SYS_STRING, "IDS_COM_BODY_MB"))
#define VIDEOS_DETAILVIEW_BODY_GB (dgettext(MP_SYS_STRING, "IDS_COM_BODY_GB"))
-// Device view // // not be used in lite
+// Device view // // not be used in lite
#define VP_TEXT_NOT_TO_CONNECT_WIFI_IDS ("IDS_IS_BODY_YOU_NEED_TO_BE_CONNECTED_TO_A_WI_FI_NETWORK_TO_SCAN_FOR_NEARBY_DEVICES_CONNECT_VIA_WI_FI_AND_TRY_AGAIN")
#define VP_TEXT_NO_DEVICE_FOUND_IDS ("IDS_IS_BODY_NO_DEVICES_FOUND_ENABLE_THE_SHARE_CONTENT_FUNCTION_ON_YOUR_NEARBY_DEVICES")
#define MP_VPL_LIST_CTX_NEAR_BY_DEVICE VIDEOS_GET_STR("IDS_VIDEO_OPT_NEARBY_DEVICES_ABB")
#define MP_VPL_LIST_CTX_NEAR_BY_DEVICE_IDS ("IDS_VIDEO_OPT_NEARBY_DEVICES_ABB")
#define VS_TEXT_DISCONNECT_DEVICE VIDEOS_GET_STR_FMT("IDS_DLNA_POP_DISCONNECTED_FROM_PS_CHECK_THE_NETWORK_STATUS_AND_THE_CONNECTED_DEVICE")
#define MP_COM_SK_REFRESH (dgettext(MP_SYS_STRING, "IDS_COM_SK_REFRESH"))
-#define VS_TEXT_SETTINGS_DEVICES_IDS ("IDS_IS_BODY_DEVICES")
+#define VS_TEXT_SETTINGS_DEVICES_IDS ("IDS_IS_BODY_DEVICES")
#define VS_TEXT_LOADING VIDEOS_GET_STR("IDS_IS_BODY_LOADING_ING")
#define MP_VPL_DEVICES VIDEOS_GET_STR_FMT("IDS_MUSIC_HEADER_PD_DEVICES")
#define MP_VPL_CTX_SCAN_NEAR_BY_DEVICE_IDS ("IDS_VIDEO_OPT_SCAN_FOR_NEARBY_DEVICES")
#define MP_TEXT_NO_DEVICES_IDS ("IDS_VIDEO_BODY_NO_DEVICES")
-// Cloud view //
+// Cloud view //
#define MP_COM_POP_DOWNLOADED (dgettext(MP_SYS_STRING, "IDS_COM_BODY_DOWNLOADED"))
#define MP_VPL_DOWNLOAD_LIST_NO_VIDEO VIDEOS_GET_STR("IDS_VPL_POP_YOU_CAN_DOWNLOAD_AND_ENJOY_VIDEOS_THROUGH_THE_VIDEO_STORE")
#define MP_VPL_DOWNLOAD_LIST_NO_VIDEO_IDS ("IDS_VPL_POP_YOU_CAN_DOWNLOAD_AND_ENJOY_VIDEOS_THROUGH_THE_VIDEO_STORE")
-#define MP_DOWNLOAD_STR_SELECT_QUALITY VIDEOS_GET_STR("IDS_VIDEO_HEADER_SELECT_QUALITY_ABB")
+#define MP_DOWNLOAD_STR_SELECT_QUALITY VIDEOS_GET_STR("IDS_VIDEO_HEADER_SELECT_QUALITY_ABB")
-// Tab (Personal, Devices) // // not be used in lite
+// Tab (Personal, Devices) // // not be used in lite
#define MP_VPL_LIST_TAB_PERSONAL VIDEOS_GET_STR("IDS_IS_TAB4_PERSONAL_M_CONTENT")
#define MP_VPL_LIST_TAB_PERSONAL_IDS ("IDS_IS_TAB4_PERSONAL_M_CONTENT")
#define MP_VPL_LIST_TAB_VIEW VIDEOS_GET_STR("IDS_VIDEO_BUTTON_VIEW")
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// Other strings
+// Other strings
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifdef ENABLE_DRM_FEATURE
-// DRM feature string //
+// DRM feature string //
#define MP_VPL_DRM_PS_1_MORE_TIME_START_NOW_Q (dgettext(MP_SYS_STRING, "IDS_COM_POP_YOU_CAN_USE_PS_1_MORE_TIME_START_NOW_Q"))
#define MP_VPL_DRM_PS_2_MORE_TIME_START_NOW_Q (dgettext(MP_SYS_STRING, "IDS_COM_POP_YOU_CAN_USE_PS_2_MORE_TIMES_START_NOW_Q"))
#define MP_VPL_DRM_PS_FOR_PD_DAYS_START_NOW_Q (dgettext(MP_SYS_STRING, "IDS_COM_POP_YOU_CAN_USE_PS_FOR_PD_DAYS_START_NOW_Q"))
#define MP_VPL_DRM_PS_IS_ABOUT_TO_EXPIRE_GET_ANOTHER_LICENCE_Q (dgettext(MP_SYS_STRING, "IDS_COM_POP_PS_IS_ABOUT_TO_EXPIRE_GET_ANOTHER_LICENCE_Q"))
#endif
-// Sensor Control (not be used in lite) //
+// Sensor Control (not be used in lite) //
#define MP_VPL_ENABLE_MOTION_IDS ("IDS_MUSIC_BUTTON_ENABLE_MOTION")
-#endif //_VIDEO_STRING_DEFINE_
+#endif //_VIDEO_STRING_DEFINE_
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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_VIDEO_TYPE_DEFINE__
#define __MP_VIDEO_TYPE_DEFINE__
- typedef enum
- {
- LIST_TAB_TYPE_PERSONAL = 0,
- LIST_TAB_TYPE_DEVICES,
- LIST_TAB_TYPE_MAX,
- }MpVideoListTabType;
+typedef enum {
+ LIST_TAB_TYPE_PERSONAL = 0,
+ LIST_TAB_TYPE_DEVICES,
+ LIST_TAB_TYPE_MAX,
+} MpVideoListTabType;
-typedef enum
-{
- LIST_UPDATE_TYPE_NONE = 0,
+typedef enum {
+ LIST_UPDATE_TYPE_NONE = 0,
LIST_UPDATE_TYPE_ALL, //DATA AND VIEW
LIST_UPDATE_TYPE_VIEW, //ONLY UPDATE VIEW, NOT UPDATE DATA
LIST_UPDATE_TYPE_DATA, //ONLY UPDATE DATA, NOT UPDATE VIEW
LIST_UPDATE_TYPE_MAX //RESERVED FIELD
-}MpListUpdateType;
+} MpListUpdateType;
-typedef enum
-{
- MEDIA_TYPE_FILE = 0, /**< File type*/
- MEDIA_TYPE_DIRECTORY = 1, /**< Directory type*/
+typedef enum {
+ MEDIA_TYPE_FILE = 0, /**< File type*/
+ MEDIA_TYPE_DIRECTORY = 1, /**< Directory type*/
} MpMediaType;
#endif
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_VALUE_DEFINE_
//PLAY_TIME_ARGS
#define PLAY_TIME_ARGS(t) \
- (t) / (60 * 60), \
- ((t) / 60) % 60, \
- (t) % 60
+ (t) / (60 * 60), \
+ ((t) / 60) % 60, \
+ (t) % 60
#define PLAY_TIME_LENGTH 9
#undef LOCALEDIR
#endif
-//#define VIDEO_UTIL_PERSONAL_HEAD_STR "/opt/usr/media/PersonalPage"
#define VIDEO_UTIL_PERSONAL_HEAD_STR "/opt/storage/PersonalStorage"
#define MP_UTIL_VCONF_KEY_PERSONAL_TAG "memory/setting/personal"
#define VIDEO_LIST_VIEW_ICON_VIDEO "icon/T01_2_icon_video.png"
#define VIDEO_LIST_VIEW_NO_ITEM "icon/T01-2_video_noitem.png"
-#define VIDEO_SOFT_BACK_BUTTON "T01_icon_soft_back.png"
+#define VIDEO_SOFT_BACK_BUTTON "T01_icon_soft_back.png"
#define VIDEO_LIST_VIEW_PREVIEW_NO_ITEM "icon/T01-2_video_thumbnail_default.png"
#define VIDEO_LIST_VIEW_ICON_SELECT_ALL "icon/T02_icon_edit.png"
#define VIDEO_LIST_VIEW_ICON_PERSONAL_LOCK "icon/T01_2_video_lock_45x45.png"
#define SUBTITLE_SYNC_EDJ_GROUP "subtitle.sync"
#define PANEL_BUTTON_EDJ_GROUP "panel.button"
#define OPTION_EDJ_GROUP "option"
-//#define LISTVIEW_EDJ_GROUP "listview"
#define MULTIWIN_EDJ_GROUP "mw"
#define SETTING_EDJ_GROUP "setting"
#define LANDSCAPE_THUMB_EDJ_GROUP "landscape.thumb"
-#define PART_BUTTON_ICON "icon"
+#define PART_BUTTON_ICON "icon"
#define MAIN_SPEED_TEXT "main.speedbox.txt"
#define SUBTITLE_TEXT "subtitle.txt"
#define SIGNAL_CONTROL_NORMAL_FF_BUTTON_UP "signal.control.normal.ff.button.up"
#define SIGNAL_CONTROL_NORMAL_REW_BUTTON_DOWN "signal.control.normal.rew.button.down"
#define SIGNAL_CONTROL_NORMAL_REW_BUTTON_UP "signal.control.normal.rew.button.up"
-//#define SIGNAL_CONTROL_NORMAL_FF_STEP "signal.control.normal.ff.button.step"
-//#define SIGNAL_CONTROL_NORMAL_REW_STEP "signal.control.normal.rew.button.step"
-//#define SIGNAL_CONTROL_NORMAL_FF_LANDSCAPE_STEP "signal.control.normal.ff.button.landscape.step"
-//#define SIGNAL_CONTROL_NORMAL_REW_LANDSCAPE_STEP "signal.control.normal.rew.button.landscape.step"
-//#define SIGNAL_CONTROL_TRIM_FF_STEP "signal.control.trim.ff.button.step"
-//#define SIGNAL_CONTROL_TRIM_REW_STEP "signal.control.trim.rew.button.step"
#define SIGNAL_PANEL_BUTTON_SA_DOWN "signal.panel.button.sa.down"
#define SIGNAL_PANEL_BUTTON_SA_UP "signal.panel.button.sa.up"
#define SIGNAL_SUBTITLE_TXT_SHOW "signal.subtitle.txt.show"
#define SIGNAL_SUBTITLE_TXT_HIDE "signal.subtitle.txt.hide"
-#define SIGNAL_SUBTITLE_LAYOUT_SHOW "signal.subtitle.layout.show"
-#define SIGNAL_SUBTITLE_LAYOUT_HIDE "signal.subtitle.layout.hide"
+#define SIGNAL_SUBTITLE_LAYOUT_SHOW "signal.subtitle.layout.show"
+#define SIGNAL_SUBTITLE_LAYOUT_HIDE "signal.subtitle.layout.hide"
#define SIGNAL_SUBTITLE_SIZE_SMALL "signal.subtitle.size.small"
#define SIGNAL_SUBTITLE_SIZE_MEDIUM "signal.subtitle.size.medium"
#define SIGNAL_LOCKSCREEN_HIDE "signal.lockscreen.hide"
-//#define SIGNAL_LISTVIEW_PORTRAIT_PREVIEW_SHOW "signal.listview.preview.show"
-//#define SIGNAL_LISTVIEW_PORTRAIT_PREVIEW_HIDE "signal.listview.preview.hide"
-
#define SIGNAL_LISTVIEW_SELECTION_INFO_SHOW "signal.main.listview.internal.selection.info.show"
#define SIGNAL_LISTVIEW_SELECTION_INFO_HIDE "signal.main.listview.internal.selection.info.hide"
#define DEFAULT_MW_WIDTH 496
#define DEFAULT_MW_HEIGHT 286
-#define VIDEO_ICON_WIDTH 70 //90 //168
-#define VIDEO_ICON_HEIGHT 45 //54 //124
+#define VIDEO_ICON_WIDTH 70
+#define VIDEO_ICON_HEIGHT 45
#define VIDEO_LIST_PROGRESSBAR_LENGTH 70
#define NUMBER_INFO_BAR_HEIGHT 57
#define VIDEO_POPUP_TITLE_H 72
-#define VIDEO_POPUP_1_ITEM_H 46 //112
-#define VIDEO_POPUP_2_ITEM_H 84 //135
+#define VIDEO_POPUP_1_ITEM_H 46
+#define VIDEO_POPUP_2_ITEM_H 84
-#define VIDEO_POPUP_MAX_HEIGHT 752-72 //728
-#define VIDEO_POPUP_MAX_HEIGHT_L 432-72 //392
+#define VIDEO_POPUP_MAX_HEIGHT 752-72
+#define VIDEO_POPUP_MAX_HEIGHT_L 432-72
#define VIDEO_POPUP_MIN_ITEMS 4
-#define VIDEO_POPUP_LIST_HEIGHT(count) (((VIDEO_POPUP_1_ITEM_H*count) > VIDEO_POPUP_MAX_HEIGHT) ? (VIDEO_POPUP_MAX_HEIGHT) : (VIDEO_POPUP_1_ITEM_H*count)) //(((112*count) > 728) ? (728) : (112*count))
-#define VIDEO_POPUP_LIST_HEIGHT_L(count) (((VIDEO_POPUP_1_ITEM_H*count-1) > VIDEO_POPUP_MAX_HEIGHT_L) ? (VIDEO_POPUP_MAX_HEIGHT_L) : (VIDEO_POPUP_1_ITEM_H*count-1))
+#define VIDEO_POPUP_LIST_HEIGHT(count) (((VIDEO_POPUP_1_ITEM_H*count) > VIDEO_POPUP_MAX_HEIGHT) ? (VIDEO_POPUP_MAX_HEIGHT) : (VIDEO_POPUP_1_ITEM_H*count)) //(((112*count) > 728) ? (728) : (112*count))
+#define VIDEO_POPUP_LIST_HEIGHT_L(count) (((VIDEO_POPUP_1_ITEM_H*count-1) > VIDEO_POPUP_MAX_HEIGHT_L) ? (VIDEO_POPUP_MAX_HEIGHT_L) : (VIDEO_POPUP_1_ITEM_H*count-1))
-#define VIDEO_POPUP_2_TEXT_HEIGHT(count) (((VIDEO_POPUP_2_ITEM_H*count-1) > VIDEO_POPUP_MAX_HEIGHT) ? (VIDEO_POPUP_MAX_HEIGHT) : (VIDEO_POPUP_2_ITEM_H*count-1))
-#define VIDEO_POPUP_2_TEXT_HEIGHT_L(count) (((VIDEO_POPUP_2_ITEM_H*count-1) > VIDEO_POPUP_MAX_HEIGHT_L) ? (VIDEO_POPUP_MAX_HEIGHT_L) : (VIDEO_POPUP_2_ITEM_H*count-1))
+#define VIDEO_POPUP_2_TEXT_HEIGHT(count) (((VIDEO_POPUP_2_ITEM_H*count-1) > VIDEO_POPUP_MAX_HEIGHT) ? (VIDEO_POPUP_MAX_HEIGHT) : (VIDEO_POPUP_2_ITEM_H*count-1))
+#define VIDEO_POPUP_2_TEXT_HEIGHT_L(count) (((VIDEO_POPUP_2_ITEM_H*count-1) > VIDEO_POPUP_MAX_HEIGHT_L) ? (VIDEO_POPUP_MAX_HEIGHT_L) : (VIDEO_POPUP_2_ITEM_H*count-1))
-#define VIDEO_POPUP_ITEM_W 120 //409 //614
-#define VIDEO_POPUP_ITEM_LADSCAPE_W 480 //555 //832
+#define VIDEO_POPUP_ITEM_W 120
+#define VIDEO_POPUP_ITEM_LADSCAPE_W 480
-#define VIDEO_POPUP_DETAIL_ITEM_W 367 //550
+#define VIDEO_POPUP_DETAIL_ITEM_W 367
#define VIDEO_FILE_ENTRY_LEN_MAX 255
#define VIDEO_FILE_SEARCH_CHAR_LEN_MAX 50
#define VIDEO_DETAIL_VALUE_GPS_DEFAULT -200.0
-#endif //_VIDEO_VALUE_DEFINE_
-
+#endif //_VIDEO_VALUE_DEFINE_
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 __VIDEO_PLAYER__
#define EXPORT_API __attribute__((__visibility__("default")))
#endif
-#endif //__VIDEO_PLAYER__
+#endif //__VIDEO_PLAYER__
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_VIEW_MGR_
#include "mp-video-type-define.h"
-void* mp_library_mgr_init(void);
+void *mp_library_mgr_init(void);
void mp_library_mgr_destroy(void *pUserData);
void mp_library_mgr_set_value(void);
void mp_library_mgr_init_value(void);
-#endif //_VIDEO_VIEW_MGR_
+#endif //_VIDEO_VIEW_MGR_
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_PLAYER_DETAIL_VIEW_
#define _VIDEO_PLAYER_DETAIL_VIEW_
-typedef struct _VideoDetailInfo{
+typedef struct _VideoDetailInfo {
char *szTitle;
char *szSize;
char *szFormat;
- //char *szDate;
char *szResolution;
char *szLastModifiedTime;
char *szLocation;
- //char *szLatitude;
- //char *szLongitude;
-}stDetailInfo;
+} stDetailInfo;
-typedef void(*mpDetailViewCbFunc)(void);
+typedef void (*mpDetailViewCbFunc) (void);
-void mp_detail_view_free_detail_info(stDetailInfo *pDetailInfo);
-//bool mp_detail_view_popup_show(void *pUserData, mpDetailCtrlCbFunc pDetailCtrlCb, stDetailInfo *pDetailInfo);
-void mp_detail_view_push(void* pNaviFrame, bool IsFolder, const char *pMediaId, stDetailInfo *pDetailInfo);
+void mp_detail_view_free_detail_info(stDetailInfo * pDetailInfo);
+void mp_detail_view_push(void *pNaviFrame, bool IsFolder,
+ const char *pMediaId, stDetailInfo * pDetailInfo);
void mp_detail_view_delete_handle(void);
-bool mp_detail_view_get_video_detail_info(int nVideoItemIndex, stDetailInfo **pDetailInfo);
-bool mp_detail_view_get_folder_detail_info(int nFolderItemIndex, stDetailInfo **pDetailInfo);
+bool mp_detail_view_get_video_detail_info(int nVideoItemIndex,
+ stDetailInfo ** pDetailInfo);
+bool mp_detail_view_get_folder_detail_info(int nFolderItemIndex,
+ stDetailInfo ** pDetailInfo);
void mp_detail_view_update(void);
-#endif // __MP_VIDEO_DETAIL_VIEW__
-
+#endif // __MP_VIDEO_DETAIL_VIEW__
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_LIST_FOLDER_SHARE_VIA_VIEW_
#include <stdbool.h>
#include "mp-video-type-define.h"
-typedef void (*ChangeListFolderShareViewCbFunc)(void);
+typedef void (*ChangeListFolderShareViewCbFunc) (void);
-void mp_folder_share_view_push(void* pNaviFrame, ChangeListFolderShareViewCbFunc pChangeViewCb, MpVideoListTabType eTabType);
+void mp_folder_share_view_push(void *pNaviFrame,
+ ChangeListFolderShareViewCbFunc
+ pChangeViewCb, MpVideoListTabType eTabType);
void mp_folder_share_view_pop(void);
void mp_folder_share_view_change_language(void);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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_VIDEO_LIST_PERSONAL_CTRL_
#define _MP_VIDEO_LIST_PERSONAL_CTRL_
-typedef void (*PersonalCtrlCbFunc)(void);
+typedef void (*PersonalCtrlCbFunc) (void);
-bool mp_personal_ctrl_show(bool *pCheckedItemsEditList, int pCheckedItemsEditListSize, int nViewStyle, bool bFolderMove, PersonalCtrlCbFunc pPersonalCtrlCb, void* pUserData);
-
-#endif // _MP_VIDEO_LIST_SORT_CTRL_
-
+bool mp_personal_ctrl_show(bool * pCheckedItemsEditList,
+ int pCheckedItemsEditListSize, int nViewStyle,
+ bool bFolderMove,
+ PersonalCtrlCbFunc pPersonalCtrlCb,
+ void *pUserData);
+#endif // _MP_VIDEO_LIST_SORT_CTRL_
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_LIST_PERSONAL_VIEW_
#include "mp-video-type-define.h"
-typedef void (*ChangePersonalViewCbFunc)(MpListUpdateType eUpdateType);
+typedef void (*ChangePersonalViewCbFunc) (MpListUpdateType eUpdateType);
/*nViewStyle: 0->add to personal, 1->Remove from personal */
-void mp_personal_view_push(void* pNaviFrame, ChangePersonalViewCbFunc pChangeViewCb, char *pFolderPath, int nViewStyle);
+void mp_personal_view_push(void *pNaviFrame,
+ ChangePersonalViewCbFunc pChangeViewCb,
+ char *pFolderPath, int nViewStyle);
void mp_personal_view_pop(void);
bool mp_personal_view_is_top_view(void);
void mp_personal_view_update(void);
#endif
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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_VIDEO_LIST_REMOVE_CTRL_
#define _MP_VIDEO_LIST_REMOVE_CTRL_
-typedef void (*ListRemoveCtrlCbFunc)(void);
+typedef void (*ListRemoveCtrlCbFunc) (void);
-bool mp_remove_ctrl_show(bool *pCheckedItemsEditList, int pCheckedItemsEditListSize, ListRemoveCtrlCbFunc pListRemoveCtrlCb, bool bFolderDel, void* pUserData);
-
-#endif // _MP_VIDEO_LIST_SORT_CTRL_
-
+bool mp_remove_ctrl_show(bool * pCheckedItemsEditList,
+ int pCheckedItemsEditListSize,
+ ListRemoveCtrlCbFunc pListRemoveCtrlCb,
+ bool bFolderDel, void *pUserData);
+#endif // _MP_VIDEO_LIST_SORT_CTRL_
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_LIST_REMOVE_VIEW_
#include "mp-video-type-define.h"
-typedef void (*ChangeListRemoveViewCbFunc)(void);
-typedef void (*ListRemoveViewCbFunc)(MpListUpdateType eUpdateType);
+typedef void (*ChangeListRemoveViewCbFunc) (void);
+typedef void (*ListRemoveViewCbFunc) (MpListUpdateType eUpdateType);
-void mp_remove_view_push(void* pNaviFrame, ListRemoveViewCbFunc pUpdateViewCb, ChangeListRemoveViewCbFunc pChangeViewCb, char *pFolderPath, MpVideoListTabType eTabType);
+void mp_remove_view_push(void *pNaviFrame,
+ ListRemoveViewCbFunc pUpdateViewCb,
+ ChangeListRemoveViewCbFunc pChangeViewCb,
+ char *pFolderPath, MpVideoListTabType eTabType);
void mp_remove_view_pop(void);
bool mp_remove_view_is_top_view(void);
void mp_remove_view_change_language(void);
+int __mp_remove_folder_view_get_folder_count();
#endif
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_LIST_SHARE_VIA_VIEW_
#include <stdbool.h>
#include "mp-video-type-define.h"
-typedef void (*ChangeListShareViewCbFunc)(void);
+typedef void (*ChangeListShareViewCbFunc) (void);
-void mp_share_view_push(void* pNaviFrame, ChangeListShareViewCbFunc pChangeViewCb, char *pFolderPath, MpVideoListTabType eTabType);
+void mp_share_view_push(void *pNaviFrame,
+ ChangeListShareViewCbFunc pChangeViewCb,
+ char *pFolderPath, MpVideoListTabType eTabType);
void mp_share_view_pop(void);
bool mp_share_view_is_top_view(void);
void mp_share_view_change_language(void);
+void vp_share_view_update_share_panel(void);
#endif
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_LIST_VIEW_COMMON_
#include "mp-video-type-define.h"
-typedef void (*UpdateListItemsCbFunc)(MpListUpdateType eUpdateType);
+typedef void (*UpdateListItemsCbFunc) (MpListUpdateType eUpdateType);
-typedef struct
-{
+typedef struct {
void *pNaviFrameHandle;
void *pNaviFrameItem;
- void *pVideosGenlist; // DON'T CHANGE GENLIST HANDLE!!!
+ void *pVideosGenlist; // DON'T CHANGE GENLIST HANDLE!!!
Ecore_Timer *pDbUpdateTimer; //db Update
Evas_Smart_Cb pGenlistItemtRealizeCb;
Evas_Smart_Cb pGenlistItemtPressCb;
Evas_Smart_Cb pGenlistItemtLongPressCb;
-}st_VideoListViewMainViewHandle;
+} st_VideoListViewMainViewHandle;
-typedef struct
-{
- Evas_Object *pBox; // DON'T CHANGE BOX !!!
- Evas_Object *pToolBar; // DON'T CHANGE TOOLBAR !!!
+typedef struct {
+ Evas_Object *pBox; // DON'T CHANGE BOX !!!
+ Evas_Object *pToolBar; // DON'T CHANGE TOOLBAR !!!
////////////////////////////////////////////////////////////
// personal tab
Evas_Object *gesture;
int zoom_level;
-}st_VideoListViewMainViewWidget;
+} st_VideoListViewMainViewWidget;
void mp_list_common_set_callabcks(void *viewHandle,
- Evas_Smart_Cb pGenlistItemtLanguageChangedCb,
- Evas_Smart_Cb pGenlistItemtRealizeCb,
- Evas_Smart_Cb pGenlistItemtPressCb,
- Evas_Smart_Cb pGenlistItemtLongPressCb);
+ Evas_Smart_Cb
+ pGenlistItemtLanguageChangedCb,
+ Evas_Smart_Cb pGenlistItemtRealizeCb,
+ Evas_Smart_Cb pGenlistItemtPressCb,
+ Evas_Smart_Cb pGenlistItemtLongPressCb);
void mp_list_common_unset_callabcks(void *viewHandle);
void mp_folder_view_set_is_item_view(bool isSelected);
#endif
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_PLAYER_FOLDER_LIST_VIEW_
#define _VIDEO_PLAYER_FOLDER_LIST_VIEW_
#include "mp-video-type-define.h"
void mp_folder_view_destroy(void);
-void mp_folder_view_arrange_folder_list(void* pMainViewHandle, void* pMainViewWidget, MpListUpdateType eUpdateType, UpdateListItemsCbFunc pUpdateVideoListUserCb);
+void mp_folder_view_arrange_folder_list(void *pMainViewHandle,
+ void *pMainViewWidget,
+ MpListUpdateType eUpdateType,
+ UpdateListItemsCbFunc
+ pUpdateVideoListUserCb);
void mp_folder_view_update_video_items(void);
void mp_folder_view_change_language(void);
#endif
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_ITEM_VIEW_OF_FOLDER_
#define _VIDEO_ITEM_VIEW_OF_FOLDER_
#include "mp-video-list-view-common.h"
#include "mp-video-type-define.h"
-void mp_folder_item_view_push(void* pNaviFrame, int folder_index, UpdateListItemsCbFunc pChangeViewCb);
+void mp_folder_item_view_push(void *pNaviFrame, int folder_index,
+ UpdateListItemsCbFunc pChangeViewCb);
bool mp_folder_item_view_is_current_view();
void mp_folder_item_view_check_more_button_of_toolbar(void);
void mp_folder_item_view_change_language(void);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_LIST_VIEW_
#include "mp-video-type-define.h"
-void mp_list_view_push(void* pNaviFrame);
+void mp_list_view_push(void *pNaviFrame);
void mp_list_view_destroy(void);
void mp_list_view_update_widget(void);
void mp_list_view_update_widget_resume(void);
void mp_list_view_rotate_view(MpListUpdateType eUpdateType);
void mp_list_view_update_count_layout();
void mp_list_view_update_base_layout();
-void mp_list_view_search_item_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo);
+void mp_list_view_search_item_cb(void *pUserData, Evas_Object * pObject,
+ void *pEventInfo);
#endif
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_LIST_VIEW_NORMAL_
#include "mp-video-type-define.h"
-bool mp_normal_view_arrange_list_item(void* pMainViewHandle, void* pMainViewWidget, MpListUpdateType eUpdateType, UpdateListItemsCbFunc pUpdateVideoListUserCb);
+bool mp_normal_view_arrange_list_item(void *pMainViewHandle,
+ void *pMainViewWidget,
+ MpListUpdateType eUpdateType,
+ UpdateListItemsCbFunc
+ pUpdateVideoListUserCb);
int mp_normal_view_get_selected_video_item_index(void);
void mp_normal_view_update_video_items(int nVideoItemIndex);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_LIST_VIEW_SELECT_H_
#include <stdbool.h>
#include "mp-video-type-define.h"
-typedef enum
-{
- SELECT_TYPE_UNKNOW = 0,
- SELECT_TYPE_DETAIL,
- SELECT_TYPE_RENAME,
-}SelectType;
+typedef enum {
+ SELECT_TYPE_UNKNOW = 0,
+ SELECT_TYPE_DETAIL,
+ SELECT_TYPE_RENAME,
+} SelectType;
-typedef void (*ChangeSelectViewCbFunc)(MpListUpdateType eUpdateType);
+typedef void (*ChangeSelectViewCbFunc) (MpListUpdateType eUpdateType);
-void mp_select_view_push(void* pNaviFrame, void* pNaviItem, ChangeSelectViewCbFunc pChangeViewCb, char *pFolderUrl, SelectType eSelType, MpVideoListTabType eTabType);
+void mp_select_view_push(void *pNaviFrame, void *pNaviItem,
+ ChangeSelectViewCbFunc pChangeViewCb,
+ char *pFolderUrl, SelectType eSelType,
+ MpVideoListTabType eTabType);
void mp_select_view_pop(void);
void mp_select_view_change_language(void);
-bool mp_select_view_arrange_video_list(void* pGenlist, bool bNeedSvc);
+bool mp_select_view_arrange_video_list(void *pGenlist, bool bNeedSvc);
#endif
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_LIST_VIEW_THUMBNAIL_
#include "mp-video-list-view-common.h"
-bool mp_thumbnail_view_arrange_list_item(void* pMainViewHandle, void* pMainViewWidget, MpListUpdateType eUpdateType, UpdateListItemsCbFunc pUpdateVideoListUserCb);
+bool mp_thumbnail_view_arrange_list_item(void *pMainViewHandle,
+ void *pMainViewWidget,
+ MpListUpdateType eUpdateType,
+ UpdateListItemsCbFunc
+ pUpdateVideoListUserCb);
int mp_thumbnail_view_get_selected_video_item_index(void);
void mp_thumbnail_view_update_genlist_item(int nVideoItemIndex);
void mp_thumbnail_view_update_video_list(void);
int mp_thumbnail_view_thumbnail_to_genlist_index(int nVideoItemIndex);
-int _grid_view_zoom_in(void *data, Evas_Object *view);
-int _grid_view_zoom_out(void *data, Evas_Object *view);
+int _grid_view_zoom_in(void *data, Evas_Object * view);
+int _grid_view_zoom_out(void *data, Evas_Object * view);
void mp_thumbnail_view_change_language(void);
void mp_thumbnail_view_start_to_render(char *pVideoId);
void mp_thumbnail_view_free_wall_handle_list(void);
-void mp_thumbnail_view_start_video_wall(bool *bSuccess);
+void mp_thumbnail_view_start_video_wall(bool * bSuccess);
void mp_thumbnail_view_pause_video_wall(void);
void mp_thumbnail_view_destroy(void);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_PLAYER_SEARCH_VIEW_
#define _VIDEO_PLAYER_SEARCH_VIEW_
#include "mp-video-list-view-folder.h"
-typedef void (*ListViewUpdateListItemCbFunc)(void);
-typedef void (*ViewUpdateListItemCbFunc)(MpListUpdateType eUpdateType);
+typedef void (*ListViewUpdateListItemCbFunc) (void);
+typedef void (*ViewUpdateListItemCbFunc) (MpListUpdateType eUpdateType);
-void mp_search_view_push(void* pNaviFrame, char *pFolderPath);
-void mp_search_view_register_update_list_func(ViewUpdateListItemCbFunc pUpdateViewCb, ListViewUpdateListItemCbFunc pChangeViewCb);
+void mp_search_view_push(void *pNaviFrame, char *pFolderPath);
+void mp_search_view_register_update_list_func(ViewUpdateListItemCbFunc
+ pUpdateViewCb,
+ ListViewUpdateListItemCbFunc
+ pChangeViewCb);
void mp_search_view_change_language(void);
void mp_search_view_update_played_item(int nIndex);
-char* mp_search_view_search_markup_keyword(char *szOriginStr, char *szSearchWord, bool *bResult);
+char *mp_search_view_search_markup_keyword(char *szOriginStr,
+ char *szSearchWord,
+ bool * bResult);
void mp_search_view_update_genlist();
bool mp_search_view_get_active_view();
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEOS_VIEW_MGR_
#ifdef _cplusplus
-extern "C"
-{
+extern "C" {
#endif
-const Evas_Object* mp_mgr_create_main_window( const char *pStrName );
-void mp_mgr_restart_main_window();
-const Evas_Object *mp_mgr_get_main_window();
-const Evas_Object *mp_mgr_get_conformant();
-const Evas_Object *mp_mgr_get_main_layout();
+ const Evas_Object *mp_mgr_create_main_window(const char *pStrName);
+ void mp_mgr_restart_main_window();
+ const Evas_Object *mp_mgr_get_main_window();
+ const Evas_Object *mp_mgr_get_conformant();
+ const Evas_Object *mp_mgr_get_main_layout();
-Eina_Bool mp_mgr_is_landscape();
+ Eina_Bool mp_mgr_is_landscape();
-const Evas_Object* mp_mgr_get_library_naviframe();
-const Evas_Object* mp_mgr_get_current_inner_naviframe();
+ const Evas_Object *mp_mgr_get_library_naviframe();
+ const Evas_Object *mp_mgr_get_current_inner_naviframe();
-const Evas_Object* mp_mgr_get_library_parent();
+ const Evas_Object *mp_mgr_get_library_parent();
#ifdef _cplusplus
}
#endif
-
-
-#endif // _VIDEOS_VIEW_MGR_
-
+#endif // _VIDEOS_VIEW_MGR_
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
void mp_external_service_share_panel(const char *pUrl);
-#endif // _MP_EXTERNAL_UG_
+#endif // _MP_EXTERNAL_UG_
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_FOOTER_TOOLBAR_
#define _VIDEO_FOOTER_TOOLBAR_
-typedef enum
-{
- FOOTER_TAB_TYPE_PERSONAL = 0,
+typedef enum {
+ FOOTER_TAB_TYPE_PERSONAL = 0,
FOOTER_TAB_TYPE_DOWNLOAD,
FOOTER_LIST_ITEM_TYPE_MAX,
-}MpFooterLibraryMainListTabType;
-
-
-typedef struct
-{
- void* DownloadCb;
- void* SearchCb;
- void* ShareViaCb;
- void* DeleteCb;
- void* ViewAsCb;
- void* AutoPlayCb;
- void* SortItemCb;
- void* RenameCb;
- void* DetailsCb;
- void* SignInCb;
+} MpFooterLibraryMainListTabType;
+
+
+typedef struct {
+ void *DownloadCb;
+ void *SearchCb;
+ void *ShareViaCb;
+ void *DeleteCb;
+ void *ViewAsCb;
+ void *AutoPlayCb;
+ void *SortItemCb;
+ void *RenameCb;
+ void *DetailsCb;
+ void *SignInCb;
#ifdef ENABLE_PRIVATE_MODE
- void* AddToPersonalCB;
- void* RemoveFromPersonalCB;
+ void *AddToPersonalCB;
+ void *RemoveFromPersonalCB;
#endif
-}st_RegisteCbFunc;
+} st_RegisteCbFunc;
-void mp_ft_ctrl_create(void* pNaviFrameHandle, void* pNaviFrameItem, MpFooterLibraryMainListTabType nFooterListTabType, st_RegisteCbFunc* pRegisteCbFunc);
+void mp_ft_ctrl_create(void *pNaviFrameHandle, void *pNaviFrameItem,
+ MpFooterLibraryMainListTabType nFooterListTabType,
+ st_RegisteCbFunc * pRegisteCbFunc);
void mp_ft_ctrl_destroy(void);
void mp_ft_ctrl_hide_more_popup(void);
-void mp_ft_ctrl_create_center_button(void* pUserData, void* pToolbarCenterButtonCb);
-void mp_ft_ctrl_create_center_toolbar(void *pParent, void* pToolbarCenterButtonCb);
+void mp_ft_ctrl_create_center_button(void *pUserData,
+ void *pToolbarCenterButtonCb);
+void mp_ft_ctrl_create_center_toolbar(void *pParent,
+ void *pToolbarCenterButtonCb);
void mp_ft_ctrl_delete_center_button(void);
void mp_ft_ctrl_disable(void);
void mp_ft_ctrl_delete_center_toolbar();
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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_UTIL_WIDGET_CTRL__
#define __MP_UTIL_WIDGET_CTRL__
#include <Ecore_Evas.h>
#include <Elementary.h>
-typedef enum
-{
+typedef enum {
VIDEOS_POPUP_NONE = 0x00,
VIDEOS_POPUP_114,
VIDEOS_POPUP_141,
VIDEOS_POPUP_MAX
-}euPopUpStyle;
+} euPopUpStyle;
-void mp_widget_ctrl_enable_navi_handle_focus(Evas_Object *pNaviHandle);
-void mp_widget_ctrl_disable_navi_handle_focus_except_item(Evas_Object *pNaviHandle, Elm_Object_Item *pCurentNaviItem);
-void mp_widget_ctrl_set_popup_min_size(Evas_Object *pBox, int nListCount, euPopUpStyle eStyle);
-void mp_widget_ctrl_navi_item_layout_focus_out(Evas_Object *pFocusLayout);
-void mp_widget_ctrl_navi_item_layout_focus_in(Evas_Object *pFocusLayout);
-Evas_Object* mp_widget_ctrl_create_navi_btn(Evas_Object *pParent, const char *pIconPath, Evas_Smart_Cb pFunc, void *pUserData);
+void mp_widget_ctrl_enable_navi_handle_focus(Evas_Object * pNaviHandle);
+void mp_widget_ctrl_disable_navi_handle_focus_except_item(Evas_Object *
+ pNaviHandle,
+ Elm_Object_Item *
+ pCurentNaviItem);
+void mp_widget_ctrl_set_popup_min_size(Evas_Object * pBox, int nListCount,
+ euPopUpStyle eStyle);
+void mp_widget_ctrl_navi_item_layout_focus_out(Evas_Object * pFocusLayout);
+void mp_widget_ctrl_navi_item_layout_focus_in(Evas_Object * pFocusLayout);
+Evas_Object *mp_widget_ctrl_create_navi_btn(Evas_Object * pParent,
+ const char *pIconPath,
+ Evas_Smart_Cb pFunc,
+ void *pUserData);
-Evas_Object* mp_widget_ctrl_create_navi_left_btn(Evas_Object *pParent, Elm_Object_Item *pNaviItem,
- const char *pIconPath, Evas_Smart_Cb pFunc, void *pUserData);
+Evas_Object *mp_widget_ctrl_create_navi_left_btn(Evas_Object * pParent,
+ Elm_Object_Item *
+ pNaviItem,
+ const char *pIconPath,
+ Evas_Smart_Cb pFunc,
+ void *pUserData);
-Evas_Object* mp_widget_ctrl_create_navi_right_btn(Evas_Object *pParent, Elm_Object_Item *pNaviItem,
- const char *pIconPath, Evas_Smart_Cb pFunc, void *pUserData);
+Evas_Object *mp_widget_ctrl_create_navi_right_btn(Evas_Object * pParent,
+ Elm_Object_Item *
+ pNaviItem,
+ const char *pIconPath,
+ Evas_Smart_Cb pFunc,
+ void *pUserData);
-bool mp_widget_ctrl_create_select_all_layout(Evas_Object *pParent, Evas_Smart_Cb pChangeFunc,
- Evas_Object_Event_Cb pMouseDownFunc, void *pUserData, Evas_Object **pCheckBox, Evas_Object **pSelectLayout);
+bool mp_widget_ctrl_create_select_all_layout(Evas_Object * pParent,
+ Evas_Smart_Cb pChangeFunc,
+ Evas_Object_Event_Cb
+ pMouseDownFunc,
+ void *pUserData,
+ Evas_Object ** pCheckBox,
+ Evas_Object ** pSelectLayout);
-Evas_Object * mp_widget_ctrl_create_progressbar(Evas_Object *pParent, double dRadio);
+Evas_Object *mp_widget_ctrl_create_progressbar(Evas_Object * pParent,
+ double dRadio);
#endif
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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_VIDEO_LIST_AUTO_PLAY_CTRL_
#define _MP_VIDEO_LIST_AUTO_PLAY_CTRL_
-typedef enum
-{
- MP_LIST_AUTO_PLAY_NONE = 0,
+typedef enum {
+ MP_LIST_AUTO_PLAY_NONE = 0,
MP_LIST_AUTO_PLAY_ON,
MP_LIST_AUTO_PLAY_OFF,
MP_LIST_AUTO_PLAY_MAX,
-}MpListAutoPlaySelect;
+} MpListAutoPlaySelect;
-typedef void(*ListViewAsCtrlCbFunc)(void);
+typedef void (*ListViewAsCtrlCbFunc) (void);
bool mp_auto_play_ctrl_show();
int mp_auto_play_ctrl_get_type(void);
-#endif // _MP_VIDEO_LIST_AUTO_PLAY_CTRL_
+#endif // _MP_VIDEO_LIST_AUTO_PLAY_CTRL_
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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_VIDEO_LIST_OPTION_CTRL_
#define _MP_VIDEO_LIST_OPTION_CTRL_
-typedef enum
-{
- MP_LIST_OPTION_NONE = 0,
+typedef enum {
+ MP_LIST_OPTION_NONE = 0,
MP_LIST_OPTION_SHARE_VIA_ITEM,
MP_LIST_OPTION_ADD_HOME_ITEM,
MP_LIST_OPTION_RENAME_ITEM,
MP_LIST_OPTION_DELETE_ITEM,
MP_LIST_OPTION_DOWNLOAD_ITEM,
MP_LIST_OPTION_MAX,
-}MpListOptionType;
+} MpListOptionType;
-typedef enum
-{
- MP_LIST_OPTION_DOWNLOAD_NONE = 0,
+typedef enum {
+ MP_LIST_OPTION_DOWNLOAD_NONE = 0,
MP_LIST_OPTION_CLOUD_DOWNLOAD_ITEM,
MP_LIST_OPTION_ASF_DOWNLOAD_ITEM,
MP_LIST_OPTION_DOWNLOAD_OPTION_MAX,
-}MpDownloadType;
+} MpDownloadType;
-typedef struct
-{
- void* ShareViaItemCb;
- void* AddToHomeItemCb;
- void* DeleteItemCb;
- void* DownloadCb; //CLOUD, ALLSHARE
-}st_RegisteOptionCbFunc;
+typedef struct {
+ void *ShareViaItemCb;
+ void *AddToHomeItemCb;
+ void *DeleteItemCb;
+ void *DownloadCb; //CLOUD, ALLSHARE
+} st_RegisteOptionCbFunc;
-typedef void (* MpListOptionCbFunc)(void *pUserData);
+typedef void (*MpListOptionCbFunc) (void *pUserData);
-bool mp_option_ctrl_show(void *pNaviHandle, const char *title, int nVideoIndex,
- st_RegisteOptionCbFunc *pCallbackFunc, MpListOptionCbFunc pCloseFun, void*userData, MpDownloadType euType);
+bool mp_option_ctrl_show(void *pNaviHandle, const char *title,
+ int nVideoIndex,
+ st_RegisteOptionCbFunc * pCallbackFunc,
+ MpListOptionCbFunc pCloseFun, void *userData,
+ MpDownloadType euType);
void mp_option_ctrl_change_language(void);
void mp_option_ctrl_delete_handle(void);
void *mp_option_ctrl_get_handle(void);
-#endif // _MP_VIDEO_LIST_OPTION_CTRL_
+#endif // _MP_VIDEO_LIST_OPTION_CTRL_
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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_VIDEO_LIST_SORT_CTRL_
#define _MP_VIDEO_LIST_SORT_CTRL_
-typedef enum
-{
- MP_LIST_SORT_BY_NONE = 0,
- //MP_LIST_SORT_BY_RECENTLY_VIEWED,
- MP_LIST_SORT_BY_RECENTLY_ADDED =2,
- MP_LIST_SORT_BY_NAME =3,
- //MP_LIST_SORT_BY_SIZE,
- //MP_LIST_SORT_BY_TYPE,
+typedef enum {
+ MP_LIST_SORT_BY_NONE = 0,
+ MP_LIST_SORT_BY_RECENTLY_ADDED = 2,
+ MP_LIST_SORT_BY_NAME = 3,
MP_LIST_SORT_BY_MAX,
-}MpListSortType;
+} MpListSortType;
-typedef void (*ListSortCtrlCbFunc)(void);
+typedef void (*ListSortCtrlCbFunc) (void);
bool mp_sort_ctrl_show(ListSortCtrlCbFunc pListSortCtrlCb);
int mp_sort_ctrl_get_sort_state(void);
-#endif // _MP_VIDEO_LIST_SORT_CTRL_
-
+#endif // _MP_VIDEO_LIST_SORT_CTRL_
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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_VIDEO_LIST_VIEW_AS_CTRL_
#define _MP_VIDEO_LIST_VIEW_AS_CTRL_
-typedef enum
-{
- MP_LIST_VIEW_AS_NONE = 0,
+typedef enum {
+ MP_LIST_VIEW_AS_NONE = 0,
#ifdef VS_FEATURE_LIST_VIEW
MP_LIST_VIEW_AS_NORMAL_LIST,
#endif
#endif
MP_LIST_VIEW_AS_FOLDER_LIST,
MP_LIST_VIEW_AS_MAX,
-}MpListViewAsType;
+} MpListViewAsType;
-typedef void(*ListViewAsCtrlCbFunc)(void);
+typedef void (*ListViewAsCtrlCbFunc) (void);
-bool mp_view_as_ctrl_show(int tabType, ListViewAsCtrlCbFunc pListViewAsCtrlCb);
+bool mp_view_as_ctrl_show(int tabType,
+ ListViewAsCtrlCbFunc pListViewAsCtrlCb);
void mp_view_as_ctrl_hide(void);
void mp_view_as_ctrl_change_language(void);
int mp_view_as_ctrl_get_type(void);
-#endif // _MP_VIDEO_LIST_VIEW_AS_CTRL_
+#endif // _MP_VIDEO_LIST_VIEW_AS_CTRL_
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <Evas.h>
#ifdef _cplusplus
-extern "C"
-{
+extern "C" {
#endif
-Evas_Object* mp_create_nocontent_layout( const Evas_Object *pParent, const char *pText, const char *pHelpText );
+ Evas_Object *mp_create_nocontent_layout(const Evas_Object * pParent,
+ const char *pText,
+ const char *pHelpText);
#ifdef _cplusplus
}
#endif
-
-
-#endif // _MP_VIDEO_NOCONTENT_LAYOUT_
+#endif // _MP_VIDEO_NOCONTENT_LAYOUT_
- /*
-* 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.
-*
-*/
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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_VIDEO_RENAME_CTRL__
#define __MP_VIDEO_RENAME_CTRL__
-typedef void(*mpRenameCtrlCbFunc)(void);
+typedef void (*mpRenameCtrlCbFunc) (void);
-Evas_Object* mp_rename_ctrl_show(void *pNaviFrameHandlet, void *pUserData, mpRenameCtrlCbFunc pRenameCtrlCb, int nVideoItemIndex);
+Evas_Object *mp_rename_ctrl_show(void *pNaviFrameHandlet, void *pUserData,
+ mpRenameCtrlCbFunc pRenameCtrlCb,
+ int nVideoItemIndex);
void mp_rename_ctrl_delete_handle(void);
void mp_rename_ctrl_focus_out_cb(void);
bool mp_rename_ctrl_is_top_view();
void mp_rename_ctrl_set_focus();
-#endif // __MP_VIDEO_RENAME_CTRL__
-
-
+#endif // __MP_VIDEO_RENAME_CTRL__
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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_VIDEO_LIST_VIEW_CTRL_
#define _MP_VIDEO_LIST_VIEW_CTRL_
#include "mp-video-type-define.h"
-typedef enum
-{
- MP_LIST_VIEW_NONE = 0,
+typedef enum {
+ MP_LIST_VIEW_NONE = 0,
MP_LIST_VIEW_ALL,
MP_LIST_VIEW_PHONE,
MP_LIST_VIEW_CLOUD,
MP_LIST_VIEW_MAX,
-}MpListItemType;
+} MpListItemType;
-typedef void (*ListViewCtrlCbFunc)(MpListUpdateType eUpdateType);
+typedef void (*ListViewCtrlCbFunc) (MpListUpdateType eUpdateType);
bool mp_view_ctrl_show(ListViewCtrlCbFunc pListViewCtrlCb);
void mp_view_ctrl_hide(void);
void mp_view_ctrl_change_language(void);
-int mp_view_ctrl_get_list_type(void);
-
-#endif // _MP_VIDEO_LIST_VIEW_CTRL_
+int mp_view_ctrl_get_list_type(void);
+#endif // _MP_VIDEO_LIST_VIEW_CTRL_
<privilege>http://tizen.org/privilege/appmanager.launch</privilege>
<privilege>http://tizen.org/privilege/content.write</privilege>
<privilege>http://tizen.org/privilege/display</privilege>
+ <privilege>http://tizen.org/privilege/internet</privilege>
</privileges>
</manifest>
Version: 1.0.40
Release: 1
Group: Applications
-License: Apache-2.0
+License: Flora-1.1
Source0: %{name}-%{version}.tar.gz
%if "%{?tizen_profile_name}" == "wearable" || "%{?tizen_profile_name}" == "tv"
%package -n org.tizen.video-player
Summary: video file video-player.
Group: Applications
-License: Apache-2.0
+License: Flora-1.1
%description -n org.tizen.video-player
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 _VIDEO_LOG_H_
#define LOG_TAG "VIDEO_PLAYER"
-#define VideoLogInfoWithTid(fmt,arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d %lu]" fmt "\n", __func__, __LINE__, syscall(__NR_gettid), ##arg)
-#define VideoLogInfo(fmt,arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
-#define VideoLogDebug(fmt,arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
-#define VideoLogWarning(fmt,arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
-#define VideoLogError( fmt,arg...) dlog_print(DLOG_ERROR, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
+#define VideoLogInfoWithTid(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d %lu]" fmt "\n", __func__, __LINE__, syscall(__NR_gettid), ##arg)
+#define VideoLogInfo(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
+#define VideoLogDebug(fmt, arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
+#define VideoLogWarning(fmt, arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
+#define VideoLogError(fmt, arg...) dlog_print(DLOG_ERROR, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
-#define VideoLogPerfS( fmt,arg...) dlog_print(DLOG_INFO, LOG_TAG, "\033[0;31m [PERF] ---> Start " fmt "\033[0m\n", ##arg)
-#define VideoLogPerfE( fmt,arg...) dlog_print(DLOG_INFO, LOG_TAG, "\033[0;31m [PERF] End <--- " fmt "\033[0m\n", ##arg)
+#define VideoLogPerfS(fmt, arg...) dlog_print(DLOG_INFO, LOG_TAG, "\033[0;31m [PERF] ---> Start " fmt "\033[0m\n", ##arg)
+#define VideoLogPerfE(fmt, arg...) dlog_print(DLOG_INFO, LOG_TAG, "\033[0;31m [PERF] End <--- " fmt "\033[0m\n", ##arg)
-#define VideoSecureLogInfoWithTid(fmt,arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s : %05d %lu]" fmt "\n", __func__, __LINE__, syscall(__NR_gettid), ##arg)
-#define VideoSecureLogDebug(fmt,arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
-#define VideoSecureLogInfo(fmt,arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
-#define VideoSecureLogError( fmt,arg...) dlog_print(DLOG_ERROR, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
-
-
-//#define video_info(fmt,arg...) printf( "[%s %s : %d] " fmt "\n",__FILE__, __FUNCTION__,__LINE__, ##arg)
-//#define video_debug(fmt,arg...) printf( "[%s %s : %d] " fmt "\n",__FILE__, __FUNCTION__,__LINE__, ##arg)
-//#define video_warning(fmt,arg...) printf( "[%s %s : %d] " fmt "\n",__FILE__, __FUNCTION__,__LINE__, ##arg)
-//#define video_error( fmt,arg...) printf( "[%s %s : %d] " fmt "\n", __FILE__,__FUNCTION__,__LINE__, ##arg)
-
+#define VideoSecureLogInfoWithTid(fmt, arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s : %05d %lu]" fmt "\n", __func__, __LINE__, syscall(__NR_gettid), ##arg)
+#define VideoSecureLogDebug(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
+#define VideoSecureLogInfo(fmt, arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
+#define VideoSecureLogError(fmt, arg...) dlog_print(DLOG_ERROR, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
#endif /*_MPVIDEO_LOG_H_*/
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
VIDEO_PLAY_ROTATE_90,
VIDEO_PLAY_ROTATE_180,
VIDEO_PLAY_ROTATE_270
-}video_play_rotate_t;
+} video_play_rotate_t;
typedef enum {
VIDEO_PLAY_MODE_NORMAL_VIEW = 0x00,
-}video_play_mode_t;
+} video_play_mode_t;
typedef enum {
VIDEO_PLAY_TYPE_OTHER = 0x00,
- VIDEO_PLAY_TYPE_STORE, //Currently, Don't support this type. if support this type, we need to sync code
+ VIDEO_PLAY_TYPE_STORE, //Currently, Don't support this type. if support this type, we need to sync code
VIDEO_PLAY_TYPE_LIST,
VIDEO_PLAY_TYPE_GALLERY,
VIDEO_PLAY_TYPE_MYFILE,
VIDEO_PLAY_TYPE_WEB,
VIDEO_PLAY_TYPE_MULTI_PATH,
VIDEO_PLAY_TYPE_PREVIEW
-}video_play_launching_type_t;
+} video_play_launching_type_t;
typedef enum {
VIDEO_PLAY_LIST_TYPE_ALL = 0x00,
VIDEO_PLAY_LIST_TYPE_FOLDER,
-}video_play_list_type_t;
+} video_play_list_type_t;
typedef enum {
VIDEO_PLAY_CB_TYPE_DESTORY,
VIDEO_PLAY_CB_TYPE_EVENT_KEY_DOWN,
VIDEO_PLAY_CB_TYPE_EVENT_KEY_UP
-}video_play_callback_type_t;
+} video_play_callback_type_t;
typedef enum {
VIDEO_PLAY_POPUP_SOUND_ALIVE = 0x00,
VIDEO_PLAY_POPUP_SUBTITLE_SYNC,
VIDEO_PLAY_POPUP_REPEAT_MODE,
VIDEO_PLAY_POPUP_AUDIO_TRACK
-}video_play_popup_mode_t;
+} video_play_popup_mode_t;
typedef enum {
VIDEO_SHARE_FILE_TRANSFER = 0x00,
VIDEO_SHARE_BLUETOOTH,
VIDEO_SHARE_FACEBOOK,
VIDEO_SHARE_YOUTUBE
-}video_share_mode_t;
+} video_share_mode_t;
typedef enum {
VIDEO_SA_NONE = 0x00,
VIDEO_SA_VOICE,
VIDEO_SA_MOVIE,
VIDEO_SA_7_1_CH
-}video_sound_alive_t;
+} video_sound_alive_t;
-typedef enum
-{
+typedef enum {
VIDEO_SOUND_PATH_NONE = 0x00,
VIDEO_SOUND_PATH_SPEAKER,
VIDEO_SOUND_PATH_EARJACK,
VIDEO_SOUND_PATH_MIRRORING,
VIDEO_SOUND_PATH_USB_AUDIO,
VIDEO_SOUND_PATH_MAX,
-}video_sound_path_t;
+} video_sound_path_t;
typedef enum {
VIDEO_PLAY_REPEAT_ONE,
VIDEO_PLAY_REPEAT_ALL,
VIDEO_PLAY_REPEAT_FOLDER
-}video_play_repeat_mode_t;
+} video_play_repeat_mode_t;
typedef enum {
VIDEO_PLAY_COLOR_TONE_NORMAL = 0x00,
VIDEO_PLAY_COLOR_TONE_WARM,
VIDEO_PLAY_COLOR_TONE_COLD,
-}video_play_color_tone_t;
+} video_play_color_tone_t;
typedef enum {
VIDEO_SORT_BY_NONE = 0,
VIDEO_SORT_BY_DATE_MOST_RECENT,
VIDEO_SORT_BY_OLDEST,
VIDEO_SORT_BY_MAX,
-}video_play_sort_type_t;
+} video_play_sort_type_t;
typedef enum {
VIDEO_EDIT_WEATHER_TAG_NONE = -1,
VIDEO_EDIT_WEATHER_TAG_RAINY_DAY,
VIDEO_EDIT_WEATHER_TAG_SNOWY_DAY,
VIDEO_EDIT_WEATHER_TAG_CLEAR_DAY,
-}video_play_edit_weather_tag_t;
+} video_play_edit_weather_tag_t;
typedef enum {
VIDEO_DISPLAY_LETTER_BOX = 0x00,
VIDEO_DISPLAY_ORIGIN,
VIDEO_DISPLAY_FULL,
VIDEO_DISPLAY_CROPPED_FULL
-}video_play_display_mode_t;
+} video_play_display_mode_t;
typedef enum {
VIDEO_SUBTITLE_SIZE_SMALL = 0x00,
VIDEO_SUBTITLE_SIZE_MEDIUM,
VIDEO_SUBTITLE_SIZE_LARGE,
-}video_play_subtitle_size_t;
+} video_play_subtitle_size_t;
typedef enum {
VIDEO_SUBTITLE_EDGE_NONE = 0x00,
VIDEO_SUBTITLE_EDGE_DEPRESSED,
VIDEO_SUBTITLE_EDGE_UNIFORM,
VIDEO_SUBTITLE_EDGE_DROP_SHADOW,
-}video_play_subtitle_edge_t;
+} video_play_subtitle_edge_t;
typedef enum {
VIDEO_SUBTITLE_FONT_DEFAULT = 0x00,
VIDEO_SUBTITLE_FONT_CHOCO_COOKY,
VIDEO_SUBTITLE_FONT_ROSEMARY,
VIDEO_SUBTITLE_FONT_COOL_JAZZ,
-}video_play_subtitle_font_t;
+} video_play_subtitle_font_t;
typedef enum {
VIDEO_SUBTITLE_COLOR_WHITE = 0x00,
VIDEO_SUBTITLE_COLOR_CYAN,
VIDEO_SUBTITLE_COLOR_CUSTOM,
VIDEO_SUBTITLE_COLOR_NONE
-}video_play_subtitle_color_t;
+} video_play_subtitle_color_t;
typedef enum {
VIDEO_SUBTITLE_ALIGNMENT_LEFT = 0x00,
VIDEO_SUBTITLE_ALIGNMENT_CENTER,
VIDEO_SUBTITLE_ALIGNMENT_RIGHT
-}video_play_subtitle_alignment_t;
-
+} video_play_subtitle_alignment_t;
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
#include <Elementary.h>
-//#include <Ecore_X.h>
#include "vp-play-type-define.h"
typedef void (*vp_play_view_realize_cb) (void *pUserData);
typedef void (*vp_play_view_destroy_cb) (void *pUserData);
-typedef Eina_Bool (*vp_play_view_event_key_down_cb) (void *pUserData, int nType, void *pEvent);
-typedef Eina_Bool (*vp_play_view_event_key_up_cb) (void *pUserData, int nType, void *pEvent);
+typedef Eina_Bool(*vp_play_view_event_key_down_cb) (void *pUserData,
+ int nType,
+ void *pEvent);
+typedef Eina_Bool(*vp_play_view_event_key_up_cb) (void *pUserData,
+ int nType, void *pEvent);
-play_view_handle vp_play_view_create(Evas_Object *pParent, Ecore_X_Window nParentXID, video_play_mode_t nMode, video_play_launching_type_t nLaunchingType);
+play_view_handle vp_play_view_create(Evas_Object * pParent,
+ Ecore_X_Window nParentXID,
+ video_play_mode_t nMode,
+ video_play_launching_type_t
+ nLaunchingType);
void vp_play_view_destroy(play_view_handle pViewHandle);
#ifdef _PERF_TEST_
void vp_play_view_reset(play_view_handle pViewHandle, int nMode);
bool vp_play_view_realize(play_view_handle pViewHandle);
bool vp_play_view_live_stream_realize(play_view_handle pViewHandle);
bool vp_play_view_unrealize(play_view_handle pViewHandle);
-bool vp_play_view_is_realize(play_view_handle pViewHandle, bool *bIsRealize);
-bool vp_play_view_set_user_data(play_view_handle pViewHandle, void *pUserData);
-bool vp_play_view_set_url(play_view_handle pViewHandle, const char *szMediaURL);
+bool vp_play_view_is_realize(play_view_handle pViewHandle,
+ bool * bIsRealize);
+bool vp_play_view_set_user_data(play_view_handle pViewHandle,
+ void *pUserData);
+bool vp_play_view_set_url(play_view_handle pViewHandle,
+ const char *szMediaURL);
bool vp_play_view_get_url(play_view_handle pViewHandle, char **szMediaURL);
-bool vp_play_view_get_visible_status(play_view_handle pViewHandle, bool *bVisible);
-bool vp_play_view_set_device_id(play_view_handle pViewHandle, const char *szDeviceID);
-bool vp_play_view_set_auto_play_setting(play_view_handle pViewHandle, const char *autoplay);
-bool vp_play_view_set_dmr_id(play_view_handle pViewHandle, const char *szDMRID);
-bool vp_play_view_set_media_title(play_view_handle pViewHandle, const char *szMediaTitle);
-bool vp_play_view_set_play_mode(play_view_handle pViewHandle, video_play_mode_t nMode);
-bool vp_play_view_set_start_position(play_view_handle pViewHandle, int nPosition);
-bool vp_play_view_set_rotate(play_view_handle pViewHandle, video_play_rotate_t nRotate);
-bool vp_play_view_get_popup_mode(play_view_handle pViewHandle, bool *bPopupMode);
-bool vp_play_view_set_relaunch_caller(play_view_handle pViewHandle, bool bRelaunch);
-bool vp_play_view_set_launching_mode(play_view_handle pViewHandle, video_play_launching_type_t nLaunchingType);
-bool vp_play_view_set_list_mode(play_view_handle pViewHandle, video_play_list_type_t nListType);
-bool vp_play_view_set_cookie(play_view_handle pViewHandle, const char *szCookie);
-bool vp_play_view_set_proxy(play_view_handle pViewHandle, const char *szProxy);
-bool vp_play_view_set_store_download_mode(play_view_handle pViewHandle, bool bStoreDownload);
-bool vp_play_view_set_stop_after_repeat_mode(play_view_handle pViewHandle, bool bStopAfterRepeat);
-bool vp_play_view_set_store_download_filesize(play_view_handle pViewHandle, double dStoreDL_FileSize);
-bool vp_play_view_set_store_order_info(play_view_handle pViewHandle, char *pStoreOrderId, char *pStoreServerId, char *pStoreAppId, char *pStoreMvId);
+bool vp_play_view_get_visible_status(play_view_handle pViewHandle,
+ bool * bVisible);
+bool vp_play_view_set_device_id(play_view_handle pViewHandle,
+ const char *szDeviceID);
+bool vp_play_view_set_auto_play_setting(play_view_handle pViewHandle,
+ const char *autoplay);
+bool vp_play_view_set_dmr_id(play_view_handle pViewHandle,
+ const char *szDMRID);
+bool vp_play_view_set_media_title(play_view_handle pViewHandle,
+ const char *szMediaTitle);
+bool vp_play_view_set_play_mode(play_view_handle pViewHandle,
+ video_play_mode_t nMode);
+bool vp_play_view_set_start_position(play_view_handle pViewHandle,
+ int nPosition);
+bool vp_play_view_set_rotate(play_view_handle pViewHandle,
+ video_play_rotate_t nRotate);
+bool vp_play_view_get_popup_mode(play_view_handle pViewHandle,
+ bool * bPopupMode);
+bool vp_play_view_set_relaunch_caller(play_view_handle pViewHandle,
+ bool bRelaunch);
+bool vp_play_view_set_launching_mode(play_view_handle pViewHandle,
+ video_play_launching_type_t
+ nLaunchingType);
+bool vp_play_view_set_list_mode(play_view_handle pViewHandle,
+ video_play_list_type_t nListType);
+bool vp_play_view_set_cookie(play_view_handle pViewHandle,
+ const char *szCookie);
+bool vp_play_view_set_proxy(play_view_handle pViewHandle,
+ const char *szProxy);
+bool vp_play_view_set_store_download_mode(play_view_handle pViewHandle,
+ bool bStoreDownload);
+bool vp_play_view_set_stop_after_repeat_mode(play_view_handle pViewHandle,
+ bool bStopAfterRepeat);
+bool vp_play_view_set_store_download_filesize(play_view_handle pViewHandle,
+ double dStoreDL_FileSize);
+bool vp_play_view_set_store_order_info(play_view_handle pViewHandle,
+ char *pStoreOrderId,
+ char *pStoreServerId,
+ char *pStoreAppId,
+ char *pStoreMvId);
-bool vp_play_view_add_multi_path(play_view_handle pViewHandle, const char *szURL, char *szTitle, char *szSubTitle, int nPosition, int nDuration, bool bIsSameAP);
+bool vp_play_view_add_multi_path(play_view_handle pViewHandle,
+ const char *szURL, char *szTitle,
+ char *szSubTitle, int nPosition,
+ int nDuration, bool bIsSameAP);
bool vp_play_view_update(play_view_handle pViewHandle);
-bool vp_play_view_set_callback(play_view_handle pViewHandle, video_play_callback_type_t nCbType, void *pFunc);
-bool vp_play_view_unset_callback(play_view_handle pViewHandle, video_play_callback_type_t nCbType);
+bool vp_play_view_set_callback(play_view_handle pViewHandle,
+ video_play_callback_type_t nCbType,
+ void *pFunc);
+bool vp_play_view_unset_callback(play_view_handle pViewHandle,
+ video_play_callback_type_t nCbType);
-Evas_Object* vp_play_view_get_main_window(play_view_handle pViewHandle);
-bool vp_play_view_change_style_minimode_to_fullmode(play_view_handle pViewHandle, video_play_launching_type_t nLaunchingType);
+Evas_Object *vp_play_view_get_main_window(play_view_handle pViewHandle);
+bool vp_play_view_change_style_minimode_to_fullmode(play_view_handle
+ pViewHandle,
+ video_play_launching_type_t
+ nLaunchingType);
+
+bool vp_play_view_reset_audio_only(play_view_handle * pPlayView);
+
+bool vp_play_view_handle_language_change(play_view_handle * pPlayViewHandle);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define BUTTON_NAVIFRAME_TITLE_BUTTON_BG_MIN_MAX_INC 63 63
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
group {
name: "colorplane";
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define GENGRID_PART_BG_COLOR_INC 0 0 0 0
#define GENGRID_PART_REORDER_BG_COLOR_INC 0 0 0 128
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define GENLIST_HEIGHT_MULTILINE_SUB 38
#define GENLIST_HEIGHT_2LINE_SUB 42
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
images
{
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
group {
name: "elm/layout/application/play_view";
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define NAVIFRAME_TITLE_BG_COLOR_INC 0 0 0 0
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
#define FONT_BOLD_TYPE "Tizen:style=Bold"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "custom/pv-custom-define.edc"
#include "custom/pv-custom-image.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
collections {
group {
name: "pv.gesture";
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
images
{
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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-defines.h"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define MINI_H 70
#define MINI_H_PORT 70
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define FUNCTION_BUTTON_MIN_MAX_VALUE 70 70
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
collections {
group {
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
#define FONT_BOLD_TYPE "Tizen:style=Bold"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-macro.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
#define SUBTITLE_TEXT_OFFSET 20
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
collections {
group {
name: "pv.tag.buddy";
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
#ifndef _TRIME_VIEW_NEW_FEATURE
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
#ifndef _TRIME_VIEW_NEW_FEATURE
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
collections {
group {
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
#define FONT_BOLD_TYPE "Tizen:style=Bold"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
#define FONT_BOLD_TYPE "Tizen:style=Bold"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "pv-image.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
#include <system_settings.h>
#include <runtime_info.h>
#include <network/wifi.h>
+#include <network/wifi-manager.h>
-typedef void (*KeyChangedCbFunc)(void *pNode, void* pUserData);
+typedef void (*KeyChangedCbFunc) (void *pNode, void *pUserData);
-bool vp_play_config_get_rotate_lock_status(bool *bLocked);
-bool vp_play_config_get_subtitle_show_key(bool *bShow);
+bool vp_play_config_get_rotate_lock_status(bool * bLocked);
+bool vp_play_config_get_subtitle_show_key(bool * bShow);
bool vp_play_config_set_subtitle_show_key(bool bShow);
bool vp_play_config_set_subtitle_font_name_key(const char *szFontName);
bool vp_play_config_get_subtitle_font_name_key(char **szFontName);
bool vp_play_config_set_subtitle_alignment_key(int nAlignment);
bool vp_play_config_get_subtitle_alignment_key(int *nAlignment);
bool vp_play_config_get_subtitle_font_color_hex_key(char **szColorHex);
-bool vp_play_config_set_subtitle_font_color_hex_key(const char *szColorHex);
+bool vp_play_config_set_subtitle_font_color_hex_key(const char
+ *szColorHex);
bool vp_play_config_set_subtitle_bg_color_hex_key(const char *szColorHex);
bool vp_play_config_get_subtitle_bg_color_hex_key(char **szColorHex);
-bool vp_play_config_set_subtitle_caption_win_color_hex_key(const char *szColorHex);
-bool vp_play_config_get_subtitle_caption_win_color_hex_key(char **szColorHex);
+bool vp_play_config_set_subtitle_caption_win_color_hex_key(const char
+ *szColorHex);
+bool vp_play_config_get_subtitle_caption_win_color_hex_key(char
+ **szColorHex);
bool vp_play_config_get_repeat_mode_key(int *nMode);
bool vp_play_config_set_repeat_mode_key(int nMode);
bool vp_play_config_set_screen_mode_key(int nMode);
bool vp_play_config_get_screen_mode_key(int *nMode);
-bool vp_play_config_get_capture_on_key(bool *bEnable);
+bool vp_play_config_get_capture_on_key(bool * bEnable);
bool vp_play_config_set_capture_on_key(bool bEnable);
-bool vp_play_config_get_tag_active_key(bool *bEnable);
+bool vp_play_config_get_tag_active_key(bool * bEnable);
bool vp_play_config_set_tag_active_key(bool bEnable);
-bool vp_play_config_get_tag_weather_key(bool *bEnable);
+bool vp_play_config_get_tag_weather_key(bool * bEnable);
bool vp_play_config_set_tag_weather_key(bool bEnable);
-bool vp_play_config_get_tag_location_key(bool *bEnable);
+bool vp_play_config_get_tag_location_key(bool * bEnable);
bool vp_play_config_set_tag_location_key(bool bEnable);
bool vp_play_config_get_tag_edit_weather_key(int *nWeather);
bool vp_play_config_set_tag_edit_weather_key(int nWeather);
bool vp_play_telephony_initialize(void *pUserData);
bool vp_play_telephony_deinitialize(void);
-bool vp_play_config_get_call_state(bool *bCallOn);
-bool vp_play_config_get_battery_charge_state(bool *bCharge);
-bool vp_play_config_get_wifi_direct_connect_status(bool *bConnect);
-bool vp_play_config_get_wifi_direct_active_status(bool *bConnect);
-bool vp_play_config_get_lcd_off_state(bool *bLCDOff);
+bool vp_play_config_get_call_state(bool * bCallOn);
+bool vp_play_config_get_battery_charge_state(bool * bCharge);
+bool vp_play_config_get_wifi_direct_connect_status(bool * bConnect);
+bool vp_play_config_get_wifi_direct_active_status(bool * bConnect);
+bool vp_play_config_get_lcd_off_state(bool * bLCDOff);
-bool vp_play_config_set_rotate_state_key_changed_cb(system_settings_changed_cb pFunc, void *pUserData);
-bool vp_play_config_set_lock_state_key_changed_cb(system_settings_changed_cb pFunc, void *pUserData);
+bool
+vp_play_config_set_rotate_state_key_changed_cb(system_settings_changed_cb
+ pFunc, void *pUserData);
+bool
+vp_play_config_set_lock_state_key_changed_cb(system_settings_changed_cb
+ pFunc, void *pUserData);
bool vp_play_config_ignore_rotate_state_key_changed_cb(void);
-bool vp_play_config_set_battery_charge_state_key_changed_cb(runtime_info_changed_cb pFunc, void *pUserData);
+bool
+vp_play_config_set_battery_charge_state_key_changed_cb
+(runtime_info_changed_cb pFunc, void *pUserData);
bool vp_play_config_ignore_battery_charge_state_key_changed_cb(void);
bool vp_play_wifi_initialize();
-bool vp_play_config_set_wifi_state_key_changed_cb(wifi_connection_state_changed_cb pFunc, void *pUserData);
+bool
+vp_play_config_set_wifi_state_key_changed_cb
+(wifi_connection_state_changed_cb pFunc, void *pUserData);
bool vp_play_config_ignore_wifi_state_key_changed_cb(void);
void vp_play_wifi_deinitialize();
-bool vp_play_config_get_allow_dock_connect_key(bool *bEnable);
-bool vp_play_config_get_extern_mode_key(bool *bEnable);
+bool vp_play_config_get_allow_dock_connect_key(bool * bEnable);
+bool vp_play_config_get_extern_mode_key(bool * bEnable);
bool vp_play_config_set_allow_dock_connect_key(bool bEnable);
bool vp_play_config_set_extern_mode_key(bool bEnable);
bool vp_play_config_set_multi_play_status(bool bMultiPlay);
-bool vp_play_config_get_multi_play_status(bool *bMultiPlay);
+bool vp_play_config_get_multi_play_status(bool * bMultiPlay);
bool vp_play_config_set_mirroring_warning_status(bool bMultiPlay);
-bool vp_play_config_get_mirroring_warning_status(bool *bMultiPlay);
+bool vp_play_config_get_mirroring_warning_status(bool * bMultiPlay);
bool vp_play_config_get_sound_alive_status(int *nStatus);
bool vp_play_config_set_sound_alive_status(int nStatus);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
void vp_play_preference_init();
bool vp_play_preference_set_multi_play_status(bool bMultiPlay);
-bool vp_play_preference_get_multi_play_status(bool *bMultiPlay);
+bool vp_play_preference_get_multi_play_status(bool * bMultiPlay);
bool vp_play_preference_set_mirroring_warning_status(bool bMultiPlay);
-bool vp_play_preference_get_mirroring_warning_status(bool *bWarning);
-bool vp_play_preference_get_subtitle_show_key(bool *bShow);
+bool vp_play_preference_get_mirroring_warning_status(bool * bWarning);
+bool vp_play_preference_get_subtitle_show_key(bool * bShow);
bool vp_play_preference_set_subtitle_show_key(bool bShow);
bool vp_play_preference_set_subtitle_font_name_key(const char *szFontName);
bool vp_play_preference_get_subtitle_font_name_key(char **szFontName);
bool vp_play_preference_get_subtitle_alignment_key(int *nAlignment);
bool vp_play_preference_set_subtitle_font_color_key(int nColor);
bool vp_play_preference_get_subtitle_font_color_key(int *nColor);
-bool vp_play_preference_set_subtitle_font_color_hex_key(const char *szColorHex);
+bool vp_play_preference_set_subtitle_font_color_hex_key(const char
+ *szColorHex);
bool vp_play_preference_get_subtitle_font_color_hex_key(char **szColorHex);
-bool vp_play_preference_set_subtitle_bg_color_hex_key(const char *szColorHex);
+bool vp_play_preference_set_subtitle_bg_color_hex_key(const char
+ *szColorHex);
bool vp_play_preference_get_subtitle_bg_color_hex_key(char **szColorHex);
-bool vp_play_preference_set_subtitle_caption_win_color_hex_key(const char *szColorHex);
-bool vp_play_preference_get_subtitle_caption_win_color_hex_key(char **szColorHex);
+bool vp_play_preference_set_subtitle_caption_win_color_hex_key(const char
+ *szColorHex);
+bool vp_play_preference_get_subtitle_caption_win_color_hex_key(char
+ **szColorHex);
bool vp_play_preference_get_subtitle_bg_color_key(int *nColor);
bool vp_play_preference_set_subtitle_bg_color_key(int nColor);
bool vp_play_preference_get_repeat_mode_key(int *nMode);
bool vp_play_preference_set_repeat_mode_key(int nMode);
bool vp_play_preference_get_screen_mode_key(int *nMode);
bool vp_play_preference_set_screen_mode_key(int nMode);
-bool vp_play_preference_get_capture_on_key(bool *bEnable);
+bool vp_play_preference_get_capture_on_key(bool * bEnable);
bool vp_play_preference_set_capture_on_key(bool bEnable);
-bool vp_play_preference_get_tag_active_key(bool *bEnable);
+bool vp_play_preference_get_tag_active_key(bool * bEnable);
bool vp_play_preference_set_tag_active_key(bool bEnable);
-bool vp_play_preference_get_tag_weather_key(bool *bEnable);
+bool vp_play_preference_get_tag_weather_key(bool * bEnable);
bool vp_play_preference_set_tag_weather_key(bool bEnable);
-bool vp_play_preference_get_tag_location_key(bool *bEnable);
+bool vp_play_preference_get_tag_location_key(bool * bEnable);
bool vp_play_preference_set_tag_location_key(bool bEnable);
bool vp_play_preference_get_tag_edit_weather_key(int *nWeather);
bool vp_play_preference_set_tag_edit_weather_key(int nWeather);
bool vp_play_preference_get_preview_url_videos(char **szMediaURL);
bool vp_play_preference_set_preview_audio_track(int nAudioTrack);
bool vp_play_preference_get_preview_audio_track(int *nAudioTrack);
-bool vp_play_preference_get_sensor_asked_state(bool *bAsked);
+bool vp_play_preference_get_sensor_asked_state(bool * bAsked);
bool vp_play_preference_set_sensor_asked_state(bool bAsked);
-bool vp_play_preference_get_easy_mode(bool *bEnable);
-bool vp_play_preference_get_allow_dock_connect_key(bool *bEnable);
+bool vp_play_preference_get_easy_mode(bool * bEnable);
+bool vp_play_preference_get_allow_dock_connect_key(bool * bEnable);
bool vp_play_preference_set_allow_dock_connect_key(bool bEnable);
-bool vp_play_preference_get_extern_mode_key(bool *bEnable);
+bool vp_play_preference_get_extern_mode_key(bool * bEnable);
bool vp_play_preference_set_extern_mode_key(bool bEnable);
bool vp_play_preference_get_sound_alive_status(int *nStatus);
bool vp_play_preference_set_sound_alive_status(int nStatus);
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
#include <Elementary.h>
-bool vp_play_app_launch_share_panel(Evas_Object *pWin, const char *szMediaURL, app_control_h *pServiceShare, void *pUserData);
-bool vp_play_app_launch_videos(Evas_Object *pWin, bool bRaise, void *pUserData);
-
+bool vp_play_app_launch_share_panel(Evas_Object * pWin,
+ const char *szMediaURL,
+ app_control_h * pServiceShare,
+ void *pUserData);
+bool vp_play_app_launch_videos(Evas_Object * pWin, bool bRaise,
+ void *pUserData);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <glib.h>
char *vp_play_util_get_title_from_path(char *szFilePath);
char *vp_play_util_get_filename_from_path(char *szFilePath);
char *vp_play_util_get_folder_from_path(char *szFilePath);
-bool vp_play_util_key_grab(Elm_Win *pWin, const char *szKeyName);
-bool vp_play_util_key_ungrab(Elm_Win *pWin, const char *szKeyName);
-void vp_play_util_fb_visible_off(Evas_Object *pWin, bool bVisible);
+bool vp_play_util_key_grab(Elm_Win * pWin, const char *szKeyName);
+bool vp_play_util_key_ungrab(Elm_Win * pWin, const char *szKeyName);
+void vp_play_util_fb_visible_off(Evas_Object * pWin, bool bVisible);
bool vp_play_util_get_landscape_check(int nRotateVal);
-//bool vp_play_util_add_to_home(const char *szMediaId, const char *szThumbnailURL);
bool vp_play_util_local_file_check(char *szMediaURL);
-bool vp_play_util_get_subtitle_path(const char *szMediaURL, char **szSubtitle);
+bool vp_play_util_get_subtitle_path(const char *szMediaURL,
+ char **szSubtitle);
double vp_play_util_get_sys_time(void);
bool vp_play_util_status_noti_show(const char *szStr);
char *vp_play_util_remove_prefix_to_url(char *szURL);
void vp_play_util_convert_file_size(long long lSize, char **szSize);
void vp_play_util_get_convert_time(double dtime, char **szFileDate);
-bool vp_play_util_get_file_info(const char *szMediaURL, char **szFileSize, char **szFileDate, char **szFileExtention);
+bool vp_play_util_get_file_info(const char *szMediaURL, char **szFileSize,
+ char **szFileDate, char **szFileExtention);
bool vp_play_util_check_streaming(const char *szURL);
bool vp_play_util_rtsp_url_check(const char *szURL);
-bool vp_play_util_calculator_position(Evas_Coord_Rectangle rtSrc, Evas_Coord_Rectangle rtDst, Evas_Coord_Rectangle *rtResult, int nType);
+bool vp_play_util_calculator_position(Evas_Coord_Rectangle rtSrc,
+ Evas_Coord_Rectangle rtDst,
+ Evas_Coord_Rectangle * rtResult,
+ int nType);
bool vp_play_util_check_sdp_url(const char *szUri);
char *vp_play_util_get_sdp_url(const char *szUri);
-bool vp_play_util_save_file(const char *szFileName, char *szBuffer, int nSize);
+bool vp_play_util_save_file(const char *szFileName, char *szBuffer,
+ int nSize);
bool vp_play_util_get_network_status(void);
bool vp_play_util_is_exist_subtitle_from_path(const char *szPath);
-bool vp_play_util_get_subtitles_from_path(const char *szPath, GList **pSubtitleList);
-bool vp_play_util_get_subtitle_path_list(GList **subtitleList);
-bool vp_play_util_check_personal_status(const char* szPreviewUrl);
+bool vp_play_util_get_subtitles_from_path(const char *szPath,
+ GList ** pSubtitleList);
+bool vp_play_util_get_subtitle_path_list(GList ** subtitleList);
+bool vp_play_util_check_personal_status(const char *szPreviewUrl);
-int vp_play_util_get_root_window_angle(Evas_Object *pWin);
+int vp_play_util_get_root_window_angle(Evas_Object * pWin);
bool vp_play_util_app_resume(void);
bool vp_play_util_check_white_space(char *szText);
bool vp_play_util_check_valid_file_name(const char *szFileName);
-unsigned long long vp_play_util_get_disk_available_space(const char *szFilePath);
+unsigned long long vp_play_util_get_disk_available_space(const char
+ *szFilePath);
unsigned long long vp_play_util_get_file_size(const char *szFilePath);
bool vp_play_util_get_city(const char *szLocation, char **szCity);
bool vp_play_util_is_Xwindow_focused(Ecore_X_Window nXwinID);
-char *vp_play_util_convert_rgba_to_hex(int r,int g,int b,int a);
-bool vp_play_util_convert_hex_to_rgba(char *pColorHex, int *r,int *g,int *b,int *a);
-void vp_play_util_set_object_size(Evas_Object *obj, int w, int h, int id);
-void vp_play_util_set_object_color(Evas_Object *obj, int r, int g, int b, int a, int id);
-void vp_play_util_set_object_offset(Evas_Object *obj, int left, int top, int id);
+char *vp_play_util_convert_rgba_to_hex(int r, int g, int b, int a);
+bool vp_play_util_convert_hex_to_rgba(char *pColorHex, int *r, int *g,
+ int *b, int *a);
+void vp_play_util_set_object_size(Evas_Object * obj, int w, int h, int id);
+void vp_play_util_set_object_color(Evas_Object * obj, int r, int g, int b,
+ int a, int id);
+void vp_play_util_set_object_offset(Evas_Object * obj, int left, int top,
+ int id);
void vp_play_util_set_lock_power_key();
void vp_play_util_set_unlock_power_key();
-void vp_play_util_focus_next_object_set(Evas_Object *obj, Evas_Object *next, Elm_Focus_Direction dir);
-
+void vp_play_util_focus_next_object_set(Evas_Object * obj,
+ Evas_Object * next,
+ Elm_Focus_Direction dir);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <system_settings.h>
#include <runtime_info.h>
#include <app_preference.h>
#define PREF_VP_SORT_TYPE "preference/org.tizen.videos/sort_type"
#define PREF_VP_MULTI_PLAY_FLAG "preference/org.tizen.videos/multi_play"
+static wifi_manager_h g_WifiManager = NULL;
+
telephony_handle_list_s tel_list;
bool vp_play_config_set_multi_play_status(bool bMultiPlay)
return TRUE;
}
-bool vp_play_config_get_multi_play_status(bool *bMultiPlay)
+bool vp_play_config_get_multi_play_status(bool * bMultiPlay)
{
int nErr = 0;
bool nVal = 0;
return TRUE;
}
-bool vp_play_config_get_rotate_lock_status(bool *bStatus)
+bool vp_play_config_get_rotate_lock_status(bool * bStatus)
{
bool bLocked = FALSE;
int nErr = -1;
- nErr = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, &bLocked);
+ nErr =
+ system_settings_get_value_bool
+ (SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, &bLocked);
if (nErr != SYSTEM_SETTINGS_ERROR_NONE) {
VideoLogError("failed to get screen rotation status [0x%x]", nErr);
return FALSE;
return FALSE;
}
- int nErr = 0;
- const char *pStorePath = ".video-store";
+ int nErr = 0;
+ const char *pStorePath = ".video-store";
if (strstr(szMediaURL, pStorePath) == NULL) {
- nErr = preference_set_string(PREF_VP_VIDEO_PREVIEW_URL_VIDEOS, szMediaURL);
+ nErr =
+ preference_set_string(PREF_VP_VIDEO_PREVIEW_URL_VIDEOS,
+ szMediaURL);
if (nErr != 0) {
VideoLogError("failed to set preview url [0x%x]", nErr);
return FALSE;
bool vp_play_config_get_preview_url_videos(char **szMediaURL)
{
- int nErr = preference_get_string(PREF_VP_VIDEO_PREVIEW_URL_VIDEOS, szMediaURL);
+ int nErr =
+ preference_get_string(PREF_VP_VIDEO_PREVIEW_URL_VIDEOS,
+ szMediaURL);
if (nErr != 0 || *szMediaURL == NULL) {
VideoLogError("failed to get preview url [0x%x]", nErr);
return FALSE;
return TRUE;
}
-bool vp_play_config_get_wifi_direct_connect_status(bool *bConnect)
+bool vp_play_config_get_wifi_direct_connect_status(bool * bConnect)
{
int nErr = -1;
- wifi_connection_state_e nwifistate = WIFI_CONNECTION_STATE_FAILURE;
+ wifi_manager_connection_state_e nwifistate =
+ WIFI_MANAGER_CONNECTION_STATE_FAILURE;
wifi_direct_state_e nwifidirectstate = WIFI_DIRECT_STATE_DEACTIVATED;
bool bWifiState = FALSE;
- nErr = wifi_get_connection_state(&nwifistate);
- if (nErr != WIFI_ERROR_NONE) {
+ nErr = wifi_manager_get_connection_state(g_WifiManager, &nwifistate);
+ if (nErr != WIFI_MANAGER_ERROR_NONE) {
VideoLogError("failed to get connection details [0x%x]", nErr);
return FALSE;
}
- if (nwifistate == WIFI_CONNECTION_STATE_CONNECTED) {
+ if (nwifistate == WIFI_MANAGER_CONNECTION_STATE_CONNECTED) {
bWifiState = TRUE;
}
return TRUE;
}
-bool vp_play_config_get_wifi_direct_active_status(bool *bConnect)
+bool vp_play_config_get_wifi_direct_active_status(bool * bConnect)
{
int nErr = 0;
wifi_direct_state_e nVal = 0;
}
-bool vp_play_config_get_call_state(bool *bCallOn)
+bool vp_play_config_get_call_state(bool * bCallOn)
{
VideoLogInfo("start");
telephony_call_h *call_list_sim1, *call_list_sim2;
unsigned int count_sim1 = 0, count_sim2 = 0;
telephony_error_e ret_sim1, ret_sim2;
- ret_sim1 = telephony_call_get_call_list(tel_list.handle[0], &count_sim1, &call_list_sim1);
+ ret_sim1 =
+ telephony_call_get_call_list(tel_list.handle[0], &count_sim1,
+ &call_list_sim1);
if (ret_sim1 != TELEPHONY_ERROR_NONE) {
VideoLogError("Cannot get call list information for primary sim");
}
telephony_call_release_call_list(count_sim1, &call_list_sim1);
- if(tel_list.count > 1) {
- ret_sim2 = telephony_call_get_call_list(tel_list.handle[1], &count_sim2, &call_list_sim2);
+ if (tel_list.count > 1) {
+ ret_sim2 =
+ telephony_call_get_call_list(tel_list.handle[1], &count_sim2,
+ &call_list_sim2);
if (ret_sim2 != TELEPHONY_ERROR_NONE) {
- VideoLogError("Cannot get call list information for secondey sim");
+ VideoLogError
+ ("Cannot get call list information for secondey sim");
}
telephony_call_release_call_list(count_sim2, &call_list_sim2);
}
return false;
}
-static void _call_async_event_callback(telephony_h handle, telephony_noti_e noti_id, void *data, void *user_data)
+static void _call_async_event_callback(telephony_h handle,
+ telephony_noti_e noti_id,
+ void *data, void *user_data)
{
VideoLogDebug("call interrupt cb called");
- PlayView *pPlayView = (PlayView *)user_data;
+ PlayView *pPlayView = (PlayView *) user_data;
int status = 0;
telephony_call_state_e voice_status;
telephony_call_state_e video_status;
status = telephony_call_get_voice_call_state(handle, &voice_status);
- if(status != TELEPHONY_ERROR_NONE) {
+ if (status != TELEPHONY_ERROR_NONE) {
VideoLogError("getting call status failed");
return;
}
status = telephony_call_get_video_call_state(handle, &video_status);
- if(status != TELEPHONY_ERROR_NONE) {
+ if (status != TELEPHONY_ERROR_NONE) {
VideoLogError("getting video call status failed");
return;
}
VideoLogDebug("voice_status = %d", voice_status);
VideoLogDebug("video_status = %d", video_status);
- if(voice_status != TELEPHONY_CALL_STATE_IDLE || video_status != TELEPHONY_CALL_STATE_IDLE) {
+ if (voice_status != TELEPHONY_CALL_STATE_IDLE
+ || video_status != TELEPHONY_CALL_STATE_IDLE) {
if (!vp_play_normal_view_pause(pPlayView->pNormalView)) {
VideoLogError("vp_play_normal_view_pause fail");
}
- } else if(voice_status == TELEPHONY_CALL_STATE_IDLE && video_status == TELEPHONY_CALL_STATE_IDLE){
+ } else if (voice_status == TELEPHONY_CALL_STATE_IDLE
+ && video_status == TELEPHONY_CALL_STATE_IDLE) {
bool bManualPause = FALSE;
- vp_play_normal_view_get_manual_pause(pPlayView->pNormalView, &bManualPause);
- if(!bManualPause)
- vp_play_normal_view_set_resume_or_pause(pPlayView->pNormalView);
+ vp_play_normal_view_get_manual_pause(pPlayView->pNormalView,
+ &bManualPause);
+ if (!bManualPause)
+ vp_play_normal_view_set_resume_or_pause(pPlayView->
+ pNormalView);
}
return;
}
bool vp_play_telephony_initialize(void *pUserData)
{
- if(pUserData == NULL){
+ if (pUserData == NULL) {
VideoLogError("User Data is NULL hence telephony not initialized");
return FALSE;
}
int tel_valid = telephony_init(&tel_list);
if (tel_valid != TELEPHONY_ERROR_NONE) {
- VideoLogError("telephony is not initialized. ERROR Code is %d", tel_valid);
+ VideoLogError("telephony is not initialized. ERROR Code is %d",
+ tel_valid);
return FALSE;
}
- /*setting callbacks*/
+ /*setting callbacks */
telephony_h *newhandle = tel_list.handle;
- int api_err = telephony_set_noti_cb(*newhandle, TELEPHONY_NOTI_VOICE_CALL_STATE, (telephony_noti_cb)_call_async_event_callback, (void *)pUserData);
+ int api_err =
+ telephony_set_noti_cb(*newhandle, TELEPHONY_NOTI_VOICE_CALL_STATE,
+ (telephony_noti_cb)
+ _call_async_event_callback,
+ (void *) pUserData);
if (api_err != TELEPHONY_ERROR_NONE) {
- VideoLogError("tel_register_noti_event for voice call failed ( api_err : %d ) !!", api_err);
+ VideoLogError
+ ("tel_register_noti_event for voice call failed ( api_err : %d ) !!",
+ api_err);
}
- api_err = telephony_set_noti_cb(*newhandle, TELEPHONY_NOTI_VIDEO_CALL_STATE, (telephony_noti_cb)_call_async_event_callback, (void *)pUserData);
+ api_err =
+ telephony_set_noti_cb(*newhandle, TELEPHONY_NOTI_VIDEO_CALL_STATE,
+ (telephony_noti_cb)
+ _call_async_event_callback,
+ (void *) pUserData);
if (api_err != TELEPHONY_ERROR_NONE) {
- VideoLogError("tel_register_noti_event for video call failed ( api_err : %d ) !!", api_err);
+ VideoLogError
+ ("tel_register_noti_event for video call failed ( api_err : %d ) !!",
+ api_err);
}
return TRUE;
telephony_h *newhandle = tel_list.handle;
int nErr = -1;
- nErr = telephony_unset_noti_cb(*newhandle, TELEPHONY_NOTI_VOICE_CALL_STATE);
+ nErr =
+ telephony_unset_noti_cb(*newhandle,
+ TELEPHONY_NOTI_VOICE_CALL_STATE);
if (nErr != TELEPHONY_ERROR_NONE) {
VideoLogError("telephony_unset_noti_cb is fail [0x%x]", nErr);
}
- nErr = telephony_unset_noti_cb(*newhandle, TELEPHONY_NOTI_VIDEO_CALL_STATE);
+ nErr =
+ telephony_unset_noti_cb(*newhandle,
+ TELEPHONY_NOTI_VIDEO_CALL_STATE);
if (nErr != TELEPHONY_ERROR_NONE) {
VideoLogError("telephony_unset_noti_cb is fail [0x%x]", nErr);
}
return TRUE;
}
-bool vp_play_config_get_battery_charge_state(bool *bChargeState)
+bool vp_play_config_get_battery_charge_state(bool * bChargeState)
{
int nErr = -1;
int nVal = 0;
- nErr = runtime_info_get_value_int(RUNTIME_INFO_KEY_BATTERY_IS_CHARGING, &nVal);
+ nErr =
+ runtime_info_get_value_int(RUNTIME_INFO_KEY_BATTERY_IS_CHARGING,
+ &nVal);
if (nErr != RUNTIME_INFO_ERROR_NONE) {
VideoLogError("failed to get charging status [0x%x]", nErr);
return FALSE;
}
- *bChargeState = (nVal == RUNTIME_INFO_KEY_CHARGER_CONNECTED) ? TRUE : FALSE;
+ *bChargeState =
+ (nVal == RUNTIME_INFO_KEY_CHARGER_CONNECTED) ? TRUE : FALSE;
VideoLogInfo("bChargeState: %d", *bChargeState);
return TRUE;
}
-bool vp_play_config_get_lcd_off_state(bool *bLCDOff)
+bool vp_play_config_get_lcd_off_state(bool * bLCDOff)
{
int nErr = 0;
display_state_e state = DISPLAY_STATE_NORMAL;
return TRUE;
}
-bool vp_play_config_set_rotate_state_key_changed_cb(system_settings_changed_cb pFunc, void *pUserData)
+bool
+vp_play_config_set_rotate_state_key_changed_cb(system_settings_changed_cb
+ pFunc, void *pUserData)
{
int nErr = -1;
- nErr = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, pFunc, pUserData);
+ nErr =
+ system_settings_set_changed_cb
+ (SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, pFunc,
+ pUserData);
if (nErr != SYSTEM_SETTINGS_ERROR_NONE) {
VideoLogError("failed to register rotation callback [0x%x]", nErr);
return FALSE;
return TRUE;
}
-bool vp_play_config_set_lock_state_key_changed_cb(system_settings_changed_cb pFunc, void *pUserData)
+bool
+vp_play_config_set_lock_state_key_changed_cb(system_settings_changed_cb
+ pFunc, void *pUserData)
{
int nErr = -1;
- nErr = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCK_STATE, pFunc, pUserData);
+ nErr =
+ system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCK_STATE,
+ pFunc, pUserData);
if (nErr != SYSTEM_SETTINGS_ERROR_NONE) {
- VideoLogError("failed to register lock state callback [0x%x]", nErr);
+ VideoLogError("failed to register lock state callback [0x%x]",
+ nErr);
return FALSE;
}
bool vp_play_config_ignore_rotate_state_key_changed_cb()
{
int nErr = -1;
- nErr = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO);
+ nErr =
+ system_settings_unset_changed_cb
+ (SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO);
if (nErr != SYSTEM_SETTINGS_ERROR_NONE) {
- VideoLogError("failed to un-register rotation callback [0x%x]", nErr);
+ VideoLogError("failed to un-register rotation callback [0x%x]",
+ nErr);
return FALSE;
}
return TRUE;
}
-bool vp_play_config_set_battery_charge_state_key_changed_cb(runtime_info_changed_cb pFunc, void *pUserData)
+bool
+vp_play_config_set_battery_charge_state_key_changed_cb
+(runtime_info_changed_cb pFunc, void *pUserData)
{
int nErr = -1;
- nErr = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_BATTERY_IS_CHARGING, pFunc, pUserData);
+ nErr =
+ runtime_info_set_changed_cb(RUNTIME_INFO_KEY_BATTERY_IS_CHARGING,
+ pFunc, pUserData);
if (nErr != RUNTIME_INFO_ERROR_NONE) {
- VideoLogError("failed to register battery charging callback [0x%x]", nErr);
+ VideoLogError
+ ("failed to register battery charging callback [0x%x]", nErr);
return FALSE;
}
bool vp_play_wifi_initialize()
{
int nErr = -1;
- nErr = wifi_initialize();
- if (nErr != WIFI_ERROR_NONE) {
+
+ if (g_WifiManager) {
+ vp_play_wifi_deinitialize();
+ }
+
+ nErr = wifi_manager_initialize(&g_WifiManager);
+ if (nErr != WIFI_MANAGER_ERROR_NONE) {
VideoLogError("wifi_initialize is fail [0x%x]", nErr);
return FALSE;
}
return TRUE;
}
-bool vp_play_config_set_wifi_state_key_changed_cb(wifi_connection_state_changed_cb pFunc, void *pUserData)
+bool
+vp_play_config_set_wifi_state_key_changed_cb
+(wifi_connection_state_changed_cb pFunc, void *pUserData)
{
int nErr = -1;
- nErr = wifi_set_connection_state_changed_cb(pFunc, pUserData);
- if (nErr != WIFI_ERROR_NONE) {
- VideoLogError("failed to register wifi state changed callback [0x%x]", nErr);
+
+ if (!g_WifiManager) {
+ VideoLogWarning("Wifi manager not initialized");
+ return FALSE;
+ }
+ nErr =
+ wifi_manager_set_connection_state_changed_cb(g_WifiManager, pFunc,
+ pUserData);
+ if (nErr != WIFI_MANAGER_ERROR_NONE) {
+ VideoLogError
+ ("failed to register wifi state changed callback [0x%x]",
+ nErr);
return FALSE;
}
bool vp_play_config_ignore_battery_charge_state_key_changed_cb()
{
int nErr = -1;
- nErr = runtime_info_unset_changed_cb(RUNTIME_INFO_KEY_BATTERY_IS_CHARGING);
+ nErr =
+ runtime_info_unset_changed_cb
+ (RUNTIME_INFO_KEY_BATTERY_IS_CHARGING);
if (nErr != RUNTIME_INFO_ERROR_NONE) {
- VideoLogError("failed to un-register battery charging callback [0x%x]", nErr);
+ VideoLogError
+ ("failed to un-register battery charging callback [0x%x]",
+ nErr);
return FALSE;
}
bool vp_play_config_ignore_wifi_state_key_changed_cb()
{
int nErr = -1;
- nErr = wifi_unset_connection_state_changed_cb();
- if (nErr != WIFI_ERROR_NONE) {
- VideoLogError("failed to un-register wifi state changed callback [0x%x]", nErr);
+ nErr = wifi_manager_unset_connection_state_changed_cb(g_WifiManager);
+ if (nErr != WIFI_MANAGER_ERROR_NONE) {
+ VideoLogError
+ ("failed to un-register wifi state changed callback [0x%x]",
+ nErr);
return FALSE;
}
void vp_play_wifi_deinitialize()
{
int nErr = -1;
- nErr = wifi_deinitialize();
- if (nErr != WIFI_ERROR_NONE) {
- VideoLogError("wifi_deinitialize is fail [0x%x]", nErr);
+
+ if (g_WifiManager) {
+ nErr = wifi_manager_deinitialize(g_WifiManager);
+ if (nErr != WIFI_MANAGER_ERROR_NONE) {
+ VideoLogError("wifi_deinitialize is fail [0x%x]", nErr);
+ }
+ g_WifiManager = 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app_preference.h>
#include "vp-play-preference.h"
#include "vp-play-type-define.h"
-#define VP_PREFERENCE_KEY_GENERAL_BACKGROUND_PLAYING "preference/org.tizen.videos/backgroud_playing"
-#define VP_PREFERENCE_KEY_SUBTILE_SHOW "preference/org.tizen.videos/show_subtitle"
-#define VP_PREFERENCE_KEY_SUBTILE_SIZE "preference/org.tizen.videos/subtitle_size"
-#define VP_PREFERENCE_KEY_SUBTILE_EDGE "preference/org.tizen.videos/subtitle_edge"
+#define VP_PREFERENCE_KEY_GENERAL_BACKGROUND_PLAYING "preference/org.tizen.videos/backgroud_playing"
+#define VP_PREFERENCE_KEY_SUBTILE_SHOW "preference/org.tizen.videos/show_subtitle"
+#define VP_PREFERENCE_KEY_SUBTILE_SIZE "preference/org.tizen.videos/subtitle_size"
+#define VP_PREFERENCE_KEY_SUBTILE_EDGE "preference/org.tizen.videos/subtitle_edge"
-#define VP_PREFERENCE_KEY_SUBTILE_FONT "preference/org.tizen.videos/subtitle_font"
-#define VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR "preference/org.tizen.videos/subtitle_font_color"
+#define VP_PREFERENCE_KEY_SUBTILE_FONT "preference/org.tizen.videos/subtitle_font"
+#define VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR "preference/org.tizen.videos/subtitle_font_color"
#define VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR_HEX "preference/org.tizen.videos/subtitle_font_color_hex"
-#define VP_PREFERENCE_KEY_SUBTILE_BG_COLOR "preference/org.tizen.videos/subtitle_bg_color"
+#define VP_PREFERENCE_KEY_SUBTILE_BG_COLOR "preference/org.tizen.videos/subtitle_bg_color"
#define VP_PREFERENCE_KEY_SUBTILE_BG_COLOR_HEX "preference/org.tizen.videos/subtitle_bg_color_hex"
#define VP_PREFERENCE_KEY_SUBTILE_CAPTION_WIN_COLOR_HEX "preference/org.tizen.videos/subtitle_caption_win_color_hex"
-#define VP_PREFERENCE_KEY_SUBTILE_ALIGNMENT "preference/org.tizen.videos/subtitle_alignment"
-
-//#define VP_PREFERENCE_KEY_DISPLAY_SHOW_INDICATOR "preference/org.tizen.videos/show_indicator"
-//#define VP_PREFERENCE_KEY_DISPLAY_SHOW_BORDER "preference/org.tizen.videos/show_border"
-#define VP_PREFERENCE_KEY_REPEAT_MODE "preference/org.tizen.videos/repeat_mode"
-#define VP_PREFERENCE_KEY_SCREEN_MODE "preference/org.tizen.videos/screen_mode"
-//#define VP_PREFERENCE_KEY_ZOOM_ENABLE "preference/setting/gallery/inline_video_state"
-#define VP_PREFERENCE_KEY_PREVIEW_URL_VIDEOS "preference/org.tizen.videos/preview_url_videos"
+#define VP_PREFERENCE_KEY_SUBTILE_ALIGNMENT "preference/org.tizen.videos/subtitle_alignment"
+
+#define VP_PREFERENCE_KEY_REPEAT_MODE "preference/org.tizen.videos/repeat_mode"
+#define VP_PREFERENCE_KEY_SCREEN_MODE "preference/org.tizen.videos/screen_mode"
+#define VP_PREFERENCE_KEY_PREVIEW_URL_VIDEOS "preference/org.tizen.videos/preview_url_videos"
#define VP_PREFERENCE_KEY_PREVIEW_AUDIO_TRACK "preference/org.tizen.videos/preview_audio_track"
-#define VP_PREFERENCE_KEY_SENSOR_ASKED "preference/org.tizen.videos/motion_asked"
-#define VP_PREFERENCE_KEY_VIDEOS_SORT_TYPE "preference/org.tizen.videos/sort_type"
-#define VP_PREFERENCE_KEY_CAPTURE_MODE_ON "preference/org.tizen.videos/capture_on"
+#define VP_PREFERENCE_KEY_SENSOR_ASKED "preference/org.tizen.videos/motion_asked"
+#define VP_PREFERENCE_KEY_VIDEOS_SORT_TYPE "preference/org.tizen.videos/sort_type"
+#define VP_PREFERENCE_KEY_CAPTURE_MODE_ON "preference/org.tizen.videos/capture_on"
-#define VP_PREFERENCE_KEY_TAG_ACTIVE "preference/org.tizen.videos/tag_active"
-#define VP_PREFERENCE_KEY_TAG_WEATHER "preference/org.tizen.videos/tag_weather"
-#define VP_PREFERENCE_KEY_TAG_LOCATION "preference/org.tizen.videos/tag_location"
-#define VP_PREFERENCE_KEY_TAG_EDIT_WEATHER "preference/org.tizen.videos/tag_edit_weather"
+#define VP_PREFERENCE_KEY_TAG_ACTIVE "preference/org.tizen.videos/tag_active"
+#define VP_PREFERENCE_KEY_TAG_WEATHER "preference/org.tizen.videos/tag_weather"
+#define VP_PREFERENCE_KEY_TAG_LOCATION "preference/org.tizen.videos/tag_location"
+#define VP_PREFERENCE_KEY_TAG_EDIT_WEATHER "preference/org.tizen.videos/tag_edit_weather"
-#define VP_PREFERENCE_KEY_ALLOW_DOCK_CONNECT "preference/org.tizen.videos/allow_dock_connect"
-#define VP_PREFERENCE_KEY_EXTERN_MODE "preference/org.tizen.videos/extern_mode"
-#define VP_PREFERENCE_KEY_MULTI_PLAY_FLAG "preference/org.tizen.videos/multi_play"
-#define VP_PREFERENCE_KEY_SCREEN_MIRRORING_WARNING "preference/org.tizen.videos/mirroring_warning"
+#define VP_PREFERENCE_KEY_ALLOW_DOCK_CONNECT "preference/org.tizen.videos/allow_dock_connect"
+#define VP_PREFERENCE_KEY_EXTERN_MODE "preference/org.tizen.videos/extern_mode"
+#define VP_PREFERENCE_KEY_MULTI_PLAY_FLAG "preference/org.tizen.videos/multi_play"
+#define VP_PREFERENCE_KEY_SCREEN_MIRRORING_WARNING "preference/org.tizen.videos/mirroring_warning"
/*for saving sound alive value*/
bool exist;
nErr =
- preference_is_existing
- (VP_PREFERENCE_KEY_GENERAL_BACKGROUND_PLAYING, &exist);
+ preference_is_existing
+ (VP_PREFERENCE_KEY_GENERAL_BACKGROUND_PLAYING, &exist);
if (nErr != 0) {
VideoLogError("preference_is_existing is fail [%d]", nErr);
} else {
if (!exist) {
nErr =
- preference_set_int
- (VP_PREFERENCE_KEY_GENERAL_BACKGROUND_PLAYING, 0);
+ preference_set_int
+ (VP_PREFERENCE_KEY_GENERAL_BACKGROUND_PLAYING, 0);
if (nErr != 0) {
VideoLogError
- ("VP_PREFERENCE_KEY_GENERAL_BACKGROUND_PLAYING is fail [%d]",
- nErr);
+ ("VP_PREFERENCE_KEY_GENERAL_BACKGROUND_PLAYING is fail [%d]",
+ nErr);
}
}
}
} else {
if (!exist) {
nErr =
- preference_set_boolean(VP_PREFERENCE_KEY_SUBTILE_SHOW, 1);
+ preference_set_boolean(VP_PREFERENCE_KEY_SUBTILE_SHOW, 1);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_SUBTILE_SHOW is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_SUBTILE_SHOW is fail [%d]",
+ nErr);
}
}
}
nErr = preference_set_int(VP_PREFERENCE_KEY_SUBTILE_SIZE, 1);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_SUBTILE_SIZE is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_SUBTILE_SIZE is fail [%d]",
+ nErr);
}
}
}
nErr = preference_set_int(VP_PREFERENCE_KEY_SUBTILE_EDGE, 1);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_SUBTILE_EDGE is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_SUBTILE_EDGE is fail [%d]",
+ nErr);
}
}
}
} else {
if (!exist) {
nErr =
- preference_set_string(VP_PREFERENCE_KEY_SUBTILE_FONT,
- "Tizen");
+ preference_set_string(VP_PREFERENCE_KEY_SUBTILE_FONT,
+ "Tizen");
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_SUBTILE_FONT is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_SUBTILE_FONT is fail [%d]",
+ nErr);
}
}
}
nErr =
- preference_is_existing(VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR,
- &exist);
+ preference_is_existing(VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR,
+ &exist);
if (nErr != 0) {
VideoLogError("preference_is_existing is fail [%d]", nErr);
} else {
if (!exist) {
nErr =
- preference_set_int(VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR,
- 0);
+ preference_set_int(VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR,
+ 0);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR is fail [%d]",
+ nErr);
}
}
}
nErr =
- preference_is_existing(VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR_HEX,
- &exist);
+ preference_is_existing(VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR_HEX,
+ &exist);
if (nErr != 0) {
VideoLogError("preference_is_existing is fail [%d]", nErr);
} else {
if (!exist) {
nErr =
- preference_set_string
- (VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR_HEX, "#ffffffff");
+ preference_set_string
+ (VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR_HEX, "#ffffffff");
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR_HEX is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR_HEX is fail [%d]",
+ nErr);
}
}
}
nErr =
- preference_is_existing(VP_PREFERENCE_KEY_SUBTILE_BG_COLOR,
- &exist);
+ preference_is_existing(VP_PREFERENCE_KEY_SUBTILE_BG_COLOR, &exist);
if (nErr != 0) {
VideoLogError("preference_is_existing is fail [%d]", nErr);
} else {
if (!exist) {
nErr =
- preference_set_int(VP_PREFERENCE_KEY_SUBTILE_BG_COLOR, 1);
+ preference_set_int(VP_PREFERENCE_KEY_SUBTILE_BG_COLOR, 1);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_SUBTILE_BG_COLOR is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_SUBTILE_BG_COLOR is fail [%d]",
+ nErr);
}
}
}
nErr =
- preference_is_existing(VP_PREFERENCE_KEY_SUBTILE_BG_COLOR_HEX,
- &exist);
+ preference_is_existing(VP_PREFERENCE_KEY_SUBTILE_BG_COLOR_HEX,
+ &exist);
if (nErr != 0) {
VideoLogError("preference_is_existing is fail [%d]", nErr);
} else {
if (!exist) {
nErr =
- preference_set_string
- (VP_PREFERENCE_KEY_SUBTILE_BG_COLOR_HEX, "#00000000");
+ preference_set_string
+ (VP_PREFERENCE_KEY_SUBTILE_BG_COLOR_HEX, "#00000000");
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_SUBTILE_BG_COLOR_HEX is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_SUBTILE_BG_COLOR_HEX is fail [%d]",
+ nErr);
}
}
}
nErr =
- preference_is_existing
- (VP_PREFERENCE_KEY_SUBTILE_CAPTION_WIN_COLOR_HEX, &exist);
+ preference_is_existing
+ (VP_PREFERENCE_KEY_SUBTILE_CAPTION_WIN_COLOR_HEX, &exist);
if (nErr != 0) {
VideoLogError("preference_is_existing is fail [%d]", nErr);
} else {
if (!exist) {
nErr =
- preference_set_string
- (VP_PREFERENCE_KEY_SUBTILE_CAPTION_WIN_COLOR_HEX,
- "#00000000");
+ preference_set_string
+ (VP_PREFERENCE_KEY_SUBTILE_CAPTION_WIN_COLOR_HEX,
+ "#00000000");
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_SUBTILE_CAPTION_WIN_COLOR_HEX is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_SUBTILE_CAPTION_WIN_COLOR_HEX is fail [%d]",
+ nErr);
}
}
}
nErr =
- preference_is_existing(VP_PREFERENCE_KEY_SUBTILE_ALIGNMENT,
- &exist);
+ preference_is_existing(VP_PREFERENCE_KEY_SUBTILE_ALIGNMENT,
+ &exist);
if (nErr != 0) {
VideoLogError("preference_is_existing is fail [%d]", nErr);
} else {
if (!exist) {
nErr =
- preference_set_int(VP_PREFERENCE_KEY_SUBTILE_ALIGNMENT,
- 1);
+ preference_set_int(VP_PREFERENCE_KEY_SUBTILE_ALIGNMENT, 1);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_SUBTILE_ALIGNMENT is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_SUBTILE_ALIGNMENT is fail [%d]",
+ nErr);
}
}
}
nErr = preference_set_int(VP_PREFERENCE_KEY_REPEAT_MODE, 1);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_REPEAT_MODE is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_REPEAT_MODE is fail [%d]",
+ nErr);
}
}
}
nErr = preference_set_int(VP_PREFERENCE_KEY_SCREEN_MODE, 0);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_SCREEN_MODE is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_SCREEN_MODE is fail [%d]",
+ nErr);
}
}
}
nErr =
- preference_is_existing(VP_PREFERENCE_KEY_PREVIEW_URL_VIDEOS,
- &exist);
+ preference_is_existing(VP_PREFERENCE_KEY_PREVIEW_URL_VIDEOS,
+ &exist);
if (nErr != 0) {
VideoLogError("preference_is_existing is fail [%d]", nErr);
} else {
if (!exist) {
nErr =
- preference_set_string
- (VP_PREFERENCE_KEY_PREVIEW_URL_VIDEOS, "");
+ preference_set_string
+ (VP_PREFERENCE_KEY_PREVIEW_URL_VIDEOS, "");
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_PREVIEW_URL_VIDEOS is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_PREVIEW_URL_VIDEOS is fail [%d]",
+ nErr);
}
}
}
nErr =
- preference_is_existing(VP_PREFERENCE_KEY_PREVIEW_AUDIO_TRACK,
- &exist);
+ preference_is_existing(VP_PREFERENCE_KEY_PREVIEW_AUDIO_TRACK,
+ &exist);
if (nErr != 0) {
VideoLogError("preference_is_existing is fail [%d]", nErr);
} else {
if (!exist) {
nErr =
- preference_set_int(VP_PREFERENCE_KEY_PREVIEW_AUDIO_TRACK,
- 0);
+ preference_set_int(VP_PREFERENCE_KEY_PREVIEW_AUDIO_TRACK,
+ 0);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_PREVIEW_AUDIO_TRACK is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_PREVIEW_AUDIO_TRACK is fail [%d]",
+ nErr);
}
}
}
} else {
if (!exist) {
nErr =
- preference_set_boolean(VP_PREFERENCE_KEY_SENSOR_ASKED, 0);
+ preference_set_boolean(VP_PREFERENCE_KEY_SENSOR_ASKED, 0);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_SENSOR_ASKED is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_SENSOR_ASKED is fail [%d]",
+ nErr);
}
}
}
nErr =
- preference_is_existing(VP_PREFERENCE_KEY_VIDEOS_SORT_TYPE,
- &exist);
+ preference_is_existing(VP_PREFERENCE_KEY_VIDEOS_SORT_TYPE, &exist);
if (nErr != 0) {
VideoLogError("preference_is_existing is fail [%d]", nErr);
} else {
if (!exist) {
nErr =
- preference_set_int(VP_PREFERENCE_KEY_VIDEOS_SORT_TYPE, 0);
+ preference_set_int(VP_PREFERENCE_KEY_VIDEOS_SORT_TYPE, 0);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_VIDEOS_SORT_TYPE is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_VIDEOS_SORT_TYPE is fail [%d]",
+ nErr);
}
}
}
nErr =
- preference_is_existing(VP_PREFERENCE_KEY_CAPTURE_MODE_ON, &exist);
+ preference_is_existing(VP_PREFERENCE_KEY_CAPTURE_MODE_ON, &exist);
if (nErr != 0) {
VideoLogError("preference_is_existing is fail [%d]", nErr);
} else {
if (!exist) {
nErr =
- preference_set_boolean(VP_PREFERENCE_KEY_CAPTURE_MODE_ON,
- 0);
+ preference_set_boolean(VP_PREFERENCE_KEY_CAPTURE_MODE_ON,
+ 0);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_CAPTURE_MODE_ON is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_CAPTURE_MODE_ON is fail [%d]",
+ nErr);
}
}
}
VideoLogError("preference_is_existing is fail [%d]", nErr);
} else {
if (!exist) {
- nErr =
- preference_set_boolean(VP_PREFERENCE_KEY_TAG_ACTIVE, 1);
+ nErr = preference_set_boolean(VP_PREFERENCE_KEY_TAG_ACTIVE, 1);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_TAG_ACTIVE is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_TAG_ACTIVE is fail [%d]",
+ nErr);
}
}
}
} else {
if (!exist) {
nErr =
- preference_set_boolean(VP_PREFERENCE_KEY_TAG_WEATHER, 1);
+ preference_set_boolean(VP_PREFERENCE_KEY_TAG_WEATHER, 1);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_TAG_WEATHER is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_TAG_WEATHER is fail [%d]",
+ nErr);
}
}
}
} else {
if (!exist) {
nErr =
- preference_set_boolean(VP_PREFERENCE_KEY_TAG_LOCATION, 1);
+ preference_set_boolean(VP_PREFERENCE_KEY_TAG_LOCATION, 1);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_TAG_LOCATION is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_TAG_LOCATION is fail [%d]",
+ nErr);
}
}
}
nErr =
- preference_is_existing(VP_PREFERENCE_KEY_TAG_EDIT_WEATHER,
- &exist);
+ preference_is_existing(VP_PREFERENCE_KEY_TAG_EDIT_WEATHER, &exist);
if (nErr != 0) {
VideoLogError("preference_is_existing is fail [%d]", nErr);
} else {
if (!exist) {
nErr =
- preference_set_int(VP_PREFERENCE_KEY_TAG_EDIT_WEATHER, 0);
+ preference_set_int(VP_PREFERENCE_KEY_TAG_EDIT_WEATHER, 0);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_TAG_EDIT_WEATHER is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_TAG_EDIT_WEATHER is fail [%d]",
+ nErr);
}
}
}
nErr =
- preference_is_existing(VP_PREFERENCE_KEY_ALLOW_DOCK_CONNECT,
- &exist);
+ preference_is_existing(VP_PREFERENCE_KEY_ALLOW_DOCK_CONNECT,
+ &exist);
if (nErr != 0) {
VideoLogError("preference_is_existing is fail [%d]", nErr);
} else {
if (!exist) {
nErr =
- preference_set_boolean
- (VP_PREFERENCE_KEY_ALLOW_DOCK_CONNECT, 1);
+ preference_set_boolean
+ (VP_PREFERENCE_KEY_ALLOW_DOCK_CONNECT, 1);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_ALLOW_DOCK_CONNECT is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_ALLOW_DOCK_CONNECT is fail [%d]",
+ nErr);
}
}
}
} else {
if (!exist) {
nErr =
- preference_set_boolean(VP_PREFERENCE_KEY_EXTERN_MODE, 0);
+ preference_set_boolean(VP_PREFERENCE_KEY_EXTERN_MODE, 0);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_EXTERN_MODE is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_EXTERN_MODE is fail [%d]",
+ nErr);
}
}
}
nErr =
- preference_is_existing(VP_PREFERENCE_KEY_MULTI_PLAY_FLAG, &exist);
+ preference_is_existing(VP_PREFERENCE_KEY_MULTI_PLAY_FLAG, &exist);
if (nErr != 0) {
VideoLogError("preference_is_existing is fail [%d]", nErr);
} else {
if (!exist) {
nErr =
- preference_set_boolean(VP_PREFERENCE_KEY_MULTI_PLAY_FLAG,
- 0);
+ preference_set_boolean(VP_PREFERENCE_KEY_MULTI_PLAY_FLAG,
+ 0);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_MULTI_PLAY_FLAG is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_MULTI_PLAY_FLAG is fail [%d]",
+ nErr);
}
}
}
nErr =
- preference_is_existing(VP_PREFERENCE_KEY_SCREEN_MIRRORING_WARNING,
- &exist);
+ preference_is_existing(VP_PREFERENCE_KEY_SCREEN_MIRRORING_WARNING,
+ &exist);
if (nErr != 0) {
VideoLogError("preference_is_existing is fail [%d]", nErr);
} else {
if (!exist) {
nErr =
- preference_set_boolean
- (VP_PREFERENCE_KEY_SCREEN_MIRRORING_WARNING, 1);
+ preference_set_boolean
+ (VP_PREFERENCE_KEY_SCREEN_MIRRORING_WARNING, 1);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_SCREEN_MIRRORING_WARNING is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_SCREEN_MIRRORING_WARNING is fail [%d]",
+ nErr);
}
}
}
nErr = preference_set_int(VP_PREFERENCE_KEY_SOUND_ALIVE, 1);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_SOUND_ALIVE is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_SOUND_ALIVE is fail [%d]",
+ nErr);
}
}
}
int nErr = 0;
nErr =
- preference_set_boolean(VP_PREFERENCE_KEY_MULTI_PLAY_FLAG,
- bMultiPlay);
+ preference_set_boolean(VP_PREFERENCE_KEY_MULTI_PLAY_FLAG,
+ bMultiPlay);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_MULTI_PLAY_FLAG is fail [%d]", nErr);
+ ("SET VP_PREFERENCE_KEY_MULTI_PLAY_FLAG is fail [%d]", nErr);
return FALSE;
}
return TRUE;
}
-bool vp_play_preference_get_multi_play_status(bool *bMultiPlay)
+bool vp_play_preference_get_multi_play_status(bool * bMultiPlay)
{
int nErr = 0;
bool nVal = 0;
nErr =
- preference_get_boolean(VP_PREFERENCE_KEY_MULTI_PLAY_FLAG, &nVal);
+ preference_get_boolean(VP_PREFERENCE_KEY_MULTI_PLAY_FLAG, &nVal);
if (nErr != 0) {
VideoLogError("GET preference_get_boolean is fail [%d]", nErr);
return FALSE;
int nErr = 0;
nErr =
- preference_set_boolean(VP_PREFERENCE_KEY_SCREEN_MIRRORING_WARNING,
- bMultiPlay);
+ preference_set_boolean(VP_PREFERENCE_KEY_SCREEN_MIRRORING_WARNING,
+ bMultiPlay);
if (nErr != 0) {
VideoLogError
- ("SET VP_PREFERENCE_KEY_SCREEN_MIRRORING_WARNING is fail [%d]",
- nErr);
+ ("SET VP_PREFERENCE_KEY_SCREEN_MIRRORING_WARNING is fail [%d]",
+ nErr);
return FALSE;
}
return TRUE;
}
-bool vp_play_preference_get_mirroring_warning_status(bool *bWarning)
+bool vp_play_preference_get_mirroring_warning_status(bool * bWarning)
{
int nErr = 0;
bool nVal = 0;
nErr =
- preference_get_boolean(VP_PREFERENCE_KEY_SCREEN_MIRRORING_WARNING,
- &nVal);
+ preference_get_boolean(VP_PREFERENCE_KEY_SCREEN_MIRRORING_WARNING,
+ &nVal);
if (nErr != 0) {
VideoLogError
- ("GET VP_PREFERENCE_KEY_SCREEN_MIRRORING_WARNING is fail [%d]",
- nErr);
+ ("GET VP_PREFERENCE_KEY_SCREEN_MIRRORING_WARNING is fail [%d]",
+ nErr);
return FALSE;
}
return TRUE;
}
-bool vp_play_preference_get_subtitle_show_key(bool *bShow)
+bool vp_play_preference_get_subtitle_show_key(bool * bShow)
{
int nErr = 0;
bool nVal = 0;
nErr = preference_get_boolean(VP_PREFERENCE_KEY_SUBTILE_SHOW, &nVal);
if (nErr != 0) {
- VideoLogError("VP_PREFERENCE_KEY_SUBTILE_SHOW is fail [%d]",
- nErr);
+ VideoLogError("VP_PREFERENCE_KEY_SUBTILE_SHOW is fail [%d]", nErr);
return FALSE;
}
nErr = preference_set_boolean(VP_PREFERENCE_KEY_SUBTILE_SHOW, bShow);
if (nErr != 0) {
- VideoLogError("VP_PREFERENCE_KEY_SUBTILE_SHOW is fail [%d]",
- nErr);
+ VideoLogError("VP_PREFERENCE_KEY_SUBTILE_SHOW is fail [%d]", nErr);
return FALSE;
}
int nErr = 0;
nErr =
- preference_set_string(VP_PREFERENCE_KEY_SUBTILE_FONT, szFontName);
+ preference_set_string(VP_PREFERENCE_KEY_SUBTILE_FONT, szFontName);
if (nErr != 0) {
- VideoLogError("VP_PREFERENCE_KEY_SUBTILE_FONT is fail [%d]",
- nErr);
+ VideoLogError("VP_PREFERENCE_KEY_SUBTILE_FONT is fail [%d]", nErr);
return FALSE;
}
{
int nErr = 0;
nErr =
- preference_get_string(VP_PREFERENCE_KEY_SUBTILE_FONT, szFontName);
+ preference_get_string(VP_PREFERENCE_KEY_SUBTILE_FONT, szFontName);
if (nErr != 0) {
- VideoLogError("VP_PREFERENCE_KEY_SUBTILE_FONT is fail [%d]",
- nErr);
+ VideoLogError("VP_PREFERENCE_KEY_SUBTILE_FONT is fail [%d]", nErr);
return FALSE;
}
nErr = preference_get_int(VP_PREFERENCE_KEY_SUBTILE_SIZE, &nVal);
if (nErr != 0) {
- VideoLogError("VP_PREFERENCE_KEY_SUBTILE_SIZE is fail [%d]",
- nErr);
+ VideoLogError("VP_PREFERENCE_KEY_SUBTILE_SIZE is fail [%d]", nErr);
return FALSE;
}
nErr = preference_set_int(VP_PREFERENCE_KEY_SUBTILE_SIZE, nSize);
if (nErr != 0) {
- VideoLogError("VP_PREFERENCE_KEY_SUBTILE_SIZE is fail [%d]",
- nErr);
+ VideoLogError("VP_PREFERENCE_KEY_SUBTILE_SIZE is fail [%d]", nErr);
return FALSE;
}
nErr = preference_get_int(VP_PREFERENCE_KEY_SUBTILE_EDGE, &nVal);
if (nErr != 0) {
- VideoLogError("VP_PREFERENCE_KEY_SUBTILE_EDGE is fail [%d]",
- nErr);
+ VideoLogError("VP_PREFERENCE_KEY_SUBTILE_EDGE is fail [%d]", nErr);
return FALSE;
}
nErr = preference_set_int(VP_PREFERENCE_KEY_SUBTILE_EDGE, nEdge);
if (nErr != 0) {
- VideoLogError("VP_PREFERENCE_KEY_SUBTILE_EDGE is fail [%d]",
- nErr);
+ VideoLogError("VP_PREFERENCE_KEY_SUBTILE_EDGE is fail [%d]", nErr);
return FALSE;
}
int nErr = 0;
nErr =
- preference_set_int(VP_PREFERENCE_KEY_SUBTILE_ALIGNMENT,
- nAlignment);
+ preference_set_int(VP_PREFERENCE_KEY_SUBTILE_ALIGNMENT,
+ nAlignment);
if (nErr != 0) {
- VideoLogError("VP_PREFERENCE_KEY_SUBTILE_SIZE is fail [%d]",
- nErr);
+ VideoLogError("VP_PREFERENCE_KEY_SUBTILE_SIZE is fail [%d]", nErr);
return FALSE;
}
nErr = preference_get_int(VP_PREFERENCE_KEY_SUBTILE_ALIGNMENT, &nVal);
if (nErr != 0) {
- VideoLogError("VP_PREFERENCE_KEY_SUBTILE_SIZE is fail [%d]",
- nErr);
+ VideoLogError("VP_PREFERENCE_KEY_SUBTILE_SIZE is fail [%d]", nErr);
return FALSE;
}
int nErr = 0;
nErr =
- preference_set_int(VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR, nColor);
+ preference_set_int(VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR, nColor);
if (nErr != 0) {
- VideoLogError("VP_PREFERENCE_KEY_SUBTILE_SIZE is fail [%d]",
- nErr);
+ VideoLogError("VP_PREFERENCE_KEY_SUBTILE_SIZE is fail [%d]", nErr);
return FALSE;
}
int nErr = 0;
int nVal = 0;
- nErr =
- preference_get_int(VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR, &nVal);
+ nErr = preference_get_int(VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR, &nVal);
if (nErr != 0) {
- VideoLogError("VP_PREFERENCE_KEY_SUBTILE_SIZE is fail [%d]",
- nErr);
+ VideoLogError("VP_PREFERENCE_KEY_SUBTILE_SIZE is fail [%d]", nErr);
return FALSE;
}
}
bool vp_play_preference_set_subtitle_font_color_hex_key(const char
- *szColorHex)
+ *szColorHex)
{
int nErr = 0;
nErr =
- preference_set_string(VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR_HEX,
- szColorHex);
+ preference_set_string(VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR_HEX,
+ szColorHex);
if (nErr != 0) {
VideoLogError
- ("VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR_HEX is fail [%d]",
- nErr);
+ ("VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR_HEX is fail [%d]",
+ nErr);
return FALSE;
}
{
int nErr = 0;
nErr =
- preference_get_string(VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR_HEX,
- szColorHex);
+ preference_get_string(VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR_HEX,
+ szColorHex);
if (nErr != 0) {
VideoLogError
- ("VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR_HEX is fail [%d]",
- nErr);
+ ("VP_PREFERENCE_KEY_SUBTILE_FONT_COLOR_HEX is fail [%d]",
+ nErr);
return FALSE;
}
}
bool vp_play_preference_set_subtitle_bg_color_hex_key(const char
- *szColorHex)
+ *szColorHex)
{
int nErr = 0;
nErr =
- preference_set_string(VP_PREFERENCE_KEY_SUBTILE_BG_COLOR_HEX,
- szColorHex);
+ preference_set_string(VP_PREFERENCE_KEY_SUBTILE_BG_COLOR_HEX,
+ szColorHex);
if (nErr != 0) {
VideoLogError
- ("VP_PREFERENCE_KEY_SUBTILE_BG_COLOR_HEX is fail [%d]", nErr);
+ ("VP_PREFERENCE_KEY_SUBTILE_BG_COLOR_HEX is fail [%d]", nErr);
return FALSE;
}
{
int nErr = 0;
nErr =
- preference_get_string(VP_PREFERENCE_KEY_SUBTILE_BG_COLOR_HEX,
- szColorHex);
+ preference_get_string(VP_PREFERENCE_KEY_SUBTILE_BG_COLOR_HEX,
+ szColorHex);
if (nErr != 0) {
VideoLogError
- ("VP_PREFERENCE_KEY_SUBTILE_BG_COLOR_HEX is fail [%d]", nErr);
+ ("VP_PREFERENCE_KEY_SUBTILE_BG_COLOR_HEX is fail [%d]", nErr);
return FALSE;
}
}
bool vp_play_preference_set_subtitle_caption_win_color_hex_key(const char
- *szColorHex)
+ *szColorHex)
{
int nErr = 0;
nErr =
- preference_set_string
- (VP_PREFERENCE_KEY_SUBTILE_CAPTION_WIN_COLOR_HEX, szColorHex);
+ preference_set_string
+ (VP_PREFERENCE_KEY_SUBTILE_CAPTION_WIN_COLOR_HEX, szColorHex);
if (nErr != 0) {
VideoLogError
- ("VP_PREFERENCE_KEY_SUBTILE_CAPTION_WIN_COLOR_HEX is fail [%d]",
- nErr);
+ ("VP_PREFERENCE_KEY_SUBTILE_CAPTION_WIN_COLOR_HEX is fail [%d]",
+ nErr);
return FALSE;
}
}
bool vp_play_preference_get_subtitle_caption_win_color_hex_key(char
- **szColorHex)
+ **szColorHex)
{
int nErr = 0;
nErr =
- preference_get_string
- (VP_PREFERENCE_KEY_SUBTILE_CAPTION_WIN_COLOR_HEX, szColorHex);
+ preference_get_string
+ (VP_PREFERENCE_KEY_SUBTILE_CAPTION_WIN_COLOR_HEX, szColorHex);
if (nErr != 0) {
VideoLogError
- ("VP_PREFERENCE_KEY_SUBTILE_CAPTION_WIN_COLOR_HEX is fail [%d]",
- nErr);
+ ("VP_PREFERENCE_KEY_SUBTILE_CAPTION_WIN_COLOR_HEX is fail [%d]",
+ nErr);
return FALSE;
}
nErr = preference_get_int(VP_PREFERENCE_KEY_SUBTILE_BG_COLOR, &nVal);
if (nErr != 0) {
VideoLogError("VP_PREFERENCE_KEY_SUBTILE_BG_COLOR is fail [%d]",
- nErr);
+ nErr);
return FALSE;
}
nErr = preference_set_int(VP_PREFERENCE_KEY_SUBTILE_BG_COLOR, nColor);
if (nErr != 0) {
VideoLogError("VP_PREFERENCE_KEY_SUBTILE_BG_COLOR is fail [%d]",
- nErr);
+ nErr);
return FALSE;
}
return TRUE;
}
-bool vp_play_preference_get_capture_on_key(bool *bEnable)
+bool vp_play_preference_get_capture_on_key(bool * bEnable)
{
int nErr = 0;
bool nVal = 0;
nErr =
- preference_get_boolean(VP_PREFERENCE_KEY_CAPTURE_MODE_ON, &nVal);
+ preference_get_boolean(VP_PREFERENCE_KEY_CAPTURE_MODE_ON, &nVal);
if (nErr != 0) {
VideoLogError("VP_PREFERENCE_KEY_CAPTURE_MODE_ON is fail [%d]",
- nErr);
+ nErr);
return FALSE;
}
int nErr = 0;
nErr =
- preference_set_boolean(VP_PREFERENCE_KEY_CAPTURE_MODE_ON,
- bEnable);
+ preference_set_boolean(VP_PREFERENCE_KEY_CAPTURE_MODE_ON, bEnable);
if (nErr != 0) {
VideoLogError("VP_PREFERENCE_KEY_CAPTURE_MODE_ON is fail [%d]",
- nErr);
+ nErr);
return FALSE;
}
}
-bool vp_play_preference_get_tag_active_key(bool *bEnable)
+bool vp_play_preference_get_tag_active_key(bool * bEnable)
{
int nErr = 0;
bool nVal = 0;
}
-bool vp_play_preference_get_tag_weather_key(bool *bEnable)
+bool vp_play_preference_get_tag_weather_key(bool * bEnable)
{
int nErr = 0;
bool nVal = 0;
return TRUE;
}
-bool vp_play_preference_get_tag_location_key(bool *bEnable)
+bool vp_play_preference_get_tag_location_key(bool * bEnable)
{
int nErr = 0;
bool nVal = 0;
nErr = preference_get_boolean(VP_PREFERENCE_KEY_TAG_LOCATION, &nVal);
if (nErr != 0) {
- VideoLogError("VP_PREFERENCE_KEY_TAG_LOCATION is fail [%d]",
- nErr);
+ VideoLogError("VP_PREFERENCE_KEY_TAG_LOCATION is fail [%d]", nErr);
return FALSE;
}
{
int nErr = 0;
- nErr =
- preference_set_boolean(VP_PREFERENCE_KEY_TAG_LOCATION, bEnable);
+ nErr = preference_set_boolean(VP_PREFERENCE_KEY_TAG_LOCATION, bEnable);
if (nErr != 0) {
- VideoLogError("VP_PREFERENCE_KEY_TAG_LOCATION is fail [%d]",
- nErr);
+ VideoLogError("VP_PREFERENCE_KEY_TAG_LOCATION is fail [%d]", nErr);
return FALSE;
}
nErr = preference_get_int(VP_PREFERENCE_KEY_TAG_EDIT_WEATHER, &nVal);
if (nErr != 0) {
VideoLogError("VP_PREFERENCE_KEY_TAG_EDIT_WEATHER is fail [%d]",
- nErr);
+ nErr);
return FALSE;
}
int nErr = 0;
nErr =
- preference_set_int(VP_PREFERENCE_KEY_TAG_EDIT_WEATHER, nWeather);
+ preference_set_int(VP_PREFERENCE_KEY_TAG_EDIT_WEATHER, nWeather);
if (nErr != 0) {
VideoLogError("VP_PREFERENCE_KEY_TAG_EDIT_WEATHER is fail [%d]",
- nErr);
+ nErr);
return FALSE;
}
nErr = preference_get_int(VP_PREFERENCE_KEY_VIDEOS_SORT_TYPE, &nVal);
if (nErr != 0) {
VideoLogError("VP_PREFERENCE_KEY_VIDEOS_SORT_TYPE is fail [%d]",
- nErr);
+ nErr);
return FALSE;
}
if (strstr(szMediaURL, pStorePath) == NULL) {
nErr =
- preference_set_string(VP_PREFERENCE_KEY_PREVIEW_URL_VIDEOS,
- szMediaURL);
+ preference_set_string(VP_PREFERENCE_KEY_PREVIEW_URL_VIDEOS,
+ szMediaURL);
if (nErr != 0) {
VideoLogError
- ("VP_PREFERENCE_KEY_PREVIEW_URL_VIDEOS is fail [%d]",
- nErr);
+ ("VP_PREFERENCE_KEY_PREVIEW_URL_VIDEOS is fail [%d]",
+ nErr);
return FALSE;
}
}
int nErr = 0;
nErr =
- preference_get_string(VP_PREFERENCE_KEY_PREVIEW_URL_VIDEOS,
- szMediaURL);
+ preference_get_string(VP_PREFERENCE_KEY_PREVIEW_URL_VIDEOS,
+ szMediaURL);
if (nErr != 0) {
VideoLogError("VP_PREFERENCE_KEY_PREVIEW_URL_VIDEOS is fail [%d]",
- nErr);
+ nErr);
return FALSE;
}
int nErr = 0;
nErr =
- preference_set_int(VP_PREFERENCE_KEY_PREVIEW_AUDIO_TRACK,
- nAudioTrack);
+ preference_set_int(VP_PREFERENCE_KEY_PREVIEW_AUDIO_TRACK,
+ nAudioTrack);
if (nErr != 0) {
VideoLogError
- ("VP_PREFERENCE_KEY_PREVIEW_AUDIO_TRACK is fail [%d]", nErr);
+ ("VP_PREFERENCE_KEY_PREVIEW_AUDIO_TRACK is fail [%d]", nErr);
return FALSE;
}
return TRUE;
int nVal = 0;
nErr =
- preference_get_int(VP_PREFERENCE_KEY_PREVIEW_AUDIO_TRACK, &nVal);
+ preference_get_int(VP_PREFERENCE_KEY_PREVIEW_AUDIO_TRACK, &nVal);
if (nErr != 0) {
VideoLogError
- ("VP_PREFERENCE_KEY_PREVIEW_AUDIO_TRACK is fail [%d]", nErr);
+ ("VP_PREFERENCE_KEY_PREVIEW_AUDIO_TRACK is fail [%d]", nErr);
return FALSE;
}
return TRUE;
}
-bool vp_play_preference_get_sensor_asked_state(bool *bAsked)
+bool vp_play_preference_get_sensor_asked_state(bool * bAsked)
{
int nErr = 0;
bool nVal = 0;
nErr = preference_get_boolean(VP_PREFERENCE_KEY_SENSOR_ASKED, &nVal);
if (nErr != 0) {
- VideoLogError("VP_PREFERENCE_KEY_SENSOR_ASKED is fail [%d]",
- nErr);
+ VideoLogError("VP_PREFERENCE_KEY_SENSOR_ASKED is fail [%d]", nErr);
return FALSE;
}
nErr = preference_set_boolean(VP_PREFERENCE_KEY_SENSOR_ASKED, bAsked);
if (nErr != 0) {
- VideoLogError("VP_PREFERENCE_KEY_SENSOR_ASKED is fail [%d]",
- nErr);
+ VideoLogError("VP_PREFERENCE_KEY_SENSOR_ASKED is fail [%d]", nErr);
return FALSE;
}
return TRUE;
}
-bool vp_play_preference_get_allow_dock_connect_key(bool *bEnable)
+bool vp_play_preference_get_allow_dock_connect_key(bool * bEnable)
{
int nErr = 0;
bool nVal = 0;
nErr =
- preference_get_boolean(VP_PREFERENCE_KEY_ALLOW_DOCK_CONNECT,
- &nVal);
+ preference_get_boolean(VP_PREFERENCE_KEY_ALLOW_DOCK_CONNECT,
+ &nVal);
if (nErr != 0) {
VideoLogError("VP_PREFERENCE_KEY_ALLOW_DOCK_CONNECT is fail [%d]",
- nErr);
+ nErr);
return FALSE;
}
int nErr = 0;
nErr =
- preference_set_boolean(VP_PREFERENCE_KEY_ALLOW_DOCK_CONNECT,
- bEnable);
+ preference_set_boolean(VP_PREFERENCE_KEY_ALLOW_DOCK_CONNECT,
+ bEnable);
if (nErr != 0) {
VideoLogError("VP_PREFERENCE_KEY_ALLOW_DOCK_CONNECT is fail [%d]",
- nErr);
+ nErr);
return FALSE;
}
return TRUE;
}
-bool vp_play_preference_get_extern_mode_key(bool *bEnable)
+bool vp_play_preference_get_extern_mode_key(bool * bEnable)
{
int nErr = 0;
bool nVal = 0;
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
#include <glib.h>
#include "vp-play-normal-view.h"
-#define MESSAGE_UG_NAME "msg-composer-efl"
-#define EMAIL_UG_NAME "email-composer-efl"
-#define BLUETOOTH_UG_NAME "setting-bluetooth-efl"
+#define MESSAGE_UG_NAME "msg-composer-efl"
+#define EMAIL_UG_NAME "email-composer-efl"
+#define BLUETOOTH_UG_NAME "setting-bluetooth-efl"
#define FTM_UG_NAME "fileshare-efl"
#define VIDEOS_APP_NAME "org.tizen.videos"
-#define BROWSER_APP_NAME "org.tizen.browser"
+#define BROWSER_APP_NAME "org.tizen.browser"
#define VIDEO_STORE_DOWNLOAD_SVC "org.tizen.video-store-download-svc"
/* callback functions */
static void __vp_play_ug_reply_cb(app_control_h pRequest,
- app_control_h pReply,
- app_control_result_e nResult,
- void *pUserData)
+ app_control_h pReply,
+ app_control_result_e nResult,
+ void *pUserData)
{
if (pRequest) {
char *appId;
vp_play_normal_view_set_share_panel_state(pUserData);
}
-bool vp_play_app_launch_videos(Evas_Object *pWin, bool bRaise,
- void *pUserData)
+bool vp_play_app_launch_videos(Evas_Object * pWin, bool bRaise,
+ void *pUserData)
{
app_control_h pService = NULL;
goto Execption;
}
- nRet =
- app_control_set_operation(pService, APP_CONTROL_OPERATION_VIEW);
+ nRet = app_control_set_operation(pService, APP_CONTROL_OPERATION_VIEW);
if (nRet != APP_CONTROL_ERROR_NONE) {
VideoLogError("app_control_set_operation is fail [0x%x]", nRet);
goto Execption;
}
if (bRaise) {
nRet =
- app_control_add_extra_data(pService, VP_VIDEOS_ONLY_RAISE,
- VP_VIDEOS_VALUE_TRUE);
+ app_control_add_extra_data(pService, VP_VIDEOS_ONLY_RAISE,
+ VP_VIDEOS_VALUE_TRUE);
if (nRet != APP_CONTROL_ERROR_NONE) {
VideoLogError("app_control_add_extra_data is fail [0x%x]",
- nRet);
+ nRet);
goto Execption;
}
} else {
nRet =
- app_control_add_extra_data(pService, VP_VIDEOS_ONLY_RAISE,
- VP_VIDEOS_VALUE_FALSE);
+ app_control_add_extra_data(pService, VP_VIDEOS_ONLY_RAISE,
+ VP_VIDEOS_VALUE_FALSE);
if (nRet != APP_CONTROL_ERROR_NONE) {
VideoLogError("app_control_add_extra_data is fail [0x%x]",
- nRet);
+ nRet);
goto Execption;
}
}
}
nRet =
- app_control_send_launch_request(pService, __vp_play_ug_reply_cb,
- pUserData);
+ app_control_send_launch_request(pService, __vp_play_ug_reply_cb,
+ pUserData);
if (nRet != APP_CONTROL_ERROR_NONE) {
VideoLogError("app_control_send_launch_request is fail [0x%x]",
- nRet);
+ nRet);
goto Execption;
}
return TRUE;
-Execption:
+ Execption:
if (pService) {
app_control_destroy(pService);
pService = NULL;
return FALSE;
}
-bool vp_play_app_launch_share_panel(Evas_Object *pWin,
- const char *szMediaURL,
- app_control_h *pServiceShare,
- void *pUserData)
+bool vp_play_app_launch_share_panel(Evas_Object * pWin,
+ const char *szMediaURL,
+ app_control_h * pServiceShare,
+ void *pUserData)
{
if (szMediaURL == NULL) {
VideoLogError("szMediaURL is NULL");
}
}
- nRet = app_control_set_operation(*pServiceShare, VP_SHARE_OPERATION_SINGLE);
+ nRet =
+ app_control_set_operation(*pServiceShare,
+ VP_SHARE_OPERATION_SINGLE);
if (nRet != APP_CONTROL_ERROR_NONE) {
VideoLogError("app_control_add_extra_data is fail [0x%x]", nRet);
goto Execption;
}
- nRet = app_control_add_extra_data(*pServiceShare, "http://tizen.org/appcontrol/data/path", szMediaURL);
+ nRet =
+ app_control_add_extra_data(*pServiceShare,
+ "http://tizen.org/appcontrol/data/path",
+ szMediaURL);
if (nRet != APP_CONTROL_ERROR_NONE) {
VideoLogError("app_control_add_extra_data is fail [0x%x]", nRet);
goto Execption;
goto Execption;
}
+ nRet = app_control_enable_app_started_result_event(*pServiceShare);
+ if (nRet != APP_CONTROL_ERROR_NONE) {
+ VideoLogError
+ ("app_control_enable_app_started_result_event is fail [0x%x]",
+ nRet);
+ goto Execption;
+ }
+
nRet =
- app_control_send_launch_request(*pServiceShare, __vp_play_ug_reply_cb,
- pUserData);
+ app_control_send_launch_request(*pServiceShare,
+ __vp_play_ug_reply_cb, pUserData);
if (nRet != APP_CONTROL_ERROR_NONE) {
VideoLogError("app_control_send_launch_request is fail [0x%x]",
- nRet);
+ nRet);
goto Execption;
}
VP_FREE(szFileName);
return TRUE;
-Execption:
+ Execption:
VP_FREE(szFileName);
if (*pServiceShare) {
}
return FALSE;
}
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <regex.h>
-//#include <Ecore_X.h>
#include <efl_extension.h>
#include <errno.h>
#include <notification.h>
#include <mime_type.h>
#include <net_connection.h>
-//#include <telephony_network.h>
#include <app.h>
#include <app_manager.h>
#include <glib/gstdio.h>
#define FILE_SIZE_LEN_MAX 64
#define UG_DATE_FORMAT_12 "yMMMdhms"
#define UG_DATE_FORMAT_24 "yMMMdHms"
-#define EXT_SIZE 128
+#define EXT_SIZE 128
#define EXT_SPLITTER '.'
#define VP_PLAY_NAME_PATTERN "[\\<>:;*\"|?/]"
};
static char *_vp_play_util_convert_string(const char *szLocale,
- const char *szCustomSkeleton,
- const char *szTimezone,
- UDate st_Date)
+ const char *szCustomSkeleton,
+ const char *szTimezone,
+ UDate st_Date)
{
-#define UG_ICU_ARR_LENGTH 256
+#define UG_ICU_ARR_LENGTH 256
// Copy a byte string encoded in the default codepage to a ustring.
// Copies at most n characters. The result will be null terminated if the length of src is less than n.
i18n_uchar ucustomSkeleton[UG_ICU_ARR_LENGTH] = { 0, };
if (i18n_ustring_copy_ua_n
- (ucustomSkeleton, szCustomSkeleton, UG_ICU_ARR_LENGTH) == NULL) {
+ (ucustomSkeleton, szCustomSkeleton, UG_ICU_ARR_LENGTH) == NULL) {
VideoLogInfo("i18n_ustring_copy_au_n() error.");
return NULL;
}
i18n_uchar utimezone[UG_ICU_ARR_LENGTH] = { 0, };
if (i18n_ustring_copy_ua_n(utimezone, szTimezone, UG_ICU_ARR_LENGTH)
- == NULL) {
+ == NULL) {
VideoLogInfo("i18n_ustring_copy_au_n() error.");
return NULL;
}
}
status =
- i18n_udatepg_get_best_pattern(generator, ucustomSkeleton,
- i18n_ustring_get_length
- (ucustomSkeleton), bestPattern,
- UG_ICU_ARR_LENGTH,
- &bestPatternLength);
+ i18n_udatepg_get_best_pattern(generator, ucustomSkeleton,
+ i18n_ustring_get_length
+ (ucustomSkeleton), bestPattern,
+ UG_ICU_ARR_LENGTH,
+ &bestPatternLength);
if (bestPatternLength <= 0 || status != I18N_ERROR_NONE) {
i18n_udatepg_destroy(generator);
return NULL;
}
status =
- i18n_udate_create(I18N_UDATE_MEDIUM, I18N_UDATE_MEDIUM, szLocale,
- NULL, -1, bestPattern, -1, &formatter);
+ i18n_udate_create(I18N_UDATE_MEDIUM, I18N_UDATE_MEDIUM, szLocale,
+ NULL, -1, bestPattern, -1, &formatter);
if (formatter == NULL || status != I18N_ERROR_NONE) {
i18n_udatepg_destroy(generator);
return NULL;
}
status =
- i18n_udate_format_date(formatter, st_Date, formatted,
- UG_ICU_ARR_LENGTH, NULL, &formattedLength);
+ i18n_udate_format_date(formatter, st_Date, formatted,
+ UG_ICU_ARR_LENGTH, NULL, &formattedLength);
if (formattedLength <= 0 || status != I18N_ERROR_NONE) {
VideoLogInfo("i18n_udate_format_date() is failed.");
i18n_udate_destroy(formatter);
szTitleName = szFilePath;
}
- if (szTitleName == NULL) {
- VideoLogError("Invalid buffer");
- return NULL;
-
- }
szFile = calloc(1, nLength - strlen(szTitleName));
if (szFile != NULL) {
return szFile;
}
-bool vp_play_util_key_grab(Elm_Win *pWin, const char *szKeyName)
+bool vp_play_util_key_grab(Elm_Win * pWin, const char *szKeyName)
{
if (!pWin) {
VideoLogInfo("Invalid window handle.");
return TRUE;
}
-bool vp_play_util_key_ungrab(Elm_Win *pWin, const char *szKeyName)
+bool vp_play_util_key_ungrab(Elm_Win * pWin, const char *szKeyName)
{
if (!pWin) {
VideoLogInfo("Invalid window handle.");
return TRUE;
}
-void vp_play_util_fb_visible_off(Evas_Object *pWin, bool bVisible)
+void vp_play_util_fb_visible_off(Evas_Object * pWin, bool bVisible)
{
VideoLogInfo("");
nRotate = (video_play_rotate_t) nRotateVal;
if (nRotate == VIDEO_PLAY_ROTATE_90 ||
- nRotate == VIDEO_PLAY_ROTATE_270) {
+ nRotate == VIDEO_PLAY_ROTATE_270) {
return TRUE;
}
return FALSE;
}
-int vp_play_util_get_root_window_angle(Evas_Object *pWin)
+int vp_play_util_get_root_window_angle(Evas_Object * pWin)
{
int nAngle = 0;
unsigned char *pProp_data = NULL;
VideoLogError("Window handle is NULL");
return nAngle;
}
-#if 0//Tizen3.0 Build error
- int nRet = 0;
- int nCount = 0;
- Ecore_X_Window xwin = elm_win_xwindow_get(pWin);
- Ecore_X_Window root = ecore_x_window_root_get(xwin);
- nRet = ecore_x_window_prop_property_get(root,
- ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE,
- ECORE_X_ATOM_CARDINAL, 32,
- &pProp_data, &nCount);
-
- if (nRet && pProp_data) {
- memcpy(&nAngle, pProp_data, sizeof(int));
- } else {
- nAngle = 0;
- }
-#endif
+
VP_FREE(pProp_data);
return nAngle;
}
-/*
-static int __vp_play_util_add_home_result_cb(int ret, int pid, void *data)
-{
- VideoLogInfo("Client pid: %d, Return: %d", pid, ret);
- if (ret == SHORTCUT_SUCCESS) {
- vp_play_util_status_noti_show(VP_PLAY_STRING_COM_ADDED);
- } else if (SHORTCUT_STATUS_IS_CARED(ret)) {
- // In this case, the homescreen handles error case already.
- // It launch the popup or status message for user.
- VideoLogInfo("result code type: %d", SHORTCUT_ERROR_CODE(ret));
- } else if (SHORTCUT_STATUS_IS_ERROR(ret)) {
- VideoLogInfo("error code type: %d", SHORTCUT_ERROR_CODE(ret));
- }
- return 0;
-}*/
-/*
-bool vp_play_util_add_to_home(const char *szMediaId, const char *szThumbnailURL)
-{
- if (szMediaId == NULL) {
- VideoLogError("szMediaURL is NULL");
- return FALSE;
- }
-
- int nRet = 0;
- char *szContentType = NULL;
-
- szContentType = g_strdup_printf("video-player:%s", szMediaId);
-
- nRet = add_to_home_livebox("org.tizen.videos", VP_VIDEO_PLAYER_TEXT, LIVEBOX_TYPE_2x2,
- szContentType, szThumbnailURL, 30.0, 1,
- __vp_play_util_add_home_result_cb, NULL);
-
-
- if (nRet != SHORTCUT_SUCCESS) {
- VideoLogError("add_to_home_livebox is Fail : %d", nRet);
- VP_FREE(szContentType);
- return FALSE;
- }
-
- VP_FREE(szContentType);
-
- return TRUE;
-}
-*/
bool vp_play_util_local_file_check(char *szMediaURL)
{
if (szMediaURL == NULL) {
char *error_msg = calloc(1, 1024);
if (error_msg) {
strerror_r(errno, error_msg, 1024);
- VideoLogError("failed to access file: %d %s", errno, error_msg);
+ VideoLogError("failed to access file: %d %s", errno,
+ error_msg);
free(error_msg);
}
return FALSE;
}
bool vp_play_util_get_subtitle_path(const char *szMediaURL,
- char **szSubtitle)
+ char **szSubtitle)
{
if (!szMediaURL) {
VideoLogError("szMediaURL is NULL");
int nOutputLen = 0;
char *szExt = NULL;
- char szExtWildkey[6][5] =
- { ".srt", ".sub", ".smi", ".SRT", ".SUB", ".SMI" };
+ char szExtWildkey[6][5] = { ".srt", ".sub", ".smi", ".SRT", ".SUB", ".SMI" };
char *szCheckFilePath = NULL;
*szSubtitle = NULL;
memset(szCheckFilePath, 0, nOutputLen);
strncpy(szCheckFilePath, szMediaURL, nStrLength);
strncat(szCheckFilePath, szExtWildkey[nCount],
- strlen(szExtWildkey[nCount]));
+ strlen(szExtWildkey[nCount]));
if (!stat(szCheckFilePath, &buf)) {
VideoLogWarning("Success finding subtitle file. - %d, %s",
- nCount, szCheckFilePath);
+ nCount, szCheckFilePath);
VP_STRDUP(*szSubtitle, szCheckFilePath);
break;
}
int nRet = notification_status_message_post(szStr);
if (nRet != 0) {
- VideoLogError("notification_status_message_post() : [0x%x]",
- nRet);
+ VideoLogError("notification_status_message_post() : [0x%x]", nRet);
return FALSE;
}
if (strstr(szURL, VP_PLAY_FILE_PREFIX)) {
char *szTemp =
- calloc(1, strlen(szURL) - strlen(VP_PLAY_FILE_PREFIX) + 1);
+ calloc(1, strlen(szURL) - strlen(VP_PLAY_FILE_PREFIX) + 1);
if (szTemp) {
- snprintf(szTemp, strlen(szURL) - strlen(VP_PLAY_FILE_PREFIX) + 1,
- "%s", szURL + strlen(VP_PLAY_FILE_PREFIX));
+ snprintf(szTemp,
+ strlen(szURL) - strlen(VP_PLAY_FILE_PREFIX) + 1, "%s",
+ szURL + strlen(VP_PLAY_FILE_PREFIX));
}
return szTemp;
}
szSkeleton = UG_DATE_FORMAT_24;
- char *szLocale = NULL; // eg en_US.UTF-8
+ char *szLocale = NULL; // eg en_US.UTF-8
int retcode =
- system_settings_get_value_string
- (SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, &szLocale);
+ system_settings_get_value_string
+ (SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, &szLocale);
if ((retcode != SYSTEM_SETTINGS_ERROR_NONE) || (szLocale == NULL)) {
VideoLogInfo("Cannot get region format.");
VP_STRDUP(szLocale, "en_US"); //// Default value.
char *szTimezone = NULL;
retcode =
- system_settings_get_value_string
- (SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE, &szTimezone);
+ system_settings_get_value_string
+ (SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE, &szTimezone);
if ((retcode != SYSTEM_SETTINGS_ERROR_NONE) || (szTimezone == NULL)) {
VideoLogWarning("Cannot get time zone.");
VP_STRDUP(szTimezone, VP_PLAY_STRING_COM_UNKNOWN);
}
*szFileDate =
- _vp_play_util_convert_string(szLocale, szSkeleton, szTimezone,
- (UDate) dtime * 1000);
+ _vp_play_util_convert_string(szLocale, szSkeleton, szTimezone,
+ (UDate) dtime * 1000);
if (*szFileDate == NULL) {
VideoLogWarning("Cannot get time string.");
VP_STRDUP(*szFileDate, VP_PLAY_STRING_COM_UNKNOWN);
}
bool vp_play_util_get_file_info(const char *szMediaURL, char **szFileSize,
- char **szFileDate, char **szFileExtention)
+ char **szFileDate, char **szFileExtention)
{
if (!szMediaURL) {
VideoLogError("szMediaURL is NULL.");
int nCount = 0;
size_t size = statbuf.st_size;
unsigned long int lsize = (unsigned long int) size;
- //It is strange, when open below code, compile error, show could not find runtime_info_get_value_bool.
- //bool hours_24 = true;
- //int ret = -1;
-
- /*ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_24HOUR_CLOCK_FORMAT_ENABLED, &hours_24);
- if (ret != RUNTIME_INFO_ERROR_NONE)
- {
- VideoLogError("Cannot get 24 hours format");
- return NULL;
- } */
vp_play_util_get_convert_time((double) statbuf.st_mtime, szFileDate);
int nArrayLen = 0;
int nErr = 0;
if (vp_drm_get_file_mime_type(szMediaURL, &szMime)) {
- nErr =
- mime_type_get_file_extension(szMime, &dTempExt, &nArrayLen);
+ nErr = mime_type_get_file_extension(szMime, &dTempExt, &nArrayLen);
VP_FREE(szMime);
if (szExt == NULL) {
*szFileExtention =
- g_strdup_printf(VP_PLAY_STRING_COM_UNKNOWN);
+ g_strdup_printf(VP_PLAY_STRING_COM_UNKNOWN);
} else {
VP_STRDUP(*szFileExtention, (szExt + 1));
}
}
}
} else {
- *szFileExtention =
- g_strdup_printf(VP_PLAY_STRING_COM_UNKNOWN);
+ *szFileExtention = g_strdup_printf(VP_PLAY_STRING_COM_UNKNOWN);
}
VP_FREE(dTempExt);
} else
szExt = strrchr(szMediaURL, EXT_SPLITTER);
if (szExt == NULL) {
- *szFileExtention =
- g_strdup_printf(VP_PLAY_STRING_COM_UNKNOWN);
+ *szFileExtention = g_strdup_printf(VP_PLAY_STRING_COM_UNKNOWN);
} else {
VP_STRDUP(*szFileExtention, (szExt + 1));
}
while (rtsp_protocal_name[i] != NULL) {
if (strlen(szURL) > strlen(rtsp_protocal_name[i])) {
if (strncmp
- (szURL, rtsp_protocal_name[i],
- strlen(rtsp_protocal_name[i])) == 0) {
+ (szURL, rtsp_protocal_name[i],
+ strlen(rtsp_protocal_name[i])) == 0) {
return true;
}
}
bool vp_play_util_calculator_position(Evas_Coord_Rectangle rtSrc,
- Evas_Coord_Rectangle rtDst,
- Evas_Coord_Rectangle *rtResult,
- int nType)
+ Evas_Coord_Rectangle rtDst,
+ Evas_Coord_Rectangle * rtResult,
+ int nType)
{
video_play_display_mode_t nMode = (video_play_display_mode_t) nType;
rtResult->y = (rtDst.h - rtResult->h) / 2;
} else if ((nMode == VIDEO_DISPLAY_FULL)
- || (nMode == VIDEO_DISPLAY_CROPPED_FULL)) {
+ || (nMode == VIDEO_DISPLAY_CROPPED_FULL)) {
rtResult->w = rtDst.w;
rtResult->h = rtDst.h;
rtResult->x = 0;
}
bool vp_play_util_save_file(const char *szFileName, char *szBuffer,
- int nSize)
+ int nSize)
{
if (!szFileName) {
VideoLogError("szFileName is NULL");
}
if (!g_file_set_contents
- (szFileName, (const char *) szBuffer, nSize, NULL)) {
+ (szFileName, (const char *) szBuffer, nSize, NULL)) {
VideoLogError("g_file_set_contents is fail");
return FALSE;
}
connection_destroy(connection);
if (err != CONNECTION_ERROR_NONE) {
- VideoLogWarning("connection_get_type error. err is [%d]",
- err);
+ VideoLogWarning("connection_get_type error. err is [%d]", err);
bSuccessful = false;
}
Eina_Bool bRet = EINA_FALSE;
if (szPreviewUrl) {
bRet =
- eina_str_has_prefix(szPreviewUrl, VP_PLAY_PERSONAL_HEAD_STR);
+ eina_str_has_prefix(szPreviewUrl, VP_PLAY_PERSONAL_HEAD_STR);
}
VideoSecureLogInfo("eina_str_has_prefix=%s:%d", szPreviewUrl,
- (int) bRet);
+ (int) bRet);
return (bool) bRet;
}
Eina_List *pFileList = NULL;
Eina_List *pItemList = NULL;
char *szFileName = NULL;
- char szExtWildkey[6][5] =
- { ".srt", ".sub", ".smi", ".SRT", ".SUB", ".SMI" };
+ char szExtWildkey[6][5] = { ".srt", ".sub", ".smi", ".SRT", ".SUB", ".SMI" };
int nCount = 0;
continue;
}
szExt = szFileName + strlen(szName);
- /*if (szExt == NULL) {
- VP_FREE(szName);
- continue;
- }*/
+
for (nIdx = 0; nIdx < 6; nIdx++) {
if (strcmp(szExt, szExtWildkey[nIdx]) == 0) {
nCount++;
}
bool vp_play_util_get_subtitles_from_path(const char *szPath,
- GList **pSubtitleList)
+ GList ** pSubtitleList)
{
if (szPath == NULL) {
VideoLogError("szPath is NULL");
Eina_List *pFileList = NULL;
Eina_List *pItemList = NULL;
char *szFileName = NULL;
- char szExtWildkey[6][5] =
- { ".srt", ".sub", ".smi", ".SRT", ".SUB", ".SMI" };
+ char szExtWildkey[6][5] = { ".srt", ".sub", ".smi", ".SRT", ".SUB", ".SMI" };
pFileList = vp_file_ls(szPath);
continue;
}
szExt = szFileName + strlen(szName);
- /*if (szExt == NULL) {
- VP_FREE(szName);
- continue;
- }*/
for (nIdx = 0; nIdx < 6; nIdx++) {
if (strcmp(szExt, szExtWildkey[nIdx]) == 0) {
char *szSubtitleName = NULL;
szSubtitleName =
- g_strdup_printf("%s/%s", szPath, szFileName);
+ g_strdup_printf("%s/%s", szPath, szFileName);
*pSubtitleList =
- g_list_append(*pSubtitleList, szSubtitleName);
+ g_list_append(*pSubtitleList, szSubtitleName);
}
}
VP_FREE(szName);
return TRUE;
}
-bool vp_play_util_get_subtitle_path_list(GList **subtitleList)
+bool vp_play_util_get_subtitle_path_list(GList ** subtitleList)
{
if (NULL == subtitleList) {
VideoLogError("subtitleList is NULL");
}
unsigned long long vp_play_util_get_disk_available_space(const char
- *szFilePath)
+ *szFilePath)
{
if (szFilePath == NULL) {
VideoLogError("szFilePath is NULL");
int nRet = 0;
struct statvfs info;
if (szFilePath
- && 0 == strncmp(szFilePath, VP_ROOT_PATH_MMC,
- strlen(VP_ROOT_PATH_MMC))) {
+ && 0 == strncmp(szFilePath, VP_ROOT_PATH_MMC,
+ strlen(VP_ROOT_PATH_MMC))) {
if (-1 == statvfs(VP_ROOT_PATH_MMC, &info)) {
return 0;
}
}
}
- return (info.f_bsize) * ((unsigned long long)info.f_bavail);
+ return (info.f_bsize) * ((unsigned long long) info.f_bavail);
}
unsigned long long vp_play_util_get_file_size(const char *szFilePath)
bool vp_play_util_get_city(const char *szLocation, char **szCity)
{
-#define LOCATION_MAX_LEN 256
+#define LOCATION_MAX_LEN 256
if (!szLocation) {
VideoLogError("szLocation is invalid");
bool vp_play_util_is_Xwindow_focused(Ecore_X_Window nXwinID)
{
-#if 0//Tizen3.0 Build error
- Ecore_X_Window nXWindowFocus = 0;
-
- nXWindowFocus = ecore_x_window_focus_get();
-
- if (nXWindowFocus == nXwinID) {
- return TRUE;
- } else
-#endif
- return TRUE;
+ return TRUE;
}
char *vp_play_util_convert_rgba_to_hex(int r, int g, int b, int a)
char *pColorHex;
pColorHex =
- g_strdup_printf("#%08lx",
- (long unsigned int)(r << 24 | g << 16 | b << 8 |
- a));
+ g_strdup_printf("#%08lx",
+ (long unsigned int) (r << 24 | g << 16 | b << 8 |
+ a));
return pColorHex;
}
bool vp_play_util_convert_hex_to_rgba(char *pColorHex, int *r, int *g,
- int *b, int *a)
+ int *b, int *a)
{
if (pColorHex == NULL) {
return FALSE;
return TRUE;
}
-void vp_play_util_set_object_size(Evas_Object *obj, int w, int h, int id)
+void vp_play_util_set_object_size(Evas_Object * obj, int w, int h, int id)
{
Edje_Message_Int_Set *msg =
- (Edje_Message_Int_Set *) malloc(sizeof(Edje_Message_Int_Set) +
- 3 * sizeof(int));
+ (Edje_Message_Int_Set *) malloc(sizeof(Edje_Message_Int_Set) +
+ 3 * sizeof(int));
if (!msg) {
return;
}
free(msg);
}
-void vp_play_util_set_object_color(Evas_Object *obj, int r, int g, int b,
- int a, int id)
+void vp_play_util_set_object_color(Evas_Object * obj, int r, int g, int b,
+ int a, int id)
{
Edje_Message_Int_Set *msg =
- (Edje_Message_Int_Set *) malloc(sizeof(Edje_Message_Int_Set) +
- 4 * sizeof(int));
+ (Edje_Message_Int_Set *) malloc(sizeof(Edje_Message_Int_Set) +
+ 4 * sizeof(int));
if (!msg) {
return;
}
free(msg);
}
-void vp_play_util_set_object_offset(Evas_Object *obj, int left, int top,
- int id)
+void vp_play_util_set_object_offset(Evas_Object * obj, int left, int top,
+ int id)
{
Edje_Message_Int_Set *msg =
- (Edje_Message_Int_Set *) malloc(sizeof(Edje_Message_Int_Set) +
- 2 * sizeof(float));
+ (Edje_Message_Int_Set *) malloc(sizeof(Edje_Message_Int_Set) +
+ 2 * sizeof(float));
if (!msg) {
return;
}
free(msg);
}
-static int __vp_play_util_append_variant(GDBusMessage *msg, const char *sig, const char *param[])
+static int __vp_play_util_append_variant(GDBusMessage * msg,
+ const char *sig,
+ const char *param[])
{
-/*
- char *ch;
- int i;
- int int_type;
- uint64_t int64_type;
- GVariant *result_int32;
- GVariant *result_uint32;
- GVariant *result_uint64;
- GVariant *result_string;
-*/
GVariant *var;
if (!sig || !param) {
return 0;
}
- if(strcmp(sig, "sssi") == 0) {
+ if (strcmp(sig, "sssi") == 0) {
VideoLogError("Signature is sssi type");
- var = g_variant_new("(sssi)", param[0], param[1], param[2], atoi(param[3]));
- } else if(strcmp(sig, "ss") == 0) {
+ var =
+ g_variant_new("(sssi)", param[0], param[1], param[2],
+ atoi(param[3]));
+ } else if (strcmp(sig, "ss") == 0) {
VideoLogError("Signature is ss type");
- var = g_variant_new("(ss)", param[0], param[1]);
+ var = g_variant_new("(ss)", param[0], param[1]);
}
g_dbus_message_set_body(msg, var);
-/*
- for (ch = (char*)sig, i = 0; *ch != '\0'; ++i, ++ch) {
- VideoLogInfo("i=%d, ch = %c param = %s", i, *ch, param[i]);
-
- switch (*ch) {
- case 'i':
- int_type = atoi(param[i]);
- result_int32 = g_variant_new ("i", int_type);
- g_dbus_message_set_body(msg, result_int32);
- break;
- case 'u':
- int_type = atoi(param[i]);
- result_uint32 = g_variant_new("u", int_type);
- g_dbus_message_set_body(msg, result_uint32);
- break;
- case 't':
- int64_type = atoi(param[i]);
- result_uint64 = g_variant_new("t", int64_type);
- g_dbus_message_set_body(msg, result_uint64);
- break;
- case 's':
- result_string = g_variant_new("s", param[i]);
- g_dbus_message_set_body(msg, result_string);
- break;
- default:
- return -EINVAL;
- }
- }
-*/
return 0;
}
#define GDBUS_REPLY_TIMEOUT (-1)
-GDBusMessage * vp_play_util_invoke_dbus_method(const char *dest, const char *path,
- const char *interface, const char *method,
- const char *sig, const char *param[])
+GDBusMessage *vp_play_util_invoke_dbus_method(const char *dest,
+ const char *path,
+ const char *interface,
+ const char *method,
+ const char *sig,
+ const char *param[])
{
VideoLogInfo("");
conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
if (!conn) {
- VideoLogError("e_dbus_bus_get error: %s", err ? err->message : "none");
+ VideoLogError("e_dbus_bus_get error: %s",
+ err ? err->message : "none");
g_error_free(err);
return NULL;
}
return NULL;
}
- reply = g_dbus_connection_send_message_with_reply_sync(conn, msg, G_DBUS_SEND_MESSAGE_FLAGS_NONE, GDBUS_REPLY_TIMEOUT, NULL, NULL, &err);
+ reply =
+ g_dbus_connection_send_message_with_reply_sync(conn, msg,
+ G_DBUS_SEND_MESSAGE_FLAGS_NONE,
+ GDBUS_REPLY_TIMEOUT,
+ NULL, NULL, &err);
if (!reply) {
- VideoLogError("g_dbus_connection_send_message_with_reply_sync error : (%s) %s %s:%s-%s", err ? err->message : "none", dest, path, interface, method);
+ VideoLogError
+ ("g_dbus_connection_send_message_with_reply_sync error : (%s) %s %s:%s-%s",
+ err ? err->message : "none", dest, path, interface, method);
g_error_free(err);
g_object_unref(msg);
g_object_unref(conn);
} else {
- VideoLogInfo("g_dbus_connection_send_message_with_reply_sync success");
+ VideoLogInfo
+ ("g_dbus_connection_send_message_with_reply_sync success");
}
return reply;
}
-void
-vp_play_util_set_lock_power_key()
+void vp_play_util_set_lock_power_key()
{
VideoLogDebug("lock power key pressed");
- const char *arr[] = {"lcdon", "gotostatenow", "holdkeyblock", "0"};
+ const char *arr[] = { "lcdon", "gotostatenow", "holdkeyblock", "0" };
GDBusMessage *msg;
- msg = vp_play_util_invoke_dbus_method("org.tizen.system.deviced", "/Org/Tizen/System/DeviceD/Display",
- "org.tizen.system.deviced.display", "lockstate", "sssi", arr);
+ msg =
+ vp_play_util_invoke_dbus_method("org.tizen.system.deviced",
+ "/Org/Tizen/System/DeviceD/Display",
+ "org.tizen.system.deviced.display",
+ "lockstate", "sssi", arr);
if (!msg) {
VideoLogError("vp_play_util_invoke_dbus_method failed");
}
}
-void
-vp_play_util_set_unlock_power_key()
+void vp_play_util_set_unlock_power_key()
{
VideoLogDebug("unlock power key pressed");
- const char *arr[] = {"lcdon", "resettimer"};
+ const char *arr[] = { "lcdon", "resettimer" };
GDBusMessage *msg = NULL;
- msg = vp_play_util_invoke_dbus_method("org.tizen.system.deviced", "/Org/Tizen/System/DeviceD/Display",
- "org.tizen.system.deviced.display", "unlockstate", "ss", arr);
+ msg =
+ vp_play_util_invoke_dbus_method("org.tizen.system.deviced",
+ "/Org/Tizen/System/DeviceD/Display",
+ "org.tizen.system.deviced.display",
+ "unlockstate", "ss", arr);
if (!msg) {
VideoLogError("vp_play_util_invoke_dbus_method failed");
}
}
-void vp_play_util_focus_next_object_set(Evas_Object *obj,
- Evas_Object *next,
- Elm_Focus_Direction dir)
+void vp_play_util_focus_next_object_set(Evas_Object * obj,
+ Evas_Object * next,
+ Elm_Focus_Direction dir)
{
if (obj) {
elm_object_focus_next_object_set(obj, next, dir);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
#include "vp-play-type-define.h"
-bool vp_avrcp_initialize(PlayView* pViewHandle);
+bool vp_avrcp_initialize(PlayView * pViewHandle);
bool vp_avrcp_deinitialize();
-bool vp_avrcp_noti_track(const char *title, const char *artist, const char *album, const char *genre, unsigned int duration);
+bool vp_avrcp_noti_track(const char *title, const char *artist,
+ const char *album, const char *genre,
+ unsigned int duration);
bool vp_avrcp_noti_track_position(unsigned int position);
bool vp_avrcp_noti_player_state(vp_mm_player_state_t nState);
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
void vp_language_list_destroy();
char *vp_language_get_name(const char *szCode);
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
#include <Elementary.h>
-//bool vp_device_display_init(int nColorTone, int nOutdoor);
-//bool vp_device_display_deinit();
-//bool vp_device_display_set_color_tone(int nColorTone);
-//bool vp_device_display_set_outdoor_visibility(int nOutdoor);
bool vp_device_display_lcd_lock(void);
bool vp_device_display_lcd_unlock(void);
bool vp_device_set_frame_rate(int nRate);
bool vp_device_get_max_brightness(int *nMaxVal);
bool vp_device_get_min_brightness(int *nMinVal);
bool vp_device_set_screen_off(bool bLock);
-
-
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <stdbool.h>
#include <Elementary.h>
-typedef void (*HollICEventCbFunc)(bool bCoverState, void* pUserData);
+typedef void (*HollICEventCbFunc) (bool bCoverState, void *pUserData);
typedef void *hollic_handle;
-hollic_handle vp_hollic_create_handle(HollICEventCbFunc pEventCb, void* pUserData);
+hollic_handle vp_hollic_create_handle(HollICEventCbFunc pEventCb,
+ void *pUserData);
void vp_hollic_destroy_handle(hollic_handle pHollICHandle);
-
- /*
-* 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.
-*
-*/
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <stdbool.h>
#include <glib.h>
-bool vp_image_util_image_resize_save(const char *szFilePath, const unsigned char *pSrcBuf, int nSrcW, int nSrcH, int nDestW, int nDestH, int nQuality);
-bool vp_image_util_image_save(const char *szFilePath, const unsigned char *pSrcBuf, int nSrcW, int nSrcH, int nQuality);
-
+bool vp_image_util_image_resize_save(const char *szFilePath,
+ const unsigned char *pSrcBuf,
+ int nSrcW, int nSrcH, int nDestW,
+ int nDestH, int nQuality);
+bool vp_image_util_image_save(const char *szFilePath,
+ const unsigned char *pSrcBuf, int nSrcW,
+ int nSrcH, int nQuality);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <Elementary.h>
-typedef void (*MediaUpdateCb)(void* pUserData);
+typedef void (*MediaUpdateCb) (void *pUserData);
bool vp_media_contents_disconnect();
/* common functions */
-bool vp_media_contents_get_video_id(const char *szFilePath, char **szVideoID);
-bool vp_media_contents_get_video_thumbnail_path(const char *szFilePath, char **szThumbnailPath);
+bool vp_media_contents_get_video_id(const char *szFilePath,
+ char **szVideoID);
+bool vp_media_contents_get_video_thumbnail_path(const char *szFilePath,
+ char **szThumbnailPath);
bool vp_media_contents_scan_file(const char *szFilePath);
bool vp_media_contents_update_db(const char *szMediaURL);
bool vp_media_contents_refresh_db(const char *szMediaID);
-bool vp_media_contents_set_played_position(const char *szFilePath, int nPosition);
-bool vp_media_contents_get_played_position(const char *szFilePath, int *nPosition);
+bool vp_media_contents_set_played_position(const char *szFilePath,
+ int nPosition);
+bool vp_media_contents_get_played_position(const char *szFilePath,
+ int *nPosition);
bool vp_media_contents_set_played_time(const char *szFilePath);
-bool vp_media_contents_get_content_info(const char *szFilePath, char **szTitle, int *nWidth, int *nHeight, int *nDuration, double *dLatitude, double *dLongitude, char **szTmpLastModified);
-bool vp_media_metadata_get_gps_info(const char *szFilePath, double *dLatitude, double *dLongitude);
-bool vp_media_metadata_get_duration(const char *szFilePath, int *nDuration);
+bool vp_media_contents_get_content_info(const char *szFilePath,
+ char **szTitle, int *nWidth,
+ int *nHeight, int *nDuration,
+ double *dLatitude,
+ double *dLongitude,
+ char **szTmpLastModified);
+bool vp_media_metadata_get_gps_info(const char *szFilePath,
+ double *dLatitude, double *dLongitude);
+bool vp_media_metadata_get_duration(const char *szFilePath,
+ int *nDuration);
bool vp_media_metadata_get_width(const char *szFilePath, int *nWidth);
bool vp_media_metadata_get_height(const char *szFilePath, int *nHeight);
-bool vp_media_contents_get_cloud_attribute(const char *szFilePath, bool *bCloud);
+bool vp_media_contents_get_cloud_attribute(const char *szFilePath,
+ bool * bCloud);
/* bookmark functions */
-bool vp_media_contents_bookmark_list_get(const char *szMediaID, GList **list);
-bool vp_media_contents_bookmark_list_clear(GList *pList);
-bool vp_media_contents_bookmark_insert(const char *szMediaID, int nPosition, const char *szFilePath);
-bool vp_media_contents_bookmark_delete(const char *szMediaID, int nPosition);
-bool vp_media_contents_bookmark_get_item_info(void *pItem, char **szFilePath, int *nPosition);
+bool vp_media_contents_bookmark_list_get(const char *szMediaID,
+ GList ** list);
+bool vp_media_contents_bookmark_list_clear(GList * pList);
+bool vp_media_contents_bookmark_insert(const char *szMediaID,
+ int nPosition,
+ const char *szFilePath);
+bool vp_media_contents_bookmark_delete(const char *szMediaID,
+ int nPosition);
+bool vp_media_contents_bookmark_get_item_info(void *pItem,
+ char **szFilePath,
+ int *nPosition);
bool vp_media_contents_bookmark_delete_all(const char *szMediaID);
-bool vp_media_contents_get_video_items_to_folder(int nSortType, char *szFolder, GList **pList);
-bool vp_media_contents_get_video_items(int nSortType, GList **pList);
-bool vp_media_contents_free_video_items(GList *pList);
+bool vp_media_contents_get_video_items_to_folder(int nSortType,
+ char *szFolder,
+ GList ** pList);
+bool vp_media_contents_get_video_items(int nSortType, GList ** pList);
+bool vp_media_contents_free_video_items(GList * pList);
-bool vp_media_contents_get_next_file_path(const char *szMediaURL, char **szNextURL, bool bLoop, GList *pList);
-bool vp_media_contents_get_prev_file_path(const char *szMediaURL, char **szPrevURL, bool bLoop, GList *pList);
+bool vp_media_contents_get_next_file_path(const char *szMediaURL,
+ char **szNextURL, bool bLoop,
+ GList * pList);
+bool vp_media_contents_get_prev_file_path(const char *szMediaURL,
+ char **szPrevURL, bool bLoop,
+ GList * pList);
bool vp_media_contents_set_update_cb(MediaUpdateCb pFunc, void *pUserData);
void vp_media_contents_unset_update_cb();
/*tag buddy */
-bool vp_media_contents_set_location_tag(const char *szFilePath, const char *city);
-bool vp_media_contents_get_location_tag(const char *szFilePath, char **szLocationTag);
-bool vp_media_contents_set_weahter_tag(const char *szFilePath, const char *weather);
-bool vp_media_contents_get_weahter_tag(const char *szFilePath, char **szWeatherTag);
+bool vp_media_contents_set_location_tag(const char *szFilePath,
+ const char *city);
+bool vp_media_contents_get_location_tag(const char *szFilePath,
+ char **szLocationTag);
+bool vp_media_contents_set_weahter_tag(const char *szFilePath,
+ const char *weather);
+bool vp_media_contents_get_weahter_tag(const char *szFilePath,
+ char **szWeatherTag);
/*subtitle file*/
-bool vp_media_contents_subtitle_list_get(GList **list);
+bool vp_media_contents_subtitle_list_get(GList ** list);
bool vp_media_contents_file_is_exist(const char *szFilePath);
bool vp_media_contents_del_video(const char *szFilePath);
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
VP_MEDIA_KEY_NEXT,
VP_MEDIA_KEY_FASTFORWARD,
VP_MEDIA_KEY_STOP,
-}vp_media_key_event_t;
+} vp_media_key_event_t;
-typedef void (*MediaKeyEventCbFunc)(vp_media_key_event_t nKey, bool bRelease, void* pUserData);
+typedef void (*MediaKeyEventCbFunc) (vp_media_key_event_t nKey,
+ bool bRelease, void *pUserData);
typedef void *media_key_handle;
-media_key_handle vp_media_key_create(Evas_Object *pWin, MediaKeyEventCbFunc pEventCb);
+media_key_handle vp_media_key_create(Evas_Object * pWin,
+ MediaKeyEventCbFunc pEventCb);
void vp_media_key_destroy(media_key_handle pMediaKeyHandle);
bool vp_media_key_realize(media_key_handle pMediaKeyHandle);
bool vp_media_key_unrealize(media_key_handle pMediaKeyHandle);
-bool vp_media_key_set_user_data(media_key_handle pMediaKeyHandle, void *pUserData);
-
+bool vp_media_key_set_user_data(media_key_handle pMediaKeyHandle,
+ void *pUserData);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
VP_MM_PLAYER_FILTER_VOICE,
VP_MM_PLAYER_FILTER_MOVIE,
VP_MM_PLAYER_FILTER_VITUAL_71,
-}vp_mm_player_sound_filter_t;
+} vp_mm_player_sound_filter_t;
typedef enum {
VP_MM_PLAYER_VIDEO_TYPE_X11 = 0x00,
VP_MM_PLAYER_VIDEO_TYPE_EVAS
-}vp_mm_player_video_sink_t;
+} vp_mm_player_video_sink_t;
typedef enum {
VP_MM_PLAYER_ROTATE_0 = 0x00,
VP_MM_PLAYER_ROTATE_90,
VP_MM_PLAYER_ROTATE_180,
VP_MM_PLAYER_ROTATE_270
-}vp_mm_player_rotate_t;
+} vp_mm_player_rotate_t;
typedef enum {
VP_MM_PLAYER_REALIZE_ASYNC_CB = 0x00,
VP_MM_PLAYER_CAPTURE_VIDEO_CB,
VP_MM_PLAYER_MISSED_PLUGIN_CB,
VP_MM_PLAYER_IMAGE_BUFFER_CB,
-}vp_mm_player_callback_t;
+} vp_mm_player_callback_t;
typedef enum {
VP_MM_PLAYER_ERR_DRM_EXPIRED,
VP_MM_PLAYER_ERR_DRM_NO_LICENSE,
VP_MM_PLAYER_ERR_DRM_FUTURE_USE
-}vp_mm_player_error_t;
+} vp_mm_player_error_t;
typedef enum {
VP_MM_PLAYER_INTERRUPTED_COMPLETED = 0x00,
VP_MM_PLAYER_INTERRUPTED_BY_EMERGENCY,
VP_MM_PLAYER_INTERRUPTED_RESUMABLE_MEDIA,
VP_MM_PLAYER_INTERRUPTED_NOTIFICATION
-}vp_mm_player_interrupt_t;
+} vp_mm_player_interrupt_t;
typedef enum {
VP_MM_PLAYER_PD_STARTED = 0x00,
VP_MM_PLAYER_PD_COMPLETED
-}vp_mm_player_pd_message_t;
+} vp_mm_player_pd_message_t;
typedef enum {
VP_MM_PLAYER_STATE_NONE = 0x00,
VP_MM_PLAYER_STATE_PLAYING,
VP_MM_PLAYER_STATE_PAUSED,
VP_MM_PLAYER_STATE_STOP, // define for AVRCP
-}vp_mm_player_state_t;
+} vp_mm_player_state_t;
typedef enum {
VP_MM_PLAYER_DISPLAY_LETTER_BOX = 0x00,
VP_MM_PLAYER_DISPLAY_FULL_SCREEN,
VP_MM_PLAYER_DISPLAY_CROPPED_FULL,
VP_MM_PLAYER_DISPLAY_ORIGIN_SIZE,
-}vp_mm_player_display_mode_t;
+} vp_mm_player_display_mode_t;
typedef enum {
VP_MM_PLAYER_MISSED_PLUGIN_UNKNOWN = 0x00,
VP_MM_PLAYER_MISSED_PLUGIN_AUDIO,
VP_MM_PLAYER_MISSED_PLUGIN_VIDEO,
-}vp_mm_player_missed_plugin_t;
+} vp_mm_player_missed_plugin_t;
typedef enum {
VP_MM_PLAYER_SUBTITLE_HALIGN_LEFT = 0x00,
VP_MM_PLAYER_SUBTITLE_HALIGN_CENTER,
VP_MM_PLAYER_SUBTITLE_HALIGN_RIGHT
-}vp_mm_player_subtitle_halign_t;
-
-typedef void(*vp_mm_player_prepare_cb)(void *pUserData);
-typedef void(*vp_mm_player_completed_cb )(void *pUserData);
-typedef void(*vp_mm_player_seek_completed_cb )(void *pUserData);
-typedef void(*vp_mm_player_interrupted_cb )(vp_mm_player_interrupt_t nCode, void *pUserData);
-typedef void(*vp_mm_player_error_cb )(vp_mm_player_error_t nError, void *pUserData);
-typedef void(*vp_mm_player_buffering_cb )(int nPercent, void *pUserData);
-typedef void(*vp_mm_player_subtitle_updated_cb )(unsigned long nDuration, char *text, void *pUserData);
-typedef void(*vp_mm_player_pd_message_cb )(vp_mm_player_pd_message_t nType, void *pUserData);
-typedef void(*vp_mm_player_video_captured_cb )(unsigned char *pFrame, int nWidth, int nHeight, unsigned int nSize, void *pUserData);
-typedef void(*vp_mm_player_missed_plugin_cb )(vp_mm_player_missed_plugin_t nMissedType, void *pUserData);
-typedef void(*vp_mm_player_image_buffer_updated_cb)(char *pBuffer, int nSize, void *pUserData);
+} vp_mm_player_subtitle_halign_t;
+
+typedef void (*vp_mm_player_prepare_cb) (void *pUserData);
+typedef void (*vp_mm_player_completed_cb) (void *pUserData);
+typedef void (*vp_mm_player_seek_completed_cb) (void *pUserData);
+typedef void (*vp_mm_player_interrupted_cb) (vp_mm_player_interrupt_t
+ nCode, void *pUserData);
+typedef void (*vp_mm_player_error_cb) (vp_mm_player_error_t nError,
+ void *pUserData);
+typedef void (*vp_mm_player_buffering_cb) (int nPercent, void *pUserData);
+typedef void (*vp_mm_player_subtitle_updated_cb) (unsigned long nDuration,
+ char *text,
+ void *pUserData);
+typedef void (*vp_mm_player_pd_message_cb) (vp_mm_player_pd_message_t
+ nType, void *pUserData);
+typedef void (*vp_mm_player_video_captured_cb) (unsigned char *pFrame,
+ int nWidth, int nHeight,
+ unsigned int nSize,
+ void *pUserData);
+typedef void (*vp_mm_player_missed_plugin_cb) (vp_mm_player_missed_plugin_t
+ nMissedType,
+ void *pUserData);
+typedef void (*vp_mm_player_image_buffer_updated_cb) (char *pBuffer,
+ int nSize,
+ void *pUserData);
typedef struct _MMPlayerCbFunc {
vp_mm_player_rotate_t nRotate;
vp_mm_player_state_t nState;
vp_mm_player_display_mode_t nDisplayMode;
- sound_stream_info_h stream_info;
+ sound_stream_info_h stream_info;
int nDuration;
int nVideoWidth;
mm_player_handle vp_mm_player_create();
void vp_mm_player_destroy(mm_player_handle pPlayerHandle);
bool vp_mm_player_realize(mm_player_handle pPlayerHandle, char *szPath);
-bool vp_mm_player_realize_async(mm_player_handle pPlayerHandle, char *szPath);
+bool vp_mm_player_realize_async(mm_player_handle pPlayerHandle,
+ char *szPath);
bool vp_mm_player_unrealize(mm_player_handle pPlayerHandle);
bool vp_mm_player_is_realize(mm_player_handle pPlayerHandle);
-bool vp_mm_player_set_callback(mm_player_handle pPlayerHandle, vp_mm_player_callback_t nCallbackType, void *pCallback);
-bool vp_mm_player_set_user_param(mm_player_handle pPlayerHandle, void *pParam);
-bool vp_mm_player_set_stream_info(mm_player_handle pPlayerHandle, void *stream_info);
+bool vp_mm_player_set_callback(mm_player_handle pPlayerHandle,
+ vp_mm_player_callback_t nCallbackType,
+ void *pCallback);
+bool vp_mm_player_set_user_param(mm_player_handle pPlayerHandle,
+ void *pParam);
+bool vp_mm_player_set_stream_info(mm_player_handle pPlayerHandle,
+ void *stream_info);
bool vp_mm_player_play(mm_player_handle pPlayerHandle);
bool vp_mm_player_stop(mm_player_handle pPlayerHandle);
bool vp_mm_player_pause(mm_player_handle pPlayerHandle);
-bool vp_mm_player_get_state(mm_player_handle pPlayerHandle, vp_mm_player_state_t *nState);
+bool vp_mm_player_get_state(mm_player_handle pPlayerHandle,
+ vp_mm_player_state_t * nState);
-bool vp_mm_player_get_position(mm_player_handle pPlayerHandle, int *nPosition);
-bool vp_mm_player_set_position(mm_player_handle pPlayerHandle, int nPosition);
-bool vp_mm_player_set_position_by_key_frame(mm_player_handle pPlayerHandle, int nPosition);
+bool vp_mm_player_get_position(mm_player_handle pPlayerHandle,
+ int *nPosition);
+bool vp_mm_player_set_position(mm_player_handle pPlayerHandle,
+ int nPosition);
+bool vp_mm_player_set_position_by_key_frame(mm_player_handle pPlayerHandle,
+ int nPosition);
-bool vp_mm_player_get_buffering_position(mm_player_handle pPlayerHandle, int *nPosition);
+bool vp_mm_player_get_buffering_position(mm_player_handle pPlayerHandle,
+ int *nPosition);
bool vp_mm_player_set_scaling(mm_player_handle pPlayerHandle, bool bScale);
bool vp_mm_player_set_loop(mm_player_handle pPlayerHandle, bool bLoop);
bool vp_mm_player_set_mute(mm_player_handle pPlayerHandle, bool bMute);
-bool vp_mm_player_get_mute(mm_player_handle pPlayerHandle, bool *bMute);
-bool vp_mm_player_get_duration(mm_player_handle pPlayerHandle, int *nDuration);
-bool vp_mm_player_get_codecinfo(mm_player_handle pPlayerHandle, char **audio_codec, char **video_codec);
-
-bool vp_mm_player_set_video_sink(mm_player_handle pPlayerHandle, int nType, void *pSink);
-bool vp_mm_player_set_video_rotate(mm_player_handle pPlayerHandle, int nRotate);
-bool vp_mm_player_set_display_mode(mm_player_handle pPlayerHandle, vp_mm_player_display_mode_t nDisplayMode);
-
-bool vp_mm_player_get_resolution(mm_player_handle pPlayerHandle, int *nWidth, int *nHeight);
-
-bool vp_mm_player_set_subtitle_url(mm_player_handle pPlayerHandle, char *szSubtitlePath);
-bool vp_mm_player_get_subtitle_url(mm_player_handle pPlayerHandle, char **szSubtitlePath);
-bool vp_mm_player_set_subtitle_position(mm_player_handle pPlayerHandle, int nPosition);
-bool vp_mm_player_set_subtitle_font(mm_player_handle pPlayerHandle, char *szFamilyName, char *szStyle, int nSize);
-bool vp_mm_player_set_subtitle_font_color(mm_player_handle pPlayerHandle, unsigned int nForegroundColor, unsigned int nBGColor);
-bool vp_mm_player_subtitle_ignore_markup_tags(mm_player_handle pPlayerHandle, bool bIgnoreMarkup);
-bool vp_mm_player_subtitle_set_alignment_in_line(mm_player_handle pPlayerHandle, vp_mm_player_subtitle_halign_t type);
-bool vp_mm_player_subtitle_set_alignment_horizontal(mm_player_handle pPlayerHandle, vp_mm_player_subtitle_halign_t type);
-bool vp_mm_player_subtitle_apply_alignment_right_away(mm_player_handle pPlayerHandle);
-bool vp_mm_player_set_deactivate_subtitle(mm_player_handle pPlayerHandle, bool bDeactivate);
-
-bool vp_mm_player_set_volume(mm_player_handle pPlayerHandle, float fLeft, float fRight);
-bool vp_mm_player_get_volume(mm_player_handle pPlayerHandle, float *fLeft, float *fRight);
-
-bool vp_mm_player_set_sound_filter(mm_player_handle pPlayerHandle, vp_mm_player_sound_filter_t nFilter);
-bool vp_mm_player_get_sound_filter(mm_player_handle pPlayerHandle, vp_mm_player_sound_filter_t *nFilter);
+bool vp_mm_player_get_mute(mm_player_handle pPlayerHandle, bool * bMute);
+bool vp_mm_player_get_duration(mm_player_handle pPlayerHandle,
+ int *nDuration);
+bool vp_mm_player_get_codecinfo(mm_player_handle pPlayerHandle,
+ char **audio_codec, char **video_codec);
+
+bool vp_mm_player_set_video_sink(mm_player_handle pPlayerHandle, int nType,
+ void *pSink);
+bool vp_mm_player_set_video_rotate(mm_player_handle pPlayerHandle,
+ int nRotate);
+bool vp_mm_player_set_display_mode(mm_player_handle pPlayerHandle,
+ vp_mm_player_display_mode_t
+ nDisplayMode);
+
+bool vp_mm_player_get_resolution(mm_player_handle pPlayerHandle,
+ int *nWidth, int *nHeight);
+
+bool vp_mm_player_set_subtitle_url(mm_player_handle pPlayerHandle,
+ char *szSubtitlePath);
+bool vp_mm_player_get_subtitle_url(mm_player_handle pPlayerHandle,
+ char **szSubtitlePath);
+bool vp_mm_player_set_subtitle_position(mm_player_handle pPlayerHandle,
+ int nPosition);
+bool vp_mm_player_set_subtitle_font(mm_player_handle pPlayerHandle,
+ char *szFamilyName, char *szStyle,
+ int nSize);
+bool vp_mm_player_set_subtitle_font_color(mm_player_handle pPlayerHandle,
+ unsigned int nForegroundColor,
+ unsigned int nBGColor);
+bool vp_mm_player_subtitle_ignore_markup_tags(mm_player_handle
+ pPlayerHandle,
+ bool bIgnoreMarkup);
+bool vp_mm_player_subtitle_set_alignment_in_line(mm_player_handle
+ pPlayerHandle,
+ vp_mm_player_subtitle_halign_t
+ type);
+bool vp_mm_player_subtitle_set_alignment_horizontal(mm_player_handle
+ pPlayerHandle,
+ vp_mm_player_subtitle_halign_t
+ type);
+bool vp_mm_player_subtitle_apply_alignment_right_away(mm_player_handle
+ pPlayerHandle);
+bool vp_mm_player_set_deactivate_subtitle(mm_player_handle pPlayerHandle,
+ bool bDeactivate);
+
+bool vp_mm_player_set_volume(mm_player_handle pPlayerHandle, float fLeft,
+ float fRight);
+bool vp_mm_player_get_volume(mm_player_handle pPlayerHandle, float *fLeft,
+ float *fRight);
+
+bool vp_mm_player_set_sound_filter(mm_player_handle pPlayerHandle,
+ vp_mm_player_sound_filter_t nFilter);
+bool vp_mm_player_get_sound_filter(mm_player_handle pPlayerHandle,
+ vp_mm_player_sound_filter_t * nFilter);
bool vp_mm_player_capture_start(mm_player_handle pPlayerHandle);
bool vp_mm_player_is_closed_caption_exist(mm_player_handle pPlayerHandle);
-bool vp_mm_player_get_audio_track_count(mm_player_handle pPlayerHandle, int *nCount);
-bool vp_mm_player_get_audio_track_language_code(mm_player_handle pPlayerHandle, int nIndex, char **szCode);
-bool vp_mm_player_set_audio_track(mm_player_handle pPlayerHandle, int nIndex);
-
-bool vp_mm_player_get_subtitle_track_count(mm_player_handle pPlayerHandle, int *nCount);
-bool vp_mm_player_get_subtitle_track_language_code(mm_player_handle pPlayerHandle, int nIndex, char **szCode);
-bool vp_mm_player_set_subtitle_track(mm_player_handle pPlayerHandle, int nIndex);
+bool vp_mm_player_get_audio_track_count(mm_player_handle pPlayerHandle,
+ int *nCount);
+bool vp_mm_player_get_audio_track_language_code(mm_player_handle
+ pPlayerHandle, int nIndex,
+ char **szCode);
+bool vp_mm_player_set_audio_track(mm_player_handle pPlayerHandle,
+ int nIndex);
+
+bool vp_mm_player_get_subtitle_track_count(mm_player_handle pPlayerHandle,
+ int *nCount);
+bool vp_mm_player_get_subtitle_track_language_code(mm_player_handle
+ pPlayerHandle,
+ int nIndex,
+ char **szCode);
+bool vp_mm_player_set_subtitle_track(mm_player_handle pPlayerHandle,
+ int nIndex);
#ifdef _SUBTITLE_MULTI_LANGUAGE
-bool vp_mm_player_add_subtitle_language(mm_player_handle pPlayerHandle, int nIndex);
-bool vp_mm_player_remove_subtitle_language(mm_player_handle pPlayerHandle, int nIndex);
-bool vp_mm_player_track_foreach_selected_subtitle_language(mm_player_handle pPlayerHandle, void *pCallback, void *pUserData);
+bool vp_mm_player_add_subtitle_language(mm_player_handle pPlayerHandle,
+ int nIndex);
+bool vp_mm_player_remove_subtitle_language(mm_player_handle pPlayerHandle,
+ int nIndex);
+bool vp_mm_player_track_foreach_selected_subtitle_language(mm_player_handle
+ pPlayerHandle,
+ void *pCallback,
+ void
+ *pUserData);
#endif
-bool vp_mm_player_set_cookie(mm_player_handle pPlayerHandle, const char *szCookie);
-bool vp_mm_player_set_proxy(mm_player_handle pPlayerHandle, const char *szProxy);
+bool vp_mm_player_set_cookie(mm_player_handle pPlayerHandle,
+ const char *szCookie);
+bool vp_mm_player_set_proxy(mm_player_handle pPlayerHandle,
+ const char *szProxy);
bool vp_mm_player_set_hw_decoder(bool bEnable);
bool vp_mm_player_set_rate(mm_player_handle pPlayerHandle, float fRate);
-bool vp_mm_player_set_zoom(mm_player_handle pPlayerHandle, float fZoom, int nPosX, int nPosY);
-bool vp_mm_player_get_zoom_start_position(mm_player_handle pPlayerHandle, int *nPosX, int *nPosY);
-bool vp_mm_player_set_visible(mm_player_handle pPlayerHandle, bool bVisible);
-bool vp_mm_player_set_hub_download_mode(mm_player_handle pPlayerHandle, bool bDownload);
-
+bool vp_mm_player_set_zoom(mm_player_handle pPlayerHandle, float fZoom,
+ int nPosX, int nPosY);
+bool vp_mm_player_get_zoom_start_position(mm_player_handle pPlayerHandle,
+ int *nPosX, int *nPosY);
+bool vp_mm_player_set_visible(mm_player_handle pPlayerHandle,
+ bool bVisible);
+bool vp_mm_player_set_hub_download_mode(mm_player_handle pPlayerHandle,
+ bool bDownload);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
-bool vp_multi_path_add_item(GList **pList, const char *szURL, char *szTitle, char *szSubTitle, int nPosition, int nDuration, bool bIsSameAP);
-bool vp_multi_path_clear_item(GList *pList);
-bool vp_multi_path_set_item_subtitle(const char *szMediaURL, char *szSubtitleURL, GList *pList);
-bool vp_multi_path_set_item_position(const char *szMediaURL, int nPosition, GList *pList);
-bool vp_multi_path_get_current_item(const char *szMediaURL, char **szURL, char **szTitle, char **szSubtitle, int *nPosition, int *nDuration, bool *bIsSameAP, GList *pList);
-bool vp_multi_path_get_next_item(const char *szMediaURL, char **szURL, char **szSubtitle, int *nPosition, int *nDuration, bool bLoop, GList *pList);
-bool vp_multi_path_get_prev_item(const char *szMediaURL, char **szURL, char **szSubtitle, int *nPosition, int *nDuration, bool bLoop, GList *pList);
-
+bool vp_multi_path_add_item(GList ** pList, const char *szURL,
+ char *szTitle, char *szSubTitle, int nPosition,
+ int nDuration, bool bIsSameAP);
+bool vp_multi_path_clear_item(GList * pList);
+bool vp_multi_path_set_item_subtitle(const char *szMediaURL,
+ char *szSubtitleURL, GList * pList);
+bool vp_multi_path_set_item_position(const char *szMediaURL, int nPosition,
+ GList * pList);
+bool vp_multi_path_get_current_item(const char *szMediaURL, char **szURL,
+ char **szTitle, char **szSubtitle,
+ int *nPosition, int *nDuration,
+ bool * bIsSameAP, GList * pList);
+bool vp_multi_path_get_next_item(const char *szMediaURL, char **szURL,
+ char **szSubtitle, int *nPosition,
+ int *nDuration, bool bLoop,
+ GList * pList);
+bool vp_multi_path_get_prev_item(const char *szMediaURL, char **szURL,
+ char **szSubtitle, int *nPosition,
+ int *nDuration, bool bLoop,
+ GList * pList);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 OLD_SENSOR_API
typedef enum {
- VP_SENSOR_TYPE_NONE= 0x00,
+ VP_SENSOR_TYPE_NONE = 0x00,
VP_SENSOR_TYPE_FACEDOWN,
VP_SENSOR_TYPE_DOUBLETAP,
-}vp_sensor_type_t;
+} vp_sensor_type_t;
-typedef void (*SensorEventCbFunc)(vp_sensor_type_t nType, unsigned long long timestamp, void* pUserData);
+typedef void (*SensorEventCbFunc) (vp_sensor_type_t nType,
+ unsigned long long timestamp,
+ void *pUserData);
typedef void *sensor_handle;
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
VP_SOUND_DEVICE_MIRRORING,
VP_SOUND_DEVICE_USB_AUDIO,
VP_SOUND_DEVICE_MAX,
-}video_sound_device_type_t;
+} video_sound_device_type_t;
-typedef void(*vp_sound_route_change_cb)(int nRoute, bool bAvailable, void *pUserData);
-typedef void(*vp_sound_volume_change_cb)(int nType, int nVolume, void *pUserData);
+typedef void (*vp_sound_route_change_cb) (int nRoute, bool bAvailable,
+ void *pUserData);
+typedef void (*vp_sound_volume_change_cb) (int nType, int nVolume,
+ void *pUserData);
bool vp_sound_init_session();
bool vp_sound_deinit_session();
bool vp_sound_get_volume(int *nValue);
bool vp_sound_set_volume(int nValue);
bool vp_sound_get_max_volume(int *nMaxValue);
-bool vp_sound_get_active_device(video_sound_device_type_t *nDeviceType);
-bool vp_sound_is_sound_path_enable(bool *bIsSoundPath);
+bool vp_sound_get_active_device(video_sound_device_type_t * nDeviceType);
+bool vp_sound_is_sound_path_enable(bool * bIsSoundPath);
bool vp_sound_get_a2dp_name(char **szBTName);
bool vp_sound_set_active_route(video_sound_device_type_t nDeviceType);
-bool vp_sound_set_route_change_cb(vp_sound_route_change_cb func, void *pUserData);
-bool vp_sound_set_volume_change_cb(vp_sound_volume_change_cb func, void *pUserData);
-bool vp_sound_device_is_enable(video_sound_device_type_t nDeviceType, void *pUserData);
-
+bool vp_sound_set_route_change_cb(vp_sound_route_change_cb func,
+ void *pUserData);
+bool vp_sound_set_volume_change_cb(vp_sound_volume_change_cb func,
+ void *pUserData);
+bool vp_sound_device_is_enable(video_sound_device_type_t nDeviceType,
+ void *pUserData);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <network/bluetooth.h>
/* internal functions */
void _vp_avrcp_connection_state_changed_cb(bool connected,
- const char *remote_address,
- void *user_data)
+ const char *remote_address,
+ void *user_data)
{
if (!user_data) {
return;
}
- PlayView *pPlayView = (PlayView *)user_data;
+ PlayView *pPlayView = (PlayView *) user_data;
VideoLogInfo("Bluetooth device!!");
vp_play_normal_view_show_volume_popup(pPlayView);
if (!connected) {
}
/* external functions */
-bool vp_avrcp_initialize(PlayView* pViewHandle)
+bool vp_avrcp_initialize(PlayView * pViewHandle)
{
VideoLogInfo("vp_avrcp_initialize start");
- PlayView *pPlayView = (PlayView *)pViewHandle;
- if(!pPlayView) {
+ PlayView *pPlayView = (PlayView *) pViewHandle;
+ if (!pPlayView) {
return FALSE;
}
int nRet = bt_initialize();
}
nRet =
- bt_avrcp_target_initialize(_vp_avrcp_connection_state_changed_cb,
- pPlayView);
+ bt_avrcp_target_initialize(_vp_avrcp_connection_state_changed_cb,
+ pPlayView);
if (nRet != BT_ERROR_NONE) {
VideoLogError("bt_avrcp_target_initialize fail. nRet[%d]", nRet);
bt_deinitialize();
nRet = bt_avrcp_target_deinitialize();
if (nRet != BT_ERROR_NONE) {
- VideoLogError("bt_avrcp_target_deinitialize fail. nRet[%d]",
- nRet);
+ VideoLogError("bt_avrcp_target_deinitialize fail. nRet[%d]", nRet);
return FALSE;
}
}
bool vp_avrcp_noti_track(const char *title, const char *artist,
- const char *album, const char *genre,
- unsigned int duration)
+ const char *album, const char *genre,
+ unsigned int duration)
{
VideoLogInfo("vp_avrcp_noti_track start");
VideoLogWarning("set avrcp noti tack. duration[%d]", duration);
nRet =
- bt_avrcp_target_notify_track(title, artist, album, genre, 1, 1,
- duration);
+ bt_avrcp_target_notify_track(title, artist, album, genre, 1, 1,
+ duration);
if (nRet != BT_ERROR_NONE) {
- VideoLogError("bt_avrcp_target_notify_track fail. nRet[%d]",
- nRet);
+ VideoLogError("bt_avrcp_target_notify_track fail. nRet[%d]", nRet);
return FALSE;
}
int nRet = BT_ERROR_NONE;
VideoLogWarning("set avrcp noti track position. duration[%d]",
- position);
+ position);
nRet = bt_avrcp_target_notify_position(position);
if (nRet != BT_ERROR_NONE) {
VideoLogError("bt_avrcp_target_notify_position fail. nRet[%d]",
- nRet);
+ nRet);
return FALSE;
}
{
VideoLogInfo("vp_avrcp_noti_player_state start");
if (nState == VP_MM_PLAYER_STATE_NONE
- || nState == VP_MM_PLAYER_STATE_IDLE) {
+ || nState == VP_MM_PLAYER_STATE_IDLE) {
VideoLogWarning
- ("player state : [%d]. don't need to send player state",
- nState);
+ ("player state : [%d]. don't need to send player state",
+ nState);
return TRUE;
}
break;
}
VideoLogWarning("set avrcp noti player state. player_state[%d]",
- player_state);
+ player_state);
int nRet = BT_ERROR_NONE;
nRet = bt_avrcp_target_notify_player_state(player_state);
if (nRet != BT_ERROR_NONE) {
VideoLogError
- ("bt_avrcp_target_notify_player_state fail. nRet[%d]", nRet);
+ ("bt_avrcp_target_notify_player_state fail. nRet[%d]", nRet);
return FALSE;
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
#include <glib.h>
typedef struct {
- char *szLanguageCode; // ex) "en_US.UTF"
- char *szLanguageName; // "United Kingdom"
+ char *szLanguageCode; // ex) "en_US.UTF"
+ char *szLanguageName; // "United Kingdom"
char *szMcc;
} stLanguage;
for (cur_node = cur; cur_node; cur_node = cur_node->next) {
if (cur_node->type == XML_ELEMENT_NODE) {
- pId =
- (char *)g_strdup((char *)
- xmlGetProp(cur_node,
- (const xmlChar *) "id"));
- pName =
- (char *)g_strdup((char *)
- xmlGetProp(cur_node,
- (const xmlChar *) "string"));
- pMcc =
- (char *)g_strdup((char *)
- xmlGetProp(cur_node,
- (const xmlChar *) "mcc"));
+ pId = (char *) g_strdup((char *)
+ xmlGetProp(cur_node,
+ (const xmlChar *) "id"));
+ pName = (char *) g_strdup((char *)
+ xmlGetProp(cur_node,
+ (const xmlChar *)
+ "string"));
+ pMcc = (char *) g_strdup((char *)
+ xmlGetProp(cur_node,
+ (const xmlChar *) "mcc"));
stLanguage *szNode =
- (stLanguage *)calloc(1, sizeof(stLanguage));
+ (stLanguage *) calloc(1, sizeof(stLanguage));
if (szNode) {
szNode->szLanguageCode = pId;
szNode->szLanguageName = pName;
}
// make sure root node is "langlist"
if (xmlStrcmp(cur->name, (const xmlChar *) "langlist")) {
- VideoLogError
- ("document of the wrong type, root node != langlist");
+ VideoLogError("document of the wrong type, root node != langlist");
xmlFreeDoc(doc);
return;
}
/* save tree to file */
if (doc != NULL) {
- //xmlSaveFormatFile (docname, doc, 1);
xmlFreeDoc(doc);
}
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <device/display.h>
#include <device/power.h>
nRet = device_power_request_lock(POWER_LOCK_DISPLAY, 0);
if (nRet != 0) {
VideoLogError
- ("device_power_request_lock(POWER_LOCK_DISPLAY, 0) set fail : %d",
- nRet);
+ ("device_power_request_lock(POWER_LOCK_DISPLAY, 0) set fail : %d",
+ nRet);
return FALSE;
}
nRet = device_power_release_lock(POWER_LOCK_DISPLAY);
if (nRet != 0) {
VideoLogError
- ("device_power_release_lock(POWER_LOCK_DISPLAY) set fail : %d",
- nRet);
+ ("device_power_release_lock(POWER_LOCK_DISPLAY) set fail : %d",
+ nRet);
return FALSE;
}
int nRet = 0;
nRet = device_display_set_brightness(0, nVal); // 0 is main display, brightness
if (nRet != 0) {
- VideoLogError("device_display_set_brightness set fail : %d",
- nRet);
+ VideoLogError("device_display_set_brightness set fail : %d", nRet);
return FALSE;
}
int nRet = 0;
nRet = device_display_get_brightness(0, &nVal);
if (nVal < 0 || nRet != DEVICE_ERROR_NONE) {
- VideoLogError("device_display_get_brightness set fail : %d",
- nVal);
+ VideoLogError("device_display_get_brightness set fail : %d", nVal);
return FALSE;
}
nRet = device_display_get_max_brightness(0, &nVal);
if (nVal < 0 || nRet != DEVICE_ERROR_NONE) {
VideoLogError("device_display_get_max_brightness get fail : %d",
- nVal);
+ nVal);
return FALSE;
}
{
if (bLock) {
if (device_power_request_lock(POWER_LOCK_CPU, 0) !=
- DEVICE_ERROR_NONE) {
+ DEVICE_ERROR_NONE) {
VideoLogError("lock failed");
return FALSE;
}
} else {
- if (device_power_release_lock(POWER_LOCK_CPU) !=
- DEVICE_ERROR_NONE) {
+ if (device_power_release_lock(POWER_LOCK_CPU) != DEVICE_ERROR_NONE) {
VideoLogError("unlock failed");
return FALSE;
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-hollic.h"
#include "vp-play-macro-define.h"
#include "vp-play-log.h"
-#define OBJECT_PATH "/Org/Tizen/System/DeviceD"
+#define OBJECT_PATH "/Org/Tizen/System/DeviceD"
#define DEVICED_PATH_HALL OBJECT_PATH"/Hall"
#define SIGNAL_HALL_STATE "ChangeState"
} HollIC_handle;
hollic_handle vp_hollic_create_handle(HollICEventCbFunc pEventCb,
- void *pUserData)
+ void *pUserData)
{
return 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <image_util.h>
#include "vp-util.h"
bool vp_image_util_image_resize_save(const char *szFilePath,
- const unsigned char *pSrcBuf,
- int nSrcW, int nSrcH, int nDestW,
- int nDestH, int nQuality)
+ const unsigned char *pSrcBuf,
+ int nSrcW, int nSrcH, int nDestW,
+ int nDestH, int nQuality)
{
if (szFilePath == NULL) {
VideoLogError("szFilePath is NULL");
int nResizeH = nDestH + (nDestH) % 2;
nRet =
- image_util_calculate_buffer_size(nResizeW, nResizeH,
- IMAGE_UTIL_COLORSPACE_RGB888,
- &nResizBufSize);
+ image_util_calculate_buffer_size(nResizeW, nResizeH,
+ IMAGE_UTIL_COLORSPACE_RGB888,
+ &nResizBufSize);
if (nRet != IMAGE_UTIL_ERROR_NONE) {
VideoLogWarning
- ("image_util_calculate_buffer_size is fail : [0x%x]", nRet);
+ ("image_util_calculate_buffer_size is fail : [0x%x]", nRet);
}
pSaveBuf = calloc(1, sizeof(unsigned char) * nResizBufSize);
}
nRet =
- vp_util_image_resize(pSaveBuf, &nResizeW, &nResizeH, pSrcBuf,
- nSrcW, nSrcH, IMAGE_UTIL_COLORSPACE_RGB888);
+ vp_util_image_resize(pSaveBuf, &nResizeW, &nResizeH, pSrcBuf,
+ nSrcW, nSrcH, IMAGE_UTIL_COLORSPACE_RGB888);
if (nRet != IMAGE_UTIL_ERROR_NONE) {
VideoLogWarning("vp_util_image_resize is fail : [0x%x]", nRet);
VP_FREE(pSaveBuf);
}
nRet =
- image_util_encode_jpeg(pSaveBuf, nResizeW, nResizeH,
- IMAGE_UTIL_COLORSPACE_RGB888, nQuality,
- szFilePath);
+ image_util_encode_jpeg(pSaveBuf, nResizeW, nResizeH,
+ IMAGE_UTIL_COLORSPACE_RGB888, nQuality,
+ szFilePath);
if (nRet != IMAGE_UTIL_ERROR_NONE) {
VideoLogWarning("image_util_encode_jpeg is fail : [0x%x]", nRet);
VP_FREE(pSaveBuf);
bool vp_image_util_image_save(const char *szFilePath,
- const unsigned char *pSrcBuf, int nSrcW,
- int nSrcH, int nQuality)
+ const unsigned char *pSrcBuf, int nSrcW,
+ int nSrcH, int nQuality)
{
if (szFilePath == NULL) {
VideoLogError("szFilePath is NULL");
int nRet = IMAGE_UTIL_ERROR_NONE;
nRet =
- image_util_encode_jpeg(pSrcBuf, nSrcW, nSrcH,
- IMAGE_UTIL_COLORSPACE_RGB888, nQuality,
- szFilePath);
+ image_util_encode_jpeg(pSrcBuf, nSrcW, nSrcH,
+ IMAGE_UTIL_COLORSPACE_RGB888, nQuality,
+ szFilePath);
if (nRet != IMAGE_UTIL_ERROR_NONE) {
VideoLogWarning("image_util_encode_jpeg is fail : [0x%x]", nRet);
return FALSE;
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <media_content.h>
#include <metadata_extractor.h>
static bool g_bMediaConnect = FALSE;
static MediaUpdateCb g_media_update_cb = NULL;
+static media_content_noti_h noti_handle = NULL;
/* callback functions */
static bool __vp_media_contents_info_cb(media_info_h pMediaHandle,
- void *pUserData)
+ void *pUserData)
{
media_info_h *pAssignItem = (media_info_h *) pUserData;
nRet = media_info_get_display_name(*pAssignItem, &szTmpStr);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_info_get_display_name is fail : 0x%x",
- nRet);
+ nRet);
return FALSE;
}
}
static bool __vp_media_contents_bookmark_iter_cb(media_bookmark_h
- pBookmark,
- void *pUserData)
+ pBookmark,
+ void *pUserData)
{
if (pBookmark == NULL) {
VideoLogError("pBookmark is NULL");
static bool __vp_media_contents_video_iter_cb(media_info_h pMediaInfo,
- void *pUserData)
+ void *pUserData)
{
if (pMediaInfo == NULL) {
VideoLogError("pMediaInfo is NULL");
}
static void __vp_media_contents_db_update_cb(media_content_error_e nError,
- int nPid,
- media_content_db_update_item_type_e
- nUpdateItem,
- media_content_db_update_type_e
- nUpdateType,
- media_content_type_e
- nMediaType, char *szUuid,
- char *szPath,
- char *szMimeType,
- void *pUserData)
+ int nPid,
+ media_content_db_update_item_type_e
+ nUpdateItem,
+ media_content_db_update_type_e
+ nUpdateType,
+ media_content_type_e
+ nMediaType, char *szUuid,
+ char *szPath,
+ char *szMimeType,
+ void *pUserData)
{
if (g_media_update_cb == NULL) {
VideoLogError("g_media_update_cb is NULL.");
}
static bool __vp_media_contents_folder_iter_cb(media_folder_h pFolderItem,
- void *pUserData)
+ void *pUserData)
{
if (pFolderItem == NULL) {
VideoLogError("pFolderItem is NULL");
}
static bool __vp_media_contents_subtitles_iter_cb(media_info_h pMediaInfo,
- void *pUserData)
+ void *pUserData)
{
if (pMediaInfo == NULL) {
VideoLogError("pMediaInfo is NULL");
int nRet = MEDIA_CONTENT_ERROR_NONE;
if (g_bMediaConnect) {
-// VideoLogDebug("Already Media content connect");
return TRUE;
}
bool vp_media_contents_get_video_id(const char *szFilePath,
- char **szVideoID)
+ char **szVideoID)
{
if (szVideoID == NULL) {
VideoLogError("szVideoID is NULL");
int nRet = MEDIA_CONTENT_ERROR_NONE;
char *szMediaID = NULL;
- char szTmpStr[4096] = {0,};
+ char szTmpStr[4096] = { 0, };
snprintf(szTmpStr, 4096,
- "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
- szFilePath);
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
+ szFilePath);
nRet = media_filter_create(&pFilterHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
}
nRet =
- media_filter_set_condition(pFilterHandle, szTmpStr,
- MEDIA_CONTENT_COLLATE_DEFAULT);
+ media_filter_set_condition(pFilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_filter_set_condition is fail : 0x%x", nRet);
goto Exception;
}
nRet =
- media_info_foreach_media_from_db(pFilterHandle,
- __vp_media_contents_info_cb,
- &pMediaHandle);
+ media_info_foreach_media_from_db(pFilterHandle,
+ __vp_media_contents_info_cb,
+ &pMediaHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("media_info_foreach_media_from_db is fail : 0x%x", nRet);
+ VideoLogError("media_info_foreach_media_from_db is fail : 0x%x",
+ nRet);
goto Exception;
}
return TRUE;
-Exception:
+ Exception:
VP_FREE(szMediaID);
*szVideoID = NULL;
}
bool vp_media_contents_get_video_thumbnail_path(const char *szFilePath,
- char **szThumbnailPath)
+ char **szThumbnailPath)
{
if (szFilePath == NULL) {
VideoLogError("szFilePath is NULL");
int nRet = MEDIA_CONTENT_ERROR_NONE;
char *szThumbnail = NULL;
- char szTmpStr[4096] = {0,};
+ char szTmpStr[4096] = { 0, };
snprintf(szTmpStr, 4096,
- "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
- szFilePath);
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
+ szFilePath);
nRet = media_filter_create(&pFilterHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
}
nRet =
- media_filter_set_condition(pFilterHandle, szTmpStr,
- MEDIA_CONTENT_COLLATE_DEFAULT);
+ media_filter_set_condition(pFilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_filter_set_condition is fail : 0x%x", nRet);
goto Exception;
}
nRet =
- media_info_foreach_media_from_db(pFilterHandle,
- __vp_media_contents_info_cb,
- &pMediaHandle);
+ media_info_foreach_media_from_db(pFilterHandle,
+ __vp_media_contents_info_cb,
+ &pMediaHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("media_info_foreach_media_from_db is fail : 0x%x", nRet);
+ VideoLogError("media_info_foreach_media_from_db is fail : 0x%x",
+ nRet);
goto Exception;
}
nRet = media_info_get_thumbnail_path(pMediaHandle, &szThumbnail);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_info_get_thumbnail_path is fail : 0x%x",
- nRet);
+ nRet);
goto Exception;
}
return TRUE;
-Exception:
+ Exception:
VP_FREE(szThumbnail);
int nRet = MEDIA_CONTENT_ERROR_NONE;
nRet = media_info_refresh_metadata_to_db(szMediaID);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("media_info_refresh_metadata_to_db fail : %d",
- nRet);
+ VideoLogError("media_info_refresh_metadata_to_db fail : %d", nRet);
return FALSE;
}
return TRUE;
char szTmpStr[4096] = { 0, };
snprintf(szTmpStr, 4096,
- "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
- szFilePath);
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
+ szFilePath);
nRet = media_filter_create(&pFilterHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
}
nRet =
- media_filter_set_condition(pFilterHandle, szTmpStr,
- MEDIA_CONTENT_COLLATE_DEFAULT);
+ media_filter_set_condition(pFilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_filter_set_condition is fail : 0x%x", nRet);
goto Exception;
}
nRet =
- media_info_foreach_media_from_db(pFilterHandle,
- __vp_media_contents_info_cb,
- &pMediaHandle);
+ media_info_foreach_media_from_db(pFilterHandle,
+ __vp_media_contents_info_cb,
+ &pMediaHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("media_info_foreach_media_from_db is fail : 0x%x", nRet);
+ VideoLogError("media_info_foreach_media_from_db is fail : 0x%x",
+ nRet);
goto Exception;
}
return TRUE;
-Exception:
+ Exception:
if (pFilterHandle) {
media_filter_destroy(pFilterHandle);
}
bool vp_media_contents_set_played_position(const char *szFilePath,
- int nPosition)
+ int nPosition)
{
if (szFilePath == NULL) {
VideoLogError("szFilePath is NULL");
char szTmpStr[4096] = { 0, };
snprintf(szTmpStr, 4096,
- "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
- szFilePath);
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
+ szFilePath);
nRet = media_filter_create(&pFilterHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
}
nRet =
- media_filter_set_condition(pFilterHandle, szTmpStr,
- MEDIA_CONTENT_COLLATE_DEFAULT);
+ media_filter_set_condition(pFilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_filter_set_condition is fail : 0x%x", nRet);
goto Exception;
}
nRet =
- media_info_foreach_media_from_db(pFilterHandle,
- __vp_media_contents_info_cb,
- &pMediaHandle);
+ media_info_foreach_media_from_db(pFilterHandle,
+ __vp_media_contents_info_cb,
+ &pMediaHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("media_info_foreach_media_from_db is fail : 0x%x", nRet);
+ VideoLogError("media_info_foreach_media_from_db is fail : 0x%x",
+ nRet);
goto Exception;
}
nRet = video_meta_set_played_position(pVideoHandle, nPosition);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError(" video_meta_set_played_position is fail : 0x%x",
- nRet);
+ nRet);
goto Exception;
}
return TRUE;
-Exception:
+ Exception:
if (pFilterHandle) {
media_filter_destroy(pFilterHandle);
}
bool vp_media_contents_get_played_position(const char *szFilePath,
- int *nPosition)
+ int *nPosition)
{
if (szFilePath == NULL) {
VideoLogError("szFilePath is NULL");
char szTmpStr[4096] = { 0, };
snprintf(szTmpStr, 4096,
- "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
- szFilePath);
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
+ szFilePath);
nRet = media_filter_create(&pFilterHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
}
nRet =
- media_filter_set_condition(pFilterHandle, szTmpStr,
- MEDIA_CONTENT_COLLATE_DEFAULT);
+ media_filter_set_condition(pFilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_filter_set_condition is fail : 0x%x", nRet);
goto Exception;
}
nRet =
- media_info_foreach_media_from_db(pFilterHandle,
- __vp_media_contents_info_cb,
- &pMediaHandle);
+ media_info_foreach_media_from_db(pFilterHandle,
+ __vp_media_contents_info_cb,
+ &pMediaHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("media_info_foreach_media_from_db is fail : 0x%x", nRet);
+ VideoLogError("media_info_foreach_media_from_db is fail : 0x%x",
+ nRet);
goto Exception;
}
nRet = video_meta_get_played_position(pVideoHandle, nPosition);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("video_meta_get_played_position is fail : 0x%x",
- nRet);
+ nRet);
goto Exception;
}
return TRUE;
-Exception:
+ Exception:
if (pFilterHandle) {
media_filter_destroy(pFilterHandle);
}
int vp_media_contents_get_modified_time(media_info_h pMediaHandle,
- char **szLastModified)
+ char **szLastModified)
{
if (!pMediaHandle) {
VideoLogInfo("pMediaHandle is NULL.");
time_t pModifiedTime;
struct tm sModifiedTime;
- char szModifiedTime[BYTE_SIZE] = {0,};
+ char szModifiedTime[BYTE_SIZE] = { 0, };
nRet = media_info_get_modified_time(pVideoItem, &pModifiedTime);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_info_get_modified_time failed : [%d]!!!",
- nRet);
+ nRet);
return nRet;
}
gmtime_r(&pModifiedTime, &sModifiedTime);
strftime(szModifiedTime, BYTE_SIZE - 1, "%d %b. %Y. %H:%M",
- &sModifiedTime);
+ &sModifiedTime);
*szLastModified = g_strdup(szModifiedTime);
return nRet;
}
bool vp_media_contents_get_content_info(const char *szFilePath,
- char **szTitle, int *nWidth,
- int *nHeight, int *nDuration,
- double *dLatitude,
- double *dLongitude,
- char **szTmpLastModified)
+ char **szTitle, int *nWidth,
+ int *nHeight, int *nDuration,
+ double *dLatitude,
+ double *dLongitude,
+ char **szTmpLastModified)
{
if (szFilePath == NULL) {
VideoLogError("szFilePath is NULL");
int nRet = MEDIA_CONTENT_ERROR_NONE;
- char szTmpStr[4096] = {0,};
+ char szTmpStr[4096] = { 0, };
snprintf(szTmpStr, 4096,
- "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
- szFilePath);
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
+ szFilePath);
nRet = media_filter_create(&pFilterHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
}
nRet =
- media_filter_set_condition(pFilterHandle, szTmpStr,
- MEDIA_CONTENT_COLLATE_DEFAULT);
+ media_filter_set_condition(pFilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_filter_set_condition is fail : 0x%x", nRet);
goto Exception;
}
nRet =
- media_info_foreach_media_from_db(pFilterHandle,
- __vp_media_contents_info_cb,
- &pMediaHandle);
+ media_info_foreach_media_from_db(pFilterHandle,
+ __vp_media_contents_info_cb,
+ &pMediaHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("media_info_foreach_media_from_db is fail : 0x%x", nRet);
+ VideoLogError("media_info_foreach_media_from_db is fail : 0x%x",
+ nRet);
goto Exception;
}
}
nRet =
- vp_media_contents_get_modified_time(pMediaHandle,
- szTmpLastModified);
+ vp_media_contents_get_modified_time(pMediaHandle,
+ szTmpLastModified);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("media_info_get_modified_time is fail : 0x%x",
- nRet);
+ VideoLogError("media_info_get_modified_time is fail : 0x%x", nRet);
goto Exception;
}
return TRUE;
-Exception:
+ Exception:
if (pFilterHandle) {
media_filter_destroy(pFilterHandle);
}
bool vp_media_metadata_get_gps_info(const char *szFilePath,
- double *dLatitude, double *dLongitude)
+ double *dLatitude, double *dLongitude)
{
if (szFilePath == NULL) {
VideoLogError("szFilePath is NULL");
}
nRet =
- metadata_extractor_get_metadata(pMetadata, METADATA_LATITUDE,
- &szVal);
+ metadata_extractor_get_metadata(pMetadata, METADATA_LATITUDE,
+ &szVal);
if (nRet != METADATA_EXTRACTOR_ERROR_NONE) {
VideoLogError("metadata_extractor_get_metadata is fail : 0x%x",
- nRet);
+ nRet);
goto Exception;
}
VP_FREE(szVal);
nRet =
- metadata_extractor_get_metadata(pMetadata, METADATA_LONGITUDE,
- &szVal);
+ metadata_extractor_get_metadata(pMetadata, METADATA_LONGITUDE,
+ &szVal);
if (nRet != METADATA_EXTRACTOR_ERROR_NONE) {
VideoLogError("metadata_extractor_get_metadata is fail : 0x%x",
- nRet);
+ nRet);
goto Exception;
}
}
return TRUE;
-Exception:
+ Exception:
VP_FREE(szVal);
return FALSE;
}
-bool vp_media_metadata_get_duration(const char *szFilePath,
- int *nDuration)
+bool vp_media_metadata_get_duration(const char *szFilePath, int *nDuration)
{
if (szFilePath == NULL) {
VideoLogError("szFilePath is NULL");
}
nRet =
- metadata_extractor_get_metadata(pMetadata, METADATA_DURATION,
- &szVal);
+ metadata_extractor_get_metadata(pMetadata, METADATA_DURATION,
+ &szVal);
if (nRet != METADATA_EXTRACTOR_ERROR_NONE) {
VideoLogError("metadata_extractor_get_metadata is fail : 0x%x",
- nRet);
+ nRet);
goto Exception;
}
}
return TRUE;
-Exception:
+ Exception:
VP_FREE(szVal);
}
nRet =
- metadata_extractor_get_metadata(pMetadata, METADATA_VIDEO_WIDTH,
- &szVal);
+ metadata_extractor_get_metadata(pMetadata, METADATA_VIDEO_WIDTH,
+ &szVal);
if (nRet != METADATA_EXTRACTOR_ERROR_NONE) {
VideoLogError("metadata_extractor_get_metadata is fail : 0x%x",
- nRet);
+ nRet);
goto Exception;
}
}
return TRUE;
-Exception:
+ Exception:
VP_FREE(szVal);
}
nRet =
- metadata_extractor_get_metadata(pMetadata, METADATA_VIDEO_HEIGHT,
- &szVal);
+ metadata_extractor_get_metadata(pMetadata, METADATA_VIDEO_HEIGHT,
+ &szVal);
if (nRet != METADATA_EXTRACTOR_ERROR_NONE) {
VideoLogError("metadata_extractor_get_metadata is fail : 0x%x",
- nRet);
+ nRet);
goto Exception;
}
}
return TRUE;
-Exception:
+ Exception:
VP_FREE(szVal);
bool vp_media_contents_bookmark_list_get(const char *szMediaID,
- GList **list)
+ GList ** list)
{
if (!szMediaID) {
VideoLogError("No exist szMediaID.");
}
nRet =
- media_filter_set_order(pFilterHandle, MEDIA_CONTENT_ORDER_ASC,
- BOOKMARK_MARKED_TIME,
- MEDIA_CONTENT_COLLATE_DEFAULT);
+ media_filter_set_order(pFilterHandle, MEDIA_CONTENT_ORDER_ASC,
+ BOOKMARK_MARKED_TIME,
+ MEDIA_CONTENT_COLLATE_DEFAULT);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_filter_set_order is fail : 0x%x", nRet);
goto Exception;
}
nRet =
- media_info_foreach_bookmark_from_db(szMediaID, pFilterHandle,
- __vp_media_contents_bookmark_iter_cb,
- list);
+ media_info_foreach_bookmark_from_db(szMediaID, pFilterHandle,
+ __vp_media_contents_bookmark_iter_cb,
+ list);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError
- ("media_info_foreach_bookmark_from_db is fail : 0x%x", nRet);
+ ("media_info_foreach_bookmark_from_db is fail : 0x%x", nRet);
goto Exception;
}
return TRUE;
-Exception:
+ Exception:
if (pFilterHandle) {
media_filter_destroy(pFilterHandle);
}
-bool vp_media_contents_bookmark_list_clear(GList *pList)
+bool vp_media_contents_bookmark_list_clear(GList * pList)
{
VideoLogInfo("");
nCount = g_list_length(pList);
for (i = 0; i < nCount; i++) {
media_bookmark_h pBookmarkItem = NULL;
- pBookmarkItem = (media_bookmark_h)g_list_nth_data(pList, i);
+ pBookmarkItem = (media_bookmark_h) g_list_nth_data(pList, i);
if (pBookmarkItem) {
media_bookmark_destroy(pBookmarkItem);
pBookmarkItem = NULL;
}
bool vp_media_contents_bookmark_insert(const char *szMediaID,
- int nPosition,
- const char *szFilePath)
+ int nPosition,
+ const char *szFilePath)
{
if (szMediaID == NULL) {
bool vp_media_contents_bookmark_delete(const char *szMediaID,
- int nPosition)
+ int nPosition)
{
if (szMediaID == NULL) {
VideoLogError("szMediaID is NULL");
nCount = g_list_length(list);
for (idx = 0; idx < nCount; idx++) {
media_bookmark_h pBookmarkItem = NULL;
- pBookmarkItem = (media_bookmark_h)g_list_nth_data(list, idx);
+ pBookmarkItem = (media_bookmark_h) g_list_nth_data(list, idx);
if (pBookmarkItem) {
time_t nMarkedTime;
nRet =
- media_bookmark_get_marked_time(pBookmarkItem,
- &nMarkedTime);
+ media_bookmark_get_marked_time(pBookmarkItem,
+ &nMarkedTime);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogWarning
- ("media_bookmark_get_marked_time is fail : 0x%x",
- nRet);
+ ("media_bookmark_get_marked_time is fail : 0x%x",
+ nRet);
continue;
}
if (nPosition == nMarkedTime) {
nRet =
- media_bookmark_get_bookmark_id(pBookmarkItem,
- &nDeleteBookmarkID);
+ media_bookmark_get_bookmark_id(pBookmarkItem,
+ &nDeleteBookmarkID);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogWarning
- ("media_bookmark_get_bookmark_id is fail : 0x%x",
- nRet);
+ ("media_bookmark_get_bookmark_id is fail : 0x%x",
+ nRet);
continue;
}
nRet =
- media_bookmark_get_thumbnail_path(pBookmarkItem,
- &szDeletePath);
+ media_bookmark_get_thumbnail_path(pBookmarkItem,
+ &szDeletePath);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogWarning
- ("media_bookmark_get_thumbnail_path is fail : 0x%x",
- nRet);
+ ("media_bookmark_get_thumbnail_path is fail : 0x%x",
+ nRet);
continue;
}
break;
if (nDeleteBookmarkID == -1 || szDeletePath == NULL) {
VideoLogError("Not match item : %d , %s", nDeleteBookmarkID,
- szDeletePath);
+ szDeletePath);
VP_FREE(szDeletePath);
return FALSE;
}
nRet = media_bookmark_delete_from_db(nDeleteBookmarkID);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_bookmark_delete_from_db is fail : 0x%x",
- nRet);
+ nRet);
VP_FREE(szDeletePath);
return FALSE;
}
pBookmarkItem = (media_bookmark_h) g_list_nth_data(list, idx);
if (pBookmarkItem) {
nRet =
- media_bookmark_get_bookmark_id(pBookmarkItem,
- &nDeleteBookmarkID);
+ media_bookmark_get_bookmark_id(pBookmarkItem,
+ &nDeleteBookmarkID);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogWarning
- ("media_bookmark_get_bookmark_id is fail : 0x%x",
- nRet);
+ ("media_bookmark_get_bookmark_id is fail : 0x%x",
+ nRet);
}
nRet =
- media_bookmark_get_thumbnail_path(pBookmarkItem,
- &szDeletePath);
+ media_bookmark_get_thumbnail_path(pBookmarkItem,
+ &szDeletePath);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogWarning
- ("media_bookmark_get_thumbnail_path is fail : 0x%x",
- nRet);
+ ("media_bookmark_get_thumbnail_path is fail : 0x%x",
+ nRet);
}
nRet = media_bookmark_delete_from_db(nDeleteBookmarkID);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError
- ("media_bookmark_delete_from_db is fail : 0x%x",
- nRet);
+ ("media_bookmark_delete_from_db is fail : 0x%x", nRet);
}
bool vp_media_contents_bookmark_get_item_info(void *pItem,
- char **szFilePath,
- int *nPosition)
+ char **szFilePath,
+ int *nPosition)
{
if (pItem == NULL) {
VideoLogError("szMediaID is NULL");
int nRet = MEDIA_CONTENT_ERROR_NONE;
nRet =
- media_bookmark_get_marked_time(bookmark_h, (time_t *) nPosition);
+ media_bookmark_get_marked_time(bookmark_h, (time_t *) nPosition);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_bookmark_get_marked_time is fail : 0x%x",
- nRet);
+ nRet);
return FALSE;
}
nRet = media_bookmark_get_thumbnail_path(bookmark_h, szFilePath);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_bookmark_get_thumbnail_path is fail : 0x%x",
- nRet);
+ nRet);
return FALSE;
}
}
bool vp_media_contents_get_video_items_to_folder(int nSortType,
- char *szFolder,
- GList **pList)
+ char *szFolder,
+ GList ** pList)
{
if (szFolder == NULL) {
VideoLogError("szFolder is NULL");
}
szCondition =
- g_strdup_printf
- ("MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE IS NOT 101) and FOLDER_PATH = \"%s\"",
- szFolder);
+ g_strdup_printf
+ ("MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE IS NOT 101) and FOLDER_PATH = \"%s\"",
+ szFolder);
nRet =
- media_filter_set_condition(pFilterHandle, szCondition,
- MEDIA_CONTENT_COLLATE_DEFAULT);
+ media_filter_set_condition(pFilterHandle, szCondition,
+ MEDIA_CONTENT_COLLATE_DEFAULT);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_filter_set_condition is fail : 0x%x", nRet);
goto Exception;
}
nRet =
- media_folder_foreach_folder_from_db(pFilterHandle,
- __vp_media_contents_folder_iter_cb,
- &pFolderHandle);
+ media_folder_foreach_folder_from_db(pFilterHandle,
+ __vp_media_contents_folder_iter_cb,
+ &pFolderHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError
- ("media_folder_foreach_folder_from_db is fail : 0x%x", nRet);
+ ("media_folder_foreach_folder_from_db is fail : 0x%x", nRet);
goto Exception;
}
szCondition = g_strdup_printf("MEDIA_TYPE = 1");
nRet =
- media_filter_set_condition(pFilterHandle, szCondition,
- MEDIA_CONTENT_COLLATE_DEFAULT);
+ media_filter_set_condition(pFilterHandle, szCondition,
+ MEDIA_CONTENT_COLLATE_DEFAULT);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_filter_set_condition is fail : 0x%x", nRet);
goto Exception;
}
nRet =
- media_filter_set_order(pFilterHandle, nOrderType, szOrder,
- MEDIA_CONTENT_COLLATE_NOCASE);
+ media_filter_set_order(pFilterHandle, nOrderType, szOrder,
+ MEDIA_CONTENT_COLLATE_NOCASE);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_filter_set_order is fail : 0x%x", nRet);
goto Exception;
}
nRet =
- media_folder_foreach_media_from_db(szFolderID, pFilterHandle,
- __vp_media_contents_video_iter_cb,
- pList);
+ media_folder_foreach_media_from_db(szFolderID, pFilterHandle,
+ __vp_media_contents_video_iter_cb,
+ pList);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_info_foreach_media_from_db is fail : 0x%x",
- nRet);
+ nRet);
goto Exception;
}
return TRUE;
-Exception:
+ Exception:
VP_FREE(szFolderID);
VP_FREE(szCondition);
return FALSE;
}
-bool vp_media_contents_get_video_items(int nSortType, GList **pList)
+bool vp_media_contents_get_video_items(int nSortType, GList ** pList)
{
vp_media_contents_connect();
}
szCondition =
- g_strdup_printf
- ("MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE IS NOT 101)");
+ g_strdup_printf
+ ("MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE IS NOT 101)");
nRet =
- media_filter_set_condition(pFilterHandle, szCondition,
- MEDIA_CONTENT_COLLATE_DEFAULT);
+ media_filter_set_condition(pFilterHandle, szCondition,
+ MEDIA_CONTENT_COLLATE_DEFAULT);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_filter_set_condition is fail : 0x%x", nRet);
goto Exception;
}
nRet =
- media_filter_set_order(pFilterHandle, nOrderType, szOrder,
- MEDIA_CONTENT_COLLATE_NOCASE);
+ media_filter_set_order(pFilterHandle, nOrderType, szOrder,
+ MEDIA_CONTENT_COLLATE_NOCASE);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_filter_set_order is fail : 0x%x", nRet);
goto Exception;
}
nRet =
- media_info_foreach_media_from_db(pFilterHandle,
- __vp_media_contents_video_iter_cb,
- pList);
+ media_info_foreach_media_from_db(pFilterHandle,
+ __vp_media_contents_video_iter_cb,
+ pList);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_info_foreach_media_from_db is fail : 0x%x",
- nRet);
+ nRet);
goto Exception;
}
return TRUE;
-Exception:
+ Exception:
VP_FREE(szCondition);
VP_FREE(szOrder);
return FALSE;
}
-bool vp_media_contents_free_video_items(GList *pList)
+bool vp_media_contents_free_video_items(GList * pList)
{
VideoLogInfo("");
}
bool vp_media_contents_get_next_file_path(const char *szMediaURL,
- char **szNextURL, bool bLoop,
- GList *pList)
+ char **szNextURL, bool bLoop,
+ GList * pList)
{
if (!szMediaURL) {
VideoLogError("No exist szMediaID.");
nRet = media_info_get_file_path(pMediaItem, &szPath);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogWarning("media_info_get_file_path is fail : 0x%x",
- nRet);
+ nRet);
continue;
}
}
bool vp_media_contents_get_prev_file_path(const char *szMediaURL,
- char **szPrevURL, bool bLoop,
- GList *pList)
+ char **szPrevURL, bool bLoop,
+ GList * pList)
{
if (!szMediaURL) {
VideoLogError("No exist szMediaID.");
nRet = media_info_get_file_path(pMediaItem, &szPath);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogWarning("media_info_get_file_path is fail : 0x%x",
- nRet);
+ nRet);
continue;
}
if (szPath) {
g_media_update_cb = pFunc;
- nRet =
- media_content_set_db_updated_cb((void *)
- __vp_media_contents_db_update_cb,
- pUserData);
+ nRet = media_content_add_db_updated_cb((void *)
+ __vp_media_contents_db_update_cb,
+ pUserData, ¬i_handle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogWarning("media_content_set_db_updated_cb is fail : 0x%x", nRet);
+ VideoLogWarning("media_content_add_db_updated_cb is fail : 0x%x",
+ nRet);
return FALSE;
}
void vp_media_contents_unset_update_cb()
{
g_media_update_cb = NULL;
- if (media_content_unset_db_updated_cb() != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("Fail to media_content_unset_db_updated_cb.");
+ if (media_content_remove_db_updated_cb(noti_handle) !=
+ MEDIA_CONTENT_ERROR_NONE) {
+ VideoLogError("Fail to media_content_remove_db_updated_cb.");
}
}
bool vp_media_contents_get_cloud_attribute(const char *szFilePath,
- bool *bCloud)
+ bool * bCloud)
{
if (szFilePath == NULL) {
char szTmpStr[4096] = { 0, };
snprintf(szTmpStr, 4096,
- "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
- szFilePath);
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
+ szFilePath);
nRet = media_filter_create(&pFilterHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
}
nRet =
- media_filter_set_condition(pFilterHandle, szTmpStr,
- MEDIA_CONTENT_COLLATE_DEFAULT);
+ media_filter_set_condition(pFilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_filter_set_condition is fail : 0x%x", nRet);
goto Exception;
}
nRet =
- media_info_foreach_media_from_db(pFilterHandle,
- __vp_media_contents_info_cb,
- &pMediaHandle);
+ media_info_foreach_media_from_db(pFilterHandle,
+ __vp_media_contents_info_cb,
+ &pMediaHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("media_info_foreach_media_from_db is fail : 0x%x", nRet);
+ VideoLogError("media_info_foreach_media_from_db is fail : 0x%x",
+ nRet);
goto Exception;
}
VideoLogError("media info handle is NULL");
goto Exception;
}
-// media_content_storage_ex_e storage_type = MEDIA_CONTENT_STORAGE_INTERNAL_EX;
-// media_info_get_storage_type_ex(pMediaHandle, &storage_type);
-// if (storage_type == MEDIA_CONTENT_STORAGE_DROPBOX_EX) {
-// *bCloud = TRUE;
-// }
-// else
-// {
-// *bCloud = FALSE;
-// }
nRet = media_filter_destroy(pFilterHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
return TRUE;
-Exception:
+ Exception:
if (pFilterHandle) {
media_filter_destroy(pFilterHandle);
}
bool vp_media_contents_set_location_tag(const char *szFilePath,
- const char *pLocation)
+ const char *pLocation)
{
if (szFilePath == NULL || pLocation == NULL) {
VideoLogError("szFilePath or city is NULL");
char szTmpStr[4096] = { 0, };
snprintf(szTmpStr, 4096,
- "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
- szFilePath);
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
+ szFilePath);
nRet = media_filter_create(&pFilterHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
}
nRet =
- media_filter_set_condition(pFilterHandle, szTmpStr,
- MEDIA_CONTENT_COLLATE_DEFAULT);
+ media_filter_set_condition(pFilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_filter_set_condition is fail : 0x%x", nRet);
goto Exception;
}
nRet =
- media_info_foreach_media_from_db(pFilterHandle,
- __vp_media_contents_info_cb,
- &pMediaHandle);
+ media_info_foreach_media_from_db(pFilterHandle,
+ __vp_media_contents_info_cb,
+ &pMediaHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("media_info_foreach_media_from_db is fail : 0x%x", nRet);
+ VideoLogError("media_info_foreach_media_from_db is fail : 0x%x",
+ nRet);
goto Exception;
}
nRet = media_info_set_location_tag(pMediaHandle, pLocation);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("media_info_set_location_tag is fail : 0x%x",
- nRet);
+ VideoLogError("media_info_set_location_tag is fail : 0x%x", nRet);
goto Exception;
}
return TRUE;
-Exception:
+ Exception:
if (pFilterHandle) {
media_filter_destroy(pFilterHandle);
}
bool vp_media_contents_get_location_tag(const char *szFilePath,
- char **szLocationTag)
+ char **szLocationTag)
{
if (szFilePath == NULL) {
VideoLogError("szFilePath is NULL");
char szTmpStr[4096] = { 0, };
snprintf(szTmpStr, 4096,
- "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
- szFilePath);
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
+ szFilePath);
nRet = media_filter_create(&pFilterHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
}
nRet =
- media_filter_set_condition(pFilterHandle, szTmpStr,
- MEDIA_CONTENT_COLLATE_DEFAULT);
+ media_filter_set_condition(pFilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_filter_set_condition is fail : 0x%x", nRet);
goto Exception;
}
nRet =
- media_info_foreach_media_from_db(pFilterHandle,
- __vp_media_contents_info_cb,
- &pMediaHandle);
+ media_info_foreach_media_from_db(pFilterHandle,
+ __vp_media_contents_info_cb,
+ &pMediaHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("media_info_foreach_media_from_dbmedia_filter_set_condition is fail : 0x%x", nRet);
+ VideoLogError
+ ("media_info_foreach_media_from_dbmedia_filter_set_condition is fail : 0x%x",
+ nRet);
goto Exception;
}
nRet = media_info_get_location_tag(pMediaHandle, &szLocation);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("media_info_get_location_tag is fail : 0x%x",
- nRet);
+ VideoLogError("media_info_get_location_tag is fail : 0x%x", nRet);
goto Exception;
}
return TRUE;
-Exception:
+ Exception:
VP_FREE(szLocation);
}
bool vp_media_contents_set_weahter_tag(const char *szFilePath,
- const char *pWeather)
+ const char *pWeather)
{
if (szFilePath == NULL || pWeather == NULL) {
VideoLogError("szFilePath or pWeather is NULL");
filter_h pFilterHandle = NULL;
int nRet = MEDIA_CONTENT_ERROR_NONE;
- //char *szWeather = NULL;
char szTmpStr[4096] = { 0, };
snprintf(szTmpStr, 4096,
- "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
- szFilePath);
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
+ szFilePath);
nRet = media_filter_create(&pFilterHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
}
nRet =
- media_filter_set_condition(pFilterHandle, szTmpStr,
- MEDIA_CONTENT_COLLATE_DEFAULT);
+ media_filter_set_condition(pFilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_filter_set_condition is fail : 0x%x", nRet);
goto Exception;
}
nRet =
- media_info_foreach_media_from_db(pFilterHandle,
- __vp_media_contents_info_cb,
- &pMediaHandle);
+ media_info_foreach_media_from_db(pFilterHandle,
+ __vp_media_contents_info_cb,
+ &pMediaHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("media_info_foreach_media_from_db is fail : 0x%x", nRet);
+ VideoLogError("media_info_foreach_media_from_db is fail : 0x%x",
+ nRet);
goto Exception;
}
return TRUE;
-Exception:
+ Exception:
if (pFilterHandle) {
media_filter_destroy(pFilterHandle);
}
bool vp_media_contents_get_weahter_tag(const char *szFilePath,
- char **szWeatherTag)
+ char **szWeatherTag)
{
if (szFilePath == NULL) {
VideoLogError("szFilePath is NULL");
char szTmpStr[4096] = { 0, };
snprintf(szTmpStr, 4096,
- "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
- szFilePath);
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
+ szFilePath);
nRet = media_filter_create(&pFilterHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
}
nRet =
- media_filter_set_condition(pFilterHandle, szTmpStr,
- MEDIA_CONTENT_COLLATE_DEFAULT);
+ media_filter_set_condition(pFilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_filter_set_condition is fail : 0x%x", nRet);
goto Exception;
}
nRet =
- media_info_foreach_media_from_db(pFilterHandle,
- __vp_media_contents_info_cb,
- &pMediaHandle);
+ media_info_foreach_media_from_db(pFilterHandle,
+ __vp_media_contents_info_cb,
+ &pMediaHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("media_info_foreach_media_from_db is fail : 0x%x", nRet);
+ VideoLogError("media_info_foreach_media_from_db is fail : 0x%x",
+ nRet);
goto Exception;
}
return TRUE;
-Exception:
+ Exception:
VP_FREE(szWeather);
return FALSE;
}
-bool vp_media_contents_subtitle_list_get(GList **pList)
+bool vp_media_contents_subtitle_list_get(GList ** pList)
{
char *szCondition = NULL;
goto Exception;
}
// media_type 4 : other file
- szCondition =
- (char *)
- g_strdup_printf
- ("MEDIA_TYPE = 4 AND (MEDIA_DISPLAY_NAME like \"%%%s\" OR MEDIA_DISPLAY_NAME like \"%%%s\" OR MEDIA_DISPLAY_NAME like \"%%%s\")",
- ".smi", ".sub", ".srt");
+ szCondition = (char *)
+ g_strdup_printf
+ ("MEDIA_TYPE = 4 AND (MEDIA_DISPLAY_NAME like \"%%%s\" OR MEDIA_DISPLAY_NAME like \"%%%s\" OR MEDIA_DISPLAY_NAME like \"%%%s\")",
+ ".smi", ".sub", ".srt");
if (szCondition == NULL) {
VideoLogError("szCondition NULL");
goto Exception;
VideoSecureLogInfo("szCondition is szCondition: %s", szCondition);
nRet =
- media_filter_set_condition(pFilterHandle, szCondition,
- MEDIA_CONTENT_COLLATE_DEFAULT);
+ media_filter_set_condition(pFilterHandle, szCondition,
+ MEDIA_CONTENT_COLLATE_DEFAULT);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_filter_set_condition is fail : 0x%x", nRet);
goto Exception;
}
nRet =
- media_filter_set_order(pFilterHandle, MEDIA_CONTENT_ORDER_ASC,
- MEDIA_TITLE, MEDIA_CONTENT_COLLATE_NOCASE);
+ media_filter_set_order(pFilterHandle, MEDIA_CONTENT_ORDER_ASC,
+ MEDIA_TITLE, MEDIA_CONTENT_COLLATE_NOCASE);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_filter_set_order is fail : 0x%x", nRet);
goto Exception;
}
nRet =
- media_info_foreach_media_from_db(pFilterHandle,
- __vp_media_contents_subtitles_iter_cb,
- pList);
+ media_info_foreach_media_from_db(pFilterHandle,
+ __vp_media_contents_subtitles_iter_cb,
+ pList);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_info_foreach_media_from_db is fail : 0x%x",
- nRet);
+ nRet);
goto Exception;
}
return TRUE;
-Exception:
+ Exception:
VP_FREE(szCondition);
if (pFilterHandle) {
/* callback functions */
static bool __vp_media_contents_file_is_exist_cb(media_info_h
- pMediaHandle,
- void *pUserData)
+ pMediaHandle,
+ void *pUserData)
{
bool *bExist = (bool *) pUserData;
char szTmpStr[4096] = { 0, };
snprintf(szTmpStr, 4096,
- "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
- szFilePath);
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
+ szFilePath);
nRet = media_filter_create(&pFilterHandle);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
}
nRet =
- media_filter_set_condition(pFilterHandle, szTmpStr,
- MEDIA_CONTENT_COLLATE_DEFAULT);
+ media_filter_set_condition(pFilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_filter_set_condition is fail : 0x%x", nRet);
goto End;
}
nRet =
- media_info_foreach_media_from_db(pFilterHandle,
- __vp_media_contents_file_is_exist_cb,
- &bExist);
+ media_info_foreach_media_from_db(pFilterHandle,
+ __vp_media_contents_file_is_exist_cb,
+ &bExist);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("media_info_foreach_media_from_db is fail : 0x%x", nRet);
+ VideoLogError("media_info_foreach_media_from_db is fail : 0x%x",
+ nRet);
goto End;
}
-End:
+ End:
if (pFilterHandle) {
media_filter_destroy(pFilterHandle);
pFilterHandle = 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <media_key.h>
#include <efl_extension.h>
} MediaKey;
-static void _vp_media_key_destroy_handle(MediaKey *pMediaKey);
+static void _vp_media_key_destroy_handle(MediaKey * pMediaKey);
/* callback functions */
static void __vp_media_key_event_cb(media_key_e nKey,
- media_key_event_e nEvent,
- void *pUserData)
+ media_key_event_e nEvent,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("User data is NULL.");
switch (nKey) {
case MEDIA_KEY_PLAY:
pMediaKey->pEventCb(VP_MEDIA_KEY_PLAY, bReleased,
- pMediaKey->pUserData);
+ pMediaKey->pUserData);
break;
case MEDIA_KEY_PAUSE:
pMediaKey->pEventCb(VP_MEDIA_KEY_PAUSE, bReleased,
- pMediaKey->pUserData);
+ pMediaKey->pUserData);
break;
case MEDIA_KEY_PLAYPAUSE:
pMediaKey->pEventCb(VP_MEDIA_KEY_PLAYPAUSE, bReleased,
- pMediaKey->pUserData);
+ pMediaKey->pUserData);
break;
case MEDIA_KEY_PREVIOUS:
pMediaKey->pEventCb(VP_MEDIA_KEY_PREVIOUS, bReleased,
- pMediaKey->pUserData);
+ pMediaKey->pUserData);
break;
case MEDIA_KEY_REWIND:
pMediaKey->pEventCb(VP_MEDIA_KEY_REWIND, bReleased,
- pMediaKey->pUserData);
+ pMediaKey->pUserData);
break;
case MEDIA_KEY_NEXT:
pMediaKey->pEventCb(VP_MEDIA_KEY_NEXT, bReleased,
- pMediaKey->pUserData);
+ pMediaKey->pUserData);
break;
case MEDIA_KEY_FASTFORWARD:
pMediaKey->pEventCb(VP_MEDIA_KEY_FASTFORWARD, bReleased,
- pMediaKey->pUserData);
+ pMediaKey->pUserData);
break;
case MEDIA_KEY_STOP:
pMediaKey->pEventCb(VP_MEDIA_KEY_STOP, bReleased,
- pMediaKey->pUserData);
+ pMediaKey->pUserData);
break;
default:
VideoLogWarning("Undefined key : %d", nKey);
}
/* internal functions */
-static void _vp_media_key_destroy_handle(MediaKey *pMediaKey)
+static void _vp_media_key_destroy_handle(MediaKey * pMediaKey)
{
if (pMediaKey == NULL) {
VideoLogError("pMediaKey is NULL");
/* external functions */
-media_key_handle vp_media_key_create(Evas_Object *pWin,
- MediaKeyEventCbFunc pEventCb)
+media_key_handle vp_media_key_create(Evas_Object * pWin,
+ MediaKeyEventCbFunc pEventCb)
{
if (pWin == NULL) {
VideoLogError("pWin is NULL");
return FALSE;
}
- MediaKey *pMediaKey = (MediaKey *)pMediaKeyHandle;
- //Eina_Bool nret = eext_win_keygrab_set(pMediaKey->pWin, "XF86AudioMedia");
- //VideoLogError("XF86AudioMedia key returns value: %d", nret);
+ MediaKey *pMediaKey = (MediaKey *) pMediaKeyHandle;
int nErr = MEDIA_KEY_ERROR_NONE;
- nErr = media_key_reserve(__vp_media_key_event_cb, (void *)pMediaKey);
+ nErr = media_key_reserve(__vp_media_key_event_cb, (void *) pMediaKey);
if (nErr != MEDIA_KEY_ERROR_NONE) {
VideoLogError("media_key_reserve().. %d", nErr);
return FALSE;
}
media_key_release();
- //MediaKey *pMediaKey = (MediaKey *) pMediaKeyHandle;
-
- //Eina_Bool nret = eext_win_keygrab_unset(pMediaKey->pWin, "XF86AudioMedia");
- //VideoLogError("XF86AudioMedia key returns value: %d", nret);
-
return TRUE;
}
bool vp_media_key_set_user_data(media_key_handle pMediaKeyHandle,
- void *pUserData)
+ void *pUserData)
{
if (pMediaKeyHandle == NULL) {
VideoLogError("pMediaKeyHandle is 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
#include <Ecore.h>
#include <player.h>
}
}
-//static int _vp_mm_player_priv_convert_suond_filter(int nCode, bool bAppToFW)
-//{
-//
-///* if (bAppToFW) {
-// switch (nCode)
-// {
-// // case AUDIO_EFFECT_PRESET_NONE: return VP_MM_PLAYER_FILTER_NONE;
-//// case AUDIO_EFFECT_PRESET_VOICE: return VP_MM_PLAYER_FILTER_VOICE;
-// // case AUDIO_EFFECT_PRESET_MOVIE: return VP_MM_PLAYER_FILTER_MOVIE;
-// //case AUDIO_EFFECT_PRESET_VIRTUAL_5_1: return VP_MM_PLAYER_FILTER_VITUAL_71;
-// }
-// }
-// else {
-// switch (nCode)
-// {
-// // case VP_MM_PLAYER_FILTER_NONE: return AUDIO_EFFECT_PRESET_NONE;
-// // case VP_MM_PLAYER_FILTER_VOICE: return AUDIO_EFFECT_PRESET_VOICE;
-//// case VP_MM_PLAYER_FILTER_MOVIE: return AUDIO_EFFECT_PRESET_MOVIE;
-// // case VP_MM_PLAYER_FILTER_VITUAL_71: return AUDIO_EFFECT_PRESET_VIRTUAL_5_1;
-// }
-// }*/
-// return 0;
-//}
-
static int _vp_mm_player_priv_convert_video_sink(int nCode, bool bAppToFW)
{
if (bAppToFW) {
switch (nCode) {
- case PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT:
+ case PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT:
return VP_MM_PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT;
}
} else {
return PLAYER_INTERRUPTED_BY_ALARM;
case VP_MM_PLAYER_INTERRUPTED_BY_EMERGENCY:
return PLAYER_INTERRUPTED_BY_EMERGENCY;
- //case VP_MM_PLAYER_INTERRUPTED_RESUMABLE_MEDIA:
- // return PLAYER_INTERRUPTED_BY_RESUMABLE_MEDIA;
case VP_MM_PLAYER_INTERRUPTED_NOTIFICATION:
return PLAYER_INTERRUPTED_BY_NOTIFICATION;
}
}
static int _vp_mm_player_priv_convert_player_state(int nCode,
- bool bAppToFW)
+ bool bAppToFW)
{
if (bAppToFW) {
static int _vp_mm_player_priv_convert_display_mode(int nCode,
- bool bAppToFW)
+ bool bAppToFW)
{
if (bAppToFW) {
switch (nCode) {
}
-//static int _vp_mm_player_priv_convert_missed_plugin_type(int nCode, bool bAppToFW)
-//{
-///* if (bAppToFW) {
-// switch (nCode)
-// {
-//// case PLAYER_MISSED_PLUGIN_UNKNOWN: return VP_MM_PLAYER_MISSED_PLUGIN_UNKNOWN;
-// // case PLAYER_MISSED_PLUGIN_VIDEO_DECODER: return VP_MM_PLAYER_MISSED_PLUGIN_VIDEO;
-// // case PLAYER_MISSED_PLUGIN_AUDIO_DECODER: return VP_MM_PLAYER_MISSED_PLUGIN_AUDIO;
-// }
-// }
-// else {
-// switch (nCode)
-// {
-// // case VP_MM_PLAYER_MISSED_PLUGIN_UNKNOWN: return PLAYER_MISSED_PLUGIN_UNKNOWN;
-// // case VP_MM_PLAYER_MISSED_PLUGIN_VIDEO: return PLAYER_MISSED_PLUGIN_VIDEO_DECODER;
-//// case VP_MM_PLAYER_MISSED_PLUGIN_AUDIO: return PLAYER_MISSED_PLUGIN_AUDIO_DECODER;
-// }
-// }*/
-// return 0;
-//}
-
-
/* callback functions */
static void __vp_mm_player_pipe_prepare_cb(void *pUserData, void *pBuff,
- unsigned int nByte)
+ unsigned int nByte)
{
if (pUserData == NULL) {
VideoLogError("pPlayerHandle is NULL");
}
static void __vp_mm_player_pipe_end_of_stream_cb(void *pUserData,
- void *pBuff,
- unsigned int nByte)
+ void *pBuff,
+ unsigned int nByte)
{
if (pUserData == NULL) {
VideoLogError("pPlayerHandle is NULL");
}
static void __vp_mm_player_pipe_seek_complete_cb(void *pUserData,
- void *pBuff,
- unsigned int nByte)
+ void *pBuff,
+ unsigned int nByte)
{
if (pUserData == NULL) {
VideoLogError("pPlayerHandle is NULL");
}
static void __vp_mm_player_pipe_interrupted_cb(void *pUserData,
- void *pBuff,
- unsigned int nByte)
+ void *pBuff,
+ unsigned int nByte)
{
if (pUserData == NULL) {
VideoLogError("pPlayerHandle is NULL");
int nInterruptCode = 0;
if (pMMPlayer->pInterruptParam) {
nInterruptCode =
- _vp_mm_player_priv_convert_interrupt(pMMPlayer->
- pInterruptParam->
- nInterrupt, TRUE);
+ _vp_mm_player_priv_convert_interrupt
+ (pMMPlayer->pInterruptParam->nInterrupt, TRUE);
}
pMMPlayer->pCbFunc->pInterruptedCb(nInterruptCode,
- pMMPlayer->pParam);
+ pMMPlayer->pParam);
}
return;
}
static void __vp_mm_player_pipe_error_cb(void *pUserData, void *pBuff,
- unsigned int nByte)
+ unsigned int nByte)
{
if (pUserData == NULL) {
VideoLogError("pPlayerHandle is NULL");
int nErr = 0;
if (pMMPlayer->pErrorParam) {
nErr =
- _vp_mm_player_priv_convert_error(pMMPlayer->pErrorParam->
- nError, TRUE);
+ _vp_mm_player_priv_convert_error(pMMPlayer->
+ pErrorParam->nError,
+ TRUE);
}
pMMPlayer->pCbFunc->pErrorCb(nErr, pMMPlayer->pParam);
}
static void __vp_mm_player_pipe_buffering_cb(void *pUserData, void *pBuff,
- unsigned int nByte)
+ unsigned int nByte)
{
if (pUserData == NULL) {
VideoLogError("pPlayerHandle is NULL");
}
static void __vp_mm_player_pipe_subtitle_update_cb(void *pUserData,
- void *pBuff,
- unsigned int nByte)
+ void *pBuff,
+ unsigned int nByte)
{
if (pUserData == NULL) {
VideoLogError("pPlayerHandle is NULL");
if (szSubtitleText && strlen(szSubtitleText) > 0)
pMMPlayer->pCbFunc->pSubtitleUpdateCb(nDuration,
- szSubtitleText,
- pMMPlayer->pParam);
+ szSubtitleText,
+ pMMPlayer->pParam);
VP_FREE(szSubtitleText);
}
}
static void __vp_mm_player_pipe_pd_message_cb(void *pUserData,
- void *pBuff,
- unsigned int nByte)
+ void *pBuff,
+ unsigned int nByte)
{
if (pUserData == NULL) {
VideoLogError("pPlayerHandle is NULL");
}
static void __vp_mm_player_pipe_captured_cb(void *pUserData, void *pBuff,
- unsigned int nByte)
+ unsigned int nByte)
{
if (pUserData == NULL) {
VideoLogError("pPlayerHandle is NULL");
}
pMMPlayer->pCbFunc->pCapturedCb(pFrame, nWidth, nHeight, nSize,
- pMMPlayer->pParam);
+ pMMPlayer->pParam);
}
return;
}
static void __vp_mm_player_pipe_missed_plugin_cb(void *pUserData,
- void *pBuff,
- unsigned int nByte)
+ void *pBuff,
+ unsigned int nByte)
{
if (pUserData == NULL) {
VideoLogError("pPlayerHandle is NULL");
if (pMMPlayer->pCbFunc->pMissedPluginCb) {
vp_mm_player_missed_plugin_t nMissedType =
- VP_MM_PLAYER_MISSED_PLUGIN_UNKNOWN;
+ VP_MM_PLAYER_MISSED_PLUGIN_UNKNOWN;
if (pMMPlayer->pMissedParam) {
nMissedType = pMMPlayer->pMissedParam->nMissedType;
}
pMMPlayer->pCbFunc->pMissedPluginCb(nMissedType,
- pMMPlayer->pParam);
+ pMMPlayer->pParam);
}
return;
static void __vp_mm_player_pipe_image_buffer_cb(void *pUserData,
- void *pBuff,
- unsigned int nByte)
+ void *pBuff,
+ unsigned int nByte)
{
if (pUserData == NULL) {
VideoLogError("pPlayerHandle is NULL");
}
pMMPlayer->pCbFunc->pImageBufferCb(pBuffer, nSize,
- pMMPlayer->pParam);
+ pMMPlayer->pParam);
}
return;
if (pMMPlayer->pCbPipe->pPreparePipe) {
Eina_Bool bRet = EINA_FALSE;
bRet =
- ecore_pipe_write(pMMPlayer->pCbPipe->pPreparePipe,
- (void *) pMMPlayer, sizeof(MMPlayer));
+ ecore_pipe_write(pMMPlayer->pCbPipe->pPreparePipe,
+ (void *) pMMPlayer, sizeof(MMPlayer));
if (bRet != EINA_TRUE) {
VideoLogError(" : ecore pipe write fail");
}
if (pMMPlayer->pCbPipe->pEndOfStreamPipe) {
Eina_Bool bRet = EINA_FALSE;
bRet =
- ecore_pipe_write(pMMPlayer->pCbPipe->pEndOfStreamPipe,
- (void *) pMMPlayer, sizeof(MMPlayer));
+ ecore_pipe_write(pMMPlayer->pCbPipe->pEndOfStreamPipe,
+ (void *) pMMPlayer, sizeof(MMPlayer));
if (bRet != EINA_TRUE) {
VideoLogError(" : ecore pipe write fail");
}
if (pMMPlayer->pCbPipe->pSeekCompletePipe) {
Eina_Bool bRet = EINA_FALSE;
bRet =
- ecore_pipe_write(pMMPlayer->pCbPipe->pSeekCompletePipe,
- (void *) pMMPlayer, sizeof(MMPlayer));
+ ecore_pipe_write(pMMPlayer->pCbPipe->pSeekCompletePipe,
+ (void *) pMMPlayer, sizeof(MMPlayer));
if (bRet != EINA_TRUE) {
VideoLogError(" : ecore pipe write fail");
}
}
static void __vp_mm_player_interrupted_cb(player_interrupted_code_e nCode,
- void *pUserData)
+ void *pUserData)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
bRet =
- ecore_pipe_write(pMMPlayer->pCbPipe->pInterruptedPipe,
- (void *) pMMPlayer, sizeof(MMPlayer));
+ ecore_pipe_write(pMMPlayer->pCbPipe->pInterruptedPipe,
+ (void *) pMMPlayer, sizeof(MMPlayer));
if (bRet != EINA_TRUE) {
VideoLogError(" : ecore pipe write fail");
}
}
bRet =
- ecore_pipe_write(pMMPlayer->pCbPipe->pErrorPipe,
- (void *) pMMPlayer, sizeof(MMPlayer));
+ ecore_pipe_write(pMMPlayer->pCbPipe->pErrorPipe,
+ (void *) pMMPlayer, sizeof(MMPlayer));
if (bRet != EINA_TRUE) {
VideoLogError(" : ecore pipe write fail");
}
}
bRet =
- ecore_pipe_write(pMMPlayer->pCbPipe->pBufferingPipe,
- (void *) pMMPlayer, sizeof(MMPlayer));
+ ecore_pipe_write(pMMPlayer->pCbPipe->pBufferingPipe,
+ (void *) pMMPlayer, sizeof(MMPlayer));
if (bRet != EINA_TRUE) {
VideoLogError(" : ecore pipe write fail");
}
}
static void __vp_mm_player_subtitle_updated_cb(unsigned long nDuration,
- char *text,
- void *pUserData)
+ char *text, void *pUserData)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
if (pMMPlayer->pSubtitleParam && pMMPlayer->pSubtitleParam->txt
- && strlen(pMMPlayer->pSubtitleParam->txt) > 0) {
+ && strlen(pMMPlayer->pSubtitleParam->txt) > 0) {
Eina_Bool bRet = EINA_FALSE;
bRet =
- ecore_pipe_write(pMMPlayer->pCbPipe->pSubtitleUpdatePipe,
- (void *) pMMPlayer, sizeof(MMPlayer));
+ ecore_pipe_write(pMMPlayer->pCbPipe->pSubtitleUpdatePipe,
+ (void *) pMMPlayer, sizeof(MMPlayer));
if (bRet != EINA_TRUE) {
VideoLogError(" : ecore pipe write fail");
}
}
static void __vp_mm_player_video_captured_cb(unsigned char *pFrame,
- int nWidth, int nHeight,
- unsigned int nSize,
- void *pUserData)
+ int nWidth, int nHeight,
+ unsigned int nSize,
+ void *pUserData)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
pMMPlayer->pCaptureParam->pParam = pMMPlayer->pParam;
}
bRet =
- ecore_pipe_write(pMMPlayer->pCbPipe->pCapturedPipe,
- (void *) pMMPlayer, sizeof(MMPlayer));
+ ecore_pipe_write(pMMPlayer->pCbPipe->pCapturedPipe,
+ (void *) pMMPlayer, sizeof(MMPlayer));
if (bRet != EINA_TRUE) {
VideoLogError(" : ecore pipe write fail");
}
}
-//static void __vp_mm_player_missed_plugin_cb(player_missed_plugin_type_e type, char *message, void *pUserData)
-//{
-// if (pUserData == NULL) {
-// VideoLogError("pUserData is NULL");
-// return;
-// }
-//
-// MMPlayer *pMMPlayer = (MMPlayer *)pUserData;
-// if (pMMPlayer->pCbPipe->pMissedPluginPipe) {
-//
-// if (pMMPlayer->pMissedParam) {
-//
-// pMMPlayer->pMissedParam->nMissedType = 0;//_vp_mm_player_priv_convert_missed_plugin_type(type, TRUE);
-// pMMPlayer->pMissedParam->pParam = pMMPlayer->pParam;
-// }
-//
-// Eina_Bool bRet = EINA_FALSE;
-// bRet = ecore_pipe_write(pMMPlayer->pCbPipe->pMissedPluginPipe, (void *)pMMPlayer, sizeof(MMPlayer));
-// if (bRet != EINA_TRUE) {
-// VideoLogError(" : ecore pipe write fail");
-// }
-// }
-//
-// return;
-//
-//}
-
-//static void __vp_mm_player_image_buffer_cb(char *pBuffer, int nSize, void *pUserData)
-//{
-// if (pUserData == NULL) {
-// VideoLogError("pUserData is NULL");
-// return;
-// }
-//
-// if (pBuffer == NULL) {
-// VideoLogError("pBuffer is NULL");
-// return;
-// }
-// MMPlayer *pMMPlayer = (MMPlayer *)pUserData;
-// if (pMMPlayer->pCbPipe->pImageBufferPipe) {
-// if (pMMPlayer->pImageBufferParam) {
-// if (pMMPlayer->pImageBufferParam->pBuffer) {
-// free(pMMPlayer->pImageBufferParam->pBuffer);
-// pMMPlayer->pImageBufferParam->pBuffer = NULL;
-// }
-//
-// pMMPlayer->pImageBufferParam->pBuffer = calloc(1, nSize);
-// if (pMMPlayer->pImageBufferParam->pBuffer == NULL) {
-// VideoLogError("Alloc Fail");
-// return;
-// }
-//
-// memcpy(pMMPlayer->pImageBufferParam->pBuffer, pBuffer, nSize);
-//
-// pMMPlayer->pImageBufferParam->nSize = nSize;
-// pMMPlayer->pImageBufferParam->pParam = pMMPlayer->pParam;
-// }
-//
-// Eina_Bool bRet = EINA_FALSE;
-// bRet = ecore_pipe_write(pMMPlayer->pCbPipe->pImageBufferPipe, (void *)pMMPlayer, sizeof(MMPlayer));
-// if (bRet != EINA_TRUE) {
-// VideoLogError(" : ecore pipe write fail");
-// }
-//
-// }
-//
-// return;
-//
-//}
/* internal functions */
static void _vp_mm_callback_param_free(vp_mm_player_callback_t nType,
- void *pParam)
+ void *pParam)
{
if (pParam == NULL) {
VideoLogError("Param data is NULL");
if (nType == VP_MM_PLAYER_CAPTURE_VIDEO_CB) {
MMPlayerCaptureParam *pCaptureParam =
- (MMPlayerCaptureParam *) pParam;
+ (MMPlayerCaptureParam *) pParam;
if (pCaptureParam->pFrame) {
free(pCaptureParam->pFrame);
pCaptureParam->pFrame = NULL;
pCaptureParam = NULL;
} else if (nType == VP_MM_PLAYER_SUBTITLE_UPDATE_CB) {
MMPlayerSubtitleParam *pSubtitleParam =
- (MMPlayerSubtitleParam *) pParam;
+ (MMPlayerSubtitleParam *) pParam;
if (pSubtitleParam->txt) {
free(pSubtitleParam->txt);
pSubtitleParam->txt = NULL;
pSubtitleParam = NULL;
} else if (nType == VP_MM_PLAYER_IMAGE_BUFFER_CB) {
MMPlayerImageBufferParam *pImageBufferParam =
- (MMPlayerImageBufferParam *) pParam;
+ (MMPlayerImageBufferParam *) pParam;
if (pImageBufferParam->pBuffer) {
free(pImageBufferParam->pBuffer);
pImageBufferParam->pBuffer = NULL;
return;
}
-static void _vp_mm_ecore_pipe_create(MMPlayer *pMMPlayer)
+static void _vp_mm_ecore_pipe_create(MMPlayer * pMMPlayer)
{
if (pMMPlayer == NULL) {
VideoLogError("pMMPlayer is NULL");
}
pCbPipe->pPreparePipe =
- ecore_pipe_add((Ecore_Pipe_Cb) __vp_mm_player_pipe_prepare_cb,
- (void *) pMMPlayer);
+ ecore_pipe_add((Ecore_Pipe_Cb) __vp_mm_player_pipe_prepare_cb,
+ (void *) pMMPlayer);
if (pCbPipe->pPreparePipe == NULL) {
VideoLogWarning("pPreparePipe create fail");
}
- pCbPipe->pEndOfStreamPipe =
- ecore_pipe_add((Ecore_Pipe_Cb)
- __vp_mm_player_pipe_end_of_stream_cb,
- (void *) pMMPlayer);
+ pCbPipe->pEndOfStreamPipe = ecore_pipe_add((Ecore_Pipe_Cb)
+ __vp_mm_player_pipe_end_of_stream_cb,
+ (void *) pMMPlayer);
if (pCbPipe->pEndOfStreamPipe == NULL) {
VideoLogWarning("pEndOfStreamPipe create fail");
}
- pCbPipe->pSeekCompletePipe =
- ecore_pipe_add((Ecore_Pipe_Cb)
- __vp_mm_player_pipe_seek_complete_cb,
- (void *) pMMPlayer);
+ pCbPipe->pSeekCompletePipe = ecore_pipe_add((Ecore_Pipe_Cb)
+ __vp_mm_player_pipe_seek_complete_cb,
+ (void *) pMMPlayer);
if (pCbPipe->pSeekCompletePipe == NULL) {
VideoLogWarning("pSeekCompletePipe create fail");
}
pCbPipe->pInterruptedPipe =
- ecore_pipe_add((Ecore_Pipe_Cb) __vp_mm_player_pipe_interrupted_cb,
- (void *) pMMPlayer);
+ ecore_pipe_add((Ecore_Pipe_Cb) __vp_mm_player_pipe_interrupted_cb,
+ (void *) pMMPlayer);
if (pCbPipe->pInterruptedPipe == NULL) {
VideoLogWarning("pInterruptedPipe create fail");
}
pCbPipe->pErrorPipe =
- ecore_pipe_add((Ecore_Pipe_Cb) __vp_mm_player_pipe_error_cb,
- (void *) pMMPlayer);
+ ecore_pipe_add((Ecore_Pipe_Cb) __vp_mm_player_pipe_error_cb,
+ (void *) pMMPlayer);
if (pCbPipe->pErrorPipe == NULL) {
VideoLogWarning("pErrorPipe create fail");
}
pCbPipe->pBufferingPipe =
- ecore_pipe_add((Ecore_Pipe_Cb) __vp_mm_player_pipe_buffering_cb,
- (void *) pMMPlayer);
+ ecore_pipe_add((Ecore_Pipe_Cb) __vp_mm_player_pipe_buffering_cb,
+ (void *) pMMPlayer);
if (pCbPipe->pBufferingPipe == NULL) {
VideoLogWarning("pBufferingPipe create fail");
}
- pCbPipe->pSubtitleUpdatePipe =
- ecore_pipe_add((Ecore_Pipe_Cb)
- __vp_mm_player_pipe_subtitle_update_cb,
- (void *) pMMPlayer);
+ pCbPipe->pSubtitleUpdatePipe = ecore_pipe_add((Ecore_Pipe_Cb)
+ __vp_mm_player_pipe_subtitle_update_cb,
+ (void *) pMMPlayer);
if (pCbPipe->pSubtitleUpdatePipe == NULL) {
VideoLogWarning("pSubtitleUpdatePipe create fail");
}
pCbPipe->pPDMessagePipe =
- ecore_pipe_add((Ecore_Pipe_Cb) __vp_mm_player_pipe_pd_message_cb,
- (void *) pMMPlayer);
+ ecore_pipe_add((Ecore_Pipe_Cb) __vp_mm_player_pipe_pd_message_cb,
+ (void *) pMMPlayer);
if (pCbPipe->pPDMessagePipe == NULL) {
VideoLogWarning("pPDMessagePipe create fail");
}
pCbPipe->pCapturedPipe =
- ecore_pipe_add((Ecore_Pipe_Cb) __vp_mm_player_pipe_captured_cb,
- (void *) pMMPlayer);
+ ecore_pipe_add((Ecore_Pipe_Cb) __vp_mm_player_pipe_captured_cb,
+ (void *) pMMPlayer);
if (pCbPipe->pCapturedPipe == NULL) {
VideoLogWarning("pCapturedPipe create fail");
}
- pCbPipe->pMissedPluginPipe =
- ecore_pipe_add((Ecore_Pipe_Cb)
- __vp_mm_player_pipe_missed_plugin_cb,
- (void *) pMMPlayer);
+ pCbPipe->pMissedPluginPipe = ecore_pipe_add((Ecore_Pipe_Cb)
+ __vp_mm_player_pipe_missed_plugin_cb,
+ (void *) pMMPlayer);
if (pCbPipe->pMissedPluginPipe == NULL) {
VideoLogWarning("pMissedPluginPipe create fail");
}
- pCbPipe->pImageBufferPipe =
- ecore_pipe_add((Ecore_Pipe_Cb)
- __vp_mm_player_pipe_image_buffer_cb,
- (void *) pMMPlayer);
+ pCbPipe->pImageBufferPipe = ecore_pipe_add((Ecore_Pipe_Cb)
+ __vp_mm_player_pipe_image_buffer_cb,
+ (void *) pMMPlayer);
if (pCbPipe->pImageBufferPipe == NULL) {
VideoLogWarning("pImageBufferPipe create fail");
}
return;
}
-static void _vp_mm_ecore_pipe_del(Ecore_Pipe *pPipe)
+static void _vp_mm_ecore_pipe_del(Ecore_Pipe * pPipe)
{
if (pPipe == NULL) {
VideoLogError("pPipe is NULL");
return;
}
-static void _vp_mm_register_default_callback(MMPlayer *pMMPlayer)
+static void _vp_mm_register_default_callback(MMPlayer * pMMPlayer)
{
if (pMMPlayer == NULL) {
VideoLogError("pMMPlayer is NULL");
}
int nRet = PLAYER_ERROR_NONE;
nRet =
- player_set_completed_cb(pMMPlayer->pPlayer,
- __vp_mm_player_completed_cb,
- (void *) pMMPlayer);
+ player_set_completed_cb(pMMPlayer->pPlayer,
+ __vp_mm_player_completed_cb,
+ (void *) pMMPlayer);
if (nRet != PLAYER_ERROR_NONE) {
_vp_mm_player_print_err(nRet);
VideoLogError("player_set_completed_cb fail : %d", nRet);
}
nRet =
- player_set_interrupted_cb(pMMPlayer->pPlayer,
- __vp_mm_player_interrupted_cb,
- (void *) pMMPlayer);
+ player_set_interrupted_cb(pMMPlayer->pPlayer,
+ __vp_mm_player_interrupted_cb,
+ (void *) pMMPlayer);
if (nRet != PLAYER_ERROR_NONE) {
_vp_mm_player_print_err(nRet);
VideoLogError("player_set_interrupted_cb fail : %d", nRet);
}
nRet =
- player_set_error_cb(pMMPlayer->pPlayer, __vp_mm_player_error_cb,
- (void *) pMMPlayer);
+ player_set_error_cb(pMMPlayer->pPlayer, __vp_mm_player_error_cb,
+ (void *) pMMPlayer);
if (nRet != PLAYER_ERROR_NONE) {
_vp_mm_player_print_err(nRet);
VideoLogError("player_set_error_cb fail : %d", nRet);
}
nRet =
- player_set_buffering_cb(pMMPlayer->pPlayer,
- __vp_mm_player_buffering_cb,
- (void *) pMMPlayer);
+ player_set_buffering_cb(pMMPlayer->pPlayer,
+ __vp_mm_player_buffering_cb,
+ (void *) pMMPlayer);
if (nRet != PLAYER_ERROR_NONE) {
_vp_mm_player_print_err(nRet);
VideoLogError("player_set_buffering_cb fail : %d", nRet);
}
nRet =
- player_set_subtitle_updated_cb(pMMPlayer->pPlayer,
- __vp_mm_player_subtitle_updated_cb,
- (void *) pMMPlayer);
+ player_set_subtitle_updated_cb(pMMPlayer->pPlayer,
+ __vp_mm_player_subtitle_updated_cb,
+ (void *) pMMPlayer);
if (nRet != PLAYER_ERROR_NONE) {
_vp_mm_player_print_err(nRet);
VideoLogError("player_set_subtitle_updated_cb fail : %d", nRet);
}
-// nRet = player_set_missed_plugin_info_cb(pMMPlayer->pPlayer, __vp_mm_player_missed_plugin_cb, (void *)pMMPlayer);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_set_missed_plugin_info_cb fail : %d", nRet);
-// }
-
-// nRet = player_set_image_buffer_updated_cb(pMMPlayer->pPlayer, __vp_mm_player_image_buffer_cb, (void *)pMMPlayer);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_set_image_buffer_updated_cb fail : %d", nRet);
-// }
return;
}
-static void _vp_mm_unregister_default_callback(MMPlayer *pMMPlayer)
+static void _vp_mm_unregister_default_callback(MMPlayer * pMMPlayer)
{
if (pMMPlayer == NULL) {
VideoLogError("pMMPlayer is NULL");
_vp_mm_player_print_err(nRet);
VideoLogError("player_unset_subtitle_updated_cb fail : %d", nRet);
}
-// nRet = player_unset_image_buffer_updated_cb(pMMPlayer->pPlayer);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_unset_image_buffer_updated_cb fail : %d", nRet);
-// }
return;
}
if (pMMPlayer->stream_info) {
int error = SOUND_MANAGER_ERROR_NONE;
- error = sound_manager_acquire_focus(pMMPlayer->stream_info, SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
+ error =
+ sound_manager_acquire_focus(pMMPlayer->stream_info,
+ SOUND_STREAM_FOCUS_FOR_PLAYBACK,
+ SOUND_BEHAVIOR_NONE, NULL);
if (error != SOUND_MANAGER_ERROR_NONE) {
VideoLogError("failed to acquire focus [%x]", error);
}
- sound_manager_get_focus_reacquisition(pMMPlayer->stream_info, &pMMPlayer->reacquire_state);
+ sound_manager_get_focus_reacquisition(pMMPlayer->stream_info,
+ &pMMPlayer->reacquire_state);
if (pMMPlayer->reacquire_state == EINA_FALSE) {
- sound_manager_set_focus_reacquisition(pMMPlayer->stream_info, EINA_TRUE);
+ sound_manager_set_focus_reacquisition(pMMPlayer->stream_info,
+ EINA_TRUE);
}
}
vp_mm_player_destroy((mm_player_handle) pMMPlayer);
return NULL;
}
-// nRet = player_set_rich_audio(pMMPlayer->pPlayer);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// }
pMMPlayer->pCbFunc = calloc(1, sizeof(MMPlayerCbFunc));
if (pMMPlayer->pCbFunc == NULL) {
VideoLogError("MMPlayer pSubtitleParam alloc fail");
}
- pMMPlayer->pInterruptParam =
- calloc(1, sizeof(MMPlayerInterruptParam));
+ pMMPlayer->pInterruptParam = calloc(1, sizeof(MMPlayerInterruptParam));
if (pMMPlayer->pInterruptParam == NULL) {
VideoLogError("MMPlayer pInterruptParam alloc fail");
}
if (pMMPlayer->pErrorParam == NULL) {
VideoLogError("MMPlayer pErrorParam alloc fail");
}
- pMMPlayer->pBufferingParam =
- calloc(1, sizeof(MMPlayerBufferingParam));
+ pMMPlayer->pBufferingParam = calloc(1, sizeof(MMPlayerBufferingParam));
if (pMMPlayer->pBufferingParam == NULL) {
VideoLogError("MMPlayer pBufferingParam alloc fail");
}
VideoLogError("MMPlayer pPDParam alloc fail");
}
- pMMPlayer->pMissedParam =
- calloc(1, sizeof(MMPlayerMissedPluginParam));
+ pMMPlayer->pMissedParam = calloc(1, sizeof(MMPlayerMissedPluginParam));
if (pMMPlayer->pMissedParam == NULL) {
VideoLogError("MMPlayer pMissedParam alloc fail");
}
pMMPlayer->pImageBufferParam =
- calloc(1, sizeof(MMPlayerImageBufferParam));
+ calloc(1, sizeof(MMPlayerImageBufferParam));
if (pMMPlayer->pImageBufferParam == NULL) {
VideoLogError("MMPlayer pImageBufferParam alloc fail");
}
return;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
int nRet = 0;
if (!vp_mm_player_unrealize(pPlayerHandle)) {
pMMPlayer->bIsScaling = FALSE;
_vp_mm_callback_param_free(VP_MM_PLAYER_CAPTURE_VIDEO_CB,
- (void *) pMMPlayer->pCaptureParam);
+ (void *) pMMPlayer->pCaptureParam);
_vp_mm_callback_param_free(VP_MM_PLAYER_SUBTITLE_UPDATE_CB,
- (void *) pMMPlayer->pSubtitleParam);
+ (void *) pMMPlayer->pSubtitleParam);
_vp_mm_callback_param_free(VP_MM_PLAYER_IMAGE_BUFFER_CB,
- (void *) pMMPlayer->pImageBufferParam);
+ (void *) pMMPlayer->pImageBufferParam);
if (pMMPlayer->pInterruptParam) {
free(pMMPlayer->pInterruptParam);
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->bIsRealize) {
VideoLogError("Already realized");
VideoLogError("player_set_uri is fail : %d", nRet);
return FALSE;
}
-// nRet = player_set_safety_volume(pMMPlayer->pPlayer);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_set_safety_volume is fail : %d", nRet);
-// }
_vp_mm_register_default_callback(pMMPlayer);
-// nRet = player_enable_sync_handler(pMMPlayer->pPlayer, TRUE);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_enable_sync_handler is fail : %d", nRet);
-// return FALSE;
-// }
nRet = player_prepare(pMMPlayer->pPlayer);
if (nRet != PLAYER_ERROR_NONE) {
}
bool vp_mm_player_realize_async(mm_player_handle pPlayerHandle,
- char *szPath)
+ char *szPath)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->bIsRealize) {
VideoLogError("Already realized");
VideoLogError("player_set_uri is fail : %d", nRet);
return FALSE;
}
-// nRet = player_set_safety_volume(pMMPlayer->pPlayer);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_set_safety_volume is fail : %d", nRet);
-// }
_vp_mm_register_default_callback(pMMPlayer);
-// nRet = player_enable_sync_handler(pMMPlayer->pPlayer, TRUE);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_enable_sync_handler is fail : %d", nRet);
-// return FALSE;
-// }
nRet =
- player_prepare_async(pMMPlayer->pPlayer,
- __vp_mm_player_prepare_cb,
- (void *) pMMPlayer);
+ player_prepare_async(pMMPlayer->pPlayer,
+ __vp_mm_player_prepare_cb,
+ (void *) pMMPlayer);
if (nRet != PLAYER_ERROR_NONE) {
_vp_mm_player_print_err(nRet);
VideoLogError("player_prepare is fail : %d", nRet);
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
return pMMPlayer->bIsRealize;
}
bool vp_mm_player_set_callback(mm_player_handle pPlayerHandle,
- vp_mm_player_callback_t nCallbackType,
- void *pCallback)
+ vp_mm_player_callback_t nCallbackType,
+ void *pCallback)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
switch (nCallbackType) {
case VP_MM_PLAYER_REALIZE_ASYNC_CB:
pMMPlayer->pCbFunc->pPrepareCb =
- (vp_mm_player_prepare_cb) pCallback;
+ (vp_mm_player_prepare_cb) pCallback;
break;
case VP_MM_PLAYER_SEEK_COMPLETE_CB:
pMMPlayer->pCbFunc->pSeekCompleteCb =
- (vp_mm_player_seek_completed_cb) pCallback;
+ (vp_mm_player_seek_completed_cb) pCallback;
break;
case VP_MM_PLAYER_END_OF_STREAM_CB:
pMMPlayer->pCbFunc->pEndOfStreamCb =
- (vp_mm_player_completed_cb) pCallback;
+ (vp_mm_player_completed_cb) pCallback;
break;
case VP_MM_PLAYER_INTERRUPT_CB:
pMMPlayer->pCbFunc->pInterruptedCb =
- (vp_mm_player_interrupted_cb) pCallback;
+ (vp_mm_player_interrupted_cb) pCallback;
break;
case VP_MM_PLAYER_ERROR_CB:
pMMPlayer->pCbFunc->pErrorCb = (vp_mm_player_error_cb) pCallback;
break;
case VP_MM_PLAYER_BUFFERING_CB:
pMMPlayer->pCbFunc->pBufferingCb =
- (vp_mm_player_buffering_cb) pCallback;
+ (vp_mm_player_buffering_cb) pCallback;
break;
case VP_MM_PLAYER_SUBTITLE_UPDATE_CB:
pMMPlayer->pCbFunc->pSubtitleUpdateCb =
- (vp_mm_player_subtitle_updated_cb) pCallback;
+ (vp_mm_player_subtitle_updated_cb) pCallback;
break;
case VP_MM_PLAYER_PD_MESSAGE_CB:
pMMPlayer->pCbFunc->pPDMessageCb =
- (vp_mm_player_pd_message_cb) pCallback;
+ (vp_mm_player_pd_message_cb) pCallback;
break;
case VP_MM_PLAYER_CAPTURE_VIDEO_CB:
pMMPlayer->pCbFunc->pCapturedCb =
- (vp_mm_player_video_captured_cb) pCallback;
+ (vp_mm_player_video_captured_cb) pCallback;
break;
case VP_MM_PLAYER_MISSED_PLUGIN_CB:
pMMPlayer->pCbFunc->pMissedPluginCb =
- (vp_mm_player_missed_plugin_cb) pCallback;
+ (vp_mm_player_missed_plugin_cb) pCallback;
break;
case VP_MM_PLAYER_IMAGE_BUFFER_CB:
pMMPlayer->pCbFunc->pImageBufferCb =
- (vp_mm_player_image_buffer_updated_cb) pCallback;
+ (vp_mm_player_image_buffer_updated_cb) pCallback;
break;
- default:
- VideoLogError("Unknown Callback type : %d", nCallbackType);
- return FALSE;
-
}
return TRUE;
}
bool vp_mm_player_set_user_param(mm_player_handle pPlayerHandle,
- void *pParam)
+ void *pParam)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
pMMPlayer->pParam = pParam;
}
bool vp_mm_player_set_stream_info(mm_player_handle pPlayerHandle,
- void *stream_info)
+ void *stream_info)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
pMMPlayer->stream_info = stream_info;
VideoLogWarning("");
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
VideoLogError("Not realized");
return FALSE;
}
- sound_manager_get_focus_reacquisition(pMMPlayer->stream_info, &pMMPlayer->reacquire_state);
+ sound_manager_get_focus_reacquisition(pMMPlayer->stream_info,
+ &pMMPlayer->reacquire_state);
if (pMMPlayer->reacquire_state == EINA_FALSE)
- sound_manager_set_focus_reacquisition(pMMPlayer->stream_info, EINA_TRUE);
+ sound_manager_set_focus_reacquisition(pMMPlayer->stream_info,
+ EINA_TRUE);
sound_stream_focus_state_e state_for_playback;
sound_stream_focus_state_e state_for_recording;
int ret = -1;
- ret = sound_manager_get_focus_state(pMMPlayer->stream_info, &state_for_playback, &state_for_recording);
+ ret =
+ sound_manager_get_focus_state(pMMPlayer->stream_info,
+ &state_for_playback,
+ &state_for_recording);
if (ret != SOUND_MANAGER_ERROR_NONE) {
VideoLogError("failed to get focus state error[%x]", ret);
}
if (state_for_playback == SOUND_STREAM_FOCUS_STATE_RELEASED) {
- int error = SOUND_MANAGER_ERROR_NONE;
- error = sound_manager_acquire_focus(pMMPlayer->stream_info, SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
+ int error = SOUND_MANAGER_ERROR_NONE;
+ error =
+ sound_manager_acquire_focus(pMMPlayer->stream_info,
+ SOUND_STREAM_FOCUS_FOR_PLAYBACK,
+ SOUND_BEHAVIOR_NONE, NULL);
if (error != SOUND_MANAGER_ERROR_NONE)
VideoLogError("failed to acquire focus [%x]", error);
}
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
sound_stream_focus_state_e state_for_playback;
sound_stream_focus_state_e state_for_recording;
int ret = -1;
- ret = sound_manager_get_focus_state(pMMPlayer->stream_info, &state_for_playback, &state_for_recording);
+ ret =
+ sound_manager_get_focus_state(pMMPlayer->stream_info,
+ &state_for_playback,
+ &state_for_recording);
if (ret != SOUND_MANAGER_ERROR_NONE) {
VideoLogError("failed to get focus state error[%x]", ret);
- }
+ }
if (state_for_playback != SOUND_STREAM_FOCUS_STATE_RELEASED) {
- int error = SOUND_MANAGER_ERROR_NONE;
- error = sound_manager_release_focus(pMMPlayer->stream_info, SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
+ int error = SOUND_MANAGER_ERROR_NONE;
+ error =
+ sound_manager_release_focus(pMMPlayer->stream_info,
+ SOUND_STREAM_FOCUS_FOR_PLAYBACK,
+ SOUND_BEHAVIOR_NONE, NULL);
if (error != SOUND_MANAGER_ERROR_NONE) {
VideoLogError("failed to release focus error[%x]", error);
- }
+ }
}
return TRUE;
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
sound_stream_focus_state_e state_for_playback;
sound_stream_focus_state_e state_for_recording;
int ret = -1;
- ret = sound_manager_get_focus_state(pMMPlayer->stream_info, &state_for_playback, &state_for_recording);
+ ret =
+ sound_manager_get_focus_state(pMMPlayer->stream_info,
+ &state_for_playback,
+ &state_for_recording);
if (ret != SOUND_MANAGER_ERROR_NONE) {
VideoLogError("failed to get focus state error[%x]", ret);
- }
+ }
if (state_for_playback != SOUND_STREAM_FOCUS_STATE_RELEASED) {
- int error = SOUND_MANAGER_ERROR_NONE;
- error = sound_manager_release_focus(pMMPlayer->stream_info, SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
+ int error = SOUND_MANAGER_ERROR_NONE;
+ error =
+ sound_manager_release_focus(pMMPlayer->stream_info,
+ SOUND_STREAM_FOCUS_FOR_PLAYBACK,
+ SOUND_BEHAVIOR_NONE, NULL);
if (error != SOUND_MANAGER_ERROR_NONE) {
VideoLogError("failed to release focus error[%x]", error);
- }
+ }
}
return TRUE;
}
bool vp_mm_player_get_state(mm_player_handle pPlayerHandle,
- vp_mm_player_state_t *nState)
+ vp_mm_player_state_t * nState)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
player_state_e nPlayerState = PLAYER_STATE_NONE;
int nRet = player_get_state(pMMPlayer->pPlayer, &nPlayerState);
}
bool vp_mm_player_get_position(mm_player_handle pPlayerHandle,
- int *nPosition)
+ int *nPosition)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
}
bool vp_mm_player_set_position(mm_player_handle pPlayerHandle,
- int nPosition)
+ int nPosition)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
VideoLogError("Invalid position value");
return FALSE;
}
-#if 1 //#ifdef USE_I_FRAMESEKK //fix. because of changing API
- int nRet =
- player_set_play_position(pMMPlayer->pPlayer, nPosition, TRUE,
- __vp_mm_player_seek_completed_cb,
- (void *) pMMPlayer);
- if (nRet != PLAYER_ERROR_NONE) {
- _vp_mm_player_print_err(nRet);
- VideoLogError("player_set_position fail : %d", nRet);
- return FALSE;
- }
-#else
+
int nRet =
- player_set_position(pMMPlayer->pPlayer, nPosition,
- __vp_mm_player_seek_completed_cb,
- (void *) pMMPlayer);
+ player_set_play_position(pMMPlayer->pPlayer, nPosition, TRUE,
+ __vp_mm_player_seek_completed_cb,
+ (void *) pMMPlayer);
if (nRet != PLAYER_ERROR_NONE) {
_vp_mm_player_print_err(nRet);
VideoLogError("player_set_position fail : %d", nRet);
return FALSE;
}
-#endif
+
return TRUE;
}
bool vp_mm_player_set_position_by_key_frame(mm_player_handle
- pPlayerHandle, int nPosition)
+ pPlayerHandle, int nPosition)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
VideoLogError("Invalid position value");
return FALSE;
}
-#if 1 //#ifdef USE_I_FRAMESEKK //fix. because of changing API
int nRet =
- player_set_play_position(pMMPlayer->pPlayer, nPosition, TRUE,
- __vp_mm_player_seek_completed_cb,
- (void *) pMMPlayer);
+ player_set_play_position(pMMPlayer->pPlayer, nPosition, TRUE,
+ __vp_mm_player_seek_completed_cb,
+ (void *) pMMPlayer);
if (nRet != PLAYER_ERROR_NONE) {
_vp_mm_player_print_err(nRet);
VideoLogError("player_set_position fail : %d", nRet);
return FALSE;
}
-#else
- int nRet =
- player_set_position(pMMPlayer->pPlayer, nPosition,
- __vp_mm_player_seek_completed_cb,
- (void *) pMMPlayer);
- if (nRet != PLAYER_ERROR_NONE) {
- _vp_mm_player_print_err(nRet);
- VideoLogError("player_set_position fail : %d", nRet);
- return FALSE;
- }
-#endif
return TRUE;
}
bool vp_mm_player_get_buffering_position(mm_player_handle pPlayerHandle,
- int *nPosition)
+ int *nPosition)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
}
int nStart = 0;
int nCurrent = 0;
- int nRet =
- player_get_streaming_download_progress(pMMPlayer->pPlayer,
- &nStart, &nCurrent);
+ int nRet = player_get_streaming_download_progress(pMMPlayer->pPlayer,
+ &nStart, &nCurrent);
if (nRet != PLAYER_ERROR_NONE) {
_vp_mm_player_print_err(nRet);
VideoLogError("player_get_streaming_download_progress fail : %d",
- nRet);
+ nRet);
return FALSE;
}
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
return FALSE;
}
-// int nRet = player_enable_evas_display_scaling(pMMPlayer->pPlayer, bScale);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_enable_evas_display_scaling fail : %d", nRet);
-// return FALSE;
-// }
pMMPlayer->bIsScaling = bScale;
return TRUE;
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
}
-bool vp_mm_player_get_mute(mm_player_handle pPlayerHandle, bool *bMute)
+bool vp_mm_player_get_mute(mm_player_handle pPlayerHandle, bool * bMute)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
}
bool vp_mm_player_get_duration(mm_player_handle pPlayerHandle,
- int *nDuration)
+ int *nDuration)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
}
bool vp_mm_player_get_codecinfo(mm_player_handle pPlayerHandle,
- char **audio_codec, char **video_codec)
+ char **audio_codec, char **video_codec)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
return FALSE;
}
- int nRet =
- player_get_codec_info(pMMPlayer->pPlayer, audio_codec,
- video_codec);
+ int nRet = player_get_codec_info(pMMPlayer->pPlayer, audio_codec,
+ video_codec);
if (nRet != PLAYER_ERROR_NONE) {
_vp_mm_player_print_err(nRet);
VideoLogError("player_get_codec_info fail : %d", nRet);
bool vp_mm_player_set_video_sink(mm_player_handle pPlayerHandle,
- int nType, void *pSink)
+ int nType, void *pSink)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
}
bool vp_mm_player_set_video_rotate(mm_player_handle pPlayerHandle,
- int nRotate)
+ int nRotate)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
}
bool vp_mm_player_set_display_mode(mm_player_handle pPlayerHandle,
- vp_mm_player_display_mode_t
- nDisplayMode)
+ vp_mm_player_display_mode_t
+ nDisplayMode)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
return FALSE;
}
int nMode =
- _vp_mm_player_priv_convert_display_mode(nDisplayMode, FALSE);
+ _vp_mm_player_priv_convert_display_mode(nDisplayMode, FALSE);
int nRet = player_set_display_mode(pMMPlayer->pPlayer, nMode);
if (nRet != PLAYER_ERROR_NONE) {
_vp_mm_player_print_err(nRet);
}
bool vp_mm_player_get_resolution(mm_player_handle pPlayerHandle,
- int *nWidth, int *nHeight)
+ int *nWidth, int *nHeight)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->bIsRealize == FALSE) {
VideoLogError("Not realized");
}
bool vp_mm_player_set_subtitle_url(mm_player_handle pPlayerHandle,
- char *szSubtitlePath)
+ char *szSubtitlePath)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
}
int nRet =
- player_set_subtitle_path(pMMPlayer->pPlayer, szSubtitlePath);
+ player_set_subtitle_path(pMMPlayer->pPlayer, szSubtitlePath);
if (nRet != PLAYER_ERROR_NONE) {
_vp_mm_player_print_err(nRet);
VideoLogError("player_set_subtitle_path fail : %d", nRet);
}
bool vp_mm_player_get_subtitle_url(mm_player_handle pPlayerHandle,
- char **szSubtitlePath)
+ char **szSubtitlePath)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->szSubtitleURL == NULL) {
VideoLogError("pMMPlayer->szSubtitleURL is NULL");
}
bool vp_mm_player_set_subtitle_font(mm_player_handle pPlayerHandle,
- char *szFamilyName, char *szStyle,
- int nSize)
+ char *szFamilyName, char *szStyle,
+ int nSize)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (szFamilyName == NULL) {
VideoLogError("Invalid szFamilyName info");
VideoLogError("Player Handle is NULL");
return FALSE;
}
-// char *szFontConfig = NULL;
-//
-// if (szStyle) {
-// szFontConfig = g_strdup_printf("%s %s %d", szFamilyName, szStyle, nSize);
-// }
-// else {
-// szFontConfig = g_strdup_printf("%s %d", szFamilyName, nSize);
-// }
-//#if 1
-
-
- //int nRet = PLAYER_ERROR_NONE;
-
-// nRet = player_set_external_subtitle_font(pMMPlayer->pPlayer, szFontConfig);
-// if (szFontConfig) {
-// free(szFontConfig);
-// szFontConfig = NULL;
-// }
- /*
- //
- // if (nRet != PLAYER_ERROR_NONE) {
- // _vp_mm_player_print_err(nRet);
- // VideoLogError("player_set_external_subtitle_font fail : %d", nRet);
- // return FALSE;
- // }
- */
-//#endif
+
return TRUE;
}
bool vp_mm_player_set_subtitle_font_color(mm_player_handle pPlayerHandle,
- unsigned int nForegroundColor,
- unsigned int nBGColor)
+ unsigned int nForegroundColor,
+ unsigned int nBGColor)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
return FALSE;
}
-#if 1
-// int nRet = PLAYER_ERROR_NONE;
-// nRet = player_set_external_subtitle_font_color(pMMPlayer->pPlayer, nForegroundColor, nBGColor);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_set_external_subtitle_font_color fail : %d", nRet);
-// return FALSE;
-// }
-#endif
return TRUE;
}
bool vp_mm_player_subtitle_ignore_markup_tags(mm_player_handle
- pPlayerHandle,
- bool bIgnoreMarkup)
+ pPlayerHandle,
+ bool bIgnoreMarkup)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
}
bool vp_mm_player_subtitle_set_alignment_in_line(mm_player_handle
- pPlayerHandle,
- vp_mm_player_subtitle_halign_t
- type)
+ pPlayerHandle,
+ vp_mm_player_subtitle_halign_t
+ type)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
}
bool vp_mm_player_subtitle_set_alignment_horizontal(mm_player_handle
- pPlayerHandle,
- vp_mm_player_subtitle_halign_t
- type)
+ pPlayerHandle,
+ vp_mm_player_subtitle_halign_t
+ type)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
}
bool vp_mm_player_subtitle_apply_alignment_right_away(mm_player_handle
- pPlayerHandle)
+ pPlayerHandle)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
}
bool vp_mm_player_set_subtitle_position(mm_player_handle pPlayerHandle,
- int nPosition)
+ int nPosition)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
return FALSE;
}
- int nRet =
- player_set_subtitle_position_offset(pMMPlayer->pPlayer,
- nPosition);
+ int nRet = player_set_subtitle_position_offset(pMMPlayer->pPlayer,
+ nPosition);
if (nRet != PLAYER_ERROR_NONE) {
_vp_mm_player_print_err(nRet);
VideoLogError("player_set_subtitle_position fail : %d", nRet);
}
bool vp_mm_player_set_deactivate_subtitle(mm_player_handle pPlayerHandle,
- bool bDeactivate)
+ bool bDeactivate)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
pMMPlayer->bDeactivateSubtitle = bDeactivate;
bool vp_mm_player_set_volume(mm_player_handle pPlayerHandle, float fLeft,
- float fRight)
+ float fRight)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
}
bool vp_mm_player_get_volume(mm_player_handle pPlayerHandle, float *fLeft,
- float *fRight)
+ float *fRight)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
float fRightVal = 0.0;
int nRet =
- player_get_volume(pMMPlayer->pPlayer, &fLeftVal, &fRightVal);
+ player_get_volume(pMMPlayer->pPlayer, &fLeftVal, &fRightVal);
if (nRet != PLAYER_ERROR_NONE) {
_vp_mm_player_print_err(nRet);
VideoLogError("player_get_volume fail : %d", nRet);
}
bool vp_mm_player_set_sound_filter(mm_player_handle pPlayerHandle,
- vp_mm_player_sound_filter_t nFilter)
+ vp_mm_player_sound_filter_t nFilter)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
-// MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
-// audio_effect_preset_e nPreset = AUDIO_EFFECT_PRESET_NONE;
-// audio_effect_preset_e nPreset = NULL;
-// bool bIsAvailable = FALSE;
-
-// nPreset = _vp_mm_player_priv_convert_suond_filter(nFilter, FALSE);
-//
-// int nRet =player_audio_effect_preset_is_available (pMMPlayer->pPlayer, nPreset, &bIsAvailable);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_audio_effect_preset_is_available fail : %d", nRet);
-// return FALSE;
-// }
-//
-// if (bIsAvailable == false) {
-// VideoLogError("unavailable to [%d] effect.", nPreset);
-// return FALSE;
-// }
-//
-// nRet =player_audio_effect_set_preset (pMMPlayer->pPlayer, nPreset);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_audio_effect_set_preset fail : %d", nRet);
-// return FALSE;
-// }
-// pMMPlayer->nSoundFilter = nFilter;
return FALSE;
}
bool vp_mm_player_get_sound_filter(mm_player_handle pPlayerHandle,
- vp_mm_player_sound_filter_t *nFilter)
+ vp_mm_player_sound_filter_t * nFilter)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
*nFilter = pMMPlayer->nSoundFilter;
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
}
- int nRet =
- player_capture_video(pMMPlayer->pPlayer,
- __vp_mm_player_video_captured_cb,
- (void *) pMMPlayer);
+ int nRet = player_capture_video(pMMPlayer->pPlayer,
+ __vp_mm_player_video_captured_cb,
+ (void *) pMMPlayer);
if (nRet != PLAYER_ERROR_NONE) {
_vp_mm_player_print_err(nRet);
VideoLogError("player_capture_video fail : %d", nRet);
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (pMMPlayer->pPlayer == NULL) {
VideoLogError("Player Handle is NULL");
return FALSE;
}
-// int nRet = player_has_closed_caption(pMMPlayer->pPlayer, &bExist);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_has_closed_caption fail : %d", nRet);
-// return FALSE;
-// }
return FALSE;
}
bool vp_mm_player_get_audio_track_count(mm_player_handle pPlayerHandle,
- int *nCount)
+ int *nCount)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
-// MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
int nCnt = 0;
- //int nRet = player_get_track_count(pMMPlayer->pPlayer, PLAYER_TRACK_TYPE_AUDIO, &nCnt);
-// int nRet = player_get_track_count(pMMPlayer->pPlayer, NULL, &nCnt);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_get_track_count fail : %d", nRet);
-// return FALSE;
-// }
*nCount = nCnt;
bool vp_mm_player_get_audio_track_language_code(mm_player_handle
- pPlayerHandle, int nIndex,
- char **szCode)
+ pPlayerHandle, int nIndex,
+ char **szCode)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- //MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
-
-// char *szVal = NULL;
-// //int nRet = player_get_track_language_code(pMMPlayer->pPlayer, PLAYER_TRACK_TYPE_AUDIO, nIndex, &szVal);
-// int nRet = player_get_track_language_code(pMMPlayer->pPlayer,NULL, nIndex, &szVal);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_get_track_language_code fail : %d", nRet);
-// return FALSE;
-// }
-
-// VP_STRDUP(*szCode, szVal);
-// VP_FREE(szVal);
return TRUE;
}
bool vp_mm_player_set_audio_track(mm_player_handle pPlayerHandle,
- int nIndex)
+ int nIndex)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- //MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
-
- //int nRet = player_select_track(pMMPlayer->pPlayer, PLAYER_TRACK_TYPE_AUDIO, nIndex);
-// int nRet = player_select_track(pMMPlayer->pPlayer, NULL, nIndex);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_select_track fail : %d", nRet);
-// return FALSE;
-// }
return TRUE;
}
bool vp_mm_player_get_subtitle_track_count(mm_player_handle pPlayerHandle,
- int *nCount)
+ int *nCount)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
-// MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
-//
-// int nCnt = 0;
- //int nRet = player_get_track_count(pMMPlayer->pPlayer, PLAYER_TRACK_TYPE_TEXT, &nCnt);
-
-// int nRet = player_get_track_count(pMMPlayer->pPlayer, NULL, &nCnt);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_get_track_count fail : %d", nRet);
-// return FALSE;
-// }
*nCount = 0;
bool vp_mm_player_get_subtitle_track_language_code(mm_player_handle
- pPlayerHandle,
- int nIndex,
- char **szCode)
+ pPlayerHandle,
+ int nIndex,
+ char **szCode)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- //MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
-
-// char *szVal = NULL;
-// //int nRet = player_get_track_language_code(pMMPlayer->pPlayer, PLAYER_TRACK_TYPE_TEXT, nIndex, &szVal);
-//
-// int nRet = player_get_track_language_code(pMMPlayer->pPlayer, NULL, nIndex, &szVal);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_get_track_language_code fail : %d", nRet);
-// return FALSE;
-// }
-//
-// VP_STRDUP(*szCode, szVal);
-// VP_FREE(szVal);
return TRUE;
}
bool vp_mm_player_set_subtitle_track(mm_player_handle pPlayerHandle,
- int nIndex)
+ int nIndex)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
-// MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
-//
-// //int nRet = player_select_track(pMMPlayer->pPlayer, PLAYER_TRACK_TYPE_TEXT, nIndex);
-// int nRet = player_select_track(pMMPlayer->pPlayer, NULL, nIndex);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_select_track fail : %d", nRet);
-// return FALSE;
-// }
return TRUE;
}
#ifdef _SUBTITLE_MULTI_LANGUAGE
bool vp_mm_player_add_subtitle_language(mm_player_handle pPlayerHandle,
- int nIndex)
+ int nIndex)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
-// MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
-
-// int nRet = player_track_add_subtitle_language(pMMPlayer->pPlayer, nIndex);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_track_add_subtitle_language fail : %d", nRet);
-// return FALSE;
-// }
return TRUE;
}
bool vp_mm_player_remove_subtitle_language(mm_player_handle pPlayerHandle,
- int nIndex)
+ int nIndex)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
-// MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
-
-// int nRet = player_track_remove_subtitle_language(pMMPlayer->pPlayer, nIndex);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_track_remove_subtitle_language fail : %d", nRet);
-// return FALSE;
-// }
-//
return TRUE;
}
bool
vp_mm_player_track_foreach_selected_subtitle_language(mm_player_handle
- pPlayerHandle,
- void *pCallback,
- void *pUserData)
+ pPlayerHandle,
+ void *pCallback,
+ void *pUserData)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
-// MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
-
-// int nRet = player_track_foreach_selected_subtitle_language(pMMPlayer->pPlayer, (player_track_selected_subtitle_language_cb)pCallback, pUserData);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_track_foreach_selected_subtitle_language fail : %d", nRet);
- return FALSE;
-// }
return TRUE;
}
#endif
bool vp_mm_player_set_cookie(mm_player_handle pPlayerHandle,
- const char *szCookie)
+ const char *szCookie)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
- int nRet =
- player_set_streaming_cookie(pMMPlayer->pPlayer, szCookie,
- strlen(szCookie));
+ int nRet = player_set_streaming_cookie(pMMPlayer->pPlayer, szCookie,
+ strlen(szCookie));
if (nRet != PLAYER_ERROR_NONE) {
_vp_mm_player_print_err(nRet);
VideoLogError("player_select_track fail : %d", nRet);
bool vp_mm_player_set_proxy(mm_player_handle pPlayerHandle,
- const char *szProxy)
+ const char *szProxy)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
VideoLogError("szCookie is NULL");
return FALSE;
}
- /*
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
- */
+
return TRUE;
}
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
if (fRate < 0.5 || fRate > 1.5) {
VideoLogError("Invalid Param : %f", fRate);
}
bool vp_mm_player_set_zoom(mm_player_handle pPlayerHandle, float fZoom,
- int nPosX, int nPosY)
+ int nPosX, int nPosY)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
-// MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
-
-// int nRet = player_set_x11_display_zoom (pMMPlayer->pPlayer, fZoom, nPosX, nPosY);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_set_x11_display_zoom fail : %d", nRet);
return FALSE;
-// }
-// return TRUE;
}
bool vp_mm_player_get_zoom_start_position(mm_player_handle pPlayerHandle,
- int *nPosX, int *nPosY)
+ int *nPosX, int *nPosY)
{
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
*nPosX = pMMPlayer->nZoomPosX;
*nPosY = pMMPlayer->nZoomPosY;
bool vp_mm_player_set_visible(mm_player_handle pPlayerHandle,
- bool bVisible)
+ bool bVisible)
{
if (pPlayerHandle == NULL) {
return FALSE;
}
- MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
+ MMPlayer *pMMPlayer = (MMPlayer *) pPlayerHandle;
int nRet = player_set_display_visible(pMMPlayer->pPlayer, bVisible);
if (nRet != PLAYER_ERROR_NONE) {
bool vp_mm_player_set_hub_download_mode(mm_player_handle pPlayerHandle,
- bool bDownload)
+ bool bDownload)
{
-
if (pPlayerHandle == NULL) {
VideoLogError("pPlayerHandle is NULL");
return FALSE;
}
- //MMPlayer *pMMPlayer = (MMPlayer *)pPlayerHandle;
-
-// int nRet = player_set_video_hub_donwload_mode (pMMPlayer->pPlayer, bDownload);
-// if (nRet != PLAYER_ERROR_NONE) {
-// _vp_mm_player_print_err(nRet);
-// VideoLogError("player_set_video_hub_donwload_mode fail : %d", nRet);
return FALSE;
-// }
-//
-// return TRUE;
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-play-type-define.h"
/* internal functions */
static bool _vp_multi_path_write_multi_path_set_position(char *szURL,
- int nPosition)
+ int nPosition)
{
char *app_path = app_get_data_path();
if (!app_path) {
VideoLogError("cannot retrieve app install path");
return FALSE;
}
- char db_path[1024] = {0,};
+ char db_path[1024] = { 0, };
snprintf(db_path, 1024, "%s%s", app_path, "saveposition.ini");
VideoLogError("db_path: %s", db_path);
FILE *fp = fopen(db_path, "w");
/* external functions */
-bool vp_multi_path_add_item(GList **pList,
- const char *szURL,
- char *szTitle,
- char *szSubTitle,
- int nPosition, int nDuration, bool bIsSameAP)
+bool vp_multi_path_add_item(GList ** pList,
+ const char *szURL,
+ char *szTitle,
+ char *szSubTitle,
+ int nPosition, int nDuration, bool bIsSameAP)
{
if (!szURL) {
VideoLogError("szURL is NULL");
return TRUE;
}
-bool vp_multi_path_clear_item(GList *pList)
+bool vp_multi_path_clear_item(GList * pList)
{
if (!pList) {
VideoLogError("pList is NULL");
}
bool vp_multi_path_set_item_subtitle(const char *szMediaURL,
- char *szSubtitleURL, GList *pList)
+ char *szSubtitleURL, GList * pList)
{
if (!pList) {
VideoLogError("pList is NULL");
}
bool vp_multi_path_set_item_position(const char *szMediaURL,
- int nPosition, GList *pList)
+ int nPosition, GList * pList)
{
if (!pList) {
VideoLogError("pList is NULL");
if (!strcmp(szMediaURL, pPath->szURL)) {
pPath->nStartPosition = nPosition;
_vp_multi_path_write_multi_path_set_position((char *)
- szMediaURL,
- nPosition);
+ szMediaURL,
+ nPosition);
}
}
}
bool vp_multi_path_get_current_item(const char *szMediaURL, char **szURL,
- char **szTitle, char **szSubtitle,
- int *nPosition, int *nDuration,
- bool *bIsSameAP, GList *pList)
+ char **szTitle, char **szSubtitle,
+ int *nPosition, int *nDuration,
+ bool * bIsSameAP, GList * pList)
{
if (!szMediaURL) {
VideoLogError("No exist szMediaID.");
bool vp_multi_path_get_next_item(const char *szMediaURL, char **szURL,
- char **szSubtitle, int *nPosition,
- int *nDuration, bool bLoop,
- GList *pList)
+ char **szSubtitle, int *nPosition,
+ int *nDuration, bool bLoop, GList * pList)
{
if (!szMediaURL) {
VideoLogError("No exist szMediaID.");
}
bool vp_multi_path_get_prev_item(const char *szMediaURL, char **szURL,
- char **szSubtitle, int *nPosition,
- int *nDuration, bool bLoop,
- GList *pList)
+ char **szSubtitle, int *nPosition,
+ int *nDuration, bool bLoop, GList * pList)
{
if (!szMediaURL) {
VideoLogError("No exist szMediaID.");
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 OLD_SENSOR_API
} SensorHandle;
-static void _vp_sensor_destroy_handle(SensorHandle *pSensorHandle);
+static void _vp_sensor_destroy_handle(SensorHandle * pSensorHandle);
/* callback functions */
static void __vp_sensor_motion_doubletap_event_cb(unsigned long long
- timestamp,
- void *pUserData)
+ timestamp,
+ void *pUserData)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
SensorHandle *pSensor = (SensorHandle *) pUserData;
if (pSensor->pEventCb) {
pSensor->pEventCb(VP_SENSOR_TYPE_DOUBLETAP, timestamp,
- pSensor->pUserData);
+ pSensor->pUserData);
}
}
static void __vp_sensor_motion_facedown_event_cb(unsigned long long
- timestamp,
- void *pUserData)
+ timestamp,
+ void *pUserData)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pSensor->pEventCb) {
pSensor->pEventCb(VP_SENSOR_TYPE_FACEDOWN, timestamp,
- pSensor->pUserData);
+ pSensor->pUserData);
}
}
/* internal functions */
-static void _vp_sensor_destroy_handle(SensorHandle *pSensorHandle)
+static void _vp_sensor_destroy_handle(SensorHandle * pSensorHandle)
{
if (pSensorHandle == NULL) {
VideoLogError("pSensorHandle is NULL");
if (bEnableSensor) {
nRet =
- sensor_motion_doubletap_set_cb(pSensor->pSensorH,
- __vp_sensor_motion_doubletap_event_cb,
- (void *) pSensor);
+ sensor_motion_doubletap_set_cb(pSensor->pSensorH,
+ __vp_sensor_motion_doubletap_event_cb,
+ (void *) pSensor);
if (nRet != SENSOR_ERROR_NONE) {
VideoLogInfo("sensor_motion_doubletap_set_cb is fail : 0x%x",
- nRet);
+ nRet);
bReturn = FALSE;
}
}
if (bEnableSensor) {
nRet =
- sensor_motion_facedown_set_cb(pSensor->pSensorH,
- __vp_sensor_motion_facedown_event_cb,
- (void *) pSensor);
+ sensor_motion_facedown_set_cb(pSensor->pSensorH,
+ __vp_sensor_motion_facedown_event_cb,
+ (void *) pSensor);
if (nRet != SENSOR_ERROR_NONE) {
VideoLogInfo("sensor_motion_facedown_set_cb is fail : 0x%x",
- nRet);
+ nRet);
bReturn = FALSE;
}
nRet = sensor_motion_doubletap_unset_cb(pSensor->pSensorH);
if (nRet != SENSOR_ERROR_NONE) {
VideoLogInfo
- ("sensor_motion_doubletap_unset_cb is fail : 0x%x", nRet);
+ ("sensor_motion_doubletap_unset_cb is fail : 0x%x", nRet);
bReturn = FALSE;
}
nRet = sensor_motion_facedown_unset_cb(pSensor->pSensorH);
if (nRet != SENSOR_ERROR_NONE) {
VideoLogInfo("sensor_motion_facedown_unset_cb is fail : 0x%x",
- nRet);
+ nRet);
bReturn = FALSE;
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <sound_manager.h>
#include "vp-play-macro-define.h"
/* external functions */
-void vp_player_focus_callback(sound_stream_info_h stream_info, sound_stream_focus_change_reason_e reason_for_change,
- const char *additional_info, void *user_data)
+void vp_player_focus_callback(sound_stream_info_h stream_info,
+ sound_stream_focus_mask_e focus_mask,
+ sound_stream_focus_state_e focus_state,
+ sound_stream_focus_change_reason_e
+ reason_for_change, int sound_behaviors,
+ const char *extra_info, void *user_data)
{
- PlayView *pPlayView = (PlayView *)user_data;
+ PlayView *pPlayView = (PlayView *) user_data;
sound_stream_focus_state_e state_for_playback;
sound_stream_focus_state_e state_for_recording;
int ret = -1;
- ret = sound_manager_get_focus_state(pPlayView->stream_info, &state_for_playback,
- &state_for_recording);
- if(ret != SOUND_MANAGER_ERROR_NONE){
+
+ if (!pPlayView) {
+ return;
+ }
+
+ ret =
+ sound_manager_get_focus_state(pPlayView->stream_info,
+ &state_for_playback,
+ &state_for_recording);
+ if (ret != SOUND_MANAGER_ERROR_NONE) {
VideoLogError("sound_manager_get_focus_state fail");
return;
}
- VideoLogDebug("Reason for change : %d and state of playback is : %d", reason_for_change, state_for_playback);
+ VideoLogDebug("Reason for change : %d and state of playback is : %d",
+ reason_for_change, state_for_playback);
if (state_for_playback == SOUND_STREAM_FOCUS_STATE_RELEASED) {
- if (reason_for_change != SOUND_STREAM_FOCUS_CHANGED_BY_ALARM &&
- reason_for_change != SOUND_STREAM_FOCUS_CHANGED_BY_NOTIFICATION) {
- sound_manager_get_focus_reacquisition(pPlayView->stream_info, &pPlayView->reacquire_state);
+ vp_play_normal_view_pause_player(pPlayView);
+ sound_manager_get_focus_reacquisition(pPlayView->stream_info,
+ &pPlayView->reacquire_state);
+ if (reason_for_change == SOUND_STREAM_FOCUS_CHANGED_BY_VOIP
+ || reason_for_change == SOUND_STREAM_FOCUS_CHANGED_BY_CALL
+ || reason_for_change == SOUND_STREAM_FOCUS_CHANGED_BY_RINGTONE
+ || reason_for_change ==
+ SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_RECOGNITION) {
+ sound_manager_set_focus_reacquisition(pPlayView->stream_info,
+ EINA_TRUE);
+ } else if (reason_for_change != SOUND_STREAM_FOCUS_CHANGED_BY_ALARM
+ && reason_for_change !=
+ SOUND_STREAM_FOCUS_CHANGED_BY_NOTIFICATION) {
if (pPlayView->reacquire_state == EINA_TRUE) {
- sound_manager_set_focus_reacquisition(pPlayView->stream_info, EINA_FALSE);
- }
- if ((reason_for_change == SOUND_STREAM_FOCUS_CHANGED_BY_MEDIA) && (!strcmp(additional_info, "music_playing"))) {
- vp_play_normal_view_pause_player(pPlayView);
- } else if (reason_for_change == SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_RECOGNITION) {
- vp_play_normal_view_pause_player(pPlayView);
- sound_manager_set_focus_reacquisition(pPlayView->stream_info, EINA_TRUE);
+ sound_manager_set_focus_reacquisition(pPlayView->
+ stream_info,
+ EINA_FALSE);
}
}
- } else if (reason_for_change == SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_RECOGNITION) {
+ } else {
vp_play_normal_view_play_player(pPlayView);
}
}
{
VideoLogInfo(">> Sound Session : Init");
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
int nRet = SOUND_MANAGER_ERROR_NONE;
- nRet = sound_manager_create_stream_information(SOUND_STREAM_TYPE_MEDIA, vp_player_focus_callback, pPlayView, &pPlayView->stream_info);
-
- if (nRet != SOUND_MANAGER_ERROR_NONE) {
- VideoLogError("failed to create_stream_information %x", nRet);
- return FALSE;
- }
+ nRet =
+ sound_manager_create_stream_information(SOUND_STREAM_TYPE_MEDIA,
+ vp_player_focus_callback,
+ pPlayView,
+ &pPlayView->stream_info);
- nRet = sound_manager_set_current_sound_type(SOUND_TYPE_MEDIA);
if (nRet != SOUND_MANAGER_ERROR_NONE) {
- VideoLogError("sound_manager_set_current_sound_type fail");
+ VideoLogError("failed to create_stream_information [%x]", nRet);
return FALSE;
}
-// nRet = sound_manager_set_safety_volume(SOUND_SAFETY_VOL_TYPE_APP_VIDEO);
+
+ nRet = sound_manager_set_current_sound_type(SOUND_TYPE_MEDIA);
if (nRet != SOUND_MANAGER_ERROR_NONE) {
- VideoLogError("sound_manager_set_safety_volume fail");
+ VideoLogError("sound_manager_set_current_sound_type fail");
return FALSE;
}
bool vp_sound_deinit_session(play_view_handle pViewHandle)
{
int nRet = SOUND_MANAGER_ERROR_NONE;
- if(!pViewHandle)
- {
- VideoLogError("pViewHandle is NULL");
- return true;
- }
- PlayView *pPlayView = (PlayView *)pViewHandle;
-
-// nRet = sound_manager_unset_safety_volume();
-// if (nRet != SOUND_MANAGER_ERROR_NONE) {
-// VideoLogError("sound_manager_unset_safety_volume fail");
-// return FALSE;
-// }
+ if (!pViewHandle) {
+ VideoLogError("pViewHandle is NULL");
+ return true;
+ }
+ PlayView *pPlayView = (PlayView *) pViewHandle;
+
if (pPlayView->stream_info) {
- nRet = sound_manager_destroy_stream_information(pPlayView->stream_info);
+ nRet =
+ sound_manager_destroy_stream_information(pPlayView->
+ stream_info);
if (nRet != SOUND_MANAGER_ERROR_NONE) {
VideoLogError("sound_manager_unset_current_sound_type fail");
return FALSE;
}
}
-// sound_manager_unset_available_route_changed_cb();
+
sound_manager_unset_volume_changed_cb();
- /*
- nRet = sound_manager_set_session_type(SOUND_SESSION_TYPE_SHARE);
- if (nRet != SOUND_MANAGER_ERROR_NONE) {
- VideoLogError("sound_manager_set_session_type fail");
- return FALSE;
- }
- */
+
return TRUE;
}
return TRUE;
}
-bool vp_sound_get_active_device(video_sound_device_type_t *nDeviceType)
+bool vp_sound_get_active_device(video_sound_device_type_t * nDeviceType)
{
sound_device_h device;
sound_device_type_e type = SOUND_DEVICE_BUILTIN_SPEAKER;
sound_device_list_h g_device_list = NULL;
- sound_device_mask_e g_device_mask =
- SOUND_DEVICE_IO_DIRECTION_OUT_MASK;
-// WARN_TRACE("Enter sound_manager_get_active_device");
+ sound_device_mask_e g_device_mask = SOUND_DEVICE_IO_DIRECTION_OUT_MASK;
int ret;
if ((ret =
- sound_manager_get_current_device_list(g_device_mask,
- &g_device_list)))
-// ERROR_TRACE("sound_manager_get_active_device()... [0x%x]", ret);
+ sound_manager_get_device_list(g_device_mask, &g_device_list)))
- if (!
- (ret =
- sound_manager_get_next_device(g_device_list, &device))) {
-// ERROR_TRACE("success to get next device\n");
+ if (!(ret = sound_manager_get_next_device(g_device_list, &device))) {
if ((ret = sound_manager_get_device_type(device, &type))) {
return FALSE;
}
}
-bool vp_sound_is_sound_path_enable(bool *bIsSoundPath)
+bool vp_sound_is_sound_path_enable(bool * bIsSoundPath)
{
bool bConnected = FALSE;
- int nPathCount = 1; //speaker or headphone
+ int nPathCount = 1; //speaker or headphone
sound_device_h device;
sound_device_type_e type;
sound_device_list_h g_device_list = NULL;
- sound_device_mask_e g_device_mask =
- SOUND_DEVICE_IO_DIRECTION_OUT_MASK;
+ sound_device_mask_e g_device_mask = SOUND_DEVICE_IO_DIRECTION_OUT_MASK;
int ret;
if ((ret =
- sound_manager_get_current_device_list(g_device_mask,
- &g_device_list))) {
+ sound_manager_get_device_list(g_device_mask, &g_device_list))) {
return bConnected;
}
goto COUNT_CHECK;
}
}
-// sound_manager_is_route_available(NULL, NULL, &bRouteAvailable);
-// if (bRouteAvailable)
-// {
-// nPathCount ++;
-// goto COUNT_CHECK;
-// }
-// sound_manager_is_route_available(NULL, NULL, &bRouteAvailable);
-// if (bRouteAvailable)
-// {
-// nPathCount ++;
-// goto COUNT_CHECK;
-// }
-//
-// sound_manager_is_route_available(NULL, NULL, &bRouteAvailable);
-// if (bRouteAvailable)
-// {
-// nPathCount ++;
-// goto COUNT_CHECK;
-// }
-// sound_manager_is_route_available(NULL, NULL, &bRouteAvailable);
-// if (bRouteAvailable)
-// {
-// nPathCount ++;
-// goto COUNT_CHECK;
-// }
-// sound_manager_is_route_available(NULL, NULL, &bRouteAvailable);
-// if (bRouteAvailable)
-// {
-// nPathCount ++;
-// goto COUNT_CHECK;
-// }
-
-COUNT_CHECK:
+
+ COUNT_CHECK:
if (nPathCount > 1) {
bConnected = TRUE;
}
}
sound_device_connected_cb vp_audio_jack_connected_cb(sound_device_h
- device,
- bool is_connected,
- void *user_data)
+ device,
+ bool is_connected,
+ void *user_data)
{
if (!user_data) {
return NULL;
void *pPlayview = NULL;
pPlayview = user_data;
if (sound_manager_get_device_type(device, &type) ==
- SOUND_MANAGER_ERROR_NONE) {
+ SOUND_MANAGER_ERROR_NONE) {
if (type == SOUND_DEVICE_AUDIO_JACK) {
vp_play_normal_view_show_volume_popup(pPlayview);
if (!is_connected) {
}
bool vp_sound_device_is_enable(video_sound_device_type_t nDeviceType,
- void *pUserdata)
+ void *pUserdata)
{
if (!pUserdata) {
return FALSE;
sound_device_h device;
sound_device_type_e type;
sound_device_list_h g_device_list = NULL;
- sound_device_mask_e g_device_mask =
- SOUND_DEVICE_IO_DIRECTION_OUT_MASK;
+ sound_device_mask_e g_device_mask = SOUND_DEVICE_IO_DIRECTION_OUT_MASK;
- if (sound_manager_get_current_device_list
- (g_device_mask, &g_device_list) != SOUND_MANAGER_ERROR_NONE) {
+ if (sound_manager_get_device_list
+ (g_device_mask, &g_device_list) != SOUND_MANAGER_ERROR_NONE) {
return FALSE;
}
sound_manager_set_device_connected_cb
- (SOUND_DEVICE_ALL_MASK,
- (sound_device_connected_cb) vp_audio_jack_connected_cb,
- (void *) pPlayview);
+ (SOUND_DEVICE_ALL_MASK,
+ (sound_device_connected_cb) vp_audio_jack_connected_cb,
+ (void *) pPlayview);
while (sound_manager_get_next_device(g_device_list, &device) ==
- SOUND_MANAGER_ERROR_NONE) {
+ SOUND_MANAGER_ERROR_NONE) {
if (sound_manager_get_device_type(device, &type) ==
- SOUND_MANAGER_ERROR_NONE) {
+ SOUND_MANAGER_ERROR_NONE) {
if (type == SOUND_DEVICE_AUDIO_JACK) {
return TRUE;
}
}
}
-// switch (nDeviceType)
-// {
-// case VP_SOUND_DEVICE_SPEAKER:
-// sound_manager_is_route_available(NULL, NULL, &bRouteAvailable); return bRouteAvailable;
-//
-// case VP_SOUND_DEVICE_EARJACK:
-// sound_manager_is_route_available(NULL, NULL, &bRouteAvailable); return bRouteAvailable;
-//
-// case VP_SOUND_DEVICE_BLUETOOTH:
-// sound_manager_is_route_available(NULL, NULL, &bRouteAvailable); return bRouteAvailable;
-//
-// case VP_SOUND_DEVICE_HDMI:
-// sound_manager_is_route_available(NULL, NULL, &bRouteAvailable); return bRouteAvailable;
-//
-// case VP_SOUND_DEVICE_MIRRORING:
-// sound_manager_is_route_available(NULL, NULL, &bRouteAvailable); return bRouteAvailable;
-//
-// case VP_SOUND_DEVICE_USB_AUDIO:
-// sound_manager_is_route_available(NULL, NULL, &bRouteAvailable); return bRouteAvailable;
-//
-// default:
-// sound_manager_is_route_available(NULL, NULL, &bRouteAvailable); return bRouteAvailable;
-// }
return FALSE;
bool vp_sound_get_a2dp_name(char **szBTName)
{
-// int nRet = SOUND_MANAGER_ERROR_NONE;
+
bool bIsConnect = FALSE;
-// nRet = sound_manager_get_a2dp_status (&bIsConnect, szBTName);
-// if (nRet != SOUND_MANAGER_ERROR_NONE) {
-// VideoLogError("sound_manager_get_a2dp_status fail");
-// VP_FREE(*szBTName);
-// return FALSE;
-// }
if (bIsConnect == FALSE) {
VideoLogError("Not connected BT");
}
return FALSE;
-// return TRUE;
}
bool vp_sound_set_active_route(video_sound_device_type_t nDeviceType)
{
- //int nRet = SOUND_MANAGER_ERROR_NONE;
if (nDeviceType == VP_SOUND_DEVICE_NONE) {
VideoLogError("Invalid device type");
return FALSE;
}
-// else if (nDeviceType == VP_SOUND_DEVICE_SPEAKER) {
-// nRet = sound_manager_set_active_route(NULL, NULL);
-// if (nRet != SOUND_MANAGER_ERROR_NONE) {
-// VideoLogError("sound_manager_set_active_route NULL fail");
-// return FALSE;
-// }
-// }
-// else if (nDeviceType == VP_SOUND_DEVICE_EARJACK) {
-// nRet = sound_manager_set_active_route(NULL, NULL);
-// if (nRet != SOUND_MANAGER_ERROR_NONE) {
-// VideoLogError("sound_manager_set_active_route SOUND_ROUTE_OUT_WIRED_ACCESSORY fail");
-// return FALSE;
-// }
-// }
-// else if (nDeviceType == VP_SOUND_DEVICE_BLUETOOTH) {
-// nRet = sound_manager_set_active_route(NULL, NULL);
-// if (nRet != SOUND_MANAGER_ERROR_NONE) {
-// VideoLogError("sound_manager_set_active_route NULL fail");
-// return FALSE;
-// }
-// }
-//
-// else if (nDeviceType == VP_SOUND_DEVICE_HDMI) {
-// nRet = sound_manager_set_active_route(NULL, NULL);
-// if (nRet != SOUND_MANAGER_ERROR_NONE) {
-// VideoLogError("sound_manager_set_active_route NULL fail");
-// return FALSE;
-// }
-// }
-// else if (nDeviceType == VP_SOUND_DEVICE_MIRRORING) {
-// nRet = sound_manager_set_active_route(NULL, NULL);
-// if (nRet != SOUND_MANAGER_ERROR_NONE) {
-// VideoLogError("sound_manager_set_active_route SOUND_ROUTE_OUT_MIRRORING fail");
-// return FALSE;
-// }
-// }
-// else if (nDeviceType == VP_SOUND_DEVICE_USB_AUDIO) {
-// nRet = sound_manager_set_active_route(NULL, NULL);
-// if (nRet != SOUND_MANAGER_ERROR_NONE) {
-// VideoLogError("sound_manager_set_active_route SOUND_ROUTE_OUT_USB_AUDIO fail");
-// return FALSE;
-// }
-// }
return TRUE;
}
bool vp_sound_set_route_change_cb(vp_sound_route_change_cb func,
- void *pUserData)
+ void *pUserData)
{
int nRet = SOUND_MANAGER_ERROR_NONE;
- //nRet = sound_manager_set_available_route_changed_cb((sound_available_route_changed_cb), pUserData);
-
- sound_device_mask_e g_device_mask =
- SOUND_DEVICE_IO_DIRECTION_OUT_MASK;
+ sound_device_mask_e g_device_mask = SOUND_DEVICE_IO_DIRECTION_OUT_MASK;
nRet =
- sound_manager_set_device_information_changed_cb(g_device_mask,
- NULL, pUserData);
+ sound_manager_set_device_information_changed_cb(g_device_mask,
+ NULL, pUserData);
if (nRet != SOUND_MANAGER_ERROR_NONE) {
- VideoLogError
- ("sound_manager_set_available_route_changed_cb fail");
+ VideoLogError("sound_manager_set_available_route_changed_cb fail");
return FALSE;
}
return TRUE;
}
bool vp_sound_set_volume_change_cb(vp_sound_volume_change_cb func,
- void *pUserData)
+ void *pUserData)
{
int nRet = SOUND_MANAGER_ERROR_NONE;
nRet =
- sound_manager_set_volume_changed_cb((sound_manager_volume_changed_cb) func, pUserData);
+ sound_manager_set_volume_changed_cb((sound_manager_volume_changed_cb) func, pUserData);
if (nRet != SOUND_MANAGER_ERROR_NONE) {
VideoLogError("sound_manager_set_volume_changed_cb fail");
return FALSE;
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
typedef void *audio_track_handle;
-audio_track_handle vp_audio_track_create(Evas_Object *pParent, PopupCloseCbFunc pCloseCb, int nDefaultIndex);
+audio_track_handle vp_audio_track_create(Evas_Object * pParent,
+ PopupCloseCbFunc pCloseCb,
+ int nDefaultIndex);
void vp_audio_track_destroy(audio_track_handle pAudioTrackHandle);
bool vp_audio_track_realize(audio_track_handle pAudioTrackHandle);
bool vp_audio_track_unrealize(audio_track_handle pAudioTrackHandle);
-bool vp_audio_track_add_Item(audio_track_handle pAudioTrackHandle, char *szCode, int nIndex);
-bool vp_audio_track_set_user_data(audio_track_handle pAudioTrackHandle, void *pUserData);
+bool vp_audio_track_add_Item(audio_track_handle pAudioTrackHandle,
+ char *szCode, int nIndex);
+bool vp_audio_track_set_user_data(audio_track_handle pAudioTrackHandle,
+ void *pUserData);
bool vp_audio_track_get_name(char *szCode, char **szName);
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
typedef void *capture_popup_handle;
-capture_popup_handle vp_capture_popup_create(Evas_Object *pParent, bool bCaptureOn, PopupCloseCbFunc pCloseCb);
+capture_popup_handle vp_capture_popup_create(Evas_Object * pParent,
+ bool bCaptureOn,
+ PopupCloseCbFunc pCloseCb);
void vp_capture_popup_destroy(capture_popup_handle pCapturePopupHandle);
bool vp_capture_popup_realize(capture_popup_handle pCapturePopupHandle);
bool vp_capture_popup_unrealize(capture_popup_handle pCapturePopupHandle);
-bool vp_capture_popup_set_user_data(capture_popup_handle pCapturePopupHandle, void *pUserData);
-
+bool vp_capture_popup_set_user_data(capture_popup_handle
+ pCapturePopupHandle, void *pUserData);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
typedef void *detail_handle;
-typedef struct _vp_detail_info{
+typedef struct _vp_detail_info {
char *szTitle;
char *szFormat;
char *szDate;
bool bDrm;
bool bForwardLock;
bool bPlayready;
-}vp_detail_info;
+} vp_detail_info;
-detail_handle vp_detail_page_create(void *pNaviFrame, PopupCloseCbFunc pCloseCb,
- vp_detail_info *pDetailInfo);
-//detail_handle vp_detail_create(Evas_Object *pParent, PopupCloseCbFunc pCloseCb, vp_detail_info *pDetailInfo);
+detail_handle vp_detail_page_create(void *pNaviFrame,
+ PopupCloseCbFunc pCloseCb,
+ vp_detail_info * pDetailInfo);
void vp_detail_destroy(detail_handle pDetailHandle);
-/*
-bool vp_detail_realize(detail_handle pDetailHandle);
-bool vp_detail_unrealize(detail_handle pDetailHandle);
-*/
bool vp_detail_set_user_data(detail_handle pDetailHandle, void *pUserData);
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
typedef void *play_speed_popup;
-typedef void (*PlaySpeedUpdateCbFunc)(double fValue, void* pUserData);
-typedef void (*PlaySpeedDoneCbFunc)(double fValue, bool bSetValue, void* pUserData);
+typedef void (*PlaySpeedUpdateCbFunc) (double fValue, void *pUserData);
+typedef void (*PlaySpeedDoneCbFunc) (double fValue, bool bSetValue,
+ void *pUserData);
-play_speed_popup vp_play_speed_popup_create(Evas_Object *pParent, double fSpeedVal, PlaySpeedUpdateCbFunc pUpdateCb, PlaySpeedDoneCbFunc pDoneCb);
+play_speed_popup vp_play_speed_popup_create(Evas_Object * pParent,
+ double fSpeedVal,
+ PlaySpeedUpdateCbFunc
+ pUpdateCb,
+ PlaySpeedDoneCbFunc pDoneCb);
void vp_play_speed_popup_destroy(play_speed_popup pPlaySpeedHandle);
bool vp_play_speed_popup_realize(play_speed_popup pPlaySpeedHandle);
bool vp_play_speed_popup_unrealize(play_speed_popup pPlaySpeedHandle);
-bool vp_play_speed_popup_set_user_data(play_speed_popup pPlaySpeedHandle, void *pUserData);
+bool vp_play_speed_popup_set_user_data(play_speed_popup pPlaySpeedHandle,
+ void *pUserData);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
typedef void *repeat_handle;
-repeat_handle vp_repeat_create(Evas_Object *pParent, char *pMediaUrl, PopupCloseCbFunc pCloseCb);
+repeat_handle vp_repeat_create(Evas_Object * pParent, char *pMediaUrl,
+ PopupCloseCbFunc pCloseCb);
void vp_repeat_destroy(repeat_handle pRepeatHandle);
bool vp_repeat_realize(repeat_handle pRepeatHandle);
bool vp_repeat_unrealize(repeat_handle pRepeatHandle);
bool vp_repeat_set_user_data(repeat_handle pRepeatHandle, void *pUserData);
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
VP_SETTING_MODE_AUDIO_TRACK,
VP_SETTING_MODE_REPEAT_MODE,
VP_SETTING_MODE_CAPTURE,
-}vp_setting_mode_t;
+} vp_setting_mode_t;
-typedef struct _SettingInfo{
- float fSpeed;
- int nSoundAlive;
- bool bSelectSubtitle;
- char *szAudioTrack;
- int nRepeatMode;
- bool bCapture;
- bool bTagBuddy;
- bool bEditWeatherTag;
- bool bStreaming;
- bool bRepeat;
- bool bDrm;
- bool bExternalMode;
- bool bShowEditWeather;
-}SettingInfo;
+typedef struct _SettingInfo {
+ float fSpeed;
+ int nSoundAlive;
+ bool bSelectSubtitle;
+ char *szAudioTrack;
+ int nRepeatMode;
+ bool bCapture;
+ bool bTagBuddy;
+ bool bEditWeatherTag;
+ bool bStreaming;
+ bool bRepeat;
+ bool bDrm;
+ bool bExternalMode;
+ bool bShowEditWeather;
+} SettingInfo;
-setting_popup_handle vp_setting_create(Evas_Object *pParent, SettingInfo *pSettingInfo, PopupCloseCbFunc pCloseCb);
+setting_popup_handle vp_setting_create(Evas_Object * pParent,
+ SettingInfo * pSettingInfo,
+ PopupCloseCbFunc pCloseCb);
void vp_setting_destroy(setting_popup_handle pSettingHandle);
bool vp_setting_realize(setting_popup_handle pSettingHandle);
bool vp_setting_unrealize(setting_popup_handle pSettingHandle);
-bool vp_setting_set_user_data(setting_popup_handle pSettingHandle, void *pUserData);
-
+bool vp_setting_set_user_data(setting_popup_handle pSettingHandle,
+ void *pUserData);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
VP_SHARE_NFC,
VP_SHARE_FILE_TRANSFER,
VP_SHARE_DROP_BOX,
-}video_share_type_t;
+} video_share_type_t;
-share_handle vp_share_create(Evas_Object *pParent, char *pMediaUrl, PopupCloseCbFunc pCloseCb);
+share_handle vp_share_create(Evas_Object * pParent, char *pMediaUrl,
+ PopupCloseCbFunc pCloseCb);
void vp_share_destroy(share_handle pShareHandle);
bool vp_share_realize(share_handle pShareHandle);
bool vp_share_unrealize(share_handle pShareHandle);
bool vp_share_set_user_data(share_handle pShareHandle, void *pUserData);
-
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
typedef void *sound_alive_handle;
-sound_alive_handle vp_sound_alive_create(Evas_Object *pParent, char *pMediaUrl, PopupCloseCbFunc pCloseCb, video_sound_alive_t nType);
+sound_alive_handle vp_sound_alive_create(Evas_Object * pParent,
+ char *pMediaUrl,
+ PopupCloseCbFunc pCloseCb,
+ video_sound_alive_t nType);
void vp_sound_alive_destroy(sound_alive_handle pSAHandle);
bool vp_sound_alive_realize(sound_alive_handle pSAHandle);
bool vp_sound_alive_unrealize(sound_alive_handle pSAHandle);
-bool vp_sound_alive_set_user_data(sound_alive_handle pSAHandle, void *pUserData);
-
+bool vp_sound_alive_set_user_data(sound_alive_handle pSAHandle,
+ void *pUserData);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
typedef void *sound_path_handle;
-sound_path_handle vp_sound_path_create(Evas_Object *pParent, PopupCloseCbFunc pCloseCb);
+sound_path_handle vp_sound_path_create(Evas_Object * pParent,
+ PopupCloseCbFunc pCloseCb);
void vp_sound_path_destroy(sound_path_handle pSoundPathHandle);
bool vp_sound_path_realize(sound_path_handle pSoundPathHandle);
bool vp_sound_path_unrealize(sound_path_handle pSoundPathHandle);
-bool vp_sound_path_set_user_data(sound_path_handle pSoundPathHandle, void *pUserData);
-
+bool vp_sound_path_set_user_data(sound_path_handle pSoundPathHandle,
+ void *pUserData);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
typedef void *subtitle_alignment_handle;
-typedef void (*SubtitleAlignmentUpdateCbFunc)(double fValue, void* pUserData);
-
-subtitle_alignment_handle vp_subtitle_alignment_create(Evas_Object *pParent, PopupCloseCbFunc pCloseCb, int nDefaultAlign);
-void vp_subtitle_alignment_destroy(subtitle_alignment_handle pSubtitleAlignmentHandle);
-bool vp_subtitle_alignment_realize(subtitle_alignment_handle pSubtitleAlignmentHandle);
-bool vp_subtitle_alignment_unrealize(subtitle_alignment_handle pSubtitleAlignmentHandle);
-bool vp_subtitle_alignment_set_user_data(subtitle_alignment_handle pSubtitleAlignmentHandle, void *pUserData);
+typedef void (*SubtitleAlignmentUpdateCbFunc) (double fValue,
+ void *pUserData);
+subtitle_alignment_handle vp_subtitle_alignment_create(Evas_Object *
+ pParent,
+ PopupCloseCbFunc
+ pCloseCb,
+ int nDefaultAlign);
+void vp_subtitle_alignment_destroy(subtitle_alignment_handle
+ pSubtitleAlignmentHandle);
+bool vp_subtitle_alignment_realize(subtitle_alignment_handle
+ pSubtitleAlignmentHandle);
+bool vp_subtitle_alignment_unrealize(subtitle_alignment_handle
+ pSubtitleAlignmentHandle);
+bool vp_subtitle_alignment_set_user_data(subtitle_alignment_handle
+ pSubtitleAlignmentHandle,
+ void *pUserData);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
typedef void *subtitle_bg_color_handle;
-subtitle_bg_color_handle vp_subtitle_bg_color_create(Evas_Object *pParent, PopupCloseCbFunc pCloseCb, int nDefaultColor);
-void vp_subtitle_bg_color_destroy(subtitle_bg_color_handle pSubtitleBGColorHandle);
-bool vp_subtitle_bg_color_realize(subtitle_bg_color_handle pSubtitleBGColorHandle);
-bool vp_subtitle_bg_color_unrealize(subtitle_bg_color_handle pSubtitleBGColorHandle);
-bool vp_subtitle_bg_color_set_user_data(subtitle_bg_color_handle pSubtitleBGColorHandle, void *pUserData);
-
+subtitle_bg_color_handle vp_subtitle_bg_color_create(Evas_Object * pParent,
+ PopupCloseCbFunc
+ pCloseCb,
+ int nDefaultColor);
+void vp_subtitle_bg_color_destroy(subtitle_bg_color_handle
+ pSubtitleBGColorHandle);
+bool vp_subtitle_bg_color_realize(subtitle_bg_color_handle
+ pSubtitleBGColorHandle);
+bool vp_subtitle_bg_color_unrealize(subtitle_bg_color_handle
+ pSubtitleBGColorHandle);
+bool vp_subtitle_bg_color_set_user_data(subtitle_bg_color_handle
+ pSubtitleBGColorHandle,
+ void *pUserData);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
typedef void *subtitle_color_handle;
-typedef void (*SubtitleColorUpdateCbFunc)(double fValue, void* pUserData);
+typedef void (*SubtitleColorUpdateCbFunc) (double fValue, void *pUserData);
#ifndef SUBTITLE_K_FEATURE
-typedef void (*SubtitlePopupCloseCbFunc)(int nType, bool bPause, void* pUserData);
+typedef void (*SubtitlePopupCloseCbFunc) (int nType, bool bPause,
+ void *pUserData);
#else
-typedef void (*SubtitlePopupCloseCbFunc)(char *pColorHex, bool bSetValue, void* pUserData);
+typedef void (*SubtitlePopupCloseCbFunc) (char *pColorHex, bool bSetValue,
+ void *pUserData);
#endif
#ifndef SUBTITLE_K_FEATURE
-subtitle_color_handle vp_subtitle_color_create(Evas_Object *pParent, SubtitlePopupCloseCbFunc pCloseCb, int nDefaultColor);
+subtitle_color_handle vp_subtitle_color_create(Evas_Object * pParent,
+ SubtitlePopupCloseCbFunc
+ pCloseCb,
+ int nDefaultColor);
#else
-subtitle_color_handle vp_subtitle_color_hex_create(Evas_Object *pParent, SubtitlePopupCloseCbFunc pCloseCb, char *pDefaultColor);
+subtitle_color_handle vp_subtitle_color_hex_create(Evas_Object * pParent,
+ SubtitlePopupCloseCbFunc
+ pCloseCb,
+ char *pDefaultColor);
#endif
-void vp_subtitle_color_destroy(subtitle_color_handle pSubtitleFontColorHandle);
-bool vp_subtitle_color_realize(subtitle_color_handle pSubtitleFontColorHandle);
-bool vp_subtitle_color_unrealize(subtitle_color_handle pSubtitleFontColorHandle);
-bool vp_subtitle_color_set_user_data(subtitle_color_handle pSubtitleFontColorHandle, void *pUserData);
-
+void vp_subtitle_color_destroy(subtitle_color_handle
+ pSubtitleFontColorHandle);
+bool vp_subtitle_color_realize(subtitle_color_handle
+ pSubtitleFontColorHandle);
+bool vp_subtitle_color_unrealize(subtitle_color_handle
+ pSubtitleFontColorHandle);
+bool vp_subtitle_color_set_user_data(subtitle_color_handle
+ pSubtitleFontColorHandle,
+ void *pUserData);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
typedef void *subtitle_edge_handle;
-subtitle_edge_handle vp_subtitle_edge_create(Evas_Object *pParent, PopupCloseCbFunc pCloseCb, int nDefaultSize);
+subtitle_edge_handle vp_subtitle_edge_create(Evas_Object * pParent,
+ PopupCloseCbFunc pCloseCb,
+ int nDefaultSize);
void vp_subtitle_edge_destroy(subtitle_edge_handle pSubtitleSizeHandle);
bool vp_subtitle_edge_realize(subtitle_edge_handle pSubtitleSizeHandle);
bool vp_subtitle_edge_unrealize(subtitle_edge_handle pSubtitleSizeHandle);
-bool vp_subtitle_edge_set_user_data(subtitle_edge_handle pSubtitleSizeHandle, void *pUserData);
-
-
+bool vp_subtitle_edge_set_user_data(subtitle_edge_handle
+ pSubtitleSizeHandle, void *pUserData);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
typedef void *subtitle_font_handle;
-typedef void (*SubtitleFontCbFunc)(char *szSelectURL, void* pUserData);
+typedef void (*SubtitleFontCbFunc) (char *szSelectURL, void *pUserData);
-subtitle_font_handle vp_subtitle_font_create(Evas_Object *pParent, SubtitleFontCbFunc pCloseCb, char *szCurrentFont);
+subtitle_font_handle vp_subtitle_font_create(Evas_Object * pParent,
+ SubtitleFontCbFunc pCloseCb,
+ char *szCurrentFont);
void vp_subtitle_font_destroy(subtitle_font_handle pSubtitleFontHandle);
bool vp_subtitle_font_realize(subtitle_font_handle pSubtitleFontHandle);
bool vp_subtitle_font_unrealize(subtitle_font_handle pSubtitleFontHandle);
-bool vp_subtitle_font_set_user_data(subtitle_font_handle pSubtitleFontHandle, void *pUserData);
-
+bool vp_subtitle_font_set_user_data(subtitle_font_handle
+ pSubtitleFontHandle, void *pUserData);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <glib.h>
typedef void *subtitle_select_handle;
-typedef void (*SubtitleCloseCbFunc)(char *szSelectURL, void* pUserData);
+typedef void (*SubtitleCloseCbFunc) (char *szSelectURL, void *pUserData);
-subtitle_select_handle vp_subtitle_select_create(Evas_Object *pParent, SubtitleCloseCbFunc pCloseCb, SubtitleCloseCbFunc pButtonCb, GList *pFileList, char *szCurrentPath, bool isSubtitleOff);
-void vp_subtitle_select_destroy(subtitle_select_handle pSubtitleSelectHandle);
-bool vp_subtitle_select_realize(subtitle_select_handle pSubtitleSelectHandle);
-bool vp_subtitle_select_unrealize(subtitle_select_handle pSubtitleSelectHandle);
-bool vp_subtitle_select_set_user_data(subtitle_select_handle pSubtitleSelectHandle, void *pUserData);
+subtitle_select_handle vp_subtitle_select_create(Evas_Object * pParent,
+ SubtitleCloseCbFunc
+ pCloseCb,
+ SubtitleCloseCbFunc
+ pButtonCb,
+ GList * pFileList,
+ char *szCurrentPath,
+ bool isSubtitleOff);
+void vp_subtitle_select_destroy(subtitle_select_handle
+ pSubtitleSelectHandle);
+bool vp_subtitle_select_realize(subtitle_select_handle
+ pSubtitleSelectHandle);
+bool vp_subtitle_select_unrealize(subtitle_select_handle
+ pSubtitleSelectHandle);
+bool vp_subtitle_select_set_user_data(subtitle_select_handle
+ pSubtitleSelectHandle,
+ void *pUserData);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
typedef void *subtitle_size_handle;
-subtitle_size_handle vp_subtitle_size_create(Evas_Object *pParent, PopupCloseCbFunc pCloseCb, int nDefaultSize);
+subtitle_size_handle vp_subtitle_size_create(Evas_Object * pParent,
+ PopupCloseCbFunc pCloseCb,
+ int nDefaultSize);
void vp_subtitle_size_destroy(subtitle_size_handle pSubtitleSizeHandle);
bool vp_subtitle_size_realize(subtitle_size_handle pSubtitleSizeHandle);
bool vp_subtitle_size_unrealize(subtitle_size_handle pSubtitleSizeHandle);
-bool vp_subtitle_size_set_user_data(subtitle_size_handle pSubtitleSizeHandle, void *pUserData);
-
+bool vp_subtitle_size_set_user_data(subtitle_size_handle
+ pSubtitleSizeHandle, void *pUserData);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
typedef void *subtitle_sync_popup;
-typedef void (*SubtitleSyncUpdateCbFunc)(float fValue, void* pUserData);
-typedef void (*SubtitleSyncDoneCbFunc)(float fValue, bool bSetValue, void* pUserData);
+typedef void (*SubtitleSyncUpdateCbFunc) (float fValue, void *pUserData);
+typedef void (*SubtitleSyncDoneCbFunc) (float fValue, bool bSetValue,
+ void *pUserData);
-subtitle_sync_popup vp_subtitle_sync_popup_create(Evas_Object *pParent, float fSyncVal, SubtitleSyncUpdateCbFunc pUpdateCb, SubtitleSyncDoneCbFunc pDoneCb);
+subtitle_sync_popup vp_subtitle_sync_popup_create(Evas_Object * pParent,
+ float fSyncVal,
+ SubtitleSyncUpdateCbFunc
+ pUpdateCb,
+ SubtitleSyncDoneCbFunc
+ pDoneCb);
void vp_subtitle_sync_popup_destroy(subtitle_sync_popup pSubtitleSync);
bool vp_subtitle_sync_popup_realize(subtitle_sync_popup pSubtitleSync);
bool vp_subtitle_sync_popup_unrealize(subtitle_sync_popup pSubtitleSync);
-bool vp_subtitle_sync_popup_set_user_data(subtitle_sync_popup pSubtitleSync, void *pUserData);
-
+bool vp_subtitle_sync_popup_set_user_data(subtitle_sync_popup
+ pSubtitleSync, void *pUserData);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
#include <vp-play-popup.h>
#ifdef _SUBTITLE_MULTI_LANGUAGE
-typedef void (*SubtitleLanguageChangeCbFunc)(int index, void* pUserData);
+typedef void (*SubtitleLanguageChangeCbFunc) (int index, void *pUserData);
#endif
typedef void *subtitle_track_handle;
#ifdef _SUBTITLE_MULTI_LANGUAGE
-subtitle_track_handle vp_subtitle_track_create(Evas_Object *pParent, PopupCloseCbFunc pCloseCb);
+subtitle_track_handle vp_subtitle_track_create(Evas_Object * pParent,
+ PopupCloseCbFunc pCloseCb);
#else
-subtitle_track_handle vp_subtitle_track_create(Evas_Object *pParent, PopupCloseCbFunc pCloseCb, int nDefaultIndex);
+subtitle_track_handle vp_subtitle_track_create(Evas_Object * pParent,
+ PopupCloseCbFunc pCloseCb,
+ int nDefaultIndex);
#endif
void vp_subtitle_track_destroy(subtitle_track_handle pSubtitleTrackHandle);
bool vp_subtitle_track_realize(subtitle_track_handle pSubtitleTrackHandle);
-bool vp_subtitle_track_unrealize(subtitle_track_handle pSubtitleTrackHandle);
+bool vp_subtitle_track_unrealize(subtitle_track_handle
+ pSubtitleTrackHandle);
#ifdef _SUBTITLE_MULTI_LANGUAGE
-bool vp_subtitle_track_add_Item(subtitle_track_handle pSubtitleTrackHandle, char *szCode, int nIndex, bool bCheck);
+bool vp_subtitle_track_add_Item(subtitle_track_handle pSubtitleTrackHandle,
+ char *szCode, int nIndex, bool bCheck);
#else
-bool vp_subtitle_track_add_Item(subtitle_track_handle pSubtitleTrackHandle, char *szCode, int nIndex);
+bool vp_subtitle_track_add_Item(subtitle_track_handle pSubtitleTrackHandle,
+ char *szCode, int nIndex);
#endif
-bool vp_subtitle_track_set_user_data(subtitle_track_handle pSubtitleTrackHandle, void *pUserData);
+bool vp_subtitle_track_set_user_data(subtitle_track_handle
+ pSubtitleTrackHandle,
+ void *pUserData);
#ifdef _SUBTITLE_MULTI_LANGUAGE
-bool vp_subtitle_track_set_add_language_cb(subtitle_track_handle pSubtitleTrackHandle, SubtitleLanguageChangeCbFunc pCallback);
-bool vp_subtitle_track_set_remove_language_cb(subtitle_track_handle pSubtitleTrackHandle, SubtitleLanguageChangeCbFunc pCallback);
+bool vp_subtitle_track_set_add_language_cb(subtitle_track_handle
+ pSubtitleTrackHandle,
+ SubtitleLanguageChangeCbFunc
+ pCallback);
+bool vp_subtitle_track_set_remove_language_cb(subtitle_track_handle
+ pSubtitleTrackHandle,
+ SubtitleLanguageChangeCbFunc
+ pCallback);
#endif
bool vp_subtitle_track_get_name(char *szCode, char **szName);
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
VP_SUBTITLE_MODE_EDGE,
VP_SUBTITLE_MODE_CLOSE,
VP_SUBTITLE_MODE_FONT_COLOR
-}vp_subtitle_mode_t;
+} vp_subtitle_mode_t;
typedef enum {
VP_SUBTITLE_EDGE_NO_EDGE = 0x00,
VP_SUBTITLE_EDGE_DEPRESSED,
VP_SUBTITLE_EDGE_UNIFORM,
VP_SUBTITLE_EDGE_DROP_SHADOW
-}vp_subtitle_edge_t;
+} vp_subtitle_edge_t;
-typedef struct _SubtitleInfo{
- bool bClosedCaption;
- bool original_activation;
- float fSync;
- char *szURL;
- char *szText;
- char *szLanguage;
+typedef struct _SubtitleInfo {
+ bool bClosedCaption;
+ bool original_activation;
+ float fSync;
+ char *szURL;
+ char *szText;
+ char *szLanguage;
#ifdef SUBTITLE_K_FEATURE
- video_play_subtitle_alignment_t eAlignment;
- video_play_subtitle_alignment_t original_eAlignment;
+ video_play_subtitle_alignment_t eAlignment;
+ video_play_subtitle_alignment_t original_eAlignment;
#endif
- char *szFontName;
- float fZoom;
- int nFontSize;
- int original_nFontSize;
- int nEdge;
+ char *szFontName;
+ float fZoom;
+ int nFontSize;
+ int original_nFontSize;
+ int nEdge;
#ifndef SUBTITLE_K_FEATURE
- int nTextColor;
- int nBGColor;
+ int nTextColor;
+ int nBGColor;
#else
- char *pTextColorHex;
- char *pBGColorHex;
- char *pCaptionWinColorHex;
+ char *pTextColorHex;
+ char *pOriginalTextColorHex;
+ char *pBGColorHex;
+ char *pCaptionWinColorHex;
#endif
- bool bSupportSelect;
-}SubtitleInfo;
+ bool bSupportSelect;
+} SubtitleInfo;
-subtitle_popup_handle vp_subtitle_create(Evas_Object *pParent, SubtitleInfo *pSubtitleInfo, PopupCloseCbFunc pCloseCb);
+subtitle_popup_handle vp_subtitle_create(Evas_Object * pParent,
+ SubtitleInfo * pSubtitleInfo,
+ PopupCloseCbFunc pCloseCb);
void vp_subtitle_destroy(subtitle_popup_handle pSubtitleHandle);
bool vp_subtitle_realize(subtitle_popup_handle pSubtitleHandle);
bool vp_subtitle_unrealize(subtitle_popup_handle pSubtitleHandle);
-bool vp_subtitle_update(subtitle_popup_handle pSubtitleHandle, SubtitleInfo *pSubtitleInfo);
-bool vp_subtitle_set_user_data(subtitle_popup_handle pSubtitleHandle, void *pUserData);
-
+bool vp_subtitle_update(subtitle_popup_handle pSubtitleHandle,
+ SubtitleInfo * pSubtitleInfo);
+bool vp_subtitle_set_user_data(subtitle_popup_handle pSubtitleHandle,
+ void *pUserData);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
typedef void *zoom_guide_handle;
-zoom_guide_handle vp_zoom_guide_create(Evas_Object *pParent);
+zoom_guide_handle vp_zoom_guide_create(Evas_Object * pParent);
void vp_zoom_guide_destroy(zoom_guide_handle pWidgetHandle);
bool vp_zoom_guide_realize(zoom_guide_handle pWidgetHandle);
bool vp_zoom_guide_unrealize(zoom_guide_handle pWidgetHandle);
Evas_Object *vp_zoom_guide_get_object(zoom_guide_handle pWidgetHandle);
-bool vp_zoom_guide_set_zoom_value(zoom_guide_handle pWidgetHandle, double fZoomVal);
-bool vp_zoom_guide_get_zoom_value(zoom_guide_handle pWidgetHandle, double *fZoomVal);
-bool vp_zoom_guide_set_move_position(zoom_guide_handle pWidgetHandle, double fPosX, double fPosY);
-bool vp_zoom_guide_get_move_position(zoom_guide_handle pWidgetHandle, double *fPosX, double *fPosY);
-bool vp_zoom_guide_get_real_position(zoom_guide_handle pWidgetHandle, double *fPosX, double *fPosY);
+bool vp_zoom_guide_set_zoom_value(zoom_guide_handle pWidgetHandle,
+ double fZoomVal);
+bool vp_zoom_guide_get_zoom_value(zoom_guide_handle pWidgetHandle,
+ double *fZoomVal);
+bool vp_zoom_guide_set_move_position(zoom_guide_handle pWidgetHandle,
+ double fPosX, double fPosY);
+bool vp_zoom_guide_get_move_position(zoom_guide_handle pWidgetHandle,
+ double *fPosX, double *fPosY);
+bool vp_zoom_guide_get_real_position(zoom_guide_handle pWidgetHandle,
+ double *fPosX, double *fPosY);
bool vp_zoom_guide_update(zoom_guide_handle pWidgetHandle);
-
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
#include "vp-play-string-define.h"
-static void _vp_audio_track_destroy_handle(AudioTrackPopup *pAudioTrack);
+static void _vp_audio_track_destroy_handle(AudioTrackPopup * pAudioTrack);
static void __vp_audio_track_popup_rotate_cb(void *data,
- Evas_Object *obj,
- void *event_info);
+ Evas_Object * obj,
+ void *event_info);
static void __vp_audio_track_genlist_realized(void *data,
- Evas_Object *obj,
- void *event_info);
+ Evas_Object * obj,
+ void *event_info);
static void __vp_audio_track_genlist_item_selected_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo);
+ Evas_Object *
+ pObject,
+ void *pEventInfo);
/* callback functions */
static char *__vp_audio_track_genlist_text_get_cb(const void *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ Evas_Object * pObj,
+ const char *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
static Evas_Object *__vp_audio_track_genlist_content_get_cb(const void
- *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ *pUserData,
+ Evas_Object *
+ pObj,
+ const char
+ *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Evas_Object *pRadioObj = NULL;
AudioTrackPopup *pAudioTrack =
- (AudioTrackPopup *) evas_object_data_get(pObj,
- VP_AUDIO_TRACK_GENLIST_DATA_KEY);
+ (AudioTrackPopup *) evas_object_data_get(pObj,
+ VP_AUDIO_TRACK_GENLIST_DATA_KEY);
if (pAudioTrack == NULL) {
VideoLogWarning("evas_object_data_get is fail");
return NULL;
elm_radio_state_value_set(pRadioObj, pItem->nIndex);
elm_radio_group_add(pRadioObj, pAudioTrack->pRadio);
elm_radio_value_set(pAudioTrack->pRadio,
- pAudioTrack->nAudoTrackIdx);
+ pAudioTrack->nAudoTrackIdx);
evas_object_smart_callback_add(pRadioObj, "changed",
- __vp_audio_track_genlist_item_selected_cb,
- pAudioTrack);
+ __vp_audio_track_genlist_item_selected_cb,
+ pAudioTrack);
evas_object_show(pRadioObj);
return pRadioObj;
}
static void __vp_audio_track_genlist_item_selected_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Elm_Object_Item *pElmItem = (Elm_Object_Item *) pEventInfo;
Elm_Object_Item *pSelectedItem =
- elm_genlist_selected_item_get(pObject);
+ elm_genlist_selected_item_get(pObject);
if (pSelectedItem) {
elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
}
AudioTrackItem *pItem =
- (AudioTrackItem *) elm_object_item_data_get(pElmItem);
+ (AudioTrackItem *) elm_object_item_data_get(pElmItem);
AudioTrackPopup *pAudioTrack = (AudioTrackPopup *) pUserData;
pAudioTrack->nAudoTrackIdx = pItem->nIndex;
if (pAudioTrack->pCloseCb) {
pAudioTrack->pCloseCb(pItem->nIndex, FALSE,
- (void *) pAudioTrack->pUserData);
+ (void *) pAudioTrack->pUserData);
}
}
static void __vp_audio_track_popup_key_event_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
static void __vp_audio_track_popup_mouse_event_cb(void *pUserData,
- Evas *pEvas,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas * pEvas,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pAudioTrack->pCloseCb) {
pAudioTrack->pCloseCb(-1, FALSE,
- (void *) pAudioTrack->pUserData);
+ (void *) pAudioTrack->pUserData);
}
}
}
/* internal functions */
-static void _vp_audio_track_clear_item_list(AudioTrackPopup *pAudioTrack)
+static void _vp_audio_track_clear_item_list(AudioTrackPopup * pAudioTrack)
{
if (pAudioTrack == NULL) {
VideoLogError("pAudioTrack is NULL");
AudioTrackItem *pItem = NULL;
pItem =
- (AudioTrackItem *) g_list_nth_data(pAudioTrack->pItemList,
- idx);
+ (AudioTrackItem *) g_list_nth_data(pAudioTrack->pItemList,
+ idx);
if (pItem) {
VP_EVAS_ITEM_DEL(pItem->pItem);
VP_FREE(pItem->szName);
pAudioTrack->pItemList = NULL;
}
-static void _vp_audio_track_destroy_handle(AudioTrackPopup *pAudioTrack)
+static void _vp_audio_track_destroy_handle(AudioTrackPopup * pAudioTrack)
{
if (pAudioTrack == NULL) {
VideoLogError("pAudioTrack is NULL");
}
evas_object_smart_callback_del(pAudioTrack->pGenList, "realized",
- __vp_audio_track_genlist_realized);
+ __vp_audio_track_genlist_realized);
evas_object_smart_callback_del(pAudioTrack->pParent,
- "rotation,changed",
- __vp_audio_track_popup_rotate_cb);
+ "rotation,changed",
+ __vp_audio_track_popup_rotate_cb);
_vp_audio_track_clear_item_list(pAudioTrack);
VP_FREE(pAudioTrack);
}
-static Evas_Object *_vp_audio_track_create_genlist(Evas_Object *pParent)
+static Evas_Object *_vp_audio_track_create_genlist(Evas_Object * pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_genlist_add(pParent);
evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(pObj);
return pObj;
}
-static bool _vp_audio_track_add_genlist_item(Evas_Object *pObj,
- void *pUserData)
+static bool _vp_audio_track_add_genlist_item(Evas_Object * pObj,
+ void *pUserData)
{
if (pObj == NULL) {
VideoLogError("pObj is NULL");
}
pAudioTrack->st_AudioTrack_Itc->version =
- ELM_GENLIST_ITEM_CLASS_VERSION;
+ ELM_GENLIST_ITEM_CLASS_VERSION;
pAudioTrack->st_AudioTrack_Itc->item_style = "1text.1icon.3/popup";
pAudioTrack->st_AudioTrack_Itc->func.text_get =
- (void *) __vp_audio_track_genlist_text_get_cb;
+ (void *) __vp_audio_track_genlist_text_get_cb;
pAudioTrack->st_AudioTrack_Itc->func.content_get =
- (void *) __vp_audio_track_genlist_content_get_cb;
+ (void *) __vp_audio_track_genlist_content_get_cb;
pAudioTrack->st_AudioTrack_Itc->func.state_get = NULL;
pAudioTrack->st_AudioTrack_Itc->func.del = NULL;
int len = g_list_length(pAudioTrack->pItemList);
AudioTrackItem *pItem = NULL;
pItem =
- (AudioTrackItem *) g_list_nth_data(pAudioTrack->pItemList,
- idx);
+ (AudioTrackItem *) g_list_nth_data(pAudioTrack->pItemList,
+ idx);
if (pItem) {
pItem->pItem =
- elm_genlist_item_append(pObj,
- pAudioTrack->st_AudioTrack_Itc,
- (void *) pItem, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_audio_track_genlist_item_selected_cb,
- pUserData);
+ elm_genlist_item_append(pObj,
+ pAudioTrack->st_AudioTrack_Itc,
+ (void *) pItem, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_audio_track_genlist_item_selected_cb,
+ pUserData);
pAudioTrack->nListCount++;
}
}
}
static void __vp_audio_track_genlist_realized(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
VP_GENLIST_HIDE_BOTTOMLINE(data, obj, event_info);
}
static void __vp_audio_track_popup_rotate_cb(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
AudioTrackPopup *pAudioTrack = (AudioTrackPopup *) data;
if (!pAudioTrack) {
return;
}
vp_popup_set_popup_min_size(pAudioTrack->pParent, pAudioTrack->pBox,
- pAudioTrack->nListCount,
- VIDEO_POPUP_DEFAULT);
+ pAudioTrack->nListCount,
+ VIDEO_POPUP_DEFAULT);
}
/* external functions */
-audio_track_handle vp_audio_track_create(Evas_Object *pParent,
- PopupCloseCbFunc pCloseCb,
- int nDefaultIndex)
+audio_track_handle vp_audio_track_create(Evas_Object * pParent,
+ PopupCloseCbFunc pCloseCb,
+ int nDefaultIndex)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pAudioTrack->pCloseCb = pCloseCb;
pAudioTrack->pPopup =
- vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
- VP_PLAY_STRING_POPUP_AUDIO_TRACK, NULL, 0.0, NULL,
- __vp_audio_track_popup_key_event_cb,
- __vp_audio_track_popup_mouse_event_cb,
- (void *) pAudioTrack);
+ vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
+ VP_PLAY_STRING_POPUP_AUDIO_TRACK, NULL, 0.0, NULL,
+ __vp_audio_track_popup_key_event_cb,
+ __vp_audio_track_popup_mouse_event_cb,
+ (void *) pAudioTrack);
if (pAudioTrack->pPopup == NULL) {
VideoLogError("vp_popup_create fail");
_vp_audio_track_destroy_handle(pAudioTrack);
}
pAudioTrack->pGenList =
- _vp_audio_track_create_genlist(pAudioTrack->pPopup);
+ _vp_audio_track_create_genlist(pAudioTrack->pPopup);
if (pAudioTrack->pGenList == NULL) {
VideoLogError("_vp_audio_track_create_genlist fail");
_vp_audio_track_destroy_handle(pAudioTrack);
return NULL;
}
evas_object_smart_callback_add(pAudioTrack->pGenList, "realized",
- __vp_audio_track_genlist_realized,
- NULL);
+ __vp_audio_track_genlist_realized,
+ NULL);
evas_object_smart_callback_add(pAudioTrack->pParent,
- "rotation,changed",
- __vp_audio_track_popup_rotate_cb,
- pAudioTrack);
+ "rotation,changed",
+ __vp_audio_track_popup_rotate_cb,
+ pAudioTrack);
evas_object_data_set(pAudioTrack->pGenList,
- VP_AUDIO_TRACK_GENLIST_DATA_KEY,
- (void *) pAudioTrack);
+ VP_AUDIO_TRACK_GENLIST_DATA_KEY,
+ (void *) pAudioTrack);
pAudioTrack->nDefaultIndex = nDefaultIndex;
pAudioTrack->pRadio = elm_radio_add(pAudioTrack->pGenList);
pAudioTrack->nListCount = len;
if (len == 1) {
vp_popup_set_popup_min_size(pAudioTrack->pParent,
- pAudioTrack->pBox,
- pAudioTrack->nListCount,
- VIDEO_POPUP_DEFAULT);
+ pAudioTrack->pBox,
+ pAudioTrack->nListCount,
+ VIDEO_POPUP_DEFAULT);
elm_scroller_policy_set(pAudioTrack->pGenList,
- ELM_SCROLLER_POLICY_OFF,
- ELM_SCROLLER_POLICY_OFF);
+ ELM_SCROLLER_POLICY_OFF,
+ ELM_SCROLLER_POLICY_OFF);
} else {
vp_popup_set_popup_min_size(pAudioTrack->pParent,
- pAudioTrack->pBox,
- pAudioTrack->nListCount,
- VIDEO_POPUP_DEFAULT);
+ pAudioTrack->pBox,
+ pAudioTrack->nListCount,
+ VIDEO_POPUP_DEFAULT);
}
elm_box_pack_end(pAudioTrack->pBox, pAudioTrack->pGenList);
elm_object_content_set(pAudioTrack->pPopup, pAudioTrack->pBox);
if (!_vp_audio_track_add_genlist_item
- (pAudioTrack->pGenList, (void *) pAudioTrack)) {
+ (pAudioTrack->pGenList, (void *) pAudioTrack)) {
VideoLogError("_vp_audio_track_add_genlist_item fail");
return FALSE;
}
- //elm_radio_value_set(pAudioTrack->pRadio, pAudioTrack->nDefaultIndex);
+
pAudioTrack->nAudoTrackIdx = pAudioTrack->nDefaultIndex;
evas_object_show(pAudioTrack->pPopup);
}
bool vp_audio_track_add_Item(audio_track_handle pAudioTrackHandle,
- char *szCode, int nIndex)
+ char *szCode, int nIndex)
{
if (pAudioTrackHandle == NULL) {
VideoLogError("pAudioTrackHandle is NULL");
if (nSelectIdex == -1) {
char *szDefaultTrack =
- g_strdup_printf("%s %d", VP_PLAY_STRING_AUDIO_TRACK, 0);
+ g_strdup_printf("%s %d", VP_PLAY_STRING_AUDIO_TRACK, 0);
if (!strcmp(szDefaultTrack, szCode)) {
VP_STRDUP(pItem->szName, szCode);
}
bool vp_audio_track_set_user_data(audio_track_handle pAudioTrackHandle,
- void *pUserData)
+ void *pUserData)
{
if (pAudioTrackHandle == NULL) {
VideoLogError("pAudioTrackHandle is 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-play-string-define.h"
#include "vp-play-value-define.h"
#include "vp-play-type-define.h"
-static void _vp_capture_popup_destroy_handle(CapturePopup *pCapturePopup);
+static void _vp_capture_popup_destroy_handle(CapturePopup * pCapturePopup);
static void __vp_capture_popup_genlist_item_selected_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo);
+ Evas_Object *
+ pObject,
+ void *pEventInfo);
-static void __vp_capture_genlist_realized(void *data, Evas_Object *obj,
- void *event_info)
+static void __vp_capture_genlist_realized(void *data, Evas_Object * obj,
+ void *event_info)
{
VP_GENLIST_HIDE_BOTTOMLINE(data, obj, event_info);
}
-static void __vp_capture_popup_rotate_cb(void *data, Evas_Object *obj,
- void *event_info)
+static void __vp_capture_popup_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
CapturePopup *pCapture = (CapturePopup *) data;
if (!pCapture) {
return;
}
vp_popup_set_popup_min_size(pCapture->pParent, pCapture->pBox,
- pCapture->nListCount,
- VIDEO_POPUP_DEFAULT);
+ pCapture->nListCount, VIDEO_POPUP_DEFAULT);
}
/* callback functions */
static char *__vp_capture_popup_genlist_text_get_cb(const void *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ Evas_Object * pObj,
+ const char *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
static Evas_Object *__vp_capture_popup_genlist_content_get_cb(const void
- *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ *pUserData,
+ Evas_Object *
+ pObj,
+ const char
+ *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Evas_Object *pRadioObj = NULL;
CapturePopup *pCapture =
- (CapturePopup *) evas_object_data_get(pObj,
- VP_CAPTURE_POPUP_GENLIST_DATA_KEY);
+ (CapturePopup *) evas_object_data_get(pObj,
+ VP_CAPTURE_POPUP_GENLIST_DATA_KEY);
if (pCapture == NULL) {
VideoLogWarning("evas_object_data_get is fail");
return NULL;
elm_radio_group_add(pRadioObj, pCapture->pRadio);
elm_radio_value_set(pCapture->pRadio, (int) pCapture->bCaptureOn);
evas_object_smart_callback_add(pRadioObj, "changed",
- __vp_capture_popup_genlist_item_selected_cb,
- pCapture);
+ __vp_capture_popup_genlist_item_selected_cb,
+ pCapture);
evas_object_show(pRadioObj);
return pRadioObj;
}
static void __vp_capture_popup_genlist_item_selected_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
Elm_Object_Item *pSelectedItem =
- elm_genlist_selected_item_get(pObject);
+ elm_genlist_selected_item_get(pObject);
if (pSelectedItem) {
elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
}
}
static void __vp_capture_popup_key_event_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
static void __vp_capture_popup_mouse_event_cb(void *pUserData,
- Evas *pEvas,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas * pEvas,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
/* internal functions */
-static void _vp_capture_popup_destroy_handle(CapturePopup *pCapture)
+static void _vp_capture_popup_destroy_handle(CapturePopup * pCapture)
{
if (pCapture == NULL) {
VideoLogError("pCapture is NULL");
}
evas_object_smart_callback_del(pCapture->pGenList, "realized",
- __vp_capture_genlist_realized);
+ __vp_capture_genlist_realized);
evas_object_smart_callback_del(pCapture->pParent, "rotation,changed",
- __vp_capture_popup_rotate_cb);
+ __vp_capture_popup_rotate_cb);
VP_EVAS_DEL(pCapture->pRadio);
VP_EVAS_DEL(pCapture->pGenList);
VP_FREE(pCapture);
}
-static Evas_Object *_vp_capture_popup_create_genlist(Evas_Object *pParent)
+static Evas_Object *_vp_capture_popup_create_genlist(Evas_Object * pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_genlist_add(pParent);
evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(pObj);
return pObj;
}
-static bool _vp_capture_popup_add_genlist_item(Evas_Object *pObj,
- void *pUserData)
+static bool _vp_capture_popup_add_genlist_item(Evas_Object * pObj,
+ void *pUserData)
{
if (pObj == NULL) {
VideoLogError("pObj is NULL");
pCapture->st_Capture_Itc->version = ELM_GENLIST_ITEM_CLASS_VERSION;
pCapture->st_Capture_Itc->item_style = "1text.1icon.3/popup";
pCapture->st_Capture_Itc->func.text_get =
- (void *) __vp_capture_popup_genlist_text_get_cb;
+ (void *) __vp_capture_popup_genlist_text_get_cb;
pCapture->st_Capture_Itc->func.content_get =
- (void *) __vp_capture_popup_genlist_content_get_cb;
+ (void *) __vp_capture_popup_genlist_content_get_cb;
pCapture->st_Capture_Itc->func.state_get = NULL;
pCapture->st_Capture_Itc->func.del = NULL;
pCapture->nListCount = 0;
elm_genlist_item_append(pObj, pCapture->st_Capture_Itc,
- (void *) VP_PLAY_STRING_COM_ON, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_capture_popup_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_COM_ON, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_capture_popup_genlist_item_selected_cb,
+ pUserData);
pCapture->nListCount++;
elm_genlist_item_append(pObj, pCapture->st_Capture_Itc,
- (void *) VP_PLAY_STRING_COM_OFF, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_capture_popup_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_COM_OFF, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_capture_popup_genlist_item_selected_cb,
+ pUserData);
pCapture->nListCount++;
return TRUE;
}
/* external functions */
-capture_popup_handle vp_capture_popup_create(Evas_Object *pParent,
- bool bCaptureOn,
- PopupCloseCbFunc pCloseCb)
+capture_popup_handle vp_capture_popup_create(Evas_Object * pParent,
+ bool bCaptureOn,
+ PopupCloseCbFunc pCloseCb)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pCapture->pCloseCb = pCloseCb;
pCapture->pPopup =
- vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
- VP_PLAY_STRING_POPUP_CAPTURE, NULL, 0.0, NULL,
- __vp_capture_popup_key_event_cb,
- __vp_capture_popup_mouse_event_cb,
- (void *) pCapture);
+ vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
+ VP_PLAY_STRING_POPUP_CAPTURE, NULL, 0.0, NULL,
+ __vp_capture_popup_key_event_cb,
+ __vp_capture_popup_mouse_event_cb,
+ (void *) pCapture);
if (pCapture->pPopup == NULL) {
VideoLogError("vp_popup_create fail");
_vp_capture_popup_destroy_handle(pCapture);
}
pCapture->pGenList =
- _vp_capture_popup_create_genlist(pCapture->pPopup);
+ _vp_capture_popup_create_genlist(pCapture->pPopup);
if (pCapture->pGenList == NULL) {
VideoLogError("_vp_capture_popup_create_genlist fail");
_vp_capture_popup_destroy_handle(pCapture);
return NULL;
}
evas_object_data_set(pCapture->pGenList,
- VP_CAPTURE_POPUP_GENLIST_DATA_KEY,
- (void *) pCapture);
+ VP_CAPTURE_POPUP_GENLIST_DATA_KEY,
+ (void *) pCapture);
evas_object_smart_callback_add(pCapture->pGenList, "realized",
- __vp_capture_genlist_realized, NULL);
+ __vp_capture_genlist_realized, NULL);
pCapture->pRadio = elm_radio_add(pCapture->pGenList);
if (!_vp_capture_popup_add_genlist_item
- (pCapture->pGenList, (void *) pCapture)) {
+ (pCapture->pGenList, (void *) pCapture)) {
VideoLogError("_vp_capture_popup_add_genlist_item fail");
_vp_capture_popup_destroy_handle(pCapture);
return NULL;
}
evas_object_smart_callback_add(pCapture->pParent, "rotation,changed",
- __vp_capture_popup_rotate_cb,
- pCapture);
+ __vp_capture_popup_rotate_cb, pCapture);
- //elm_radio_value_set(pCapture->pRadio, (int)bCaptureOn);
pCapture->bCaptureOn = bCaptureOn;
pCapture->pBox = elm_box_add(pCapture->pPopup);
vp_popup_set_popup_min_size(pCapture->pParent, pCapture->pBox,
- pCapture->nListCount,
- VIDEO_POPUP_DEFAULT);
+ pCapture->nListCount, VIDEO_POPUP_DEFAULT);
elm_box_pack_end(pCapture->pBox, pCapture->pGenList);
}
bool vp_capture_popup_set_user_data(capture_popup_handle
- pCapturePopupHandle, void *pUserData)
+ pCapturePopupHandle, void *pUserData)
{
if (pCapturePopupHandle == NULL) {
VideoLogError("pCapturePopupHandle is 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
#include "vp-util.h"
/* callback functions */
-static void __vp_detail_genlist_realized(void *data, Evas_Object *obj,
- void *event_info)
+static void __vp_detail_genlist_realized(void *data, Evas_Object * obj,
+ void *event_info)
{
VP_GENLIST_HIDE_BOTTOMLINE(data, obj, event_info);
}
-/*
-static void __vp_detail_popup_rotate_cb(void *data, Evas_Object *obj,
- void *event_info)
-{
- DetailPopup *pDetailPopup = (DetailPopup *) data;
- if (!pDetailPopup) {
- VideoLogError("pDetailPopup IS null");
- return;
- }
- if (pDetailPopup->nListCount < VP_POPUP_MIN_ITEMS) {
- return;
- }
- vp_popup_set_popup_min_size(pDetailPopup->pParent, pDetailPopup->pBox,
- pDetailPopup->nListCount,
- VIDEO_POPUP_2_TEXT);
- elm_popup_orient_set(pDetailPopup->pPopup, ELM_POPUP_ORIENT_CENTER);
-}
-*/
+
static char *__vp_detail_genlist_text_get_cb(const void *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ Evas_Object * pObj,
+ const char *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
} else if (!strcmp(pPart, "elm.text.sub")) {
DetailView *pDetailPopup =
- (DetailView *) evas_object_data_get(pObj,
- VP_DETAIL_GENLIST_DATA_KEY);
+ (DetailView *) evas_object_data_get(pObj,
+ VP_DETAIL_GENLIST_DATA_KEY);
if (pDetailPopup == NULL) {
return NULL;
}
}
} else if (!strcmp(szTxt, VP_PLAY_STRING_DETAIL_LAST_MODIFIED)) {
if (pDetailInfo->szLastModified)
- return elm_entry_utf8_to_markup(pDetailInfo->
- szLastModified);
+ return
+ elm_entry_utf8_to_markup(pDetailInfo->szLastModified);
} else if (!strcmp(szTxt, VP_PLAY_STRING_DETAIL_RESOLUTION)) {
if (pDetailInfo->szResolution)
- return elm_entry_utf8_to_markup(pDetailInfo->
- szResolution);
+ return elm_entry_utf8_to_markup(pDetailInfo->szResolution);
} else if (!strcmp(szTxt, VP_PLAY_STRING_DETAIL_LOCATION)) {
if (pDetailInfo->szLocation) {
return elm_entry_utf8_to_markup(pDetailInfo->szLocation);
} else if (!strcmp(szTxt, VP_PLAY_STRING_DETAIL_LATITUDE)) {
if (pDetailInfo->szLatitude) {
if (atof(pDetailInfo->szLatitude) !=
- VP_DETAIL_VALUE_GPS_DEFAULT)
- return elm_entry_utf8_to_markup(pDetailInfo->
- szLatitude);
+ VP_DETAIL_VALUE_GPS_DEFAULT)
+ return
+ elm_entry_utf8_to_markup(pDetailInfo->szLatitude);
else {
return g_strdup(VP_PLAY_STRING_DETAIL_VALUE_UNKNOWN);
}
} else if (!strcmp(szTxt, VP_PLAY_STRING_DETAIL_LONGITUDE)) {
if (pDetailInfo->szLongitude) {
if (atof(pDetailInfo->szLongitude) !=
- VP_DETAIL_VALUE_GPS_DEFAULT)
- return elm_entry_utf8_to_markup(pDetailInfo->
- szLongitude);
+ VP_DETAIL_VALUE_GPS_DEFAULT)
+ return
+ elm_entry_utf8_to_markup(pDetailInfo->szLongitude);
else {
return g_strdup(VP_PLAY_STRING_DETAIL_VALUE_UNKNOWN);
}
return NULL;
}
-/*
-static void __vp_detail_popup_key_event_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
-{
- if (pUserData == NULL) {
- VideoLogError("pUserData is NULL");
- return;
- }
-
- DetailPopup *pDetailPopup = (DetailPopup *) pUserData;
-
- if (pDetailPopup->pCloseCb) {
- pDetailPopup->pCloseCb(-1, FALSE,
- (void *) pDetailPopup->pUserData);
- }
-}
-
-static void __vp_detail_popup_mouse_event_cb(void *pUserData,
- Evas *pEvas,
- Evas_Object *pObj,
- void *pEventInfo)
-{
- if (pUserData == NULL) {
- VideoLogError("pUserData is NULL");
- return;
- }
-
- if (pEventInfo == NULL) {
- VideoLogError("pEventInfo is NULL");
- return;
- }
-
- Evas_Event_Mouse_Up *ev = pEventInfo;
-
- if (ev->button == 3) {
- DetailPopup *pDetailPopup = (DetailPopup *) pUserData;
-
- if (pDetailPopup->pCloseCb) {
- pDetailPopup->pCloseCb(-1, FALSE,
- (void *) pDetailPopup->pUserData);
- }
- }
-}
-*/
/* internal functions */
static void _vp_detail_destroy_handle()
return;
}
evas_object_smart_callback_del(pDetailViewHandle->pGenList, "realized",
- __vp_detail_genlist_realized);
- /*
- evas_object_smart_callback_del(pDetailPopup->pParent,
- "rotation,changed",
- __vp_detail_popup_rotate_cb);
- */
+ __vp_detail_genlist_realized);
VP_EVAS_DEL(pDetailViewHandle->pGenList);
- /*VP_EVAS_DEL(pDetailPopup->pButton);
- VP_EVAS_DEL(pDetailPopup->pBox);*/
VP_FREE(pDetailViewHandle->pDetailInfo->szTitle);
VP_FREE(pDetailViewHandle->pDetailInfo->szDate);
pDetailViewHandle->st_Detail_Itc = NULL;
}
-/* VP_EVAS_DEL(pDetailPopup->pPopup);*/
-
VP_FREE(pDetailViewHandle);
}
-static Evas_Object *_vp_detail_create_genlist(Evas_Object *pParent)
+static Evas_Object *_vp_detail_create_genlist(Evas_Object * pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_genlist_add(pParent);
evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(pObj);
return pObj;
}
-static bool _vp_detail_add_genlist_item(Evas_Object *pObj,
- void *pUserData,
- int *added_item_cnt)
+static bool _vp_detail_add_genlist_item(Evas_Object * pObj,
+ void *pUserData,
+ int *added_item_cnt)
{
if (pObj == NULL) {
VideoLogError("pObj is NULL");
pDetailPopup->st_Detail_Itc->version = ELM_GENLIST_ITEM_CLASS_VERSION;
pDetailPopup->st_Detail_Itc->item_style = "type1";
pDetailPopup->st_Detail_Itc->func.text_get =
- (void *) __vp_detail_genlist_text_get_cb;
+ (void *) __vp_detail_genlist_text_get_cb;
pDetailPopup->st_Detail_Itc->func.content_get = NULL;
pDetailPopup->st_Detail_Itc->func.state_get = NULL;
pDetailPopup->st_Detail_Itc->func.del = NULL;
Elm_Object_Item *pItem = NULL;
pItem =
- elm_genlist_item_append(pObj, pDetailPopup->st_Detail_Itc,
- (void *) VP_PLAY_STRING_DETAIL_TITLE,
- NULL, ELM_GENLIST_ITEM_NONE, NULL,
- (void *) pDetailPopup);
+ elm_genlist_item_append(pObj, pDetailPopup->st_Detail_Itc,
+ (void *) VP_PLAY_STRING_DETAIL_TITLE,
+ NULL, ELM_GENLIST_ITEM_NONE, NULL,
+ (void *) pDetailPopup);
elm_genlist_item_select_mode_set(pItem,
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
item_cnt++;
pItem =
- elm_genlist_item_append(pObj, pDetailPopup->st_Detail_Itc,
- (void *) VP_PLAY_STRING_DETAIL_SIZE, NULL,
- ELM_GENLIST_ITEM_NONE, NULL,
- (void *) pDetailPopup);
+ elm_genlist_item_append(pObj, pDetailPopup->st_Detail_Itc,
+ (void *) VP_PLAY_STRING_DETAIL_SIZE, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL,
+ (void *) pDetailPopup);
elm_genlist_item_select_mode_set(pItem,
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
item_cnt++;
if (pDetailPopup->pDetailInfo->bPlayready == FALSE) {
pItem =
- elm_genlist_item_append(pObj, pDetailPopup->st_Detail_Itc,
- (void *) VP_PLAY_STRING_DETAIL_FORMAT,
- NULL, ELM_GENLIST_ITEM_NONE, NULL,
- (void *) pDetailPopup);
+ elm_genlist_item_append(pObj, pDetailPopup->st_Detail_Itc,
+ (void *) VP_PLAY_STRING_DETAIL_FORMAT,
+ NULL, ELM_GENLIST_ITEM_NONE, NULL,
+ (void *) pDetailPopup);
elm_genlist_item_select_mode_set(pItem,
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
item_cnt++;
}
- /*pItem = elm_genlist_item_append(pObj, pDetailPopup->st_Detail_Itc, (void *)VP_PLAY_STRING_DETAIL_DATE, NULL, ELM_GENLIST_ITEM_NONE, NULL, (void *)pDetailPopup);
- elm_genlist_item_select_mode_set(pItem, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
- item_cnt++; */
if (pDetailPopup->pDetailInfo->bPlayready == FALSE) {
pItem =
- elm_genlist_item_append(pObj, pDetailPopup->st_Detail_Itc,
- (void *)
- VP_PLAY_STRING_DETAIL_RESOLUTION,
- NULL, ELM_GENLIST_ITEM_NONE, NULL,
- (void *) pDetailPopup);
+ elm_genlist_item_append(pObj, pDetailPopup->st_Detail_Itc,
+ (void *)
+ VP_PLAY_STRING_DETAIL_RESOLUTION,
+ NULL, ELM_GENLIST_ITEM_NONE, NULL,
+ (void *) pDetailPopup);
elm_genlist_item_select_mode_set(pItem,
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
item_cnt++;
}
pItem =
- elm_genlist_item_append(pObj, pDetailPopup->st_Detail_Itc,
- (void *)
- VP_PLAY_STRING_DETAIL_LAST_MODIFIED, NULL,
- ELM_GENLIST_ITEM_NONE, NULL,
- (void *) pDetailPopup);
+ elm_genlist_item_append(pObj, pDetailPopup->st_Detail_Itc, (void *)
+ VP_PLAY_STRING_DETAIL_LAST_MODIFIED, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL,
+ (void *) pDetailPopup);
elm_genlist_item_select_mode_set(pItem,
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
item_cnt++;
if (pDetailPopup->pDetailInfo->bPlayready == FALSE) {
pItem =
- elm_genlist_item_append(pObj, pDetailPopup->st_Detail_Itc,
- (void *)
- VP_PLAY_STRING_DETAIL_LOCATION, NULL,
- ELM_GENLIST_ITEM_NONE, NULL,
- (void *) pDetailPopup);
+ elm_genlist_item_append(pObj, pDetailPopup->st_Detail_Itc,
+ (void *)
+ VP_PLAY_STRING_DETAIL_LOCATION, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL,
+ (void *) pDetailPopup);
elm_genlist_item_select_mode_set(pItem,
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
item_cnt++;
- /*pItem = elm_genlist_item_append(pObj, pDetailPopup->st_Detail_Itc, (void *)VP_PLAY_STRING_DETAIL_LATITUDE, NULL, ELM_GENLIST_ITEM_NONE, NULL, (void *)pDetailPopup);
- elm_genlist_item_select_mode_set(pItem, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
- item_cnt++;
-
- pItem = elm_genlist_item_append(pObj, pDetailPopup->st_Detail_Itc, (void *)VP_PLAY_STRING_DETAIL_LONGITUDE, NULL, ELM_GENLIST_ITEM_NONE, NULL, (void *)pDetailPopup);
- elm_genlist_item_select_mode_set(pItem, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
- item_cnt++; */
}
*added_item_cnt = item_cnt;
return TRUE;
}
-static Eina_Bool vp_detail_view_back_btn_cb(void *pUserData, Elm_Object_Item *pItem)
+static Eina_Bool vp_detail_view_back_btn_cb(void *pUserData,
+ Elm_Object_Item * pItem)
{
- if (!pDetailViewHandle)
- {
+ if (!pDetailViewHandle) {
VideoLogInfo("[ERR] pDetailViewHandle is NULL.");
return EINA_TRUE;
}
if (pDetailViewHandle->pCloseCb) {
pDetailViewHandle->pCloseCb(-1, FALSE,
- (void *) pDetailViewHandle->pUserData);
+ (void *) pDetailViewHandle->pUserData);
}
return EINA_TRUE;
}
-void __vp_detail_soft_back_button_cb(void *data, Evas_Object *obj, void *event_info)
+void __vp_detail_soft_back_button_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
VideoLogInfo(" ");
Evas_Object *pTopNaviFrame = NULL;
- pTopNaviFrame = elm_naviframe_item_pop(pDetailViewHandle->pNaviFrameHandle);
+ pTopNaviFrame =
+ elm_naviframe_item_pop(pDetailViewHandle->pNaviFrameHandle);
evas_object_del(pTopNaviFrame);
}
-detail_handle vp_detail_page_create(void *pNaviFrame, PopupCloseCbFunc pCloseCb,
- vp_detail_info *pDetailInfo)
+detail_handle vp_detail_page_create(void *pNaviFrame,
+ PopupCloseCbFunc pCloseCb,
+ vp_detail_info * pDetailInfo)
{
- if (!pNaviFrame)
- {
+ if (!pNaviFrame) {
VideoLogError("[ERR] No existed pNaviFrame.");
return NULL;
}
VideoLogInfo("");
- pDetailViewHandle = (DetailView*)calloc(1, sizeof(DetailView));
+ pDetailViewHandle = (DetailView *) calloc(1, sizeof(DetailView));
if (pDetailViewHandle == NULL) {
VideoLogError("pDetailViewHandle alloc fail");
return NULL;
_vp_detail_destroy_handle();
return NULL;
}
- VP_STRDUP(pDetailViewHandle->pDetailInfo->szTitle, pDetailInfo->szTitle);
+ VP_STRDUP(pDetailViewHandle->pDetailInfo->szTitle,
+ pDetailInfo->szTitle);
VP_STRDUP(pDetailViewHandle->pDetailInfo->szDate, pDetailInfo->szDate);
- VP_STRDUP(pDetailViewHandle->pDetailInfo->szFormat, pDetailInfo->szFormat);
+ VP_STRDUP(pDetailViewHandle->pDetailInfo->szFormat,
+ pDetailInfo->szFormat);
VP_STRDUP(pDetailViewHandle->pDetailInfo->szSize, pDetailInfo->szSize);
VP_STRDUP(pDetailViewHandle->pDetailInfo->szLastModified,
- pDetailInfo->szLastModified);
+ pDetailInfo->szLastModified);
VP_STRDUP(pDetailViewHandle->pDetailInfo->szResolution,
- pDetailInfo->szResolution);
+ pDetailInfo->szResolution);
VP_STRDUP(pDetailViewHandle->pDetailInfo->szLatitude,
- pDetailInfo->szLatitude);
+ pDetailInfo->szLatitude);
VP_STRDUP(pDetailViewHandle->pDetailInfo->szLongitude,
- pDetailInfo->szLongitude);
+ pDetailInfo->szLongitude);
pDetailViewHandle->pDetailInfo->szLocation =
- vp_util_convert_file_location(pDetailInfo->szLocation);
+ vp_util_convert_file_location(pDetailInfo->szLocation);
pDetailViewHandle->pDetailInfo->bDrm = pDetailInfo->bDrm;
- pDetailViewHandle->pDetailInfo->bForwardLock = pDetailInfo->bForwardLock;
+ pDetailViewHandle->pDetailInfo->bForwardLock =
+ pDetailInfo->bForwardLock;
pDetailViewHandle->pDetailInfo->bPlayready = pDetailInfo->bPlayready;
pDetailViewHandle->pNaviFrameHandle = pNaviFrame;
- pDetailViewHandle->BaseLayout = elm_layout_add(pDetailViewHandle->pNaviFrameHandle);
- elm_layout_theme_set(pDetailViewHandle->BaseLayout, VP_PLAY_CUSTOM_LAYOUT_KLASS,
- VP_PLAY_CUSTOM_LAYOUT_GROUP,
- VP_PLAY_DETAIL_LAYOUT_STYLE);
- evas_object_size_hint_weight_set(pDetailViewHandle->BaseLayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(pDetailViewHandle->BaseLayout, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
- Evas_Object * pLeftbtn = elm_button_add(pDetailViewHandle->pNaviFrameHandle);
+ pDetailViewHandle->BaseLayout =
+ elm_layout_add(pDetailViewHandle->pNaviFrameHandle);
+ elm_layout_theme_set(pDetailViewHandle->BaseLayout,
+ VP_PLAY_CUSTOM_LAYOUT_KLASS,
+ VP_PLAY_CUSTOM_LAYOUT_GROUP,
+ VP_PLAY_DETAIL_LAYOUT_STYLE);
+ evas_object_size_hint_weight_set(pDetailViewHandle->BaseLayout,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pDetailViewHandle->BaseLayout,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+ Evas_Object *pLeftbtn =
+ elm_button_add(pDetailViewHandle->pNaviFrameHandle);
elm_object_style_set(pLeftbtn, "naviframe/end_btn/default");
- evas_object_smart_callback_add(pLeftbtn, "clicked", __vp_detail_soft_back_button_cb, NULL);
-
- pDetailViewHandle->pNaviFrameItem = elm_naviframe_item_push(pDetailViewHandle->pNaviFrameHandle, (const char*)VP_PLAY_STRING_COM_DETAILS, pLeftbtn, NULL, pDetailViewHandle->BaseLayout, NULL);
- elm_naviframe_item_pop_cb_set(pDetailViewHandle->pNaviFrameItem, vp_detail_view_back_btn_cb, pDetailViewHandle);
+ evas_object_smart_callback_add(pLeftbtn, "clicked",
+ __vp_detail_soft_back_button_cb, NULL);
+
+ pDetailViewHandle->pNaviFrameItem =
+ elm_naviframe_item_push(pDetailViewHandle->pNaviFrameHandle,
+ (const char *) VP_PLAY_STRING_COM_DETAILS,
+ pLeftbtn, NULL,
+ pDetailViewHandle->BaseLayout, NULL);
+ elm_naviframe_item_pop_cb_set(pDetailViewHandle->pNaviFrameItem,
+ vp_detail_view_back_btn_cb,
+ pDetailViewHandle);
pDetailViewHandle->pParent = pDetailViewHandle->BaseLayout;
pDetailViewHandle->pCloseCb = pCloseCb;
pDetailViewHandle->pGenList =
- _vp_detail_create_genlist(pDetailViewHandle->pParent);
+ _vp_detail_create_genlist(pDetailViewHandle->pParent);
if (pDetailViewHandle->pGenList == NULL) {
VideoLogError("_vp_detail_create_genlist fail");
_vp_detail_destroy_handle();
}
evas_object_data_set(pDetailViewHandle->pGenList,
- VP_DETAIL_GENLIST_DATA_KEY,
- (void *) pDetailViewHandle);
+ VP_DETAIL_GENLIST_DATA_KEY,
+ (void *) pDetailViewHandle);
elm_genlist_mode_set(pDetailViewHandle->pGenList, ELM_LIST_COMPRESS);
int added_item_cnt = 0;
if (!_vp_detail_add_genlist_item
- (pDetailViewHandle->pGenList, (void *) pDetailViewHandle,
- &added_item_cnt)) {
+ (pDetailViewHandle->pGenList, (void *) pDetailViewHandle,
+ &added_item_cnt)) {
VideoLogError("_vp_detail_add_genlist_item fail");
_vp_detail_destroy_handle();
return NULL;
}
pDetailViewHandle->nListCount = added_item_cnt;
evas_object_smart_callback_add(pDetailViewHandle->pGenList, "realized",
- __vp_detail_genlist_realized, NULL);
+ __vp_detail_genlist_realized, NULL);
VideoLogInfo("item cnt = %d", added_item_cnt);
- elm_object_part_content_set(pDetailViewHandle->pParent, "elm.swallow.content", pDetailViewHandle->pGenList);
+ elm_object_part_content_set(pDetailViewHandle->pParent,
+ "elm.swallow.content",
+ pDetailViewHandle->pGenList);
return pDetailViewHandle;
}
/* external functions */
-/*
-detail_handle vp_detail_create(Evas_Object *pParent,
- PopupCloseCbFunc pCloseCb,
- vp_detail_info *pDetailInfo)
-{
- if (pParent == NULL) {
- VideoLogError("pParent is NULL");
- return NULL;
- }
-
- if (pDetailInfo == NULL) {
- VideoLogError("pDetailInfo is NULL");
- return NULL;
- }
- DetailPopup *pDetailPopup = NULL;
-
- pDetailPopup = calloc(1, sizeof(DetailPopup));
-
- if (pDetailPopup == NULL) {
- VideoLogError("pDetailPopup alloc fail");
- return NULL;
- }
-
- pDetailPopup->pDetailInfo = calloc(1, sizeof(vp_detail_info));
- if (pDetailPopup->pDetailInfo == NULL) {
- VideoLogError("pDetailPopup alloc fail");
- _vp_detail_destroy_handle(pDetailPopup);
- return NULL;
- }
- VP_STRDUP(pDetailPopup->pDetailInfo->szTitle, pDetailInfo->szTitle);
- VP_STRDUP(pDetailPopup->pDetailInfo->szDate, pDetailInfo->szDate);
- VP_STRDUP(pDetailPopup->pDetailInfo->szFormat, pDetailInfo->szFormat);
- VP_STRDUP(pDetailPopup->pDetailInfo->szSize, pDetailInfo->szSize);
- VP_STRDUP(pDetailPopup->pDetailInfo->szLastModified,
- pDetailInfo->szLastModified);
- VP_STRDUP(pDetailPopup->pDetailInfo->szResolution,
- pDetailInfo->szResolution);
- VP_STRDUP(pDetailPopup->pDetailInfo->szLatitude,
- pDetailInfo->szLatitude);
- VP_STRDUP(pDetailPopup->pDetailInfo->szLongitude,
- pDetailInfo->szLongitude);
- pDetailPopup->pDetailInfo->szLocation =
- vp_util_convert_file_location(pDetailInfo->szLocation);
-
- pDetailPopup->pDetailInfo->bDrm = pDetailInfo->bDrm;
- pDetailPopup->pDetailInfo->bForwardLock = pDetailInfo->bForwardLock;
- pDetailPopup->pDetailInfo->bPlayready = pDetailInfo->bPlayready;
-
-
- pDetailPopup->pParent = pParent;
- pDetailPopup->pCloseCb = pCloseCb;
-
- pDetailPopup->pPopup =
- vp_popup_create(pParent, POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
- VP_PLAY_STRING_COM_DETAILS, NULL, 0.0, NULL,
- __vp_detail_popup_key_event_cb,
- __vp_detail_popup_mouse_event_cb,
- (void *) pDetailPopup);
-
- if (pDetailPopup->pPopup == NULL) {
- VideoLogError("vp_popup_create fail");
- _vp_detail_destroy_handle(pDetailPopup);
- return NULL;
- }
- //elm_popup_content_text_wrap_type_set(pDetailPopup->pPopup, ELM_WRAP_MIXED);
- pDetailPopup->pGenList =
- _vp_detail_create_genlist(pDetailPopup->pPopup);
- if (pDetailPopup->pGenList == NULL) {
- VideoLogError("_vp_detail_create_genlist fail");
- _vp_detail_destroy_handle(pDetailPopup);
- return NULL;
- }
-
- evas_object_data_set(pDetailPopup->pGenList,
- VP_DETAIL_GENLIST_DATA_KEY,
- (void *) pDetailPopup);
- elm_genlist_mode_set(pDetailPopup->pGenList, ELM_LIST_COMPRESS);
-
- int added_item_cnt = 0;
- if (!_vp_detail_add_genlist_item
- (pDetailPopup->pGenList, (void *) pDetailPopup,
- &added_item_cnt)) {
- VideoLogError("_vp_detail_add_genlist_item fail");
- _vp_detail_destroy_handle(pDetailPopup);
- return NULL;
- }
- pDetailPopup->nListCount = added_item_cnt;
- evas_object_smart_callback_add(pDetailPopup->pGenList, "realized",
- __vp_detail_genlist_realized, NULL);
- evas_object_smart_callback_add(pDetailPopup->pParent,
- "rotation,changed",
- __vp_detail_popup_rotate_cb,
- pDetailPopup);
-
- pDetailPopup->pBox = elm_box_add(pDetailPopup->pPopup);
-
- VideoLogInfo("item cnt = %d", added_item_cnt);
-
- vp_popup_set_popup_min_size(pDetailPopup->pParent, pDetailPopup->pBox,
- pDetailPopup->nListCount,
- VIDEO_POPUP_2_TEXT);
- elm_popup_orient_set(pDetailPopup->pPopup, ELM_POPUP_ORIENT_CENTER);
- elm_box_pack_end(pDetailPopup->pBox, pDetailPopup->pGenList);
-
- elm_object_content_set(pDetailPopup->pPopup, pDetailPopup->pBox);
-
- return pDetailPopup;
-}
-*/
void vp_detail_destroy(detail_handle pDetailHandle)
{
VideoLogError("vp_detail_destroy called");
return;
}
- if(pDetailViewHandle->pGenList) {
+ if (pDetailViewHandle->pGenList) {
evas_object_del(pDetailViewHandle->pGenList);
}
- if(pDetailViewHandle->BaseLayout) {
+ if (pDetailViewHandle->BaseLayout) {
evas_object_del(pDetailViewHandle->BaseLayout);
}
Evas_Object *pTopNaviFrame = NULL;
- pTopNaviFrame = elm_naviframe_item_pop(pDetailViewHandle->pNaviFrameHandle);
+ pTopNaviFrame =
+ elm_naviframe_item_pop(pDetailViewHandle->pNaviFrameHandle);
evas_object_del(pTopNaviFrame);
_vp_detail_destroy_handle();
}
-/*
-bool vp_detail_realize(detail_handle pDetailHandle)
-{
- if (pDetailHandle == NULL) {
- VideoLogError("pDetailHandle is NULL");
- return FALSE;
- }
-
- DetailPopup *pDetailPopup = (DetailPopup *) pDetailHandle;
- evas_object_show(pDetailPopup->pPopup);
-
- return TRUE;
-}
-
-bool vp_detail_unrealize(detail_handle pDetailHandle)
-{
- if (pDetailHandle == NULL) {
- VideoLogError("pDetailHandle is NULL");
- return FALSE;
- }
-
- DetailPopup *pDetailPopup = (DetailPopup *) pDetailHandle;
-
- evas_object_hide(pDetailPopup->pPopup);
-
- return TRUE;
-}
-*/
bool vp_detail_set_user_data(detail_handle pDetailHandle, void *pUserData)
{
if (pDetailHandle == 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
#include "vp-play-string-define.h"
static void _vp_play_speed_popup_destroy_handle(PlaySpeedPopup *
- pPlaySpeedPopup);
-static void _vp_play_speed_update_text(PlaySpeedPopup *pPlaySpeedPopup);
+ pPlaySpeedPopup);
+static void _vp_play_speed_update_text(PlaySpeedPopup * pPlaySpeedPopup);
/* callback functions */
static void __vp_play_speed_popup_ok_btn_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pPlaySpeedPopup->pDoneCb) {
pPlaySpeedPopup->pDoneCb(pPlaySpeedPopup->fSpeedVal, TRUE,
- (void *) pPlaySpeedPopup->pUserData);
+ (void *) pPlaySpeedPopup->pUserData);
}
}
static void __vp_play_speed_popup_cancel_btn_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pPlaySpeedPopup->pDoneCb) {
pPlaySpeedPopup->pDoneCb(pPlaySpeedPopup->fSpeedVal, FALSE,
- (void *) pPlaySpeedPopup->pUserData);
+ (void *) pPlaySpeedPopup->pUserData);
}
}
static void __vp_play_speed_popup_key_event_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
PlaySpeedPopup *pPlaySpeedPopup = (PlaySpeedPopup *) pUserData;
if (pPlaySpeedPopup->pDoneCb) {
pPlaySpeedPopup->pDoneCb(pPlaySpeedPopup->fSpeedVal, FALSE,
- (void *) pPlaySpeedPopup->pUserData);
+ (void *) pPlaySpeedPopup->pUserData);
}
}
static void __vp_play_speed_popup_mouse_event_cb(void *pUserData,
- Evas *pEvas,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas * pEvas,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
PlaySpeedPopup *pPlaySpeedPopup = (PlaySpeedPopup *) pUserData;
if (pPlaySpeedPopup->pDoneCb) {
pPlaySpeedPopup->pDoneCb(pPlaySpeedPopup->fSpeedVal, FALSE,
- (void *) pPlaySpeedPopup->pUserData);
+ (void *) pPlaySpeedPopup->pUserData);
}
}
}
static void __vp_play_speed_popup_slider_change_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pPlaySpeedPopup->pUpdateCb) {
pPlaySpeedPopup->fSpeedVal = fValue;
pPlaySpeedPopup->pUpdateCb(pPlaySpeedPopup->fSpeedVal,
- (void *) pPlaySpeedPopup->
- pUserData);
+ (void *)
+ pPlaySpeedPopup->pUserData);
_vp_play_speed_update_text(pPlaySpeedPopup);
}
}
double realValue = atof(szValue);
if (pPlaySpeedPopup->fSpeedVal != realValue) {
- elm_slider_value_set(pPlaySpeedPopup->pSlider,
- (double) realValue);
+ elm_slider_value_set(pPlaySpeedPopup->pSlider, (double) realValue);
pPlaySpeedPopup->fSpeedVal = realValue;
}
}
static void __vp_play_speed_btn_clicked_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEvent)
+ Evas_Object * pObj,
+ void *pEvent)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pPlaySpeedPopup->pUpdateCb) {
pPlaySpeedPopup->fSpeedVal = fValue;
pPlaySpeedPopup->pUpdateCb(pPlaySpeedPopup->fSpeedVal,
- (void *) pPlaySpeedPopup->
- pUserData);
+ (void *)
+ pPlaySpeedPopup->pUserData);
_vp_play_speed_update_text(pPlaySpeedPopup);
}
}
if (pPlaySpeedPopup->pUpdateCb) {
pPlaySpeedPopup->fSpeedVal = fValue;
pPlaySpeedPopup->pUpdateCb(pPlaySpeedPopup->fSpeedVal,
- (void *) pPlaySpeedPopup->
- pUserData);
+ (void *)
+ pPlaySpeedPopup->pUserData);
_vp_play_speed_update_text(pPlaySpeedPopup);
}
}
/* internal functions */
static void _vp_play_speed_popup_destroy_handle(PlaySpeedPopup *
- pPlaySpeedPopup)
+ pPlaySpeedPopup)
{
if (pPlaySpeedPopup == NULL) {
VideoLogError("pPlaySpeedPopup is NULL");
VP_FREE(pPlaySpeedPopup);
}
-static void _vp_play_speed_update_text(PlaySpeedPopup *pPlaySpeedPopup)
+static void _vp_play_speed_update_text(PlaySpeedPopup * pPlaySpeedPopup)
{
if (pPlaySpeedPopup == NULL) {
VideoLogError("pPlaySpeedPopup is NULL");
snprintf(szValue, 6, "%0.1f X", (double) pPlaySpeedPopup->fSpeedVal);
elm_object_part_text_set(pPlaySpeedPopup->pLayout, "elm.text.title",
- szValue);
+ szValue);
}
static Evas_Object *_vp_play_speed_popup_create_ok_button(Evas_Object *
- pParent,
- void *pUserData)
+ pParent,
+ void *pUserData)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_button_add(pParent);
elm_object_style_set(pObj, "popup_button/default");
elm_object_domain_translatable_text_set(pObj, VP_SYS_STR_PREFIX,
- VP_PLAY_STRING_COM_DONE);
+ VP_PLAY_STRING_COM_DONE);
elm_object_part_content_set(pParent, "button2", pObj);
evas_object_smart_callback_add(pObj, "clicked",
- __vp_play_speed_popup_ok_btn_cb,
- pUserData);
+ __vp_play_speed_popup_ok_btn_cb,
+ pUserData);
evas_object_show(pObj);
return pObj;
static Evas_Object *_vp_play_speed_popup_create_cancel_button(Evas_Object
- * pParent,
- void
- *pUserData)
+ *pParent,
+ void
+ *pUserData)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_button_add(pParent);
elm_object_style_set(pObj, "popup_button/default");
elm_object_domain_translatable_text_set(pObj, VP_SYS_STR_PREFIX,
- VP_PLAY_STRING_COM_CANCEL);
+ VP_PLAY_STRING_COM_CANCEL);
elm_object_part_content_set(pParent, "button1", pObj);
evas_object_smart_callback_add(pObj, "clicked",
- __vp_play_speed_popup_cancel_btn_cb,
- pUserData);
+ __vp_play_speed_popup_cancel_btn_cb,
+ pUserData);
evas_object_show(pObj);
return pObj;
}
static Evas_Object *_vp_play_speed_popup_create_slider(Evas_Object *
- pParent,
- void *pUserData)
+ pParent,
+ void *pUserData)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, 0.5);
elm_slider_min_max_set(pObj, VP_PLAY_SPEED_MIN_VALUE,
- VP_PLAY_SPEED_MAX_VALUE);
+ VP_PLAY_SPEED_MAX_VALUE);
evas_object_smart_callback_add(pObj, "changed",
- __vp_play_speed_popup_slider_change_cb,
- pUserData);
+ __vp_play_speed_popup_slider_change_cb,
+ pUserData);
return pObj;
}
-static bool _vp_play_speed_popup_create_button(Evas_Object *pParent,
- void *pUserData)
+static bool _vp_play_speed_popup_create_button(Evas_Object * pParent,
+ void *pUserData)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
return FALSE;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_RESROUCE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_RESROUCE_EDJ_PATH);
free(path);
PlaySpeedPopup *pPlaySpeedPopup = (PlaySpeedPopup *) pUserData;
pPlaySpeedPopup->pDelButton =
- vp_button_create(pParent, "custom/flat_63_78/default",
- NULL,
- (Evas_Smart_Cb) __vp_play_speed_btn_clicked_cb,
- (Evas_Smart_Cb) NULL, (Evas_Smart_Cb) NULL,
- (void *) pPlaySpeedPopup);
+ vp_button_create(pParent, "custom/flat_63_78/default",
+ NULL,
+ (Evas_Smart_Cb) __vp_play_speed_btn_clicked_cb,
+ (Evas_Smart_Cb) NULL, (Evas_Smart_Cb) NULL,
+ (void *) pPlaySpeedPopup);
pPlaySpeedPopup->pAddButton =
- vp_button_create(pParent, "custom/flat_63_78/default",
- NULL,
- (Evas_Smart_Cb) __vp_play_speed_btn_clicked_cb,
- (Evas_Smart_Cb) NULL, (Evas_Smart_Cb) NULL,
- (void *) pPlaySpeedPopup);
+ vp_button_create(pParent, "custom/flat_63_78/default",
+ NULL,
+ (Evas_Smart_Cb) __vp_play_speed_btn_clicked_cb,
+ (Evas_Smart_Cb) NULL, (Evas_Smart_Cb) NULL,
+ (void *) pPlaySpeedPopup);
Evas_Object *pIcon = NULL;
pIcon =
- vp_button_create_icon(pPlaySpeedPopup->pDelButton,
- edj_path,
- VP_PLAY_RES_BUTTON_DEL);
+ vp_button_create_icon(pPlaySpeedPopup->pDelButton,
+ edj_path, VP_PLAY_RES_BUTTON_DEL);
elm_object_part_content_set(pPlaySpeedPopup->pDelButton,
- VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
pIcon =
- vp_button_create_icon(pPlaySpeedPopup->pDelButton,
- edj_path,
- VP_PLAY_RES_BUTTON_DEL_PRESS);
+ vp_button_create_icon(pPlaySpeedPopup->pDelButton,
+ edj_path, VP_PLAY_RES_BUTTON_DEL_PRESS);
elm_object_part_content_set(pPlaySpeedPopup->pDelButton,
- VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
pIcon =
- vp_button_create_icon(pPlaySpeedPopup->pDelButton,
- edj_path,
- VP_PLAY_RES_BUTTON_DEL);
+ vp_button_create_icon(pPlaySpeedPopup->pDelButton,
+ edj_path, VP_PLAY_RES_BUTTON_DEL);
elm_object_part_content_set(pPlaySpeedPopup->pDelButton,
- VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
pIcon =
- vp_button_create_icon(pPlaySpeedPopup->pAddButton,
- edj_path,
- VP_PLAY_RES_BUTTON_ADD);
+ vp_button_create_icon(pPlaySpeedPopup->pAddButton,
+ edj_path, VP_PLAY_RES_BUTTON_ADD);
elm_object_part_content_set(pPlaySpeedPopup->pAddButton,
- VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
pIcon =
- vp_button_create_icon(pPlaySpeedPopup->pAddButton,
- edj_path,
- VP_PLAY_RES_BUTTON_ADD_PRESS);
+ vp_button_create_icon(pPlaySpeedPopup->pAddButton,
+ edj_path, VP_PLAY_RES_BUTTON_ADD_PRESS);
elm_object_part_content_set(pPlaySpeedPopup->pAddButton,
- VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
pIcon =
- vp_button_create_icon(pPlaySpeedPopup->pAddButton,
- edj_path,
- VP_PLAY_RES_BUTTON_ADD);
+ vp_button_create_icon(pPlaySpeedPopup->pAddButton,
+ edj_path, VP_PLAY_RES_BUTTON_ADD);
elm_object_part_content_set(pPlaySpeedPopup->pAddButton,
- VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
elm_object_part_content_set(pParent, "elm.swallow.icon.1",
- pPlaySpeedPopup->pDelButton);
+ pPlaySpeedPopup->pDelButton);
elm_object_part_content_set(pParent, "elm.swallow.icon.2",
- pPlaySpeedPopup->pAddButton);
+ pPlaySpeedPopup->pAddButton);
return TRUE;
}
static Evas_Object *_vp_play_speed_popup_create_layout(Evas_Object *
- pParent)
+ pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
VideoLogError("pLayout object is NULL");
return NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_SPEED_POPUP_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_SPEED_POPUP_EDJ);
free(path);
elm_layout_file_set(pLayout, edj_path,
- VP_PLAY_EDJ_GROUP_PLAY_SPEED_POPUP);
+ VP_PLAY_EDJ_GROUP_PLAY_SPEED_POPUP);
evas_object_size_hint_weight_set(pLayout, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pLayout, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_show(pLayout);
/* external functions */
-play_speed_popup vp_play_speed_popup_create(Evas_Object *pParent,
- double fSpeedVal,
- PlaySpeedUpdateCbFunc
- pUpdateCb,
- PlaySpeedDoneCbFunc pDoneCb)
+play_speed_popup vp_play_speed_popup_create(Evas_Object * pParent,
+ double fSpeedVal,
+ PlaySpeedUpdateCbFunc
+ pUpdateCb,
+ PlaySpeedDoneCbFunc pDoneCb)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pPlaySpeedPopup->fSpeedVal = fSpeedVal;
pPlaySpeedPopup->pPopup =
- vp_popup_create(pParent, POPUP_STYLE_EXPAND_WITH_CANCEL_BTN,
- VP_PLAY_STRING_POPUP_PLAY_SPEED, NULL, 0.0, NULL,
- __vp_play_speed_popup_key_event_cb,
- __vp_play_speed_popup_mouse_event_cb,
- (void *) pPlaySpeedPopup);
+ vp_popup_create(pParent, POPUP_STYLE_EXPAND_WITH_CANCEL_BTN,
+ VP_PLAY_STRING_POPUP_PLAY_SPEED, NULL, 0.0, NULL,
+ __vp_play_speed_popup_key_event_cb,
+ __vp_play_speed_popup_mouse_event_cb,
+ (void *) pPlaySpeedPopup);
if (pPlaySpeedPopup->pPopup == NULL) {
VideoLogError("vp_popup_create fail");
}
pPlaySpeedPopup->pCancelButton =
- _vp_play_speed_popup_create_cancel_button(pPlaySpeedPopup->pPopup,
- (void *)
- pPlaySpeedPopup);
+ _vp_play_speed_popup_create_cancel_button(pPlaySpeedPopup->pPopup,
+ (void *)
+ pPlaySpeedPopup);
if (pPlaySpeedPopup->pCancelButton == NULL) {
VideoLogError("_vp_play_speed_popup_create_cancel_button fail");
_vp_play_speed_popup_destroy_handle(pPlaySpeedPopup);
}
pPlaySpeedPopup->pOkButton =
- _vp_play_speed_popup_create_ok_button(pPlaySpeedPopup->pPopup,
- (void *) pPlaySpeedPopup);
+ _vp_play_speed_popup_create_ok_button(pPlaySpeedPopup->pPopup,
+ (void *) pPlaySpeedPopup);
if (pPlaySpeedPopup->pOkButton == NULL) {
VideoLogError("_vp_play_speed_popup_create_ok_button fail");
_vp_play_speed_popup_destroy_handle(pPlaySpeedPopup);
}
pPlaySpeedPopup->pLayout =
- _vp_play_speed_popup_create_layout(pPlaySpeedPopup->pPopup);
+ _vp_play_speed_popup_create_layout(pPlaySpeedPopup->pPopup);
if (pPlaySpeedPopup->pLayout == NULL) {
VideoLogError("_vp_play_speed_popup_create_layout fail");
_vp_play_speed_popup_destroy_handle(pPlaySpeedPopup);
}
pPlaySpeedPopup->pSlider =
- _vp_play_speed_popup_create_slider(pPlaySpeedPopup->pLayout,
- pPlaySpeedPopup);
+ _vp_play_speed_popup_create_slider(pPlaySpeedPopup->pLayout,
+ pPlaySpeedPopup);
if (pPlaySpeedPopup->pSlider == NULL) {
VideoLogError("_vp_play_speed_popup_create_slider fail");
_vp_play_speed_popup_destroy_handle(pPlaySpeedPopup);
}
_vp_play_speed_popup_create_button(pPlaySpeedPopup->pLayout,
- pPlaySpeedPopup);
+ pPlaySpeedPopup);
elm_slider_value_set(pPlaySpeedPopup->pSlider,
- (double) pPlaySpeedPopup->fSpeedVal);
+ (double) pPlaySpeedPopup->fSpeedVal);
_vp_play_speed_update_text(pPlaySpeedPopup);
elm_object_part_content_set(pPlaySpeedPopup->pLayout,
- "elm.swallow.content",
- pPlaySpeedPopup->pSlider);
+ "elm.swallow.content",
+ pPlaySpeedPopup->pSlider);
elm_object_content_set(pPlaySpeedPopup->pPopup,
- pPlaySpeedPopup->pLayout);
+ pPlaySpeedPopup->pLayout);
evas_object_show(pPlaySpeedPopup->pLayout);
-// elm_popup_orient_set(pPlaySpeedPopup->pPopup, ELM_POPUP_ORIENT_BOTTOM);
-
return pPlaySpeedPopup;
}
bool vp_play_speed_popup_set_user_data(play_speed_popup pPlaySpeedHandle,
- void *pUserData)
+ void *pUserData)
{
if (pPlaySpeedHandle == NULL) {
VideoLogError("pPlaySpeedHandle is 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-play-string-define.h"
#include "vp-play-value-define.h"
#include "vp-play-type-define.h"
-static void _vp_repeat_destroy_handle(RepeatPopup *pRepeat);
+static void _vp_repeat_destroy_handle(RepeatPopup * pRepeat);
static void __vp_repeat_genlist_item_selected_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo);
+ Evas_Object * pObject,
+ void *pEventInfo);
-static void __vp_repeat_genlist_realized(void *data, Evas_Object *obj,
- void *event_info)
+static void __vp_repeat_genlist_realized(void *data, Evas_Object * obj,
+ void *event_info)
{
VP_GENLIST_HIDE_BOTTOMLINE(data, obj, event_info);
}
-static void __vp_repeat_popup_rotate_cb(void *data, Evas_Object *obj,
- void *event_info)
+static void __vp_repeat_popup_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
RepeatPopup *pRepeat = (RepeatPopup *) data;
if (!pRepeat) {
return;
}
vp_popup_set_popup_min_size(pRepeat->pParent, pRepeat->pBox,
- pRepeat->nListCount, VIDEO_POPUP_DEFAULT);
+ pRepeat->nListCount, VIDEO_POPUP_DEFAULT);
}
/* callback functions */
static char *__vp_repeat_genlist_text_get_cb(const void *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ Evas_Object * pObj,
+ const char *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
static Evas_Object *__vp_repeat_genlist_content_get_cb(const void
- *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ *pUserData,
+ Evas_Object * pObj,
+ const char *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (!strcmp(pPart, "elm.icon.right")) {
Evas_Object *pRadioObj = NULL;
- RepeatPopup *pRepeat =
- (RepeatPopup *) evas_object_data_get(pObj,
- VP_REPEAT_GENLIST_DATA_KEY);
+ RepeatPopup *pRepeat = (RepeatPopup *) evas_object_data_get(pObj,
+ VP_REPEAT_GENLIST_DATA_KEY);
if (pRepeat == NULL) {
VideoLogWarning("evas_object_data_get is fail");
return NULL;
elm_radio_group_add(pRadioObj, pRepeat->pRadio);
elm_radio_value_set(pRepeat->pRadio, pRepeat->repeatMode);
evas_object_smart_callback_add(pRadioObj, "changed",
- __vp_repeat_genlist_item_selected_cb,
- pRepeat);
+ __vp_repeat_genlist_item_selected_cb,
+ pRepeat);
evas_object_show(pRadioObj);
return pRadioObj;
}
static void __vp_repeat_genlist_item_selected_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Elm_Object_Item *pItem = (Elm_Object_Item *) pEventInfo;
Elm_Object_Item *pSelectedItem =
- elm_genlist_selected_item_get(pObject);
+ elm_genlist_selected_item_get(pObject);
if (pSelectedItem) {
elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
}
pRepeat->repeatMode = nType;
VideoLogInfo("repeatMode=%d", pRepeat->repeatMode);
if (pRepeat->pCloseCb) {
- pRepeat->pCloseCb((int) nType, FALSE,
- (void *) pRepeat->pUserData);
+ pRepeat->pCloseCb((int) nType, FALSE, (void *) pRepeat->pUserData);
}
}
static void __vp_repeat_popup_key_event_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pRepeat->pCloseCb) {
pRepeat->pCloseCb(VIDEO_PLAY_REPEAT_NONE, FALSE,
- (void *) pRepeat->pUserData);
+ (void *) pRepeat->pUserData);
}
}
static void __vp_repeat_popup_mouse_event_cb(void *pUserData,
- Evas *pEvas,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas * pEvas,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pRepeat->pCloseCb) {
pRepeat->pCloseCb(VIDEO_PLAY_REPEAT_NONE, FALSE,
- (void *) pRepeat->pUserData);
+ (void *) pRepeat->pUserData);
}
}
}
/* internal functions */
-static void _vp_repeat_destroy_handle(RepeatPopup *pRepeat)
+static void _vp_repeat_destroy_handle(RepeatPopup * pRepeat)
{
if (pRepeat == NULL) {
VideoLogError("pRepeat is NULL");
return;
}
evas_object_smart_callback_del(pRepeat->pGenList, "realized",
- __vp_repeat_genlist_realized);
+ __vp_repeat_genlist_realized);
evas_object_smart_callback_del(pRepeat->pParent, "rotation,changed",
- __vp_repeat_popup_rotate_cb);
+ __vp_repeat_popup_rotate_cb);
VP_EVAS_DEL(pRepeat->pRadio);
VP_FREE(pRepeat);
}
-static Evas_Object *_vp_repeat_create_genlist(Evas_Object *pParent)
+static Evas_Object *_vp_repeat_create_genlist(Evas_Object * pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_genlist_add(pParent);
evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(pObj);
return pObj;
}
-static bool _vp_repeat_add_genlist_item(Evas_Object *pObj,
- void *pUserData)
+static bool _vp_repeat_add_genlist_item(Evas_Object * pObj,
+ void *pUserData)
{
if (pObj == NULL) {
VideoLogError("pObj is NULL");
pRepeat->st_Repeat_Itc->version = ELM_GENLIST_ITEM_CLASS_VERSION;
pRepeat->st_Repeat_Itc->item_style = "1line";
pRepeat->st_Repeat_Itc->func.text_get =
- (void *) __vp_repeat_genlist_text_get_cb;
+ (void *) __vp_repeat_genlist_text_get_cb;
pRepeat->st_Repeat_Itc->func.content_get =
- (void *) __vp_repeat_genlist_content_get_cb;
+ (void *) __vp_repeat_genlist_content_get_cb;
pRepeat->st_Repeat_Itc->func.state_get = NULL;
pRepeat->st_Repeat_Itc->func.del = NULL;
pRepeat->nListCount = 0;
elm_genlist_item_append(pObj, pRepeat->st_Repeat_Itc,
- (void *) VP_PLAY_STRING_REPEAT_OFF, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_repeat_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_REPEAT_OFF, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_repeat_genlist_item_selected_cb,
+ pUserData);
pRepeat->nListCount++;
elm_genlist_item_append(pObj, pRepeat->st_Repeat_Itc,
- (void *) VP_PLAY_STRING_REPEAT_ALL_OFF, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_repeat_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_REPEAT_ALL_OFF,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_repeat_genlist_item_selected_cb,
+ pUserData);
pRepeat->nListCount++;
elm_genlist_item_append(pObj, pRepeat->st_Repeat_Itc,
- (void *) VP_PLAY_STRING_REPEAT_ONE, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_repeat_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_REPEAT_ONE, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_repeat_genlist_item_selected_cb,
+ pUserData);
pRepeat->nListCount++;
elm_genlist_item_append(pObj, pRepeat->st_Repeat_Itc,
- (void *) VP_PLAY_STRING_REPEAT_ALL, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_repeat_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_REPEAT_ALL, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_repeat_genlist_item_selected_cb,
+ pUserData);
pRepeat->nListCount++;
}
}
/* external functions */
-repeat_handle vp_repeat_create(Evas_Object *pParent, char *pMediaUrl,
- PopupCloseCbFunc pCloseCb)
+repeat_handle vp_repeat_create(Evas_Object * pParent, char *pMediaUrl,
+ PopupCloseCbFunc pCloseCb)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
VP_STRDUP(pRepeat->pMediUrl, pMediaUrl);
pRepeat->pPopup =
- vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
- VP_PLAY_STRING_POPUP_REPEAT_SETTING, NULL, 0.0,
- NULL, __vp_repeat_popup_key_event_cb,
- __vp_repeat_popup_mouse_event_cb,
- (void *) pRepeat);
+ vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
+ VP_PLAY_STRING_POPUP_REPEAT_SETTING, NULL, 0.0,
+ NULL, __vp_repeat_popup_key_event_cb,
+ __vp_repeat_popup_mouse_event_cb,
+ (void *) pRepeat);
if (pRepeat->pPopup == NULL) {
VideoLogError("vp_popup_create fail");
return NULL;
}
evas_object_data_set(pRepeat->pGenList, VP_REPEAT_GENLIST_DATA_KEY,
- (void *) pRepeat);
+ (void *) pRepeat);
pRepeat->pRadio = elm_radio_add(pRepeat->pGenList);
return NULL;
}
evas_object_smart_callback_add(pRepeat->pGenList, "realized",
- __vp_repeat_genlist_realized, NULL);
+ __vp_repeat_genlist_realized, NULL);
evas_object_smart_callback_add(pRepeat->pParent, "rotation,changed",
- __vp_repeat_popup_rotate_cb, pRepeat);
+ __vp_repeat_popup_rotate_cb, pRepeat);
int nType = 0;
vp_play_preference_get_repeat_mode_key(&nType);
- //elm_radio_value_set(pRepeat->pRadio, nType);
pRepeat->repeatMode = nType;
pRepeat->pBox = elm_box_add(pRepeat->pPopup);
vp_popup_set_popup_min_size(pRepeat->pParent, pRepeat->pBox,
- pRepeat->nListCount, VIDEO_POPUP_DEFAULT);
+ pRepeat->nListCount, VIDEO_POPUP_DEFAULT);
elm_box_pack_end(pRepeat->pBox, pRepeat->pGenList);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
} SettingPopup;
-static void _vp_setting_destroy_handle(SettingPopup *pSetting);
-static void __vp_setting_genlist_realized(void *data, Evas_Object *obj,
- void *event_info);
-static void __vp_setting_popup_rotate_cb(void *data, Evas_Object *obj,
- void *event_info);
+static void _vp_setting_destroy_handle(SettingPopup * pSetting);
+static void __vp_setting_genlist_realized(void *data, Evas_Object * obj,
+ void *event_info);
+static void __vp_setting_popup_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info);
/* callback functions */
static char *__vp_setting_genlist_text_get_cb(const void *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ Evas_Object * pObj,
+ const char *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
return NULL;
}
- char *szTxt = (char *)pUserData;
+ char *szTxt = (char *) pUserData;
if (!strcmp(pPart, "elm.text.1")) {
return strdup(szTxt);
} else if (!strcmp(pPart, "elm.text.2")) {
SettingPopup *pSetting =
- (SettingPopup *) evas_object_data_get(pObj,
- VP_SETTING_GENLIST_DATA_KEY);
+ (SettingPopup *) evas_object_data_get(pObj,
+ VP_SETTING_GENLIST_DATA_KEY);
if (pSetting == NULL) {
return NULL;
}
if (pSettingInfo->nRepeatMode == VIDEO_PLAY_REPEAT_OFF) {
return strdup(VP_PLAY_STRING_REPEAT_OFF);
} else if (pSettingInfo->nRepeatMode ==
- VIDEO_PLAY_REPEAT_ALL_STOP) {
+ VIDEO_PLAY_REPEAT_ALL_STOP) {
return strdup(VP_PLAY_STRING_REPEAT_ALL_OFF);
} else if (pSettingInfo->nRepeatMode == VIDEO_PLAY_REPEAT_ONE) {
return strdup(VP_PLAY_STRING_REPEAT_ONE);
}
static void __vp_setting_genlist_item_selected_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
Elm_Object_Item *pItem = (Elm_Object_Item *) pEventInfo;
- char *szTxt = (char *)elm_object_item_data_get(pItem);
+ char *szTxt = (char *) elm_object_item_data_get(pItem);
SettingPopup *pSetting = (SettingPopup *) pUserData;
}
if (pSetting->pCloseCb) {
- pSetting->pCloseCb((int)nMode, bPause, (void *)pSetting->pUserData);
+ pSetting->pCloseCb((int) nMode, bPause,
+ (void *) pSetting->pUserData);
}
}
static void __vp_setting_popup_key_event_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pSetting->pCloseCb) {
pSetting->pCloseCb(VP_SETTING_MODE_NONE, FALSE,
- (void *) pSetting->pUserData);
+ (void *) pSetting->pUserData);
}
}
static void __vp_setting_popup_mouse_event_cb(void *pUserData,
- Evas *pEvas,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas * pEvas,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pSetting->pCloseCb) {
pSetting->pCloseCb(VP_SETTING_MODE_NONE, FALSE,
- (void *) pSetting->pUserData);
+ (void *) pSetting->pUserData);
}
}
}
/* internal functions */
-static void _vp_setting_destroy_handle(SettingPopup *pSetting)
+static void _vp_setting_destroy_handle(SettingPopup * pSetting)
{
if (pSetting == NULL) {
VideoLogError("pSetting is NULL");
return;
}
evas_object_smart_callback_del(pSetting->pGenList, "realized",
- __vp_setting_genlist_realized);
+ __vp_setting_genlist_realized);
evas_object_smart_callback_del(pSetting->pParent, "rotation,changed",
- __vp_setting_popup_rotate_cb);
+ __vp_setting_popup_rotate_cb);
VP_EVAS_DEL(pSetting->pGenList);
VP_FREE(pSetting);
}
-static Evas_Object *_vp_setting_create_genlist(Evas_Object *pParent)
+static Evas_Object *_vp_setting_create_genlist(Evas_Object * pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_genlist_add(pParent);
evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(pObj);
return pObj;
}
-static bool _vp_setting_add_genlist_item(Evas_Object *pObj,
- void *pUserData)
+static bool _vp_setting_add_genlist_item(Evas_Object * pObj,
+ void *pUserData)
{
if (pObj == NULL) {
VideoLogError("pObj is NULL");
SettingPopup *pSetting = (SettingPopup *) pUserData;
bool bStreaming = FALSE;
-// bool bRepeat = FALSE;
bool bDrm = FALSE;
bool bExternalVideoMode = FALSE;
bool bShowEditWeather = FALSE;
if (pSetting->pSettingInfo) {
bStreaming = pSetting->pSettingInfo->bStreaming;
-// bRepeat = pSetting->pSettingInfo->bRepeat;
bDrm = pSetting->pSettingInfo->bDrm;
bExternalVideoMode = pSetting->pSettingInfo->bExternalMode;
bShowEditWeather = pSetting->pSettingInfo->bShowEditWeather;
pSetting->st_Setting_Itc->version = ELM_GENLIST_ITEM_CLASS_VERSION;
pSetting->st_Setting_Itc->item_style = "2text.2/popup";
pSetting->st_Setting_Itc->func.text_get =
- (void *) __vp_setting_genlist_text_get_cb;
+ (void *) __vp_setting_genlist_text_get_cb;
pSetting->st_Setting_Itc->func.content_get = NULL;
pSetting->st_Setting_Itc->func.state_get = NULL;
pSetting->st_Setting_Itc->func.del = NULL;
if (bStreaming == FALSE) {
elm_genlist_item_append(pObj, pSetting->st_Setting_Itc,
- (void *) VP_PLAY_STRING_POPUP_PLAY_SPEED,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_setting_genlist_item_selected_cb,
- (void *) pSetting);
+ (void *) VP_PLAY_STRING_POPUP_PLAY_SPEED,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_setting_genlist_item_selected_cb,
+ (void *) pSetting);
pSetting->nAppendItemCnt++;
}
elm_genlist_item_append(pObj, pSetting->st_Setting_Itc,
- (void *) VP_PLAY_STRING_POPUP_SOUND_ALIVE,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_setting_genlist_item_selected_cb,
- (void *) pSetting);
+ (void *) VP_PLAY_STRING_POPUP_SOUND_ALIVE,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_setting_genlist_item_selected_cb,
+ (void *) pSetting);
pSetting->nAppendItemCnt++;
if (bStreaming == FALSE) {
elm_genlist_item_append(pObj, pSetting->st_Setting_Itc,
- (void *) VP_PLAY_STRING_POPUP_AUDIO_TRACK,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_setting_genlist_item_selected_cb,
- (void *) pSetting);
+ (void *) VP_PLAY_STRING_POPUP_AUDIO_TRACK,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_setting_genlist_item_selected_cb,
+ (void *) pSetting);
pSetting->nAppendItemCnt++;
- elm_genlist_item_append(pObj, pSetting->st_Setting_Itc,
- (void *)
- VP_PLAY_STRING_POPUP_REPEAT_SETTING, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_setting_genlist_item_selected_cb,
- (void *) pSetting);
+ elm_genlist_item_append(pObj, pSetting->st_Setting_Itc, (void *)
+ VP_PLAY_STRING_POPUP_REPEAT_SETTING, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_setting_genlist_item_selected_cb,
+ (void *) pSetting);
pSetting->nAppendItemCnt++;
if (bDrm == FALSE && bExternalVideoMode == FALSE) {
elm_genlist_item_append(pObj, pSetting->st_Setting_Itc,
- (void *) VP_PLAY_STRING_POPUP_CAPTURE,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_setting_genlist_item_selected_cb,
- (void *) pSetting);
+ (void *) VP_PLAY_STRING_POPUP_CAPTURE,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_setting_genlist_item_selected_cb,
+ (void *) pSetting);
pSetting->nAppendItemCnt++;
}
}
if (bStreaming == FALSE && bDrm == FALSE) {
elm_genlist_item_append(pObj, pSetting->st_Setting_Itc,
- (void *) VP_PLAY_STRING_POPUP_TAG_BUDDY,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_setting_genlist_item_selected_cb,
- (void *) pSetting);
+ (void *) VP_PLAY_STRING_POPUP_TAG_BUDDY,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_setting_genlist_item_selected_cb,
+ (void *) pSetting);
pSetting->nAppendItemCnt++;
if (bShowEditWeather == TRUE) {
elm_genlist_item_append(pObj, pSetting->st_Setting_Itc,
- (void *)
- VP_PLAY_STRING_POPUP_EDIT_WEATHER_TAG,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_setting_genlist_item_selected_cb,
- (void *) pSetting);
+ (void *)
+ VP_PLAY_STRING_POPUP_EDIT_WEATHER_TAG,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_setting_genlist_item_selected_cb,
+ (void *) pSetting);
pSetting->nAppendItemCnt++;
}
}
return TRUE;
}
-static void __vp_setting_genlist_realized(void *data, Evas_Object *obj,
- void *event_info)
+static void __vp_setting_genlist_realized(void *data, Evas_Object * obj,
+ void *event_info)
{
VP_GENLIST_HIDE_BOTTOMLINE(data, obj, event_info);
}
-static void __vp_setting_popup_rotate_cb(void *data, Evas_Object *obj,
- void *event_info)
+static void __vp_setting_popup_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
SettingPopup *pSetting = (SettingPopup *) data;
if (!pSetting) {
return;
}
vp_popup_set_popup_min_size(pSetting->pParent, pSetting->pBox,
- pSetting->nAppendItemCnt,
- VIDEO_POPUP_2_TEXT);
+ pSetting->nAppendItemCnt,
+ VIDEO_POPUP_2_TEXT);
}
/* external functions */
-setting_popup_handle vp_setting_create(Evas_Object *pParent,
- SettingInfo *pSettingInfo,
- PopupCloseCbFunc pCloseCb)
+setting_popup_handle vp_setting_create(Evas_Object * pParent,
+ SettingInfo * pSettingInfo,
+ PopupCloseCbFunc pCloseCb)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pSetting->pSettingInfo->fSpeed = pSettingInfo->fSpeed;
pSetting->pSettingInfo->nSoundAlive = pSettingInfo->nSoundAlive;
VP_STRDUP(pSetting->pSettingInfo->szAudioTrack,
- pSettingInfo->szAudioTrack);
+ pSettingInfo->szAudioTrack);
pSetting->pSettingInfo->nRepeatMode = pSettingInfo->nRepeatMode;
pSetting->pSettingInfo->bCapture = pSettingInfo->bCapture;
pSetting->pSettingInfo->bTagBuddy = pSettingInfo->bTagBuddy;
pSetting->pSettingInfo->bEditWeatherTag =
- pSettingInfo->bEditWeatherTag;
+ pSettingInfo->bEditWeatherTag;
pSetting->pSettingInfo->bStreaming = pSettingInfo->bStreaming;
pSetting->pSettingInfo->bRepeat = pSettingInfo->bRepeat;
pSetting->pSettingInfo->bSelectSubtitle =
- pSettingInfo->bSelectSubtitle;
+ pSettingInfo->bSelectSubtitle;
pSetting->pSettingInfo->bDrm = pSettingInfo->bDrm;
pSetting->pSettingInfo->bExternalMode = pSettingInfo->bExternalMode;
pSetting->pSettingInfo->bShowEditWeather =
- pSettingInfo->bShowEditWeather;
+ pSettingInfo->bShowEditWeather;
pSetting->pParent = pParent;
pSetting->pCloseCb = pCloseCb;
pSetting->pPopup =
- vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
- VP_PLAY_STRING_SETTINGS, NULL, 0.0, NULL,
- __vp_setting_popup_key_event_cb,
- __vp_setting_popup_mouse_event_cb,
- (void *) pSetting);
+ vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
+ VP_PLAY_STRING_SETTINGS, NULL, 0.0, NULL,
+ __vp_setting_popup_key_event_cb,
+ __vp_setting_popup_mouse_event_cb,
+ (void *) pSetting);
if (pSetting->pPopup == NULL) {
VideoLogError("vp_popup_create fail");
_vp_setting_destroy_handle(pSetting);
return NULL;
}
evas_object_data_set(pSetting->pGenList, VP_SETTING_GENLIST_DATA_KEY,
- (void *) pSetting);
+ (void *) pSetting);
vp_language_list_create();
if (!_vp_setting_add_genlist_item
- (pSetting->pGenList, (void *) pSetting)) {
+ (pSetting->pGenList, (void *) pSetting)) {
VideoLogError("_vp_setting_add_genlist_item fail");
_vp_setting_destroy_handle(pSetting);
return NULL;
}
evas_object_smart_callback_add(pSetting->pGenList, "realized",
- __vp_setting_genlist_realized, NULL);
+ __vp_setting_genlist_realized, NULL);
evas_object_smart_callback_add(pSetting->pParent, "rotation,changed",
- __vp_setting_popup_rotate_cb,
- pSetting);
+ __vp_setting_popup_rotate_cb, pSetting);
pSetting->pBox = elm_box_add(pSetting->pPopup);
vp_popup_set_popup_min_size(pSetting->pParent, pSetting->pBox,
- pSetting->nAppendItemCnt,
- VIDEO_POPUP_2_TEXT);
+ pSetting->nAppendItemCnt,
+ VIDEO_POPUP_2_TEXT);
elm_box_pack_end(pSetting->pBox, pSetting->pGenList);
}
bool vp_setting_set_user_data(setting_popup_handle pSettingHandle,
- void *pUserData)
+ void *pUserData)
{
if (pSettingHandle == NULL) {
VideoLogError("pSettingHandle is 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-play-string-define.h"
#include "vp-play-value-define.h"
#include "vp-play-macro-define.h"
} SharePopup;
-static void __vp_share_popup_rotate_cb(void *data, Evas_Object *obj,
- void *event_info)
+static void __vp_share_popup_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
SharePopup *pShare = (SharePopup *) data;
if (!pShare) {
return;
}
vp_popup_set_popup_min_size(pShare->pParent, pShare->pBox,
- pShare->nListCount, VIDEO_POPUP_DEFAULT);
+ pShare->nListCount, VIDEO_POPUP_DEFAULT);
}
-static void _vp_share_destroy_handle(SharePopup *pShare)
+static void _vp_share_destroy_handle(SharePopup * pShare)
{
if (pShare == NULL) {
VideoLogError("pShare is NULL");
return;
}
evas_object_smart_callback_del(pShare->pParent, "rotation,changed",
- __vp_share_popup_rotate_cb);
+ __vp_share_popup_rotate_cb);
VP_EVAS_DEL(pShare->pGenList);
VP_EVAS_DEL(pShare->pButton);
/* callback functions */
static char *__vp_share_genlist_text_get_cb(const void *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ Evas_Object * pObj,
+ const char *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
static void __vp_share_genlist_item_selected_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (!strcmp(szTxt, VP_PLAY_STRING_SHARE_MESSAGE)) {
VideoLogWarning
- ("SELECT SHARE ITEM (VP_PLAY_STRING_SHARE_MESSAGE)");
+ ("SELECT SHARE ITEM (VP_PLAY_STRING_SHARE_MESSAGE)");
nType = VP_SHARE_MESSAGE;
} else if (!strcmp(szTxt, VP_PLAY_STRING_SHARE_EMAIL)) {
VideoLogWarning("SELECT SHARE ITEM (VP_PLAY_STRING_SHARE_EMAIL)");
nType = VP_SHARE_EMAIL;
} else if (!strcmp(szTxt, VP_PLAY_STRING_SHARE_BLUETOOTH)) {
VideoLogWarning
- ("SELECT SHARE ITEM (VP_PLAY_STRING_SHARE_BLUETOOTH)");
+ ("SELECT SHARE ITEM (VP_PLAY_STRING_SHARE_BLUETOOTH)");
nType = VP_SHARE_BLUETOOTH;
} else if (!strcmp(szTxt, VP_PLAY_STRING_SHARE_FTM)) {
VideoLogWarning("SELECT SHARE ITEM (VP_PLAY_STRING_SHARE_FTM)");
nType = VP_SHARE_FTM;
} else if (!strcmp(szTxt, VP_PLAY_STRING_SHARE_FACEBOOK)) {
VideoLogWarning
- ("SELECT SHARE ITEM (VP_PLAY_STRING_SHARE_FACEBOOK)");
+ ("SELECT SHARE ITEM (VP_PLAY_STRING_SHARE_FACEBOOK)");
nType = VP_SHARE_FACEBOOK;
} else if (!strcmp(szTxt, VP_PLAY_STRING_SHARE_YOUTUBE)) {
VideoLogWarning
- ("SELECT SHARE ITEM (VP_PLAY_STRING_SHARE_YOUTUBE)");
+ ("SELECT SHARE ITEM (VP_PLAY_STRING_SHARE_YOUTUBE)");
nType = VP_SHARE_YOUTUBE;
} else if (!strcmp(szTxt, VP_PLAY_STRING_SHARE_NFC)) {
VideoLogWarning("SELECT SHARE ITEM (VP_PLAY_STRING_SHARE_NFC)");
nType = VP_SHARE_NFC;
} else if (!strcmp(szTxt, VP_PLAY_STRING_SHARE_FILE_TRANSFER)) {
VideoLogWarning
- ("SELECT SHARE ITEM (VP_PLAY_STRING_SHARE_FILE_TRANSFER)");
+ ("SELECT SHARE ITEM (VP_PLAY_STRING_SHARE_FILE_TRANSFER)");
nType = VP_SHARE_FILE_TRANSFER;
} else if (!strcmp(szTxt, VP_PLAY_STRING_SHARE_DROPBOX)) {
VideoLogWarning
- ("SELECT SHARE ITEM (VP_PLAY_STRING_SHARE_DROPBOX)");
+ ("SELECT SHARE ITEM (VP_PLAY_STRING_SHARE_DROPBOX)");
nType = VP_SHARE_DROP_BOX;
}
}
-static void __vp_share_close_btn_cb(void *pUserData, Evas_Object *pObj,
- void *pEventInfo)
+static void __vp_share_close_btn_cb(void *pUserData, Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pShareHandle is NULL");
SharePopup *pShare = (SharePopup *) pUserData;
if (pShare->pCloseCb) {
- pShare->pCloseCb(VP_SHARE_NONE, FALSE,
- (void *) pShare->pUserData);
+ pShare->pCloseCb(VP_SHARE_NONE, FALSE, (void *) pShare->pUserData);
}
}
static void __vp_share_popup_key_event_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
SharePopup *pShare = (SharePopup *) pUserData;
if (pShare->pCloseCb) {
- pShare->pCloseCb(VP_SHARE_NONE, FALSE,
- (void *) pShare->pUserData);
+ pShare->pCloseCb(VP_SHARE_NONE, FALSE, (void *) pShare->pUserData);
}
}
-static void __vp_share_popup_mouse_event_cb(void *pUserData, Evas *pEvas,
- Evas_Object *pObj,
- void *pEventInfo)
+static void __vp_share_popup_mouse_event_cb(void *pUserData, Evas * pEvas,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pShare->pCloseCb) {
pShare->pCloseCb(VP_SHARE_NONE, FALSE,
- (void *) pShare->pUserData);
+ (void *) pShare->pUserData);
}
}
}
/* internal functions */
-static Evas_Object *_vp_share_create_button(Evas_Object *pParent,
- void *pUserData)
+static Evas_Object *_vp_share_create_button(Evas_Object * pParent,
+ void *pUserData)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_button_add(pParent);
elm_object_style_set(pObj, "popup_button/default");
elm_object_domain_translatable_text_set(pObj, VP_SYS_STR_PREFIX,
- VP_PLAY_STRING_COM_CLOSE_IDS);
+ VP_PLAY_STRING_COM_CLOSE_IDS);
elm_object_part_content_set(pParent, "button1", pObj);
evas_object_smart_callback_add(pObj, "clicked",
- __vp_share_close_btn_cb, pUserData);
+ __vp_share_close_btn_cb, pUserData);
evas_object_show(pObj);
return pObj;
}
-static Evas_Object *_vp_share_create_genlist(Evas_Object *pParent)
+static Evas_Object *_vp_share_create_genlist(Evas_Object * pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_genlist_add(pParent);
evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(pObj);
return pObj;
}
-static bool _vp_share_add_genlist_item(Evas_Object *pObj,
- void *pUserData)
+static bool _vp_share_add_genlist_item(Evas_Object * pObj, void *pUserData)
{
if (!pObj || !pUserData) {
VideoLogError("pObj is NULL");
if (st_Share_Itc != NULL) {
st_Share_Itc->version = ELM_GENLIST_ITEM_CLASS_VERSION;
st_Share_Itc->item_style = "1text/popup";
- st_Share_Itc->func.text_get = (void *) __vp_share_genlist_text_get_cb;
+ st_Share_Itc->func.text_get =
+ (void *) __vp_share_genlist_text_get_cb;
st_Share_Itc->func.content_get = NULL;
st_Share_Itc->func.state_get = NULL;
st_Share_Itc->func.del = NULL;
pShare->nListCount = 0;
elm_genlist_item_append(pObj, st_Share_Itc,
- (void *) VP_PLAY_STRING_SHARE_MESSAGE, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_share_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_SHARE_MESSAGE,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_share_genlist_item_selected_cb,
+ pUserData);
pShare->nListCount++;
elm_genlist_item_append(pObj, st_Share_Itc,
- (void *) VP_PLAY_STRING_SHARE_EMAIL, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_share_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_SHARE_EMAIL, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_share_genlist_item_selected_cb,
+ pUserData);
pShare->nListCount++;
elm_genlist_item_append(pObj, st_Share_Itc,
- (void *) VP_PLAY_STRING_SHARE_FTM, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_share_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_SHARE_FTM, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_share_genlist_item_selected_cb,
+ pUserData);
pShare->nListCount++;
elm_genlist_item_append(pObj, st_Share_Itc,
- (void *) VP_PLAY_STRING_SHARE_BLUETOOTH, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_share_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_SHARE_BLUETOOTH,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_share_genlist_item_selected_cb,
+ pUserData);
pShare->nListCount++;
elm_genlist_item_append(pObj, st_Share_Itc,
- (void *) VP_PLAY_STRING_SHARE_FACEBOOK, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_share_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_SHARE_FACEBOOK,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_share_genlist_item_selected_cb,
+ pUserData);
elm_genlist_item_class_free(st_Share_Itc);
}
}
/* external functions */
-share_handle vp_share_create(Evas_Object *pParent, char *pMediaUrl,
- PopupCloseCbFunc pCloseCb)
+share_handle vp_share_create(Evas_Object * pParent, char *pMediaUrl,
+ PopupCloseCbFunc pCloseCb)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
VP_STRDUP(pShare->pMediUrl, pMediaUrl);
pShare->pPopup =
- vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_WITH_CANCEL_BTN,
- VP_PLAY_STRING_POPUP_SHARE, NULL, 0.0, NULL,
- __vp_share_popup_key_event_cb,
- __vp_share_popup_mouse_event_cb, (void *) pShare);
+ vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_WITH_CANCEL_BTN,
+ VP_PLAY_STRING_POPUP_SHARE, NULL, 0.0, NULL,
+ __vp_share_popup_key_event_cb,
+ __vp_share_popup_mouse_event_cb, (void *) pShare);
if (pShare->pPopup == NULL) {
VideoLogError("_vp_share_create_popup fail");
_vp_share_destroy_handle(pShare);
}
pShare->pButton =
- _vp_share_create_button(pShare->pPopup, (void *) pShare);
+ _vp_share_create_button(pShare->pPopup, (void *) pShare);
if (pShare->pButton == NULL) {
VideoLogError("_vp_share_create_button fail");
_vp_share_destroy_handle(pShare);
return NULL;
}
evas_object_smart_callback_add(pShare->pParent, "rotation,changed",
- __vp_share_popup_rotate_cb, pShare);
+ __vp_share_popup_rotate_cb, pShare);
pShare->pBox = elm_box_add(pShare->pPopup);
vp_popup_set_popup_min_size(pShare->pParent, pShare->pBox,
- pShare->nListCount, VIDEO_POPUP_DEFAULT);
+ pShare->nListCount, VIDEO_POPUP_DEFAULT);
elm_box_pack_end(pShare->pBox, pShare->pGenList);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-play-string-define.h"
#include "vp-play-value-define.h"
#include "vp-play-type-define.h"
} SoundAlivePopup;
static void __vp_sound_alive_genlist_item_selected_cb(void *pUserData,
- Evas_Object *
- pObject,
- void *pEventInfo);
+ Evas_Object *
+ pObject,
+ void *pEventInfo);
static void __vp_sound_alive_genlist_realized(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
VP_GENLIST_HIDE_BOTTOMLINE(data, obj, event_info);
}
static void __vp_sound_alive_popup_rotate_cb(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
SoundAlivePopup *pSoundAlive = (SoundAlivePopup *) data;
if (!pSoundAlive) {
return;
}
vp_popup_set_popup_min_size(pSoundAlive->pParent, pSoundAlive->pBox,
- pSoundAlive->nListCount,
- VIDEO_POPUP_DEFAULT);
+ pSoundAlive->nListCount,
+ VIDEO_POPUP_DEFAULT);
}
-static void _vp_sound_alive_destroy_handle(SoundAlivePopup *pSoundAlive)
+static void _vp_sound_alive_destroy_handle(SoundAlivePopup * pSoundAlive)
{
if (pSoundAlive == NULL) {
VideoLogError("pSoundAlive is NULL");
}
evas_object_smart_callback_del(pSoundAlive->pParent,
- "rotation,changed",
- __vp_sound_alive_popup_rotate_cb);
+ "rotation,changed",
+ __vp_sound_alive_popup_rotate_cb);
evas_object_smart_callback_del(pSoundAlive->pGenList, "realized",
- __vp_sound_alive_genlist_realized);
+ __vp_sound_alive_genlist_realized);
VP_EVAS_DEL(pSoundAlive->pRadio);
VP_EVAS_DEL(pSoundAlive->pGenList);
/* callback functions */
static char *__vp_sound_alive_genlist_text_get_cb(const void *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ Evas_Object * pObj,
+ const char *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
static Evas_Object *__vp_sound_alive_genlist_content_get_cb(const void
- *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ *pUserData,
+ Evas_Object *
+ pObj,
+ const char
+ *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Evas_Object *pRadioObj = NULL;
SoundAlivePopup *pSoundAlive =
- (SoundAlivePopup *) evas_object_data_get(pObj,
- VP_SOUND_ALIVE_GENLIST_DATA_KEY);
+ (SoundAlivePopup *) evas_object_data_get(pObj,
+ VP_SOUND_ALIVE_GENLIST_DATA_KEY);
if (pSoundAlive == NULL) {
VideoLogWarning("evas_object_data_get is fail");
return NULL;
elm_radio_state_value_set(pRadioObj, nType);
elm_radio_group_add(pRadioObj, pSoundAlive->pRadio);
elm_radio_value_set(pSoundAlive->pRadio,
- pSoundAlive->soundAliveType);
+ pSoundAlive->soundAliveType);
evas_object_smart_callback_add(pRadioObj, "changed",
- __vp_sound_alive_genlist_item_selected_cb,
- pSoundAlive);
+ __vp_sound_alive_genlist_item_selected_cb,
+ pSoundAlive);
evas_object_show(pRadioObj);
return pRadioObj;
}
static void __vp_sound_alive_genlist_item_selected_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Elm_Object_Item *pItem = (Elm_Object_Item *) pEventInfo;
Elm_Object_Item *pSelectedItem =
- elm_genlist_selected_item_get(pObject);
+ elm_genlist_selected_item_get(pObject);
if (pSelectedItem) {
elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
}
if (!strcmp(szTxt, VP_PLAY_STRING_SOUND_ALIVE_NORMAL)) {
VideoLogWarning
- ("SELECT SOUND ALIVE ITEM (VP_PLAY_STRING_SOUND_ALIVE_NORMAL)");
+ ("SELECT SOUND ALIVE ITEM (VP_PLAY_STRING_SOUND_ALIVE_NORMAL)");
nType = VIDEO_SA_NORMAL;
} else if (!strcmp(szTxt, VP_PLAY_STRING_SOUND_ALIVE_VOICE)) {
VideoLogWarning
- ("SELECT SOUND ALIVE ITEM (VP_PLAY_STRING_SOUND_ALIVE_VOICE)");
+ ("SELECT SOUND ALIVE ITEM (VP_PLAY_STRING_SOUND_ALIVE_VOICE)");
nType = VIDEO_SA_VOICE;
} else if (!strcmp(szTxt, VP_PLAY_STRING_SOUND_ALIVE_MOVIE)) {
VideoLogWarning
- ("SELECT SOUND ALIVE ITEM (VP_PLAY_STRING_SOUND_ALIVE_MOVIE)");
+ ("SELECT SOUND ALIVE ITEM (VP_PLAY_STRING_SOUND_ALIVE_MOVIE)");
nType = VIDEO_SA_MOVIE;
} else if (!strcmp(szTxt, VP_PLAY_STRING_SOUND_ALIVE_71CH)) {
VideoLogWarning
- ("SELECT SOUND ALIVE ITEM (VP_PLAY_STRING_SOUND_ALIVE_71CH)");
+ ("SELECT SOUND ALIVE ITEM (VP_PLAY_STRING_SOUND_ALIVE_71CH)");
nType = VIDEO_SA_7_1_CH;
}
pSoundAlive->soundAliveType = nType;
if (pSoundAlive->pCloseCb) {
pSoundAlive->pCloseCb((int) nType, FALSE,
- (void *) pSoundAlive->pUserData);
+ (void *) pSoundAlive->pUserData);
}
}
static void __vp_sound_alive_popup_key_event_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pSoundAlive->pCloseCb) {
pSoundAlive->pCloseCb(VIDEO_SA_NONE, FALSE,
- (void *) pSoundAlive->pUserData);
+ (void *) pSoundAlive->pUserData);
}
}
static void __vp_sound_alive_popup_mouse_event_cb(void *pUserData,
- Evas *pEvas,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas * pEvas,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pSoundAlive->pCloseCb) {
pSoundAlive->pCloseCb(VIDEO_SA_NONE, FALSE,
- (void *) pSoundAlive->pUserData);
+ (void *) pSoundAlive->pUserData);
}
}
}
-static Evas_Object *_vp_sound_alive_create_genlist(Evas_Object *pParent)
+static Evas_Object *_vp_sound_alive_create_genlist(Evas_Object * pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_genlist_add(pParent);
evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(pObj);
return pObj;
}
-static bool _vp_sound_alive_add_genlist_item(Evas_Object *pObj,
- void *pUserData)
+static bool _vp_sound_alive_add_genlist_item(Evas_Object * pObj,
+ void *pUserData)
{
if (pObj == NULL) {
VideoLogError("pObj is NULL");
pSoundAlive->st_Sa_Itc->version = ELM_GENLIST_ITEM_CLASS_VERSION;
pSoundAlive->st_Sa_Itc->item_style = "1line";
pSoundAlive->st_Sa_Itc->func.text_get =
- (void *) __vp_sound_alive_genlist_text_get_cb;
+ (void *) __vp_sound_alive_genlist_text_get_cb;
pSoundAlive->st_Sa_Itc->func.content_get =
- (void *) __vp_sound_alive_genlist_content_get_cb;
+ (void *) __vp_sound_alive_genlist_content_get_cb;
pSoundAlive->st_Sa_Itc->func.state_get = NULL;
pSoundAlive->st_Sa_Itc->func.del = NULL;
}
pSoundAlive->nListCount = 0;
elm_genlist_item_append(pObj, pSoundAlive->st_Sa_Itc,
- (void *) VP_PLAY_STRING_SOUND_ALIVE_NORMAL,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_sound_alive_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_SOUND_ALIVE_NORMAL,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_sound_alive_genlist_item_selected_cb,
+ pUserData);
pSoundAlive->nListCount++;
video_sound_device_type_t nSoundDevType = VP_SOUND_DEVICE_NONE;
vp_sound_get_active_device(&nSoundDevType);
if (nSoundDevType == VP_SOUND_DEVICE_SPEAKER) {
elm_genlist_item_append(pObj, pSoundAlive->st_Sa_Itc,
- (void *) VP_PLAY_STRING_SOUND_ALIVE_VOICE,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_sound_alive_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_SOUND_ALIVE_VOICE,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_sound_alive_genlist_item_selected_cb,
+ pUserData);
pSoundAlive->nListCount++;
} else if (nSoundDevType == VP_SOUND_DEVICE_HDMI
- || nSoundDevType == VP_SOUND_DEVICE_BLUETOOTH) {
+ || nSoundDevType == VP_SOUND_DEVICE_BLUETOOTH) {
} else {
elm_genlist_item_append(pObj, pSoundAlive->st_Sa_Itc,
- (void *) VP_PLAY_STRING_SOUND_ALIVE_VOICE,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_sound_alive_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_SOUND_ALIVE_VOICE,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_sound_alive_genlist_item_selected_cb,
+ pUserData);
pSoundAlive->nListCount++;
elm_genlist_item_append(pObj, pSoundAlive->st_Sa_Itc,
- (void *) VP_PLAY_STRING_SOUND_ALIVE_MOVIE,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_sound_alive_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_SOUND_ALIVE_MOVIE,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_sound_alive_genlist_item_selected_cb,
+ pUserData);
pSoundAlive->nListCount++;
elm_genlist_item_append(pObj, pSoundAlive->st_Sa_Itc,
- (void *) VP_PLAY_STRING_SOUND_ALIVE_71CH,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_sound_alive_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_SOUND_ALIVE_71CH,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_sound_alive_genlist_item_selected_cb,
+ pUserData);
pSoundAlive->nListCount++;
}
}
/* external functions */
-sound_alive_handle vp_sound_alive_create(Evas_Object *pParent,
- char *pMediaUrl,
- PopupCloseCbFunc pCloseCb,
- video_sound_alive_t nType)
+sound_alive_handle vp_sound_alive_create(Evas_Object * pParent,
+ char *pMediaUrl,
+ PopupCloseCbFunc pCloseCb,
+ video_sound_alive_t nType)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
VP_STRDUP(pSoundAlive->pMediUrl, pMediaUrl);
pSoundAlive->pPopup =
- vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
- VP_PLAY_STRING_POPUP_SOUND_ALIVE, NULL, 0.0, NULL,
- __vp_sound_alive_popup_key_event_cb,
- __vp_sound_alive_popup_mouse_event_cb,
- (void *) pSoundAlive);
+ vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
+ VP_PLAY_STRING_POPUP_SOUND_ALIVE, NULL, 0.0, NULL,
+ __vp_sound_alive_popup_key_event_cb,
+ __vp_sound_alive_popup_mouse_event_cb,
+ (void *) pSoundAlive);
if (pSoundAlive->pPopup == NULL) {
VideoLogError("vp_popup_create fail");
_vp_sound_alive_destroy_handle(pSoundAlive);
}
pSoundAlive->pGenList =
- _vp_sound_alive_create_genlist(pSoundAlive->pPopup);
+ _vp_sound_alive_create_genlist(pSoundAlive->pPopup);
if (pSoundAlive->pGenList == NULL) {
VideoLogError("_vp_sound_alive_create_genlist fail");
_vp_sound_alive_destroy_handle(pSoundAlive);
return NULL;
}
evas_object_data_set(pSoundAlive->pGenList,
- VP_SOUND_ALIVE_GENLIST_DATA_KEY,
- (void *) pSoundAlive);
+ VP_SOUND_ALIVE_GENLIST_DATA_KEY,
+ (void *) pSoundAlive);
evas_object_smart_callback_add(pSoundAlive->pGenList, "realized",
- __vp_sound_alive_genlist_realized,
- NULL);
+ __vp_sound_alive_genlist_realized,
+ NULL);
pSoundAlive->pRadio = elm_radio_add(pSoundAlive->pGenList);
if (!_vp_sound_alive_add_genlist_item
- (pSoundAlive->pGenList, (void *) pSoundAlive)) {
+ (pSoundAlive->pGenList, (void *) pSoundAlive)) {
VideoLogError("_vp_sound_alive_add_genlist_item fail");
_vp_sound_alive_destroy_handle(pSoundAlive);
return NULL;
VideoLogInfo("nType: %d", nType);
pSoundAlive->soundAliveType = nType;
evas_object_smart_callback_add(pSoundAlive->pParent,
- "rotation,changed",
- __vp_sound_alive_popup_rotate_cb,
- pSoundAlive);
+ "rotation,changed",
+ __vp_sound_alive_popup_rotate_cb,
+ pSoundAlive);
pSoundAlive->pBox = elm_box_add(pSoundAlive->pPopup);
vp_popup_set_popup_min_size(pSoundAlive->pParent, pSoundAlive->pBox,
- pSoundAlive->nListCount,
- VIDEO_POPUP_DEFAULT);
+ pSoundAlive->nListCount,
+ VIDEO_POPUP_DEFAULT);
elm_box_pack_end(pSoundAlive->pBox, pSoundAlive->pGenList);
}
bool vp_sound_alive_set_user_data(sound_alive_handle pSAHandle,
- void *pUserData)
+ void *pUserData)
{
if (pSAHandle == NULL) {
VideoLogError("pSAHandle is 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-play-string-define.h"
#include "vp-play-value-define.h"
#include "vp-play-type-define.h"
} SoundPathPopup;
static void __vp_sound_path_genlist_item_selected_cb(void *pUserData,
- Evas_Object *
- pObject,
- void *pEventInfo);
+ Evas_Object *
+ pObject,
+ void *pEventInfo);
-static void __vp_sound_genlist_realized(void *data, Evas_Object *obj,
- void *event_info)
+static void __vp_sound_genlist_realized(void *data, Evas_Object * obj,
+ void *event_info)
{
VP_GENLIST_HIDE_BOTTOMLINE(data, obj, event_info);
}
-static void __vp_sound_path_popup_rotate_cb(void *data, Evas_Object *obj,
- void *event_info)
+static void __vp_sound_path_popup_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
SoundPathPopup *pSoundPath = (SoundPathPopup *) data;
if (!pSoundPath) {
return;
}
vp_popup_set_popup_min_size(pSoundPath->pParent, pSoundPath->pBox,
- pSoundPath->nItemCnt,
- VIDEO_POPUP_DEFAULT);
+ pSoundPath->nItemCnt, VIDEO_POPUP_DEFAULT);
}
-static void _vp_sound_path_destroy_handle(SoundPathPopup *pSoundPath)
+static void _vp_sound_path_destroy_handle(SoundPathPopup * pSoundPath)
{
if (pSoundPath == NULL) {
VideoLogError("pSoundPath is NULL");
return;
}
evas_object_smart_callback_del(pSoundPath->pParent,
- "rotation,changed",
- __vp_sound_path_popup_rotate_cb);
+ "rotation,changed",
+ __vp_sound_path_popup_rotate_cb);
evas_object_smart_callback_del(pSoundPath->pGenList, "realized",
- __vp_sound_genlist_realized);
+ __vp_sound_genlist_realized);
VP_EVAS_DEL(pSoundPath->pRadio);
VP_EVAS_DEL(pSoundPath->pGenList);
/* callback functions */
static char *__vp_sound_path_genlist_text_get_cb(const void *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ Evas_Object * pObj,
+ const char *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
static Evas_Object *__vp_sound_path_genlist_content_get_cb(const void
- *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ *pUserData,
+ Evas_Object *
+ pObj,
+ const char
+ *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Evas_Object *pLayout = NULL;
SoundPathPopup *pSoundPath =
- (SoundPathPopup *) evas_object_data_get(pObj,
- VP_SOUND_PATH_GENLIST_DATA_KEY);
+ (SoundPathPopup *) evas_object_data_get(pObj,
+ VP_SOUND_PATH_GENLIST_DATA_KEY);
if (pSoundPath == NULL) {
VideoLogWarning("evas_object_data_get is fail");
return NULL;
pRadioObj = elm_radio_add(pLayout);
elm_layout_theme_set(pLayout, "layout", "list/C/type.2",
- "default");
+ "default");
elm_radio_group_add(pRadioObj, pSoundPath->pRadio);
elm_radio_state_value_set(pRadioObj, nType);
if (nType == pSoundPath->soundPathType) {
VideoLogInfo("pSoundPath->soundPathType = %d",
- pSoundPath->soundPathType);
+ pSoundPath->soundPathType);
elm_radio_value_set(pSoundPath->pRadio, nType);
}
evas_object_smart_callback_add(pRadioObj, "changed",
- __vp_sound_path_genlist_item_selected_cb,
- (void *) pUserData);
+ __vp_sound_path_genlist_item_selected_cb,
+ (void *) pUserData);
elm_object_part_content_set(pLayout, "elm.swallow.content",
- pRadioObj);
+ pRadioObj);
evas_object_show(pRadioObj);
evas_object_show(pLayout);
}
static void __vp_sound_path_genlist_item_selected_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (!g_strcmp0(szTxt, VP_PLAY_STRING_SOUND_SPEAKER)) {
VideoLogWarning
- ("SELECT SOUND PATH ITEM (VP_PLAY_STRING_SOUND_SPEAKER)");
+ ("SELECT SOUND PATH ITEM (VP_PLAY_STRING_SOUND_SPEAKER)");
nType = VIDEO_SOUND_PATH_SPEAKER;
vp_sound_set_active_route(VP_SOUND_DEVICE_SPEAKER);
} else if (!g_strcmp0(szTxt, VP_PLAY_STRING_SOUND_EARJACK)) {
VideoLogWarning
- ("SELECT SOUND PATH ITEM (VP_PLAY_STRING_SOUND_EARJACK)");
+ ("SELECT SOUND PATH ITEM (VP_PLAY_STRING_SOUND_EARJACK)");
nType = VIDEO_SOUND_PATH_EARJACK;
vp_sound_set_active_route(VP_SOUND_DEVICE_EARJACK);
} else if (!g_strcmp0(szTxt, pSoundPath->szBTName)) {
nType = VIDEO_SOUND_PATH_BLUETOOTH;
VideoLogWarning
- ("SELECT SOUND PATH ITEM (VIDEO_SOUND_PATH_BLUETOOTH)");
+ ("SELECT SOUND PATH ITEM (VIDEO_SOUND_PATH_BLUETOOTH)");
vp_sound_set_active_route(VP_SOUND_DEVICE_BLUETOOTH);
} else if (!g_strcmp0(szTxt, VP_PLAY_STRING_SOUND_HDMI)) {
VideoLogWarning("SELECT SOUND PATH ITEM (VIDEO_SOUND_PATH_HDMI)");
vp_sound_set_active_route(VP_SOUND_DEVICE_HDMI);
} else if (!g_strcmp0(szTxt, VP_PLAY_STRING_SOUND_MIRRORING)) {
VideoLogWarning
- ("SELECT SOUND PATH ITEM (VIDEO_SOUND_PATH_MIRRORING)");
+ ("SELECT SOUND PATH ITEM (VIDEO_SOUND_PATH_MIRRORING)");
nType = VIDEO_SOUND_PATH_MIRRORING;
vp_sound_set_active_route(VP_SOUND_DEVICE_MIRRORING);
} else if (!g_strcmp0(szTxt, VP_PLAY_STRING_SOUND_USB_AUDIO)) {
VideoLogWarning
- ("SELECT SOUND PATH ITEM (VIDEO_SOUND_PATH_USB_AUDIO)");
+ ("SELECT SOUND PATH ITEM (VIDEO_SOUND_PATH_USB_AUDIO)");
nType = VIDEO_SOUND_PATH_USB_AUDIO;
vp_sound_set_active_route(VP_SOUND_DEVICE_USB_AUDIO);
}
pSoundPath->soundPathType = nType;
if (pSoundPath->pCloseCb) {
pSoundPath->pCloseCb((int) nType, FALSE,
- (void *) pSoundPath->pUserData);
+ (void *) pSoundPath->pUserData);
}
}
static void __vp_sound_path_popup_key_event_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pSoundPath->pCloseCb) {
pSoundPath->pCloseCb(VIDEO_SOUND_PATH_NONE, FALSE,
- (void *) pSoundPath->pUserData);
+ (void *) pSoundPath->pUserData);
}
}
static void __vp_sound_path_popup_mouse_event_cb(void *pUserData,
- Evas *pEvas,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas * pEvas,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pSoundPath->pCloseCb) {
pSoundPath->pCloseCb(VIDEO_SOUND_PATH_NONE, FALSE,
- (void *) pSoundPath->pUserData);
+ (void *) pSoundPath->pUserData);
}
}
}
-static Evas_Object *_vp_sound_path_create_genlist(Evas_Object *pParent)
+static Evas_Object *_vp_sound_path_create_genlist(Evas_Object * pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_genlist_add(pParent);
evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(pObj);
return pObj;
}
-static bool _vp_sound_path_add_genlist_item(Evas_Object *pObj,
- void *pUserData)
+static bool _vp_sound_path_add_genlist_item(Evas_Object * pObj,
+ void *pUserData)
{
if (pObj == NULL) {
VideoLogError("pObj is NULL");
pSoundPath->st_Sp_Itc->version = ELM_GENLIST_ITEM_CLASS_VERSION;
pSoundPath->st_Sp_Itc->item_style = "1line";
pSoundPath->st_Sp_Itc->func.text_get =
- (void *) __vp_sound_path_genlist_text_get_cb;
+ (void *) __vp_sound_path_genlist_text_get_cb;
pSoundPath->st_Sp_Itc->func.content_get =
- (void *) __vp_sound_path_genlist_content_get_cb;
+ (void *) __vp_sound_path_genlist_content_get_cb;
pSoundPath->st_Sp_Itc->func.state_get = NULL;
pSoundPath->st_Sp_Itc->func.del = NULL;
}
VP_STRDUP(pSoundPath->szBTName, szBTName);
VP_FREE(szBTName);
elm_genlist_item_append(pObj, pSoundPath->st_Sp_Itc,
- (void *) pSoundPath->szBTName, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_sound_path_genlist_item_selected_cb,
- pUserData);
+ (void *) pSoundPath->szBTName, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_sound_path_genlist_item_selected_cb,
+ pUserData);
pSoundPath->nItemCnt++;
}
}
if (vp_sound_device_is_enable(VP_SOUND_DEVICE_HDMI, pSoundPath)) {
elm_genlist_item_append(pObj, pSoundPath->st_Sp_Itc,
- (void *) VP_PLAY_STRING_SOUND_HDMI, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_sound_path_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_SOUND_HDMI, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_sound_path_genlist_item_selected_cb,
+ pUserData);
pSoundPath->nItemCnt++;
}
if (vp_sound_device_is_enable(VP_SOUND_DEVICE_MIRRORING, pSoundPath)) {
elm_genlist_item_append(pObj, pSoundPath->st_Sp_Itc,
- (void *) VP_PLAY_STRING_SOUND_MIRRORING,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_sound_path_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_SOUND_MIRRORING,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_sound_path_genlist_item_selected_cb,
+ pUserData);
pSoundPath->nItemCnt++;
}
if (vp_sound_device_is_enable(VP_SOUND_DEVICE_USB_AUDIO, pSoundPath)) {
elm_genlist_item_append(pObj, pSoundPath->st_Sp_Itc,
- (void *) VP_PLAY_STRING_SOUND_USB_AUDIO,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_sound_path_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_SOUND_USB_AUDIO,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_sound_path_genlist_item_selected_cb,
+ pUserData);
pSoundPath->nItemCnt++;
}
if (vp_sound_device_is_enable(VP_SOUND_DEVICE_EARJACK, pSoundPath)) {
elm_genlist_item_append(pObj, pSoundPath->st_Sp_Itc,
- (void *) VP_PLAY_STRING_SOUND_EARJACK,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_sound_path_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_SOUND_EARJACK,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_sound_path_genlist_item_selected_cb,
+ pUserData);
pSoundPath->nItemCnt++;
}
if (vp_sound_device_is_enable(VP_SOUND_DEVICE_EARJACK, pSoundPath)
- && vp_sound_device_is_enable(VP_SOUND_DEVICE_BLUETOOTH,
- pSoundPath)) {
+ && vp_sound_device_is_enable(VP_SOUND_DEVICE_BLUETOOTH,
+ pSoundPath)) {
VideoLogError("Skip for sound policy");
} else {
elm_genlist_item_append(pObj, pSoundPath->st_Sp_Itc,
- (void *) VP_PLAY_STRING_SOUND_SPEAKER,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_sound_path_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_SOUND_SPEAKER,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_sound_path_genlist_item_selected_cb,
+ pUserData);
pSoundPath->nItemCnt++;
}
}
/* external functions */
-sound_path_handle vp_sound_path_create(Evas_Object *pParent,
- PopupCloseCbFunc pCloseCb)
+sound_path_handle vp_sound_path_create(Evas_Object * pParent,
+ PopupCloseCbFunc pCloseCb)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pSoundPath->pCloseCb = pCloseCb;
pSoundPath->pPopup =
- vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
- VP_PLAY_STRING_SOUND_PATH, NULL, 0.0, NULL,
- __vp_sound_path_popup_key_event_cb,
- __vp_sound_path_popup_mouse_event_cb,
- (void *) pSoundPath);
+ vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
+ VP_PLAY_STRING_SOUND_PATH, NULL, 0.0, NULL,
+ __vp_sound_path_popup_key_event_cb,
+ __vp_sound_path_popup_mouse_event_cb,
+ (void *) pSoundPath);
if (pSoundPath->pPopup == NULL) {
VideoLogError("vp_popup_create fail");
_vp_sound_path_destroy_handle(pSoundPath);
}
pSoundPath->pGenList =
- _vp_sound_path_create_genlist(pSoundPath->pPopup);
+ _vp_sound_path_create_genlist(pSoundPath->pPopup);
if (pSoundPath->pGenList == NULL) {
VideoLogError("_vp_sound_path_create_genlist fail");
_vp_sound_path_destroy_handle(pSoundPath);
return NULL;
}
evas_object_smart_callback_add(pSoundPath->pGenList, "realized",
- __vp_sound_genlist_realized, NULL);
+ __vp_sound_genlist_realized, NULL);
evas_object_data_set(pSoundPath->pGenList,
- VP_SOUND_PATH_GENLIST_DATA_KEY,
- (void *) pSoundPath);
+ VP_SOUND_PATH_GENLIST_DATA_KEY,
+ (void *) pSoundPath);
pSoundPath->pRadio = elm_radio_add(pSoundPath->pGenList);
if (!_vp_sound_path_add_genlist_item
- (pSoundPath->pGenList, (void *) pSoundPath)) {
+ (pSoundPath->pGenList, (void *) pSoundPath)) {
VideoLogError("_vp_sound_path_add_genlist_item fail");
_vp_sound_path_destroy_handle(pSoundPath);
return NULL;
pSoundPath->soundPathType = nType;
}
evas_object_smart_callback_add(pSoundPath->pParent,
- "rotation,changed",
- __vp_sound_path_popup_rotate_cb,
- pSoundPath);
+ "rotation,changed",
+ __vp_sound_path_popup_rotate_cb,
+ pSoundPath);
pSoundPath->pBox = elm_box_add(pSoundPath->pPopup);
vp_popup_set_popup_min_size(pSoundPath->pParent, pSoundPath->pBox,
- pSoundPath->nItemCnt,
- VIDEO_POPUP_DEFAULT);
+ pSoundPath->nItemCnt, VIDEO_POPUP_DEFAULT);
elm_box_pack_end(pSoundPath->pBox, pSoundPath->pGenList);
}
bool vp_sound_path_set_user_data(sound_path_handle pSoundPathHandle,
- void *pUserData)
+ void *pUserData)
{
if (pSoundPathHandle == NULL) {
VideoLogError("pSoundPathHandle is 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
#include "vp-play-string-define.h"
} SubtitleAlignmentPopup;
static void _vp_subtitle_alignment_destroy_handle(SubtitleAlignmentPopup *
- pSubtitleAlignment);
+ pSubtitleAlignment);
static void __vp_subtitle_alignment_genlist_item_selected_cb(void
- *pUserData,
- Evas_Object *
- pObject,
- void
- *pEventInfo);
+ *pUserData,
+ Evas_Object *
+ pObject, void
+ *pEventInfo);
static void __vp_subtitle_alignment_genlist_realized(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
VP_GENLIST_HIDE_BOTTOMLINE(data, obj, event_info);
}
static void __vp_subtitle_alignment_popup_rotate_cb(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
SubtitleAlignmentPopup *pSubtitleAlignment =
- (SubtitleAlignmentPopup *) data;
+ (SubtitleAlignmentPopup *) data;
if (!pSubtitleAlignment) {
VideoLogError("pSubtitleAlignment IS null");
return;
return;
}
vp_popup_set_popup_min_size(pSubtitleAlignment->pParent,
- pSubtitleAlignment->pBox,
- pSubtitleAlignment->nListCount,
- VIDEO_POPUP_DEFAULT);
+ pSubtitleAlignment->pBox,
+ pSubtitleAlignment->nListCount,
+ VIDEO_POPUP_DEFAULT);
}
/* callback functions */
static char *__vp_subtitle_alignment_genlist_text_get_cb(const void
- *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ *pUserData,
+ Evas_Object *
+ pObj,
+ const char *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
static Evas_Object *__vp_subtitle_alignment_genlist_content_get_cb(const
- void *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ void
+ *pUserData,
+ Evas_Object
+ *pObj,
+ const
+ char
+ *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Evas_Object *pRadioObj = NULL;
SubtitleAlignmentPopup *pSubtitleAlignment =
- (SubtitleAlignmentPopup *) evas_object_data_get(pObj,
- VP_SUBTITLE_ALIGNMENT_GENLIST_DATA_KEY);
+ (SubtitleAlignmentPopup *) evas_object_data_get(pObj,
+ VP_SUBTITLE_ALIGNMENT_GENLIST_DATA_KEY);
if (pSubtitleAlignment == NULL) {
VideoLogWarning("evas_object_data_get is fail");
return NULL;
}
video_play_subtitle_alignment_t nAlignment =
- VIDEO_SUBTITLE_ALIGNMENT_CENTER;
+ VIDEO_SUBTITLE_ALIGNMENT_CENTER;
if (!strcmp(szTxt, VP_PLAY_STRING_ALIGNMENT_LEFT)) {
nAlignment = VIDEO_SUBTITLE_ALIGNMENT_LEFT;
} else if (!strcmp(szTxt, VP_PLAY_STRING_ALIGNMENT_CENTER)) {
elm_radio_state_value_set(pRadioObj, nAlignment);
elm_radio_group_add(pRadioObj, pSubtitleAlignment->pRadio);
elm_radio_value_set(pSubtitleAlignment->pRadio,
- pSubtitleAlignment->currentAlignment);
+ pSubtitleAlignment->currentAlignment);
evas_object_smart_callback_add(pRadioObj, "changed",
- __vp_subtitle_alignment_genlist_item_selected_cb,
- pSubtitleAlignment);
+ __vp_subtitle_alignment_genlist_item_selected_cb,
+ pSubtitleAlignment);
evas_object_show(pRadioObj);
return pRadioObj;
}
static void __vp_subtitle_alignment_genlist_item_selected_cb(void
- *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ *pUserData,
+ Evas_Object *
+ pObject,
+ void
+ *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Elm_Object_Item *pItem = (Elm_Object_Item *) pEventInfo;
Elm_Object_Item *pSelectedItem =
- elm_genlist_selected_item_get(pObject);
+ elm_genlist_selected_item_get(pObject);
if (pSelectedItem) {
elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
}
char *szTxt = (char *) elm_object_item_data_get(pItem);
SubtitleAlignmentPopup *pSubtitleAlignment =
- (SubtitleAlignmentPopup *) pUserData;
+ (SubtitleAlignmentPopup *) pUserData;
if (szTxt == NULL) {
VideoLogError("szTxt is NULL");
}
video_play_subtitle_alignment_t nAlignment =
- VIDEO_SUBTITLE_ALIGNMENT_CENTER;
+ VIDEO_SUBTITLE_ALIGNMENT_CENTER;
if (!strcmp(szTxt, VP_PLAY_STRING_ALIGNMENT_LEFT)) {
nAlignment = VIDEO_SUBTITLE_ALIGNMENT_LEFT;
} else if (!strcmp(szTxt, VP_PLAY_STRING_ALIGNMENT_CENTER)) {
pSubtitleAlignment->currentAlignment = nAlignment;
if (pSubtitleAlignment->pCloseCb) {
pSubtitleAlignment->pCloseCb(nAlignment, FALSE,
- (void *) pSubtitleAlignment->
- pUserData);
+ (void *)
+ pSubtitleAlignment->pUserData);
}
}
static void __vp_subtitle_alignment_popup_key_event_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
SubtitleAlignmentPopup *pSubtitleAlignment =
- (SubtitleAlignmentPopup *) pUserData;
+ (SubtitleAlignmentPopup *) pUserData;
if (pSubtitleAlignment->pCloseCb) {
pSubtitleAlignment->pCloseCb(-1, FALSE,
- (void *) pSubtitleAlignment->
- pUserData);
+ (void *)
+ pSubtitleAlignment->pUserData);
}
}
static void __vp_subtitle_alignment_popup_mouse_event_cb(void *pUserData,
- Evas *pEvas,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas * pEvas,
+ Evas_Object *
+ pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (ev->button == 3) {
SubtitleAlignmentPopup *pSubtitleAlignment =
- (SubtitleAlignmentPopup *) pUserData;
+ (SubtitleAlignmentPopup *) pUserData;
if (pSubtitleAlignment->pCloseCb) {
pSubtitleAlignment->pCloseCb(-1, FALSE,
- (void *) pSubtitleAlignment->
- pUserData);
+ (void *)
+ pSubtitleAlignment->pUserData);
}
}
}
/* internal functions */
static void _vp_subtitle_alignment_destroy_handle(SubtitleAlignmentPopup *
- pSubtitleAlignment)
+ pSubtitleAlignment)
{
if (pSubtitleAlignment == NULL) {
VideoLogError("pSubtitleAlignment is NULL");
}
evas_object_smart_callback_del(pSubtitleAlignment->pParent,
- "rotation,changed",
- __vp_subtitle_alignment_popup_rotate_cb);
+ "rotation,changed",
+ __vp_subtitle_alignment_popup_rotate_cb);
evas_object_smart_callback_del(pSubtitleAlignment->pGenList,
- "realized",
- __vp_subtitle_alignment_genlist_realized);
+ "realized",
+ __vp_subtitle_alignment_genlist_realized);
VP_EVAS_DEL(pSubtitleAlignment->pRadio);
VP_EVAS_DEL(pSubtitleAlignment->pBox);
if (pSubtitleAlignment->st_SubtitleAlignment_Itc) {
- elm_genlist_item_class_free(pSubtitleAlignment->
- st_SubtitleAlignment_Itc);
+ elm_genlist_item_class_free
+ (pSubtitleAlignment->st_SubtitleAlignment_Itc);
pSubtitleAlignment->st_SubtitleAlignment_Itc = NULL;
}
}
static Evas_Object *_vp_subtitle_alignment_create_genlist(Evas_Object *
- pParent)
+ pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_genlist_add(pParent);
evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(pObj);
return pObj;
}
-static bool _vp_subtitle_alignment_add_genlist_item(Evas_Object *pObj,
- void *pUserData)
+static bool _vp_subtitle_alignment_add_genlist_item(Evas_Object * pObj,
+ void *pUserData)
{
if (pObj == NULL) {
VideoLogError("pObj is NULL");
}
SubtitleAlignmentPopup *pSubtitleAlignment =
- (SubtitleAlignmentPopup *) pUserData;
+ (SubtitleAlignmentPopup *) pUserData;
if (pSubtitleAlignment->st_SubtitleAlignment_Itc) {
- elm_genlist_item_class_free(pSubtitleAlignment->
- st_SubtitleAlignment_Itc);
+ elm_genlist_item_class_free
+ (pSubtitleAlignment->st_SubtitleAlignment_Itc);
pSubtitleAlignment->st_SubtitleAlignment_Itc = NULL;
}
pSubtitleAlignment->st_SubtitleAlignment_Itc =
- elm_genlist_item_class_new();
+ elm_genlist_item_class_new();
if (pSubtitleAlignment->st_SubtitleAlignment_Itc != NULL) {
pSubtitleAlignment->st_SubtitleAlignment_Itc->version =
- ELM_GENLIST_ITEM_CLASS_VERSION;
+ ELM_GENLIST_ITEM_CLASS_VERSION;
pSubtitleAlignment->st_SubtitleAlignment_Itc->item_style = "type1";
pSubtitleAlignment->st_SubtitleAlignment_Itc->func.text_get =
- (void *) __vp_subtitle_alignment_genlist_text_get_cb;
+ (void *) __vp_subtitle_alignment_genlist_text_get_cb;
pSubtitleAlignment->st_SubtitleAlignment_Itc->func.content_get =
- (void *) __vp_subtitle_alignment_genlist_content_get_cb;
- pSubtitleAlignment->st_SubtitleAlignment_Itc->func.state_get = NULL;
+ (void *) __vp_subtitle_alignment_genlist_content_get_cb;
+ pSubtitleAlignment->st_SubtitleAlignment_Itc->func.state_get =
+ NULL;
pSubtitleAlignment->st_SubtitleAlignment_Itc->func.del = NULL;
pSubtitleAlignment->nListCount = 0;
elm_genlist_item_append(pObj,
- pSubtitleAlignment->st_SubtitleAlignment_Itc,
- (void *) VP_PLAY_STRING_ALIGNMENT_LEFT, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_alignment_genlist_item_selected_cb,
- pUserData);
+ pSubtitleAlignment->
+ st_SubtitleAlignment_Itc,
+ (void *) VP_PLAY_STRING_ALIGNMENT_LEFT,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_alignment_genlist_item_selected_cb,
+ pUserData);
pSubtitleAlignment->nListCount++;
elm_genlist_item_append(pObj,
- pSubtitleAlignment->st_SubtitleAlignment_Itc,
- (void *) VP_PLAY_STRING_ALIGNMENT_CENTER,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_alignment_genlist_item_selected_cb,
- pUserData);
+ pSubtitleAlignment->
+ st_SubtitleAlignment_Itc,
+ (void *) VP_PLAY_STRING_ALIGNMENT_CENTER,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_alignment_genlist_item_selected_cb,
+ pUserData);
pSubtitleAlignment->nListCount++;
elm_genlist_item_append(pObj,
- pSubtitleAlignment->st_SubtitleAlignment_Itc,
- (void *) VP_PLAY_STRING_ALIGNMENT_RIGHT, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_alignment_genlist_item_selected_cb,
- pUserData);
+ pSubtitleAlignment->
+ st_SubtitleAlignment_Itc,
+ (void *) VP_PLAY_STRING_ALIGNMENT_RIGHT,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_alignment_genlist_item_selected_cb,
+ pUserData);
pSubtitleAlignment->nListCount++;
}
/* external functions */
subtitle_alignment_handle vp_subtitle_alignment_create(Evas_Object *
- pParent,
- PopupCloseCbFunc
- pCloseCb,
- int nDefaultAlign)
+ pParent,
+ PopupCloseCbFunc
+ pCloseCb,
+ int nDefaultAlign)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pSubtitleAlignment->pCloseCb = pCloseCb;
pSubtitleAlignment->pPopup =
- vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
- VP_PLAY_STRING_SUBTITLE_ALIGNMENT, NULL, 0.0,
- NULL, __vp_subtitle_alignment_popup_key_event_cb,
- __vp_subtitle_alignment_popup_mouse_event_cb,
- (void *) pSubtitleAlignment);
+ vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
+ VP_PLAY_STRING_SUBTITLE_ALIGNMENT, NULL, 0.0,
+ NULL, __vp_subtitle_alignment_popup_key_event_cb,
+ __vp_subtitle_alignment_popup_mouse_event_cb,
+ (void *) pSubtitleAlignment);
if (pSubtitleAlignment->pPopup == NULL) {
VideoLogError("vp_popup_create fail");
return NULL;
}
pSubtitleAlignment->pGenList =
- _vp_subtitle_alignment_create_genlist(pSubtitleAlignment->pPopup);
+ _vp_subtitle_alignment_create_genlist(pSubtitleAlignment->pPopup);
if (pSubtitleAlignment->pGenList == NULL) {
VideoLogError("_vp_subtitle_alignment_create_genlist fail");
_vp_subtitle_alignment_destroy_handle(pSubtitleAlignment);
return NULL;
}
evas_object_data_set(pSubtitleAlignment->pGenList,
- VP_SUBTITLE_ALIGNMENT_GENLIST_DATA_KEY,
- (void *) pSubtitleAlignment);
+ VP_SUBTITLE_ALIGNMENT_GENLIST_DATA_KEY,
+ (void *) pSubtitleAlignment);
evas_object_smart_callback_add(pSubtitleAlignment->pGenList,
- "realized",
- __vp_subtitle_alignment_genlist_realized,
- NULL);
+ "realized",
+ __vp_subtitle_alignment_genlist_realized,
+ NULL);
pSubtitleAlignment->nDefaultIndex = nDefaultAlign;
pSubtitleAlignment->pRadio =
- elm_radio_add(pSubtitleAlignment->pGenList);
+ elm_radio_add(pSubtitleAlignment->pGenList);
if (!_vp_subtitle_alignment_add_genlist_item
- (pSubtitleAlignment->pGenList, (void *) pSubtitleAlignment)) {
+ (pSubtitleAlignment->pGenList, (void *) pSubtitleAlignment)) {
VideoLogError("_vp_subtitle_alignment_add_genlist_item fail");
return FALSE;
}
- //elm_radio_value_set(pSubtitleAlignment->pRadio, nDefaultAlign);
+
pSubtitleAlignment->currentAlignment = nDefaultAlign;
evas_object_smart_callback_add(pSubtitleAlignment->pParent,
- "rotation,changed",
- __vp_subtitle_alignment_popup_rotate_cb,
- pSubtitleAlignment);
+ "rotation,changed",
+ __vp_subtitle_alignment_popup_rotate_cb,
+ pSubtitleAlignment);
pSubtitleAlignment->pBox = elm_box_add(pSubtitleAlignment->pPopup);
vp_popup_set_popup_min_size(pSubtitleAlignment->pParent,
- pSubtitleAlignment->pBox,
- pSubtitleAlignment->nListCount,
- VIDEO_POPUP_DEFAULT);
+ pSubtitleAlignment->pBox,
+ pSubtitleAlignment->nListCount,
+ VIDEO_POPUP_DEFAULT);
elm_box_pack_end(pSubtitleAlignment->pBox,
- pSubtitleAlignment->pGenList);
+ pSubtitleAlignment->pGenList);
elm_object_content_set(pSubtitleAlignment->pPopup,
- pSubtitleAlignment->pBox);
+ pSubtitleAlignment->pBox);
return pSubtitleAlignment;
}
void vp_subtitle_alignment_destroy(subtitle_alignment_handle
- pSubtitleAlignmentHandle)
+ pSubtitleAlignmentHandle)
{
if (pSubtitleAlignmentHandle == NULL) {
VideoLogError("pSubtitleAlignmentHandle is NULL");
}
SubtitleAlignmentPopup *pSubtitleAlignment =
- (SubtitleAlignmentPopup *) pSubtitleAlignmentHandle;
+ (SubtitleAlignmentPopup *) pSubtitleAlignmentHandle;
_vp_subtitle_alignment_destroy_handle(pSubtitleAlignment);
}
bool vp_subtitle_alignment_realize(subtitle_alignment_handle
- pSubtitleAlignmentHandle)
+ pSubtitleAlignmentHandle)
{
if (pSubtitleAlignmentHandle == NULL) {
VideoLogError("pSubtitleAlignmentHandle is NULL");
}
SubtitleAlignmentPopup *pSubtitleAlignment =
- (SubtitleAlignmentPopup *) pSubtitleAlignmentHandle;
+ (SubtitleAlignmentPopup *) pSubtitleAlignmentHandle;
evas_object_show(pSubtitleAlignment->pPopup);
}
bool vp_subtitle_alignment_unrealize(subtitle_alignment_handle
- pSubtitleAlignmentHandle)
+ pSubtitleAlignmentHandle)
{
if (pSubtitleAlignmentHandle == NULL) {
VideoLogError("pSubtitleAlignmentHandle is NULL");
}
SubtitleAlignmentPopup *pSubtitleAlignment =
- (SubtitleAlignmentPopup *) pSubtitleAlignmentHandle;
+ (SubtitleAlignmentPopup *) pSubtitleAlignmentHandle;
evas_object_hide(pSubtitleAlignment->pPopup);
}
bool vp_subtitle_alignment_set_user_data(subtitle_alignment_handle
- pSubtitleAlignmentHandle,
- void *pUserData)
+ pSubtitleAlignmentHandle,
+ void *pUserData)
{
if (pSubtitleAlignmentHandle == NULL) {
VideoLogError("pSubtitleAlignmentHandle is NULL");
}
SubtitleAlignmentPopup *pSubtitleAlignment =
- (SubtitleAlignmentPopup *) pSubtitleAlignmentHandle;
+ (SubtitleAlignmentPopup *) pSubtitleAlignmentHandle;
pSubtitleAlignment->pUserData = pUserData;
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
#include "vp-play-string-define.h"
static void _vp_subtitle_bg_color_destroy_handle(SubtitleBGColorPopup *
- pSubtitleBGColor);
+ pSubtitleBGColor);
static void __vp_subtitle_bg_color_genlist_item_selected_cb(void
- *pUserData,
- Evas_Object *pObject,
- void *pEventInfo);
+ *pUserData,
+ Evas_Object *
+ pObject,
+ void
+ *pEventInfo);
static void __vp_subtitle_bg_color_genlist_realized(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
VP_GENLIST_HIDE_BOTTOMLINE(data, obj, event_info);
}
static void __vp_subtitle_bg_color_popup_rotate_cb(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
- SubtitleBGColorPopup *pSubtitleBGColor =
- (SubtitleBGColorPopup *) data;
+ SubtitleBGColorPopup *pSubtitleBGColor = (SubtitleBGColorPopup *) data;
if (!pSubtitleBGColor) {
VideoLogError("pSubtitleBGColor IS null");
return;
return;
}
vp_popup_set_popup_min_size(pSubtitleBGColor->pParent,
- pSubtitleBGColor->pBox,
- pSubtitleBGColor->nListCount,
- VIDEO_POPUP_DEFAULT);
+ pSubtitleBGColor->pBox,
+ pSubtitleBGColor->nListCount,
+ VIDEO_POPUP_DEFAULT);
}
/* callback functions */
static char *__vp_subtitle_bg_color_genlist_text_get_cb(const void
- *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ *pUserData,
+ Evas_Object * pObj,
+ const char *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
static Evas_Object *__vp_subtitle_bg_color_genlist_content_get_cb(const
- void *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ void
+ *pUserData,
+ Evas_Object
+ *pObj,
+ const
+ char
+ *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Evas_Object *pRadioObj = NULL;
SubtitleBGColorPopup *pSubtitleBGColor =
- (SubtitleBGColorPopup *) evas_object_data_get(pObj,
- VP_SUBTITLE_BG_COLOR_GENLIST_DATA_KEY);
+ (SubtitleBGColorPopup *) evas_object_data_get(pObj,
+ VP_SUBTITLE_BG_COLOR_GENLIST_DATA_KEY);
if (pSubtitleBGColor == NULL) {
VideoLogWarning("evas_object_data_get is fail");
return NULL;
elm_radio_state_value_set(pRadioObj, nColor);
elm_radio_group_add(pRadioObj, pSubtitleBGColor->pRadio);
elm_radio_value_set(pSubtitleBGColor->pRadio,
- pSubtitleBGColor->currentBgColor);
+ pSubtitleBGColor->currentBgColor);
evas_object_smart_callback_add(pRadioObj, "changed",
- __vp_subtitle_bg_color_genlist_item_selected_cb,
- pSubtitleBGColor);
+ __vp_subtitle_bg_color_genlist_item_selected_cb,
+ pSubtitleBGColor);
evas_object_show(pRadioObj);
return pRadioObj;
}
static void __vp_subtitle_bg_color_genlist_item_selected_cb(void
- *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ *pUserData,
+ Evas_Object *
+ pObject,
+ void
+ *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Elm_Object_Item *pItem = (Elm_Object_Item *) pEventInfo;
Elm_Object_Item *pSelectedItem =
- elm_genlist_selected_item_get(pObject);
+ elm_genlist_selected_item_get(pObject);
if (pSelectedItem) {
elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
}
char *szTxt = (char *) elm_object_item_data_get(pItem);
SubtitleBGColorPopup *pSubtitleBGColor =
- (SubtitleBGColorPopup *) pUserData;
+ (SubtitleBGColorPopup *) pUserData;
if (szTxt == NULL) {
VideoLogError("szTxt is NULL");
pSubtitleBGColor->currentBgColor = nColor;
if (pSubtitleBGColor->pCloseCb) {
pSubtitleBGColor->pCloseCb(nColor, FALSE,
- (void *) pSubtitleBGColor->pUserData);
+ (void *) pSubtitleBGColor->pUserData);
}
}
static void __vp_subtitle_bg_color_popup_key_event_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
SubtitleBGColorPopup *pSubtitleBGColor =
- (SubtitleBGColorPopup *) pUserData;
+ (SubtitleBGColorPopup *) pUserData;
if (pSubtitleBGColor->pCloseCb) {
pSubtitleBGColor->pCloseCb(-1, FALSE,
- (void *) pSubtitleBGColor->pUserData);
+ (void *) pSubtitleBGColor->pUserData);
}
}
static void __vp_subtitle_bg_color_popup_mouse_event_cb(void *pUserData,
- Evas *pEvas,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas * pEvas,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (ev->button == 3) {
SubtitleBGColorPopup *pSubtitleBGColor =
- (SubtitleBGColorPopup *) pUserData;
+ (SubtitleBGColorPopup *) pUserData;
if (pSubtitleBGColor->pCloseCb) {
pSubtitleBGColor->pCloseCb(-1, FALSE,
- (void *) pSubtitleBGColor->
- pUserData);
+ (void *)
+ pSubtitleBGColor->pUserData);
}
}
}
/* internal functions */
static void _vp_subtitle_bg_color_destroy_handle(SubtitleBGColorPopup *
- pSubtitleBGColor)
+ pSubtitleBGColor)
{
if (pSubtitleBGColor == NULL) {
VideoLogError("pSubtitleBGColor is NULL");
}
evas_object_smart_callback_del(pSubtitleBGColor->pParent,
- "rotation,changed",
- __vp_subtitle_bg_color_popup_rotate_cb);
+ "rotation,changed",
+ __vp_subtitle_bg_color_popup_rotate_cb);
evas_object_smart_callback_del(pSubtitleBGColor->pGenList, "realized",
- __vp_subtitle_bg_color_genlist_realized);
+ __vp_subtitle_bg_color_genlist_realized);
VP_EVAS_DEL(pSubtitleBGColor->pRadio);
VP_EVAS_DEL(pSubtitleBGColor->pGenList);
VP_EVAS_DEL(pSubtitleBGColor->pBox);
if (pSubtitleBGColor->st_SubtitleBGColor_Itc) {
- elm_genlist_item_class_free(pSubtitleBGColor->
- st_SubtitleBGColor_Itc);
+ elm_genlist_item_class_free
+ (pSubtitleBGColor->st_SubtitleBGColor_Itc);
pSubtitleBGColor->st_SubtitleBGColor_Itc = NULL;
}
static Evas_Object *_vp_subtitle_bg_color_create_genlist(Evas_Object *
- pParent)
+ pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_genlist_add(pParent);
evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(pObj);
return pObj;
}
-static bool _vp_subtitle_bg_color_add_genlist_item(Evas_Object *pObj,
- void *pUserData)
+static bool _vp_subtitle_bg_color_add_genlist_item(Evas_Object * pObj,
+ void *pUserData)
{
if (pObj == NULL) {
VideoLogError("pObj is NULL");
}
SubtitleBGColorPopup *pSubtitleBGColor =
- (SubtitleBGColorPopup *) pUserData;
+ (SubtitleBGColorPopup *) pUserData;
if (pSubtitleBGColor->st_SubtitleBGColor_Itc) {
- elm_genlist_item_class_free(pSubtitleBGColor->
- st_SubtitleBGColor_Itc);
+ elm_genlist_item_class_free
+ (pSubtitleBGColor->st_SubtitleBGColor_Itc);
pSubtitleBGColor->st_SubtitleBGColor_Itc = NULL;
}
pSubtitleBGColor->st_SubtitleBGColor_Itc =
- elm_genlist_item_class_new();
+ elm_genlist_item_class_new();
if (pSubtitleBGColor->st_SubtitleBGColor_Itc != NULL) {
pSubtitleBGColor->st_SubtitleBGColor_Itc->version =
- ELM_GENLIST_ITEM_CLASS_VERSION;
+ ELM_GENLIST_ITEM_CLASS_VERSION;
pSubtitleBGColor->st_SubtitleBGColor_Itc->item_style =
- "1text.1icon.3/popup";
+ "1text.1icon.3/popup";
pSubtitleBGColor->st_SubtitleBGColor_Itc->func.text_get =
- (void *) __vp_subtitle_bg_color_genlist_text_get_cb;
+ (void *) __vp_subtitle_bg_color_genlist_text_get_cb;
pSubtitleBGColor->st_SubtitleBGColor_Itc->func.content_get =
- (void *) __vp_subtitle_bg_color_genlist_content_get_cb;
+ (void *) __vp_subtitle_bg_color_genlist_content_get_cb;
pSubtitleBGColor->st_SubtitleBGColor_Itc->func.state_get = NULL;
pSubtitleBGColor->st_SubtitleBGColor_Itc->func.del = NULL;
pSubtitleBGColor->nListCount = 0;
elm_genlist_item_append(pObj,
- pSubtitleBGColor->st_SubtitleBGColor_Itc,
- (void *) VP_PLAY_STRING_SUBTITLE_COLOR_NONE,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_bg_color_genlist_item_selected_cb,
- pUserData);
+ pSubtitleBGColor->st_SubtitleBGColor_Itc,
+ (void *)
+ VP_PLAY_STRING_SUBTITLE_COLOR_NONE, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_bg_color_genlist_item_selected_cb,
+ pUserData);
pSubtitleBGColor->nListCount++;
elm_genlist_item_append(pObj,
- pSubtitleBGColor->st_SubtitleBGColor_Itc,
- (void *) VP_PLAY_STRING_SUBTITLE_COLOR_BLACK,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_bg_color_genlist_item_selected_cb,
- pUserData);
+ pSubtitleBGColor->st_SubtitleBGColor_Itc,
+ (void *)
+ VP_PLAY_STRING_SUBTITLE_COLOR_BLACK, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_bg_color_genlist_item_selected_cb,
+ pUserData);
pSubtitleBGColor->nListCount++;
elm_genlist_item_append(pObj,
- pSubtitleBGColor->st_SubtitleBGColor_Itc,
- (void *) VP_PLAY_STRING_SUBTITLE_COLOR_WHITE,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_bg_color_genlist_item_selected_cb,
- pUserData);
+ pSubtitleBGColor->st_SubtitleBGColor_Itc,
+ (void *)
+ VP_PLAY_STRING_SUBTITLE_COLOR_WHITE, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_bg_color_genlist_item_selected_cb,
+ pUserData);
pSubtitleBGColor->nListCount++;
}
/* external functions */
subtitle_bg_color_handle vp_subtitle_bg_color_create(Evas_Object *
- pParent,
- PopupCloseCbFunc
- pCloseCb,
- int nDefaultColor)
+ pParent,
+ PopupCloseCbFunc
+ pCloseCb,
+ int nDefaultColor)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pSubtitleBGColor->pCloseCb = pCloseCb;
pSubtitleBGColor->pPopup =
- vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
- VP_PLAY_STRING_SUBTITLE_BG_COLOR, NULL, 0.0, NULL,
- __vp_subtitle_bg_color_popup_key_event_cb,
- __vp_subtitle_bg_color_popup_mouse_event_cb,
- (void *) pSubtitleBGColor);
+ vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
+ VP_PLAY_STRING_SUBTITLE_BG_COLOR, NULL, 0.0, NULL,
+ __vp_subtitle_bg_color_popup_key_event_cb,
+ __vp_subtitle_bg_color_popup_mouse_event_cb,
+ (void *) pSubtitleBGColor);
if (pSubtitleBGColor->pPopup == NULL) {
VideoLogError("vp_popup_create fail");
_vp_subtitle_bg_color_destroy_handle(pSubtitleBGColor);
}
pSubtitleBGColor->pGenList =
- _vp_subtitle_bg_color_create_genlist(pSubtitleBGColor->pPopup);
+ _vp_subtitle_bg_color_create_genlist(pSubtitleBGColor->pPopup);
if (pSubtitleBGColor->pGenList == NULL) {
VideoLogError("_vp_subtitle_bg_color_create_genlist fail");
_vp_subtitle_bg_color_destroy_handle(pSubtitleBGColor);
return NULL;
}
evas_object_data_set(pSubtitleBGColor->pGenList,
- VP_SUBTITLE_BG_COLOR_GENLIST_DATA_KEY,
- (void *) pSubtitleBGColor);
+ VP_SUBTITLE_BG_COLOR_GENLIST_DATA_KEY,
+ (void *) pSubtitleBGColor);
evas_object_smart_callback_add(pSubtitleBGColor->pGenList, "realized",
- __vp_subtitle_bg_color_genlist_realized,
- NULL);
+ __vp_subtitle_bg_color_genlist_realized,
+ NULL);
pSubtitleBGColor->nDefaultIndex = nDefaultColor;
pSubtitleBGColor->pRadio = elm_radio_add(pSubtitleBGColor->pGenList);
if (!_vp_subtitle_bg_color_add_genlist_item
- (pSubtitleBGColor->pGenList, (void *) pSubtitleBGColor)) {
+ (pSubtitleBGColor->pGenList, (void *) pSubtitleBGColor)) {
VideoLogError("_vp_subtitle_bg_color_add_genlist_item fail");
return FALSE;
}
- //elm_radio_value_set(pSubtitleBGColor->pRadio, nDefaultColor);
+
pSubtitleBGColor->currentBgColor = nDefaultColor;
evas_object_smart_callback_add(pSubtitleBGColor->pParent,
- "rotation,changed",
- __vp_subtitle_bg_color_popup_rotate_cb,
- pSubtitleBGColor);
+ "rotation,changed",
+ __vp_subtitle_bg_color_popup_rotate_cb,
+ pSubtitleBGColor);
pSubtitleBGColor->pBox = elm_box_add(pSubtitleBGColor->pPopup);
vp_popup_set_popup_min_size(pSubtitleBGColor->pParent,
- pSubtitleBGColor->pBox,
- pSubtitleBGColor->nListCount,
- VIDEO_POPUP_DEFAULT);
+ pSubtitleBGColor->pBox,
+ pSubtitleBGColor->nListCount,
+ VIDEO_POPUP_DEFAULT);
elm_box_pack_end(pSubtitleBGColor->pBox, pSubtitleBGColor->pGenList);
elm_object_content_set(pSubtitleBGColor->pPopup,
- pSubtitleBGColor->pBox);
+ pSubtitleBGColor->pBox);
return pSubtitleBGColor;
}
void vp_subtitle_bg_color_destroy(subtitle_bg_color_handle
- pSubtitleBGColorHandle)
+ pSubtitleBGColorHandle)
{
if (pSubtitleBGColorHandle == NULL) {
VideoLogError("pSubtitleBGColorHandle is NULL");
}
SubtitleBGColorPopup *pSubtitleBGColor =
- (SubtitleBGColorPopup *) pSubtitleBGColorHandle;
+ (SubtitleBGColorPopup *) pSubtitleBGColorHandle;
_vp_subtitle_bg_color_destroy_handle(pSubtitleBGColor);
}
bool vp_subtitle_bg_color_realize(subtitle_bg_color_handle
- pSubtitleBGColorHandle)
+ pSubtitleBGColorHandle)
{
if (pSubtitleBGColorHandle == NULL) {
VideoLogError("pSubtitleBGColorHandle is NULL");
}
SubtitleBGColorPopup *pSubtitleBGColor =
- (SubtitleBGColorPopup *) pSubtitleBGColorHandle;
+ (SubtitleBGColorPopup *) pSubtitleBGColorHandle;
evas_object_show(pSubtitleBGColor->pPopup);
}
bool vp_subtitle_bg_color_unrealize(subtitle_bg_color_handle
- pSubtitleBGColorHandle)
+ pSubtitleBGColorHandle)
{
if (pSubtitleBGColorHandle == NULL) {
VideoLogError("pSubtitleBGColorHandle is NULL");
}
SubtitleBGColorPopup *pSubtitleBGColor =
- (SubtitleBGColorPopup *) pSubtitleBGColorHandle;
+ (SubtitleBGColorPopup *) pSubtitleBGColorHandle;
evas_object_hide(pSubtitleBGColor->pPopup);
}
bool vp_subtitle_bg_color_set_user_data(subtitle_bg_color_handle
- pSubtitleBGColorHandle,
- void *pUserData)
+ pSubtitleBGColorHandle,
+ void *pUserData)
{
if (pSubtitleBGColorHandle == NULL) {
VideoLogError("pSubtitleBGColorHandle is NULL");
}
SubtitleBGColorPopup *pSubtitleBGColor =
- (SubtitleBGColorPopup *) pSubtitleBGColorHandle;
+ (SubtitleBGColorPopup *) pSubtitleBGColorHandle;
pSubtitleBGColor->pUserData = pUserData;
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
#include "vp-play-string-define.h"
typedef struct _SubtitleColorplane_Data {
Evas_Object *layout;
- //Evas_Object *rect;
Evas_Object *colorselector;
Elm_Object_Item *it_last;
Elm_Object_Item *sel_it;
static void _vp_subtitle_color_destroy_handle(SubtitleColorPopup *
- pSubtitleColor);
+ pSubtitleColor);
#ifndef SUBTITLE_K_FEATURE
static void __vp_subtitle_color_genlist_item_selected_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo);
+ Evas_Object *
+ pObject,
+ void *pEventInfo);
static void __vp_subtitle_color_genlist_realized(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
VP_GENLIST_HIDE_BOTTOMLINE(data, obj, event_info);
}
#endif
static void __vp_subtitle_color_popup_rotate_cb(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
SubtitleColorPopup *pSubtitleColor = (SubtitleColorPopup *) data;
if (!pSubtitleColor) {
VideoLogError("pSubtitleColor IS null");
return;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_SUBTITLE_COLOR_POPUP_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_SUBTITLE_COLOR_POPUP_EDJ);
free(path);
#ifndef SUBTITLE_K_FEATURE
if (pSubtitleColor->nListCount < VP_POPUP_MIN_ITEMS) {
return;
}
vp_popup_set_popup_min_size(pSubtitleColor->pParent,
- pSubtitleColor->pBox,
- pSubtitleColor->nListCount,
- VIDEO_POPUP_DEFAULT);
+ pSubtitleColor->pBox,
+ pSubtitleColor->nListCount,
+ VIDEO_POPUP_DEFAULT);
#else
int nRotation = elm_win_rotation_get(pSubtitleColor->pParent);
if (nRotation == 90 || nRotation == 270)
elm_layout_file_set(pSubtitleColor->pLayoutOut,
- edj_path,
- "pv.subtitle.scroller.layout.landscape");
+ edj_path,
+ "pv.subtitle.scroller.layout.landscape");
else
elm_layout_file_set(pSubtitleColor->pLayoutOut,
- edj_path,
- "pv.subtitle.scroller.layout");
+ edj_path, "pv.subtitle.scroller.layout");
#endif
}
/* callback functions */
static char *__vp_subtitle_color_genlist_text_get_cb(const void
- *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ *pUserData,
+ Evas_Object * pObj,
+ const char *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
static Evas_Object *__vp_subtitle_color_genlist_content_get_cb(const void
- *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ *pUserData,
+ Evas_Object
+ *pObj,
+ const char
+ *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Evas_Object *pRadioObj = NULL;
SubtitleColorPopup *pSubtitleColor =
- (SubtitleColorPopup *) evas_object_data_get(pObj,
- VP_SUBTITLE_COLOR_GENLIST_DATA_KEY);
+ (SubtitleColorPopup *) evas_object_data_get(pObj,
+ VP_SUBTITLE_COLOR_GENLIST_DATA_KEY);
if (pSubtitleColor == NULL) {
VideoLogWarning("evas_object_data_get is fail");
return NULL;
elm_radio_state_value_set(pRadioObj, nColor);
elm_radio_group_add(pRadioObj, pSubtitleColor->pRadio);
elm_radio_value_set(pSubtitleColor->pRadio,
- pSubtitleColor->currentFontColor);
+ pSubtitleColor->currentFontColor);
evas_object_smart_callback_add(pRadioObj, "changed",
- __vp_subtitle_color_genlist_item_selected_cb,
- pSubtitleColor);
+ __vp_subtitle_color_genlist_item_selected_cb,
+ pSubtitleColor);
evas_object_show(pRadioObj);
return pRadioObj;
}
static void __vp_subtitle_color_genlist_item_selected_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Elm_Object_Item *pItem = (Elm_Object_Item *) pEventInfo;
Elm_Object_Item *pSelectedItem =
- elm_genlist_selected_item_get(pObject);
+ elm_genlist_selected_item_get(pObject);
if (pSelectedItem) {
elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
}
pSubtitleColor->currentFontColor = nColor;
if (pSubtitleColor->pCloseCb) {
pSubtitleColor->pCloseCb(nColor, FALSE,
- (void *) pSubtitleColor->pUserData);
+ (void *) pSubtitleColor->pUserData);
}
}
#endif
static void __vp_subtitle_color_popup_key_event_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pSubtitleColor->pCloseCb) {
#ifndef SUBTITLE_K_FEATURE
pSubtitleColor->pCloseCb(-1, FALSE,
- (void *) pSubtitleColor->pUserData);
+ (void *) pSubtitleColor->pUserData);
#else
pSubtitleColor->pCloseCb(pSubtitleColor->pCurrentColorHex, FALSE,
- (void *) pSubtitleColor->pUserData);
+ (void *) pSubtitleColor->pUserData);
#endif
}
}
static void __vp_subtitle_color_popup_mouse_event_cb(void *pUserData,
- Evas *pEvas,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas * pEvas,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (ev->button == 3) {
SubtitleColorPopup *pSubtitleColor =
- (SubtitleColorPopup *) pUserData;
+ (SubtitleColorPopup *) pUserData;
#ifndef SUBTITLE_K_FEATURE
pSubtitleColor->pCloseCb(-1, FALSE,
- (void *) pSubtitleColor->pUserData);
+ (void *) pSubtitleColor->pUserData);
#else
pSubtitleColor->pCloseCb(pSubtitleColor->pCurrentColorHex, FALSE,
- (void *) pSubtitleColor->pUserData);
+ (void *) pSubtitleColor->pUserData);
#endif
}
}
VP_FREE(szOpacity);
- int nOpacity = (int)((fOpacity * 100) / 255.0 + 0.5);
+ int nOpacity = (int) ((fOpacity * 100) / 255.0 + 0.5);
VideoLogInfo("nOpacity", nOpacity);
return 0;
}
- int nOpacitytmp = (int)(((float)(nOpacity * 255) / 100.0) + 0.5);
+ int nOpacitytmp = (int) (((float) (nOpacity * 255) / 100.0) + 0.5);
char *pOpacityHex = g_strdup_printf("%02x", nOpacitytmp);
}
static void _vp_subtitle_color_destroy_handle(SubtitleColorPopup *
- pSubtitleColor)
+ pSubtitleColor)
{
if (pSubtitleColor == NULL) {
VideoLogError("pSubtitleColor is NULL");
}
evas_object_smart_callback_del(pSubtitleColor->pParent,
- "rotation,changed",
- __vp_subtitle_color_popup_rotate_cb);
+ "rotation,changed",
+ __vp_subtitle_color_popup_rotate_cb);
#ifndef SUBTITLE_K_FEATURE
evas_object_smart_callback_del(pSubtitleColor->pGenList, "realized",
- __vp_subtitle_color_genlist_realized);
+ __vp_subtitle_color_genlist_realized);
#endif
VP_EVAS_DEL(pSubtitleColor->pCancelButton);
#endif
if (pSubtitleColor->st_SubtitleFontColor_Itc) {
- elm_genlist_item_class_free(pSubtitleColor->
- st_SubtitleFontColor_Itc);
+ elm_genlist_item_class_free
+ (pSubtitleColor->st_SubtitleFontColor_Itc);
pSubtitleColor->st_SubtitleFontColor_Itc = NULL;
}
#ifndef SUBTITLE_K_FEATURE
static Evas_Object *_vp_subtitle_color_create_genlist(Evas_Object *
- pParent)
+ pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_genlist_add(pParent);
evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(pObj);
return pObj;
}
-static bool _vp_subtitle_color_add_genlist_item(Evas_Object *pObj,
- void *pUserData)
+static bool _vp_subtitle_color_add_genlist_item(Evas_Object * pObj,
+ void *pUserData)
{
if (pObj == NULL) {
VideoLogError("pObj is NULL");
SubtitleColorPopup *pSubtitleColor = (SubtitleColorPopup *) pUserData;
if (pSubtitleColor->st_SubtitleFontColor_Itc) {
- elm_genlist_item_class_free(pSubtitleColor->
- st_SubtitleFontColor_Itc);
+ elm_genlist_item_class_free
+ (pSubtitleColor->st_SubtitleFontColor_Itc);
pSubtitleColor->st_SubtitleFontColor_Itc = NULL;
}
pSubtitleColor->st_SubtitleFontColor_Itc =
- elm_genlist_item_class_new();
+ elm_genlist_item_class_new();
pSubtitleColor->st_SubtitleFontColor_Itc->version =
- ELM_GENLIST_ITEM_CLASS_VERSION;
+ ELM_GENLIST_ITEM_CLASS_VERSION;
pSubtitleColor->st_SubtitleFontColor_Itc->item_style =
- "1text.1icon.3/popup";
+ "1text.1icon.3/popup";
pSubtitleColor->st_SubtitleFontColor_Itc->func.text_get =
- (void *) __vp_subtitle_color_genlist_text_get_cb;
+ (void *) __vp_subtitle_color_genlist_text_get_cb;
pSubtitleColor->st_SubtitleFontColor_Itc->func.content_get =
- (void *) __vp_subtitle_color_genlist_content_get_cb;
+ (void *) __vp_subtitle_color_genlist_content_get_cb;
pSubtitleColor->st_SubtitleFontColor_Itc->func.state_get = NULL;
pSubtitleColor->st_SubtitleFontColor_Itc->func.del = NULL;
pSubtitleColor->nListCount = 0;
elm_genlist_item_append(pObj,
- pSubtitleColor->st_SubtitleFontColor_Itc,
- (void *) VP_PLAY_STRING_SUBTITLE_COLOR_WHITE,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_color_genlist_item_selected_cb,
- pUserData);
+ pSubtitleColor->st_SubtitleFontColor_Itc,
+ (void *) VP_PLAY_STRING_SUBTITLE_COLOR_WHITE,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_color_genlist_item_selected_cb,
+ pUserData);
pSubtitleColor->nListCount++;
elm_genlist_item_append(pObj,
- pSubtitleColor->st_SubtitleFontColor_Itc,
- (void *) VP_PLAY_STRING_SUBTITLE_COLOR_BLUE,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_color_genlist_item_selected_cb,
- pUserData);
+ pSubtitleColor->st_SubtitleFontColor_Itc,
+ (void *) VP_PLAY_STRING_SUBTITLE_COLOR_BLUE,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_color_genlist_item_selected_cb,
+ pUserData);
pSubtitleColor->nListCount++;
elm_genlist_item_append(pObj,
- pSubtitleColor->st_SubtitleFontColor_Itc,
- (void *) VP_PLAY_STRING_SUBTITLE_COLOR_GREEN,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_color_genlist_item_selected_cb,
- pUserData);
+ pSubtitleColor->st_SubtitleFontColor_Itc,
+ (void *) VP_PLAY_STRING_SUBTITLE_COLOR_GREEN,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_color_genlist_item_selected_cb,
+ pUserData);
pSubtitleColor->nListCount++;
elm_genlist_item_append(pObj,
- pSubtitleColor->st_SubtitleFontColor_Itc,
- (void *) VP_PLAY_STRING_SUBTITLE_COLOR_BLACK,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_color_genlist_item_selected_cb,
- pUserData);
+ pSubtitleColor->st_SubtitleFontColor_Itc,
+ (void *) VP_PLAY_STRING_SUBTITLE_COLOR_BLACK,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_color_genlist_item_selected_cb,
+ pUserData);
pSubtitleColor->nListCount++;
return TRUE;
/* callback functions */
static void __vp_play_subtitle_color_popup_ok_btn_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
SubtitleColorPopup *pSubtitleColor = (SubtitleColorPopup *) pUserData;
char *pColorHex =
- _vp_subtitle_color_get_select_color(pSubtitleColor->
- pCurrentColorHex,
- pSubtitleColor->nOpacityVal);
+ _vp_subtitle_color_get_select_color
+ (pSubtitleColor->pCurrentColorHex,
+ pSubtitleColor->nOpacityVal);
if (pSubtitleColor->pCloseCb) {
pSubtitleColor->pCloseCb(pColorHex, TRUE,
- (void *) pSubtitleColor->pUserData);
+ (void *) pSubtitleColor->pUserData);
}
VP_FREE(pColorHex);
}
static void __vp_play_subtitle_color_popup_cancel_btn_cb(void *pUserData,
- Evas_Object *
- pObj,
- void *pEventInfo)
+ Evas_Object *
+ pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pSubtitleColor->pCloseCb) {
pSubtitleColor->pCloseCb(pSubtitleColor->pCurrentColorHex, FALSE,
- (void *) pSubtitleColor->pUserData);
+ (void *) pSubtitleColor->pUserData);
}
}
static Evas_Object
-*_vp_play_subtitle_color_popup_create_ok_button(Evas_Object *pParent,
- void *pUserData)
+ *_vp_play_subtitle_color_popup_create_ok_button(Evas_Object *pParent,
+ void *pUserData)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_button_add(pParent);
elm_object_style_set(pObj, "popup_button/default");
elm_object_domain_translatable_text_set(pObj, VP_SYS_STR_PREFIX,
- VP_PLAY_STRING_COM_DONE);
+ VP_PLAY_STRING_COM_DONE);
elm_object_part_content_set(pParent, "button2", pObj);
evas_object_smart_callback_add(pObj, "clicked",
- __vp_play_subtitle_color_popup_ok_btn_cb,
- pUserData);
+ __vp_play_subtitle_color_popup_ok_btn_cb,
+ pUserData);
evas_object_show(pObj);
return pObj;
}
static Evas_Object
-*_vp_play_subtitle_color_popup_create_cancel_button(Evas_Object *
- pParent,
- void *pUserData)
+ *_vp_play_subtitle_color_popup_create_cancel_button(Evas_Object
+ *pParent,
+ void *pUserData)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_button_add(pParent);
elm_object_style_set(pObj, "popup_button/default");
elm_object_domain_translatable_text_set(pObj, VP_SYS_STR_PREFIX,
- VP_PLAY_STRING_COM_CANCEL_IDS);
+ VP_PLAY_STRING_COM_CANCEL_IDS);
elm_object_part_content_set(pParent, "button1", pObj);
evas_object_smart_callback_add(pObj, "clicked",
- __vp_play_subtitle_color_popup_cancel_btn_cb,
- pUserData);
+ __vp_play_subtitle_color_popup_cancel_btn_cb,
+ pUserData);
evas_object_show(pObj);
return pObj;
}
static void _vp_play_subtitle_color_popup_colorpalette_cb(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object *
+ obj,
+ void *event_info)
{
if (data == NULL) {
VideoLogError("pUserData is NULL");
VP_FREE(pSubtitleColor->pCurrentColorHex);
pSubtitleColor->pCurrentColorHex =
- vp_play_util_convert_rgba_to_hex(r, g, b, a);
+ vp_play_util_convert_rgba_to_hex(r, g, b, a);
char *color_fmt = "<color=%s>%s</color>";
- char *caption_txt = g_strdup_printf(color_fmt, pSubtitleColor->pCurrentColorHex, VP_PLAY_STRING_PREVIEW_SUBTITLE_CC);
- elm_object_part_text_set(cp->layout, "pv.subtitle-color-popup.subject", caption_txt);
+ char *caption_txt =
+ g_strdup_printf(color_fmt, pSubtitleColor->pCurrentColorHex,
+ VP_PLAY_STRING_PREVIEW_SUBTITLE_CC);
+ elm_object_part_text_set(cp->layout, "pv.subtitle-color-popup.subject",
+ caption_txt);
//Need Free;
VideoLogInfo("p = %s", pSubtitleColor->pCurrentColorHex);
}
static void _vp_play_subtitle_color_popup_colorplane_cb(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
if (data == NULL) {
VideoLogError("pUserData is NULL");
SubtitleColorplaneData *cp = pSubtitleColor->pColorplaneData;
if (!cp->changed) {
elm_object_item_signal_emit(cp->it_last, "elm,state,custom,hide",
- "");
+ "");
cp->changed = EINA_TRUE;
}
elm_colorselector_color_get(cp->colorselector, &r, &g, &b, &a);
cp->g = g;
cp->b = b;
cp->a = a;
- //elm_colorselector_palette_item_color_set(cp->it_last, r, g, b, a);
- //if (cp->sel_it != cp->it_last) {
- //elm_object_item_signal_emit(cp->it_last, "elm,state,selected",
- //"elm");
- //}
VP_FREE(pSubtitleColor->pCurrentColorHex);
pSubtitleColor->pCurrentColorHex =
- vp_play_util_convert_rgba_to_hex(r, g, b, a);
+ vp_play_util_convert_rgba_to_hex(r, g, b, a);
}
-static void _vp_play_subtitle_color_popup_create_colorpalette(Evas_Object *layout,
- SubtitleColorPopup *pSubtitleColorPopup)
+static void _vp_play_subtitle_color_popup_create_colorpalette(Evas_Object *
+ layout,
+ SubtitleColorPopup
+ *
+ pSubtitleColorPopup)
{
if (pSubtitleColorPopup == NULL) {
VideoLogError("pSubtitleColorPopup is NULL");
SubtitleColorplaneData *cp = pSubtitleColorPopup->pColorplaneData;
int nIndex =
- _vp_subtitle_color_get_platte_index(pSubtitleColorPopup->
- pCurrentColorHex);
+ _vp_subtitle_color_get_platte_index
+ (pSubtitleColorPopup->pCurrentColorHex);
/* add color palette widget */
Eina_List *last_list;
cp->layout = layout;
cp->colorselector = elm_colorselector_add(layout);
elm_object_style_set(cp->colorselector, "colorplane");
- //elm_colorselector_mode_set(cp->colorselector, ELM_COLORSELECTOR_PALETTE_PLANE);
evas_object_size_hint_fill_set(cp->colorselector, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_size_hint_weight_set(cp->colorselector, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
elm_object_part_content_set(layout,
- "pv.subtitle-color-popup.colorpalette.swallow",
- cp->colorselector);
+ "pv.subtitle-color-popup.colorpalette.swallow",
+ cp->colorselector);
evas_object_smart_callback_add(cp->colorselector,
- "color,item,selected",
- _vp_play_subtitle_color_popup_colorpalette_cb,
- pSubtitleColorPopup);
+ "color,item,selected",
+ _vp_play_subtitle_color_popup_colorpalette_cb,
+ pSubtitleColorPopup);
edje_object_message_signal_process(elm_layout_edje_get(layout));
elm_colorselector_palette_color_add(cp->colorselector, 255, 255, 255, 255); //white
elm_colorselector_palette_color_add(cp->colorselector, 9, 41, 107, 255); //sapphire
elm_colorselector_palette_color_add(cp->colorselector, 167, 164, 165, 255); //grey
elm_colorselector_palette_color_add(cp->colorselector, 0, 0, 0, 255); //black
- //elm_colorselector_palette_color_add(cp->colorselector, 0, 0, 0, 255); //auto
color_list = elm_colorselector_palette_items_get(cp->colorselector);
last_list = eina_list_last(color_list);
cp->it_last = eina_list_data_get(last_list);
- //elm_object_item_signal_emit(cp->it_last, "elm,state,custom,show", "");
cp->changed = EINA_FALSE;
evas_object_smart_callback_add(cp->colorselector, "changed",
- _vp_play_subtitle_color_popup_colorplane_cb,
- pSubtitleColorPopup);
+ _vp_play_subtitle_color_popup_colorplane_cb,
+ pSubtitleColorPopup);
cp->sel_it = eina_list_nth(color_list, nIndex);
elm_object_item_signal_emit(cp->sel_it, "elm,state,selected", "elm");
- /*if (nIndex == 8) {
- int r, g, b, a;
- vp_play_util_convert_hex_to_rgba(pSubtitleColorPopup->
- pCurrentColorHex, &r, &g, &b,
- &a);
- elm_colorselector_palette_item_color_set(cp->it_last, r, g, b,
- 255);
- }*/
}
static Evas_Object
-*_vp_play_subtitle_color_popup_create_layout(Evas_Object *pParent)
+ *_vp_play_subtitle_color_popup_create_layout(Evas_Object * pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
VideoLogError("pLayout object is NULL");
return NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *szColorHex = NULL;
int r = 255, g = 255, b = 255, a = 255;
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_SUBTITLE_COLOR_POPUP_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_SUBTITLE_COLOR_POPUP_EDJ);
free(path);
elm_layout_file_set(pLayout, edj_path,
- VP_PLAY_EDJ_GROUP_PLAY_SUBTITLE_COLOR_POPUP);
+ VP_PLAY_EDJ_GROUP_PLAY_SUBTITLE_COLOR_POPUP);
evas_object_size_hint_weight_set(pLayout, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pLayout, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
- if(vp_play_preference_get_subtitle_font_color_hex_key(&szColorHex) == TRUE) {
+ if (vp_play_preference_get_subtitle_font_color_hex_key(&szColorHex) ==
+ TRUE) {
vp_play_util_convert_hex_to_rgba(szColorHex, &r, &g, &b, &a);
char *color_fmt = "<color=%s>%s</color>";
- char *caption_txt = g_strdup_printf(color_fmt, szColorHex, VP_PLAY_STRING_PREVIEW_SUBTITLE_CC);
- elm_object_part_text_set(pLayout, "pv.subtitle-color-popup.subject", caption_txt);
+ char *caption_txt =
+ g_strdup_printf(color_fmt, szColorHex,
+ VP_PLAY_STRING_PREVIEW_SUBTITLE_CC);
+ elm_object_part_text_set(pLayout,
+ "pv.subtitle-color-popup.subject",
+ caption_txt);
VP_FREE(szColorHex);
}
- elm_object_part_text_set(pLayout, "pv.subtitle-color-popup.subject", VP_PLAY_STRING_PREVIEW_SUBTITLE_CC);
+ elm_object_part_text_set(pLayout, "pv.subtitle-color-popup.subject",
+ VP_PLAY_STRING_PREVIEW_SUBTITLE_CC);
evas_object_show(pLayout);
return pLayout;
}
static void _vp_play_subtitle_color_update_text(SubtitleColorPopup *
- pSubtitleColorPopup)
+ pSubtitleColorPopup)
{
if (pSubtitleColorPopup == NULL) {
VideoLogError("pSubtitleColorPopup is NULL");
char szValue[6] = { 0, };
- snprintf(szValue, 6, "%2d %%",
- (int) pSubtitleColorPopup->nOpacityVal);
+ snprintf(szValue, 6, "%2d %%", (int) pSubtitleColorPopup->nOpacityVal);
elm_object_part_text_set(pSubtitleColorPopup->pLayout,
- "pv.subtitle-color-popup.opacity.percent",
- szValue);
+ "pv.subtitle-color-popup.opacity.percent",
+ szValue);
}
static void __vp_play_subtitle_color_btn_clicked_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEvent)
+ Evas_Object * pObj,
+ void *pEvent)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
SubtitleColorPopup *pSubtitleColorPopup =
- (SubtitleColorPopup *) pUserData;
+ (SubtitleColorPopup *) pUserData;
int nValue = elm_slider_value_get(pSubtitleColorPopup->pSlider);
VideoLogDebug("== %d ==", nValue);
elm_slider_value_set(pSubtitleColorPopup->pSlider, nValue);
if (nValue != pSubtitleColorPopup->nOpacityVal) {
- //if (pSubtitleColorPopup->pUpdateCb) {
pSubtitleColorPopup->nOpacityVal = nValue;
- //pSubtitleColorPopup->pUpdateCb(pSubtitleColorPopup->fOpacityVal, (void *)pSubtitleColorPopup->pUserData);
_vp_play_subtitle_color_update_text(pSubtitleColorPopup);
- //}
}
} else if (pObj == pSubtitleColorPopup->pDelButton) {
elm_slider_value_set(pSubtitleColorPopup->pSlider, nValue);
if (nValue != pSubtitleColorPopup->nOpacityVal) {
- //if (pSubtitleColorPopup->pUpdateCb) {
pSubtitleColorPopup->nOpacityVal = nValue;
- //pSubtitleColorPopup->pUpdateCb(pSubtitleColorPopup->fOpacityVal, (void *)pSubtitleColorPopup->pUserData);
_vp_play_subtitle_color_update_text(pSubtitleColorPopup);
- //}
}
}
}
static bool _vp_play_subtitle_color_popup_create_button(Evas_Object *
- pParent,
- void *pUserData)
+ pParent,
+ void *pUserData)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
return FALSE;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_RESROUCE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_RESROUCE_EDJ_PATH);
free(path);
SubtitleColorPopup *pSubtitleColorPopup =
- (SubtitleColorPopup *) pUserData;
+ (SubtitleColorPopup *) pUserData;
pSubtitleColorPopup->pDelButton =
- vp_button_create(pParent, "custom/flat_63_78/default",
- NULL,
- (Evas_Smart_Cb)
- __vp_play_subtitle_color_btn_clicked_cb,
- (Evas_Smart_Cb) NULL, (Evas_Smart_Cb) NULL,
- (void *) pSubtitleColorPopup);
+ vp_button_create(pParent, "custom/flat_63_78/default",
+ NULL, (Evas_Smart_Cb)
+ __vp_play_subtitle_color_btn_clicked_cb,
+ (Evas_Smart_Cb) NULL, (Evas_Smart_Cb) NULL,
+ (void *) pSubtitleColorPopup);
pSubtitleColorPopup->pAddButton =
- vp_button_create(pParent, "custom/flat_63_78/default",
- NULL,
- (Evas_Smart_Cb)
- __vp_play_subtitle_color_btn_clicked_cb,
- (Evas_Smart_Cb) NULL, (Evas_Smart_Cb) NULL,
- (void *) pSubtitleColorPopup);
+ vp_button_create(pParent, "custom/flat_63_78/default",
+ NULL, (Evas_Smart_Cb)
+ __vp_play_subtitle_color_btn_clicked_cb,
+ (Evas_Smart_Cb) NULL, (Evas_Smart_Cb) NULL,
+ (void *) pSubtitleColorPopup);
Evas_Object *pIcon = NULL;
pIcon =
- vp_button_create_icon(pSubtitleColorPopup->pDelButton,
- edj_path,
- VP_PLAY_RES_BUTTON_DEL);
+ vp_button_create_icon(pSubtitleColorPopup->pDelButton,
+ edj_path, VP_PLAY_RES_BUTTON_DEL);
elm_object_part_content_set(pSubtitleColorPopup->pDelButton,
- VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
pIcon =
- vp_button_create_icon(pSubtitleColorPopup->pDelButton,
- edj_path,
- VP_PLAY_RES_BUTTON_DEL_PRESS);
+ vp_button_create_icon(pSubtitleColorPopup->pDelButton,
+ edj_path, VP_PLAY_RES_BUTTON_DEL_PRESS);
elm_object_part_content_set(pSubtitleColorPopup->pDelButton,
- VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
pIcon =
- vp_button_create_icon(pSubtitleColorPopup->pDelButton,
- edj_path,
- VP_PLAY_RES_BUTTON_DEL);
+ vp_button_create_icon(pSubtitleColorPopup->pDelButton,
+ edj_path, VP_PLAY_RES_BUTTON_DEL);
elm_object_part_content_set(pSubtitleColorPopup->pDelButton,
- VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
pIcon =
- vp_button_create_icon(pSubtitleColorPopup->pAddButton,
- edj_path,
- VP_PLAY_RES_BUTTON_ADD);
+ vp_button_create_icon(pSubtitleColorPopup->pAddButton,
+ edj_path, VP_PLAY_RES_BUTTON_ADD);
elm_object_part_content_set(pSubtitleColorPopup->pAddButton,
- VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
pIcon =
- vp_button_create_icon(pSubtitleColorPopup->pAddButton,
- edj_path,
- VP_PLAY_RES_BUTTON_ADD_PRESS);
+ vp_button_create_icon(pSubtitleColorPopup->pAddButton,
+ edj_path, VP_PLAY_RES_BUTTON_ADD_PRESS);
elm_object_part_content_set(pSubtitleColorPopup->pAddButton,
- VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
pIcon =
- vp_button_create_icon(pSubtitleColorPopup->pAddButton,
- edj_path,
- VP_PLAY_RES_BUTTON_ADD);
+ vp_button_create_icon(pSubtitleColorPopup->pAddButton,
+ edj_path, VP_PLAY_RES_BUTTON_ADD);
elm_object_part_content_set(pSubtitleColorPopup->pAddButton,
- VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
elm_object_part_content_set(pParent, "elm.swallow.icon.1",
- pSubtitleColorPopup->pDelButton);
+ pSubtitleColorPopup->pDelButton);
elm_object_part_content_set(pParent, "elm.swallow.icon.2",
- pSubtitleColorPopup->pAddButton);
+ pSubtitleColorPopup->pAddButton);
return TRUE;
}
static void __vp_play_subtitle_color_popup_slider_change_cb(void
- *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ *pUserData,
+ Evas_Object *
+ pObj,
+ void
+ *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
VideoLogDebug("== %d ==", nValue);
if (nValue != pSubtitleColor->nOpacityVal) {
- //if (pSubtitleColor->pUpdateCb) {
pSubtitleColor->nOpacityVal = nValue;
- //pSubtitleColor->pUpdateCb(pSubtitleColor->fOpacityVal, (void *)pSubtitleColor->pUserData);
_vp_play_subtitle_color_update_text(pSubtitleColor);
- //}
}
char szValue[6] = { 0, };
}
static Evas_Object
-*_vp_play_subtitle_color_popup_create_slider(Evas_Object *pParent,
- void *pUserData)
+ *_vp_play_subtitle_color_popup_create_slider(Evas_Object * pParent,
+ void *pUserData)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
elm_slider_min_max_set(pObj, 0, 100);
evas_object_smart_callback_add(pObj, "changed",
- __vp_play_subtitle_color_popup_slider_change_cb,
- pUserData);
+ __vp_play_subtitle_color_popup_slider_change_cb,
+ pUserData);
return pObj;
}
/* external functions */
#ifndef SUBTITLE_K_FEATURE
-subtitle_color_handle vp_subtitle_color_create(Evas_Object *pParent,
- SubtitlePopupCloseCbFunc
- pCloseCb,
- int nDefaultColor)
+subtitle_color_handle vp_subtitle_color_create(Evas_Object * pParent,
+ SubtitlePopupCloseCbFunc
+ pCloseCb, int nDefaultColor)
#else
-subtitle_color_handle vp_subtitle_color_hex_create(Evas_Object *pParent,
- SubtitlePopupCloseCbFunc
- pCloseCb,
- char *pDefaultColor)
+subtitle_color_handle vp_subtitle_color_hex_create(Evas_Object * pParent,
+ SubtitlePopupCloseCbFunc
+ pCloseCb,
+ char *pDefaultColor)
#endif
{
if (pParent == NULL) {
#ifndef SUBTITLE_K_FEATURE
pSubtitleColor->pPopup =
- vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
- VP_PLAY_STRING_SUBTITLE_TEXT, NULL, 0.0, NULL,
- __vp_subtitle_color_popup_key_event_cb,
- __vp_subtitle_color_popup_mouse_event_cb,
- (void *) pSubtitleColor);
+ vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
+ VP_PLAY_STRING_SUBTITLE_TEXT, NULL, 0.0, NULL,
+ __vp_subtitle_color_popup_key_event_cb,
+ __vp_subtitle_color_popup_mouse_event_cb,
+ (void *) pSubtitleColor);
#else
pSubtitleColor->pPopup =
- vp_popup_create(pParent, POPUP_STYLE_EXPAND_WITH_CANCEL_BTN,
- VP_PLAY_STRING_SUBTITLE_COLOR, NULL,
- 0.0, NULL, __vp_subtitle_color_popup_key_event_cb,
- __vp_subtitle_color_popup_mouse_event_cb,
- (void *) pSubtitleColor);
+ vp_popup_create(pParent, POPUP_STYLE_EXPAND_WITH_CANCEL_BTN,
+ VP_PLAY_STRING_SUBTITLE_COLOR, NULL,
+ 0.0, NULL, __vp_subtitle_color_popup_key_event_cb,
+ __vp_subtitle_color_popup_mouse_event_cb,
+ (void *) pSubtitleColor);
#endif
if (pSubtitleColor->pPopup == NULL) {
VideoLogError("vp_popup_create fail");
_vp_subtitle_color_destroy_handle(pSubtitleColor);
return NULL;
}
- elm_popup_align_set(pSubtitleColor->pPopup, ELM_NOTIFY_ALIGN_FILL, 1.0);
+ elm_popup_align_set(pSubtitleColor->pPopup, ELM_NOTIFY_ALIGN_FILL,
+ 1.0);
#ifndef SUBTITLE_K_FEATURE
pSubtitleColor->pGenList =
- _vp_subtitle_color_create_genlist(pSubtitleColor->pPopup);
+ _vp_subtitle_color_create_genlist(pSubtitleColor->pPopup);
if (pSubtitleColor->pGenList == NULL) {
VideoLogError("_vp_subtitle_color_create_genlist fail");
_vp_subtitle_color_destroy_handle(pSubtitleColor);
return NULL;
}
evas_object_data_set(pSubtitleColor->pGenList,
- VP_SUBTITLE_COLOR_GENLIST_DATA_KEY,
- (void *) pSubtitleColor);
+ VP_SUBTITLE_COLOR_GENLIST_DATA_KEY,
+ (void *) pSubtitleColor);
evas_object_smart_callback_add(pSubtitleColor->pGenList, "realized",
- __vp_subtitle_color_genlist_realized,
- NULL);
+ __vp_subtitle_color_genlist_realized,
+ NULL);
pSubtitleColor->nDefaultIndex = nDefaultColor;
pSubtitleColor->pRadio = elm_radio_add(pSubtitleColor->pGenList);
if (!_vp_subtitle_color_add_genlist_item
- (pSubtitleColor->pGenList, (void *) pSubtitleColor)) {
+ (pSubtitleColor->pGenList, (void *) pSubtitleColor)) {
VideoLogError("_vp_subtitle_color_add_genlist_item fail");
return FALSE;
}
//elm_radio_value_set(pSubtitleColor->pRadio, nDefaultColor);
pSubtitleColor->currentFontColor = nDefaultColor;
evas_object_smart_callback_add(pSubtitleColor->pParent,
- "rotation,changed",
- __vp_subtitle_color_popup_rotate_cb,
- pSubtitleColor);
+ "rotation,changed",
+ __vp_subtitle_color_popup_rotate_cb,
+ pSubtitleColor);
pSubtitleColor->pBox = elm_box_add(pSubtitleColor->pPopup);
vp_popup_set_popup_min_size(pSubtitleColor->pParent,
- pSubtitleColor->pBox,
- pSubtitleColor->nListCount,
- VIDEO_POPUP_DEFAULT);
+ pSubtitleColor->pBox,
+ pSubtitleColor->nListCount,
+ VIDEO_POPUP_DEFAULT);
elm_box_pack_end(pSubtitleColor->pBox, pSubtitleColor->pGenList);
elm_object_content_set(pSubtitleColor->pPopup, pSubtitleColor->pBox);
#else
pSubtitleColor->pCurrentColorHex = strdup(pDefaultColor);
pSubtitleColor->pCancelButton =
- _vp_play_subtitle_color_popup_create_cancel_button
- (pSubtitleColor->pPopup, (void *) pSubtitleColor);
+ _vp_play_subtitle_color_popup_create_cancel_button
+ (pSubtitleColor->pPopup, (void *) pSubtitleColor);
if (pSubtitleColor->pCancelButton == NULL) {
VideoLogError("_vp_play_speed_popup_create_cancel_button fail");
_vp_subtitle_color_destroy_handle(pSubtitleColor);
}
pSubtitleColor->pOkButton =
- _vp_play_subtitle_color_popup_create_ok_button(pSubtitleColor->
- pPopup,
- (void *)
- pSubtitleColor);
+ _vp_play_subtitle_color_popup_create_ok_button
+ (pSubtitleColor->pPopup, (void *)
+ pSubtitleColor);
if (pSubtitleColor->pOkButton == NULL) {
VideoLogError("_vp_play_speed_popup_create_ok_button fail");
_vp_subtitle_color_destroy_handle(pSubtitleColor);
}
pSubtitleColor->pLayout =
- _vp_play_subtitle_color_popup_create_layout(pSubtitleColor->
- pPopup);
+ _vp_play_subtitle_color_popup_create_layout
+ (pSubtitleColor->pPopup);
if (pSubtitleColor->pLayout == NULL) {
VideoLogError("_vp_play_speed_popup_create_layout fail");
_vp_subtitle_color_destroy_handle(pSubtitleColor);
}
pSubtitleColor->pColorplaneData =
- (SubtitleColorplaneData *) malloc(sizeof(SubtitleColorplaneData));
+ (SubtitleColorplaneData *) malloc(sizeof(SubtitleColorplaneData));
if (!pSubtitleColor->pColorplaneData) {
return NULL;
}
memset(pSubtitleColor->pColorplaneData, 0,
- sizeof(SubtitleColorplaneData));
+ sizeof(SubtitleColorplaneData));
- _vp_play_subtitle_color_popup_create_colorpalette(pSubtitleColor->
- pLayout,
- pSubtitleColor);
+ _vp_play_subtitle_color_popup_create_colorpalette
+ (pSubtitleColor->pLayout, pSubtitleColor);
pSubtitleColor->pSlider =
- _vp_play_subtitle_color_popup_create_slider(pSubtitleColor->
- pLayout,
- pSubtitleColor);
+ _vp_play_subtitle_color_popup_create_slider
+ (pSubtitleColor->pLayout, pSubtitleColor);
if (pSubtitleColor->pSlider == NULL) {
VideoLogError("_vp_play_subtitle_color_popup_create_slider fail");
_vp_subtitle_color_destroy_handle(pSubtitleColor);
return NULL;
}
_vp_play_subtitle_color_popup_create_button(pSubtitleColor->pLayout,
- pSubtitleColor);
+ pSubtitleColor);
pSubtitleColor->nOpacityVal =
- _vp_subtitle_color_get_opacity(pSubtitleColor->pCurrentColorHex);
+ _vp_subtitle_color_get_opacity(pSubtitleColor->pCurrentColorHex);
elm_slider_value_set(pSubtitleColor->pSlider,
- (int) pSubtitleColor->nOpacityVal);
+ (int) pSubtitleColor->nOpacityVal);
_vp_play_subtitle_color_update_text(pSubtitleColor);
elm_object_part_content_set(pSubtitleColor->pLayout,
- "elm.swallow.content",
- pSubtitleColor->pSlider);
+ "elm.swallow.content",
+ pSubtitleColor->pSlider);
- //Used for scroller layout:
- //popup->LayoutOut->Scroller->pLayout
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_SUBTITLE_COLOR_POPUP_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_SUBTITLE_COLOR_POPUP_EDJ);
free(path);
pSubtitleColor->pLayoutOut = elm_layout_add(pSubtitleColor->pPopup);
int nRotation = elm_win_rotation_get(pSubtitleColor->pParent);
if (nRotation == 90 || nRotation == 270)
elm_layout_file_set(pSubtitleColor->pLayoutOut,
- edj_path,
- "pv.subtitle.scroller.layout.landscape");
+ edj_path,
+ "pv.subtitle.scroller.layout.landscape");
else
elm_layout_file_set(pSubtitleColor->pLayoutOut,
- edj_path,
- "pv.subtitle.scroller.layout");
+ edj_path, "pv.subtitle.scroller.layout");
evas_object_size_hint_weight_set(pSubtitleColor->pLayoutOut,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
pSubtitleColor->pScroller =
- elm_scroller_add(pSubtitleColor->pLayoutOut);
+ elm_scroller_add(pSubtitleColor->pLayoutOut);
elm_scroller_bounce_set(pSubtitleColor->pScroller, EINA_TRUE,
- EINA_TRUE);
+ EINA_TRUE);
elm_scroller_policy_set(pSubtitleColor->pScroller,
- ELM_SCROLLER_POLICY_OFF,
- ELM_SCROLLER_POLICY_AUTO);
+ ELM_SCROLLER_POLICY_OFF,
+ ELM_SCROLLER_POLICY_AUTO);
evas_object_show(pSubtitleColor->pScroller);
elm_object_content_set(pSubtitleColor->pScroller,
- pSubtitleColor->pLayout);
+ pSubtitleColor->pLayout);
elm_object_part_content_set(pSubtitleColor->pLayoutOut,
- "elm.swallow.content",
- pSubtitleColor->pScroller);
+ "elm.swallow.content",
+ pSubtitleColor->pScroller);
elm_object_content_set(pSubtitleColor->pPopup,
- pSubtitleColor->pLayoutOut);
+ pSubtitleColor->pLayoutOut);
evas_object_smart_callback_add(pSubtitleColor->pParent,
- "rotation,changed",
- __vp_subtitle_color_popup_rotate_cb,
- pSubtitleColor);
+ "rotation,changed",
+ __vp_subtitle_color_popup_rotate_cb,
+ pSubtitleColor);
evas_object_show(pSubtitleColor->pLayout);
#endif
}
SubtitleColorPopup *pSubtitleColor =
- (SubtitleColorPopup *) pSubtitleColorHandle;
+ (SubtitleColorPopup *) pSubtitleColorHandle;
_vp_subtitle_color_destroy_handle(pSubtitleColor);
}
SubtitleColorPopup *pSubtitleColor =
- (SubtitleColorPopup *) pSubtitleColorHandle;
+ (SubtitleColorPopup *) pSubtitleColorHandle;
evas_object_show(pSubtitleColor->pPopup);
}
bool vp_subtitle_color_unrealize(subtitle_color_handle
- pSubtitleColorHandle)
+ pSubtitleColorHandle)
{
if (pSubtitleColorHandle == NULL) {
VideoLogError("pSubtitleColorHandle is NULL");
}
SubtitleColorPopup *pSubtitleColor =
- (SubtitleColorPopup *) pSubtitleColorHandle;
+ (SubtitleColorPopup *) pSubtitleColorHandle;
evas_object_hide(pSubtitleColor->pPopup);
}
bool vp_subtitle_color_set_user_data(subtitle_color_handle
- pSubtitleColorHandle,
- void *pUserData)
+ pSubtitleColorHandle, void *pUserData)
{
if (pSubtitleColorHandle == NULL) {
VideoLogError("pSubtitleColorHandle is NULL");
}
SubtitleColorPopup *pSubtitleColor =
- (SubtitleColorPopup *) pSubtitleColorHandle;
+ (SubtitleColorPopup *) pSubtitleColorHandle;
pSubtitleColor->pUserData = pUserData;
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
#include "vp-play-string-define.h"
static void _vp_subtitle_edge_destroy_handle(SubtitleEdgePopup *
- pSubtitleEdge);
+ pSubtitleEdge);
static void __vp_subtitle_edge_genlist_item_selected_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo);
+ Evas_Object *
+ pObject,
+ void *pEventInfo);
static void __vp_subtitle_edge_genlist_realized(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
VP_GENLIST_HIDE_BOTTOMLINE(data, obj, event_info);
}
static void __vp_subtitle_edge_popup_rotate_cb(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
SubtitleEdgePopup *pSubtitleEdge = (SubtitleEdgePopup *) data;
if (!pSubtitleEdge) {
return;
}
vp_popup_set_popup_min_size(pSubtitleEdge->pParent,
- pSubtitleEdge->pBox,
- pSubtitleEdge->nListCount,
- VIDEO_POPUP_DEFAULT);
+ pSubtitleEdge->pBox,
+ pSubtitleEdge->nListCount,
+ VIDEO_POPUP_DEFAULT);
}
/* callback functions */
static char *__vp_subtitle_edge_genlist_text_get_cb(const void *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ Evas_Object * pObj,
+ const char *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
static Evas_Object *__vp_subtitle_edge_genlist_content_get_cb(const void
- *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ *pUserData,
+ Evas_Object *
+ pObj,
+ const char
+ *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Evas_Object *pRadioObj = NULL;
SubtitleEdgePopup *pSubtitleEdge =
- (SubtitleEdgePopup *) evas_object_data_get(pObj,
- VP_SUBTITLE_EDGE_GENLIST_DATA_KEY);
+ (SubtitleEdgePopup *) evas_object_data_get(pObj,
+ VP_SUBTITLE_EDGE_GENLIST_DATA_KEY);
if (pSubtitleEdge == NULL) {
VideoLogWarning("evas_object_data_get is fail");
return NULL;
elm_radio_state_value_set(pRadioObj, nEdge);
elm_radio_group_add(pRadioObj, pSubtitleEdge->pRadio);
elm_radio_value_set(pSubtitleEdge->pRadio,
- pSubtitleEdge->currentSubtitleEdge);
+ pSubtitleEdge->currentSubtitleEdge);
evas_object_smart_callback_add(pRadioObj, "changed",
- __vp_subtitle_edge_genlist_item_selected_cb,
- pSubtitleEdge);
+ __vp_subtitle_edge_genlist_item_selected_cb,
+ pSubtitleEdge);
evas_object_show(pRadioObj);
return pRadioObj;
}
static void __vp_subtitle_edge_genlist_item_selected_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Elm_Object_Item *pItem = (Elm_Object_Item *) pEventInfo;
Elm_Object_Item *pSelectedItem =
- elm_genlist_selected_item_get(pObject);
+ elm_genlist_selected_item_get(pObject);
if (pSelectedItem) {
elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
}
pSubtitleEdge->currentSubtitleEdge = nEdge;
if (pSubtitleEdge->pCloseCb) {
pSubtitleEdge->pCloseCb(nEdge, FALSE,
- (void *) pSubtitleEdge->pUserData);
+ (void *) pSubtitleEdge->pUserData);
}
}
static void __vp_subtitle_edge_popup_key_event_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pSubtitleEdge->pCloseCb) {
pSubtitleEdge->pCloseCb(-1, FALSE,
- (void *) pSubtitleEdge->pUserData);
+ (void *) pSubtitleEdge->pUserData);
}
}
static void __vp_subtitle_edge_popup_mouse_event_cb(void *pUserData,
- Evas *pEvas,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas * pEvas,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Evas_Event_Mouse_Up *ev = pEventInfo;
if (ev->button == 3) {
- SubtitleEdgePopup *pSubtitleEdge =
- (SubtitleEdgePopup *) pUserData;
+ SubtitleEdgePopup *pSubtitleEdge = (SubtitleEdgePopup *) pUserData;
if (pSubtitleEdge->pCloseCb) {
pSubtitleEdge->pCloseCb(-1, FALSE,
- (void *) pSubtitleEdge->pUserData);
+ (void *) pSubtitleEdge->pUserData);
}
}
}
/* internal functions */
static void _vp_subtitle_edge_destroy_handle(SubtitleEdgePopup *
- pSubtitleEdge)
+ pSubtitleEdge)
{
if (pSubtitleEdge == NULL) {
VideoLogError("pSubtitleEdge is NULL");
}
evas_object_smart_callback_del(pSubtitleEdge->pParent,
- "rotation,changed",
- __vp_subtitle_edge_popup_rotate_cb);
+ "rotation,changed",
+ __vp_subtitle_edge_popup_rotate_cb);
evas_object_smart_callback_del(pSubtitleEdge->pGenList, "realized",
- __vp_subtitle_edge_genlist_realized);
+ __vp_subtitle_edge_genlist_realized);
VP_EVAS_DEL(pSubtitleEdge->pRadio);
VP_EVAS_DEL(pSubtitleEdge->pGenList);
}
-static Evas_Object *_vp_subtitle_edge_create_genlist(Evas_Object *
- pParent)
+static Evas_Object *_vp_subtitle_edge_create_genlist(Evas_Object * pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_genlist_add(pParent);
evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(pObj);
return pObj;
}
-static bool _vp_subtitle_edge_add_genlist_item(Evas_Object *pObj,
- void *pUserData)
+static bool _vp_subtitle_edge_add_genlist_item(Evas_Object * pObj,
+ void *pUserData)
{
if (pObj == NULL) {
VideoLogError("pObj is NULL");
if (pSubtitleEdge->st_SubtitleEdge_Itc != NULL) {
pSubtitleEdge->st_SubtitleEdge_Itc->version =
- ELM_GENLIST_ITEM_CLASS_VERSION;
+ ELM_GENLIST_ITEM_CLASS_VERSION;
pSubtitleEdge->st_SubtitleEdge_Itc->item_style =
- "1text.1icon.3/popup";
+ "1text.1icon.3/popup";
pSubtitleEdge->st_SubtitleEdge_Itc->func.text_get =
- (void *) __vp_subtitle_edge_genlist_text_get_cb;
+ (void *) __vp_subtitle_edge_genlist_text_get_cb;
pSubtitleEdge->st_SubtitleEdge_Itc->func.content_get =
- (void *) __vp_subtitle_edge_genlist_content_get_cb;
+ (void *) __vp_subtitle_edge_genlist_content_get_cb;
pSubtitleEdge->st_SubtitleEdge_Itc->func.state_get = NULL;
pSubtitleEdge->st_SubtitleEdge_Itc->func.del = NULL;
pSubtitleEdge->nListCount = 0;
elm_genlist_item_append(pObj, pSubtitleEdge->st_SubtitleEdge_Itc,
- (void *) VP_PLAY_STRING_EDGE_NO_EDGE, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_edge_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_EDGE_NO_EDGE, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_edge_genlist_item_selected_cb,
+ pUserData);
pSubtitleEdge->nListCount++;
elm_genlist_item_append(pObj, pSubtitleEdge->st_SubtitleEdge_Itc,
- (void *) VP_PLAY_STRING_EDGE_RAISED, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_edge_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_EDGE_RAISED, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_edge_genlist_item_selected_cb,
+ pUserData);
pSubtitleEdge->nListCount++;
elm_genlist_item_append(pObj, pSubtitleEdge->st_SubtitleEdge_Itc,
- (void *) VP_PLAY_STRING_EDGE_DEPRESSED, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_edge_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_EDGE_DEPRESSED,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_edge_genlist_item_selected_cb,
+ pUserData);
pSubtitleEdge->nListCount++;
elm_genlist_item_append(pObj, pSubtitleEdge->st_SubtitleEdge_Itc,
- (void *) VP_PLAY_STRING_EDGE_UNIFORM, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_edge_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_EDGE_UNIFORM, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_edge_genlist_item_selected_cb,
+ pUserData);
pSubtitleEdge->nListCount++;
elm_genlist_item_append(pObj, pSubtitleEdge->st_SubtitleEdge_Itc,
- (void *) VP_PLAY_STRING_EDGE_DROP_SHADOW,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_edge_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_EDGE_DROP_SHADOW,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_edge_genlist_item_selected_cb,
+ pUserData);
pSubtitleEdge->nListCount++;
}
}
/* external functions */
-subtitle_edge_handle vp_subtitle_edge_create(Evas_Object *pParent,
- PopupCloseCbFunc pCloseCb,
- int nDefaultSize)
+subtitle_edge_handle vp_subtitle_edge_create(Evas_Object * pParent,
+ PopupCloseCbFunc pCloseCb,
+ int nDefaultSize)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pSubtitleEdge->pCloseCb = pCloseCb;
pSubtitleEdge->pPopup =
- vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
- VP_PLAY_STRING_SUBTITLE_EDGE, NULL, 0.0, NULL,
- __vp_subtitle_edge_popup_key_event_cb,
- __vp_subtitle_edge_popup_mouse_event_cb,
- (void *) pSubtitleEdge);
+ vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
+ VP_PLAY_STRING_SUBTITLE_EDGE, NULL, 0.0, NULL,
+ __vp_subtitle_edge_popup_key_event_cb,
+ __vp_subtitle_edge_popup_mouse_event_cb,
+ (void *) pSubtitleEdge);
if (pSubtitleEdge->pPopup == NULL) {
VideoLogError("vp_popup_create fail");
_vp_subtitle_edge_destroy_handle(pSubtitleEdge);
}
pSubtitleEdge->pGenList =
- _vp_subtitle_edge_create_genlist(pSubtitleEdge->pPopup);
+ _vp_subtitle_edge_create_genlist(pSubtitleEdge->pPopup);
if (pSubtitleEdge->pGenList == NULL) {
VideoLogError("_vp_subtitle_size_create_genlist fail");
_vp_subtitle_edge_destroy_handle(pSubtitleEdge);
return NULL;
}
evas_object_data_set(pSubtitleEdge->pGenList,
- VP_SUBTITLE_EDGE_GENLIST_DATA_KEY,
- (void *) pSubtitleEdge);
+ VP_SUBTITLE_EDGE_GENLIST_DATA_KEY,
+ (void *) pSubtitleEdge);
evas_object_smart_callback_add(pSubtitleEdge->pGenList, "realized",
- __vp_subtitle_edge_genlist_realized,
- NULL);
+ __vp_subtitle_edge_genlist_realized,
+ NULL);
pSubtitleEdge->pRadio = elm_radio_add(pSubtitleEdge->pGenList);
if (!_vp_subtitle_edge_add_genlist_item
- (pSubtitleEdge->pGenList, (void *) pSubtitleEdge)) {
+ (pSubtitleEdge->pGenList, (void *) pSubtitleEdge)) {
VideoLogError("_vp_subtitle_size_add_genlist_item fail");
return FALSE;
}
- //elm_radio_value_set(pSubtitleEdge->pRadio, nDefaultSize);
+
pSubtitleEdge->currentSubtitleEdge = nDefaultSize;
evas_object_smart_callback_add(pSubtitleEdge->pParent,
- "rotation,changed",
- __vp_subtitle_edge_popup_rotate_cb,
- pSubtitleEdge);
+ "rotation,changed",
+ __vp_subtitle_edge_popup_rotate_cb,
+ pSubtitleEdge);
pSubtitleEdge->pBox = elm_box_add(pSubtitleEdge->pPopup);
vp_popup_set_popup_min_size(pSubtitleEdge->pParent,
- pSubtitleEdge->pBox,
- pSubtitleEdge->nListCount,
- VIDEO_POPUP_DEFAULT);
+ pSubtitleEdge->pBox,
+ pSubtitleEdge->nListCount,
+ VIDEO_POPUP_DEFAULT);
elm_box_pack_end(pSubtitleEdge->pBox, pSubtitleEdge->pGenList);
elm_object_content_set(pSubtitleEdge->pPopup, pSubtitleEdge->pBox);
}
SubtitleEdgePopup *pSubtitleEdge =
- (SubtitleEdgePopup *) pSubtitleEdgeHandle;
+ (SubtitleEdgePopup *) pSubtitleEdgeHandle;
_vp_subtitle_edge_destroy_handle(pSubtitleEdge);
}
SubtitleEdgePopup *pSubtitleEdge =
- (SubtitleEdgePopup *) pSubtitleEdgeHandle;
+ (SubtitleEdgePopup *) pSubtitleEdgeHandle;
evas_object_show(pSubtitleEdge->pPopup);
}
SubtitleEdgePopup *pSubtitleEdge =
- (SubtitleEdgePopup *) pSubtitleEdgeHandle;
+ (SubtitleEdgePopup *) pSubtitleEdgeHandle;
evas_object_hide(pSubtitleEdge->pPopup);
}
bool vp_subtitle_edge_set_user_data(subtitle_edge_handle
- pSubtitleEdgeHandle, void *pUserData)
+ pSubtitleEdgeHandle, void *pUserData)
{
if (pSubtitleEdgeHandle == NULL) {
VideoLogError("pSubtitleEdgeHandle is NULL");
}
SubtitleEdgePopup *pSubtitleEdge =
- (SubtitleEdgePopup *) pSubtitleEdgeHandle;
+ (SubtitleEdgePopup *) pSubtitleEdgeHandle;
pSubtitleEdge->pUserData = pUserData;
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
#include <fontconfig/fontconfig.h>
#include "vp-play-log.h"
#define VP_SUBTITLE_FONT_GENLIST_DATA_KEY "vp.subtitle.font.genlist"
-#define VP_FONT_PRELOAD_FONT_PATH "/usr/share/fonts"
-#define VP_FONT_DOWNLOADED_FONT_PATH "/opt/share/fonts"
-#define VP_FONT_DEFAULT_FONT_NAME "Tizen"
+#define VP_FONT_PRELOAD_FONT_PATH "/usr/share/fonts"
+#define VP_FONT_DOWNLOADED_FONT_PATH "/opt/share/fonts"
+#define VP_FONT_DEFAULT_FONT_NAME "Tizen"
#define VP_FONT_UDRGOTHIC_FONT_NAME "UDRGothic"
#define VP_FONT_UDMINCHO_FONT_NAME "UDMincho"
-#define VP_FONT_POP_FONT_NAME "POP"
+#define VP_FONT_POP_FONT_NAME "POP"
#define VP_FONT_CHOCOCOOKY_FONT_NAME "Choco cooky"
#define VP_FONT_COOLJAZZ_FONT_NAME "Cool jazz"
#define VP_FONT_ROSEMARY_FONT_NAME "Rosemary"
static void _vp_subtitle_font_destroy_handle(SubtitleFontPopup *
- pSubtitleFont);
+ pSubtitleFont);
static void __vp_subtitle_font_genlist_item_selected_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo);
+ Evas_Object *
+ pObject,
+ void *pEventInfo);
static void __vp_subtitle_font_genlist_realized(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
VP_GENLIST_HIDE_BOTTOMLINE(data, obj, event_info);
}
static void __vp_subtitle_font_popup_rotate_cb(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
SubtitleFontPopup *pSubtitleFont = (SubtitleFontPopup *) data;
if (!pSubtitleFont) {
return;
}
vp_popup_set_popup_min_size(pSubtitleFont->pParent,
- pSubtitleFont->pBox,
- pSubtitleFont->nAppendCount,
- VIDEO_POPUP_DEFAULT);
+ pSubtitleFont->pBox,
+ pSubtitleFont->nAppendCount,
+ VIDEO_POPUP_DEFAULT);
}
/* callback functions */
static char *__vp_subtitle_font_genlist_text_get_cb(const void *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ Evas_Object * pObj,
+ const char *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
return NULL;
}
- char *szTxt = (char *)pUserData;
+ char *szTxt = (char *) pUserData;
if (!strcmp(pPart, "elm.text")) {
char *szFormat = NULL;
if (strcmp(szTxt, VP_PLAY_STRING_COM_DEFAULT) == 0) {
szFormat =
- g_strdup_printf("<font='%s'>%s</font>",
- VP_FONT_DEFAULT_FONT_NAME,
- VP_PLAY_STRING_FONT_DEFAULT);
+ g_strdup_printf("<font='%s'>%s</font>",
+ VP_FONT_DEFAULT_FONT_NAME,
+ VP_PLAY_STRING_FONT_DEFAULT);
} else if (strcmp(szTxt, VP_FONT_UDRGOTHIC_FONT_NAME) == 0) {
szFormat =
- g_strdup_printf("<font='%s'>%s</font>",
- VP_FONT_UDRGOTHIC_FONT_NAME,
- VP_PLAY_STRING_FONT_UDRCOTHICM);
+ g_strdup_printf("<font='%s'>%s</font>",
+ VP_FONT_UDRGOTHIC_FONT_NAME,
+ VP_PLAY_STRING_FONT_UDRCOTHICM);
} else if (strcmp(szTxt, VP_FONT_UDMINCHO_FONT_NAME) == 0) {
szFormat =
- g_strdup_printf("<font='%s'>%s</font>",
- VP_FONT_UDMINCHO_FONT_NAME,
- VP_PLAY_STRING_FONT_UDMINCHO);
+ g_strdup_printf("<font='%s'>%s</font>",
+ VP_FONT_UDMINCHO_FONT_NAME,
+ VP_PLAY_STRING_FONT_UDMINCHO);
} else if (strcmp(szTxt, VP_FONT_POP_FONT_NAME) == 0) {
szFormat =
- g_strdup_printf("<font='%s'>%s</font>",
- VP_FONT_POP_FONT_NAME,
- VP_PLAY_STRING_FONT_POP);
+ g_strdup_printf("<font='%s'>%s</font>",
+ VP_FONT_POP_FONT_NAME,
+ VP_PLAY_STRING_FONT_POP);
} else if (strcmp(szTxt, VP_FONT_CHOCOCOOKY_FONT_NAME) == 0) {
szFormat =
- g_strdup_printf("<font='%s'>%s</font>",
- VP_FONT_CHOCOCOOKY_FONT_NAME,
- VP_PLAY_STRING_FONT_CHOCO_COOKY);
+ g_strdup_printf("<font='%s'>%s</font>",
+ VP_FONT_CHOCOCOOKY_FONT_NAME,
+ VP_PLAY_STRING_FONT_CHOCO_COOKY);
} else if (strcmp(szTxt, VP_FONT_COOLJAZZ_FONT_NAME) == 0) {
szFormat =
- g_strdup_printf("<font='%s'>%s</font>",
- VP_FONT_COOLJAZZ_FONT_NAME,
- VP_PLAY_STRING_FONT_COOL_JAZZ);
+ g_strdup_printf("<font='%s'>%s</font>",
+ VP_FONT_COOLJAZZ_FONT_NAME,
+ VP_PLAY_STRING_FONT_COOL_JAZZ);
} else if (strcmp(szTxt, VP_FONT_ROSEMARY_FONT_NAME) == 0) {
szFormat =
- g_strdup_printf("<font='%s'>%s</font>",
- VP_FONT_ROSEMARY_FONT_NAME,
- VP_PLAY_STRING_FONT_ROSEMARY);
+ g_strdup_printf("<font='%s'>%s</font>",
+ VP_FONT_ROSEMARY_FONT_NAME,
+ VP_PLAY_STRING_FONT_ROSEMARY);
}
return szFormat;
}
static Evas_Object *__vp_subtitle_font_genlist_content_get_cb(const void
- *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ *pUserData,
+ Evas_Object *
+ pObj,
+ const char
+ *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
return NULL;
}
- char *szTxt = (char *)pUserData;
+ char *szTxt = (char *) pUserData;
if (!strcmp(pPart, "elm.icon")) {
Evas_Object *pRadioObj = NULL;
SubtitleFontPopup *pSubtitleFont =
- (SubtitleFontPopup *) evas_object_data_get(pObj,
- VP_SUBTITLE_FONT_GENLIST_DATA_KEY);
+ (SubtitleFontPopup *) evas_object_data_get(pObj,
+ VP_SUBTITLE_FONT_GENLIST_DATA_KEY);
if (pSubtitleFont == NULL) {
VideoLogWarning("evas_object_data_get is fail");
return NULL;
nCount = g_list_length(pSubtitleFont->pFontList);
for (i = 0; i < nCount; i++) {
char *szName = NULL;
- szName =
- (char *)g_list_nth_data(pSubtitleFont->pFontList, i);
+ szName = (char *) g_list_nth_data(pSubtitleFont->pFontList, i);
if (szName == NULL) {
continue;
}
elm_radio_state_value_set(pRadioObj, nIndex);
elm_radio_group_add(pRadioObj, pSubtitleFont->pRadio);
elm_radio_value_set(pSubtitleFont->pRadio,
- pSubtitleFont->nCurrentFontIdx);
+ pSubtitleFont->nCurrentFontIdx);
evas_object_smart_callback_add(pRadioObj, "changed",
- __vp_subtitle_font_genlist_item_selected_cb,
- pSubtitleFont);
+ __vp_subtitle_font_genlist_item_selected_cb,
+ pSubtitleFont);
evas_object_show(pRadioObj);
return pRadioObj;
}
static void __vp_subtitle_font_genlist_item_selected_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Elm_Object_Item *pItem = (Elm_Object_Item *) pEventInfo;
Elm_Object_Item *pSelectedItem =
- elm_genlist_selected_item_get(pObject);
+ elm_genlist_selected_item_get(pObject);
if (pSelectedItem) {
elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
}
- char *szTxt = (char *)elm_object_item_data_get(pItem);
+ char *szTxt = (char *) elm_object_item_data_get(pItem);
VideoLogError("szTxt = %s", szTxt);
if (szTxt == NULL) {
VideoLogError("szTxt is NULL");
int nCount = g_list_length(pSubtitleFont->pFontList);
for (i = 0; i < nCount; i++) {
char *szName = NULL;
- szName =
- (char *)g_list_nth_data(pSubtitleFont->pFontList, i);
+ szName = (char *) g_list_nth_data(pSubtitleFont->pFontList, i);
if (szName == NULL) {
continue;
}
}
static void __vp_subtitle_font_popup_key_event_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
static void __vp_subtitle_font_popup_mouse_event_cb(void *pUserData,
- Evas *pEvas,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas * pEvas,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Evas_Event_Mouse_Up *ev = pEventInfo;
if (ev->button == 3) {
- SubtitleFontPopup *pSubtitleFont =
- (SubtitleFontPopup *) pUserData;
+ SubtitleFontPopup *pSubtitleFont = (SubtitleFontPopup *) pUserData;
if (pSubtitleFont->pCloseCb) {
pSubtitleFont->pCloseCb(NULL,
- (void *) pSubtitleFont->pUserData);
+ (void *) pSubtitleFont->pUserData);
}
}
}
/* internal functions */
static void _vp_subtitle_font_destroy_handle(SubtitleFontPopup *
- pSubtitleFont)
+ pSubtitleFont)
{
if (pSubtitleFont == NULL) {
VideoLogError("pSubtitleFont is NULL");
int nCount = 0;
int i = 0;
evas_object_smart_callback_del(pSubtitleFont->pParent,
- "rotation,changed",
- __vp_subtitle_font_popup_rotate_cb);
+ "rotation,changed",
+ __vp_subtitle_font_popup_rotate_cb);
evas_object_smart_callback_del(pSubtitleFont->pGenList, "realized",
- __vp_subtitle_font_genlist_realized);
+ __vp_subtitle_font_genlist_realized);
VP_EVAS_DEL(pSubtitleFont->pRadio);
VP_EVAS_DEL(pSubtitleFont->pGenList);
nCount = g_list_length(pSubtitleFont->pFontList);
for (i = 0; i < nCount; i++) {
char *szName = NULL;
- szName = (char *)g_list_nth_data(pSubtitleFont->pFontList, i);
+ szName = (char *) g_list_nth_data(pSubtitleFont->pFontList, i);
VP_FREE(szName);
}
g_list_free(pSubtitleFont->pFontList);
}
-static Evas_Object *_vp_subtitle_font_create_genlist(Evas_Object *
- pParent)
+static Evas_Object *_vp_subtitle_font_create_genlist(Evas_Object * pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_genlist_add(pParent);
evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(pObj);
return pObj;
}
-static bool _vp_subtitle_font_add_genlist_item(Evas_Object *pObj,
- void *pUserData)
+static bool _vp_subtitle_font_add_genlist_item(Evas_Object * pObj,
+ void *pUserData)
{
if (pObj == NULL) {
VideoLogError("pObj is NULL");
if (pSubtitleFont->st_SubtitleFont_Itc != NULL) {
pSubtitleFont->st_SubtitleFont_Itc->version =
- ELM_GENLIST_ITEM_CLASS_VERSION;
+ ELM_GENLIST_ITEM_CLASS_VERSION;
pSubtitleFont->st_SubtitleFont_Itc->item_style =
- "video.multiline/1text.1icon";
+ "video.multiline/1text.1icon";
pSubtitleFont->st_SubtitleFont_Itc->func.text_get =
- (void *) __vp_subtitle_font_genlist_text_get_cb;
+ (void *) __vp_subtitle_font_genlist_text_get_cb;
pSubtitleFont->st_SubtitleFont_Itc->func.content_get =
- (void *) __vp_subtitle_font_genlist_content_get_cb;
+ (void *) __vp_subtitle_font_genlist_content_get_cb;
pSubtitleFont->st_SubtitleFont_Itc->func.state_get = NULL;
pSubtitleFont->st_SubtitleFont_Itc->func.del = NULL;
elm_genlist_item_append(pObj, pSubtitleFont->st_SubtitleFont_Itc,
- (void *) VP_PLAY_STRING_COM_DEFAULT, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_font_genlist_item_selected_cb,
- pUserData);
+ (void *) VP_PLAY_STRING_COM_DEFAULT, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_font_genlist_item_selected_cb,
+ pUserData);
pSubtitleFont->nAppendCount++;
int nCount = 0;
nCount = g_list_length(pSubtitleFont->pFontList);
for (i = 0; i < nCount; i++) {
char *szName = NULL;
- szName = (char *)g_list_nth_data(pSubtitleFont->pFontList, i);
+ szName = (char *) g_list_nth_data(pSubtitleFont->pFontList, i);
if (szName == NULL) {
continue;
}
- elm_genlist_item_append(pObj, pSubtitleFont->st_SubtitleFont_Itc,
- (void *) szName, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_font_genlist_item_selected_cb,
- pUserData);
+ elm_genlist_item_append(pObj,
+ pSubtitleFont->st_SubtitleFont_Itc,
+ (void *) szName, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_font_genlist_item_selected_cb,
+ pUserData);
pSubtitleFont->nAppendCount++;
}
}
}
static bool __vp_subtitle_font_load_font_list(SubtitleFontPopup *
- pSubtitleFont)
+ pSubtitleFont)
{
if (pSubtitleFont == NULL) {
VideoLogError("pSubtitleFont is NULL");
font_config = FcInitLoadConfigAndFonts();
pat = FcPatternCreate();
- os = FcObjectSetBuild(FC_FAMILY, FC_FILE, (char *)0);
+ os = FcObjectSetBuild(FC_FAMILY, FC_FILE, (char *) 0);
if (os) {
fs = FcFontList(font_config, pat, os);
FcObjectSetDestroy(os);
FcChar8 *szFile = NULL;
if (FcPatternGetString(fs->fonts[j], FC_FILE, 0, &szFile) ==
- FcResultMatch) {
+ FcResultMatch) {
if (szFile == NULL) {
continue;
}
if (strncmp
- ((const char *) szFile, VP_FONT_PRELOAD_FONT_PATH,
- nPreloadPathLen) == 0
- || strncmp((const char *) szFile,
- VP_FONT_DOWNLOADED_FONT_PATH,
- nDownloadPathLen) == 0) {
+ ((const char *) szFile, VP_FONT_PRELOAD_FONT_PATH,
+ nPreloadPathLen) == 0
+ || strncmp((const char *) szFile,
+ VP_FONT_DOWNLOADED_FONT_PATH,
+ nDownloadPathLen) == 0) {
if (FcPatternGetString
- (fs->fonts[j], FC_FAMILY, 0,
- &szfamily) == FcResultMatch) {
+ (fs->fonts[j], FC_FAMILY, 0,
+ &szfamily) == FcResultMatch) {
bool bIsExist = FALSE;
if (szfamily == NULL) {
int nIdx = 0;
nCount =
- g_list_length(pSubtitleFont->pFontList);
+ g_list_length(pSubtitleFont->pFontList);
for (nIdx = 0; nIdx < nCount; nIdx++) {
char *szListName = NULL;
- szListName =
- (char *)
- g_list_nth_data(pSubtitleFont->
- pFontList, nIdx);
+ szListName = (char *)
+ g_list_nth_data
+ (pSubtitleFont->pFontList, nIdx);
if (szListName) {
if (strcmp
- ((char *)szfamily,
- szListName) == 0) {
+ ((char *) szfamily,
+ szListName) == 0) {
bIsExist = TRUE;
}
}
}
if (bIsExist == FALSE) {
if ((strcmp
- ((char *)szfamily,
- VP_FONT_UDRGOTHIC_FONT_NAME) == 0)
- ||
- (strcmp
- ((char *)szfamily,
- VP_FONT_UDMINCHO_FONT_NAME) == 0)
- ||
- (strcmp
- ((char *)szfamily,
- VP_FONT_POP_FONT_NAME) == 0)
- ||
- (strcmp
- ((char *)szfamily,
- VP_FONT_CHOCOCOOKY_FONT_NAME) == 0)
- ||
- (strcmp
- ((char *)szfamily,
- VP_FONT_COOLJAZZ_FONT_NAME) == 0)
- ||
- (strcmp
- ((char *)szfamily,
- VP_FONT_ROSEMARY_FONT_NAME) == 0)) {
+ ((char *) szfamily,
+ VP_FONT_UDRGOTHIC_FONT_NAME) == 0)
+ ||
+ (strcmp
+ ((char *) szfamily,
+ VP_FONT_UDMINCHO_FONT_NAME) == 0)
+ ||
+ (strcmp
+ ((char *) szfamily,
+ VP_FONT_POP_FONT_NAME) == 0)
+ ||
+ (strcmp
+ ((char *) szfamily,
+ VP_FONT_CHOCOCOOKY_FONT_NAME) == 0)
+ ||
+ (strcmp
+ ((char *) szfamily,
+ VP_FONT_COOLJAZZ_FONT_NAME) == 0)
+ ||
+ (strcmp
+ ((char *) szfamily,
+ VP_FONT_ROSEMARY_FONT_NAME) == 0)) {
char *szFontName = NULL;
- VP_STRDUP(szFontName, (char *)szfamily);
+ VP_STRDUP(szFontName, (char *) szfamily);
if (szFontName) {
pSubtitleFont->pFontList =
- g_list_append(pSubtitleFont->
- pFontList, szFontName);
+ g_list_append
+ (pSubtitleFont->pFontList,
+ szFontName);
if (strcmp
- (pSubtitleFont->szCurrentFont,
- szFontName) == 0) {
+ (pSubtitleFont->szCurrentFont,
+ szFontName) == 0) {
pSubtitleFont->nCurrentFontIdx =
- g_list_length(pSubtitleFont->
- pFontList);
+ g_list_length
+ (pSubtitleFont->pFontList);
}
}
VideoLogError("==> [%d] : %s ", j,
- szfamily);
+ szfamily);
}
}
}
/* external functions */
-subtitle_font_handle vp_subtitle_font_create(Evas_Object *pParent,
- SubtitleFontCbFunc pCloseCb,
- char *szCurrentFont)
+subtitle_font_handle vp_subtitle_font_create(Evas_Object * pParent,
+ SubtitleFontCbFunc pCloseCb,
+ char *szCurrentFont)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pSubtitleFont->nCurrentFontIdx = 0;
pSubtitleFont->pPopup =
- vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
- VP_PLAY_STRING_SUBTITLE_FONT, NULL, 0.0, NULL,
- __vp_subtitle_font_popup_key_event_cb,
- __vp_subtitle_font_popup_mouse_event_cb,
- (void *) pSubtitleFont);
+ vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
+ VP_PLAY_STRING_SUBTITLE_FONT, NULL, 0.0, NULL,
+ __vp_subtitle_font_popup_key_event_cb,
+ __vp_subtitle_font_popup_mouse_event_cb,
+ (void *) pSubtitleFont);
if (pSubtitleFont->pPopup == NULL) {
VideoLogError("vp_popup_create fail");
_vp_subtitle_font_destroy_handle(pSubtitleFont);
}
pSubtitleFont->pGenList =
- _vp_subtitle_font_create_genlist(pSubtitleFont->pPopup);
+ _vp_subtitle_font_create_genlist(pSubtitleFont->pPopup);
if (pSubtitleFont->pGenList == NULL) {
VideoLogError("_vp_subtitle_font_create_genlist fail");
_vp_subtitle_font_destroy_handle(pSubtitleFont);
return NULL;
}
evas_object_data_set(pSubtitleFont->pGenList,
- VP_SUBTITLE_FONT_GENLIST_DATA_KEY,
- (void *) pSubtitleFont);
+ VP_SUBTITLE_FONT_GENLIST_DATA_KEY,
+ (void *) pSubtitleFont);
evas_object_smart_callback_add(pSubtitleFont->pGenList, "realized",
- __vp_subtitle_font_genlist_realized,
- NULL);
+ __vp_subtitle_font_genlist_realized,
+ NULL);
pSubtitleFont->pRadio = elm_radio_add(pSubtitleFont->pGenList);
elm_genlist_mode_set(pSubtitleFont->pGenList, ELM_LIST_COMPRESS);
if (!_vp_subtitle_font_add_genlist_item
- (pSubtitleFont->pGenList, (void *) pSubtitleFont)) {
+ (pSubtitleFont->pGenList, (void *) pSubtitleFont)) {
VideoLogError("_vp_subtitle_font_add_genlist_item fail");
return FALSE;
}
- //elm_radio_value_set(pSubtitleFont->pRadio, pSubtitleFont->nCurrentFontIdx);
+
evas_object_smart_callback_add(pSubtitleFont->pParent,
- "rotation,changed",
- __vp_subtitle_font_popup_rotate_cb,
- pSubtitleFont);
+ "rotation,changed",
+ __vp_subtitle_font_popup_rotate_cb,
+ pSubtitleFont);
pSubtitleFont->pBox = elm_box_add(pSubtitleFont->pPopup);
vp_popup_set_popup_min_size(pSubtitleFont->pParent,
- pSubtitleFont->pBox,
- pSubtitleFont->nAppendCount,
- VIDEO_POPUP_DEFAULT);
+ pSubtitleFont->pBox,
+ pSubtitleFont->nAppendCount,
+ VIDEO_POPUP_DEFAULT);
elm_box_pack_end(pSubtitleFont->pBox, pSubtitleFont->pGenList);
elm_object_content_set(pSubtitleFont->pPopup, pSubtitleFont->pBox);
}
SubtitleFontPopup *pSubtitleFont =
- (SubtitleFontPopup *) pSubtitleFontHandle;
+ (SubtitleFontPopup *) pSubtitleFontHandle;
_vp_subtitle_font_destroy_handle(pSubtitleFont);
}
SubtitleFontPopup *pSubtitleFont =
- (SubtitleFontPopup *) pSubtitleFontHandle;
+ (SubtitleFontPopup *) pSubtitleFontHandle;
evas_object_show(pSubtitleFont->pPopup);
}
SubtitleFontPopup *pSubtitleFont =
- (SubtitleFontPopup *) pSubtitleFontHandle;
+ (SubtitleFontPopup *) pSubtitleFontHandle;
evas_object_hide(pSubtitleFont->pPopup);
}
bool vp_subtitle_font_set_user_data(subtitle_font_handle
- pSubtitleFontHandle, void *pUserData)
+ pSubtitleFontHandle, void *pUserData)
{
if (pSubtitleFontHandle == NULL) {
VideoLogError("pSubtitleFontHandle is NULL");
}
SubtitleFontPopup *pSubtitleFont =
- (SubtitleFontPopup *) pSubtitleFontHandle;
+ (SubtitleFontPopup *) pSubtitleFontHandle;
pSubtitleFont->pUserData = pUserData;
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-play-string-define.h"
typedef struct _SubtitleSelectPopup {
- Evas_Object *pParent;
- Evas_Object *pPopup;
- Evas_Object *pRadio;
- Evas_Object *pButton;
- Evas_Object *pBox;
- Evas_Object *pGenList;
- Elm_Genlist_Item_Class *st_SubtitleSelect_Itc;
- Elm_Genlist_Item_Class *st_SubtitleSelect_Itc1;
-
- int nAppendCount;
-
- void *pUserData;
- SubtitleCloseCbFunc pCloseCb;
- SubtitleCloseCbFunc pButtonCb;
- GList *pItemList;
- int nSubtitleIdx;
+ Evas_Object *pParent;
+ Evas_Object *pPopup;
+ Evas_Object *pRadio;
+ Evas_Object *pButton;
+ Evas_Object *pBox;
+ Evas_Object *pGenList;
+ Elm_Genlist_Item_Class *st_SubtitleSelect_Itc;
+ Elm_Genlist_Item_Class *st_SubtitleSelect_Itc1;
+
+ int nAppendCount;
+
+ void *pUserData;
+ SubtitleCloseCbFunc pCloseCb;
+ SubtitleCloseCbFunc pButtonCb;
+ GList *pItemList;
+ int nSubtitleIdx;
} SubtitleSelectPopup;
-static void _vp_subtitle_select_destroy_handle(SubtitleSelectPopup *pSubtitleSelect);
-static void __vp_subtitle_select_genlist_item_selected_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo);
+static void _vp_subtitle_select_destroy_handle(SubtitleSelectPopup *
+ pSubtitleSelect);
+static void __vp_subtitle_select_genlist_item_selected_cb(void *pUserData,
+ Evas_Object *
+ pObj,
+ void
+ *pEventInfo);
-static void __vp_subtitle_select_genlist_realized(void *data, Evas_Object *obj, void *event_info)
+static void __vp_subtitle_select_genlist_realized(void *data,
+ Evas_Object * obj,
+ void *event_info)
{
VP_GENLIST_HIDE_BOTTOMLINE(data, obj, event_info);
}
-static void __vp_subtitle_select_popup_rotate_cb(void *data, Evas_Object *obj, void *event_info)
+static void __vp_subtitle_select_popup_rotate_cb(void *data,
+ Evas_Object * obj,
+ void *event_info)
{
- SubtitleSelectPopup *pSubtitleSelect = (SubtitleSelectPopup *)data;
+ SubtitleSelectPopup *pSubtitleSelect = (SubtitleSelectPopup *) data;
if (!pSubtitleSelect) {
VideoLogError("pSubtitleSelect IS null");
return;
if (pSubtitleSelect->nAppendCount < VP_POPUP_MIN_ITEMS) {
return;
}
- vp_popup_set_popup_min_size(pSubtitleSelect->pParent, pSubtitleSelect->pBox, pSubtitleSelect->nAppendCount, VIDEO_POPUP_2_TEXT_1_ICON);
+ vp_popup_set_popup_min_size(pSubtitleSelect->pParent,
+ pSubtitleSelect->pBox,
+ pSubtitleSelect->nAppendCount,
+ VIDEO_POPUP_2_TEXT_1_ICON);
}
/* callback functions */
-static char *__vp_subtitle_select_genlist_text_get_cb(const void *pUserData, Evas_Object *pObj, const char *pPart)
+static char *__vp_subtitle_select_genlist_text_get_cb(const void
+ *pUserData,
+ Evas_Object * pObj,
+ const char *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
return NULL;
}
- const char *szTxt = (const char *)pUserData;
+ const char *szTxt = (const char *) pUserData;
if (!strcmp(pPart, "elm.text")) {
const char *szFileName = vp_file_get(szTxt);
return NULL;
}
-static Evas_Object *__vp_subtitle_select_genlist_content_get_cb(const void *pUserData, Evas_Object *pObj, const char *pPart)
+static Evas_Object *__vp_subtitle_select_genlist_content_get_cb(const void
+ *pUserData,
+ Evas_Object
+ *pObj,
+ const char
+ *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
return NULL;
}
- char *szTxt = (char *)pUserData;
+ char *szTxt = (char *) pUserData;
if (!strcmp(pPart, "elm.swallow.end")) {
Evas_Object *pRadioObj = NULL;
- SubtitleSelectPopup *pSubtitleSelect = (SubtitleSelectPopup *)evas_object_data_get(pObj , VP_SUBTITLE_SELECT_GENLIST_DATA_KEY);
+ SubtitleSelectPopup *pSubtitleSelect =
+ (SubtitleSelectPopup *) evas_object_data_get(pObj,
+ VP_SUBTITLE_SELECT_GENLIST_DATA_KEY);
if (pSubtitleSelect == NULL) {
VideoLogWarning("evas_object_data_get is fail");
return NULL;
int i = 0;
nCount = g_list_length(pSubtitleSelect->pItemList);
- for (i = 0; i < nCount ; i++) {
+ for (i = 0; i < nCount; i++) {
char *szName = NULL;
- szName = (char *)g_list_nth_data(pSubtitleSelect->pItemList, i);
+ szName =
+ (char *) g_list_nth_data(pSubtitleSelect->pItemList,
+ i);
if (szName == NULL) {
continue;
pRadioObj = elm_radio_add(pObj);
elm_radio_state_value_set(pRadioObj, nIndex);
elm_radio_group_add(pRadioObj, pSubtitleSelect->pRadio);
- elm_radio_value_set(pSubtitleSelect->pRadio, pSubtitleSelect->nSubtitleIdx);
- evas_object_smart_callback_add(pRadioObj, "changed", __vp_subtitle_select_genlist_item_selected_cb, pSubtitleSelect);
+ elm_radio_value_set(pSubtitleSelect->pRadio,
+ pSubtitleSelect->nSubtitleIdx);
+ evas_object_smart_callback_add(pRadioObj, "changed",
+ __vp_subtitle_select_genlist_item_selected_cb,
+ pSubtitleSelect);
evas_object_show(pRadioObj);
return pRadioObj;
}
return NULL;
}
-static void __vp_subtitle_select_genlist_item_selected_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __vp_subtitle_select_genlist_item_selected_cb(void *pUserData,
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
Elm_Object_Item *pItem = (Elm_Object_Item *) pEventInfo;
- Elm_Object_Item *pSelectedItem = elm_genlist_selected_item_get(pObject);
+ Elm_Object_Item *pSelectedItem =
+ elm_genlist_selected_item_get(pObject);
if (pSelectedItem) {
elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
}
- char *szTxt = (char *)elm_object_item_data_get(pItem);
+ char *szTxt = (char *) elm_object_item_data_get(pItem);
VideoSecureLogInfo("Selected subtitle path=%s", szTxt);
if (szTxt == NULL) {
return;
}
- SubtitleSelectPopup *pSubtitleSelect = (SubtitleSelectPopup *)pUserData;
+ SubtitleSelectPopup *pSubtitleSelect =
+ (SubtitleSelectPopup *) pUserData;
int nIndex = 0;
int nCount = 0;
int i = 0;
nCount = g_list_length(pSubtitleSelect->pItemList);
- for (i = 0; i < nCount ; i++) {
+ for (i = 0; i < nCount; i++) {
char *szName = NULL;
- szName = (char *)g_list_nth_data(pSubtitleSelect->pItemList, i);
+ szName = (char *) g_list_nth_data(pSubtitleSelect->pItemList, i);
if (szName == NULL) {
continue;
char *szName = NULL;
VP_STRDUP(szName, szTxt);
if (pSubtitleSelect->pCloseCb) {
- pSubtitleSelect->pCloseCb(szName, (void *)pSubtitleSelect->pUserData);
+ pSubtitleSelect->pCloseCb(szName,
+ (void *) pSubtitleSelect->pUserData);
}
VP_FREE(szName);
}
}
-/*static void __vp_subtitle_select_popup_key_event_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
-{
- if (pUserData == NULL) {
- VideoLogError("pUserData is NULL");
- return;
- }
-
- SubtitleSelectPopup *pSubtitleSelect = (SubtitleSelectPopup *)pUserData;
- if (pSubtitleSelect->pCloseCb) {
- pSubtitleSelect->pCloseCb(NULL, (void *)pSubtitleSelect->pUserData);
- }
-}*/
-
-static void __vp_subtitle_select_popup_cancel_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
+static void __vp_subtitle_select_popup_cancel_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
return;
}
- SubtitleSelectPopup *pSubtitleSelect = (SubtitleSelectPopup *)pUserData;
+ SubtitleSelectPopup *pSubtitleSelect =
+ (SubtitleSelectPopup *) pUserData;
if (pSubtitleSelect->pButtonCb) {
- pSubtitleSelect->pButtonCb("cancel", (void *)pSubtitleSelect->pUserData);
+ pSubtitleSelect->pButtonCb("cancel",
+ (void *) pSubtitleSelect->pUserData);
}
}
-static void __vp_subtitle_select_popup_settings_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
+static void __vp_subtitle_select_popup_settings_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
return;
}
- SubtitleSelectPopup *pSubtitleSelect = (SubtitleSelectPopup *)pUserData;
+ SubtitleSelectPopup *pSubtitleSelect =
+ (SubtitleSelectPopup *) pUserData;
if (pSubtitleSelect->pButtonCb) {
- pSubtitleSelect->pButtonCb("settings", (void *)pSubtitleSelect->pUserData);
+ pSubtitleSelect->pButtonCb("settings",
+ (void *) pSubtitleSelect->pUserData);
}
}
-/*static void __vp_subtitle_select_popup_mouse_event_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
-{
- if (pUserData == NULL) {
- VideoLogError("pUserData is NULL");
- return;
- }
-
- if (pEventInfo == NULL) {
- VideoLogError("pEventInfo is NULL");
- return;
- }
-
- Evas_Event_Mouse_Up *ev = pEventInfo;
-
- if (ev->button == 3) {
- SubtitleSelectPopup *pSubtitleSelect = (SubtitleSelectPopup *)pUserData;
-
- if (pSubtitleSelect->pCloseCb) {
- pSubtitleSelect->pCloseCb(NULL, (void *)pSubtitleSelect->pUserData);
- }
- }
-}
-*/
/* internal functions */
-static void _vp_subtitle_select_destroy_handle(SubtitleSelectPopup *pSubtitleSelect)
+static void _vp_subtitle_select_destroy_handle(SubtitleSelectPopup *
+ pSubtitleSelect)
{
if (pSubtitleSelect == NULL) {
VideoLogError("pSubtitleSelect is NULL");
int nCount = 0;
int i = 0;
- evas_object_smart_callback_del(pSubtitleSelect->pParent, "rotation,changed", __vp_subtitle_select_popup_rotate_cb);
- evas_object_smart_callback_del(pSubtitleSelect->pGenList, "realized", __vp_subtitle_select_genlist_realized);
+ evas_object_smart_callback_del(pSubtitleSelect->pParent,
+ "rotation,changed",
+ __vp_subtitle_select_popup_rotate_cb);
+ evas_object_smart_callback_del(pSubtitleSelect->pGenList, "realized",
+ __vp_subtitle_select_genlist_realized);
VP_EVAS_DEL(pSubtitleSelect->pRadio);
VP_EVAS_DEL(pSubtitleSelect->pBox);
if (pSubtitleSelect->st_SubtitleSelect_Itc) {
- elm_genlist_item_class_free(pSubtitleSelect->st_SubtitleSelect_Itc);
+ elm_genlist_item_class_free(pSubtitleSelect->
+ st_SubtitleSelect_Itc);
pSubtitleSelect->st_SubtitleSelect_Itc = NULL;
}
nCount = g_list_length(pSubtitleSelect->pItemList);
- for (i = 0; i < nCount ; i++) {
+ for (i = 0; i < nCount; i++) {
char *szName = NULL;
- szName = (char *)g_list_nth_data(pSubtitleSelect->pItemList, i);
+ szName = (char *) g_list_nth_data(pSubtitleSelect->pItemList, i);
VP_FREE(szName);
}
}
-static Evas_Object *_vp_subtitle_select_create_genlist(Evas_Object *pParent)
+static Evas_Object *_vp_subtitle_select_create_genlist(Evas_Object *
+ pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
Evas_Object *pObj = NULL;
pObj = elm_genlist_add(pParent);
- evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(pObj);
return pObj;
}
-static bool _vp_subtitle_select_add_genlist_item(Evas_Object *pObj, void *pUserData)
+static bool _vp_subtitle_select_add_genlist_item(Evas_Object * pObj,
+ void *pUserData)
{
if (pObj == NULL) {
VideoLogError("pObj is NULL");
return FALSE;
}
- SubtitleSelectPopup *pSubtitleSelect = (SubtitleSelectPopup *)pUserData;
+ SubtitleSelectPopup *pSubtitleSelect =
+ (SubtitleSelectPopup *) pUserData;
if (pSubtitleSelect->st_SubtitleSelect_Itc) {
- elm_genlist_item_class_free(pSubtitleSelect->st_SubtitleSelect_Itc);
+ elm_genlist_item_class_free(pSubtitleSelect->
+ st_SubtitleSelect_Itc);
pSubtitleSelect->st_SubtitleSelect_Itc = NULL;
}
pSubtitleSelect->st_SubtitleSelect_Itc = elm_genlist_item_class_new();
if (pSubtitleSelect->st_SubtitleSelect_Itc != NULL) {
- pSubtitleSelect->st_SubtitleSelect_Itc->version = ELM_GENLIST_ITEM_CLASS_VERSION;
+ pSubtitleSelect->st_SubtitleSelect_Itc->version =
+ ELM_GENLIST_ITEM_CLASS_VERSION;
pSubtitleSelect->st_SubtitleSelect_Itc->item_style = "type1";
- pSubtitleSelect->st_SubtitleSelect_Itc->func.text_get = (void *)__vp_subtitle_select_genlist_text_get_cb;
- pSubtitleSelect->st_SubtitleSelect_Itc->func.content_get = (void *)__vp_subtitle_select_genlist_content_get_cb;
+ pSubtitleSelect->st_SubtitleSelect_Itc->func.text_get =
+ (void *) __vp_subtitle_select_genlist_text_get_cb;
+ pSubtitleSelect->st_SubtitleSelect_Itc->func.content_get =
+ (void *) __vp_subtitle_select_genlist_content_get_cb;
pSubtitleSelect->st_SubtitleSelect_Itc->func.state_get = NULL;
pSubtitleSelect->st_SubtitleSelect_Itc->func.del = NULL;
}
pSubtitleSelect->nAppendCount = 0;
Elm_Object_Item *it = NULL;
nCount = g_list_length(pSubtitleSelect->pItemList);
- for (i = 0; i < nCount ; i++) {
+ for (i = 0; i < nCount; i++) {
char *szName = NULL;
- szName = (char *)g_list_nth_data(pSubtitleSelect->pItemList, i);
+ szName = (char *) g_list_nth_data(pSubtitleSelect->pItemList, i);
if (szName == NULL) {
continue;
}
- it = elm_genlist_item_append(pObj, pSubtitleSelect->st_SubtitleSelect_Itc, (void *)szName, NULL, ELM_GENLIST_ITEM_NONE, __vp_subtitle_select_genlist_item_selected_cb, pUserData);
+ it = elm_genlist_item_append(pObj,
+ pSubtitleSelect->
+ st_SubtitleSelect_Itc,
+ (void *) szName, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_select_genlist_item_selected_cb,
+ pUserData);
pSubtitleSelect->nAppendCount++;
}
if (pSubtitleSelect->nAppendCount == 1) {
elm_object_item_disabled_set(it, EINA_TRUE);
}
- VideoLogError("pSubtitleSelect->nAppendCount= %d", pSubtitleSelect->nAppendCount);
+ VideoLogError("pSubtitleSelect->nAppendCount= %d",
+ pSubtitleSelect->nAppendCount);
return TRUE;
}
/* external functions */
-subtitle_select_handle vp_subtitle_select_create(Evas_Object *pParent, SubtitleCloseCbFunc pCloseCb, SubtitleCloseCbFunc pButtonCb, GList *pFileList, char *szCurrentPath, bool isSubtitleOff)
+subtitle_select_handle vp_subtitle_select_create(Evas_Object * pParent,
+ SubtitleCloseCbFunc
+ pCloseCb,
+ SubtitleCloseCbFunc
+ pButtonCb,
+ GList * pFileList,
+ char *szCurrentPath,
+ bool isSubtitleOff)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
nItemCount = g_list_length(pFileList);
}
if (nItemCount > 0)
- pSubtitleSelect->pPopup = vp_two_button_popup_create(pParent, VP_PLAY_STRING_SUBTITLE_SELECT_SUBTITLES,
- NULL, VP_PLAY_STRING_COM_CANCEL,
- __vp_subtitle_select_popup_cancel_cb, VP_PLAY_STRING_SETTINGS,
- __vp_subtitle_select_popup_settings_cb,
- (void *)pSubtitleSelect);
+ pSubtitleSelect->pPopup =
+ vp_two_button_popup_create(pParent,
+ VP_PLAY_STRING_SUBTITLE_SELECT_SUBTITLES,
+ NULL, VP_PLAY_STRING_COM_CANCEL,
+ __vp_subtitle_select_popup_cancel_cb,
+ VP_PLAY_STRING_SETTINGS,
+ __vp_subtitle_select_popup_settings_cb,
+ (void *) pSubtitleSelect);
else {
- pSubtitleSelect->pPopup = vp_two_button_popup_create(pParent, VP_PLAY_STRING_SUBTITLE_SELECT_SUBTITLES,
- NULL, VP_PLAY_STRING_COM_CANCEL,
- __vp_subtitle_select_popup_cancel_cb, VP_PLAY_STRING_SETTINGS,
- NULL,
- (void *)pSubtitleSelect);
+ pSubtitleSelect->pPopup =
+ vp_two_button_popup_create(pParent,
+ VP_PLAY_STRING_SUBTITLE_SELECT_SUBTITLES,
+ NULL, VP_PLAY_STRING_COM_CANCEL,
+ __vp_subtitle_select_popup_cancel_cb,
+ VP_PLAY_STRING_SETTINGS, NULL,
+ (void *) pSubtitleSelect);
Elm_Object_Item *it = NULL;
- it = (Evas_Object *)elm_object_part_content_get(pSubtitleSelect->pPopup, "button2");
+ it = (Evas_Object *) elm_object_part_content_get(pSubtitleSelect->
+ pPopup,
+ "button2");
if (it) {
elm_object_disabled_set(it, EINA_TRUE);
}
}
- eext_object_event_callback_add(pSubtitleSelect->pPopup, EEXT_CALLBACK_BACK, __vp_subtitle_select_popup_cancel_cb, (void *)pSubtitleSelect);
+ eext_object_event_callback_add(pSubtitleSelect->pPopup,
+ EEXT_CALLBACK_BACK,
+ __vp_subtitle_select_popup_cancel_cb,
+ (void *) pSubtitleSelect);
if (pSubtitleSelect->pPopup == NULL) {
VideoLogError("vp_popup_create fail");
_vp_subtitle_select_destroy_handle(pSubtitleSelect);
return NULL;
}
- pSubtitleSelect->pGenList = _vp_subtitle_select_create_genlist(pSubtitleSelect->pPopup);
+ pSubtitleSelect->pGenList =
+ _vp_subtitle_select_create_genlist(pSubtitleSelect->pPopup);
if (pSubtitleSelect->pGenList == NULL) {
VideoLogError("_vp_subtitle_select_create_genlist fail");
_vp_subtitle_select_destroy_handle(pSubtitleSelect);
return NULL;
}
- evas_object_data_set(pSubtitleSelect->pGenList , VP_SUBTITLE_SELECT_GENLIST_DATA_KEY, (void *)pSubtitleSelect);
+ evas_object_data_set(pSubtitleSelect->pGenList,
+ VP_SUBTITLE_SELECT_GENLIST_DATA_KEY,
+ (void *) pSubtitleSelect);
elm_genlist_mode_set(pSubtitleSelect->pGenList, ELM_LIST_COMPRESS);
- evas_object_smart_callback_add(pSubtitleSelect->pGenList, "realized", __vp_subtitle_select_genlist_realized, NULL);
+ evas_object_smart_callback_add(pSubtitleSelect->pGenList, "realized",
+ __vp_subtitle_select_genlist_realized,
+ NULL);
pSubtitleSelect->pRadio = elm_radio_add(pSubtitleSelect->pGenList);
for (i = 0; i < nItemCount; i++) {
char *szName = NULL;
char *szItem = NULL;
- szName = (char *)g_list_nth_data(pFileList, i);
+ szName = (char *) g_list_nth_data(pFileList, i);
if (szName == NULL) {
continue;
}
if (szCurrentPath) {
if (strcmp(szName, szCurrentPath) == 0) {
pSubtitleSelect->nSubtitleIdx = nCount;
- elm_radio_value_set(pSubtitleSelect->pRadio, pSubtitleSelect->nSubtitleIdx);
+ elm_radio_value_set(pSubtitleSelect->pRadio,
+ pSubtitleSelect->nSubtitleIdx);
}
}
VP_STRDUP(szItem, szName);
- pSubtitleSelect->pItemList = g_list_append(pSubtitleSelect->pItemList, (void *)szItem);
+ pSubtitleSelect->pItemList =
+ g_list_append(pSubtitleSelect->pItemList, (void *) szItem);
nCount++;
}
}
- //char *szName = VP_PLAY_STRING_SUBTITLE_OFF;
char *szItem = NULL;
VP_STRDUP(szItem, VP_PLAY_STRING_SUBTITLE_OFF);
- pSubtitleSelect->pItemList = g_list_append(pSubtitleSelect->pItemList, (void *)szItem);
+ pSubtitleSelect->pItemList =
+ g_list_append(pSubtitleSelect->pItemList, (void *) szItem);
nCount++;
bool bOn = FALSE;
vp_play_preference_get_subtitle_show_key(&bOn);
- if (!_vp_subtitle_select_add_genlist_item(pSubtitleSelect->pGenList, (void *)pSubtitleSelect)) {
+ if (!_vp_subtitle_select_add_genlist_item
+ (pSubtitleSelect->pGenList, (void *) pSubtitleSelect)) {
VideoLogError("_vp_subtitle_select_add_genlist_item fail");
return FALSE;
}
if (isSubtitleOff || !bOn) {
pSubtitleSelect->nSubtitleIdx = (nCount - 1);
- elm_radio_value_set(pSubtitleSelect->pRadio, pSubtitleSelect->nSubtitleIdx);
+ elm_radio_value_set(pSubtitleSelect->pRadio,
+ pSubtitleSelect->nSubtitleIdx);
}
- evas_object_smart_callback_add(pSubtitleSelect->pParent, "rotation,changed", __vp_subtitle_select_popup_rotate_cb, pSubtitleSelect);
+ evas_object_smart_callback_add(pSubtitleSelect->pParent,
+ "rotation,changed",
+ __vp_subtitle_select_popup_rotate_cb,
+ pSubtitleSelect);
pSubtitleSelect->pBox = elm_box_add(pSubtitleSelect->pPopup);
- vp_popup_set_popup_min_size(pSubtitleSelect->pParent, pSubtitleSelect->pBox, pSubtitleSelect->nAppendCount, VIDEO_POPUP_DEFAULT);
+ vp_popup_set_popup_min_size(pSubtitleSelect->pParent,
+ pSubtitleSelect->pBox,
+ pSubtitleSelect->nAppendCount,
+ VIDEO_POPUP_DEFAULT);
elm_box_pack_end(pSubtitleSelect->pBox, pSubtitleSelect->pGenList);
elm_object_content_set(pSubtitleSelect->pPopup, pSubtitleSelect->pBox);
return pSubtitleSelect;
}
-void vp_subtitle_select_destroy(subtitle_select_handle pSubtitleSelectHandle)
+void vp_subtitle_select_destroy(subtitle_select_handle
+ pSubtitleSelectHandle)
{
if (pSubtitleSelectHandle == NULL) {
VideoLogError("pSubtitleSelectHandle is NULL");
return;
}
- SubtitleSelectPopup *pSubtitleSelect = (SubtitleSelectPopup *)pSubtitleSelectHandle;
+ SubtitleSelectPopup *pSubtitleSelect =
+ (SubtitleSelectPopup *) pSubtitleSelectHandle;
_vp_subtitle_select_destroy_handle(pSubtitleSelect);
}
-bool vp_subtitle_select_realize(subtitle_select_handle pSubtitleSelectHandle)
+bool vp_subtitle_select_realize(subtitle_select_handle
+ pSubtitleSelectHandle)
{
if (pSubtitleSelectHandle == NULL) {
VideoLogError("pSubtitleSelectHandle is NULL");
return FALSE;
}
- SubtitleSelectPopup *pSubtitleSelect = (SubtitleSelectPopup *)pSubtitleSelectHandle;
+ SubtitleSelectPopup *pSubtitleSelect =
+ (SubtitleSelectPopup *) pSubtitleSelectHandle;
evas_object_show(pSubtitleSelect->pPopup);
return TRUE;
}
-bool vp_subtitle_select_unrealize(subtitle_select_handle pSubtitleSelectHandle)
+bool vp_subtitle_select_unrealize(subtitle_select_handle
+ pSubtitleSelectHandle)
{
if (pSubtitleSelectHandle == NULL) {
VideoLogError("pSubtitleSelectHandle is NULL");
return FALSE;
}
- SubtitleSelectPopup *pSubtitleSelect = (SubtitleSelectPopup *)pSubtitleSelectHandle;
+ SubtitleSelectPopup *pSubtitleSelect =
+ (SubtitleSelectPopup *) pSubtitleSelectHandle;
evas_object_hide(pSubtitleSelect->pPopup);
return TRUE;
}
-bool vp_subtitle_select_set_user_data(subtitle_select_handle pSubtitleSelectHandle, void *pUserData)
+bool vp_subtitle_select_set_user_data(subtitle_select_handle
+ pSubtitleSelectHandle,
+ void *pUserData)
{
if (pSubtitleSelectHandle == NULL) {
VideoLogError("pSubtitleSelectHandle is NULL");
return FALSE;
}
- SubtitleSelectPopup *pSubtitleSelect = (SubtitleSelectPopup *)pSubtitleSelectHandle;
+ SubtitleSelectPopup *pSubtitleSelect =
+ (SubtitleSelectPopup *) pSubtitleSelectHandle;
pSubtitleSelect->pUserData = pUserData;
return TRUE;
}
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
#include "vp-play-string-define.h"
static void _vp_subtitle_size_destroy_handle(SubtitleSizePopup *
- pSubtitleSize);
+ pSubtitleSize);
static void __vp_subtitle_size_genlist_item_selected_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo);
+ Evas_Object *
+ pObject,
+ void *pEventInfo);
static void __vp_subtitle_size_genlist_realized(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
VP_GENLIST_HIDE_BOTTOMLINE(data, obj, event_info);
}
static void __vp_subtitle_size_popup_rotate_cb(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
SubtitleSizePopup *pSubtitleSize = (SubtitleSizePopup *) data;
if (!pSubtitleSize) {
return;
}
vp_popup_set_popup_min_size(pSubtitleSize->pParent,
- pSubtitleSize->pBox,
- pSubtitleSize->nListCount,
- VIDEO_POPUP_DEFAULT);
+ pSubtitleSize->pBox,
+ pSubtitleSize->nListCount,
+ VIDEO_POPUP_DEFAULT);
}
/* callback functions */
static char *__vp_subtitle_size_genlist_text_get_cb(const void *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ Evas_Object * pObj,
+ const char *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
snprintf(szTmp, VP_STRING_LEN_MAX - 1,
- "<font_size=%d>%s</font_size>", nSize, szTxt);
+ "<font_size=%d>%s</font_size>", nSize, szTxt);
return strdup(szTmp);
}
}
static Evas_Object *__vp_subtitle_size_genlist_content_get_cb(const void
- *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ *pUserData,
+ Evas_Object *
+ pObj,
+ const char
+ *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Evas_Object *pRadioObj = NULL;
SubtitleSizePopup *pSubtitleSize =
- (SubtitleSizePopup *) evas_object_data_get(pObj,
- VP_SUBTITLE_SIZE_GENLIST_DATA_KEY);
+ (SubtitleSizePopup *) evas_object_data_get(pObj,
+ VP_SUBTITLE_SIZE_GENLIST_DATA_KEY);
if (pSubtitleSize == NULL) {
VideoLogWarning("evas_object_data_get is fail");
return NULL;
elm_radio_state_value_set(pRadioObj, nSize);
elm_radio_group_add(pRadioObj, pSubtitleSize->pRadio);
elm_radio_value_set(pSubtitleSize->pRadio,
- pSubtitleSize->currentSubtitleSize);
+ pSubtitleSize->currentSubtitleSize);
evas_object_smart_callback_add(pRadioObj, "changed",
- __vp_subtitle_size_genlist_item_selected_cb,
- pSubtitleSize);
+ __vp_subtitle_size_genlist_item_selected_cb,
+ pSubtitleSize);
evas_object_show(pRadioObj);
return pRadioObj;
}
static void __vp_subtitle_size_genlist_item_selected_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Elm_Object_Item *pItem = (Elm_Object_Item *) pEventInfo;
Elm_Object_Item *pSelectedItem =
- elm_genlist_selected_item_get(pObject);
+ elm_genlist_selected_item_get(pObject);
if (pSelectedItem) {
elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
}
pSubtitleSize->currentSubtitleSize = nSize;
if (pSubtitleSize->pCloseCb) {
pSubtitleSize->pCloseCb(nSize, FALSE,
- (void *) pSubtitleSize->pUserData);
+ (void *) pSubtitleSize->pUserData);
}
}
static void __vp_subtitle_size_popup_key_event_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pSubtitleSize->pCloseCb) {
pSubtitleSize->pCloseCb(-1, FALSE,
- (void *) pSubtitleSize->pUserData);
+ (void *) pSubtitleSize->pUserData);
}
}
static void __vp_subtitle_size_popup_mouse_event_cb(void *pUserData,
- Evas *pEvas,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas * pEvas,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Evas_Event_Mouse_Up *ev = pEventInfo;
if (ev->button == 3) {
- SubtitleSizePopup *pSubtitleSize =
- (SubtitleSizePopup *) pUserData;
+ SubtitleSizePopup *pSubtitleSize = (SubtitleSizePopup *) pUserData;
if (pSubtitleSize->pCloseCb) {
pSubtitleSize->pCloseCb(-1, FALSE,
- (void *) pSubtitleSize->pUserData);
+ (void *) pSubtitleSize->pUserData);
}
}
}
/* internal functions */
static void _vp_subtitle_size_destroy_handle(SubtitleSizePopup *
- pSubtitleSize)
+ pSubtitleSize)
{
if (pSubtitleSize == NULL) {
VideoLogError("pSubtitleSize is NULL");
}
evas_object_smart_callback_del(pSubtitleSize->pParent,
- "rotation,changed",
- __vp_subtitle_size_popup_rotate_cb);
+ "rotation,changed",
+ __vp_subtitle_size_popup_rotate_cb);
evas_object_smart_callback_del(pSubtitleSize->pGenList, "realized",
- __vp_subtitle_size_genlist_realized);
+ __vp_subtitle_size_genlist_realized);
VP_EVAS_DEL(pSubtitleSize->pRadio);
VP_EVAS_DEL(pSubtitleSize->pGenList);
}
-static Evas_Object *_vp_subtitle_size_create_genlist(Evas_Object *
- pParent)
+static Evas_Object *_vp_subtitle_size_create_genlist(Evas_Object * pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_genlist_add(pParent);
evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(pObj);
return pObj;
}
-static bool _vp_subtitle_size_add_genlist_item(Evas_Object *pObj,
- void *pUserData)
+static bool _vp_subtitle_size_add_genlist_item(Evas_Object * pObj,
+ void *pUserData)
{
if (pObj == NULL) {
VideoLogError("pObj is NULL");
if (pSubtitleSize->st_SubtitleSize_Itc != NULL) {
pSubtitleSize->st_SubtitleSize_Itc->version =
- ELM_GENLIST_ITEM_CLASS_VERSION;
+ ELM_GENLIST_ITEM_CLASS_VERSION;
pSubtitleSize->st_SubtitleSize_Itc->item_style = "type1";
pSubtitleSize->st_SubtitleSize_Itc->func.text_get =
- (void *) __vp_subtitle_size_genlist_text_get_cb;
+ (void *) __vp_subtitle_size_genlist_text_get_cb;
pSubtitleSize->st_SubtitleSize_Itc->func.content_get =
- (void *) __vp_subtitle_size_genlist_content_get_cb;
+ (void *) __vp_subtitle_size_genlist_content_get_cb;
pSubtitleSize->st_SubtitleSize_Itc->func.state_get = NULL;
pSubtitleSize->st_SubtitleSize_Itc->func.del = NULL;
pSubtitleSize->nListCount = 0;
elm_genlist_item_append(pObj,
- pSubtitleSize->st_SubtitleSize_Itc,
- (void *) VP_PLAY_STRING_SUBTITLE_SIZE_LARGE,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_size_genlist_item_selected_cb,
- pUserData);
+ pSubtitleSize->st_SubtitleSize_Itc,
+ (void *)
+ VP_PLAY_STRING_SUBTITLE_SIZE_LARGE, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_size_genlist_item_selected_cb,
+ pUserData);
pSubtitleSize->nListCount++;
elm_genlist_item_append(pObj, pSubtitleSize->st_SubtitleSize_Itc,
- (void *) VP_PLAY_STRING_SUBTITLE_SIZE_MEDIUM,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_size_genlist_item_selected_cb,
- pUserData);
+ (void *)
+ VP_PLAY_STRING_SUBTITLE_SIZE_MEDIUM, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_size_genlist_item_selected_cb,
+ pUserData);
pSubtitleSize->nListCount++;
elm_genlist_item_append(pObj, pSubtitleSize->st_SubtitleSize_Itc,
- (void *) VP_PLAY_STRING_SUBTITLE_SIZE_SMALL,
- NULL, ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_size_genlist_item_selected_cb,
- pUserData);
+ (void *)
+ VP_PLAY_STRING_SUBTITLE_SIZE_SMALL, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_size_genlist_item_selected_cb,
+ pUserData);
pSubtitleSize->nListCount++;
}
}
/* external functions */
-subtitle_size_handle vp_subtitle_size_create(Evas_Object *pParent,
- PopupCloseCbFunc pCloseCb,
- int nDefaultSize)
+subtitle_size_handle vp_subtitle_size_create(Evas_Object * pParent,
+ PopupCloseCbFunc pCloseCb,
+ int nDefaultSize)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pSubtitleSize->pCloseCb = pCloseCb;
pSubtitleSize->pPopup =
- vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
- VP_PLAY_STRING_SUBTITLE_SIZE, NULL, 0.0, NULL,
- __vp_subtitle_size_popup_key_event_cb,
- __vp_subtitle_size_popup_mouse_event_cb,
- (void *) pSubtitleSize);
+ vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
+ VP_PLAY_STRING_SUBTITLE_SIZE, NULL, 0.0, NULL,
+ __vp_subtitle_size_popup_key_event_cb,
+ __vp_subtitle_size_popup_mouse_event_cb,
+ (void *) pSubtitleSize);
if (pSubtitleSize->pPopup == NULL) {
VideoLogError("vp_popup_create fail");
_vp_subtitle_size_destroy_handle(pSubtitleSize);
}
pSubtitleSize->pGenList =
- _vp_subtitle_size_create_genlist(pSubtitleSize->pPopup);
+ _vp_subtitle_size_create_genlist(pSubtitleSize->pPopup);
if (pSubtitleSize->pGenList == NULL) {
VideoLogError("_vp_subtitle_size_create_genlist fail");
_vp_subtitle_size_destroy_handle(pSubtitleSize);
return NULL;
}
evas_object_data_set(pSubtitleSize->pGenList,
- VP_SUBTITLE_SIZE_GENLIST_DATA_KEY,
- (void *) pSubtitleSize);
+ VP_SUBTITLE_SIZE_GENLIST_DATA_KEY,
+ (void *) pSubtitleSize);
evas_object_smart_callback_add(pSubtitleSize->pGenList, "realized",
- __vp_subtitle_size_genlist_realized,
- NULL);
+ __vp_subtitle_size_genlist_realized,
+ NULL);
pSubtitleSize->pRadio = elm_radio_add(pSubtitleSize->pGenList);
if (!_vp_subtitle_size_add_genlist_item
- (pSubtitleSize->pGenList, (void *) pSubtitleSize)) {
+ (pSubtitleSize->pGenList, (void *) pSubtitleSize)) {
VideoLogError("_vp_subtitle_size_add_genlist_item fail");
return FALSE;
}
- //elm_radio_value_set(pSubtitleSize->pRadio, nDefaultSize);
+
pSubtitleSize->currentSubtitleSize = nDefaultSize;
evas_object_smart_callback_add(pSubtitleSize->pParent,
- "rotation,changed",
- __vp_subtitle_size_popup_rotate_cb,
- pSubtitleSize);
+ "rotation,changed",
+ __vp_subtitle_size_popup_rotate_cb,
+ pSubtitleSize);
pSubtitleSize->pBox = elm_box_add(pSubtitleSize->pPopup);
vp_popup_set_popup_min_size(pSubtitleSize->pParent,
- pSubtitleSize->pBox,
- pSubtitleSize->nListCount,
- VIDEO_POPUP_DEFAULT);
+ pSubtitleSize->pBox,
+ pSubtitleSize->nListCount,
+ VIDEO_POPUP_DEFAULT);
elm_box_pack_end(pSubtitleSize->pBox, pSubtitleSize->pGenList);
elm_object_content_set(pSubtitleSize->pPopup, pSubtitleSize->pBox);
}
SubtitleSizePopup *pSubtitleSize =
- (SubtitleSizePopup *) pSubtitleSizeHandle;
+ (SubtitleSizePopup *) pSubtitleSizeHandle;
_vp_subtitle_size_destroy_handle(pSubtitleSize);
}
SubtitleSizePopup *pSubtitleSize =
- (SubtitleSizePopup *) pSubtitleSizeHandle;
+ (SubtitleSizePopup *) pSubtitleSizeHandle;
evas_object_show(pSubtitleSize->pPopup);
}
SubtitleSizePopup *pSubtitleSize =
- (SubtitleSizePopup *) pSubtitleSizeHandle;
+ (SubtitleSizePopup *) pSubtitleSizeHandle;
evas_object_hide(pSubtitleSize->pPopup);
}
bool vp_subtitle_size_set_user_data(subtitle_size_handle
- pSubtitleSizeHandle, void *pUserData)
+ pSubtitleSizeHandle, void *pUserData)
{
if (pSubtitleSizeHandle == NULL) {
VideoLogError("pSubtitleSizeHandle is NULL");
}
SubtitleSizePopup *pSubtitleSize =
- (SubtitleSizePopup *) pSubtitleSizeHandle;
+ (SubtitleSizePopup *) pSubtitleSizeHandle;
pSubtitleSize->pUserData = pUserData;
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
#include "vp-play-string-define.h"
static void _vp_subtitle_sync_popup_destroy_handle(SubtitleSyncPopup *
- pSubtitleSyncPopup);
+ pSubtitleSyncPopup);
static void _vp_subtitle_sync_update_text(SubtitleSyncPopup *
- pSubtitleSyncPopup);
+ pSubtitleSyncPopup);
/* callback functions */
static void __vp_subtitle_sync_popup_ok_btn_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
SubtitleSyncPopup *pSubtitleSyncPopup =
- (SubtitleSyncPopup *) pUserData;
+ (SubtitleSyncPopup *) pUserData;
if (pSubtitleSyncPopup->pDoneCb) {
pSubtitleSyncPopup->pDoneCb(pSubtitleSyncPopup->fSyncVal, TRUE,
- (void *) pSubtitleSyncPopup->
- pUserData);
+ (void *)
+ pSubtitleSyncPopup->pUserData);
}
}
static void __vp_subtitle_sync_popup_cancel_btn_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
SubtitleSyncPopup *pSubtitleSyncPopup =
- (SubtitleSyncPopup *) pUserData;
+ (SubtitleSyncPopup *) pUserData;
if (pSubtitleSyncPopup->pDoneCb) {
pSubtitleSyncPopup->pDoneCb(pSubtitleSyncPopup->fSyncVal, FALSE,
- (void *) pSubtitleSyncPopup->
- pUserData);
+ (void *)
+ pSubtitleSyncPopup->pUserData);
}
}
static void __vp_subtitle_sync_popup_key_event_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
SubtitleSyncPopup *pSubtitleSyncPopup =
- (SubtitleSyncPopup *) pUserData;
+ (SubtitleSyncPopup *) pUserData;
if (pSubtitleSyncPopup->pDoneCb) {
pSubtitleSyncPopup->pDoneCb(pSubtitleSyncPopup->fSyncVal, FALSE,
- (void *) pSubtitleSyncPopup->
- pUserData);
+ (void *)
+ pSubtitleSyncPopup->pUserData);
}
}
static void __vp_subtitle_sync_popup_mouse_event_cb(void *pUserData,
- Evas *pEvas,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas * pEvas,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (ev->button == 3) {
SubtitleSyncPopup *pSubtitleSyncPopup =
- (SubtitleSyncPopup *) pUserData;
+ (SubtitleSyncPopup *) pUserData;
if (pSubtitleSyncPopup->pDoneCb) {
pSubtitleSyncPopup->pDoneCb(pSubtitleSyncPopup->fSyncVal,
- FALSE,
- (void *) pSubtitleSyncPopup->
- pUserData);
+ FALSE,
+ (void *)
+ pSubtitleSyncPopup->pUserData);
}
}
}
static void __vp_subtitle_sync_popup_slider_change_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
SubtitleSyncPopup *pSubtitleSyncPopup =
- (SubtitleSyncPopup *) pUserData;
+ (SubtitleSyncPopup *) pUserData;
float fValue =
- (float) elm_slider_value_get(pSubtitleSyncPopup->pSlider);
+ (float) elm_slider_value_get(pSubtitleSyncPopup->pSlider);
if (fValue != pSubtitleSyncPopup->fSyncVal) {
if (pSubtitleSyncPopup->pUpdateCb) {
pSubtitleSyncPopup->pUpdateCb(pSubtitleSyncPopup->fSyncVal,
- (void *) pSubtitleSyncPopup->
- pUserData);
+ (void *)
+ pSubtitleSyncPopup->pUserData);
pSubtitleSyncPopup->fSyncVal = fValue;
_vp_subtitle_sync_update_text(pSubtitleSyncPopup);
}
}
static void __vp_subtitle_sync_btn_clicked_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEvent)
+ Evas_Object * pObj,
+ void *pEvent)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
SubtitleSyncPopup *pSubtitleSyncPopup =
- (SubtitleSyncPopup *) pUserData;
+ (SubtitleSyncPopup *) pUserData;
float fValue =
- (float) elm_slider_value_get(pSubtitleSyncPopup->pSlider);
+ (float) elm_slider_value_get(pSubtitleSyncPopup->pSlider);
VideoLogWarning("== %f ==", fValue);
if (pObj == pSubtitleSyncPopup->pAddButton) {
if (fValue <= VP_SUBTITLE_SYNC_MAX_VALUE) {
VideoLogWarning("== %f ==", fValue);
elm_slider_value_set(pSubtitleSyncPopup->pSlider,
- (double) fValue);
+ (double) fValue);
if (pSubtitleSyncPopup->pUpdateCb) {
- pSubtitleSyncPopup->pUpdateCb(pSubtitleSyncPopup->
- fSyncVal,
- (void *)
- pSubtitleSyncPopup->
- pUserData);
+ pSubtitleSyncPopup->pUpdateCb(pSubtitleSyncPopup->fSyncVal,
+ (void *)
+ pSubtitleSyncPopup->pUserData);
pSubtitleSyncPopup->fSyncVal = fValue;
_vp_subtitle_sync_update_text(pSubtitleSyncPopup);
}
if (fValue >= VP_SUBTITLE_SYNC_MIN_VALUE) {
VideoLogWarning("== %f ==", fValue);
elm_slider_value_set(pSubtitleSyncPopup->pSlider,
- (double) fValue);
+ (double) fValue);
if (pSubtitleSyncPopup->pUpdateCb) {
- pSubtitleSyncPopup->pUpdateCb(pSubtitleSyncPopup->
- fSyncVal,
- (void *)
- pSubtitleSyncPopup->
- pUserData);
+ pSubtitleSyncPopup->pUpdateCb(pSubtitleSyncPopup->fSyncVal,
+ (void *)
+ pSubtitleSyncPopup->pUserData);
pSubtitleSyncPopup->fSyncVal = fValue;
_vp_subtitle_sync_update_text(pSubtitleSyncPopup);
}
/* internal functions */
static void _vp_subtitle_sync_popup_destroy_handle(SubtitleSyncPopup *
- pSubtitleSyncPopup)
+ pSubtitleSyncPopup)
{
if (pSubtitleSyncPopup == NULL) {
VideoLogError("pSubtitleSyncPopup is NULL");
}
static void _vp_subtitle_sync_update_text(SubtitleSyncPopup *
- pSubtitleSyncPopup)
+ pSubtitleSyncPopup)
{
if (pSubtitleSyncPopup == NULL) {
VideoLogError("pSubtitleSyncPopup is NULL");
snprintf(szValue, 6, "%0.1f", (double) pSubtitleSyncPopup->fSyncVal);
elm_object_part_text_set(pSubtitleSyncPopup->pLayout,
- "elm.text.title", szValue);
+ "elm.text.title", szValue);
}
static Evas_Object *_vp_subtitle_sync_popup_create_ok_button(Evas_Object *
- pParent,
- void *pUserData)
+ pParent,
+ void
+ *pUserData)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_button_add(pParent);
elm_object_style_set(pObj, "popup_button/default");
elm_object_domain_translatable_text_set(pObj, VP_SYS_STR_PREFIX,
- VP_PLAY_STRING_COM_OK_IDS);
+ VP_PLAY_STRING_COM_OK_IDS);
elm_object_part_content_set(pParent, "button2", pObj);
evas_object_smart_callback_add(pObj, "clicked",
- __vp_subtitle_sync_popup_ok_btn_cb,
- pUserData);
+ __vp_subtitle_sync_popup_ok_btn_cb,
+ pUserData);
evas_object_show(pObj);
return pObj;
static Evas_Object
-*_vp_subtitle_sync_popup_create_cancel_button(Evas_Object *pParent,
- void *pUserData)
+ *_vp_subtitle_sync_popup_create_cancel_button(Evas_Object * pParent,
+ void *pUserData)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_button_add(pParent);
elm_object_style_set(pObj, "popup_button/default");
elm_object_domain_translatable_text_set(pObj, VP_SYS_STR_PREFIX,
- VP_PLAY_STRING_COM_CANCEL_IDS);
+ VP_PLAY_STRING_COM_CANCEL_IDS);
elm_object_part_content_set(pParent, "button1", pObj);
evas_object_smart_callback_add(pObj, "clicked",
- __vp_subtitle_sync_popup_cancel_btn_cb,
- pUserData);
+ __vp_subtitle_sync_popup_cancel_btn_cb,
+ pUserData);
evas_object_show(pObj);
return pObj;
}
static Evas_Object *_vp_subtitle_sync_popup_create_slider(Evas_Object *
- pParent,
- void *pUserData)
+ pParent,
+ void *pUserData)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_slider_add(pParent);
elm_slider_indicator_show_set(pObj, EINA_FALSE);
evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_slider_min_max_set(pObj, VP_SUBTITLE_SYNC_MIN_VALUE,
- VP_SUBTITLE_SYNC_MAX_VALUE);
+ VP_SUBTITLE_SYNC_MAX_VALUE);
evas_object_smart_callback_add(pObj, "changed",
- __vp_subtitle_sync_popup_slider_change_cb,
- pUserData);
+ __vp_subtitle_sync_popup_slider_change_cb,
+ pUserData);
return pObj;
}
-static bool _vp_subtitle_sync_popup_create_button(Evas_Object *pParent,
- void *pUserData)
+static bool _vp_subtitle_sync_popup_create_button(Evas_Object * pParent,
+ void *pUserData)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
return FALSE;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_RESROUCE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_RESROUCE_EDJ_PATH);
free(path);
SubtitleSyncPopup *pSubtitleSyncPopup =
- (SubtitleSyncPopup *) pUserData;
+ (SubtitleSyncPopup *) pUserData;
pSubtitleSyncPopup->pDelButton =
- vp_button_create(pParent, "custom/flat_63_78/default",
- NULL,
- (Evas_Smart_Cb)
- __vp_subtitle_sync_btn_clicked_cb,
- (Evas_Smart_Cb) NULL, (Evas_Smart_Cb) NULL,
- (void *) pSubtitleSyncPopup);
+ vp_button_create(pParent, "custom/flat_63_78/default",
+ NULL, (Evas_Smart_Cb)
+ __vp_subtitle_sync_btn_clicked_cb,
+ (Evas_Smart_Cb) NULL, (Evas_Smart_Cb) NULL,
+ (void *) pSubtitleSyncPopup);
pSubtitleSyncPopup->pAddButton =
- vp_button_create(pParent, "custom/flat_63_78/default",
- NULL,
- (Evas_Smart_Cb)
- __vp_subtitle_sync_btn_clicked_cb,
- (Evas_Smart_Cb) NULL, (Evas_Smart_Cb) NULL,
- (void *) pSubtitleSyncPopup);
+ vp_button_create(pParent, "custom/flat_63_78/default",
+ NULL, (Evas_Smart_Cb)
+ __vp_subtitle_sync_btn_clicked_cb,
+ (Evas_Smart_Cb) NULL, (Evas_Smart_Cb) NULL,
+ (void *) pSubtitleSyncPopup);
Evas_Object *pIcon = NULL;
pIcon =
- vp_button_create_icon(pSubtitleSyncPopup->pDelButton,
- edj_path,
- VP_PLAY_RES_BUTTON_DEL);
+ vp_button_create_icon(pSubtitleSyncPopup->pDelButton,
+ edj_path, VP_PLAY_RES_BUTTON_DEL);
elm_object_part_content_set(pSubtitleSyncPopup->pDelButton,
- VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
pIcon =
- vp_button_create_icon(pSubtitleSyncPopup->pDelButton,
- edj_path,
- VP_PLAY_RES_BUTTON_DEL_PRESS);
+ vp_button_create_icon(pSubtitleSyncPopup->pDelButton,
+ edj_path, VP_PLAY_RES_BUTTON_DEL_PRESS);
elm_object_part_content_set(pSubtitleSyncPopup->pDelButton,
- VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
pIcon =
- vp_button_create_icon(pSubtitleSyncPopup->pDelButton,
- edj_path,
- VP_PLAY_RES_BUTTON_DEL);
+ vp_button_create_icon(pSubtitleSyncPopup->pDelButton,
+ edj_path, VP_PLAY_RES_BUTTON_DEL);
elm_object_part_content_set(pSubtitleSyncPopup->pDelButton,
- VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
pIcon =
- vp_button_create_icon(pSubtitleSyncPopup->pAddButton,
- edj_path,
- VP_PLAY_RES_BUTTON_ADD);
+ vp_button_create_icon(pSubtitleSyncPopup->pAddButton,
+ edj_path, VP_PLAY_RES_BUTTON_ADD);
elm_object_part_content_set(pSubtitleSyncPopup->pAddButton,
- VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
pIcon =
- vp_button_create_icon(pSubtitleSyncPopup->pAddButton,
- edj_path,
- VP_PLAY_RES_BUTTON_ADD_PRESS);
+ vp_button_create_icon(pSubtitleSyncPopup->pAddButton,
+ edj_path, VP_PLAY_RES_BUTTON_ADD_PRESS);
elm_object_part_content_set(pSubtitleSyncPopup->pAddButton,
- VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
pIcon =
- vp_button_create_icon(pSubtitleSyncPopup->pAddButton,
- edj_path,
- VP_PLAY_RES_BUTTON_ADD);
+ vp_button_create_icon(pSubtitleSyncPopup->pAddButton,
+ edj_path, VP_PLAY_RES_BUTTON_ADD);
elm_object_part_content_set(pSubtitleSyncPopup->pAddButton,
- VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
elm_object_part_content_set(pParent, "elm.swallow.icon.1",
- pSubtitleSyncPopup->pDelButton);
+ pSubtitleSyncPopup->pDelButton);
elm_object_part_content_set(pParent, "elm.swallow.icon.2",
- pSubtitleSyncPopup->pAddButton);
+ pSubtitleSyncPopup->pAddButton);
return TRUE;
}
static Evas_Object *_vp_subtitle_sync_popup_create_layout(Evas_Object *
- pParent)
+ pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
VideoLogError("pLayout object is NULL");
return NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_SPEED_POPUP_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_SPEED_POPUP_EDJ);
free(path);
elm_layout_file_set(pLayout, edj_path,
- VP_PLAY_EDJ_GROUP_PLAY_SPEED_POPUP);
+ VP_PLAY_EDJ_GROUP_PLAY_SPEED_POPUP);
evas_object_size_hint_weight_set(pLayout, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pLayout, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_show(pLayout);
/* external functions */
-subtitle_sync_popup vp_subtitle_sync_popup_create(Evas_Object *pParent,
- float fSyncVal,
- SubtitleSyncUpdateCbFunc
- pUpdateCb,
- SubtitleSyncDoneCbFunc
- pDoneCb)
+subtitle_sync_popup vp_subtitle_sync_popup_create(Evas_Object * pParent,
+ float fSyncVal,
+ SubtitleSyncUpdateCbFunc
+ pUpdateCb,
+ SubtitleSyncDoneCbFunc
+ pDoneCb)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pSubtitleSyncPopup->fSyncVal = fSyncVal;
pSubtitleSyncPopup->pPopup =
- vp_popup_create(pParent, POPUP_STYLE_EXPAND_WITH_CANCEL_BTN,
- VP_PLAY_STRING_SUBTITLE_SYNC, NULL, 0.0, NULL,
- __vp_subtitle_sync_popup_key_event_cb,
- __vp_subtitle_sync_popup_mouse_event_cb,
- (void *) pSubtitleSyncPopup);
+ vp_popup_create(pParent, POPUP_STYLE_EXPAND_WITH_CANCEL_BTN,
+ VP_PLAY_STRING_SUBTITLE_SYNC, NULL, 0.0, NULL,
+ __vp_subtitle_sync_popup_key_event_cb,
+ __vp_subtitle_sync_popup_mouse_event_cb,
+ (void *) pSubtitleSyncPopup);
if (pSubtitleSyncPopup->pPopup == NULL) {
VideoLogError("vp_popup_create fail");
}
pSubtitleSyncPopup->pCancelButton =
- _vp_subtitle_sync_popup_create_cancel_button(pSubtitleSyncPopup->
- pPopup,
- (void *)
- pSubtitleSyncPopup);
+ _vp_subtitle_sync_popup_create_cancel_button
+ (pSubtitleSyncPopup->pPopup, (void *)
+ pSubtitleSyncPopup);
if (pSubtitleSyncPopup->pCancelButton == NULL) {
- VideoLogError
- ("_vp_subtitle_sync_popup_create_cancel_button fail");
+ VideoLogError("_vp_subtitle_sync_popup_create_cancel_button fail");
_vp_subtitle_sync_popup_destroy_handle(pSubtitleSyncPopup);
return NULL;
}
pSubtitleSyncPopup->pOkButton =
- _vp_subtitle_sync_popup_create_ok_button(pSubtitleSyncPopup->
- pPopup,
- (void *)
- pSubtitleSyncPopup);
+ _vp_subtitle_sync_popup_create_ok_button
+ (pSubtitleSyncPopup->pPopup, (void *)
+ pSubtitleSyncPopup);
if (pSubtitleSyncPopup->pOkButton == NULL) {
VideoLogError("_vp_subtitle_sync_popup_create_ok_button fail");
_vp_subtitle_sync_popup_destroy_handle(pSubtitleSyncPopup);
}
pSubtitleSyncPopup->pLayout =
- _vp_subtitle_sync_popup_create_layout(pSubtitleSyncPopup->pPopup);
+ _vp_subtitle_sync_popup_create_layout(pSubtitleSyncPopup->pPopup);
if (pSubtitleSyncPopup->pLayout == NULL) {
VideoLogError("_vp_subtitle_sync_popup_create_layout fail");
_vp_subtitle_sync_popup_destroy_handle(pSubtitleSyncPopup);
}
pSubtitleSyncPopup->pSlider =
- _vp_subtitle_sync_popup_create_slider(pSubtitleSyncPopup->pLayout,
- pSubtitleSyncPopup);
+ _vp_subtitle_sync_popup_create_slider(pSubtitleSyncPopup->pLayout,
+ pSubtitleSyncPopup);
if (pSubtitleSyncPopup->pSlider == NULL) {
VideoLogError("_vp_subtitle_sync_popup_create_slider fail");
_vp_subtitle_sync_popup_destroy_handle(pSubtitleSyncPopup);
}
_vp_subtitle_sync_popup_create_button(pSubtitleSyncPopup->pLayout,
- pSubtitleSyncPopup);
+ pSubtitleSyncPopup);
elm_slider_value_set(pSubtitleSyncPopup->pSlider,
- (double) pSubtitleSyncPopup->fSyncVal);
+ (double) pSubtitleSyncPopup->fSyncVal);
_vp_subtitle_sync_update_text(pSubtitleSyncPopup);
elm_object_part_content_set(pSubtitleSyncPopup->pLayout,
- "elm.swallow.content",
- pSubtitleSyncPopup->pSlider);
+ "elm.swallow.content",
+ pSubtitleSyncPopup->pSlider);
elm_object_content_set(pSubtitleSyncPopup->pPopup,
- pSubtitleSyncPopup->pLayout);
+ pSubtitleSyncPopup->pLayout);
evas_object_show(pSubtitleSyncPopup->pLayout);
elm_popup_orient_set(pSubtitleSyncPopup->pPopup,
- ELM_POPUP_ORIENT_CENTER);
+ ELM_POPUP_ORIENT_CENTER);
return pSubtitleSyncPopup;
}
}
SubtitleSyncPopup *pSubtitleSyncPopup =
- (SubtitleSyncPopup *) pSubtitleSync;
+ (SubtitleSyncPopup *) pSubtitleSync;
_vp_subtitle_sync_popup_destroy_handle(pSubtitleSyncPopup);
}
SubtitleSyncPopup *pSubtitleSyncPopup =
- (SubtitleSyncPopup *) pSubtitleSync;
+ (SubtitleSyncPopup *) pSubtitleSync;
evas_object_show(pSubtitleSyncPopup->pPopup);
}
SubtitleSyncPopup *pSubtitleSyncPopup =
- (SubtitleSyncPopup *) pSubtitleSync;
+ (SubtitleSyncPopup *) pSubtitleSync;
evas_object_hide(pSubtitleSyncPopup->pPopup);
bool vp_subtitle_sync_popup_set_user_data(subtitle_sync_popup
- pSubtitleSync, void *pUserData)
+ pSubtitleSync, void *pUserData)
{
if (pSubtitleSync == NULL) {
VideoLogError("pSubtitleSync is NULL");
}
SubtitleSyncPopup *pSubtitleSyncPopup =
- (SubtitleSyncPopup *) pSubtitleSync;
+ (SubtitleSyncPopup *) pSubtitleSync;
pSubtitleSyncPopup->pUserData = pUserData;
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
#include "vp-play-string-define.h"
static void _vp_subtitle_track_destroy_handle(SubtitleTrackPopup *
- pSubtitleTrack);
+ pSubtitleTrack);
#ifdef _SUBTITLE_MULTI_LANGUAGE
static void __vp_subtitle_track_popup_check_state_change_cb(void
- *pUserData,
- Evas_Object *
- pObject,
- void
- *pEventInfo);
+ *pUserData,
+ Evas_Object *
+ pObject, void
+ *pEventInfo);
#else
static void __vp_subtitle_track_genlist_item_selected_cb(void *pUserData,
- Evas_Object *
- pObject,
- void
- *pEventInfo);
+ Evas_Object *
+ pObject, void
+ *pEventInfo);
#endif
static void __vp_subtitle_track_genlist_realized(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
VP_GENLIST_HIDE_BOTTOMLINE(data, obj, event_info);
}
static void __vp_subtitle_track_popup_rotate_cb(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
SubtitleTrackPopup *pSubtitleTrack = (SubtitleTrackPopup *) data;
if (!pSubtitleTrack) {
return;
}
vp_popup_set_popup_min_size(pSubtitleTrack->pParent,
- pSubtitleTrack->pBox,
- pSubtitleTrack->nListCount,
- VIDEO_POPUP_DEFAULT);
+ pSubtitleTrack->pBox,
+ pSubtitleTrack->nListCount,
+ VIDEO_POPUP_DEFAULT);
}
/* callback functions */
static char *__vp_subtitle_track_genlist_text_get_cb(const void
- *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ *pUserData,
+ Evas_Object * pObj,
+ const char *pPart)
{
if (pUserData == NULL) {
VideoLogError("Invalid user data");
}
static Evas_Object *__vp_subtitle_track_genlist_content_get_cb(const void
- *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ *pUserData,
+ Evas_Object
+ *pObj,
+ const char
+ *pPart)
{
if (pUserData == NULL) {
VideoLogError("Invalid user data");
if (!strcmp(pPart, "elm.icon")) {
SubtitleTrackPopup *pSubtitleTrack =
- (SubtitleTrackPopup *) pTrackItem->pSubtitleTrackPopup;
+ (SubtitleTrackPopup *) pTrackItem->pSubtitleTrackPopup;
if (pSubtitleTrack == NULL) {
VideoLogWarning("evas_object_data_get is fail");
return NULL;
Evas_Object *pCheckBox = elm_check_add(pObj);
evas_object_propagate_events_set(pCheckBox, EINA_FALSE);
evas_object_smart_callback_add(pCheckBox, "changed",
- __vp_subtitle_track_popup_check_state_change_cb,
- pUserData);
+ __vp_subtitle_track_popup_check_state_change_cb,
+ pUserData);
elm_check_state_set(pCheckBox, pTrackItem->bCheck);
evas_object_show(pCheckBox);
elm_radio_state_value_set(pRadioObj, pTrackItem->nIndex);
elm_radio_group_add(pRadioObj, pSubtitleTrack->pRadio);
elm_radio_value_set(pSubtitleTrack->pRadio,
- pSubtitleTrack->nCurrentIndex);
+ pSubtitleTrack->nCurrentIndex);
evas_object_smart_callback_add(pRadioObj, "changed",
- __vp_subtitle_track_genlist_item_selected_cb,
- pTrackItem);
+ __vp_subtitle_track_genlist_item_selected_cb,
+ pTrackItem);
evas_object_show(pRadioObj);
return pRadioObj;
#ifdef _SUBTITLE_MULTI_LANGUAGE
static bool __vp_subtitle_track_select_no_item(SubtitleTrackPopup *
- pSubtitleTrackPopup)
+ pSubtitleTrackPopup)
{
if (pSubtitleTrackPopup == NULL) {
VideoLogError("pSubtitleTrackPopup is NULL");
for (; index < g_list_length(pSubtitleTrackPopup->pItemList); ++index) {
SubtitleTrackItem *pItem = NULL;
pItem =
- (SubtitleTrackItem *) g_list_nth_data(pSubtitleTrackPopup->
- pItemList, index);
+ (SubtitleTrackItem *)
+ g_list_nth_data(pSubtitleTrackPopup->pItemList, index);
if (pItem && pItem->bCheck) {
ret = false;
break;
}
static void __vp_subtitle_track_popup_disable_button(SubtitleTrackPopup *
- pSubtitleTrackPopup,
- bool bDisabled)
+ pSubtitleTrackPopup,
+ bool bDisabled)
{
if (pSubtitleTrackPopup == NULL) {
VideoLogError("pSubtitleTrackPopup is NULL");
}
Evas_Object *pRightButton =
- elm_object_part_content_get(pSubtitleTrackPopup->pPopup,
- "button2");
- if (pRightButton
- && bDisabled != elm_object_disabled_get(pRightButton)) {
+ elm_object_part_content_get(pSubtitleTrackPopup->pPopup,
+ "button2");
+ if (pRightButton && bDisabled != elm_object_disabled_get(pRightButton)) {
elm_object_disabled_set(pRightButton, bDisabled);
}
}
#endif
static void __vp_subtitle_track_genlist_item_selected_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
SubtitleTrackItem *pTrackItem = (SubtitleTrackItem *) pUserData;
Elm_Object_Item *pSelectedItem =
- elm_genlist_selected_item_get(pObject);
+ elm_genlist_selected_item_get(pObject);
if (pSelectedItem) {
elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
}
SubtitleTrackPopup *pSubtitleTrackPopup =
- (SubtitleTrackPopup *) pTrackItem->pSubtitleTrackPopup;
+ (SubtitleTrackPopup *) pTrackItem->pSubtitleTrackPopup;
if (pSubtitleTrackPopup == NULL) {
VideoLogError("SubtitleTrackPopup is NULL");
return;
}
#ifdef _SUBTITLE_MULTI_LANGUAGE
Evas_Object *pCheckBox =
- elm_object_item_part_content_get(pSelectedItem, "elm.icon");
+ elm_object_item_part_content_get(pSelectedItem, "elm.icon");
if (pCheckBox) {
pTrackItem->bCheck = !pTrackItem->bCheck;
elm_check_state_set(pCheckBox, pTrackItem->bCheck);
VideoLogInfo("bCheck: %d, nIndex: %d", pTrackItem->bCheck,
- pTrackItem->nIndex);
+ pTrackItem->nIndex);
if (__vp_subtitle_track_select_no_item(pSubtitleTrackPopup)) {
vp_play_util_status_noti_show
- (VP_PLAY_STRING_SELECTED_LANGUAGE);
+ (VP_PLAY_STRING_SELECTED_LANGUAGE);
__vp_subtitle_track_popup_disable_button(pSubtitleTrackPopup,
- true);
+ true);
} else {
__vp_subtitle_track_popup_disable_button(pSubtitleTrackPopup,
- false);
+ false);
}
}
#else
if (pTrackItem->nIndex == pSubtitleTrackPopup->nCurrentIndex) {
if (pSubtitleTrackPopup->pCloseCb) {
VideoLogInfo("Selected lang track indexp[%d]",
- pTrackItem->nIndex);
+ pTrackItem->nIndex);
pSubtitleTrackPopup->pCloseCb(pTrackItem->nIndex, FALSE,
- (void *) pSubtitleTrackPopup->
- pUserData);
+ (void *)
+ pSubtitleTrackPopup->pUserData);
}
} else {
pSubtitleTrackPopup->nCurrentIndex = pTrackItem->nIndex;
elm_radio_value_set(pSubtitleTrackPopup->pRadio,
- pSubtitleTrackPopup->nCurrentIndex);
+ pSubtitleTrackPopup->nCurrentIndex);
}
#endif
}
#ifdef _SUBTITLE_MULTI_LANGUAGE
static void __vp_subtitle_track_popup_check_state_change_cb(void
- *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ *pUserData,
+ Evas_Object *
+ pObject,
+ void
+ *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
SubtitleTrackItem *pTrackItem = (SubtitleTrackItem *) pUserData;
SubtitleTrackPopup *pSubtitleTrackPopup =
- (SubtitleTrackPopup *) pTrackItem->pSubtitleTrackPopup;
+ (SubtitleTrackPopup *) pTrackItem->pSubtitleTrackPopup;
if (pSubtitleTrackPopup == NULL) {
VideoLogError("SubtitleTrackPopup is NULL");
return;
}
pTrackItem->bCheck = elm_check_state_get(pObject);
VideoLogInfo("bCheck: %d, nIndex: %d", pTrackItem->bCheck,
- pTrackItem->nIndex);
+ pTrackItem->nIndex);
if (__vp_subtitle_track_select_no_item(pSubtitleTrackPopup)) {
vp_play_util_status_noti_show(VP_PLAY_STRING_SELECTED_LANGUAGE);
__vp_subtitle_track_popup_disable_button(pSubtitleTrackPopup,
- true);
+ true);
} else {
__vp_subtitle_track_popup_disable_button(pSubtitleTrackPopup,
- false);
+ false);
}
}
#endif
static void __vp_subtitle_track_popup_key_event_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pSubtitleTrack->pCloseCb) {
pSubtitleTrack->pCloseCb(-1, FALSE,
- (void *) pSubtitleTrack->pUserData);
+ (void *) pSubtitleTrack->pUserData);
}
}
#ifndef _SUBTITLE_MULTI_LANGUAGE
static void __vp_subtitle_track_popup_mouse_event_cb(void *pUserData,
- Evas *pEvas,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas * pEvas,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (ev->button == 3) {
SubtitleTrackPopup *pSubtitleTrack =
- (SubtitleTrackPopup *) pUserData;
+ (SubtitleTrackPopup *) pUserData;
if (pSubtitleTrack->pCloseCb) {
pSubtitleTrack->pCloseCb(-1, FALSE,
- (void *) pSubtitleTrack->pUserData);
+ (void *) pSubtitleTrack->pUserData);
}
}
}
#endif
/* internal functions */
static void _vp_subtitle_track_clear_item_list(SubtitleTrackPopup *
- pSubtitleTrack)
+ pSubtitleTrack)
{
if (pSubtitleTrack == NULL) {
VideoLogError("pSubtitleTrack is NULL");
SubtitleTrackItem *pItem = NULL;
pItem =
- (SubtitleTrackItem *) g_list_nth_data(pSubtitleTrack->
- pItemList, idx);
+ (SubtitleTrackItem *)
+ g_list_nth_data(pSubtitleTrack->pItemList, idx);
if (pItem) {
VP_EVAS_ITEM_DEL(pItem->pItem);
VP_FREE(pItem->szName);
}
static void _vp_subtitle_track_destroy_handle(SubtitleTrackPopup *
- pSubtitleTrack)
+ pSubtitleTrack)
{
if (pSubtitleTrack == NULL) {
VideoLogError("pSubtitleTrack is NULL");
}
evas_object_smart_callback_del(pSubtitleTrack->pGenList, "realized",
- __vp_subtitle_track_genlist_realized);
+ __vp_subtitle_track_genlist_realized);
evas_object_smart_callback_del(pSubtitleTrack->pParent,
- "rotation,changed",
- __vp_subtitle_track_popup_rotate_cb);
+ "rotation,changed",
+ __vp_subtitle_track_popup_rotate_cb);
_vp_subtitle_track_clear_item_list(pSubtitleTrack);
#ifndef _SUBTITLE_MULTI_LANGUAGE
}
static Evas_Object *_vp_subtitle_track_create_genlist(Evas_Object *
- pParent)
+ pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
pObj = elm_genlist_add(pParent);
evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(pObj);
return pObj;
}
-static bool _vp_subtitle_track_add_genlist_item(Evas_Object *pObj,
- void *pUserData)
+static bool _vp_subtitle_track_add_genlist_item(Evas_Object * pObj,
+ void *pUserData)
{
if (pObj == NULL) {
VideoLogError("pObj is NULL");
if (pSubtitleTrack->st_SubtitleTrack_Itc) {
pSubtitleTrack->st_SubtitleTrack_Itc->version =
- ELM_GENLIST_ITEM_CLASS_VERSION;
+ ELM_GENLIST_ITEM_CLASS_VERSION;
pSubtitleTrack->st_SubtitleTrack_Itc->item_style =
- "1text.1icon.3/popup";
+ "1text.1icon.3/popup";
pSubtitleTrack->st_SubtitleTrack_Itc->func.text_get =
- (void *) __vp_subtitle_track_genlist_text_get_cb;
+ (void *) __vp_subtitle_track_genlist_text_get_cb;
pSubtitleTrack->st_SubtitleTrack_Itc->func.content_get =
- (void *) __vp_subtitle_track_genlist_content_get_cb;
+ (void *) __vp_subtitle_track_genlist_content_get_cb;
pSubtitleTrack->st_SubtitleTrack_Itc->func.state_get = NULL;
pSubtitleTrack->st_SubtitleTrack_Itc->func.del = NULL;
}
SubtitleTrackItem *pItem = NULL;
pItem =
- (SubtitleTrackItem *) g_list_nth_data(pSubtitleTrack->
- pItemList, idx);
+ (SubtitleTrackItem *)
+ g_list_nth_data(pSubtitleTrack->pItemList, idx);
if (pItem) {
pItem->pItem = elm_genlist_item_append(pObj,
- pSubtitleTrack->
- st_SubtitleTrack_Itc,
- (void *) pItem, NULL,
- ELM_GENLIST_ITEM_NONE,
- __vp_subtitle_track_genlist_item_selected_cb,
- pItem);
+ pSubtitleTrack->st_SubtitleTrack_Itc,
+ (void *) pItem, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_track_genlist_item_selected_cb,
+ pItem);
pSubtitleTrack->nListCount++;
}
}
#ifdef _SUBTITLE_MULTI_LANGUAGE
static void __vp_subtitle_track_popup_left_button_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
if (pSubtitleTrack->pCloseCb) {
pSubtitleTrack->pCloseCb(-1, FALSE,
- (void *) pSubtitleTrack->pUserData);
+ (void *) pSubtitleTrack->pUserData);
}
}
static void __vp_subtitle_track_popup_right_button_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
SubtitleTrackItem *pItem = NULL;
pItem =
- (SubtitleTrackItem *) g_list_nth_data(pSubtitleTrack->
- pItemList, idx);
+ (SubtitleTrackItem *)
+ g_list_nth_data(pSubtitleTrack->pItemList, idx);
/*set subtitle's language */
if (pItem) {
VideoLogInfo("nIndex=%d,bCheck=%d", pItem->nIndex,
- pItem->bCheck);
+ pItem->bCheck);
if (pItem->bCheck && pSubtitleTrack->pAddLanguageCb) {
pSubtitleTrack->pAddLanguageCb(pItem->nIndex,
- (void *) pSubtitleTrack->
- pUserData);
- } else if (!pItem->bCheck
- && pSubtitleTrack->pRemoveLanguageCb) {
- pSubtitleTrack->pRemoveLanguageCb(pItem->nIndex,
- (void *)
- pSubtitleTrack->
- pUserData);
+ (void *)
+ pSubtitleTrack->pUserData);
+ } else if (!pItem->bCheck && pSubtitleTrack->pRemoveLanguageCb) {
+ pSubtitleTrack->pRemoveLanguageCb(pItem->nIndex, (void *)
+ pSubtitleTrack->pUserData);
}
}
}
if (pSubtitleTrack->pCloseCb) {
pSubtitleTrack->pCloseCb(-1, FALSE,
- (void *) pSubtitleTrack->pUserData);
+ (void *) pSubtitleTrack->pUserData);
}
}
#endif
/* external functions */
#ifdef _SUBTITLE_MULTI_LANGUAGE
-subtitle_track_handle vp_subtitle_track_create(Evas_Object *pParent,
- PopupCloseCbFunc pCloseCb)
+subtitle_track_handle vp_subtitle_track_create(Evas_Object * pParent,
+ PopupCloseCbFunc pCloseCb)
#else
-subtitle_track_handle vp_subtitle_track_create(Evas_Object *pParent,
- PopupCloseCbFunc pCloseCb,
- int nDefaultIndex)
+subtitle_track_handle vp_subtitle_track_create(Evas_Object * pParent,
+ PopupCloseCbFunc pCloseCb,
+ int nDefaultIndex)
#endif
{
if (pParent == NULL) {
pSubtitleTrack->pCloseCb = pCloseCb;
#ifdef _SUBTITLE_MULTI_LANGUAGE
pSubtitleTrack->pPopup = vp_title_two_button_popup_create(pParent,
- VP_PLAY_STRING_SUBTITLE_LANGUAGE,
- NULL,
- VP_PLAY_STRING_COM_CANCEL,
- __vp_subtitle_track_popup_left_button_cb,
- VP_PLAY_STRING_COM_OK,
- __vp_subtitle_track_popup_right_button_cb,
- (void *)
- pSubtitleTrack);
+ VP_PLAY_STRING_SUBTITLE_LANGUAGE,
+ NULL,
+ VP_PLAY_STRING_COM_CANCEL,
+ __vp_subtitle_track_popup_left_button_cb,
+ VP_PLAY_STRING_COM_OK,
+ __vp_subtitle_track_popup_right_button_cb,
+ (void *)
+ pSubtitleTrack);
#else
pSubtitleTrack->pPopup =
- vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
- VP_PLAY_STRING_SUBTITLE_LANGUAGE, NULL, 0.0, NULL,
- __vp_subtitle_track_popup_key_event_cb,
- __vp_subtitle_track_popup_mouse_event_cb,
- (void *) pSubtitleTrack);
+ vp_popup_create(pParent, POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN,
+ VP_PLAY_STRING_SUBTITLE_LANGUAGE, NULL, 0.0, NULL,
+ __vp_subtitle_track_popup_key_event_cb,
+ __vp_subtitle_track_popup_mouse_event_cb,
+ (void *) pSubtitleTrack);
#endif
if (pSubtitleTrack->pPopup == NULL) {
VideoLogError("vp_popup_create fail");
}
#ifdef _SUBTITLE_MULTI_LANGUAGE
eext_object_event_callback_add(pSubtitleTrack->pPopup,
- EEXT_CALLBACK_BACK,
- __vp_subtitle_track_popup_key_event_cb,
- (void *) pSubtitleTrack);
+ EEXT_CALLBACK_BACK,
+ __vp_subtitle_track_popup_key_event_cb,
+ (void *) pSubtitleTrack);
#endif
pSubtitleTrack->pGenList =
- _vp_subtitle_track_create_genlist(pSubtitleTrack->pPopup);
+ _vp_subtitle_track_create_genlist(pSubtitleTrack->pPopup);
if (pSubtitleTrack->pGenList == NULL) {
VideoLogError("_vp_subtitle_track_create_genlist fail");
_vp_subtitle_track_destroy_handle(pSubtitleTrack);
}
evas_object_smart_callback_add(pSubtitleTrack->pGenList, "realized",
- __vp_subtitle_track_genlist_realized,
- NULL);
+ __vp_subtitle_track_genlist_realized,
+ NULL);
evas_object_smart_callback_add(pSubtitleTrack->pParent,
- "rotation,changed",
- __vp_subtitle_track_popup_rotate_cb,
- pSubtitleTrack);
+ "rotation,changed",
+ __vp_subtitle_track_popup_rotate_cb,
+ pSubtitleTrack);
evas_object_data_set(pSubtitleTrack->pGenList,
- VP_SUBTITLE_TRACK_GENLIST_DATA_KEY,
- (void *) pSubtitleTrack);
+ VP_SUBTITLE_TRACK_GENLIST_DATA_KEY,
+ (void *) pSubtitleTrack);
#ifndef _SUBTITLE_MULTI_LANGUAGE
pSubtitleTrack->nCurrentIndex = nDefaultIndex;
pSubtitleTrack->pRadio = elm_radio_add(pSubtitleTrack->pGenList);
}
SubtitleTrackPopup *pSubtitleTrack =
- (SubtitleTrackPopup *) pSubtitleTrackHandle;
+ (SubtitleTrackPopup *) pSubtitleTrackHandle;
_vp_subtitle_track_destroy_handle(pSubtitleTrack);
}
SubtitleTrackPopup *pSubtitleTrack =
- (SubtitleTrackPopup *) pSubtitleTrackHandle;
+ (SubtitleTrackPopup *) pSubtitleTrackHandle;
if (!_vp_subtitle_track_add_genlist_item
- (pSubtitleTrack->pGenList, (void *) pSubtitleTrack)) {
+ (pSubtitleTrack->pGenList, (void *) pSubtitleTrack)) {
VideoLogError("_vp_subtitle_track_add_genlist_item fail");
return FALSE;
}
if (pSubtitleTrack->nListCount == 1) {
vp_popup_set_popup_min_size(pSubtitleTrack->pParent,
- pSubtitleTrack->pBox,
- pSubtitleTrack->nListCount,
- VIDEO_POPUP_DEFAULT);
+ pSubtitleTrack->pBox,
+ pSubtitleTrack->nListCount,
+ VIDEO_POPUP_DEFAULT);
elm_scroller_policy_set(pSubtitleTrack->pGenList,
- ELM_SCROLLER_POLICY_OFF,
- ELM_SCROLLER_POLICY_OFF);
+ ELM_SCROLLER_POLICY_OFF,
+ ELM_SCROLLER_POLICY_OFF);
} else {
vp_popup_set_popup_min_size(pSubtitleTrack->pParent,
- pSubtitleTrack->pBox,
- pSubtitleTrack->nListCount,
- VIDEO_POPUP_DEFAULT);
+ pSubtitleTrack->pBox,
+ pSubtitleTrack->nListCount,
+ VIDEO_POPUP_DEFAULT);
}
- //elm_radio_value_set(pSubtitleTrack->pRadio, pSubtitleTrack->nCurrentIndex);
elm_box_pack_end(pSubtitleTrack->pBox, pSubtitleTrack->pGenList);
elm_object_content_set(pSubtitleTrack->pPopup, pSubtitleTrack->pBox);
}
bool vp_subtitle_track_unrealize(subtitle_track_handle
- pSubtitleTrackHandle)
+ pSubtitleTrackHandle)
{
if (pSubtitleTrackHandle == NULL) {
VideoLogError("pSubtitleTrackHandle is NULL");
}
SubtitleTrackPopup *pSubtitleTrack =
- (SubtitleTrackPopup *) pSubtitleTrackHandle;
+ (SubtitleTrackPopup *) pSubtitleTrackHandle;
_vp_subtitle_track_clear_item_list(pSubtitleTrack);
#ifdef _SUBTITLE_MULTI_LANGUAGE
bool vp_subtitle_track_add_Item(subtitle_track_handle
- pSubtitleTrackHandle, char *szCode,
- int nIndex, bool bCheck)
+ pSubtitleTrackHandle, char *szCode,
+ int nIndex, bool bCheck)
#else
bool vp_subtitle_track_add_Item(subtitle_track_handle
- pSubtitleTrackHandle, char *szCode,
- int nIndex)
+ pSubtitleTrackHandle, char *szCode,
+ int nIndex)
#endif
{
if (pSubtitleTrackHandle == NULL) {
}
SubtitleTrackPopup *pSubtitleTrack =
- (SubtitleTrackPopup *) pSubtitleTrackHandle;
+ (SubtitleTrackPopup *) pSubtitleTrackHandle;
SubtitleTrackItem *pItem = calloc(1, sizeof(SubtitleTrackItem));
if (pItem == NULL) {
pItem->szName = pName;
} else {
char *pUnknown = NULL;
- //pUnknown = g_strdup_printf("%s(%s)", VP_PLAY_STRING_COM_UNKNOWN, szCode);
pUnknown = g_strdup_printf("%s", VP_PLAY_STRING_COM_UNKNOWN);
pItem->szName = pUnknown;
}
pSubtitleTrack->pItemList =
- g_list_append(pSubtitleTrack->pItemList, pItem);
+ g_list_append(pSubtitleTrack->pItemList, pItem);
return TRUE;
}
bool vp_subtitle_track_set_user_data(subtitle_track_handle
- pSubtitleTrackHandle,
- void *pUserData)
+ pSubtitleTrackHandle, void *pUserData)
{
if (pSubtitleTrackHandle == NULL) {
VideoLogError("pSubtitleTrackHandle is NULL");
}
SubtitleTrackPopup *pSubtitleTrack =
- (SubtitleTrackPopup *) pSubtitleTrackHandle;
+ (SubtitleTrackPopup *) pSubtitleTrackHandle;
pSubtitleTrack->pUserData = pUserData;
#ifdef _SUBTITLE_MULTI_LANGUAGE
bool vp_subtitle_track_set_add_language_cb(subtitle_track_handle
- pSubtitleTrackHandle,
- SubtitleLanguageChangeCbFunc
- pCallback)
+ pSubtitleTrackHandle,
+ SubtitleLanguageChangeCbFunc
+ pCallback)
{
if (pSubtitleTrackHandle == NULL) {
VideoLogError("pSubtitleTrackHandle is NULL");
}
SubtitleTrackPopup *pSubtitleTrack =
- (SubtitleTrackPopup *) pSubtitleTrackHandle;
+ (SubtitleTrackPopup *) pSubtitleTrackHandle;
pSubtitleTrack->pAddLanguageCb = pCallback;
}
bool vp_subtitle_track_set_remove_language_cb(subtitle_track_handle
- pSubtitleTrackHandle,
- SubtitleLanguageChangeCbFunc
- pCallback)
+ pSubtitleTrackHandle,
+ SubtitleLanguageChangeCbFunc
+ pCallback)
{
if (pSubtitleTrackHandle == NULL) {
VideoLogError("pSubtitleTrackHandle is NULL");
}
SubtitleTrackPopup *pSubtitleTrack =
- (SubtitleTrackPopup *) pSubtitleTrackHandle;
+ (SubtitleTrackPopup *) pSubtitleTrackHandle;
pSubtitleTrack->pRemoveLanguageCb = pCallback;
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
#include <efl_extension.h>
#define VP_SUBTITLE_SET_CAPTION_WINDOW_PREVIEW_COLOR_ID 1
typedef struct _SubtitlePopup {
- Evas_Object *pParent;
- Evas_Object *pPopup;
- Evas_Object *pPopupTitle;
- Evas_Object *pCaptionLayout;
- Evas_Object *pBox;
- Evas_Object *pContentBox;
- Evas_Object *pGenList;
-
- Evas_Object *pActivationCheck;
- Elm_Object_Item *pSelectItem;
-
- Elm_Genlist_Item_Class *st_Subtitle_Itc_1;
- Elm_Genlist_Item_Class *st_Subtitle_Itc_2;
- Elm_Genlist_Item_Class *st_Subtitle_Itc_1icon;
- Elm_Genlist_Item_Class *st_Subtitle_Itc_groupindex;
+ Evas_Object *pParent;
+ Evas_Object *pPopup;
+ Evas_Object *pPopupTitle;
+ Evas_Object *pCaptionLayout;
+ Evas_Object *pBox;
+ Evas_Object *pContentBox;
+ Evas_Object *pGenList;
+
+ Evas_Object *pActivationCheck;
+ Elm_Object_Item *pSelectItem;
+
+ Elm_Genlist_Item_Class *st_Subtitle_Itc_1;
+ Elm_Genlist_Item_Class *st_Subtitle_Itc_2;
+ Elm_Genlist_Item_Class *st_Subtitle_Itc_1icon;
+ Elm_Genlist_Item_Class *st_Subtitle_Itc_groupindex;
#ifdef SUBTITLE_K_FEATURE
- Elm_Genlist_Item_Class *st_Subtitle_Itc_3;
+ Elm_Genlist_Item_Class *st_Subtitle_Itc_3;
#endif
- SubtitleInfo *pSubtitleInfo;
+ SubtitleInfo *pSubtitleInfo;
- void *pUserData;
- PopupCloseCbFunc pCloseCb;
+ void *pUserData;
+ PopupCloseCbFunc pCloseCb;
} SubtitlePopup;
-static void _vp_subtitle_destroy_handle(SubtitlePopup *pSubtitle);
+static void _vp_subtitle_destroy_handle(SubtitlePopup * pSubtitle);
char *_vp_subtitle_get_opacity(char *colorHex);
-Elm_Object_Item *_vp_subtitle_list_item_next_get(Elm_Object_Item *gl_item);
-static void _vp_subtitle_set_activation(SubtitlePopup *pSubtitle, bool bOn);
-static void _vp_subtitle_destroy_subtitle_info(SubtitlePopup *pSubtitle);
-static Evas_Object * _vp_subtitle_create_caption_layout(SubtitlePopup *pSubtitle, Evas_Object *pParent);
-static void _vp_subtitle_cancel_button_cb(void *data, Evas_Object *obj, void *Event_info);
-
-static void __vp_subtitle_genlist_realized(void *data, Evas_Object *obj, void *event_info)
+Elm_Object_Item *_vp_subtitle_list_item_next_get(Elm_Object_Item *
+ gl_item);
+static void _vp_subtitle_set_activation(SubtitlePopup * pSubtitle,
+ bool bOn);
+static void _vp_subtitle_destroy_subtitle_info(SubtitlePopup * pSubtitle);
+static Evas_Object *_vp_subtitle_create_caption_layout(SubtitlePopup *
+ pSubtitle,
+ Evas_Object *
+ pParent);
+static void _vp_subtitle_cancel_button_cb(void *data, Evas_Object * obj,
+ void *Event_info);
+
+static void __vp_subtitle_genlist_realized(void *data, Evas_Object * obj,
+ void *event_info)
{
if (event_info == NULL) {
VideoLogError("pEventInfo is NULL");
return;
}
- Elm_Object_Item *pItem = (Elm_Object_Item *)event_info;
+ Elm_Object_Item *pItem = (Elm_Object_Item *) event_info;
int nIndexGenlist = elm_genlist_item_index_get(pItem);
VideoLogInfo("nIndexGenlist=%d", nIndexGenlist);
if (nIndexGenlist == 2) {
- elm_object_item_signal_emit(pItem, "elm,state,bottomline,hide", "");
+ elm_object_item_signal_emit(pItem, "elm,state,bottomline,hide",
+ "");
}
VP_GENLIST_HIDE_BOTTOMLINE(data, obj, event_info);
}
-static void __vp_subtitle_popup_size_set(SubtitlePopup *pSubtitle)
+static void __vp_subtitle_popup_size_set(SubtitlePopup * pSubtitle)
{
if (!pSubtitle) {
VideoLogError("pSubtitle is null");
nHeight = VP_POPUP_MAX_HEIGHT;
}
VideoLogInfo("nWidth=%d, nHeight=%d", nWidth, nHeight);
- evas_object_size_hint_min_set(pSubtitle->pBox, nWidth, (nHeight) * VP_SCALE);
- //evas_object_size_hint_min_set(pSubtitle->pPopupTitle, nWidth * VP_SCALE, (VP_POPUP_TITLE_HEIGHT) * VP_SCALE);
- evas_object_size_hint_min_set(pSubtitle->pContentBox, nWidth, (nHeight - VP_POPUP_TITLE_HEIGHT) * VP_SCALE);
+ evas_object_size_hint_min_set(pSubtitle->pBox, nWidth,
+ (nHeight) * VP_SCALE);
+ evas_object_size_hint_min_set(pSubtitle->pContentBox, nWidth,
+ (nHeight -
+ VP_POPUP_TITLE_HEIGHT) * VP_SCALE);
}
-static void __vp_subtitle_popup_rotate_cb(void *data, Evas_Object *obj, void *event_info)
+static void __vp_subtitle_popup_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
- SubtitlePopup *pSubtitle = (SubtitlePopup *)data;
+ SubtitlePopup *pSubtitle = (SubtitlePopup *) data;
if (!pSubtitle) {
VideoLogError("pSubtitle IS null");
return;
/* callback functions */
-static void __vp_subtitle_check_change_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
+static void __vp_subtitle_check_change_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
return;
}
- SubtitlePopup *pSubtitle = (SubtitlePopup *)pUserData;
+ SubtitlePopup *pSubtitle = (SubtitlePopup *) pUserData;
if (pObj == pSubtitle->pActivationCheck) {
bool bOn = FALSE;
vp_play_preference_get_subtitle_show_key(&bOn);
vp_play_preference_set_subtitle_show_key(!bOn);
- //elm_check_state_set(pObj, !bOn);
- vp_subtitle_mode_t nType = VP_SUBTITLE_MODE_NONE;
+ vp_subtitle_mode_t nType = VP_SUBTITLE_MODE_NONE;
nType = VP_SUBTITLE_MODE_ACTIVATION;
_vp_subtitle_set_activation(pSubtitle, !bOn);
if (pSubtitle->pCloseCb) {
- pSubtitle->pCloseCb((int)nType, FALSE, (void *)pSubtitle->pUserData);
+ pSubtitle->pCloseCb((int) nType, FALSE,
+ (void *) pSubtitle->pUserData);
}
}
}
-static char *_vp_play_subtitle_text_get(SubtitleInfo *pSubtitleInfo, bool bActivation)
+static char *_vp_play_subtitle_text_get(SubtitleInfo * pSubtitleInfo,
+ bool bActivation)
{
if (!pSubtitleInfo) {
VideoLogError("pSubtitle is NULL");
if (nSize > VP_SUBTITLE_SIZE_LARGE_VALUE) {
nSize = VP_SUBTITLE_SIZE_LARGE_VALUE;
}
-
#ifndef SUBTITLE_K_FEATURE
if (pSubtitleInfo->nTextColor == VIDEO_SUBTITLE_COLOR_BLACK) {
szColor = g_strdup_printf("#000000");
if (pSubtitleInfo->eAlignment == VIDEO_SUBTITLE_ALIGNMENT_LEFT) {
szAlignment = g_strdup_printf("left");
- } else if (pSubtitleInfo->eAlignment == VIDEO_SUBTITLE_ALIGNMENT_CENTER) {
+ } else if (pSubtitleInfo->eAlignment ==
+ VIDEO_SUBTITLE_ALIGNMENT_CENTER) {
szAlignment = g_strdup_printf("center");
} else if (pSubtitleInfo->eAlignment == VIDEO_SUBTITLE_ALIGNMENT_RIGHT) {
szAlignment = g_strdup_printf("right");
}
-
#endif
- szTxtFormat = g_strdup_printf(VP_SUBTITLE_TXT_FORMAT, nSize, szFontEdge, pSubtitleInfo->szFontName, szFontWeight, szColor, szBGColor, szBGColorOn, szAlignment, szOutput);
+ szTxtFormat =
+ g_strdup_printf(VP_SUBTITLE_TXT_FORMAT, nSize, szFontEdge,
+ pSubtitleInfo->szFontName, szFontWeight, szColor,
+ szBGColor, szBGColorOn, szAlignment, szOutput);
VP_FREE(szBGColor);
VP_FREE(szBGColorOn);
char *szColorAndOpacity = NULL;
char *szOpacity = _vp_subtitle_get_opacity(szColorHex);
- VideoSecureLogInfo("========pSubtitleInfo->nCaptionWinColorHex=%s, szOpacity=%s", szColorHex, szOpacity);
+ VideoSecureLogInfo
+ ("========pSubtitleInfo->nCaptionWinColorHex=%s, szOpacity=%s",
+ szColorHex, szOpacity);
if (!strncasecmp(szColorHex, "#000000", VP_SUBTITLE_COLOR_LEN)) {
- szColorAndOpacity = g_strdup_printf("%s,%s", VP_PLAY_STRING_SUBTITLE_COLOR_BLACK, szOpacity);
+ szColorAndOpacity =
+ g_strdup_printf("%s,%s", VP_PLAY_STRING_SUBTITLE_COLOR_BLACK,
+ szOpacity);
} else if (!strncasecmp(szColorHex, "#0000ff", VP_SUBTITLE_COLOR_LEN)) {
- szColorAndOpacity = g_strdup_printf("%s,%s", VP_PLAY_STRING_SUBTITLE_COLOR_BLUE, szOpacity);
+ szColorAndOpacity =
+ g_strdup_printf("%s,%s", VP_PLAY_STRING_SUBTITLE_COLOR_BLUE,
+ szOpacity);
} else if (!strncasecmp(szColorHex, "#00ff00", VP_SUBTITLE_COLOR_LEN)) {
- szColorAndOpacity = g_strdup_printf("%s,%s", VP_PLAY_STRING_SUBTITLE_COLOR_GREEN, szOpacity);
+ szColorAndOpacity =
+ g_strdup_printf("%s,%s", VP_PLAY_STRING_SUBTITLE_COLOR_GREEN,
+ szOpacity);
} else if (!strncasecmp(szColorHex, "#ffffff", VP_SUBTITLE_COLOR_LEN)) {
- szColorAndOpacity = g_strdup_printf("%s,%s", VP_PLAY_STRING_SUBTITLE_COLOR_WHITE, szOpacity);
+ szColorAndOpacity =
+ g_strdup_printf("%s,%s", VP_PLAY_STRING_SUBTITLE_COLOR_WHITE,
+ szOpacity);
} else if (!strncasecmp(szColorHex, "#ff0000", VP_SUBTITLE_COLOR_LEN)) {
- szColorAndOpacity = g_strdup_printf("%s,%s", VP_PLAY_STRING_SUBTITLE_COLOR_RED, szOpacity);
+ szColorAndOpacity =
+ g_strdup_printf("%s,%s", VP_PLAY_STRING_SUBTITLE_COLOR_RED,
+ szOpacity);
} else if (!strncasecmp(szColorHex, "#ffff00", VP_SUBTITLE_COLOR_LEN)) {
- szColorAndOpacity = g_strdup_printf("%s,%s", VP_PLAY_STRING_SUBTITLE_COLOR_YELLOW, szOpacity);
+ szColorAndOpacity =
+ g_strdup_printf("%s,%s", VP_PLAY_STRING_SUBTITLE_COLOR_YELLOW,
+ szOpacity);
} else if (!strncasecmp(szColorHex, "#ff00ff", VP_SUBTITLE_COLOR_LEN)) {
- szColorAndOpacity = g_strdup_printf("%s,%s", VP_PLAY_STRING_SUBTITLE_COLOR_MAGENTA, szOpacity);
+ szColorAndOpacity =
+ g_strdup_printf("%s,%s", VP_PLAY_STRING_SUBTITLE_COLOR_MAGENTA,
+ szOpacity);
} else if (!strncasecmp(szColorHex, "#00ffff", VP_SUBTITLE_COLOR_LEN)) {
- szColorAndOpacity = g_strdup_printf("%s,%s", VP_PLAY_STRING_SUBTITLE_COLOR_CYAN, szOpacity);
+ szColorAndOpacity =
+ g_strdup_printf("%s,%s", VP_PLAY_STRING_SUBTITLE_COLOR_CYAN,
+ szOpacity);
} else {
- szColorAndOpacity = g_strdup_printf("%s,%s", VP_PLAY_STRING_SUBTITLE_COLOR_CUSTOM, szOpacity);
+ szColorAndOpacity =
+ g_strdup_printf("%s,%s", VP_PLAY_STRING_SUBTITLE_COLOR_CUSTOM,
+ szOpacity);
}
VP_FREE(szOpacity);
return szColorAndOpacity;
}
-static char *__vp_subtitle_genlist_text_get_cb(const void *pUserData, Evas_Object *pObj, const char *pPart)
+static char *__vp_subtitle_genlist_text_get_cb(const void *pUserData,
+ Evas_Object * pObj,
+ const char *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
return NULL;
}
- char *szTxt = (char *)pUserData;
+ char *szTxt = (char *) pUserData;
if (!strcmp(pPart, "elm.text.main.left")) {
if (!g_strcmp0(VP_PLAY_STRING_ACTIVATION, szTxt)) {
}
if (!g_strcmp0(VP_PLAY_STRING_SUBTITLE_SELECT_SUBTITLES, szTxt)
- || !g_strcmp0(VP_PLAY_STRING_SUBTITLE_ALIGNMENT, szTxt) || !g_strcmp0(VP_PLAY_STRING_SUBTITLE_SIZE, szTxt)) {
+ || !g_strcmp0(VP_PLAY_STRING_SUBTITLE_ALIGNMENT, szTxt)
+ || !g_strcmp0(VP_PLAY_STRING_SUBTITLE_SIZE, szTxt)) {
if (!strcmp(pPart, "elm.text")) {
return strdup(szTxt);
} else if (!strcmp(pPart, "elm.text.sub")) {
- SubtitlePopup *pSubtitle = (SubtitlePopup *)evas_object_data_get(pObj , VP_SUBTITLE_GENLIST_DATA_KEY);
+ SubtitlePopup *pSubtitle =
+ (SubtitlePopup *) evas_object_data_get(pObj,
+ VP_SUBTITLE_GENLIST_DATA_KEY);
if (pSubtitle == NULL) {
VideoLogWarning("evas_object_data_get is fail");
return NULL;
return NULL;
}
- //return g_strdup(pSubtitleInfo->szURL);
-
if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_SELECT_SUBTITLES)) {
if (pSubtitleInfo->szURL) {
- return vp_util_convert_file_location(pSubtitleInfo->szURL);
+ return vp_util_convert_file_location(pSubtitleInfo->
+ szURL);
}
} else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_ALIGNMENT)) {
switch (pSubtitleInfo->eAlignment) {
- case VIDEO_SUBTITLE_ALIGNMENT_LEFT: {
- return strdup(VP_PLAY_STRING_ALIGNMENT_LEFT);
- }
- case VIDEO_SUBTITLE_ALIGNMENT_CENTER: {
- return strdup(VP_PLAY_STRING_ALIGNMENT_CENTER);
- }
- case VIDEO_SUBTITLE_ALIGNMENT_RIGHT: {
- return strdup(VP_PLAY_STRING_ALIGNMENT_RIGHT);
- }
+ case VIDEO_SUBTITLE_ALIGNMENT_LEFT:{
+ return strdup(VP_PLAY_STRING_ALIGNMENT_LEFT);
+ }
+ case VIDEO_SUBTITLE_ALIGNMENT_CENTER:{
+ return strdup(VP_PLAY_STRING_ALIGNMENT_CENTER);
+ }
+ case VIDEO_SUBTITLE_ALIGNMENT_RIGHT:{
+ return strdup(VP_PLAY_STRING_ALIGNMENT_RIGHT);
+ }
default:
break;
}
} else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_SIZE)) {
if (pSubtitleInfo->nFontSize == VIDEO_SUBTITLE_SIZE_LARGE) {
return strdup(VP_PLAY_STRING_SUBTITLE_SIZE_LARGE);
- } else if (pSubtitleInfo->nFontSize == VIDEO_SUBTITLE_SIZE_MEDIUM) {
+ } else if (pSubtitleInfo->nFontSize ==
+ VIDEO_SUBTITLE_SIZE_MEDIUM) {
return strdup(VP_PLAY_STRING_SUBTITLE_SIZE_MEDIUM);
- } else if (pSubtitleInfo->nFontSize == VIDEO_SUBTITLE_SIZE_SMALL) {
+ } else if (pSubtitleInfo->nFontSize ==
+ VIDEO_SUBTITLE_SIZE_SMALL) {
return strdup(VP_PLAY_STRING_SUBTITLE_SIZE_SMALL);
}
}
return strdup(szTxt);
} else if (!strcmp(pPart, "elm.text.2")) {
- SubtitlePopup *pSubtitle = (SubtitlePopup *)evas_object_data_get(pObj , VP_SUBTITLE_GENLIST_DATA_KEY);
+ SubtitlePopup *pSubtitle =
+ (SubtitlePopup *) evas_object_data_get(pObj,
+ VP_SUBTITLE_GENLIST_DATA_KEY);
if (pSubtitle == NULL) {
VideoLogWarning("evas_object_data_get is fail");
return NULL;
}
if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_SYNC)) {
- char szTemp[10] = {0,};
- snprintf(szTemp, sizeof(szTemp), "%0.1f", pSubtitleInfo->fSync);
+ char szTemp[10] = { 0, };
+ snprintf(szTemp, sizeof(szTemp), "%0.1f",
+ pSubtitleInfo->fSync);
return g_strdup_printf(VP_PLAY_STRING_SUBTITLE_SECS, szTemp);
} else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_LANGUAGE)) {
#ifdef SUBTITLE_K_FEATURE
else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_ALIGNMENT)) {
switch (pSubtitleInfo->eAlignment) {
- case VIDEO_SUBTITLE_ALIGNMENT_LEFT: {
- return strdup(VP_PLAY_STRING_ALIGNMENT_LEFT);
- }
- case VIDEO_SUBTITLE_ALIGNMENT_CENTER: {
- return strdup(VP_PLAY_STRING_ALIGNMENT_CENTER);
- }
- case VIDEO_SUBTITLE_ALIGNMENT_RIGHT: {
- return strdup(VP_PLAY_STRING_ALIGNMENT_RIGHT);
- }
+ case VIDEO_SUBTITLE_ALIGNMENT_LEFT:{
+ return strdup(VP_PLAY_STRING_ALIGNMENT_LEFT);
+ }
+ case VIDEO_SUBTITLE_ALIGNMENT_CENTER:{
+ return strdup(VP_PLAY_STRING_ALIGNMENT_CENTER);
+ }
+ case VIDEO_SUBTITLE_ALIGNMENT_RIGHT:{
+ return strdup(VP_PLAY_STRING_ALIGNMENT_RIGHT);
+ }
default:
break;
}
} else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_SIZE)) {
if (pSubtitleInfo->nFontSize == VIDEO_SUBTITLE_SIZE_LARGE) {
return strdup(VP_PLAY_STRING_SUBTITLE_SIZE_LARGE);
- } else if (pSubtitleInfo->nFontSize == VIDEO_SUBTITLE_SIZE_MEDIUM) {
+ } else if (pSubtitleInfo->nFontSize ==
+ VIDEO_SUBTITLE_SIZE_MEDIUM) {
return strdup(VP_PLAY_STRING_SUBTITLE_SIZE_MEDIUM);
- } else if (pSubtitleInfo->nFontSize == VIDEO_SUBTITLE_SIZE_SMALL) {
+ } else if (pSubtitleInfo->nFontSize ==
+ VIDEO_SUBTITLE_SIZE_SMALL) {
return strdup(VP_PLAY_STRING_SUBTITLE_SIZE_SMALL);
}
- }
-//#ifdef SUBTITLE_K_FEATURE
- else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_EDGE)) {
+ } else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_EDGE)) {
switch (pSubtitleInfo->nEdge) {
case VP_SUBTITLE_EDGE_NO_EDGE:
return strdup(VP_PLAY_STRING_EDGE_NO_EDGE);
default:
return strdup(VP_PLAY_STRING_EDGE_NO_EDGE);
}
- }
-//#endif
- else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_TEXT)) {
+ } else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_TEXT)) {
#ifndef SUBTITLE_K_FEATURE
if (pSubtitleInfo->nTextColor == VIDEO_SUBTITLE_COLOR_BLACK) {
return strdup(VP_PLAY_STRING_SUBTITLE_COLOR_BLACK);
- } else if (pSubtitleInfo->nTextColor == VIDEO_SUBTITLE_COLOR_BLUE) {
+ } else if (pSubtitleInfo->nTextColor ==
+ VIDEO_SUBTITLE_COLOR_BLUE) {
return strdup(VP_PLAY_STRING_SUBTITLE_COLOR_BLUE);
- } else if (pSubtitleInfo->nTextColor == VIDEO_SUBTITLE_COLOR_GREEN) {
+ } else if (pSubtitleInfo->nTextColor ==
+ VIDEO_SUBTITLE_COLOR_GREEN) {
return strdup(VP_PLAY_STRING_SUBTITLE_COLOR_GREEN);
- } else if (pSubtitleInfo->nTextColor == VIDEO_SUBTITLE_COLOR_WHITE) {
+ } else if (pSubtitleInfo->nTextColor ==
+ VIDEO_SUBTITLE_COLOR_WHITE) {
return strdup(VP_PLAY_STRING_SUBTITLE_COLOR_WHITE);
}
#else
- return __vp_subtitle_get_color_and_opacity(pSubtitleInfo->pTextColorHex);
+ return __vp_subtitle_get_color_and_opacity(pSubtitleInfo->
+ pTextColorHex);
#endif
} else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_BG_COLOR)) {
#ifndef SUBTITLE_K_FEATURE
if (pSubtitleInfo->nBGColor == VIDEO_SUBTITLE_COLOR_BLACK) {
return strdup(VP_PLAY_STRING_SUBTITLE_COLOR_BLACK);
- } else if (pSubtitleInfo->nBGColor == VIDEO_SUBTITLE_COLOR_WHITE) {
+ } else if (pSubtitleInfo->nBGColor ==
+ VIDEO_SUBTITLE_COLOR_WHITE) {
return strdup(VP_PLAY_STRING_SUBTITLE_COLOR_WHITE);
- } else if (pSubtitleInfo->nBGColor == VIDEO_SUBTITLE_COLOR_NONE) {
+ } else if (pSubtitleInfo->nBGColor ==
+ VIDEO_SUBTITLE_COLOR_NONE) {
return strdup(VP_PLAY_STRING_SUBTITLE_COLOR_NONE);
}
#else
- return __vp_subtitle_get_color_and_opacity(pSubtitleInfo->pBGColorHex);
+ return __vp_subtitle_get_color_and_opacity(pSubtitleInfo->
+ pBGColorHex);
#endif
}
#ifdef SUBTITLE_K_FEATURE
else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_CAPTION_WINDOW)) {
- return __vp_subtitle_get_color_and_opacity(pSubtitleInfo->pCaptionWinColorHex);
+ return __vp_subtitle_get_color_and_opacity(pSubtitleInfo->
+ pCaptionWinColorHex);
}
#endif
}
return NULL;
}
-static Evas_Object *__vp_subtitle_genlist_content_get_cb(void *data, Evas_Object *obj, const char *part)
+static Evas_Object *__vp_subtitle_genlist_content_get_cb(void *data,
+ Evas_Object * obj,
+ const char *part)
{
- SubtitlePopup *pSubtitle = (SubtitlePopup *)evas_object_data_get(obj , VP_SUBTITLE_GENLIST_DATA_KEY);
+ SubtitlePopup *pSubtitle =
+ (SubtitlePopup *) evas_object_data_get(obj,
+ VP_SUBTITLE_GENLIST_DATA_KEY);
if (pSubtitle == NULL) {
VideoLogWarning("evas_object_data_get is fail");
return NULL;
VideoLogWarning("part = %s", part);
if (!strcmp(part, "elm.swallow.icon")) {
- if (!g_strcmp0(VP_PLAY_STRING_PREVIEW_SUBTITLE_CC, (char *)data)) {
- Evas_Object *pCaption = _vp_subtitle_create_caption_layout(pSubtitle, obj);
- evas_object_size_hint_align_set(pCaption, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(pCaption, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ if (!g_strcmp0(VP_PLAY_STRING_PREVIEW_SUBTITLE_CC, (char *) data)) {
+ Evas_Object *pCaption =
+ _vp_subtitle_create_caption_layout(pSubtitle, obj);
+ evas_object_size_hint_align_set(pCaption, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pCaption, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
return pCaption;
}
}
if (!strcmp(part, "elm.swallow.end")) {
- if (!g_strcmp0(VP_PLAY_STRING_ACTIVATION, (char *)data)) {
+ if (!g_strcmp0(VP_PLAY_STRING_ACTIVATION, (char *) data)) {
Evas_Object *pCheck = NULL;
- pCheck = elm_check_add(obj);
+ pCheck = elm_check_add(obj);
bool bShow = FALSE;
vp_play_preference_get_subtitle_show_key(&bShow);
- evas_object_size_hint_align_set(pCheck, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(pCheck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pCheck, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pCheck, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
elm_check_state_set(pCheck, bShow);
elm_object_style_set(pCheck, "on&off");
evas_object_propagate_events_set(pCheck, EINA_FALSE);
- evas_object_smart_callback_add(pCheck, "changed", __vp_subtitle_check_change_cb, (void *)pSubtitle);
+ evas_object_smart_callback_add(pCheck, "changed",
+ __vp_subtitle_check_change_cb,
+ (void *) pSubtitle);
pSubtitle->pActivationCheck = pCheck;
evas_object_show(pCheck);
return pCheck;
- }
- else if (!g_strcmp0(VP_PLAY_STRING_SUBTITLE_COLOR, (char *)data)) {
- Evas_Object *fontColor = evas_object_rectangle_add(evas_object_evas_get(obj));
+ } else
+ if (!g_strcmp0(VP_PLAY_STRING_SUBTITLE_COLOR, (char *) data)) {
+ Evas_Object *fontColor =
+ evas_object_rectangle_add(evas_object_evas_get(obj));
char *szColorHex = NULL;
int r = 255, g = 255, b = 255, a = 255;
- if(vp_play_preference_get_subtitle_font_color_hex_key(&szColorHex) == TRUE) {
- vp_play_util_convert_hex_to_rgba(szColorHex, &r, &g, &b, &a);
+ if (vp_play_preference_get_subtitle_font_color_hex_key
+ (&szColorHex) == TRUE) {
+ vp_play_util_convert_hex_to_rgba(szColorHex, &r, &g, &b,
+ &a);
evas_object_size_hint_min_set(fontColor, 100, 100);
evas_object_color_set(fontColor, r, g, b, 255);
VP_FREE(szColorHex);
}
-static void __vp_subtitle_genlist_item_selected_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __vp_subtitle_genlist_item_selected_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
Elm_Object_Item *pItem = (Elm_Object_Item *) pEventInfo;
- char *szTxt = (char *)elm_object_item_data_get(pItem);
+ char *szTxt = (char *) elm_object_item_data_get(pItem);
elm_genlist_item_selected_set(pItem, EINA_FALSE);
- SubtitlePopup *pSubtitle = (SubtitlePopup *)pUserData;
+ SubtitlePopup *pSubtitle = (SubtitlePopup *) pUserData;
pSubtitle->pSelectItem = pItem;
if (szTxt == NULL) {
VideoLogError("szTxt is NULL");
return;
}
- vp_subtitle_mode_t nType = VP_SUBTITLE_MODE_NONE;
+ vp_subtitle_mode_t nType = VP_SUBTITLE_MODE_NONE;
if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_SYNC)) {
- VideoLogWarning("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_SYNC)");
+ VideoLogWarning
+ ("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_SYNC)");
nType = VP_SUBTITLE_MODE_SYNC;
if (pSubtitle->pCloseCb) {
- pSubtitle->pCloseCb((int)nType, TRUE, (void *)pSubtitle->pUserData);
+ pSubtitle->pCloseCb((int) nType, TRUE,
+ (void *) pSubtitle->pUserData);
}
} else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_SELECT_SUBTITLES)) {
- VideoLogWarning("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_SELECT_SUBTITLES)");
+ VideoLogWarning
+ ("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_SELECT_SUBTITLES)");
nType = VP_SUBTITLE_MODE_SELECT;
if (pSubtitle->pCloseCb) {
- pSubtitle->pCloseCb((int)nType, TRUE, (void *)pSubtitle->pUserData);
+ pSubtitle->pCloseCb((int) nType, TRUE,
+ (void *) pSubtitle->pUserData);
}
} else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_LANGUAGE)) {
- VideoLogWarning("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_LANGUAGE)");
+ VideoLogWarning
+ ("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_LANGUAGE)");
nType = VP_SUBTITLE_MODE_LANGUAGE;
if (pSubtitle->pCloseCb) {
- pSubtitle->pCloseCb((int)nType, TRUE, (void *)pSubtitle->pUserData);
+ pSubtitle->pCloseCb((int) nType, TRUE,
+ (void *) pSubtitle->pUserData);
}
}
#ifdef SUBTITLE_K_FEATURE
else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_ALIGNMENT)) {
- VideoLogWarning("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_ALIGNMENT)");
+ VideoLogWarning
+ ("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_ALIGNMENT)");
nType = VP_SUBTITLE_MODE_ALIGNMENT;
if (pSubtitle->pCloseCb) {
- pSubtitle->pCloseCb((int)nType, TRUE, (void *)pSubtitle->pUserData);
+ pSubtitle->pCloseCb((int) nType, TRUE,
+ (void *) pSubtitle->pUserData);
}
}
#endif
else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_FONT)) {
- VideoLogWarning("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_FONT)");
+ VideoLogWarning
+ ("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_FONT)");
nType = VP_SUBTITLE_MODE_FONT;
if (pSubtitle->pCloseCb) {
- pSubtitle->pCloseCb((int)nType, TRUE, (void *)pSubtitle->pUserData);
+ pSubtitle->pCloseCb((int) nType, TRUE,
+ (void *) pSubtitle->pUserData);
}
} else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_SIZE)) {
- VideoLogWarning("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_SIZE)");
+ VideoLogWarning
+ ("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_SIZE)");
nType = VP_SUBTITLE_MODE_SIZE;
if (pSubtitle->pCloseCb) {
- pSubtitle->pCloseCb((int)nType, TRUE, (void *)pSubtitle->pUserData);
+ pSubtitle->pCloseCb((int) nType, TRUE,
+ (void *) pSubtitle->pUserData);
}
}
//#ifdef SUBTITLE_K_FEATURE
else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_EDGE)) {
- VideoLogWarning("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_EDGE)");
+ VideoLogWarning
+ ("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_EDGE)");
nType = VP_SUBTITLE_MODE_EDGE;
if (pSubtitle->pCloseCb) {
- pSubtitle->pCloseCb((int)nType, TRUE, (void *)pSubtitle->pUserData);
+ pSubtitle->pCloseCb((int) nType, TRUE,
+ (void *) pSubtitle->pUserData);
}
} else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_TEXT)) {
- VideoLogWarning("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_TEXT)");
+ VideoLogWarning
+ ("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_TEXT)");
nType = VP_SUBTITLE_MODE_TEXT;
if (pSubtitle->pCloseCb) {
- pSubtitle->pCloseCb((int)nType, TRUE, (void *)pSubtitle->pUserData);
+ pSubtitle->pCloseCb((int) nType, TRUE,
+ (void *) pSubtitle->pUserData);
}
} else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_BG_COLOR)) {
- VideoLogWarning("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_BG_COLOR)");
+ VideoLogWarning
+ ("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_BG_COLOR)");
nType = VP_SUBTITLE_MODE_BG_COLOR;
if (pSubtitle->pCloseCb) {
- pSubtitle->pCloseCb((int)nType, TRUE, (void *)pSubtitle->pUserData);
+ pSubtitle->pCloseCb((int) nType, TRUE,
+ (void *) pSubtitle->pUserData);
}
} else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_COLOR)) {
- VideoLogWarning("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_BG_COLOR)");
- nType = VP_SUBTITLE_MODE_FONT_COLOR;
- if (pSubtitle->pCloseCb) {
- pSubtitle->pCloseCb((int)nType, TRUE, (void *)pSubtitle->pUserData);
+ VideoLogWarning
+ ("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_BG_COLOR)");
+ nType = VP_SUBTITLE_MODE_FONT_COLOR;
+ if (pSubtitle->pCloseCb) {
+ pSubtitle->pCloseCb((int) nType, TRUE,
+ (void *) pSubtitle->pUserData);
}
}
#ifdef SUBTITLE_K_FEATURE
else if (!strcmp(szTxt, VP_PLAY_STRING_SUBTITLE_CAPTION_WINDOW)) {
- VideoLogWarning("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_CAPTION_WINDOW)");
+ VideoLogWarning
+ ("SELECT SUBTITLE ITEM (VP_PLAY_STRING_SUBTITLE_CAPTION_WINDOW)");
nType = VP_SUBTITLE_MODE_CAPTION_WINDOW;
if (pSubtitle->pCloseCb) {
- pSubtitle->pCloseCb((int)nType, TRUE, (void *)pSubtitle->pUserData);
+ pSubtitle->pCloseCb((int) nType, TRUE,
+ (void *) pSubtitle->pUserData);
}
}
#endif
}
-static void __vp_subtitle_popup_key_event_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
+static void __vp_subtitle_popup_key_event_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
return;
}
- SubtitlePopup *pSubtitle = (SubtitlePopup *)pUserData;
+ SubtitlePopup *pSubtitle = (SubtitlePopup *) pUserData;
_vp_subtitle_cancel_button_cb(pSubtitle, NULL, NULL);
}
-static void __vp_subtitle_popup_mouse_event_cb(void *pUserData, Evas *pEvas, Evas_Object *pObj, void *pEventInfo)
+
+static void __vp_subtitle_popup_mouse_event_cb(void *pUserData,
+ Evas * pEvas,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
Evas_Event_Mouse_Up *ev = pEventInfo;
if (ev->button == 3) {
- SubtitlePopup *pSubtitle = (SubtitlePopup *)pUserData;
+ SubtitlePopup *pSubtitle = (SubtitlePopup *) pUserData;
_vp_subtitle_cancel_button_cb(pSubtitle, NULL, NULL);
}
}
/* internal functions */
-static void _vp_subtitle_destroy_subtitle_info(SubtitlePopup *pSubtitle)
+static void _vp_subtitle_destroy_subtitle_info(SubtitlePopup * pSubtitle)
{
if (pSubtitle == NULL) {
VideoLogError("pSubtitle is NULL");
}
}
-static void _vp_subtitle_destroy_handle(SubtitlePopup *pSubtitle)
+static void _vp_subtitle_destroy_handle(SubtitlePopup * pSubtitle)
{
if (pSubtitle == NULL) {
VideoLogError("pSubtitle is NULL");
return;
}
- evas_object_smart_callback_del(pSubtitle->pParent, "rotation,changed", __vp_subtitle_popup_rotate_cb);
- evas_object_smart_callback_del(pSubtitle->pGenList, "realized", __vp_subtitle_genlist_realized);
+ evas_object_smart_callback_del(pSubtitle->pParent, "rotation,changed",
+ __vp_subtitle_popup_rotate_cb);
+ evas_object_smart_callback_del(pSubtitle->pGenList, "realized",
+ __vp_subtitle_genlist_realized);
if (pSubtitle->st_Subtitle_Itc_1) {
elm_genlist_item_class_free(pSubtitle->st_Subtitle_Itc_1);
elm_genlist_item_class_free(pSubtitle->st_Subtitle_Itc_1icon);
pSubtitle->st_Subtitle_Itc_1icon = NULL;
}
-
#ifdef SUBTITLE_K_FEATURE
if (pSubtitle->st_Subtitle_Itc_3) {
elm_genlist_item_class_free(pSubtitle->st_Subtitle_Itc_3);
VP_FREE(pSubtitle);
}
-static Evas_Object *_vp_subtitle_create_genlist(Evas_Object *pParent)
+static Evas_Object *_vp_subtitle_create_genlist(Evas_Object * pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
Evas_Object *pObj = NULL;
pObj = elm_genlist_add(pParent);
- evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(pObj);
return pObj;
}
-static void _vp_subtitle_genlist_disabled_set(Evas_Object *pGenList, bool bOn)
+static void _vp_subtitle_genlist_disabled_set(Evas_Object * pGenList,
+ bool bOn)
{
if (pGenList == NULL) {
VideoLogError("pGenList is NULL");
}
}
-static bool _vp_subtitle_add_genlist_item(Evas_Object *pObj, void *pUserData)
+static bool _vp_subtitle_add_genlist_item(Evas_Object * pObj,
+ void *pUserData)
{
if (pObj == NULL) {
VideoLogError("pObj is NULL");
return FALSE;
}
- SubtitlePopup *pSubtitle = (SubtitlePopup *)pUserData;
+ SubtitlePopup *pSubtitle = (SubtitlePopup *) pUserData;
if (pSubtitle->pSubtitleInfo == NULL) {
VideoLogError("pSubtitleInfo is NULL");
elm_genlist_item_class_free(pSubtitle->st_Subtitle_Itc_1icon);
pSubtitle->st_Subtitle_Itc_1icon = NULL;
}
-
#ifdef SUBTITLE_K_FEATURE
if (pSubtitle->st_Subtitle_Itc_3) {
elm_genlist_item_class_free(pSubtitle->st_Subtitle_Itc_3);
pSubtitle->st_Subtitle_Itc_1 = elm_genlist_item_class_new();
if (pSubtitle->st_Subtitle_Itc_1 != NULL) {
- pSubtitle->st_Subtitle_Itc_1->version = ELM_GENLIST_ITEM_CLASS_VERSION;
+ pSubtitle->st_Subtitle_Itc_1->version =
+ ELM_GENLIST_ITEM_CLASS_VERSION;
pSubtitle->st_Subtitle_Itc_1->item_style = "type1";
- pSubtitle->st_Subtitle_Itc_1->func.text_get = (void *)__vp_subtitle_genlist_text_get_cb;
- pSubtitle->st_Subtitle_Itc_1->func.content_get = (void *)__vp_subtitle_genlist_content_get_cb;
+ pSubtitle->st_Subtitle_Itc_1->func.text_get =
+ (void *) __vp_subtitle_genlist_text_get_cb;
+ pSubtitle->st_Subtitle_Itc_1->func.content_get =
+ (void *) __vp_subtitle_genlist_content_get_cb;
pSubtitle->st_Subtitle_Itc_1->func.state_get = NULL;
pSubtitle->st_Subtitle_Itc_1->func.del = NULL;
}
pSubtitle->st_Subtitle_Itc_2 = elm_genlist_item_class_new();
if (pSubtitle->st_Subtitle_Itc_2 != NULL) {
- pSubtitle->st_Subtitle_Itc_2->version = ELM_GENLIST_ITEM_CLASS_VERSION;
+ pSubtitle->st_Subtitle_Itc_2->version =
+ ELM_GENLIST_ITEM_CLASS_VERSION;
pSubtitle->st_Subtitle_Itc_2->item_style = "type1";
- pSubtitle->st_Subtitle_Itc_2->func.text_get = (void *)__vp_subtitle_genlist_text_get_cb;
+ pSubtitle->st_Subtitle_Itc_2->func.text_get =
+ (void *) __vp_subtitle_genlist_text_get_cb;
pSubtitle->st_Subtitle_Itc_2->func.content_get = NULL;
pSubtitle->st_Subtitle_Itc_2->func.state_get = NULL;
pSubtitle->st_Subtitle_Itc_2->func.del = NULL;
pSubtitle->st_Subtitle_Itc_1icon = elm_genlist_item_class_new();
if (pSubtitle->st_Subtitle_Itc_1icon != NULL) {
- pSubtitle->st_Subtitle_Itc_1icon->version = ELM_GENLIST_ITEM_CLASS_VERSION;
+ pSubtitle->st_Subtitle_Itc_1icon->version =
+ ELM_GENLIST_ITEM_CLASS_VERSION;
pSubtitle->st_Subtitle_Itc_1icon->item_style = "1icon";
pSubtitle->st_Subtitle_Itc_1icon->func.text_get = NULL;
- pSubtitle->st_Subtitle_Itc_1icon->func.content_get = (void *)__vp_subtitle_genlist_content_get_cb;
+ pSubtitle->st_Subtitle_Itc_1icon->func.content_get =
+ (void *) __vp_subtitle_genlist_content_get_cb;
pSubtitle->st_Subtitle_Itc_1icon->func.state_get = NULL;
pSubtitle->st_Subtitle_Itc_1icon->func.del = NULL;
}
if (pSubtitle->st_Subtitle_Itc_groupindex != NULL) {
- pSubtitle->st_Subtitle_Itc_groupindex = elm_genlist_item_class_new();
- pSubtitle->st_Subtitle_Itc_groupindex->version = ELM_GENLIST_ITEM_CLASS_VERSION;
+ pSubtitle->st_Subtitle_Itc_groupindex =
+ elm_genlist_item_class_new();
+ pSubtitle->st_Subtitle_Itc_groupindex->version =
+ ELM_GENLIST_ITEM_CLASS_VERSION;
pSubtitle->st_Subtitle_Itc_groupindex->item_style = "group_index";
- pSubtitle->st_Subtitle_Itc_groupindex->func.text_get = (void *)__vp_subtitle_genlist_text_get_cb;
+ pSubtitle->st_Subtitle_Itc_groupindex->func.text_get =
+ (void *) __vp_subtitle_genlist_text_get_cb;
pSubtitle->st_Subtitle_Itc_groupindex->func.content_get = NULL;
pSubtitle->st_Subtitle_Itc_groupindex->func.state_get = NULL;
pSubtitle->st_Subtitle_Itc_groupindex->func.del = NULL;
}
Elm_Object_Item *pItem = NULL;
- VideoLogInfo("subtitle text pre is %s", pSubtitle->pSubtitleInfo->szText);
- pItem = elm_genlist_item_append(pObj, pSubtitle->st_Subtitle_Itc_1, (void *)VP_PLAY_STRING_ACTIVATION, NULL, ELM_GENLIST_ITEM_NONE, __vp_subtitle_genlist_item_selected_cb, pUserData);
- elm_genlist_item_select_mode_set(pItem , ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ VideoLogInfo("subtitle text pre is %s",
+ pSubtitle->pSubtitleInfo->szText);
+ pItem =
+ elm_genlist_item_append(pObj, pSubtitle->st_Subtitle_Itc_1,
+ (void *) VP_PLAY_STRING_ACTIVATION, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_genlist_item_selected_cb,
+ pUserData);
+ elm_genlist_item_select_mode_set(pItem,
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
//elm_genlist_item_append(pObj, pSubtitle->st_Subtitle_Itc_2, (void *)VP_PLAY_STRING_SUBTITLE_SELECT_SUBTITLES, NULL, ELM_GENLIST_ITEM_NONE, __vp_subtitle_genlist_item_selected_cb, pUserData);
- pItem = elm_genlist_item_append(pObj, pSubtitle->st_Subtitle_Itc_groupindex, (void *)VP_PLAY_STRING_SETTINGS, NULL, ELM_GENLIST_ITEM_NONE, NULL, pUserData);
- elm_genlist_item_select_mode_set(pItem , ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
-
- pItem = elm_genlist_item_append(pObj, pSubtitle->st_Subtitle_Itc_1icon, (void *)VP_PLAY_STRING_PREVIEW_SUBTITLE_CC, NULL, ELM_GENLIST_ITEM_NONE, NULL, pUserData);
- elm_genlist_item_select_mode_set(pItem , ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
- elm_genlist_item_append(pObj, pSubtitle->st_Subtitle_Itc_2, (void *)VP_PLAY_STRING_SUBTITLE_ALIGNMENT, NULL, ELM_GENLIST_ITEM_NONE, __vp_subtitle_genlist_item_selected_cb, pUserData);
- elm_genlist_item_append(pObj, pSubtitle->st_Subtitle_Itc_2, (void *)VP_PLAY_STRING_SUBTITLE_SIZE, NULL, ELM_GENLIST_ITEM_NONE, __vp_subtitle_genlist_item_selected_cb, pUserData);
- elm_genlist_item_append(pObj, pSubtitle->st_Subtitle_Itc_1, (void *)VP_PLAY_STRING_SUBTITLE_COLOR, NULL, ELM_GENLIST_ITEM_NONE, __vp_subtitle_genlist_item_selected_cb, pUserData);
+ pItem =
+ elm_genlist_item_append(pObj,
+ pSubtitle->st_Subtitle_Itc_groupindex,
+ (void *) VP_PLAY_STRING_SETTINGS, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, pUserData);
+ elm_genlist_item_select_mode_set(pItem,
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+
+ pItem =
+ elm_genlist_item_append(pObj, pSubtitle->st_Subtitle_Itc_1icon,
+ (void *)
+ VP_PLAY_STRING_PREVIEW_SUBTITLE_CC, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, pUserData);
+ elm_genlist_item_select_mode_set(pItem,
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ elm_genlist_item_append(pObj, pSubtitle->st_Subtitle_Itc_2,
+ (void *) VP_PLAY_STRING_SUBTITLE_ALIGNMENT,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_genlist_item_selected_cb,
+ pUserData);
+ elm_genlist_item_append(pObj, pSubtitle->st_Subtitle_Itc_2,
+ (void *) VP_PLAY_STRING_SUBTITLE_SIZE, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_genlist_item_selected_cb,
+ pUserData);
+ elm_genlist_item_append(pObj, pSubtitle->st_Subtitle_Itc_1,
+ (void *) VP_PLAY_STRING_SUBTITLE_COLOR, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __vp_subtitle_genlist_item_selected_cb,
+ pUserData);
bool bOn = FALSE;
vp_play_preference_get_subtitle_show_key(&bOn);
return TRUE;
}
-static void _vp_subtitle_done_button_cb(void *data, Evas_Object *obj, void *Event_info)
+static void _vp_subtitle_done_button_cb(void *data, Evas_Object * obj,
+ void *Event_info)
{
- SubtitlePopup *pSubtitle = (SubtitlePopup *)data;
+ SubtitlePopup *pSubtitle = (SubtitlePopup *) data;
if (pSubtitle->pCloseCb) {
- pSubtitle->pCloseCb(VP_SUBTITLE_MODE_CLOSE, FALSE, (void *)pSubtitle->pUserData);
+ pSubtitle->pCloseCb(VP_SUBTITLE_MODE_CLOSE, FALSE,
+ (void *) pSubtitle->pUserData);
}
}
-static void _vp_subtitle_cancel_button_cb(void *data, Evas_Object *obj, void *Event_info)
+static void _vp_subtitle_cancel_button_cb(void *data, Evas_Object * obj,
+ void *Event_info)
{
- SubtitlePopup *pSubtitle = (SubtitlePopup *)data;
- pSubtitle->pSubtitleInfo->eAlignment = pSubtitle->pSubtitleInfo->original_eAlignment;
- pSubtitle->pSubtitleInfo->nFontSize = pSubtitle->pSubtitleInfo->original_nFontSize;
- vp_play_preference_set_subtitle_alignment_key(pSubtitle->pSubtitleInfo->original_eAlignment);
- vp_play_preference_set_subtitle_size_key(pSubtitle->pSubtitleInfo->original_nFontSize);
+ SubtitlePopup *pSubtitle = (SubtitlePopup *) data;
+ pSubtitle->pSubtitleInfo->eAlignment =
+ pSubtitle->pSubtitleInfo->original_eAlignment;
+ pSubtitle->pSubtitleInfo->nFontSize =
+ pSubtitle->pSubtitleInfo->original_nFontSize;
+ vp_play_preference_set_subtitle_alignment_key(pSubtitle->
+ pSubtitleInfo->
+ original_eAlignment);
+ vp_play_preference_set_subtitle_size_key(pSubtitle->pSubtitleInfo->
+ original_nFontSize);
+ if (pSubtitle->pSubtitleInfo->pOriginalTextColorHex) {
+ VP_FREE(pSubtitle->pSubtitleInfo->pTextColorHex);
+ VP_STRDUP(pSubtitle->pSubtitleInfo->pTextColorHex,
+ pSubtitle->pSubtitleInfo->pOriginalTextColorHex);
+ vp_play_preference_set_subtitle_font_color_hex_key(pSubtitle->
+ pSubtitleInfo->
+ pTextColorHex);
+ }
bool bOn = FALSE;
vp_play_preference_get_subtitle_show_key(&bOn);
if (bOn != pSubtitle->pSubtitleInfo->original_activation) {
_vp_subtitle_set_activation(pSubtitle, bOn);
}
if (pSubtitle->pCloseCb) {
- pSubtitle->pCloseCb(VP_SUBTITLE_MODE_CLOSE, FALSE, (void *)pSubtitle->pUserData);
+ pSubtitle->pCloseCb(VP_SUBTITLE_MODE_CLOSE, FALSE,
+ (void *) pSubtitle->pUserData);
}
}
-static void _vp_subtitle_create_title(SubtitlePopup *pSubtitle)
+static void _vp_subtitle_create_title(SubtitlePopup * pSubtitle)
{
if (pSubtitle == NULL) {
VideoLogError("pSubtitle is NULL");
VideoLogError("pBox is NULL");
return;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_POPUP_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_POPUP_EDJ_PATH);
free(path);
pSubtitle->pPopupTitle = elm_layout_add(pSubtitle->pBox);
- //evas_object_size_hint_weight_set(pSubtitle->pPopupTitle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(pSubtitle->pPopupTitle, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_layout_file_set(pSubtitle->pPopupTitle, edj_path, VP_PLAY_EDJ_GROUP_TITLE_POPUP);
+ evas_object_size_hint_align_set(pSubtitle->pPopupTitle, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ elm_layout_file_set(pSubtitle->pPopupTitle, edj_path,
+ VP_PLAY_EDJ_GROUP_TITLE_POPUP);
- /*set title*/
- elm_object_part_text_set(pSubtitle->pPopupTitle, "elm.text.title", VP_PLAY_STRING_POPUP_SUBTITLE);
+ /*set title */
+ elm_object_part_text_set(pSubtitle->pPopupTitle, "elm.text.title",
+ VP_PLAY_STRING_POPUP_SUBTITLE);
/* Title Cancel Button */
Evas_Object *btn = NULL;
btn = elm_button_add(pSubtitle->pPopupTitle);
elm_object_style_set(btn, "naviframe/title_left");
- evas_object_smart_callback_add(btn, "clicked", (Evas_Smart_Cb)_vp_subtitle_cancel_button_cb, pSubtitle);
- elm_object_part_content_set(pSubtitle->pPopupTitle, "elm.swallow.title.left.icon", btn);
+ evas_object_smart_callback_add(btn, "clicked",
+ (Evas_Smart_Cb)
+ _vp_subtitle_cancel_button_cb,
+ pSubtitle);
+ elm_object_part_content_set(pSubtitle->pPopupTitle,
+ "elm.swallow.title.left.icon", btn);
elm_object_text_set(btn, VP_PLAY_STRING_SUBTITLE_CANCEL);
/* Title Done Button */
btn = elm_button_add(pSubtitle->pPopupTitle);
elm_object_style_set(btn, "naviframe/title_right");
- evas_object_smart_callback_add(btn, "clicked", (Evas_Smart_Cb)_vp_subtitle_done_button_cb, pSubtitle);
- elm_object_part_content_set(pSubtitle->pPopupTitle, "elm.swallow.title.right.icon", btn);
+ evas_object_smart_callback_add(btn, "clicked",
+ (Evas_Smart_Cb)
+ _vp_subtitle_done_button_cb, pSubtitle);
+ elm_object_part_content_set(pSubtitle->pPopupTitle,
+ "elm.swallow.title.right.icon", btn);
elm_object_text_set(btn, VP_PLAY_STRING_SUBTITLE_DONE);
elm_box_pack_end(pSubtitle->pBox, pSubtitle->pPopupTitle);
evas_object_show(pSubtitle->pPopupTitle);
}
-static Evas_Object * _vp_subtitle_create_label(Evas_Object *parent)
+static Evas_Object *_vp_subtitle_create_label(Evas_Object * parent)
{
Evas_Object *pLabel = elm_label_add(parent);
- evas_object_size_hint_weight_set(pLabel, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(pLabel, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pLabel, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pLabel, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
elm_label_ellipsis_set(pLabel, EINA_TRUE);
elm_object_style_set(pLabel, "popup/default");
- evas_object_size_hint_min_set(pLabel, EVAS_HINT_EXPAND, VP_POPUP_LIST_CLOSED_CAPTION_HEIGHT * VP_SCALE);
+ evas_object_size_hint_min_set(pLabel, EVAS_HINT_EXPAND,
+ VP_POPUP_LIST_CLOSED_CAPTION_HEIGHT *
+ VP_SCALE);
evas_object_show(pLabel);
return pLabel;
}
-static Evas_Object * _vp_subtitle_create_caption_layout(SubtitlePopup *pSubtitle, Evas_Object *pParent)
+static Evas_Object *_vp_subtitle_create_caption_layout(SubtitlePopup *
+ pSubtitle,
+ Evas_Object *
+ pParent)
{
if (pSubtitle == NULL) {
VideoLogError("pSubtitle is NULL");
VideoLogError("pSubtitleInfo is NULL");
return NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_POPUP_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_POPUP_EDJ_PATH);
free(path);
pSubtitle->pCaptionLayout = elm_layout_add(pParent);
- evas_object_size_hint_weight_set(pSubtitle->pCaptionLayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(pSubtitle->pCaptionLayout, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_layout_file_set(pSubtitle->pCaptionLayout, edj_path, VP_PLAY_EDJ_GROUP_CAPTION_POPUP);
+ evas_object_size_hint_weight_set(pSubtitle->pCaptionLayout,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pSubtitle->pCaptionLayout,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_layout_file_set(pSubtitle->pCaptionLayout, edj_path,
+ VP_PLAY_EDJ_GROUP_CAPTION_POPUP);
char *szText = NULL;
Evas_Object *pLab = NULL;
elm_object_text_set(pLab, szText);
VP_FREE(szText);
- elm_object_part_content_set(pSubtitle->pCaptionLayout, "elm.swallow.content", pLab);
+ elm_object_part_content_set(pSubtitle->pCaptionLayout,
+ "elm.swallow.content", pLab);
evas_object_show(pLab);
evas_object_show(pSubtitle->pCaptionLayout);
return pSubtitle->pCaptionLayout;
}
-static bool _vp_subtitle_update_caption_layout(SubtitlePopup *pSubtitle, bool bActivation)
+static bool _vp_subtitle_update_caption_layout(SubtitlePopup * pSubtitle,
+ bool bActivation)
{
if (pSubtitle == NULL) {
VideoLogError("pSubtitle is NULL");
char *szText = NULL;
Evas_Object *pLab = NULL;
- pLab = elm_object_part_content_get(pSubtitle->pCaptionLayout, "elm.swallow.content");
- szText = _vp_play_subtitle_text_get(pSubtitle->pSubtitleInfo, bActivation);
+ pLab =
+ elm_object_part_content_get(pSubtitle->pCaptionLayout,
+ "elm.swallow.content");
+ szText =
+ _vp_play_subtitle_text_get(pSubtitle->pSubtitleInfo, bActivation);
VideoSecureLogInfo("preview title =%s", szText);
elm_object_text_set(pLab, szText);
VP_FREE(szText);
return TRUE;
}
-static Evas_Object *_vp_subtitle_popup_create(Evas_Object *pParent, Eext_Event_Cb pCancelKeyCb, Evas_Object_Event_Cb pCancelMouseCb, void *pUserData)
+static Evas_Object *_vp_subtitle_popup_create(Evas_Object * pParent,
+ Eext_Event_Cb pCancelKeyCb,
+ Evas_Object_Event_Cb
+ pCancelMouseCb,
+ void *pUserData)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
Evas_Object *pObj = NULL;
- pObj = vp_popup_create(pParent, 0 ,
- NULL,
- NULL, 0.0, NULL,
- pCancelKeyCb,
- pCancelMouseCb,
- (void *)pUserData);
+ pObj = vp_popup_create(pParent, 0,
+ NULL,
+ NULL, 0.0, NULL,
+ pCancelKeyCb,
+ pCancelMouseCb, (void *) pUserData);
return pObj;
}
-static void _vp_subtitle_get_subtitle_info(SubtitlePopup *pSubtitle, SubtitleInfo *pSubtitleInfo)
+static void _vp_subtitle_get_subtitle_info(SubtitlePopup * pSubtitle,
+ SubtitleInfo * pSubtitleInfo)
{
if (pSubtitle == NULL) {
VideoLogError("pSubtitle is NULL");
_vp_subtitle_destroy_subtitle_info(pSubtitle);
- pSubtitle->pSubtitleInfo->bClosedCaption = pSubtitleInfo->bClosedCaption;
+ pSubtitle->pSubtitleInfo->bClosedCaption =
+ pSubtitleInfo->bClosedCaption;
pSubtitle->pSubtitleInfo->fSync = pSubtitleInfo->fSync;
- VP_STRDUP(pSubtitle->pSubtitleInfo->szLanguage, pSubtitleInfo->szLanguage);
- VP_STRDUP(pSubtitle->pSubtitleInfo->szFontName, pSubtitleInfo->szFontName);
+ VP_STRDUP(pSubtitle->pSubtitleInfo->szLanguage,
+ pSubtitleInfo->szLanguage);
+ VP_STRDUP(pSubtitle->pSubtitleInfo->szFontName,
+ pSubtitleInfo->szFontName);
VP_STRDUP(pSubtitle->pSubtitleInfo->szURL, pSubtitleInfo->szURL);
- VP_STRDUP(pSubtitle->pSubtitleInfo->szText, VP_PLAY_STRING_PREVIEW_SUBTITLE_CC);
+ VP_STRDUP(pSubtitle->pSubtitleInfo->szText,
+ VP_PLAY_STRING_PREVIEW_SUBTITLE_CC);
pSubtitle->pSubtitleInfo->nFontSize = pSubtitleInfo->nFontSize;
pSubtitle->pSubtitleInfo->nEdge = pSubtitleInfo->nEdge;
pSubtitle->pSubtitleInfo->nTextColor = pSubtitleInfo->nTextColor;
pSubtitle->pSubtitleInfo->nBGColor = pSubtitleInfo->nBGColor;
#else
- VP_STRDUP(pSubtitle->pSubtitleInfo->pTextColorHex, pSubtitleInfo->pTextColorHex);
- VP_STRDUP(pSubtitle->pSubtitleInfo->pBGColorHex, pSubtitleInfo->pBGColorHex);
- VP_STRDUP(pSubtitle->pSubtitleInfo->pCaptionWinColorHex, pSubtitleInfo->pCaptionWinColorHex);
+ VP_STRDUP(pSubtitle->pSubtitleInfo->pTextColorHex,
+ pSubtitleInfo->pTextColorHex);
+ VP_STRDUP(pSubtitle->pSubtitleInfo->pBGColorHex,
+ pSubtitleInfo->pBGColorHex);
+ VP_STRDUP(pSubtitle->pSubtitleInfo->pCaptionWinColorHex,
+ pSubtitleInfo->pCaptionWinColorHex);
pSubtitle->pSubtitleInfo->eAlignment = pSubtitleInfo->eAlignment;
#endif
pSubtitle->pSubtitleInfo->fZoom = pSubtitleInfo->fZoom;
- pSubtitle->pSubtitleInfo->bSupportSelect = pSubtitleInfo->bSupportSelect;
+ pSubtitle->pSubtitleInfo->bSupportSelect =
+ pSubtitleInfo->bSupportSelect;
}
-Elm_Object_Item*
-_vp_subtitle_list_item_next_get(Elm_Object_Item *gl_item)
+Elm_Object_Item *_vp_subtitle_list_item_next_get(Elm_Object_Item * gl_item)
{
if (!gl_item) {
VideoLogError("gl_item is null!");
return next;
}
-static void _vp_subtitle_set_activation(SubtitlePopup *pSubtitle, bool bOn)
+static void _vp_subtitle_set_activation(SubtitlePopup * pSubtitle,
+ bool bOn)
{
if (pSubtitle == NULL) {
VideoLogError("pSubtitle is NULL");
VideoLogInfo("");
_vp_subtitle_update_caption_layout(pSubtitle, bOn);
- //_vp_subtitle_update_preview_text_item(pSubtitle);
_vp_subtitle_genlist_disabled_set(pSubtitle->pGenList, bOn);
}
/* external functions */
-subtitle_popup_handle vp_subtitle_create(Evas_Object *pParent, SubtitleInfo *pSubtitleInfo, PopupCloseCbFunc pCloseCb)
+subtitle_popup_handle vp_subtitle_create(Evas_Object * pParent,
+ SubtitleInfo * pSubtitleInfo,
+ PopupCloseCbFunc pCloseCb)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
return NULL;
}
_vp_subtitle_get_subtitle_info(pSubtitle, pSubtitleInfo);
- pSubtitle->pSubtitleInfo->original_eAlignment = pSubtitleInfo->eAlignment;
- pSubtitle->pSubtitleInfo->original_nFontSize = pSubtitleInfo->nFontSize;
+ pSubtitle->pSubtitleInfo->original_eAlignment =
+ pSubtitleInfo->eAlignment;
+ pSubtitle->pSubtitleInfo->original_nFontSize =
+ pSubtitleInfo->nFontSize;
+ if (pSubtitleInfo->pTextColorHex) {
+ VP_FREE(pSubtitle->pSubtitleInfo->pOriginalTextColorHex);
+ VP_STRDUP(pSubtitle->pSubtitleInfo->pOriginalTextColorHex,
+ pSubtitleInfo->pTextColorHex);
+ }
+
bool bOn = FALSE;
vp_play_preference_get_subtitle_show_key(&bOn);
pSubtitle->pSubtitleInfo->original_activation = bOn;
- pSubtitle->pPopup = _vp_subtitle_popup_create(pParent, __vp_subtitle_popup_key_event_cb, __vp_subtitle_popup_mouse_event_cb, (void *)pSubtitle);
+ pSubtitle->pPopup =
+ _vp_subtitle_popup_create(pParent,
+ __vp_subtitle_popup_key_event_cb,
+ __vp_subtitle_popup_mouse_event_cb,
+ (void *) pSubtitle);
if (pSubtitle->pPopup == NULL) {
VideoLogError("_vp_subtitle_create_popup fail");
_vp_subtitle_destroy_handle(pSubtitle);
return NULL;
}
- evas_object_smart_callback_add(pSubtitle->pParent, "rotation,changed", __vp_subtitle_popup_rotate_cb, pSubtitle);
- evas_object_smart_callback_add(pSubtitle->pGenList, "realized", __vp_subtitle_genlist_realized, NULL);
- evas_object_data_set(pSubtitle->pGenList , VP_SUBTITLE_GENLIST_DATA_KEY, (void *)pSubtitle);
+ evas_object_smart_callback_add(pSubtitle->pParent, "rotation,changed",
+ __vp_subtitle_popup_rotate_cb,
+ pSubtitle);
+ evas_object_smart_callback_add(pSubtitle->pGenList, "realized",
+ __vp_subtitle_genlist_realized, NULL);
+ evas_object_data_set(pSubtitle->pGenList, VP_SUBTITLE_GENLIST_DATA_KEY,
+ (void *) pSubtitle);
elm_genlist_mode_set(pSubtitle->pGenList, ELM_LIST_COMPRESS);
- if (!_vp_subtitle_add_genlist_item(pSubtitle->pGenList, (void *)pSubtitle)) {
+ if (!_vp_subtitle_add_genlist_item
+ (pSubtitle->pGenList, (void *) pSubtitle)) {
VideoLogError("_vp_subtitle_add_genlist_item fail");
_vp_subtitle_destroy_handle(pSubtitle);
return NULL;
}
pSubtitle->pBox = elm_box_add(pSubtitle->pPopup);
- evas_object_size_hint_weight_set(pSubtitle->pBox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(pSubtitle->pBox, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pSubtitle->pBox, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pSubtitle->pBox, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
elm_box_homogeneous_set(pSubtitle->pBox, FALSE);
pSubtitle->pContentBox = elm_box_add(pSubtitle->pBox);
- evas_object_size_hint_weight_set(pSubtitle->pContentBox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(pSubtitle->pContentBox, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pSubtitle->pContentBox,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pSubtitle->pContentBox, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
__vp_subtitle_popup_size_set(pSubtitle);
elm_box_pack_end(pSubtitle->pContentBox, pSubtitle->pGenList);
_vp_subtitle_create_title(pSubtitle);
- //_vp_subtitle_create_caption_layout(pSubtitle);
evas_object_show(pSubtitle->pContentBox);
return;
}
- SubtitlePopup *pSubtitle = (SubtitlePopup *)pSubtitleHandle;
+ SubtitlePopup *pSubtitle = (SubtitlePopup *) pSubtitleHandle;
_vp_subtitle_destroy_handle(pSubtitle);
return FALSE;
}
- SubtitlePopup *pSubtitle = (SubtitlePopup *)pSubtitleHandle;
+ SubtitlePopup *pSubtitle = (SubtitlePopup *) pSubtitleHandle;
evas_object_show(pSubtitle->pPopup);
return FALSE;
}
- SubtitlePopup *pSubtitle = (SubtitlePopup *)pSubtitleHandle;
+ SubtitlePopup *pSubtitle = (SubtitlePopup *) pSubtitleHandle;
evas_object_hide(pSubtitle->pPopup);
return TRUE;
}
-bool vp_subtitle_update(subtitle_popup_handle pSubtitleHandle, SubtitleInfo *pSubtitleInfo)
+bool vp_subtitle_update(subtitle_popup_handle pSubtitleHandle,
+ SubtitleInfo * pSubtitleInfo)
{
if (pSubtitleHandle == NULL) {
VideoLogError("pSubtitleHandle is NULL");
return FALSE;
}
- SubtitlePopup *pSubtitle = (SubtitlePopup *)pSubtitleHandle;
+ SubtitlePopup *pSubtitle = (SubtitlePopup *) pSubtitleHandle;
_vp_subtitle_get_subtitle_info(pSubtitle, pSubtitleInfo);
- //_vp_subtitle_update_preview_text_item(pSubtitle);
if (!_vp_subtitle_update_caption_layout(pSubtitle, TRUE)) {
VideoLogError("_vp_subtitle_update_caption_layout failed");
return TRUE;
}
-bool vp_subtitle_set_user_data(subtitle_popup_handle pSubtitleHandle, void *pUserData)
+bool vp_subtitle_set_user_data(subtitle_popup_handle pSubtitleHandle,
+ void *pUserData)
{
if (pSubtitleHandle == NULL) {
VideoLogError("pSubtitleHandle is NULL");
return FALSE;
}
- SubtitlePopup *pSubtitle = (SubtitlePopup *)pSubtitleHandle;
+ SubtitlePopup *pSubtitle = (SubtitlePopup *) pSubtitleHandle;
pSubtitle->pUserData = pUserData;
VP_FREE(szOpacity);
- return g_strdup_printf("%d%%", (int)((fOpacity * 100) / 255.0 + 0.5));
+ return g_strdup_printf("%d%%", (int) ((fOpacity * 100) / 255.0 + 0.5));
}
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
#include "vp-play-type-define.h"
static void _vp_zoom_guide_destory_handle(ZoomGuideWidget *
- pZoomGuideWidget);
-static void _vp_zoom_guide_update_item(ZoomGuideWidget *pZoomGuideWidget,
- bool bUpdate);
+ pZoomGuideWidget);
+static void _vp_zoom_guide_update_item(ZoomGuideWidget * pZoomGuideWidget,
+ bool bUpdate);
/* callback functions */
ZoomGuideWidget *pZoomGuideWidget = (ZoomGuideWidget *) pUserData;
elm_object_signal_emit(pZoomGuideWidget->pLayout,
- VP_NORMAL_SIGNAL_ZOOM_GUIDE_HIDE, "*");
+ VP_NORMAL_SIGNAL_ZOOM_GUIDE_HIDE, "*");
evas_object_hide(pZoomGuideWidget->pLayout);
evas_object_hide(pZoomGuideWidget->pItemLayout);
}
-static void __vp_zoom_guide_resize_cb(void *pUserData, Evas *pEvas,
- Evas_Object *pObj, void *pEvent)
+static void __vp_zoom_guide_resize_cb(void *pUserData, Evas * pEvas,
+ Evas_Object * pObj, void *pEvent)
{
if (!pUserData) {
VideoLogError("[ERR] No Exist pUserData.");
Evas_Coord_Rectangle rtCurRect = { 0, };
evas_object_geometry_get(pObj, &(rtCurRect.x), &(rtCurRect.y),
- &(rtCurRect.w), &(rtCurRect.h));
+ &(rtCurRect.w), &(rtCurRect.h));
if (pZoomGuideWidget->rtOldRect.x != rtCurRect.x ||
- pZoomGuideWidget->rtOldRect.y != rtCurRect.y ||
- pZoomGuideWidget->rtOldRect.w != rtCurRect.w ||
- pZoomGuideWidget->rtOldRect.h != rtCurRect.h) {
+ pZoomGuideWidget->rtOldRect.y != rtCurRect.y ||
+ pZoomGuideWidget->rtOldRect.w != rtCurRect.w ||
+ pZoomGuideWidget->rtOldRect.h != rtCurRect.h) {
pZoomGuideWidget->rtOldRect.x = rtCurRect.x;
pZoomGuideWidget->rtOldRect.y = rtCurRect.y;
/* internal functions */
-static void _vp_zoom_guide_update_item(ZoomGuideWidget *pZoomGuideWidget,
- bool bUpdate)
+static void _vp_zoom_guide_update_item(ZoomGuideWidget * pZoomGuideWidget,
+ bool bUpdate)
{
if (pZoomGuideWidget == NULL) {
VideoLogError("pZoomGuideWidget is NULL");
Evas_Coord_Rectangle nDstRect = { 0, };
evas_object_geometry_get(pParent, &(nRect.x), &(nRect.y), &(nRect.w),
- &(nRect.h));
+ &(nRect.h));
nDstRect.w = nRect.w * pZoomGuideWidget->fZoomValue;
nDstRect.h = nRect.h * pZoomGuideWidget->fZoomValue;
nDstRect.x =
- nRect.x + (nRect.w * pZoomGuideWidget->fPosX) - (nDstRect.w / 2);
+ nRect.x + (nRect.w * pZoomGuideWidget->fPosX) - (nDstRect.w / 2);
nDstRect.y =
- nRect.y + (nRect.h * pZoomGuideWidget->fPosY) - (nDstRect.h / 2);
+ nRect.y + (nRect.h * pZoomGuideWidget->fPosY) - (nDstRect.h / 2);
if (nDstRect.x < nRect.x) {
nDstRect.x = nRect.x;
}
pZoomGuideWidget->fResultPosX =
- (double)((double)(nDstRect.x - nRect.x) / (double)(nRect.w));
+ (double) ((double) (nDstRect.x - nRect.x) / (double) (nRect.w));
pZoomGuideWidget->fResultPosY =
- (double)((double)(nDstRect.y - nRect.y) / (double)(nRect.h));
+ (double) ((double) (nDstRect.y - nRect.y) / (double) (nRect.h));
evas_object_move(pItem, nDstRect.x, nDstRect.y);
evas_object_resize(pItem, nDstRect.w, nDstRect.h);
if (bUpdate) {
elm_object_signal_emit(pZoomGuideWidget->pLayout,
- VP_NORMAL_SIGNAL_ZOOM_GUIDE_SHOW, "*");
+ VP_NORMAL_SIGNAL_ZOOM_GUIDE_SHOW, "*");
evas_object_show(pZoomGuideWidget->pLayout);
evas_object_show(pZoomGuideWidget->pItemLayout);
VP_EVAS_TIMER_DEL(pZoomGuideWidget->pHideTimer);
pZoomGuideWidget->pHideTimer =
- ecore_timer_add(1.5, __vp_zoom_guide_hide_timer_cb,
- (void *) pZoomGuideWidget);
+ ecore_timer_add(1.5, __vp_zoom_guide_hide_timer_cb,
+ (void *) pZoomGuideWidget);
}
}
static void _vp_zoom_guide_destory_handle(ZoomGuideWidget *
- pZoomGuideWidget)
+ pZoomGuideWidget)
{
if (pZoomGuideWidget == NULL) {
VideoLogError("pZoomGuideWidget is NULL");
VP_FREE(pZoomGuideWidget);
}
-static Evas_Object *_vp_zoom_guide_create_layout(Evas_Object *pParent,
- void *pUserData)
+static Evas_Object *_vp_zoom_guide_create_layout(Evas_Object * pParent,
+ void *pUserData)
{
if (!pParent) {
VideoLogError("Parent is NULL");
VideoLogError("elm_layout_add object is NULL");
return NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_ZOOM_GUIDE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_ZOOM_GUIDE_EDJ_PATH);
free(path);
bRet =
- elm_layout_file_set(pObj, edj_path,
- VP_PLAY_EDJ_GROUP_ZOOM_GUIDE);
+ elm_layout_file_set(pObj, edj_path, VP_PLAY_EDJ_GROUP_ZOOM_GUIDE);
if (bRet != EINA_TRUE) {
VideoLogError("elm_layout_file_set fail");
return NULL;
}
evas_object_event_callback_add(pObj, EVAS_CALLBACK_RESIZE,
- __vp_zoom_guide_resize_cb, pUserData);
+ __vp_zoom_guide_resize_cb, pUserData);
evas_object_event_callback_add(pObj, EVAS_CALLBACK_MOVE,
- __vp_zoom_guide_resize_cb, pUserData);
+ __vp_zoom_guide_resize_cb, pUserData);
evas_object_show(pObj);
static Evas_Object *_vp_zoom_guide_create_item_layout(Evas_Object *
- pParent)
+ pParent)
{
if (!pParent) {
VideoLogError("Parent is NULL");
VideoLogError("elm_layout_add object is NULL");
return NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_ZOOM_GUIDE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_ZOOM_GUIDE_EDJ_PATH);
free(path);
bRet =
- elm_layout_file_set(pObj, edj_path,
- VP_PLAY_EDJ_GROUP_ZOOM_GUIDE_ITEM);
+ elm_layout_file_set(pObj, edj_path,
+ VP_PLAY_EDJ_GROUP_ZOOM_GUIDE_ITEM);
if (bRet != EINA_TRUE) {
VideoLogError("elm_layout_file_set fail");
return NULL;
}
-static bool _vp_zoom_guide_init_layout(ZoomGuideWidget *pZoomGuideWidget)
+static bool _vp_zoom_guide_init_layout(ZoomGuideWidget * pZoomGuideWidget)
{
if (pZoomGuideWidget == NULL) {
VideoLogError("pZoomGuideWidget is NULL");
Evas_Object *pParent = pZoomGuideWidget->pParent;
pZoomGuideWidget->pLayout =
- _vp_zoom_guide_create_layout(pParent, (void *) pZoomGuideWidget);
+ _vp_zoom_guide_create_layout(pParent, (void *) pZoomGuideWidget);
if (pZoomGuideWidget->pLayout == NULL) {
VideoLogError("_vp_zoom_guide_create_layout is fail");
return FALSE;
}
pZoomGuideWidget->pItemLayout =
- _vp_zoom_guide_create_item_layout(pZoomGuideWidget->pLayout);
+ _vp_zoom_guide_create_item_layout(pZoomGuideWidget->pLayout);
if (pZoomGuideWidget->pItemLayout == NULL) {
VideoLogError("_vp_zoom_guide_create_item_layout is fail");
return FALSE;
}
/* external functions */
-zoom_guide_handle vp_zoom_guide_create(Evas_Object *pParent)
+zoom_guide_handle vp_zoom_guide_create(Evas_Object * pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
}
bool vp_zoom_guide_set_zoom_value(zoom_guide_handle pWidgetHandle,
- double fZoomVal)
+ double fZoomVal)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_zoom_guide_get_zoom_value(zoom_guide_handle pWidgetHandle,
- double *fZoomVal)
+ double *fZoomVal)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_zoom_guide_set_move_position(zoom_guide_handle pWidgetHandle,
- double fPosX, double fPosY)
+ double fPosX, double fPosY)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
bool vp_zoom_guide_get_move_position(zoom_guide_handle pWidgetHandle,
- double *fPosX, double *fPosY)
+ double *fPosX, double *fPosY)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_zoom_guide_get_real_position(zoom_guide_handle pWidgetHandle,
- double *fPosX, double *fPosY)
+ double *fPosX, double *fPosY)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <stdio.h>
#include <stdlib.h>
#define _EDJ(o) elm_layout_edje_get(o)
#define VP_SCALE elm_config_scale_get()
-#define VP_MAX_HEAP_SIZE 5*1024*1024 /*Malloc more than this will not be allowd*/
+#define VP_MAX_HEAP_SIZE 5*1024*1024 /*Malloc more than this will not be allowd */
#define VP_ASSERT(scalar_exp) \
assert(scalar_exp); \
#define VP_GENLIST_HIDE_BOTTOMLINE(data, obj, event_info) \
-do{ \
- if(!event_info || !obj) \
- { \
+do { \
+ if (!event_info || !obj) { \
return; \
} \
elm_object_item_signal_emit(elm_genlist_last_item_get(obj), "elm,state,bottomline,hide", ""); \
-}while(0);
+} while (0);
#define VP_CALLOC(ptr, no_elements, type) \
do { \
- if((int)(no_elements) <= 0) \
- { \
+ if ((int)(no_elements) <= 0) { \
ptr = NULL; \
} \
- else if(VP_MAX_HEAP_SIZE < no_elements* sizeof (type)) \
- { \
+ else if (VP_MAX_HEAP_SIZE < no_elements * sizeof(type)) { \
assert(0); \
} \
- else \
- { \
- ptr = (type *) calloc (no_elements , sizeof (type)); \
+ else { \
+ ptr = (type *) calloc(no_elements , sizeof(type)); \
VP_ASSERT(ptr); \
- }\
- }while(0);
+ } \
+ } while (0);
-#define VP_SNPRINTF(dest,size,format,arg...) \
+#define VP_SNPRINTF(dest, size, format, arg...) \
do { \
- if(dest != NULL && format != NULL) \
- { \
- snprintf(dest,size,format,##arg); \
+ if (dest != NULL && format != NULL) { \
+ snprintf(dest, size, format, ##arg); \
} \
- }while(0);
+ } while (0);
- /* If the same pointer is passed to free twice, known as a double free.
- To avoid this, set pointers to NULL after passing them to free:
- free(NULL) is safe (it does nothing). */
+ /* If the same pointer is passed to free twice, known as a double free.
+ To avoid this, set pointers to NULL after passing them to free:
+ free(NULL) is safe (it does nothing). */
#define VP_FREE(ptr) \
do { \
- if(ptr != NULL) \
- { \
+ if (ptr != NULL) { \
free(ptr); \
ptr = NULL; \
} \
- }while(0);
+ } while (0);
-#define VP_STRNCPY(dest,src,size) \
+#define VP_STRNCPY(dest, src, size) \
do { \
- if(src != NULL && dest != NULL && size > 0) \
- { \
- strncpy(dest,src,size); \
+ if (src != NULL && dest != NULL && size > 0) { \
+ strncpy(dest, src, size); \
} \
- }while(0);
+ } while (0);
/*
* string wrappers
*/
-#define VP_STRDUP(destptr,sourceptr)\
- do{\
- if(sourceptr == NULL)\
+#define VP_STRDUP(destptr, sourceptr)\
+ do { \
+ if (sourceptr == NULL)\
destptr = NULL; \
else \
destptr = strdup(sourceptr); \
- }while(0);
+ } while (0);
#define VP_EVAS_DEL(evas_obj) \
do { \
- if(evas_obj != NULL) \
- { \
+ if (evas_obj != NULL) { \
evas_object_del(evas_obj); \
evas_obj = NULL; \
} \
- }while(0);
+ } while (0);
#define VP_EVAS_ITEM_DEL(evas_obj) \
do { \
- if(evas_obj != NULL) \
- { \
+ if (evas_obj != NULL) { \
elm_object_item_del(evas_obj); \
evas_obj = NULL; \
} \
- }while(0);
+ } while (0);
#define VP_EVAS_TIMER_DEL(evas_obj) \
do { \
- if(evas_obj != NULL) \
- { \
+ if (evas_obj != NULL) { \
ecore_timer_del(evas_obj); \
evas_obj = NULL; \
} \
- }while(0);
+ } while (0);
#define VP_EVAS_PIPE_DEL(evas_obj) \
do { \
- if(evas_obj != NULL) \
- { \
+ if (evas_obj != NULL) { \
ecore_pipe_del(evas_obj); \
evas_obj = NULL; \
} \
- }while(0);
+ } while (0);
#define VP_EVAS_IDLER_DEL(evas_obj) \
do { \
- if(evas_obj != NULL) \
- { \
+ if (evas_obj != NULL) { \
ecore_idler_del(evas_obj); \
evas_obj = NULL; \
} \
- }while(0);
+ } while (0);
#define VP_EVAS_JOB_DEL(evas_obj) \
do { \
- if(evas_obj != NULL) \
- { \
+ if (evas_obj != NULL) { \
ecore_job_del(evas_obj); \
evas_obj = NULL; \
} \
- }while(0);
+ } while (0);
#define VP_EVAS_EVENT_HANDLER_DEL(evas_obj) \
do { \
- if(evas_obj != NULL) \
- { \
+ if (evas_obj != NULL) { \
ecore_event_handler_del(evas_obj); \
evas_obj = NULL; \
} \
- }while(0);
+ } while (0);
#define VP_EVAS_DISABLE_SET(evas_obj, value) \
do { \
- if(evas_obj != NULL) \
- { \
+ if (evas_obj != NULL) {\
elm_object_disabled_set(evas_obj, value); \
} \
- }while(0);
+ } while (0);
#ifdef __cplusplus
- }
-#endif /* __cplusplus */
-
-
+}
+#endif /* __cplusplus */
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#define VP_PLAY_BRIGHTNESS_POPUP_EDJ_PATH "pv-brightness-popup.edj"
#define VP_PLAY_ZOOM_GUIDE_EDJ_PATH "pv-zoom-guide.edj"
-#define MINICON_EDJ_NAME "pv-minicontroller.edj"
-#define LOCKSCREENMINI_EDJ_NAME "pv-lockscreenmini.edj"
+#define MINICON_EDJ_NAME "pv-minicontroller.edj"
+#define LOCKSCREENMINI_EDJ_NAME "pv-lockscreenmini.edj"
#define VP_PLAY_SUBTITLE_EDJ_PATH "pv-subtitle.edj"
#define VP_PLAY_EDJ_GROUP_MICROSEEK_IMAGE "pv.normal.main.microseek.image"
#define VP_PLAY_EDJ_GROUP_FLICKJUMP_SEEK "pv.normal.main.flickjump.seek"
-//#define VP_PLAY_SWALLOW_BUTTON_ICON "icon"
#define VP_PLAY_SWALLOW_BUTTON_ICON "elm.swallow.content"
#define VP_PLAY_SWALLOW_BUTTON_PRESS_ICON "elm.swallow.content.press"
#define VP_PLAY_SWALLOW_BUTTON_DIM_ICON "elm.swallow.content.dim"
#define VP_PLAY_SWALLOW_NORMAL_PLAY_FOCUS "pv.normal.control.play.focus"
-#define VP_PLAY_SWALLOW_NORMAL_SCREENSHOT_PORTRAIT "pv.normal.main.screenshot.portrait"
-#define VP_PLAY_SWALLOW_NORMAL_SCREENSHOT_LANDSCAPE "pv.normal.main.screenshot.landscape"
+#define VP_PLAY_SWALLOW_NORMAL_SCREENSHOT_PORTRAIT "pv.normal.main.screenshot.portrait"
+#define VP_PLAY_SWALLOW_NORMAL_SCREENSHOT_LANDSCAPE "pv.normal.main.screenshot.landscape"
#define VP_PLAY_SWALLOW_NORMAL_BOOKMARK "pv.normal.control.bookmark"
#define VP_PLAY_SWALLOW_NORMAL_PROGRESS "pv.normal.control.progress"
#define VP_PLAY_SWALLOW_PROGRESS_PLAYING_LABEL "pv.progress.playing.txt"
#define VP_PLAY_SWALLOW_PROGRESS_DURATION_LABEL "pv.progress.duration.txt"
#define VP_PLAY_SWALLOW_PROGRESS_DRAG_RECT "pv.progress.playing"
-#define VP_PLAY_SWALLOW_PROGRESS_BAR "pv.progress.bar.bg"
+#define VP_PLAY_SWALLOW_PROGRESS_BAR "pv.progress.bar.bg"
#define VP_PLAY_SWALLOW_PROGRESS_POINT "pv.progress.point"
#define VP_PLAY_SWALLOW_BOOKMARK_ADD_BUTTON "pv.bookmark.add.button"
#define VP_PLAY_NORMAL_RES_BOOKMARK_PRESS "function/T01_2_control_icon_bookmark_press.png"
#define VP_PLAY_NORMAL_RES_BOOKMARK_DIM "function/T01_2_control_icon_bookmark_dim.png"
-#define VP_PLAY_NORMAL_RES_POPUP_PLAYER "function/player_popup_view_icon_nomal.png"
+#define VP_PLAY_NORMAL_RES_POPUP_PLAYER "function/player_popup_view_icon_nomal.png"
#define VP_PLAY_NORMAL_RES_SCREEN_1_MODE "function/T01_2_control_icon_screenmode03.png"
#define VP_PLAY_NORMAL_RES_SCREEN_1_MODE_PRESS "function/T01_2_control_icon_screenmode03_press.png"
#define VP_PLAY_NORMAL_AUDIO_ONLY_IMG "sound_only.png"
#define VP_PLAY_NORMAL_AUDIO_ERROR_IMG "player_error_screen.png"
-#define VP_PLAY_BRIGHTNESS_POPUP_ICON_PATH "brightness/quick_icon_brightness_%02d.png"
+#define VP_PLAY_BRIGHTNESS_POPUP_ICON_PATH "brightness/quick_icon_brightness_%02d.png"
/* string resources */
#define VP_PLAY_STRING_NO_TITLE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_BODY_NO_TITLE"))
#define VP_PLAY_STRING_UNABLE_TO_PLAY_VIDEO_DURING_CALL (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"))
-#define VP_PLAY_STRING_ERROR_UNABLE_CAPTURE_DRM_CONTENT (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_POP_UNABLE_TO_CAPTURE"))//this id has been reomved from po file
+#define VP_PLAY_STRING_ERROR_UNABLE_CAPTURE_DRM_CONTENT (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_POP_UNABLE_TO_CAPTURE")) //this id has been reomved from po file
#define VP_PLAY_STRING_ERROR_UNSUPPORTED_AUDIO (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_POP_UNSUPPORTED_AUDIO_FORMAT"))
#define VP_PLAY_STRING_ERROR_UNSUPPORTED_VIDEO (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_POP_UNSUPPORTED_VIDEO_FORMAT"))
#define VP_PLAY_STRING_ERROR_UNSUPPORTED_FORMAT (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VIDEO_POP_UNSUPPORTED_FILE_TYPE"))
#define VP_PLAY_STRING_ERROR_INVALID_URL (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_POP_INVALID_URL"))
#define VP_PLAY_STRING_ERROR_CONNECTION_FAILED (dgettext(VP_SYS_STR_PREFIX, "IDS_COM_POP_CONNECTION_FAILED"))
-#define VP_PLAY_STRING_ERROR_BOOKMARK_LIST_FULL (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_POP_BOOKMARK_LIST_FULL_DELETE_SOME_BOOKMARKS"))//this id has been removed from po file
+#define VP_PLAY_STRING_ERROR_BOOKMARK_LIST_FULL (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_POP_BOOKMARK_LIST_FULL_DELETE_SOME_BOOKMARKS")) //this id has been removed from po file
#define VP_PLAY_STRING_ERROR_NO_SUBTITLE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VIDEO_SBODY_NO_SUBTITLES_AVAILABLE_M_STATUS"))
#define VP_PLAY_STRING_ERROR_SUBTITLE_FAIL (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_POP_ERROR_OCCURRED_WITH_SUBTITLE_FILE"))
#define VP_PLAY_STRING_SUBTITLE_OFF (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_BODY_OFF"))
#define VP_PLAY_STRING_POPUP_REPEAT_SETTING (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VIDEO_OPT_REPEAT_SETTING_ABB"))
#define VP_PLAY_STRING_POPUP_AUDIO_TRACK (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VIDEO_OPT_AUDIO_TRACK_ABB"))
#define VP_PLAY_STRING_POPUP_SETTINGS (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VIDEO_HEADER_SETTINGS"))
-#define VP_PLAY_STRING_POPUP_PLAY_SPEED (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_BODY_PLAY_SPEED"))//this id has been reomved from po file
+#define VP_PLAY_STRING_POPUP_PLAY_SPEED (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_BODY_PLAY_SPEED")) //this id has been reomved from po file
#define VP_PLAY_STRING_POPUP_ENABLE_AUDIO_ONLY (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_OPT_ENABLE_PLAY_AUDIO_ONLY_ABB"))
#define VP_PLAY_STRING_POPUP_DISABLE_AUDIO_ONLY (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_OPT_DISABLE_PLAY_AUDIO_ONLY_ABB"))
+#define VP_PLAY_STRING_UNABLE_TO_PLAY (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VIDEO_HEADER_UNABLE_TO_PLAY_VIDEO_ABB"))
#define VP_PLAY_STRING_AUDIO_ONLY_PLAYBACK_MSG (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_SBODY_PRESS_THE_HOME_KEY_OR_THE_POWER_KEY_DURING_PLAYBACK_TO_PLAY_AUDIO_ONLY"))
-#define VP_PLAY_STRING_POPUP_CAPTURE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_OPT_CAPTURE"))//this id has been reomved from po file
-#define VP_PLAY_STRING_POPUP_TAG_BUDDY (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_OPT_TAG_BUDDY"))//this id has been reomved from po file
-#define VP_PLAY_STRING_POPUP_EDIT_WEATHER_TAG (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_HEADER_EDIT_WEATHER_TAG_ABB"))//this id has been reomved from po file
+#define VP_PLAY_STRING_POPUP_CAPTURE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_OPT_CAPTURE")) //this id has been reomved from po file
+#define VP_PLAY_STRING_POPUP_TAG_BUDDY (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_OPT_TAG_BUDDY")) //this id has been reomved from po file
+#define VP_PLAY_STRING_POPUP_EDIT_WEATHER_TAG (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_HEADER_EDIT_WEATHER_TAG_ABB")) //this id has been reomved from po file
#define VP_PLAY_STRING_COM_PLAY (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VIDEO_SK3_PLAY"))
#define VP_PLAY_STRING_COM_PAUSE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_MUSIC_OPT_PAUSE"))
#define VP_PLAY_STRING_COM_FULL ("Full")
#define VP_PLAY_STRING_COM_KEEP_RATIO ("Keep Ratio")
#define VP_PLAY_STRING_COM_VOLUME (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_POP_VOLUME_M_SOUND"))
-#define VP_PLAY_STRING_COM_ROTATE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_POP_ROTATE"))//this id has been reomved from po file
+#define VP_PLAY_STRING_COM_ROTATE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_POP_ROTATE")) //this id has been reomved from po file
#define VP_PLAY_STRING_COM_ON (dgettext(VP_SYS_STR_PREFIX, "IDS_COM_BODY_ON"))
#define VP_PLAY_STRING_COM_OFF (dgettext(VP_SYS_STR_PREFIX, "IDS_COM_BODY_OFF"))
#define VP_PLAY_STRING_COM_ENOUGH_MEMORY (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_POP_NOT_ENOUGH_MEMORY_DELETE_SOME_ITEMS"))
#define VP_PLAY_STRING_SOUND_ALIVE_NORMAL (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VIDEO_OPT_NORMAL_M_SOUND_ABB"))
#define VP_PLAY_STRING_SOUND_ALIVE_VOICE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VIDEO_BODY_VOICE"))
#define VP_PLAY_STRING_SOUND_ALIVE_MOVIE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VIDEO_BODY_MOVIES"))
-#define VP_PLAY_STRING_SOUND_ALIVE_71CH (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_OPT_VIRTUAL_71_CH"))//this id has been reomved from po file
+#define VP_PLAY_STRING_SOUND_ALIVE_71CH (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_OPT_VIRTUAL_71_CH")) //this id has been reomved from po file
#define VP_PLAY_STRING_71CH_ONLY_EARPHONE _(dgettext(VP_LOCAL_STR_PREFIX, "IDS_VIDEO_BODY_PS_SOUND_EFFECTS_NOT_SUPPORTED_BY_SPEAKER"))
#define VP_PLAY_STRING_SUBTITLE_SYNC (dgettext(VP_SYS_STR_PREFIX, "IDS_COM_BODY_SYNCHRONIZE"))
#define VP_PLAY_STRING_EDGE_DROP_SHADOW ("Drop shadow")
-#define VP_PLAY_STRING_SUBTITLE_SECS _(dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_BODY_PS_SECONDS"))//this is has been removed from po file
+#define VP_PLAY_STRING_SUBTITLE_SECS _(dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_BODY_PS_SECONDS")) //this is has been removed from po file
#define VP_PLAY_STRING_SUBTITLE_SIZE_LARGE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VIDEO_SBODY_LARGE_M_STATUS"))
#define VP_PLAY_STRING_SUBTITLE_SIZE_MEDIUM (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VIDEO_SBODY_MEDIUM_M_STATUS"))
#define VP_PLAY_STRING_SUBTITLE_SIZE_SMALL (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VIDEO_SBODY_SMALL_M_STATUS"))
-#define VP_PLAY_STRING_SUBTITLE_COLOR_BLACK (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_BODY_BLACK"))//this is has been removed from po file
-#define VP_PLAY_STRING_SUBTITLE_COLOR_BLUE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_BODY_BLUE"))//this is has been removed from po file
-#define VP_PLAY_STRING_SUBTITLE_COLOR_GREEN (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_OPT_GREEN"))//this is has been removed from po file
-#define VP_PLAY_STRING_SUBTITLE_COLOR_WHITE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_BODY_WHITE"))//this is has been removed from po file
+#define VP_PLAY_STRING_SUBTITLE_COLOR_BLACK (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_BODY_BLACK")) //this is has been removed from po file
+#define VP_PLAY_STRING_SUBTITLE_COLOR_BLUE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_BODY_BLUE")) //this is has been removed from po file
+#define VP_PLAY_STRING_SUBTITLE_COLOR_GREEN (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_OPT_GREEN")) //this is has been removed from po file
+#define VP_PLAY_STRING_SUBTITLE_COLOR_WHITE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_BODY_WHITE")) //this is has been removed from po file
#define VP_PLAY_STRING_SUBTITLE_COLOR_RED (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_BODY_RED_ABB"))
#define VP_PLAY_STRING_SUBTITLE_COLOR_YELLOW (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_OPT_YELLOW_M_COLOUR"))
#define VP_PLAY_STRING_SUBTITLE_COLOR_MAGENTA (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_OPT_MAGENTA_M_COLOUR"))
#define VP_PLAY_STRING_SETTINGS (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VIDEO_HEADER_SETTINGS"))
#define VP_PLAY_STRING_AUDIO_TRACK (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VIDEO_OPT_AUDIO_TRACK_ABB"))
-#define VP_PLAY_STRING_CONNECT_INFO (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_OPT_CONNECTION_INFO_ABB"))//this is has been removed from po file
-#define VP_PLAY_STRING_CHNAGE_PLAYER (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_OPT_CHANGE_PLAYER"))//this is has been removed from po file
-#define VP_PLAY_STRING_MY_DEVICE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_BODY_MY_DEVICE"))//this is has been removed from po file
-#define VP_PLAY_STRING_SELECT_DEVICE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_HEADER_SELECT_DEVICE_ABB"))//this is has been removed from po file
+#define VP_PLAY_STRING_CONNECT_INFO (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_OPT_CONNECTION_INFO_ABB")) //this is has been removed from po file
+#define VP_PLAY_STRING_CHNAGE_PLAYER (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_OPT_CHANGE_PLAYER")) //this is has been removed from po file
+#define VP_PLAY_STRING_MY_DEVICE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_BODY_MY_DEVICE")) //this is has been removed from po file
+#define VP_PLAY_STRING_SELECT_DEVICE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_HEADER_SELECT_DEVICE_ABB")) //this is has been removed from po file
#define VP_PLAY_STRING_UNABLE_TO_FF_REW (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_POP_UNABLE_TO_USE_FAST_FORWARD_AND_REWIND_WHEN_NEARBY_DEVICES_ARE_ENABLED"))
#define VP_PLAY_STRING_DRM_UNABLE_TO_SHARE_DRM_FILE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_POP_DRM_FILES_CANNOT_BE_SHARED"))
#define VP_PLAY_STRING_ACTIVATION (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_BODY_ACTIVATION"))
-#define VP_PLAY_STRING_SENSOR_TURN_PHONE_OVER_TO_MUTE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_MUSIC_BODY_TURN_PHONE_OVER_TO_MUTE_INCOMING_CALLS_MESSAGE_ALERTS_AND_ALARMS")) //maybe, it is not implemented yet.
+#define VP_PLAY_STRING_SENSOR_TURN_PHONE_OVER_TO_MUTE (dgettext(VP_LOCAL_STR_PREFIX, "IDS_MUSIC_BODY_TURN_PHONE_OVER_TO_MUTE_INCOMING_CALLS_MESSAGE_ALERTS_AND_ALARMS")) //maybe, it is not implemented yet.
#define VP_PLAY_STRING_SENSOR_TURN_PHONE_OVER_TO_MUTE_IDS ("IDS_MUSIC_BODY_TURN_PHONE_OVER_TO_MUTE_INCOMING_CALLS_MESSAGE_ALERTS_AND_ALARMS")
#define VP_PLAY_STRING_SENSOR_DONT_ASK_AGAIN (dgettext(VP_SYS_STR_PREFIX, "IDS_COM_BUTTON_DONT_ASK_AGAIN"))
-#define VP_PLAY_STRING_SENSOR_ENABLE_MOTION (dgettext(VP_LOCAL_STR_PREFIX, "IDS_MUSIC_BUTTON_ENABLE_MOTION")) // maybe, it is not implemented yet.
+#define VP_PLAY_STRING_SENSOR_ENABLE_MOTION (dgettext(VP_LOCAL_STR_PREFIX, "IDS_MUSIC_BUTTON_ENABLE_MOTION")) // maybe, it is not implemented yet.
#define VP_PLAY_STRING_SENSOR_ENABLE_MOTION_IDS ("IDS_MUSIC_BUTTON_ENABLE_MOTION")
-#define VP_VIDEO_STRING_EXIT_POPUP (dgettext(VP_LOCAL_STR_PREFIX, "IDS_SMEMO_POP_CLOSE_APPLICATION_Q"))//this id has been removed from po file
+#define VP_VIDEO_STRING_EXIT_POPUP (dgettext(VP_LOCAL_STR_PREFIX, "IDS_SMEMO_POP_CLOSE_APPLICATION_Q")) //this id has been removed from po file
#define VP_VIDEO_PLAYER_TEXT (dgettext(VP_SYS_STR_PREFIX, "IDS_COM_BODY_VIDEO_PLAYER"))
#define VP_PLAY_STRING_PRIVACY_POPUP (dgettext(VP_LOCAL_STR_PREFIX, "IDS_ST_POP_P1SS_IS_DISABLED_IN_THIS_APPLICATION_TO_ENABLE_THIS_FUNCTION_GO_TO_P2SS_SELECT_THIS_FUNCTION_AND_THEN_SELECT_THIS_APPLICATION"))
//need to support multi language
-#define VP_PLAY_STRING_SOUND_HDMI (dgettext(VP_LOCAL_STR_PREFIX,"IDS_VIDEO_OPT_HDMI"))
+#define VP_PLAY_STRING_SOUND_HDMI (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VIDEO_OPT_HDMI"))
#define VP_PLAY_STRING_SOUND_MIRRORING ("Mirroring")
#define VP_PLAY_STRING_SOUND_USB_AUDIO ("USB Audio")
#define VP_PLAY_STRING_SCRUBBING_AT_PSX_SPEED (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_TPOP_SCRUBBING_AT_PSX_SPEED"))
#endif
-#define VP_PLAY_STRING_PD_SECS (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_BODY_PD_SECS"))//not show in po
+#define VP_PLAY_STRING_PD_SECS (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VPL_BODY_PD_SECS")) //not show in po
#ifdef _SUBTITLE_MULTI_LANGUAGE
-#define VP_PLAY_STRING_SELECTED_LANGUAGE ("Select at least one") //to support multi-language
+#define VP_PLAY_STRING_SELECTED_LANGUAGE ("Select at least one") //to support multi-language
#endif
-#define VP_PLAY_STRING_TRIM_VIEW_MIN_TIME ("Duration must be longer that one second") //trim view
+#define VP_PLAY_STRING_TRIM_VIEW_MIN_TIME ("Duration must be longer that one second") //trim view
#define VP_PLAY_STRING_UNABLE_TO_SCAN ("Unable to scan")
#define VP_PLAY_STRING_UNABLE_TO_SCAN_FOR_THE_DEVICE ("Unable to scan for the device currently connected via Screen Mirroring while Wi-Fi tethering is enabled")
#define VP_PLAY_STRING_DO_NOT_SHOW_AGAIN ("Do not show again")
-#define VP_PLAY_STRING_VIA_SCREEN_MIRRORING (dgettext(VP_LOCAL_STR_PREFIX, "IDS_DLNA_OPT_VIA_SCREEN_MIRRORING_ABB"))//now show in po
-#define VP_PLAY_STRING_VIA_HOME_NETWORK (dgettext(VP_LOCAL_STR_PREFIX, "IDS_DLNA_OPT_VIA_HOME_NETWORK_ABB"))//now show in po
+#define VP_PLAY_STRING_VIA_SCREEN_MIRRORING (dgettext(VP_LOCAL_STR_PREFIX, "IDS_DLNA_OPT_VIA_SCREEN_MIRRORING_ABB")) //now show in po
+#define VP_PLAY_STRING_VIA_HOME_NETWORK (dgettext(VP_LOCAL_STR_PREFIX, "IDS_DLNA_OPT_VIA_HOME_NETWORK_ABB")) //now show in po
#define VP_PLAY_STRING_UNSUPPORTED_CODEC (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VIDEO_POP_THE_VIDEO_CODEC_IS_NOT_SUPPORTED"))
#define VP_PLAY_STRING_VIDEO_CANNOT_PLAY (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VIDEO_HEADER_CANNOT_PLAY_VIDEO_ABB"))
#define VP_PLAY_STRING_DETAIL_VALUE_UNKNOWN ("Unknown")
#define VP_PLAY_STRING_DETAIL_LAST_MODIFIED (dgettext(VP_LOCAL_STR_PREFIX, "IDS_VIDEO_HEADER_LAST_MODIFIED_M_DATE"))
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
/* SYSTEM KEY VALUE */
#define VP_PAUSE_KEY "XF86AudioPause"
#define VP_POPUP_MAX_HEIGHT 290
#define VP_POPUP_NO_TITLE_MAX_HEIGHT (VP_POPUP_MAX_HEIGHT-VP_POPUP_TITLE_HEIGHT)
-#define VP_POPUP_HEIGHT(height) (((height) > VP_POPUP_NO_TITLE_MAX_HEIGHT) ? (VP_POPUP_NO_TITLE_MAX_HEIGHT) : (height))
-#define VP_POPUP_LIST_HEIGHT(count) 45*count
-#define VP_POPUP_LIST_2_TEXT_HEIGHT(count) (((140*count) > VP_POPUP_NO_TITLE_MAX_HEIGHT) ? (VP_POPUP_NO_TITLE_MAX_HEIGHT) : (140*count))
-#define VP_POPUP_LIST_2_TEXT_1_ICON_HEIGHT(count) (((135*count-1) > VP_POPUP_NO_TITLE_MAX_HEIGHT) ? (VP_POPUP_NO_TITLE_MAX_HEIGHT) : (135*count-1))
-#define VP_POPUP_LOADING_LIST_HEIGHT(count) (((140*count+VP_POPUP_LIST_LOADING_HEIGHT) > 840) ? 840/*common box height video,gallery,image viewer (1080+VP_POPUP_LIST_LOADING_HEIGHT)*/ : (140*count+VP_POPUP_LIST_LOADING_HEIGHT))
-#define VP_POPUP_SUBTITLE_2_TEXT_HEIGHT(count) (((135*count-1) > VP_POPUP_NO_TITLE_MAX_HEIGHT) ? (VP_POPUP_NO_TITLE_MAX_HEIGHT) : (135*count-1))
-#define VP_POPUP_LIST_2_TEXT_HEIGHT_DETAIL(count) (((134*count-1) > VP_POPUP_NO_TITLE_MAX_HEIGHT) ? (VP_POPUP_NO_TITLE_MAX_HEIGHT) : (135*count-1))
+#define VP_POPUP_HEIGHT(height) (((height) > VP_POPUP_NO_TITLE_MAX_HEIGHT) ? (VP_POPUP_NO_TITLE_MAX_HEIGHT) : (height))
+#define VP_POPUP_LIST_HEIGHT(count) 45*count
+#define VP_POPUP_LIST_2_TEXT_HEIGHT(count) (((140*count) > VP_POPUP_NO_TITLE_MAX_HEIGHT) ? (VP_POPUP_NO_TITLE_MAX_HEIGHT) : (140*count))
+#define VP_POPUP_LIST_2_TEXT_1_ICON_HEIGHT(count) (((135*count-1) > VP_POPUP_NO_TITLE_MAX_HEIGHT) ? (VP_POPUP_NO_TITLE_MAX_HEIGHT) : (135*count-1))
+#define VP_POPUP_LOADING_LIST_HEIGHT(count) (((140*count+VP_POPUP_LIST_LOADING_HEIGHT) > 840) ? 840/*common box height video,gallery,image viewer (1080+VP_POPUP_LIST_LOADING_HEIGHT)*/ : (140*count+VP_POPUP_LIST_LOADING_HEIGHT))
+#define VP_POPUP_SUBTITLE_2_TEXT_HEIGHT(count) (((135*count-1) > VP_POPUP_NO_TITLE_MAX_HEIGHT) ? (VP_POPUP_NO_TITLE_MAX_HEIGHT) : (135*count-1))
+#define VP_POPUP_LIST_2_TEXT_HEIGHT_DETAIL(count) (((134*count-1) > VP_POPUP_NO_TITLE_MAX_HEIGHT) ? (VP_POPUP_NO_TITLE_MAX_HEIGHT) : (135*count-1))
#define VP_POPUP_MAX_HEIGHT_L 255
#define VP_POPUP_NO_TITLE_MAX_HEIGHT_L (VP_POPUP_MAX_HEIGHT_L-VP_POPUP_TITLE_HEIGHT)
-#define VP_POPUP_HEIGHT_L(height) (((height) > VP_POPUP_NO_TITLE_MAX_HEIGHT_L) ? (VP_POPUP_NO_TITLE_MAX_HEIGHT_L) : (height))
-#define VP_POPUP_LIST_HEIGHT_L(count) 45*count
-#define VP_POPUP_LIST_2_TEXT_HEIGHT_L(count) (((140*count) > VP_POPUP_NO_TITLE_MAX_HEIGHT_L) ? (VP_POPUP_NO_TITLE_MAX_HEIGHT_L) : (140*count))
-#define VP_POPUP_LIST_2_TEXT_1_ICON_HEIGHT_L(count) (((135*count-1) > VP_POPUP_NO_TITLE_MAX_HEIGHT_L) ? (VP_POPUP_NO_TITLE_MAX_HEIGHT_L) : (135*count-1))
-#define VP_POPUP_LOADING_LIST_HEIGHT_L(count) (((140*count+VP_POPUP_LIST_LOADING_HEIGHT) > 468) ? 468/*common box height video,gallery,image viewer (520+VP_POPUP_LIST_LOADING_HEIGHT)*/ : (140*count+VP_POPUP_LIST_LOADING_HEIGHT))
-#define VP_POPUP_SUBTITLE_2_TEXT_HEIGHT_L(count) (((135*count-1) > VP_POPUP_NO_TITLE_MAX_HEIGHT_L) ? (VP_POPUP_NO_TITLE_MAX_HEIGHT_L) : (135*count-1))
-#define VP_POPUP_LIST_2_TEXT_HEIGHT_DETAIL_L(count) (((134*count-1) > VP_POPUP_NO_TITLE_MAX_HEIGHT_L) ? (VP_POPUP_NO_TITLE_MAX_HEIGHT_L) : (134*count-1))
+#define VP_POPUP_HEIGHT_L(height) (((height) > VP_POPUP_NO_TITLE_MAX_HEIGHT_L) ? (VP_POPUP_NO_TITLE_MAX_HEIGHT_L) : (height))
+#define VP_POPUP_LIST_HEIGHT_L(count) 45*count
+#define VP_POPUP_LIST_2_TEXT_HEIGHT_L(count) (((140*count) > VP_POPUP_NO_TITLE_MAX_HEIGHT_L) ? (VP_POPUP_NO_TITLE_MAX_HEIGHT_L) : (140*count))
+#define VP_POPUP_LIST_2_TEXT_1_ICON_HEIGHT_L(count) (((135*count-1) > VP_POPUP_NO_TITLE_MAX_HEIGHT_L) ? (VP_POPUP_NO_TITLE_MAX_HEIGHT_L) : (135*count-1))
+#define VP_POPUP_LOADING_LIST_HEIGHT_L(count) (((140*count+VP_POPUP_LIST_LOADING_HEIGHT) > 468) ? 468/*common box height video,gallery,image viewer (520+VP_POPUP_LIST_LOADING_HEIGHT)*/ : (140*count+VP_POPUP_LIST_LOADING_HEIGHT))
+#define VP_POPUP_SUBTITLE_2_TEXT_HEIGHT_L(count) (((135*count-1) > VP_POPUP_NO_TITLE_MAX_HEIGHT_L) ? (VP_POPUP_NO_TITLE_MAX_HEIGHT_L) : (135*count-1))
+#define VP_POPUP_LIST_2_TEXT_HEIGHT_DETAIL_L(count) (((134*count-1) > VP_POPUP_NO_TITLE_MAX_HEIGHT_L) ? (VP_POPUP_NO_TITLE_MAX_HEIGHT_L) : (134*count-1))
#define VP_POPUP_LIST_WIDTH 200
-#define PROGRESSBAR_TIME_LENGTH 9
-#define PROGRESSBAR_TIME_FORMAT "02u:%02u:%02u"
+#define PROGRESSBAR_TIME_LENGTH 9
+#define PROGRESSBAR_TIME_FORMAT "02u:%02u:%02u"
#define PROGRESSBAR_TIME_ARGS(t) \
- (t) / (60 * 60), \
- ((t) / 60) % 60, \
- (t) % 60
+ (t) / (60 * 60), \
+ ((t) / 60) % 60, \
+ (t) % 60
#define VP_ACCUMULATED_DATE 86400
#define VP_SUBTITLE_SIZE_MEDIUM_VALUE 32
#define VP_SUBTITLE_SIZE_LARGE_VALUE 40
-#define BYTE_SIZE 1024
-#define VP_MB(x) ((x) << 20)
+#define BYTE_SIZE 1024
+#define VP_MB(x) ((x) << 20)
#define VP_FILE_ENTRY_LEN_MAX 255
#define VP_FILE_ENTRY_CHAR_LEN_MAX 50
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include "vp-play-view-priv.h"
#include "vp-mm-player.h"
-typedef enum
-{
+extern bool stay_pause;
+
+typedef enum {
VP_PLAY_NORMAL_VIEW_POPUP_NONE = 0,
VP_PLAY_NORMAL_VIEW_CTX_POPUP,
VP_PLAY_NORMAL_VIEW_OTHER_POPUP,
-}vp_normalview_popup_style_e;
+} vp_normalview_popup_style_e;
typedef void *normal_view_handle;
typedef void (*vp_normal_view_state_cb) (void *pUserData, int nState);
-normal_view_handle vp_play_normal_view_create(PlayView *pPlayView, video_play_launching_type_t nLaunchingType);
+normal_view_handle vp_play_normal_view_create(PlayView * pPlayView,
+ video_play_launching_type_t
+ nLaunchingType);
void vp_play_normal_view_destroy(normal_view_handle pViewHandle);
bool vp_play_normal_view_realize(normal_view_handle pViewHandle);
bool vp_play_normal_view_unrealize(normal_view_handle pViewHandle);
-bool vp_play_normal_view_is_realize(normal_view_handle pViewHandle, bool *bIsRealize);
+bool vp_play_normal_view_is_realize(normal_view_handle pViewHandle,
+ bool * bIsRealize);
bool vp_play_normal_view_pause(normal_view_handle pViewHandle);
bool vp_play_normal_view_resume(normal_view_handle pViewHandle);
bool vp_play_normal_view_resume_or_pause(normal_view_handle pViewHandle);
bool vp_play_normal_view_next_play(normal_view_handle pViewHandle);
bool vp_play_normal_view_prev_play(normal_view_handle pViewHandle);
-bool vp_play_normal_view_set_url(normal_view_handle pViewHandle, const char *szMediaURL);
-bool vp_play_normal_view_set_video_only(normal_view_handle pViewHandle, bool bVideoOnly);
-bool vp_play_normal_view_get_video_only(normal_view_handle pViewHandle, bool *bVideoOnly);
-bool vp_play_normal_view_set_device_unplug_interrupt(normal_view_handle pViewHandle, bool bDeviceUnplugInterrupt);
-bool vp_play_normal_view_set_rotate(normal_view_handle pViewHandle, video_play_rotate_t nRotate, bool bLayoutHide);
-bool vp_play_normal_view_set_launching_mode(normal_view_handle pViewHandle, video_play_launching_type_t nLaunchingType);
-bool vp_play_normal_view_set_start_position(normal_view_handle pViewHandle, int nStartPosition);
-bool vp_play_normal_view_get_last_position(normal_view_handle pViewHandle, int *nCurPos);
-bool vp_play_normal_view_set_update_last_position(normal_view_handle pViewHandle);
-bool vp_play_normal_view_set_subtitle(normal_view_handle pViewHandle, char *szSubtitle);
-bool vp_play_normal_view_get_subtitle(normal_view_handle pViewHandle, char **szSubtitle);
-bool vp_play_normal_view_get_audio_track(normal_view_handle pViewHandle, int *nAudioTrack);
-bool vp_play_normal_view_get_video_duration(normal_view_handle pViewHandle, int *nDuration);
-bool vp_play_normal_view_set_audio_track(normal_view_handle pViewHandle, int nAudioTrack);
-bool vp_play_normal_view_set_manual_pause(normal_view_handle pViewHandle, bool bStartPause);
-bool vp_play_normal_view_get_manual_pause(normal_view_handle pViewHandle, bool *bManualPause);
-bool vp_play_normal_view_get_pause_status(normal_view_handle pViewHandle, bool *bPause);
+bool vp_play_normal_view_set_url(normal_view_handle pViewHandle,
+ const char *szMediaURL);
+bool vp_play_normal_view_set_video_only(normal_view_handle pViewHandle,
+ bool bVideoOnly);
+bool vp_play_normal_view_get_video_only(normal_view_handle pViewHandle,
+ bool * bVideoOnly);
+bool vp_play_normal_view_set_device_unplug_interrupt(normal_view_handle
+ pViewHandle,
+ bool
+ bDeviceUnplugInterrupt);
+bool vp_play_normal_view_set_rotate(normal_view_handle pViewHandle,
+ video_play_rotate_t nRotate,
+ bool bLayoutHide);
+bool vp_play_normal_view_set_launching_mode(normal_view_handle pViewHandle,
+ video_play_launching_type_t
+ nLaunchingType);
+bool vp_play_normal_view_set_start_position(normal_view_handle pViewHandle,
+ int nStartPosition);
+bool vp_play_normal_view_get_last_position(normal_view_handle pViewHandle,
+ int *nCurPos);
+bool vp_play_normal_view_set_update_last_position(normal_view_handle
+ pViewHandle);
+bool vp_play_normal_view_set_subtitle(normal_view_handle pViewHandle,
+ char *szSubtitle);
+bool vp_play_normal_view_get_subtitle(normal_view_handle pViewHandle,
+ char **szSubtitle);
+bool vp_play_normal_view_get_audio_track(normal_view_handle pViewHandle,
+ int *nAudioTrack);
+bool vp_play_normal_view_get_video_duration(normal_view_handle pViewHandle,
+ int *nDuration);
+bool vp_play_normal_view_set_audio_track(normal_view_handle pViewHandle,
+ int nAudioTrack);
+bool vp_play_normal_view_set_manual_pause(normal_view_handle pViewHandle,
+ bool bStartPause);
+bool vp_play_normal_view_get_manual_pause(normal_view_handle pViewHandle,
+ bool * bManualPause);
+bool vp_play_normal_view_get_pause_status(normal_view_handle pViewHandle,
+ bool * bPause);
void vp_play_normal_check_detail_view(normal_view_handle pViewHandle);
-bool vp_play_normal_view_get_sound_filter(normal_view_handle pViewHandle, video_sound_alive_t *nSoundAlive);
-bool vp_play_normal_view_set_sound_filter(normal_view_handle pViewHandle, video_sound_alive_t nSoundAlive);
+bool vp_play_normal_view_get_sound_filter(normal_view_handle pViewHandle,
+ video_sound_alive_t *
+ nSoundAlive);
+bool vp_play_normal_view_set_sound_filter(normal_view_handle pViewHandle,
+ video_sound_alive_t nSoundAlive);
bool vp_play_normal_view_update(normal_view_handle pViewHandle);
bool vp_play_normal_view_rotate_update(normal_view_handle pViewHandle);
-bool vp_play_normal_view_set_share_panel_state(normal_view_handle pViewHandle);
+bool vp_play_normal_view_set_share_panel_state(normal_view_handle
+ pViewHandle);
bool vp_play_normal_view_on_more_menu(normal_view_handle pViewHandle);
bool vp_play_normal_view_volume_increase(normal_view_handle pViewHandle);
bool vp_play_normal_view_volume_decrease(normal_view_handle pViewHandle);
bool vp_play_normal_view_volume_mute(normal_view_handle pViewHandle);
bool vp_play_normal_view_volume_update(normal_view_handle pViewHandle);
-bool vp_play_normal_view_set_lock_screen(normal_view_handle pViewHandle, bool bLock);
-bool vp_play_normal_view_get_lock_screen(normal_view_handle pViewHandle, bool *bLock);
+bool vp_play_normal_view_set_lock_screen(normal_view_handle pViewHandle,
+ bool bLock);
+bool vp_play_normal_view_get_lock_screen(normal_view_handle pViewHandle,
+ bool * bLock);
void vp_play_normal_view_hide_sound_popup(normal_view_handle pViewHandle);
-void vp_play_normal_view_web_type_disconnect(normal_view_handle pViewHandle);
-void vp_play_normal_view_web_type_reconnect(normal_view_handle pViewHandle);
-void vp_play_normal_view_ff_rew_keyboard_longpress_event_cb(normal_view_handle pViewHandle, bool bRelease, bool bFFseek);
-bool vp_play_normal_view_get_volume_state(normal_view_handle *pViewHandle);
-bool vp_play_normal_view_get_main_layout_show_state(normal_view_handle *pViewHandle);
-vp_normalview_popup_style_e vp_play_normal_view_get_popup_show_state(normal_view_handle *pViewHandle);
-bool vp_play_normal_view_set_tagbuddy_on(normal_view_handle pViewHandle, bool bTagBuddyOn);
+void vp_play_normal_view_web_type_disconnect(normal_view_handle
+ pViewHandle);
+void vp_play_normal_view_web_type_reconnect(normal_view_handle
+ pViewHandle);
+void
+vp_play_normal_view_ff_rew_keyboard_longpress_event_cb(normal_view_handle
+ pViewHandle,
+ bool bRelease,
+ bool bFFseek);
+bool vp_play_normal_view_get_volume_state(normal_view_handle *
+ pViewHandle);
+bool vp_play_normal_view_get_main_layout_show_state(normal_view_handle *
+ pViewHandle);
+vp_normalview_popup_style_e
+vp_play_normal_view_get_popup_show_state(normal_view_handle * pViewHandle);
+bool vp_play_normal_view_set_tagbuddy_on(normal_view_handle pViewHandle,
+ bool bTagBuddyOn);
void vp_play_normal_view_show_volume_popup(void *pPlayview);
void vp_play_normal_view_pause_player(void *pPlayview);
void vp_play_normal_view_play_player(void *pPlayview);
-void vp_play_normal_view_key_create(PlayView *pPlayView, normal_view_handle pViewHandle);
-bool vp_play_normal_view_player_state_changed_get(normal_view_handle pViewHandle);
+void vp_play_normal_view_key_create(PlayView * pPlayView,
+ normal_view_handle pViewHandle);
+bool vp_play_normal_view_player_state_changed_get(normal_view_handle
+ pViewHandle);
bool vp_play_normal_view_stop_player(normal_view_handle pViewHandle);
bool vp_play_normal_view_play_start(normal_view_handle pViewHandle);
//Focus UI
-void vp_play_normal_view_set_main_layout_focus_out(normal_view_handle *pViewHandle);
-void vp_play_normal_view_set_main_layout_focus_in(normal_view_handle *pViewHandle);
-bool vp_play_normal_view_get_main_layout_focus_state(normal_view_handle *pViewHandle);
-void vp_play_normal_view_show_main_layout(normal_view_handle *pViewHandle);
-void vp_play_normal_view_set_resume_or_pause(normal_view_handle *pViewHandle);
-void vp_play_normal_view_create_main_layout_hide_timer(normal_view_handle *pViewHandle);
+void vp_play_normal_view_set_main_layout_focus_out(normal_view_handle *
+ pViewHandle);
+void vp_play_normal_view_set_main_layout_focus_in(normal_view_handle *
+ pViewHandle);
+bool vp_play_normal_view_get_main_layout_focus_state(normal_view_handle *
+ pViewHandle);
+void vp_play_normal_view_show_main_layout(normal_view_handle *
+ pViewHandle);
+void vp_play_normal_view_set_resume_or_pause(normal_view_handle *
+ pViewHandle);
+void vp_play_normal_view_create_main_layout_hide_timer(normal_view_handle *
+ pViewHandle);
//for minicontroller
bool vp_controller_play_normal_view_pause(normal_view_handle pViewHandle);
bool vp_controller_play_normal_view_resume(normal_view_handle pViewHandle);
-bool vp_controller_play_normal_view_next_play(normal_view_handle pViewHandle);
-bool vp_controller_play_normal_view_prev_play(normal_view_handle pViewHandle);
-char *vp_controller_normal_view_get_thumbnail(normal_view_handle pViewHandle);
+bool vp_controller_play_normal_view_next_play(normal_view_handle
+ pViewHandle);
+bool vp_controller_play_normal_view_prev_play(normal_view_handle
+ pViewHandle);
+char *vp_controller_normal_view_get_thumbnail(normal_view_handle
+ pViewHandle);
char *vp_controller_normal_view_get_title(normal_view_handle pViewHandle);
int vp_controller_normal_view_get_duration(normal_view_handle pViewHandle);
bool vp_controller_normal_view_pop_view(normal_view_handle pViewHandle);
-int vp_controller_normal_view_get_played_state(normal_view_handle pViewHandle);
-bool vp_controller_normal_view_add_played_state_cb(normal_view_handle pViewHandle, vp_normal_view_state_cb fState_cb);
+int vp_controller_normal_view_get_played_state(normal_view_handle
+ pViewHandle);
+bool vp_controller_normal_view_add_played_state_cb(normal_view_handle
+ pViewHandle,
+ vp_normal_view_state_cb
+ fState_cb);
bool vp_normal_rotate_icon_timer_cb(void *pUserData);
//db
void vp_play_normal_view_db_change(normal_view_handle pViewHandle);
-vp_mm_player_state_t vp_play_normal_view_get_player_state(PlayView *pPlayView);
-void vp_play_normal_view_on_controller_button_press(void *pUserData, int btn);
-bool vp_play_normal_view_is_audio_only(PlayView *pPlayView);
+vp_mm_player_state_t vp_play_normal_view_get_player_state(PlayView *
+ pPlayView);
+void vp_play_normal_view_on_controller_button_press(void *pUserData,
+ int btn);
+bool vp_play_normal_view_is_audio_only(PlayView * pPlayView);
+bool vp_play_normal_view_reset_audio_only(normal_view_handle *
+ pNormalView);
+bool vp_play_normal_view_handle_language_change(normal_view_handle
+ *pViewHandle);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include "vp-play-view-priv.h"
-typedef enum
-{
+typedef enum {
VP_PLAY_NORMAL_VIEW_POPUP_NONE = 0,
VP_PLAY_NORMAL_VIEW_CTX_POPUP,
VP_PLAY_NORMAL_VIEW_OTHER_POPUP,
-}vp_normalview_popup_style_e;
+} vp_normalview_popup_style_e;
typedef void *normal_view_handle;
typedef void (*vp_normal_view_state_cb) (void *pUserData, int nState);
-normal_view_handle vp_play_normal_view_create(PlayView *pPlayView, video_play_launching_type_t nLaunchingType);
+normal_view_handle vp_play_normal_view_create(PlayView * pPlayView,
+ video_play_launching_type_t
+ nLaunchingType);
void vp_play_normal_view_destroy(normal_view_handle pViewHandle);
bool vp_play_normal_view_realize(normal_view_handle pViewHandle);
bool vp_play_normal_view_unrealize(normal_view_handle pViewHandle);
-bool vp_play_normal_view_is_realize(normal_view_handle pViewHandle, bool *bIsRealize);
+bool vp_play_normal_view_is_realize(normal_view_handle pViewHandle,
+ bool * bIsRealize);
bool vp_play_normal_view_pause(normal_view_handle pViewHandle);
bool vp_play_normal_view_resume(normal_view_handle pViewHandle);
bool vp_play_normal_view_resume_or_pause(normal_view_handle pViewHandle);
bool vp_play_normal_view_next_play(normal_view_handle pViewHandle);
bool vp_play_normal_view_prev_play(normal_view_handle pViewHandle);
-bool vp_play_normal_view_set_url(normal_view_handle pViewHandle, const char *szMediaURL);
-bool vp_play_normal_view_set_video_only(normal_view_handle pViewHandle, bool bVideoOnly);
-bool vp_play_normal_view_get_video_only(normal_view_handle pViewHandle, bool *bVideoOnly);
-bool vp_play_normal_view_set_device_unplug_interrupt(normal_view_handle pViewHandle, bool bDeviceUnplugInterrupt);
-bool vp_play_normal_view_set_rotate(normal_view_handle pViewHandle, video_play_rotate_t nRotate, bool bLayoutHide);
-bool vp_play_normal_view_set_launching_mode(normal_view_handle pViewHandle, video_play_launching_type_t nLaunchingType);
-bool vp_play_normal_view_set_start_position(normal_view_handle pViewHandle, int nStartPosition);
-bool vp_play_normal_view_get_last_position(normal_view_handle pViewHandle, int *nCurPos);
-bool vp_play_normal_view_set_update_last_position(normal_view_handle pViewHandle);
-bool vp_play_normal_view_set_subtitle(normal_view_handle pViewHandle, char *szSubtitle);
-bool vp_play_normal_view_get_subtitle(normal_view_handle pViewHandle, char **szSubtitle);
-bool vp_play_normal_view_get_audio_track(normal_view_handle pViewHandle, int *nAudioTrack);
-bool vp_play_normal_view_set_audio_track(normal_view_handle pViewHandle, int nAudioTrack);
-bool vp_play_normal_view_set_manual_pause(normal_view_handle pViewHandle, bool bStartPause);
-bool vp_play_normal_view_get_manual_pause(normal_view_handle pViewHandle, bool *bManualPause);
-bool vp_play_normal_view_get_pause_status(normal_view_handle pViewHandle, bool *bPause);
-bool vp_play_normal_view_get_sound_filter(normal_view_handle pViewHandle, video_sound_alive_t *nSoundAlive);
-bool vp_play_normal_view_set_sound_filter(normal_view_handle pViewHandle, video_sound_alive_t nSoundAlive);
+bool vp_play_normal_view_set_url(normal_view_handle pViewHandle,
+ const char *szMediaURL);
+bool vp_play_normal_view_set_video_only(normal_view_handle pViewHandle,
+ bool bVideoOnly);
+bool vp_play_normal_view_get_video_only(normal_view_handle pViewHandle,
+ bool * bVideoOnly);
+bool vp_play_normal_view_set_device_unplug_interrupt(normal_view_handle
+ pViewHandle,
+ bool
+ bDeviceUnplugInterrupt);
+bool vp_play_normal_view_set_rotate(normal_view_handle pViewHandle,
+ video_play_rotate_t nRotate,
+ bool bLayoutHide);
+bool vp_play_normal_view_set_launching_mode(normal_view_handle pViewHandle,
+ video_play_launching_type_t
+ nLaunchingType);
+bool vp_play_normal_view_set_start_position(normal_view_handle pViewHandle,
+ int nStartPosition);
+bool vp_play_normal_view_get_last_position(normal_view_handle pViewHandle,
+ int *nCurPos);
+bool vp_play_normal_view_set_update_last_position(normal_view_handle
+ pViewHandle);
+bool vp_play_normal_view_set_subtitle(normal_view_handle pViewHandle,
+ char *szSubtitle);
+bool vp_play_normal_view_get_subtitle(normal_view_handle pViewHandle,
+ char **szSubtitle);
+bool vp_play_normal_view_get_audio_track(normal_view_handle pViewHandle,
+ int *nAudioTrack);
+bool vp_play_normal_view_set_audio_track(normal_view_handle pViewHandle,
+ int nAudioTrack);
+bool vp_play_normal_view_set_manual_pause(normal_view_handle pViewHandle,
+ bool bStartPause);
+bool vp_play_normal_view_get_manual_pause(normal_view_handle pViewHandle,
+ bool * bManualPause);
+bool vp_play_normal_view_get_pause_status(normal_view_handle pViewHandle,
+ bool * bPause);
+bool vp_play_normal_view_get_sound_filter(normal_view_handle pViewHandle,
+ video_sound_alive_t *
+ nSoundAlive);
+bool vp_play_normal_view_set_sound_filter(normal_view_handle pViewHandle,
+ video_sound_alive_t nSoundAlive);
bool vp_play_normal_view_update(normal_view_handle pViewHandle);
bool vp_play_normal_view_rotate_update(normal_view_handle pViewHandle);
-bool vp_play_normal_view_set_share_panel_state(normal_view_handle pViewHandle);
+bool vp_play_normal_view_set_share_panel_state(normal_view_handle
+ pViewHandle);
bool vp_play_normal_view_on_more_menu(normal_view_handle pViewHandle);
bool vp_play_normal_view_volume_increase(normal_view_handle pViewHandle);
bool vp_play_normal_view_volume_decrease(normal_view_handle pViewHandle);
bool vp_play_normal_view_volume_mute(normal_view_handle pViewHandle);
bool vp_play_normal_view_volume_update(normal_view_handle pViewHandle);
-bool vp_play_normal_view_set_lock_screen(normal_view_handle pViewHandle, bool bLock);
-bool vp_play_normal_view_get_lock_screen(normal_view_handle pViewHandle, bool *bLock);
+bool vp_play_normal_view_set_lock_screen(normal_view_handle pViewHandle,
+ bool bLock);
+bool vp_play_normal_view_get_lock_screen(normal_view_handle pViewHandle,
+ bool * bLock);
void vp_play_normal_view_hide_sound_popup(normal_view_handle pViewHandle);
-void vp_play_normal_view_web_type_disconnect(normal_view_handle pViewHandle);
-void vp_play_normal_view_web_type_reconnect(normal_view_handle pViewHandle);
-void vp_play_normal_view_ff_rew_keyboard_longpress_event_cb(normal_view_handle pViewHandle, bool bRelease, bool bFFseek);
-bool vp_play_normal_view_get_volume_state(normal_view_handle *pViewHandle);
-bool vp_play_normal_view_get_main_layout_show_state(normal_view_handle *pViewHandle);
-vp_normalview_popup_style_e vp_play_normal_view_get_popup_show_state(normal_view_handle *pViewHandle);
-bool vp_play_normal_view_set_tagbuddy_on(normal_view_handle pViewHandle, bool bTagBuddyOn);
+void vp_play_normal_view_web_type_disconnect(normal_view_handle
+ pViewHandle);
+void vp_play_normal_view_web_type_reconnect(normal_view_handle
+ pViewHandle);
+void
+vp_play_normal_view_ff_rew_keyboard_longpress_event_cb(normal_view_handle
+ pViewHandle,
+ bool bRelease,
+ bool bFFseek);
+bool vp_play_normal_view_get_volume_state(normal_view_handle *
+ pViewHandle);
+bool vp_play_normal_view_get_main_layout_show_state(normal_view_handle *
+ pViewHandle);
+vp_normalview_popup_style_e
+vp_play_normal_view_get_popup_show_state(normal_view_handle * pViewHandle);
+bool vp_play_normal_view_set_tagbuddy_on(normal_view_handle pViewHandle,
+ bool bTagBuddyOn);
void vp_play_normal_view_show_volume_popup(void *pPlayview);
void vp_play_normal_view_pause_player(void *pPlayview);
-void vp_play_normal_view_key_create(PlayView *pPlayView, normal_view_handle pViewHandle);
-bool vp_play_normal_view_player_state_changed_get(normal_view_handle pViewHandle);
+void vp_play_normal_view_key_create(PlayView * pPlayView,
+ normal_view_handle pViewHandle);
+bool vp_play_normal_view_player_state_changed_get(normal_view_handle
+ pViewHandle);
//Focus UI
-void vp_play_normal_view_set_main_layout_focus_out(normal_view_handle *pViewHandle);
-void vp_play_normal_view_set_main_layout_focus_in(normal_view_handle *pViewHandle);
-bool vp_play_normal_view_get_main_layout_focus_state(normal_view_handle *pViewHandle);
-void vp_play_normal_view_show_main_layout(normal_view_handle *pViewHandle);
-void vp_play_normal_view_set_resume_or_pause(normal_view_handle *pViewHandle);
-void vp_play_normal_view_create_main_layout_hide_timer(normal_view_handle *pViewHandle);
+void vp_play_normal_view_set_main_layout_focus_out(normal_view_handle *
+ pViewHandle);
+void vp_play_normal_view_set_main_layout_focus_in(normal_view_handle *
+ pViewHandle);
+bool vp_play_normal_view_get_main_layout_focus_state(normal_view_handle *
+ pViewHandle);
+void vp_play_normal_view_show_main_layout(normal_view_handle *
+ pViewHandle);
+void vp_play_normal_view_set_resume_or_pause(normal_view_handle *
+ pViewHandle);
+void vp_play_normal_view_create_main_layout_hide_timer(normal_view_handle *
+ pViewHandle);
-bool vp_play_normal_view_set_share_state(normal_view_handle pViewHandle, bool bState);
-bool vp_play_normal_view_get_share_state(normal_view_handle pViewHandle, bool *bState);
+bool vp_play_normal_view_set_share_state(normal_view_handle pViewHandle,
+ bool bState);
+bool vp_play_normal_view_get_share_state(normal_view_handle pViewHandle,
+ bool * bState);
//for minicontroller
bool vp_controller_play_normal_view_pause(normal_view_handle pViewHandle);
bool vp_controller_play_normal_view_resume(normal_view_handle pViewHandle);
-bool vp_controller_play_normal_view_next_play(normal_view_handle pViewHandle);
-bool vp_controller_play_normal_view_prev_play(normal_view_handle pViewHandle);
-char *vp_controller_normal_view_get_thumbnail(normal_view_handle pViewHandle);
+bool vp_controller_play_normal_view_next_play(normal_view_handle
+ pViewHandle);
+bool vp_controller_play_normal_view_prev_play(normal_view_handle
+ pViewHandle);
+char *vp_controller_normal_view_get_thumbnail(normal_view_handle
+ pViewHandle);
char *vp_controller_normal_view_get_title(normal_view_handle pViewHandle);
int vp_controller_normal_view_get_duration(normal_view_handle pViewHandle);
bool vp_controller_normal_view_pop_view(normal_view_handle pViewHandle);
-int vp_controller_normal_view_get_played_state(normal_view_handle pViewHandle);
-bool vp_controller_normal_view_add_played_state_cb(normal_view_handle pViewHandle, vp_normal_view_state_cb fState_cb);
+int vp_controller_normal_view_get_played_state(normal_view_handle
+ pViewHandle);
+bool vp_controller_normal_view_add_played_state_cb(normal_view_handle
+ pViewHandle,
+ vp_normal_view_state_cb
+ fState_cb);
//db
void vp_play_normal_view_db_change(normal_view_handle pViewHandle);
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include "vp-play-type-define.h"
typedef struct _PlayViewFunc {
- void (*vp_play_func_change_mode) (void *pViewHandle, video_play_mode_t nMode, const char *szMediaURL, int nStartPos, bool bManualPause);
- void (*vp_play_func_exit) (void *pViewHandle);
-}PlayViewFunc;
+ void (*vp_play_func_change_mode) (void *pViewHandle,
+ video_play_mode_t nMode,
+ const char *szMediaURL,
+ int nStartPos, bool bManualPause);
+ void (*vp_play_func_exit) (void *pViewHandle);
+} PlayViewFunc;
typedef struct _PlayViewCbFunc {
- vp_play_view_realize_cb pRealizeCb;
- vp_play_view_destroy_cb pDestroyCb;
- vp_play_view_event_key_down_cb pEventKeyDown;
- vp_play_view_event_key_up_cb pEventKeyUp;
-}PlayViewCbFunc;
+ vp_play_view_realize_cb pRealizeCb;
+ vp_play_view_destroy_cb pDestroyCb;
+ vp_play_view_event_key_down_cb pEventKeyDown;
+ vp_play_view_event_key_up_cb pEventKeyUp;
+} PlayViewCbFunc;
typedef struct _PlayView {
- Evas_Object *pParent;
- Evas_Object *pWin;
- Ecore_X_Window nXwinID;
- Ecore_X_Window nCallerXwinID;
-
- bool bAVRCP;
- bool bWifi;
- bool bIsPlayBeforeShare;
- bool bIsSharePopup;
- bool telinit;
-
- bool bStoreDownload;
- bool bStopAfterRepeat;
- double dStoreDL_FileSize;
- char *pStoreOrderId;
- char *pStoreServerId;
- char *pStoreAppId;
- char *pStoreMvId;
-
- char *szCookie;
- char *szProxy;
-
- Evas_Object *pBackground;
- Evas_Object *pRenderRect;
- Evas_Object *pConformant;
- Evas_Object *pMainLayout;
- Evas_Object *pNaviframe;
-
- Ecore_Event_Handler *pKeyEventDown;
- Ecore_Event_Handler *pKeyEventUp;
- Ecore_Event_Handler *pFocusIn;
- Ecore_Event_Handler *pFocusOut;
- Ecore_Event_Handler *pVisiblility;
- Ecore_Event_Handler *pClientMessage;
- Ecore_Event_Handler *pDeleteRequest;
- Ecore_Event_Handler *pPropertyHandler;
- Ecore_Event_Handler *pMouseInHandler;
- Ecore_Event_Handler *pMouseOutHandler;
- Ecore_Event_Handler *pCallerWinEventHandler;
- Ecore_Event_Handler *pPalmHoldEventHandler;
-
- Ecore_Pipe *pNotiPipe;
-
- Ecore_Timer *pSbeamTimer;
- Ecore_Timer *pVolumeTimer;
- Ecore_Idler *pHideIdler; //used for hide win
-
- bool bVolumeIncrease;
- bool bViewChange;
- bool bMouseOut;
- bool bVisible;
- Ecore_Timer *pMediaLongPressTimer;
- Ecore_Timer *pMediaKeyTimer;
- int nMediaKeyPressCount;
-
- void *pUserData;
-
- void *pNormalView;
- void *pMultiView;
-
- void *pSmartPause;
- Ecore_Timer *pSmartPauseStartTimer;
- Ecore_Timer *pSmartPauseEndTimer;
-
- void *pSensorHandle;
- void *pSensorPopup;
-
- GList *pMultiPathList;
-
- char *szMediaURL;
- char *szMediaTitle;
- char *szDeviceID;
- char *szAutoPlay;
- char *szDMRID;
-
- int nStartPosition;
- int nDuration;
- bool bStartPause;
- bool bRealized;
- bool bActivate;
- bool bDestroy;
-
- int nAudioIndex;
- char *szSubtitleURL;
- bool bManualAppPause;
-
- video_play_mode_t nPlayMode;
- video_play_launching_type_t nLaunchingType;
- video_play_rotate_t nRotate;
- video_sound_alive_t nSoundAlive;
- video_play_list_type_t nListType;
- sound_stream_info_h stream_info;
-
- bool reacquire_state;
- bool bPopupMode;
- bool bTrimExit;
- bool bRelaunchCaller;
-
- PlayViewCbFunc *pCallback;
- PlayViewFunc *pFunc;
-
- void *pHollICHandle;
- bool bKeySpeed;
- bool bAudioOnly;
- double fPlaySpeed;
- float fSubtitleSyncValue;
-
- Ecore_Timer *pHwKeyLongPressTimer;// for longpress HW key
- Ecore_Timer *pDbUpdateTimer; //db Update
- connection_h connection;
-
- /*minicontroller*/
+ Evas_Object *pParent;
+ Evas_Object *pWin;
+ Ecore_X_Window nXwinID;
+ Ecore_X_Window nCallerXwinID;
+
+ bool bAVRCP;
+ bool bWifi;
+ bool bIsPlayBeforeShare;
+ bool bIsSharePopup;
+ bool telinit;
+
+ bool bStoreDownload;
+ bool bStopAfterRepeat;
+ double dStoreDL_FileSize;
+ char *pStoreOrderId;
+ char *pStoreServerId;
+ char *pStoreAppId;
+ char *pStoreMvId;
+
+ char *szCookie;
+ char *szProxy;
+
+ Evas_Object *pBackground;
+ Evas_Object *pRenderRect;
+ Evas_Object *pConformant;
+ Evas_Object *pMainLayout;
+ Evas_Object *pNaviframe;
+
+ Ecore_Event_Handler *pKeyEventDown;
+ Ecore_Event_Handler *pKeyEventUp;
+ Ecore_Event_Handler *pFocusIn;
+ Ecore_Event_Handler *pFocusOut;
+ Ecore_Event_Handler *pVisiblility;
+ Ecore_Event_Handler *pClientMessage;
+ Ecore_Event_Handler *pDeleteRequest;
+ Ecore_Event_Handler *pPropertyHandler;
+ Ecore_Event_Handler *pMouseInHandler;
+ Ecore_Event_Handler *pMouseOutHandler;
+ Ecore_Event_Handler *pCallerWinEventHandler;
+ Ecore_Event_Handler *pPalmHoldEventHandler;
+
+ Ecore_Pipe *pNotiPipe;
+
+ Ecore_Timer *pSbeamTimer;
+ Ecore_Timer *pVolumeTimer;
+ Ecore_Idler *pHideIdler; //used for hide win
+
+ bool bVolumeIncrease;
+ bool bViewChange;
+ bool bMouseOut;
+ bool bVisible;
+ bool bResetPlaySpeed;
+ Ecore_Timer *pMediaLongPressTimer;
+ Ecore_Timer *pMediaKeyTimer;
+ int nMediaKeyPressCount;
+
+ void *pUserData;
+
+ void *pNormalView;
+ void *pMultiView;
+
+ void *pSmartPause;
+ Ecore_Timer *pSmartPauseStartTimer;
+ Ecore_Timer *pSmartPauseEndTimer;
+
+ void *pSensorHandle;
+ void *pSensorPopup;
+
+ GList *pMultiPathList;
+
+ char *szMediaURL;
+ char *szMediaTitle;
+ char *szDeviceID;
+ char *szAutoPlay;
+ char *szDMRID;
+
+ int nStartPosition;
+ int nDuration;
+ bool bStartPause;
+ bool bRealized;
+ bool bActivate;
+ bool bDestroy;
+
+ int nAudioIndex;
+ char *szSubtitleURL;
+ bool bManualAppPause;
+
+ video_play_mode_t nPlayMode;
+ video_play_launching_type_t nLaunchingType;
+ video_play_rotate_t nRotate;
+ video_sound_alive_t nSoundAlive;
+ video_play_list_type_t nListType;
+ sound_stream_info_h stream_info;
+
+ bool reacquire_state;
+ bool bPopupMode;
+ bool bTrimExit;
+ bool bRelaunchCaller;
+
+ PlayViewCbFunc *pCallback;
+ PlayViewFunc *pFunc;
+
+ void *pHollICHandle;
+ bool bKeySpeed;
+ bool bAudioOnly;
+ double fPlaySpeed;
+ float fSubtitleSyncValue;
+
+ Ecore_Timer *pHwKeyLongPressTimer; // for longpress HW key
+ Ecore_Timer *pDbUpdateTimer; //db Update
+ connection_h connection;
+
+ /*minicontroller */
Evas_Object *win_minicon;
Evas_Object *minicontroller_layout;
Evas_Object *minicon_icon;
bool b_minicontroller_show;
bool minicon_visible;
- /*lockscreen mini*/
+ /*lockscreen mini */
Evas_Object *win_lockmini;
Evas_Object *lockmini_layout;
Evas_Object *lsicon_icon;
app_control_h pServiceShare;
} PlayView;
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <math.h>
#include "vp-multi-path.h"
-//#include "VppDownload.h"
-
#include "vp-device-language.h"
/* check temp */
#define VP_NORMAL_PROGRESS_BAR_WIDTH_TERM 52 * elm_config_scale_get()
#define VP_NORMAL_HIDE_LAYOUT_TIMER_INTERVAL 5.0
-#define VP_NORMAL_HIDE_LAYOUT_FINISH_TIMER_INTERVAL 2.0 //3.0
-#define VP_NORMAL_WINDOW_LOAD_FINISH_TIMER_INTERVAL 1.5 //wait for window loaded
+#define VP_NORMAL_HIDE_LAYOUT_FINISH_TIMER_INTERVAL 2.0 //3.0
+#define VP_NORMAL_WINDOW_LOAD_FINISH_TIMER_INTERVAL 1.5 //wait for window loaded
#define VP_NORMAL_LONG_PRESS_TIMER_INTERVAL 1.0
#define VP_NORMAL_SUBTITLE_LONG_PRESS_TIMER_INTERVAL 0.5
#define VP_NORMAL_ALL_BUTTON_P_L 140
-#define VP_SUBTITLE_PORTRAIT_POSX 360
+#define VP_SUBTITLE_PORTRAIT_POSX 360
#define VP_SUBTITLE_PORTRAIT_POSY 1335
#define VP_SUBTITLE_LANDSCAPE_POSX 640
#define VP_SUBTITLE_LANDSCAPE_POSY 765
#define VP_NORMAL_DEFAULT_HEIGHT (800 * elm_config_scale_get())
#endif
+bool stay_pause = false;
+
typedef struct _ProgressMouseInfo {
- int nDownPosX;
+ int nDownPosX;
} ProgressMouseInfo;
typedef enum {
#endif
typedef struct _NormalView {
- PlayView *pPlayView;
- Ecore_X_Window nXwinID;
-
- Evas_Object *pNaviFrame;
- Elm_Object_Item *pNaviItem;
- Evas_Object *pMainEventRect;
- Evas_Object *pGestureRect;
- Evas_Object *pMainLayout;
+ PlayView *pPlayView;
+ Ecore_X_Window nXwinID;
+
+ Evas_Object *pNaviFrame;
+ Elm_Object_Item *pNaviItem;
+ Evas_Object *pMainEventRect;
+ Evas_Object *pGestureRect;
+ Evas_Object *pMainLayout;
#ifdef _NATIVE_BUFFER_SYNC
- Evas_Object *pVideoSink;
+ Evas_Object *pVideoSink;
#endif
- Evas_Object *pTopControlLayout;
- Evas_Object *pControlLayout;
- Evas_Object *pFunctionLayout;
+ Evas_Object *pTopControlLayout;
+ Evas_Object *pControlLayout;
+ Evas_Object *pFunctionLayout;
- Evas_Object *pNaviLeftBtn;
- Evas_Object *pNaviRightBtn;
+ Evas_Object *pNaviLeftBtn;
+ Evas_Object *pNaviRightBtn;
- Evas_Object *pSoundPathBtn;
- Evas_Object *pAllsharBtn;
+ Evas_Object *pSoundPathBtn;
+ Evas_Object *pAllsharBtn;
- Evas_Object *pMoreBtn;
- Evas_Object *pBackBtn;
+ Evas_Object *pMoreBtn;
+ Evas_Object *pBackBtn;
- Evas_Object *pCtxPopup;
+ Evas_Object *pCtxPopup;
- Evas_Object *pImageBufferObj;
+ Evas_Object *pImageBufferObj;
- Evas_Object *pRotateBtn;
- Evas_Object *pVolumeBtn;
- Evas_Object *pScreenSizeBtn;
- Evas_Object *pBookmarkBtn;
- Evas_Object *pMultiWinBtn;
- Evas_Object *pRepeatBtn;
- Evas_Object *pTrimBtn;
- Evas_Object *pSoundAliveBtn;
- Evas_Object *pShareBtn;
- Evas_Object *pLockBtn;
+ Evas_Object *pRotateBtn;
+ Evas_Object *pVolumeBtn;
+ Evas_Object *pScreenSizeBtn;
+ Evas_Object *pBookmarkBtn;
+ Evas_Object *pMultiWinBtn;
+ Evas_Object *pRepeatBtn;
+ Evas_Object *pTrimBtn;
+ Evas_Object *pSoundAliveBtn;
+ Evas_Object *pShareBtn;
+ Evas_Object *pLockBtn;
- Evas_Object *pResumeBtn;
- Evas_Object *pPauseBtn;
- Evas_Object *pPlayFocusBtn;
- Evas_Object *pPrevBtn;
- Evas_Object *pNextBtn;
+ Evas_Object *pResumeBtn;
+ Evas_Object *pPauseBtn;
+ Evas_Object *pPlayFocusBtn;
+ Evas_Object *pPrevBtn;
+ Evas_Object *pNextBtn;
- Evas_Object *pCaptureBtn;
- Evas_Object *pCaptureRewBtn;
- Evas_Object *pCaptureFFBtn;
- Evas_Object *pPopupBtn;
+ Evas_Object *pCaptureBtn;
+ Evas_Object *pCaptureRewBtn;
+ Evas_Object *pCaptureFFBtn;
+ Evas_Object *pPopupBtn;
- Evas_Object *pSpeedBoxCtrl;
+ Evas_Object *pSpeedBoxCtrl;
- Evas_Object *pPopup;
+ Evas_Object *pPopup;
- Evas_Object *pLoadingAni;
+ Evas_Object *pLoadingAni;
- Ecore_Timer *pHideTimer;
- Ecore_Timer *pHideFinishTimer;
- Ecore_Timer *pLockScreenTimer;
+ Ecore_Timer *pHideTimer;
+ Ecore_Timer *pHideFinishTimer;
+ Ecore_Timer *pLockScreenTimer;
- Ecore_Timer *pSpeedTimer;
- bool bSpeedFF;
- int nSpeedValue;
- bool bSpeedDown;
- bool bKeyPressed;
+ Ecore_Timer *pSpeedTimer;
+ bool bSpeedFF;
+ int nSpeedValue;
+ bool bSpeedDown;
+ bool bKeyPressed;
- Ecore_Timer *pExitWaitTimer;
+ Ecore_Timer *pExitWaitTimer;
- Ecore_Idler *pControlIdler;
- Ecore_Idler *pMultiWinIdler;
+ Ecore_Idler *pControlIdler;
+ Ecore_Idler *pMultiWinIdler;
- GList *pMediaItemList;
+ GList *pMediaItemList;
- bool bIsRealize;
- bool bIsActive;
- bool bShowLayout;
- bool bMainFocusState;
- bool bIsPopupShow;
- bool bIsSubtitleShow;
- bool bIsVideoUnsupport;
+ bool bIsRealize;
+ bool bIsActive;
+ bool bShowLayout;
+ bool bMainFocusState;
+ bool bIsPopupShow;
+ bool bIsSubtitleShow;
+ bool bIsVideoUnsupport;
/* bookmark part */
- bookmark_handle pBookmarkHandle;
- Evas_Object *pBookmarkObj;
- bool bCaptureComplete;
- int nCapturePosition;
+ bookmark_handle pBookmarkHandle;
+ Evas_Object *pBookmarkObj;
+ bool bCaptureComplete;
+ int nCapturePosition;
/* progressbar part */
- Evas_Object *pProgressEvent;
- Ecore_Timer *pProgressTimer;
- progressbar_handle pProgressbar;
- bool bProgressDown;
+ Evas_Object *pProgressEvent;
+ Ecore_Timer *pProgressTimer;
+ progressbar_handle pProgressbar;
+ bool bProgressDown;
#ifdef K_FEATURE_MICROSEEK
- double nPrevCanvasX;
- double nPrevPositionX;
+ double nPrevCanvasX;
+ double nPrevPositionX;
#endif
- int nCurPosition;
- bool bHLSMode;
- int nWaitPos;
- bool bSeekComplete;
- bool bSeekPause;
- bool bSeekResume;
+ int nCurPosition;
+ bool bHLSMode;
+ int nWaitPos;
+ bool bSeekComplete;
+ bool bSeekPause;
+ bool bSeekResume;
#ifdef K_FEATURE_MICROSEEK
- Evas_Object *pMicroSeekTextLayout;
- Evas_Object *pMicroSeekImageLayout;
+ Evas_Object *pMicroSeekTextLayout;
+ Evas_Object *pMicroSeekImageLayout;
#endif
#ifdef FLICK_JUMP
- int nFlickPressX1;
- int nFlickPressY1;
- bool bFlickRewind;
- bool bFlickWaiting;
- Evas_Object *pFlickJumpSeek;
+ int nFlickPressX1;
+ int nFlickPressY1;
+ bool bFlickRewind;
+ bool bFlickWaiting;
+ Evas_Object *pFlickJumpSeek;
#endif
- bool bBufferingComplete;
+ bool bBufferingComplete;
- char *szMediaURL;
- char *szSubtitleURL;
- int nStartPosition;
- bool bManualPause;
+ char *szMediaURL;
+ char *szSubtitleURL;
+ int nStartPosition;
+ bool bManualPause;
- mm_player_handle pPlayerHandle;
- vp_mm_player_display_mode_t nDisplayMode;
+ mm_player_handle pPlayerHandle;
+ vp_mm_player_display_mode_t nDisplayMode;
- int nDuration;
- video_play_launching_type_t nLaunchingType;
- video_play_rotate_t nRotate;
+ int nDuration;
+ video_play_launching_type_t nLaunchingType;
+ video_play_rotate_t nRotate;
- share_handle pShareHandle;
+ share_handle pShareHandle;
- volume_handle pVolumeHandle;
- volume_popup_handle pVolumePopupHandle;
- brightness_handle pBrightnessHandle;
+ volume_handle pVolumeHandle;
+ volume_popup_handle pVolumePopupHandle;
+ brightness_handle pBrightnessHandle;
- sound_alive_handle pSAHandle;
- int nSoundAlive;
+ sound_alive_handle pSAHandle;
+ int nSoundAlive;
- subtitle_handle pSubtitle;
- Ecore_Timer *pSubtitleTimer;
- bool bIsExistSubtitle;
- subtitle_popup_handle pSubtitlePopup;
- subtitle_select_handle pSubtitleSelectPopup;
+ subtitle_handle pSubtitle;
+ Ecore_Timer *pSubtitleTimer;
+ bool bIsExistSubtitle;
+ subtitle_popup_handle pSubtitlePopup;
+ subtitle_select_handle pSubtitleSelectPopup;
#ifdef SUBTITLE_K_FEATURE
- subtitle_alignment_handle pSubtitleAlignmentPopup;
+ subtitle_alignment_handle pSubtitleAlignmentPopup;
#endif
- subtitle_font_handle pSubtitleFontPopup;
- subtitle_size_handle pSubtitleSizePopup;
- subtitle_edge_handle pSubtitleEdgePopup;
- subtitle_color_handle pSubtitleFontColorPopup;
+ subtitle_font_handle pSubtitleFontPopup;
+ subtitle_size_handle pSubtitleSizePopup;
+ subtitle_edge_handle pSubtitleEdgePopup;
+ subtitle_color_handle pSubtitleFontColorPopup;
#ifndef SUBTITLE_K_FEATURE
- subtitle_bg_color_handle pSubtitleBGColorPopup;
+ subtitle_bg_color_handle pSubtitleBGColorPopup;
#else
- subtitle_color_handle pSubtitleBGColorPopup;
+ subtitle_color_handle pSubtitleBGColorPopup;
#endif
- subtitle_color_handle pSubtitleCaptionWinColorPopup;
- subtitle_sync_popup pSubtitleSyncPopup;
- subtitle_track_handle pSubtitleTrackHandle;
- int nDefaultSubtitleTrackIndex;
- float fSubtitleSyncValue;
+ subtitle_color_handle pSubtitleCaptionWinColorPopup;
+ subtitle_sync_popup pSubtitleSyncPopup;
+ subtitle_track_handle pSubtitleTrackHandle;
+ int nDefaultSubtitleTrackIndex;
+ float fSubtitleSyncValue;
- repeat_handle pRepeatHandle;
- video_play_repeat_mode_t nRepeatMode;
+ repeat_handle pRepeatHandle;
+ video_play_repeat_mode_t nRepeatMode;
- sound_path_handle pSoundPathHandle;
- setting_popup_handle pSettingHandle;
- detail_handle pDetailHandle;
+ sound_path_handle pSoundPathHandle;
+ setting_popup_handle pSettingHandle;
+ detail_handle pDetailHandle;
- audio_track_handle pAudioTrackHandle;
- int nDefaultAudioTrackIndex;
+ audio_track_handle pAudioTrackHandle;
+ int nDefaultAudioTrackIndex;
- media_key_handle pMediaKey;
- bool bLockScreen;
- char *szScreenMirrorMacAddr;
+ media_key_handle pMediaKey;
+ bool bLockScreen;
+ char *szScreenMirrorMacAddr;
- //VppDownloadHandle pDownloadHandle;
- bool bVideoOnlyMode;
- bool bDeviceRemoveInterrupt;
+ bool bVideoOnlyMode;
+ bool bDeviceRemoveInterrupt;
- int dSubtitleStartTime;
- int dSubtitleEndTime;
+ int dSubtitleStartTime;
+ int dSubtitleEndTime;
- Ecore_Timer *pMomentTimer;
- int nGestureStartPosX;
- int nGestureStartPosY;
- int nGestureOldPosY;
- int nMomentDefaultVal;
- int nMomentWeight;
- int nMomentStep;
- int nWindowWidth;
- int nWindowHeight;
+ Ecore_Timer *pMomentTimer;
+ int nGestureStartPosX;
+ int nGestureStartPosY;
+ int nGestureOldPosY;
+ int nMomentDefaultVal;
+ int nMomentWeight;
+ int nMomentStep;
+ int nWindowWidth;
+ int nWindowHeight;
- Ecore_Job *pVolumeJob;
- Ecore_Job *pBrightnessJob;
+ Ecore_Job *pVolumeJob;
+ Ecore_Job *pBrightnessJob;
- bool bMomentumIncrease;
+ bool bMomentumIncrease;
- play_speed_popup pPlaySpeedPopup;
- double fPlaySpeed;
+ play_speed_popup pPlaySpeedPopup;
+ double fPlaySpeed;
- bool bAudioOnly;
+ bool bAudioOnly;
- capture_popup_handle pCapturePopup;
- Ecore_Timer *pScreenShotTimer;
- Evas_Object *pScreenShot;
+ capture_popup_handle pCapturePopup;
+ Ecore_Timer *pScreenShotTimer;
+ Evas_Object *pScreenShot;
- bool bCaptureMode;
- bool bCaptureBookmark;
- bool bEarjackConnect;
+ bool bCaptureMode;
+ bool bCaptureBookmark;
+ bool bEarjackConnect;
- zoom_guide_handle pZoomGuide;
- int nZoomPosX;
- int nZoomPosY;
- int nPrevZoomPosX;
- int nPrevZoomPosY;
+ zoom_guide_handle pZoomGuide;
+ int nZoomPosX;
+ int nZoomPosY;
+ int nPrevZoomPosX;
+ int nPrevZoomPosY;
- double fActiveZoom;
- double fZoomValue;
- double fPrevZoomValue;
- bool bZoomEnable;
+ double fActiveZoom;
+ double fZoomValue;
+ double fPrevZoomValue;
+ bool bZoomEnable;
- int nLastVolume;
+ int nLastVolume;
- Ecore_Pipe *pSeekPipe;
+ Ecore_Pipe *pSeekPipe;
vp_normal_view_state_cb vp_mini_played_state_cb;
- bool bKeySpeed;
- Ecore_Pipe *pPreparePipe;
- bool bDestroyNavi;
- bool bSharepopup;
- bool bSharePanelPause;
- bool bSharePanelFocusIn; //first focus in is menu popup hide, second is share panel hdie
+ bool bKeySpeed;
+ Ecore_Pipe *pPreparePipe;
+ bool bDestroyNavi;
+ bool bSharepopup;
+ bool bSharePanelPause;
+ bool bSharePanelFocusIn; //first focus in is menu popup hide, second is share panel hdie
#ifdef SUBTITLE_K_FEATURE
- bool bSubtitleDown;
+ bool bSubtitleDown;
- int nInitSubtitleX;
- int nInitSubtitleY;
+ int nInitSubtitleX;
+ int nInitSubtitleY;
- int nDeltaSubtitleX;
- int nDeltaSubtitleY;
+ int nDeltaSubtitleX;
+ int nDeltaSubtitleY;
- int nLongPressX1;
- int nLongPressY1;
- int nLongPressX2;
- int nLongPressY2;
+ int nLongPressX1;
+ int nLongPressY1;
+ int nLongPressX2;
+ int nLongPressY2;
- Ecore_Timer *pSubtitleMoveTimer;
- int nSubtitleInterval;
+ Ecore_Timer *pSubtitleMoveTimer;
+ int nSubtitleInterval;
#endif
#ifdef _SUBTITLE_MULTI_LANGUAGE
- int nSubtitleLanguageCount;
- bool *pSelectedSubtitleLanguage;
+ int nSubtitleLanguageCount;
+ bool *pSelectedSubtitleLanguage;
#endif
} NormalView;
-static void _vp_play_normal_view_destroy_handle(NormalView *pNormalView);
-static bool _vp_play_normal_view_set_subtitle_font_config(NormalView *pNormalView);
-static bool _vp_play_normal_view_update_progress_value(NormalView *pNormalView);
-static bool _vp_play_normal_view_play_start(NormalView *pNormalView, bool bCheckDRM);
-static void _vp_play_normal_view_on_next_play(NormalView *pNormalView, bool bManual);
-static void _vp_play_normal_view_on_prev_play(NormalView *pNormalView, bool bManual, bool bVoice);
-static bool _vp_play_normal_view_check_during_call(NormalView *pNormalView);
-static void _vp_play_normal_view_show_audio_only_popup(NormalView *pNormalView);
-static void _vp_play_normal_view_show_video_only_popup(NormalView *pNormalView);
-static bool _vp_play_normal_view_check_audio_only(NormalView *pNormalView);
-static bool _vp_play_normal_view_check_drm_lock(NormalView *pNormalView, bool *bLock);
-static void _vp_play_normal_view_set_played_time(NormalView *pNormalView);
-/*static void _vp_play_normal_view_screen_capture(NormalView *pNormalView);*/
-static void _vp_play_normal_view_screen_move(NormalView *pNormalView, bool bFoward);
-
-static void _vp_play_normal_view_create_progress_timer(NormalView *pNormalView);
-static void _vp_play_normal_view_create_layout_hide_timer(NormalView *pNormalView);
-static bool _vp_play_normal_view_create_loading_ani(NormalView *pNormalView);
-static void _vp_play_normal_view_set_play_state(NormalView *pNormalView);
-static double _vp_play_normal_view_get_mouse_pos_ratio(Evas_Object *pObj, int nCurX);
-static void _vp_play_normal_view_all_close_popup(NormalView *pNormalView);
-static void _vp_play_normal_view_show_layout(NormalView *pNormalView);
-static void _vp_play_normal_view_hide_layout(NormalView *pNormalView, bool bNoEffect);
+static void _vp_play_normal_view_destroy_handle(NormalView * pNormalView);
+static bool _vp_play_normal_view_set_subtitle_font_config(NormalView *
+ pNormalView);
+static bool _vp_play_normal_view_update_progress_value(NormalView *
+ pNormalView);
+static bool _vp_play_normal_view_play_start(NormalView * pNormalView,
+ bool bCheckDRM);
+static void _vp_play_normal_view_on_next_play(NormalView * pNormalView,
+ bool bManual);
+static void _vp_play_normal_view_on_prev_play(NormalView * pNormalView,
+ bool bManual, bool bVoice);
+static bool _vp_play_normal_view_check_during_call(NormalView *
+ pNormalView);
+static void _vp_play_normal_view_show_audio_only_popup(NormalView *
+ pNormalView);
+static void _vp_play_normal_view_show_video_only_popup(NormalView *
+ pNormalView);
+static bool _vp_play_normal_view_check_audio_only(NormalView *
+ pNormalView);
+static bool _vp_play_normal_view_check_drm_lock(NormalView * pNormalView,
+ bool * bLock);
+static void _vp_play_normal_view_set_played_time(NormalView * pNormalView);
+static void _vp_play_normal_view_screen_move(NormalView * pNormalView,
+ bool bFoward);
+
+static void _vp_play_normal_view_create_progress_timer(NormalView *
+ pNormalView);
+static void _vp_play_normal_view_create_layout_hide_timer(NormalView *
+ pNormalView);
+static bool _vp_play_normal_view_create_loading_ani(NormalView *
+ pNormalView);
+static void _vp_play_normal_view_set_play_state(NormalView * pNormalView);
+static double _vp_play_normal_view_get_mouse_pos_ratio(Evas_Object * pObj,
+ int nCurX);
+static void _vp_play_normal_view_all_close_popup(NormalView * pNormalView);
+static void _vp_play_normal_view_show_layout(NormalView * pNormalView);
+static void _vp_play_normal_view_hide_layout(NormalView * pNormalView,
+ bool bNoEffect);
#ifdef ENABLE_GESTURE_ZOOM_FEATURE
-static void _vp_play_normal_view_on_zoom_mode(NormalView *pNormalView);
+static void _vp_play_normal_view_on_zoom_mode(NormalView * pNormalView);
#endif
-static void _vp_play_normal_view_on_capture_mode(NormalView *pNormalView);
-static void _vp_play_normal_view_on_share_popup(NormalView *pNormalView);
-static void _vp_play_normal_view_on_sound_alive_popup(NormalView *pNormalView);
-static void _vp_play_normal_view_on_sound_path_popup(NormalView *pNormalView);
-static void _vp_play_normal_view_on_audio_track_popup(NormalView *pNormalView);
-static void _vp_play_normal_view_on_subtitle_popup(NormalView *pNormalView);
-static void _vp_play_normal_view_on_subtitle_sync_popup(NormalView *pNormalView);
-static void _vp_play_normal_view_on_subtitle_language_popup(NormalView *pNormalView);
-static void _vp_play_normal_view_on_subtitle_select_popup(NormalView *pNormalView);
-static void _vp_play_normal_view_on_subtitle_font_popup(NormalView *pNormalView);
-static void _vp_play_normal_view_on_subtitle_size_popup(NormalView *pNormalView);
-static void _vp_play_normal_view_on_subtitle_edge_popup(NormalView *pNormalView);
-
-static void _vp_play_normal_view_on_subtitle_font_color_popup(NormalView *pNormalView);
-static void _vp_play_normal_view_on_subtitle_bg_color_popup(NormalView *pNormalView);
-static void _vp_play_normal_view_on_subtitle_caption_win_color_popup(NormalView *pNormalView);
+static void _vp_play_normal_view_on_capture_mode(NormalView * pNormalView);
+static void _vp_play_normal_view_on_share_popup(NormalView * pNormalView);
+static void _vp_play_normal_view_on_sound_alive_popup(NormalView *
+ pNormalView);
+static void _vp_play_normal_view_on_sound_path_popup(NormalView *
+ pNormalView);
+static void _vp_play_normal_view_on_audio_track_popup(NormalView *
+ pNormalView);
+static void _vp_play_normal_view_on_subtitle_popup(NormalView *
+ pNormalView);
+static void _vp_play_normal_view_on_subtitle_sync_popup(NormalView *
+ pNormalView);
+static void _vp_play_normal_view_on_subtitle_language_popup(NormalView *
+ pNormalView);
+static void _vp_play_normal_view_on_subtitle_select_popup(NormalView *
+ pNormalView);
+static void _vp_play_normal_view_on_subtitle_font_popup(NormalView *
+ pNormalView);
+static void _vp_play_normal_view_on_subtitle_size_popup(NormalView *
+ pNormalView);
+static void _vp_play_normal_view_on_subtitle_edge_popup(NormalView *
+ pNormalView);
+
+static void _vp_play_normal_view_on_subtitle_font_color_popup(NormalView *
+ pNormalView);
+static void _vp_play_normal_view_on_subtitle_bg_color_popup(NormalView *
+ pNormalView);
+static void
+_vp_play_normal_view_on_subtitle_caption_win_color_popup(NormalView *
+ pNormalView);
#ifdef SUBTITLE_K_FEATURE
-//static void _vp_play_normal_view_on_subtitle_mouse_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
-//static void _vp_play_normal_view_on_subtitle_mouse_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
-//static void _vp_play_normal_view_on_subtitle_mouse_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
-static void _vp_play_normal_view_on_subtitle_alignment_popup(NormalView *pNormalView);
+static void _vp_play_normal_view_on_subtitle_alignment_popup(NormalView *
+ pNormalView);
#endif
-//static void _vp_play_normal_view_on_repeat_popup(NormalView *pNormalView);
-static void _vp_play_normal_view_on_setting_popup(NormalView *pNormalView);
-static void _vp_play_normal_view_on_detail_popup(NormalView *pNormalView);
-static void _vp_play_normal_view_on_capture_popup(NormalView *pNormalView);
-static void _vp_play_normal_view_on_play_speed_popup(NormalView *pNormalView);
-static void _vp_play_normal_view_on_play_speed_popup_cb(void *data, Evas_Object *obj, const char *emission, const char *source);
-static void _vp_play_normal_view_on_volume_popup(NormalView *pNormalView, bool bToggle);
-static void _vp_play_normal_view_on_bookmark_mode(NormalView *pNormalView, bool bShow);
-//static void _vp_play_normal_view_download_sdp(NormalView *pNormalView, char *szSdpPath);
-
-static void _vp_play_normal_view_show_rotate(NormalView *pNormalView);
-static void _vp_play_normal_view_show_volume(NormalView *pNormalView);
-static void _vp_play_normal_view_set_sound_path_state(NormalView *pNormalView);
-static void _vp_play_normal_view_set_rotate_lock_state(NormalView *pNormalView);
-static void _vp_play_normal_view_set_volume_lock_state(NormalView *pNormalView);
-
-static void _vp_normal_set_audio_only_image(NormalView *pNormalView, bool bAudioOnly);
-
-static void __vp_play_normal_view_seek_pipe_cb(void *pUserData, void *pBuf, int nByte);
-static void __vp_normal_error_popup_time_out_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo);
-static void __vp_normal_error_popup_key_event_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo);
-static void __vp_normal_error_popup_mouse_event_cb(void *pUserData, Evas *pEvas, Evas_Object *pObj, void *pEventInfo);
+static void _vp_play_normal_view_on_setting_popup(NormalView *
+ pNormalView);
+static void _vp_play_normal_view_on_detail_popup(NormalView * pNormalView);
+static void _vp_play_normal_view_on_capture_popup(NormalView *
+ pNormalView);
+static void _vp_play_normal_view_on_play_speed_popup(NormalView *
+ pNormalView);
+static void _vp_play_normal_view_on_play_speed_popup_cb(void *data,
+ Evas_Object * obj,
+ const char
+ *emission,
+ const char
+ *source);
+static void _vp_play_normal_view_on_volume_popup(NormalView * pNormalView,
+ bool bToggle);
+static void _vp_play_normal_view_on_bookmark_mode(NormalView * pNormalView,
+ bool bShow);
+
+static void _vp_play_normal_view_show_rotate(NormalView * pNormalView);
+static void _vp_play_normal_view_show_volume(NormalView * pNormalView);
+static void _vp_play_normal_view_set_sound_path_state(NormalView *
+ pNormalView);
+static void _vp_play_normal_view_set_rotate_lock_state(NormalView *
+ pNormalView);
+static void _vp_play_normal_view_set_volume_lock_state(NormalView *
+ pNormalView);
+
+static void _vp_normal_set_audio_only_image(NormalView * pNormalView,
+ bool bAudioOnly);
+
+static void __vp_play_normal_view_seek_pipe_cb(void *pUserData, void *pBuf,
+ int nByte);
+static void __vp_normal_error_popup_time_out_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEventInfo);
+static void __vp_normal_error_popup_key_event_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEventInfo);
+static void __vp_normal_error_popup_mouse_event_cb(void *pUserData,
+ Evas * pEvas,
+ Evas_Object * pObj,
+ void *pEventInfo);
static void __vp_normal_completed_cb(void *pUserData);
//Focus UI
-static void _vp_play_normal_view_set_button_focus_sequence(NormalView *pNormalView);
-static void _vp_normal_view_speed_for_steps(NormalView *pNormalView, bool bSpeedFF);
+static void _vp_play_normal_view_set_button_focus_sequence(NormalView *
+ pNormalView);
+static void _vp_normal_view_speed_for_steps(NormalView * pNormalView,
+ bool bSpeedFF);
static vp_mm_player_state_t pState = VP_MM_PLAYER_STATE_NONE;
static NormalView *curr_Handle = NULL;
#ifdef SUBTITLE_K_FEATURE
/*Set caption window: size, rel1, color*/
-static void __vp_normal_subtitle_set_caption_window(NormalView *pNormalView)
+static void __vp_normal_subtitle_set_caption_window(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
bLandscape = vp_play_util_get_landscape_check(pNormalView->nRotate);
vp_play_subtitle_get_size_formatted(pNormalView->pSubtitle, &ww, &hh);
if (pNormalView->bSubtitleDown) {
- ww = bLandscape ? VP_SUBTITLE_LANDSCAPE_SIZE : VP_SUBTITLE_PORTRAIT_SIZE;
+ ww = bLandscape ? VP_SUBTITLE_LANDSCAPE_SIZE :
+ VP_SUBTITLE_PORTRAIT_SIZE;
hh += VP_SUBTITLE_MARGIN_SIZE;
} else {
ww += VP_SUBTITLE_MARGIN_SIZE;
hh += VP_SUBTITLE_MARGIN_SIZE;
}
vp_play_subtitle_get_alignment(pNormalView->pSubtitle, &nAlignment);
- vp_play_util_set_object_size(_EDJ(vp_play_subtitle_get_object(pNormalView->pSubtitle)),
- ww, hh, VP_NORMAL_SET_CAPTION_WINDOW_SIZE_ID);
- width = bLandscape ? VP_SUBTITLE_LANDSCAPE_SIZE : VP_SUBTITLE_PORTRAIT_SIZE;
+ vp_play_util_set_object_size(_EDJ
+ (vp_play_subtitle_get_object
+ (pNormalView->pSubtitle)), ww, hh,
+ VP_NORMAL_SET_CAPTION_WINDOW_SIZE_ID);
+ width =
+ bLandscape ? VP_SUBTITLE_LANDSCAPE_SIZE :
+ VP_SUBTITLE_PORTRAIT_SIZE;
if (nAlignment == VP_SUBTITLE_ALIGNMENT_LEFT) {
offset_x = 0;
} else if (nAlignment == VP_SUBTITLE_ALIGNMENT_CENTER) {
offset_x = width - ww;
}
VideoLogInfo("nAlignment:%d,offset_x:%d", nAlignment, offset_x);
- vp_play_util_set_object_offset(_EDJ(vp_play_subtitle_get_object(pNormalView->pSubtitle)),
- offset_x, 0, VP_NORMAL_SET_CAPTION_WINDOW_OFFSET_ID);
+ vp_play_util_set_object_offset(_EDJ
+ (vp_play_subtitle_get_object
+ (pNormalView->pSubtitle)), offset_x, 0,
+ VP_NORMAL_SET_CAPTION_WINDOW_OFFSET_ID);
vp_play_subtitle_set_caption_win_color(pNormalView->pSubtitle, TRUE);
}
return EINA_FALSE;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
pNormalView->pExitWaitTimer = NULL;
return EINA_FALSE;
}
-static void _vp_play_normal_view_set_volume_state(NormalView *pNormalView)
+static void _vp_play_normal_view_set_volume_state(NormalView * pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
Evas_Object *pIcon = NULL;
- pIcon = elm_object_part_content_get(pNormalView->pVolumeBtn, VP_PLAY_SWALLOW_BUTTON_ICON);
+ pIcon =
+ elm_object_part_content_get(pNormalView->pVolumeBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON);
VP_EVAS_DEL(pIcon);
- pIcon = elm_object_part_content_get(pNormalView->pVolumeBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON);
+ pIcon =
+ elm_object_part_content_get(pNormalView->pVolumeBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON);
VP_EVAS_DEL(pIcon);
- pIcon = elm_object_part_content_get(pNormalView->pVolumeBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON);
+ pIcon =
+ elm_object_part_content_get(pNormalView->pVolumeBtn,
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON);
VP_EVAS_DEL(pIcon);
- elm_object_part_content_unset(pNormalView->pVolumeBtn, VP_PLAY_SWALLOW_BUTTON_ICON);
- elm_object_part_content_unset(pNormalView->pVolumeBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON);
- elm_object_part_content_unset(pNormalView->pVolumeBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON);
- char edj_path[1024] = {0};
+ elm_object_part_content_unset(pNormalView->pVolumeBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON);
+ elm_object_part_content_unset(pNormalView->pVolumeBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON);
+ elm_object_part_content_unset(pNormalView->pVolumeBtn,
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON);
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_RESROUCE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_RESROUCE_EDJ_PATH);
free(path);
int nVolume = 0;
bool bMute = FALSE;
VideoLogError("nVolume = %d:%d", nVolume, bMute);
if ((nVolume == 0) || bMute) {
- pIcon = vp_button_create_icon(pNormalView->pVolumeBtn, edj_path, VP_PLAY_NORMAL_RES_MUTE);
- elm_object_part_content_set(pNormalView->pVolumeBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pVolumeBtn, edj_path, VP_PLAY_NORMAL_RES_MUTE_PRESS);
- elm_object_part_content_set(pNormalView->pVolumeBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pVolumeBtn, edj_path, VP_PLAY_NORMAL_RES_MUTE_DIM);
- elm_object_part_content_set(pNormalView->pVolumeBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
+ pIcon =
+ vp_button_create_icon(pNormalView->pVolumeBtn, edj_path,
+ VP_PLAY_NORMAL_RES_MUTE);
+ elm_object_part_content_set(pNormalView->pVolumeBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pVolumeBtn, edj_path,
+ VP_PLAY_NORMAL_RES_MUTE_PRESS);
+ elm_object_part_content_set(pNormalView->pVolumeBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON,
+ pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pVolumeBtn, edj_path,
+ VP_PLAY_NORMAL_RES_MUTE_DIM);
+ elm_object_part_content_set(pNormalView->pVolumeBtn,
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON,
+ pIcon);
} else {
- pIcon = vp_button_create_icon(pNormalView->pVolumeBtn, edj_path, VP_PLAY_NORMAL_RES_VOLUME);
- elm_object_part_content_set(pNormalView->pVolumeBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+ pIcon =
+ vp_button_create_icon(pNormalView->pVolumeBtn, edj_path,
+ VP_PLAY_NORMAL_RES_VOLUME);
+ elm_object_part_content_set(pNormalView->pVolumeBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
- pIcon = vp_button_create_icon(pNormalView->pVolumeBtn, edj_path, VP_PLAY_NORMAL_RES_VOLUME_PRESS);
- elm_object_part_content_set(pNormalView->pVolumeBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
+ pIcon =
+ vp_button_create_icon(pNormalView->pVolumeBtn, edj_path,
+ VP_PLAY_NORMAL_RES_VOLUME_PRESS);
+ elm_object_part_content_set(pNormalView->pVolumeBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON,
+ pIcon);
- pIcon = vp_button_create_icon(pNormalView->pVolumeBtn, edj_path, VP_PLAY_NORMAL_RES_VOLUME_DIM);
- elm_object_part_content_set(pNormalView->pVolumeBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
+ pIcon =
+ vp_button_create_icon(pNormalView->pVolumeBtn, edj_path,
+ VP_PLAY_NORMAL_RES_VOLUME_DIM);
+ elm_object_part_content_set(pNormalView->pVolumeBtn,
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON,
+ pIcon);
}
}
-static void __vp_normal_volume_change_value_cb(int nVolume, void *pUserData)
+static void __vp_normal_volume_change_value_cb(int nVolume,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
VideoLogWarning("Set Volume: %d", nVolume);
_vp_play_normal_view_set_volume_state(pNormalView);
}
-/*static void __vp_normal_subtitle_popup_key_event_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
-{
- if (!pUserData) {
- VideoLogError("pUserData is NULL");
- return;
- }
-
- NormalView *pNormalView = (NormalView *)pUserData;
-
- VP_EVAS_DEL(pNormalView->pPopup);
- pNormalView->bIsPopupShow = FALSE;
-}
-*/
-
-static void __vp_normal_popup_key_event_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
+static void __vp_normal_popup_key_event_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
VP_EVAS_DEL(pNormalView->pPopup);
pNormalView->bIsPopupShow = FALSE;
}
-static void __vp_normal_popup_mouse_event_cb(void *pUserData, Evas *pEvas, Evas_Object *pObj, void *pEventInfo)
+static void __vp_normal_popup_mouse_event_cb(void *pUserData, Evas * pEvas,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
Evas_Event_Mouse_Up *ev = pEventInfo;
if (ev->button == 3) {
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
VP_EVAS_DEL(pNormalView->pPopup);
pNormalView->bIsPopupShow = FALSE;
}
}
-static void __vp_normal_popup_time_out_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
+static void __vp_normal_popup_time_out_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
VP_EVAS_DEL(pNormalView->pPopup);
pNormalView->bIsPopupShow = FALSE;
}
-static void __vp_normal_prepare_error_popup_time_out_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
+static void __vp_normal_prepare_error_popup_time_out_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
VP_EVAS_DEL(pObj);
pNormalView->bIsPopupShow = FALSE;
if (pNormalView->nRepeatMode == VIDEO_PLAY_REPEAT_ONE ||
- pNormalView->nRepeatMode == VIDEO_PLAY_REPEAT_ALL) {
+ pNormalView->nRepeatMode == VIDEO_PLAY_REPEAT_ALL) {
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
vp_device_set_screen_off(FALSE);
vp_play_util_set_unlock_power_key();
- // tmpory comment
- //pPlayView->pFunc->vp_play_func_exit(pPlayView);
- } else {
- //_vp_play_normal_view_on_next_play(pNormalView, FALSE);
}
-
}
-static void __vp_normal_error_popup_key_event_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
+static void __vp_normal_error_popup_key_event_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
VP_EVAS_DEL(pNormalView->pPopup);
pNormalView->bIsPopupShow = FALSE;
if (pNormalView->nRepeatMode == VIDEO_PLAY_REPEAT_ONE ||
- pNormalView->nRepeatMode == VIDEO_PLAY_REPEAT_ALL) {
+ pNormalView->nRepeatMode == VIDEO_PLAY_REPEAT_ALL) {
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
}
-static void __vp_normal_error_popup_mouse_event_cb(void *pUserData, Evas *pEvas, Evas_Object *pObj, void *pEventInfo)
+static void __vp_normal_error_popup_mouse_event_cb(void *pUserData,
+ Evas * pEvas,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
Evas_Event_Mouse_Up *ev = pEventInfo;
if (ev->button == 3) {
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
VP_EVAS_DEL(pNormalView->pPopup);
pNormalView->bIsPopupShow = FALSE;
if (pNormalView->nRepeatMode == VIDEO_PLAY_REPEAT_ONE ||
- pNormalView->nRepeatMode == VIDEO_PLAY_REPEAT_ALL) {
+ pNormalView->nRepeatMode == VIDEO_PLAY_REPEAT_ALL) {
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
}
}
-static void __vp_normal_error_popup_time_out_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
+static void __vp_normal_error_popup_time_out_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
VP_EVAS_DEL(pNormalView->pPopup);
pNormalView->bIsPopupShow = FALSE;
VideoLogError("pUserData is NULL");
return ECORE_CALLBACK_CANCEL;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
_vp_play_normal_view_set_play_state(pNormalView);
_vp_play_normal_view_on_capture_mode(pNormalView);
return ECORE_CALLBACK_CANCEL;
}
-static void __vp_normal_sound_alive_popup_close_cb(int nType, bool bPause, void *pUserData)
+static void __vp_normal_sound_alive_popup_close_cb(int nType, bool bPause,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return;
}
- video_sound_alive_t nSAType = (video_sound_alive_t)nType;
+ video_sound_alive_t nSAType = (video_sound_alive_t) nType;
vp_sound_alive_destroy(pNormalView->pSAHandle);
pNormalView->pSAHandle = NULL;
video_sound_device_type_t nSoundDevType = VP_SOUND_DEVICE_NONE;
vp_sound_get_active_device(&nSoundDevType);
- if (nSoundDevType != VP_SOUND_DEVICE_EARJACK && nSoundDevType != VP_SOUND_DEVICE_BLUETOOTH) {
+ if (nSoundDevType != VP_SOUND_DEVICE_EARJACK
+ && nSoundDevType != VP_SOUND_DEVICE_BLUETOOTH) {
/* show popup */
VP_EVAS_DEL(pNormalView->pPopup);
pNormalView->pPopup = NULL;
return;
}
pNormalView->bIsPopupShow = TRUE;
- char *szMsg = g_strdup_printf(VP_PLAY_STRING_71CH_ONLY_EARPHONE, "7.1");
- pNormalView->pPopup = vp_popup_create(pPlayView->pWin, POPUP_STYLE_DEFAULT_WITH_CANCEL_BTN,
- NULL,
- szMsg,
- 0.0, NULL,
- __vp_normal_popup_key_event_cb,
- __vp_normal_popup_mouse_event_cb,
- pNormalView);
+ char *szMsg =
+ g_strdup_printf(VP_PLAY_STRING_71CH_ONLY_EARPHONE, "7.1");
+ pNormalView->pPopup =
+ vp_popup_create(pPlayView->pWin,
+ POPUP_STYLE_DEFAULT_WITH_CANCEL_BTN, NULL,
+ szMsg, 0.0, NULL,
+ __vp_normal_popup_key_event_cb,
+ __vp_normal_popup_mouse_event_cb,
+ pNormalView);
VP_FREE(szMsg);
Evas_Object *pBtn = NULL;
pBtn = elm_button_add(pNormalView->pPopup);
elm_object_style_set(pBtn, "popup_button/default");
- elm_object_domain_translatable_text_set(pBtn, VP_SYS_STR_PREFIX, VP_PLAY_STRING_COM_OK_IDS);
- elm_object_part_content_set(pNormalView->pPopup, "button1", pBtn);
- evas_object_smart_callback_add(pBtn, "clicked", __vp_normal_popup_key_event_cb, (void*)pNormalView);
+ elm_object_domain_translatable_text_set(pBtn,
+ VP_SYS_STR_PREFIX,
+ VP_PLAY_STRING_COM_OK_IDS);
+ elm_object_part_content_set(pNormalView->pPopup, "button1",
+ pBtn);
+ evas_object_smart_callback_add(pBtn, "clicked",
+ __vp_normal_popup_key_event_cb,
+ (void *) pNormalView);
evas_object_show(pNormalView->pPopup);
return;
VideoLogError("vp_play_preference_set_sound_alive_status failed");
}
- if (!vp_mm_player_set_sound_filter(pNormalView->pPlayerHandle, nSoundFilter)) {
+ if (!vp_mm_player_set_sound_filter
+ (pNormalView->pPlayerHandle, nSoundFilter)) {
VideoLogWarning("vp_mm_player_set_sound_filter is fail");
}
}
-static void __vp_normal_sound_path_popup_close_cb(int nType, bool bPause, void *pUserData)
+static void __vp_normal_sound_path_popup_close_cb(int nType, bool bPause,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
_vp_play_normal_view_set_sound_path_state(pNormalView);
+ if (_vp_is_current_focus_available() != 0) {
+ VideoLogInfo("Cannot acquire focus. Setting video to pause state");
+ pNormalView->bManualPause = TRUE;
+ }
+
if (bPause) {
if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
VideoLogWarning("Pause Fail");
}
-/*
-static void __vp_normal_repeat_popup_close_cb(int nType, bool bPause, void *pUserData)
-{
- if (!pUserData) {
- VideoLogError("pUserData is NULL");
- return;
- }
-
- NormalView *pNormalView = (NormalView *)pUserData;
- if (bPause) {
- if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
- VideoLogWarning("Pause Fail");
- }
- _vp_play_normal_view_set_play_state(pNormalView);
- _vp_play_normal_view_on_capture_mode(pNormalView);
- }
- else {
- if (pNormalView->bManualPause == FALSE) {
- if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
- VideoLogWarning("Pause Fail");
- }
- _vp_play_normal_view_set_play_state(pNormalView);
- _vp_play_normal_view_on_capture_mode(pNormalView);
- _vp_play_normal_view_create_layout_hide_timer(pNormalView);
- }
- }
-
- video_play_repeat_mode_t nRepeatMode = (video_play_repeat_mode_t)nType;
-
- vp_repeat_destroy(pNormalView->pRepeatHandle);
- pNormalView->pRepeatHandle = NULL;
- pNormalView->bIsPopupShow = FALSE;
-
- if (bPause) {
- if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
- VideoLogWarning("Pause Fail");
- }
- _vp_play_normal_view_set_play_state(pNormalView);
- _vp_play_normal_view_on_capture_mode(pNormalView);
- }
- else {
- _vp_play_normal_view_create_layout_hide_timer(pNormalView);
- }
-
- if (nRepeatMode != VIDEO_PLAY_REPEAT_NONE) {
- pNormalView->nRepeatMode = nRepeatMode;
- }
-}
-*/
-
-static void __vp_normal_setting_popup_close_cb(int nType, bool bPause, void *pUserData)
+static void __vp_normal_setting_popup_close_cb(int nType, bool bPause,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
pNormalView->pSettingHandle = NULL;
pNormalView->bIsPopupShow = FALSE;
- if (nType == VP_SETTING_MODE_NONE || nType == VP_SETTING_MODE_PLAY_SPEED) {
+ if (_vp_is_current_focus_available() != 0) {
+ VideoLogInfo("Cannot acquire focus. Setting video to pause state");
+ pNormalView->bManualPause = TRUE;
+ }
+
+ if (nType == VP_SETTING_MODE_NONE
+ || nType == VP_SETTING_MODE_PLAY_SPEED) {
if (bPause) {
if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
VideoLogWarning("Pause Fail");
}
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
_vp_play_normal_view_set_play_state(pNormalView);
if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
VideoLogWarning("Pause Fail");
}
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
_vp_play_normal_view_set_play_state(pNormalView);
}
}
-static void __vp_normal_capture_popup_close_cb(int nType, bool bPause, void *pUserData)
+static void __vp_normal_capture_popup_close_cb(int nType, bool bPause,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
}
if (nType != -1) {
- pNormalView->bCaptureMode = (bool)nType;
+ pNormalView->bCaptureMode = (bool) nType;
}
vp_play_preference_set_capture_on_key(pNormalView->bCaptureMode);
pNormalView->pCapturePopup = NULL;
pNormalView->bIsPopupShow = FALSE;
+ if (_vp_is_current_focus_available() != 0) {
+ VideoLogInfo("Cannot acquire focus. Setting video to pause state");
+ pNormalView->bManualPause = TRUE;
+ }
+
if (bPause) {
if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
VideoLogWarning("Pause Fail");
}
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
_vp_play_normal_view_set_play_state(pNormalView);
if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
VideoLogWarning("Pause Fail");
}
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
_vp_play_normal_view_set_play_state(pNormalView);
_vp_play_normal_view_on_capture_mode(pNormalView);
}
-static void __vp_normal_play_speed_popup_update_cb(double fValue, void *pUserData)
+static void __vp_normal_play_speed_popup_update_cb(double fValue,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
- vp_mm_player_set_rate(pNormalView->pPlayerHandle, (float)fValue);
+ vp_mm_player_set_rate(pNormalView->pPlayerHandle, (float) fValue);
}
-static void __vp_normal_play_speed_popup_done_cb(double fValue, bool bSetValue, void *pUserData)
+static void __vp_normal_play_speed_popup_done_cb(double fValue,
+ bool bSetValue,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
pNormalView->pPlaySpeedPopup = NULL;
pNormalView->bIsPopupShow = FALSE;
+ if (_vp_is_current_focus_available() != 0) {
+ VideoLogInfo("Cannot acquire focus. Setting video to pause state");
+ pNormalView->bManualPause = TRUE;
+ }
+
if (pNormalView->bManualPause == FALSE) {
if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
VideoLogWarning("Play Fail");
}
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
_vp_play_normal_view_set_play_state(pNormalView);
}
if ((fValue - 0.05) > 1.000 || (fValue + 0.05) < 1.000) {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_PLAYING_SPEED_SHOW, "*");
- elm_object_signal_callback_add(pNormalView->pMainLayout, "elm,action,click", "", _vp_play_normal_view_on_play_speed_popup_cb, pNormalView);
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_PLAYING_SPEED_SHOW,
+ "*");
+ elm_object_signal_callback_add(pNormalView->pMainLayout,
+ "elm,action,click", "",
+ _vp_play_normal_view_on_play_speed_popup_cb,
+ pNormalView);
_vp_play_normal_view_create_layout_hide_timer(pNormalView);
} else {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_PLAYING_SPEED_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_PLAYING_SPEED_HIDE,
+ "*");
}
- char szTxt[5] = {0,};
- snprintf(szTxt, 5, "%1.1fX", (float)pNormalView->fPlaySpeed);
- elm_object_part_text_set(pNormalView->pMainLayout, VP_PLAY_PART_NORMAL_PLAYING_SPEED_TXT, szTxt);
+ char szTxt[5] = { 0, };
+ snprintf(szTxt, 5, "%1.1fX", (float) pNormalView->fPlaySpeed);
+ elm_object_part_text_set(pNormalView->pMainLayout,
+ VP_PLAY_PART_NORMAL_PLAYING_SPEED_TXT,
+ szTxt);
}
- vp_mm_player_set_rate(pNormalView->pPlayerHandle, (float)pNormalView->fPlaySpeed);
+ vp_mm_player_set_rate(pNormalView->pPlayerHandle,
+ (float) pNormalView->fPlaySpeed);
}
-static void __vp_normal_subtitle_popup_close_cb(int nType, bool bPause, void *pUserData)
+static void __vp_normal_subtitle_popup_close_cb(int nType, bool bPause,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
- vp_subtitle_mode_t nSubtitleMode = (vp_subtitle_mode_t)nType;
+ vp_subtitle_mode_t nSubtitleMode = (vp_subtitle_mode_t) nType;
if (nSubtitleMode == VP_SUBTITLE_MODE_CLOSE) {
_vp_play_normal_view_set_subtitle_font_config(pNormalView);
vp_play_preference_get_subtitle_show_key(&bShow);
if (bShow) {
vp_play_subtitle_realize(pNormalView->pSubtitle);
- vp_mm_player_set_deactivate_subtitle(pNormalView->pPlayerHandle, FALSE);
+ vp_mm_player_set_deactivate_subtitle(pNormalView->
+ pPlayerHandle, FALSE);
} else {
vp_play_subtitle_unrealize(pNormalView->pSubtitle);
- vp_mm_player_set_deactivate_subtitle(pNormalView->pPlayerHandle, TRUE);
+ vp_mm_player_set_deactivate_subtitle(pNormalView->
+ pPlayerHandle, TRUE);
}
vp_subtitle_destroy(pNormalView->pSubtitlePopup);
pNormalView->pSubtitlePopup = NULL;
case VP_SUBTITLE_MODE_NONE:
case VP_SUBTITLE_MODE_CLOSE:
break;
- case VP_SUBTITLE_MODE_ACTIVATION: {
- bool bShow = FALSE;
- vp_play_preference_get_subtitle_show_key(&bShow);
- if (bShow) {
- vp_play_subtitle_realize(pNormalView->pSubtitle);
- vp_mm_player_set_deactivate_subtitle(pNormalView->pPlayerHandle, FALSE);
- } else {
- vp_play_subtitle_unrealize(pNormalView->pSubtitle);
- vp_mm_player_set_deactivate_subtitle(pNormalView->pPlayerHandle, TRUE);
+ case VP_SUBTITLE_MODE_ACTIVATION:{
+ bool bShow = FALSE;
+ vp_play_preference_get_subtitle_show_key(&bShow);
+ if (bShow) {
+ vp_play_subtitle_realize(pNormalView->pSubtitle);
+ vp_mm_player_set_deactivate_subtitle(pNormalView->
+ pPlayerHandle, FALSE);
+ } else {
+ vp_play_subtitle_unrealize(pNormalView->pSubtitle);
+ vp_mm_player_set_deactivate_subtitle(pNormalView->
+ pPlayerHandle, TRUE);
+ }
}
- }
- break;
+ break;
case VP_SUBTITLE_MODE_SYNC:
_vp_play_normal_view_on_subtitle_sync_popup(pNormalView);
break;
case VP_SUBTITLE_MODE_SIZE:
_vp_play_normal_view_on_subtitle_size_popup(pNormalView);
break;
-//#ifdef SUBTITLE_K_FEATURE
case VP_SUBTITLE_MODE_EDGE:
_vp_play_normal_view_on_subtitle_edge_popup(pNormalView);
break;
break;
#ifdef SUBTITLE_K_FEATURE
case VP_SUBTITLE_MODE_CAPTION_WINDOW:
- _vp_play_normal_view_on_subtitle_caption_win_color_popup(pNormalView);
+ _vp_play_normal_view_on_subtitle_caption_win_color_popup
+ (pNormalView);
break;
#endif
}
}
-static void __vp_normal_subtitle_sync_popup_update_cb(float fValue, void *pUserData)
+static void __vp_normal_subtitle_sync_popup_update_cb(float fValue,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
/* set subtitle sync value */
int nPosition = fValue * 1000;
- if (!vp_mm_player_set_subtitle_position(pNormalView->pPlayerHandle, nPosition)) {
+ if (!vp_mm_player_set_subtitle_position
+ (pNormalView->pPlayerHandle, nPosition)) {
VideoLogError("vp_mm_player_set_subtitle_position is fail");
}
}
-static void __vp_normal_subtitle_sync_popup_done_cb(float fValue, bool bSetValue, void *pUserData)
+static void __vp_normal_subtitle_sync_popup_done_cb(float fValue,
+ bool bSetValue,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
vp_subtitle_sync_popup_destroy(pNormalView->pSubtitleSyncPopup);
pNormalView->pSubtitleSyncPopup = NULL;
int nPosition = fValue * 1000;
pNormalView->fSubtitleSyncValue = fValue;
pNormalView->pPlayView->fSubtitleSyncValue = fValue;
- if (!vp_mm_player_set_subtitle_position(pNormalView->pPlayerHandle, nPosition)) {
+ if (!vp_mm_player_set_subtitle_position
+ (pNormalView->pPlayerHandle, nPosition)) {
VideoLogError("vp_mm_player_set_subtitle_position is fail");
}
} else {
/* set subtitle sync value */
int nPosition = pNormalView->fSubtitleSyncValue * 1000;
- if (!vp_mm_player_set_subtitle_position(pNormalView->pPlayerHandle, nPosition)) {
+ if (!vp_mm_player_set_subtitle_position
+ (pNormalView->pPlayerHandle, nPosition)) {
VideoLogError("vp_mm_player_set_subtitle_position is fail");
}
_vp_play_normal_view_on_subtitle_popup(pNormalView);
}
-static void __vp_normal_subtitle_size_popup_done_cb(int nType, bool bPause, void *pUserData)
+static void __vp_normal_subtitle_size_popup_done_cb(int nType, bool bPause,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
vp_play_preference_set_subtitle_size_key(nType);
_vp_play_normal_view_set_subtitle_font_config(pNormalView);
#ifdef SUBTITLE_K_FEATURE
- /*Set caption window: size, rel1, color*/
+ /*Set caption window: size, rel1, color */
__vp_normal_subtitle_set_caption_window(pNormalView);
#endif
}
if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
VideoLogWarning("Pause Fail");
}
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
_vp_play_normal_view_set_play_state(pNormalView);
}
_vp_play_normal_view_on_subtitle_popup(pNormalView);
- /*
- if (pNormalView->bManualPause == FALSE) {
- if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
- VideoLogWarning("Pause Fail");
- }
- _vp_play_normal_view_set_play_state(pNormalView);
- _vp_play_normal_view_on_capture_mode(pNormalView);
- _vp_play_normal_view_create_layout_hide_timer(pNormalView);
- }
- */
}
-static void __vp_normal_subtitle_font_popup_done_cb(char *szFontName, void *pUserData)
+static void __vp_normal_subtitle_font_popup_done_cb(char *szFontName,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
if (szFontName) {
vp_play_subtitle_set_font(pNormalView->pSubtitle, szFontName);
vp_play_preference_set_subtitle_font_name_key(szFontName);
_vp_play_normal_view_set_subtitle_font_config(pNormalView);
#ifdef SUBTITLE_K_FEATURE
- /*Set caption window: size, rel1, color*/
+ /*Set caption window: size, rel1, color */
__vp_normal_subtitle_set_caption_window(pNormalView);
#endif
}
pNormalView->pSubtitleFontPopup = NULL;
pNormalView->bIsPopupShow = FALSE;
- /*
- if (pNormalView->bManualPause == FALSE) {
- if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
- VideoLogWarning("Pause Fail");
- }
- _vp_play_normal_view_set_play_state(pNormalView);
- _vp_play_normal_view_on_capture_mode(pNormalView);
- _vp_play_normal_view_create_layout_hide_timer(pNormalView);
- }
- */
_vp_play_normal_view_on_subtitle_popup(pNormalView);
}
-static void __vp_normal_subtitle_select_button_popup_done_cb(char *option, void *pUserData)
+static void __vp_normal_subtitle_select_button_popup_done_cb(char *option,
+ void
+ *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
vp_subtitle_select_destroy(pNormalView->pSubtitleSelectPopup);
pNormalView->pSubtitleSelectPopup = NULL;
pNormalView->bIsPopupShow = FALSE;
+
+ if (_vp_is_current_focus_available() != 0) {
+ VideoLogInfo
+ ("Cannot acquire focus. Setting video to pause state");
+ pNormalView->bManualPause = TRUE;
+ }
+
if (pNormalView->bManualPause == FALSE) {
if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
VideoLogWarning("Pause Fail");
}
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
_vp_play_normal_view_set_play_state(pNormalView);
}
}
-static void __vp_normal_subtitle_select_popup_done_cb(char *szFilePath, void *pUserData)
+static void __vp_normal_subtitle_select_popup_done_cb(char *szFilePath,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
vp_subtitle_select_destroy(pNormalView->pSubtitleSelectPopup);
pNormalView->pSubtitleSelectPopup = NULL;
pNormalView->bIsPopupShow = FALSE;
+
+ if (_vp_is_current_focus_available() != 0) {
+ VideoLogInfo("Cannot acquire focus. Setting video to pause state");
+ pNormalView->bManualPause = TRUE;
+ }
+
if (pNormalView->bManualPause == FALSE) {
if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
VideoLogWarning("Pause Fail");
}
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
_vp_play_normal_view_set_play_state(pNormalView);
}
if (!strcmp(szFilePath, VP_PLAY_STRING_SUBTITLE_OFF)) {
pNormalView->bIsExistSubtitle = FALSE;
- vp_mm_player_set_deactivate_subtitle(pNormalView->pPlayerHandle, TRUE);
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SUBTITLE_HIDE, "*");
+ vp_mm_player_set_deactivate_subtitle(pNormalView->pPlayerHandle,
+ TRUE);
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SUBTITLE_HIDE, "*");
goto SELECT_DONE;
} else {
bool bOn = FALSE;
vp_play_preference_get_subtitle_show_key(&bOn);
if (bOn) {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SUBTITLE_PORTRAIT, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SUBTITLE_PORTRAIT,
+ "*");
pNormalView->bIsExistSubtitle = TRUE;
- vp_mm_player_set_deactivate_subtitle(pNormalView->pPlayerHandle, FALSE);
+ vp_mm_player_set_deactivate_subtitle(pNormalView->
+ pPlayerHandle, FALSE);
}
}
VP_FREE(pNormalView->szSubtitleURL);
goto SELECT_DONE;
}
}
- /*
- int nPosition = 0;
- if (!vp_mm_player_get_position(pNormalView->pPlayerHandle, &nPosition)) {
- VideoLogError("vp_mm_player_get_position is fail");
- pNormalView->nStartPosition = nPosition;
- }
- */
- pNormalView->bIsExistSubtitle = vp_mm_player_set_subtitle_url(pNormalView->pPlayerHandle, szFilePath);
-SELECT_DONE:
+ pNormalView->bIsExistSubtitle =
+ vp_mm_player_set_subtitle_url(pNormalView->pPlayerHandle,
+ szFilePath);
+
+ SELECT_DONE:
VP_FREE(szSubtitle);
- /*if (pNormalView->bIsExistSubtitle) {
- _vp_play_normal_view_on_subtitle_popup(pNormalView);
- }*/
}
#ifndef SUBTITLE_K_FEATURE
-static void __vp_normal_subtitle_font_color_popup_done_cb(int nType, bool bPause, void *pUserData)
+static void __vp_normal_subtitle_font_color_popup_done_cb(int nType,
+ bool bPause,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
vp_subtitle_color_destroy(pNormalView->pSubtitleFontColorPopup);
pNormalView->pSubtitleFontColorPopup = NULL;
_vp_play_normal_view_on_subtitle_popup(pNormalView);
- /*if (bPause) {
- if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
- VideoLogWarning("Pause Fail");
- }
- _vp_play_normal_view_set_play_state(pNormalView);
- _vp_play_normal_view_on_capture_mode(pNormalView);
- }
- if (pNormalView->bManualPause == FALSE) {
- if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
- VideoLogWarning("Pause Fail");
- }
- _vp_play_normal_view_set_play_state(pNormalView);
- _vp_play_normal_view_on_capture_mode(pNormalView);
- _vp_play_normal_view_create_layout_hide_timer(pNormalView);
- }*/
+
}
-static void __vp_normal_subtitle_bg_color_popup_done_cb(int nType, bool bPause, void *pUserData)
+static void __vp_normal_subtitle_bg_color_popup_done_cb(int nType,
+ bool bPause,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
vp_subtitle_bg_color_destroy(pNormalView->pSubtitleBGColorPopup);
pNormalView->pSubtitleBGColorPopup = NULL;
}
_vp_play_normal_view_on_subtitle_popup(pNormalView);
- /*if (bPause) {
- if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
- VideoLogWarning("Pause Fail");
- }
- _vp_play_normal_view_set_play_state(pNormalView);
- _vp_play_normal_view_on_capture_mode(pNormalView);
- }
- if (pNormalView->bManualPause == FALSE) {
- if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
- VideoLogWarning("Pause Fail");
- }
- _vp_play_normal_view_set_play_state(pNormalView);
- _vp_play_normal_view_on_capture_mode(pNormalView);
- _vp_play_normal_view_create_layout_hide_timer(pNormalView);
- }*/
}
#else
-static void __vp_normal_subtitle_font_color_popup_done_hex_cb(char *pColorHex, bool bSetValue, void *pUserData)
+static void __vp_normal_subtitle_font_color_popup_done_hex_cb(char
+ *pColorHex,
+ bool
+ bSetValue,
+ void
+ *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
char *pSelectColorHex = strdup(pColorHex);
vp_subtitle_color_destroy(pNormalView->pSubtitleFontColorPopup);
VideoLogInfo("pSelectColorHex =%s", pSelectColorHex);
if (pSelectColorHex != NULL) {
- vp_play_subtitle_set_color(pNormalView->pSubtitle, pSelectColorHex);
+ vp_play_subtitle_set_color(pNormalView->pSubtitle,
+ pSelectColorHex);
- vp_play_preference_set_subtitle_font_color_hex_key(pSelectColorHex);
+ vp_play_preference_set_subtitle_font_color_hex_key
+ (pSelectColorHex);
_vp_play_normal_view_set_subtitle_font_config(pNormalView);
_vp_play_normal_view_on_subtitle_popup(pNormalView);
}
-static void __vp_normal_subtitle_bg_color_popup_done_hex_cb(char *pColorHex, bool bSetValue, void *pUserData)
+static void __vp_normal_subtitle_bg_color_popup_done_hex_cb(char
+ *pColorHex,
+ bool bSetValue,
+ void
+ *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
char *pSelectColorHex = strdup(pColorHex);
vp_subtitle_color_destroy(pNormalView->pSubtitleBGColorPopup);
if (bSetValue) {
VideoLogInfo("pSelectColorHex =%s", pSelectColorHex);
if (pSelectColorHex != NULL) {
- vp_play_subtitle_set_bg_color(pNormalView->pSubtitle, pSelectColorHex);
+ vp_play_subtitle_set_bg_color(pNormalView->pSubtitle,
+ pSelectColorHex);
- vp_play_preference_set_subtitle_bg_color_hex_key(pSelectColorHex);
+ vp_play_preference_set_subtitle_bg_color_hex_key
+ (pSelectColorHex);
_vp_play_normal_view_set_subtitle_font_config(pNormalView);
_vp_play_normal_view_on_subtitle_popup(pNormalView);
}
-static void __vp_normal_subtitle_caption_win_color_popup_done_hex_cb(char *pColorHex, bool bSetValue, void *pUserData)
+static void __vp_normal_subtitle_caption_win_color_popup_done_hex_cb(char
+ *pColorHex,
+ bool
+ bSetValue,
+ void
+ *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
char *pSelectColorHex = strdup(pColorHex);
vp_subtitle_color_destroy(pNormalView->pSubtitleCaptionWinColorPopup);
if (bSetValue) {
VideoLogInfo("pSelectColorHex =%s", pSelectColorHex);
if (pSelectColorHex != NULL) {
- vp_play_preference_set_subtitle_caption_win_color_hex_key(pSelectColorHex);
- vp_play_subtitle_set_caption_win_color(pNormalView->pSubtitle, TRUE);
+ vp_play_preference_set_subtitle_caption_win_color_hex_key
+ (pSelectColorHex);
+ vp_play_subtitle_set_caption_win_color(pNormalView->pSubtitle,
+ TRUE);
}
}
#endif
-static void __vp_normal_subtitle_track_popup_close_cb(int nType, bool bPause, void *pUserData)
+static void __vp_normal_subtitle_track_popup_close_cb(int nType,
+ bool bPause,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
vp_subtitle_track_destroy(pNormalView->pSubtitleTrackHandle);
pNormalView->pSubtitleTrackHandle = NULL;
if (nType >= 0) {
- /*if (bPause) {
- if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
- VideoLogWarning("Pause Fail");
- }
- _vp_play_normal_view_set_play_state(pNormalView);
- _vp_play_normal_view_on_capture_mode(pNormalView);
- }
- else {
- if (pNormalView->bManualPause == FALSE) {
- if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
- VideoLogWarning("Pause Fail");
- }
- _vp_play_normal_view_set_play_state(pNormalView);
- _vp_play_normal_view_on_capture_mode(pNormalView);
- _vp_play_normal_view_create_layout_hide_timer(pNormalView);
- }
- }*/
-
pNormalView->nDefaultSubtitleTrackIndex = nType;
#ifndef _SUBTITLE_MULTI_LANGUAGE
- vp_mm_player_set_subtitle_track(pNormalView->pPlayerHandle, pNormalView->nDefaultSubtitleTrackIndex);
+ vp_mm_player_set_subtitle_track(pNormalView->pPlayerHandle,
+ pNormalView->
+ nDefaultSubtitleTrackIndex);
#endif
_vp_play_normal_view_on_subtitle_popup(pNormalView);
-static void __vp_normal_detail_popup_close_cb(int nType, bool bPause, void *pUserData)
+static void __vp_normal_detail_popup_close_cb(int nType, bool bPause,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
}
+
+ if (_vp_is_current_focus_available() != 0) {
+ VideoLogInfo("Cannot acquire focus. Setting video to pause state");
+ pNormalView->bManualPause = TRUE;
+ }
+
if (pNormalView->bManualPause == FALSE) {
if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
VideoLogWarning("resume Fail");
if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
VideoLogWarning("Pause Fail");
}
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
_vp_play_normal_view_set_play_state(pNormalView);
}
-static void __vp_normal_audio_track_popup_close_cb(int nType, bool bPause, void *pUserData)
+static void __vp_normal_audio_track_popup_close_cb(int nType, bool bPause,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
}
+
+ if (_vp_is_current_focus_available() != 0) {
+ VideoLogInfo("Cannot acquire focus. Setting video to pause state");
+ pNormalView->bManualPause = TRUE;
+ }
+
if (bPause) {
if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
VideoLogWarning("Pause Fail");
if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
VideoLogWarning("Pause Fail");
}
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
_vp_play_normal_view_set_play_state(pNormalView);
if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
VideoLogWarning("Pause Fail");
}
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
_vp_play_normal_view_set_play_state(pNormalView);
if (nType != -1) {
pNormalView->nDefaultAudioTrackIndex = nType;
- vp_mm_player_set_audio_track(pNormalView->pPlayerHandle, pNormalView->nDefaultAudioTrackIndex);
+ vp_mm_player_set_audio_track(pNormalView->pPlayerHandle,
+ pNormalView->nDefaultAudioTrackIndex);
}
}
-static Evas_Event_Flags __vp_normal_gesture_n_tab_start_cb(void *pUserData , void *pEventInfo)
+static Evas_Event_Flags __vp_normal_gesture_n_tab_start_cb(void *pUserData,
+ void
+ *pEventInfo)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return EVAS_EVENT_FLAG_NONE;
}
-static Evas_Event_Flags __vp_normal_gesture_n_tab_end_cb(void *pUserData , void *pEventInfo)
+static Evas_Event_Flags __vp_normal_gesture_n_tab_end_cb(void *pUserData,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
}
Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) pEventInfo;
- NormalView *pNormalView = (NormalView *)pUserData;
- VideoLogInfo("gesture tab = %d" , p->n);
+ NormalView *pNormalView = (NormalView *) pUserData;
+ VideoLogInfo("gesture tab = %d", p->n);
if (p->n == 1) {
if (pNormalView->pVolumeHandle) {
bool bIsRealize = FALSE;
- if (!vp_play_volume_is_realize(pNormalView->pVolumeHandle, &bIsRealize)) {
+ if (!vp_play_volume_is_realize
+ (pNormalView->pVolumeHandle, &bIsRealize)) {
VideoLogWarning("vp_play_volume_is_realize is fail");
}
return EVAS_EVENT_FLAG_NONE;
}
-static Evas_Event_Flags __vp_normal_gesture_n_tab_abort_cb(void *pUserData , void *pEventInfo)
+static Evas_Event_Flags __vp_normal_gesture_n_tab_abort_cb(void *pUserData,
+ void
+ *pEventInfo)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
if (pNormalView->bIsActive == FALSE) {
VideoLogError("Not Active mode");
}
Evas_Object *pParent = pNormalView->pPlayView->pWin;
- pNormalView->pVolumePopupHandle = vp_play_volume_popup_create(pParent);
+ pNormalView->pVolumePopupHandle =
+ vp_play_volume_popup_create(pParent);
if (!pNormalView->pVolumePopupHandle) {
VideoLogError("pNormalView->pVolumePopupHandle is NULL");
return;
bool bIsRealize = FALSE;
- if (!vp_play_volume_popup_is_realize(pNormalView->pVolumePopupHandle, &bIsRealize)) {
+ if (!vp_play_volume_popup_is_realize
+ (pNormalView->pVolumePopupHandle, &bIsRealize)) {
VideoLogWarning("vp_play_volume_popup_is_realize is fail");
return;
}
if (bIsRealize == FALSE) {
bool bLandscape = FALSE;
- if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_90 || pNormalView->nRotate == VIDEO_PLAY_ROTATE_270) {
+ if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_90
+ || pNormalView->nRotate == VIDEO_PLAY_ROTATE_270) {
bLandscape = TRUE;
}
- if (!vp_play_volume_popup_set_landscape_mode(pNormalView->pVolumePopupHandle, bLandscape)) {
- VideoLogWarning("vp_play_volume_popup_set_landscape_mode is fail");
+ if (!vp_play_volume_popup_set_landscape_mode
+ (pNormalView->pVolumePopupHandle, bLandscape)) {
+ VideoLogWarning
+ ("vp_play_volume_popup_set_landscape_mode is fail");
}
if (!vp_play_volume_popup_realize(pNormalView->pVolumePopupHandle)) {
}
if (pNormalView->bMomentumIncrease) {
int nMaxVal = 0;
- if (!vp_play_volume_popup_set_value(pNormalView->pVolumePopupHandle, pNormalView->nMomentDefaultVal + pNormalView->nMomentWeight)) {
+ if (!vp_play_volume_popup_set_value
+ (pNormalView->pVolumePopupHandle,
+ pNormalView->nMomentDefaultVal +
+ pNormalView->nMomentWeight)) {
VideoLogWarning("vp_play_volume_popup_set_value is fail");
}
if (vp_play_volume_popup_get_max_value(&nMaxVal)) {
- if (pNormalView->nMomentDefaultVal + pNormalView->nMomentWeight >= nMaxVal) {
- pNormalView->nGestureStartPosY = pNormalView->nGestureOldPosY;
+ if (pNormalView->nMomentDefaultVal +
+ pNormalView->nMomentWeight >= nMaxVal) {
+ pNormalView->nGestureStartPosY =
+ pNormalView->nGestureOldPosY;
pNormalView->nMomentDefaultVal = nMaxVal;
}
}
} else {
- if (!vp_play_volume_popup_set_value(pNormalView->pVolumePopupHandle, pNormalView->nMomentDefaultVal - pNormalView->nMomentWeight)) {
+ if (!vp_play_volume_popup_set_value
+ (pNormalView->pVolumePopupHandle,
+ pNormalView->nMomentDefaultVal -
+ pNormalView->nMomentWeight)) {
VideoLogWarning("vp_play_volume_popup_set_value is fail");
}
- if (pNormalView->nMomentDefaultVal - pNormalView->nMomentWeight <= 0) {
+ if (pNormalView->nMomentDefaultVal - pNormalView->nMomentWeight <=
+ 0) {
pNormalView->nGestureStartPosY = pNormalView->nGestureOldPosY;
pNormalView->nMomentDefaultVal = 0;
}
}
+ //vp_play_volume_update_value(pNormalView->pVolumeHandle);
+ _vp_play_normal_view_set_volume_state(pNormalView);
VP_EVAS_JOB_DEL(pNormalView->pVolumeJob);
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
if (pNormalView->bIsActive == FALSE) {
VideoLogError("Not Active mode");
}
Evas_Object *pParent = pNormalView->pPlayView->pWin;
- pNormalView->pBrightnessHandle = vp_play_brightness_create(pParent);
+ pNormalView->pBrightnessHandle =
+ vp_play_brightness_create(pParent);
if (!pNormalView->pBrightnessHandle) {
VideoLogError("pNormalView->pBrightnessHandle is NULL");
return;
bool bIsRealize = FALSE;
- if (!vp_play_brightness_is_realize(pNormalView->pBrightnessHandle, &bIsRealize)) {
+ if (!vp_play_brightness_is_realize
+ (pNormalView->pBrightnessHandle, &bIsRealize)) {
VideoLogWarning("vp_play_brightness_is_realize is fail");
return;
}
if (bIsRealize == FALSE) {
bool bLandscape = FALSE;
- if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_90 || pNormalView->nRotate == VIDEO_PLAY_ROTATE_270) {
+ if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_90
+ || pNormalView->nRotate == VIDEO_PLAY_ROTATE_270) {
bLandscape = TRUE;
}
- if (!vp_play_brightness_set_landscape_mode(pNormalView->pBrightnessHandle, bLandscape)) {
- VideoLogWarning("vp_play_brightness_set_landscape_mode is fail");
+ if (!vp_play_brightness_set_landscape_mode
+ (pNormalView->pBrightnessHandle, bLandscape)) {
+ VideoLogWarning
+ ("vp_play_brightness_set_landscape_mode is fail");
}
if (!vp_play_brightness_realize(pNormalView->pBrightnessHandle)) {
if (pNormalView->bMomentumIncrease) {
int nMaxVal = 0;
- if (!vp_play_brightness_set_value(pNormalView->pBrightnessHandle, pNormalView->nMomentDefaultVal + pNormalView->nMomentWeight)) {
+ if (!vp_play_brightness_set_value
+ (pNormalView->pBrightnessHandle,
+ pNormalView->nMomentDefaultVal +
+ pNormalView->nMomentWeight)) {
VideoLogWarning("vp_play_brightness_set_value is fail");
}
if (vp_play_brightness_get_max_value(&nMaxVal)) {
- if (pNormalView->nMomentDefaultVal + pNormalView->nMomentWeight >= nMaxVal) {
- pNormalView->nGestureStartPosY = pNormalView->nGestureOldPosY;
+ if (pNormalView->nMomentDefaultVal +
+ pNormalView->nMomentWeight >= nMaxVal) {
+ pNormalView->nGestureStartPosY =
+ pNormalView->nGestureOldPosY;
pNormalView->nMomentDefaultVal = nMaxVal;
}
}
} else {
int nMinVal = 0;
- if (!vp_play_brightness_set_value(pNormalView->pBrightnessHandle, pNormalView->nMomentDefaultVal - pNormalView->nMomentWeight)) {
+ if (!vp_play_brightness_set_value
+ (pNormalView->pBrightnessHandle,
+ pNormalView->nMomentDefaultVal -
+ pNormalView->nMomentWeight)) {
VideoLogWarning("vp_play_brightness_set_value is fail");
}
if (vp_play_brightness_get_min_value(&nMinVal)) {
- if (pNormalView->nMomentDefaultVal - pNormalView->nMomentWeight <= nMinVal) {
- pNormalView->nGestureStartPosY = pNormalView->nGestureOldPosY;
+ if (pNormalView->nMomentDefaultVal -
+ pNormalView->nMomentWeight <= nMinVal) {
+ pNormalView->nGestureStartPosY =
+ pNormalView->nGestureOldPosY;
pNormalView->nMomentDefaultVal = nMinVal;
}
}
return EINA_FALSE;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
#ifdef SUBTITLE_K_FEATURE
if (pNormalView->bSubtitleDown) {
if (bVolumeMode) {
VP_EVAS_JOB_DEL(pNormalView->pVolumeJob);
- pNormalView->pVolumeJob = ecore_job_add(__vp_normal_volume_job_cb, (void *)pNormalView);
+ pNormalView->pVolumeJob =
+ ecore_job_add(__vp_normal_volume_job_cb, (void *) pNormalView);
} else {
VP_EVAS_JOB_DEL(pNormalView->pBrightnessJob);
- pNormalView->pBrightnessJob = ecore_job_add(__vp_normal_brightness_job_cb, (void *)pNormalView);
+ pNormalView->pBrightnessJob =
+ ecore_job_add(__vp_normal_brightness_job_cb,
+ (void *) pNormalView);
}
return EINA_FALSE;
}
#endif
-static Evas_Event_Flags __vp_normal_gesture_momentum_start_cb(void *pUserData, void *pEventInfo)
+static Evas_Event_Flags __vp_normal_gesture_momentum_start_cb(void
+ *pUserData,
+ void
+ *pEventInfo)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return EVAS_EVENT_FLAG_NONE;
}
- Elm_Gesture_Momentum_Info *p = (Elm_Gesture_Momentum_Info *) pEventInfo;
- NormalView *pNormalView = (NormalView *)pUserData;
+ Elm_Gesture_Momentum_Info *p =
+ (Elm_Gesture_Momentum_Info *) pEventInfo;
+ NormalView *pNormalView = (NormalView *) pUserData;
if (pNormalView->bLockScreen) {
return EVAS_EVENT_FLAG_NONE;
}
int nWidth, nHeight;
bool bLandscape = FALSE;
- if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_90 || pNormalView->nRotate == VIDEO_PLAY_ROTATE_270) {
+ if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_90
+ || pNormalView->nRotate == VIDEO_PLAY_ROTATE_270) {
bLandscape = TRUE;
}
- elm_win_screen_size_get(pNormalView->pPlayView->pWin, NULL, NULL, &nWidth, &nHeight);
+ elm_win_screen_size_get(pNormalView->pPlayView->pWin, NULL, NULL,
+ &nWidth, &nHeight);
if (bLandscape) {
pNormalView->nWindowWidth = nHeight;
pNormalView->nWindowHeight = nWidth;
bool bIsVolumeRealize = FALSE;
if (pNormalView->pVolumeHandle) {
- vp_play_volume_is_realize(pNormalView->pVolumeHandle, &bIsVolumeRealize);
+ vp_play_volume_is_realize(pNormalView->pVolumeHandle,
+ &bIsVolumeRealize);
}
if (bVolumeMode && bIsVolumeRealize) {
if (pNormalView->pVolumePopupHandle) {
- if (!vp_play_volume_popup_unrealize(pNormalView->pVolumePopupHandle)) {
- VideoLogWarning("vp_play_volume_popup_unrealize is fail");
+ if (!vp_play_volume_popup_unrealize
+ (pNormalView->pVolumePopupHandle)) {
+ VideoLogWarning
+ ("vp_play_volume_popup_unrealize is fail");
}
}
return EVAS_EVENT_FLAG_NONE;
if (bVolumeMode) {
- if (!vp_play_volume_popup_get_value(&pNormalView->nMomentDefaultVal)) {
+ if (!vp_play_volume_popup_get_value
+ (&pNormalView->nMomentDefaultVal)) {
VideoLogError("vp_play_volume_popup_get_value is fail");
}
if (!vp_play_volume_popup_get_max_value(&nMaxVal)) {
- VideoLogError("vp_play_volume_popup_get_max_value is fail");
+ VideoLogError
+ ("vp_play_volume_popup_get_max_value is fail");
}
} else {
- if (!vp_play_brightness_get_value(&pNormalView->nMomentDefaultVal)) {
+ if (!vp_play_brightness_get_value
+ (&pNormalView->nMomentDefaultVal)) {
VideoLogError("vp_play_brightness_get_value is fail");
}
if (!vp_play_brightness_get_max_value(&nMaxVal)) {
VP_EVAS_TIMER_DEL(pNormalView->pMomentTimer);
pNormalView->pMomentTimer = NULL;
- pNormalView->pMomentTimer = ecore_timer_add(VP_NORMAL_MOMENTUM_PRESS_TIMER_INTERVAL,
- __vp_normal_momentum_press_timer_cb, (void *)pNormalView);
+ pNormalView->pMomentTimer =
+ ecore_timer_add(VP_NORMAL_MOMENTUM_PRESS_TIMER_INTERVAL,
+ __vp_normal_momentum_press_timer_cb,
+ (void *) pNormalView);
if (nMaxVal <= 0) {
nMaxVal = 1;
}
- pNormalView->nMomentStep = (pNormalView->nWindowHeight / 2) / (nMaxVal - nMinVal);
+ pNormalView->nMomentStep =
+ (pNormalView->nWindowHeight / 2) / (nMaxVal - nMinVal);
#endif
- } else {
+ } else {
pNormalView->nGestureStartPosX = p->x2;
pNormalView->nGestureStartPosY = p->y2;
}
return EVAS_EVENT_FLAG_ON_HOLD;
}
-static Evas_Event_Flags __vp_normal_gesture_momentum_move_cb(void *pUserData, void *pEventInfo)
+static Evas_Event_Flags __vp_normal_gesture_momentum_move_cb(void
+ *pUserData,
+ void
+ *pEventInfo)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return EVAS_EVENT_FLAG_NONE;
}
- Elm_Gesture_Momentum_Info *p = (Elm_Gesture_Momentum_Info *) pEventInfo;
- NormalView *pNormalView = (NormalView *)pUserData;
+ Elm_Gesture_Momentum_Info *p =
+ (Elm_Gesture_Momentum_Info *) pEventInfo;
+ NormalView *pNormalView = (NormalView *) pUserData;
#ifdef SUBTITLE_K_FEATURE
if (pNormalView->pSubtitleMoveTimer || pNormalView->bSubtitleDown) {
if (pNormalView->bZoomEnable == FALSE) {
#ifdef ENABLE_VOLUME_BRIGHTNESS_POPUP
- if (!pNormalView->pMomentTimer ||
- pNormalView->bLockScreen) {
+ if (!pNormalView->pMomentTimer || pNormalView->bLockScreen) {
return EVAS_EVENT_FLAG_NONE;
}
bool bIsVolumeRealize = FALSE;
if (pNormalView->pVolumeHandle) {
- vp_play_volume_is_realize(pNormalView->pVolumeHandle, &bIsVolumeRealize);
+ vp_play_volume_is_realize(pNormalView->pVolumeHandle,
+ &bIsVolumeRealize);
}
if (bVolumeMode && bIsVolumeRealize) {
if (pNormalView->pVolumePopupHandle) {
- if (!vp_play_volume_popup_unrealize(pNormalView->pVolumePopupHandle)) {
- VideoLogWarning("vp_play_volume_popup_unrealize is fail");
+ if (!vp_play_volume_popup_unrealize
+ (pNormalView->pVolumePopupHandle)) {
+ VideoLogWarning
+ ("vp_play_volume_popup_unrealize is fail");
}
}
return EVAS_EVENT_FLAG_NONE;
if (bVolumeMode) {
VP_EVAS_JOB_DEL(pNormalView->pVolumeJob);
- pNormalView->pVolumeJob = ecore_job_add(__vp_normal_volume_job_cb, (void *)pNormalView);
+ pNormalView->pVolumeJob =
+ ecore_job_add(__vp_normal_volume_job_cb,
+ (void *) pNormalView);
} else {
VP_EVAS_JOB_DEL(pNormalView->pBrightnessJob);
- pNormalView->pBrightnessJob = ecore_job_add(__vp_normal_brightness_job_cb, (void *)pNormalView);
+ pNormalView->pBrightnessJob =
+ ecore_job_add(__vp_normal_brightness_job_cb,
+ (void *) pNormalView);
}
#endif
} else {
nDiffY = p->y2 - pNormalView->nGestureStartPosY;
vp_zoom_guide_get_move_position(pNormalView->pZoomGuide, &fX, &fY);
- Evas_Coord_Rectangle rtSrc = {0,};
- Evas_Coord_Rectangle rtDst = {0,};
- Evas_Coord_Rectangle rtResult = {0,};
+ Evas_Coord_Rectangle rtSrc = { 0, };
+ Evas_Coord_Rectangle rtDst = { 0, };
+ Evas_Coord_Rectangle rtResult = { 0, };
- elm_win_screen_size_get(pNormalView->pPlayView->pWin, NULL, NULL, &nWidth, &nHeight);
+ elm_win_screen_size_get(pNormalView->pPlayView->pWin, NULL, NULL,
+ &nWidth, &nHeight);
- if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_90 || pNormalView->nRotate == VIDEO_PLAY_ROTATE_270) {
+ if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_90
+ || pNormalView->nRotate == VIDEO_PLAY_ROTATE_270) {
rtDst.w = nHeight;
rtDst.h = nWidth;
} else {
rtDst.w = nWidth;
rtDst.h = nHeight;
}
- vp_mm_player_get_resolution(pNormalView->pPlayerHandle, &(rtSrc.w), &(rtSrc.h));
+ vp_mm_player_get_resolution(pNormalView->pPlayerHandle, &(rtSrc.w),
+ &(rtSrc.h));
- vp_play_util_calculator_position(rtSrc, rtDst, &rtResult, pNormalView->nDisplayMode);
+ vp_play_util_calculator_position(rtSrc, rtDst, &rtResult,
+ pNormalView->nDisplayMode);
- fX -= (double)nDiffX / rtResult.w;
- fY -= (double)nDiffY / rtResult.h;
+ fX -= (double) nDiffX / rtResult.w;
+ fY -= (double) nDiffY / rtResult.h;
pNormalView->nGestureStartPosX = p->x2;
pNormalView->nGestureStartPosY = p->y2;
vp_zoom_guide_set_move_position(pNormalView->pZoomGuide, fX, fY);
- //vp_zoom_guide_get_move_position(pNormalView->pZoomGuide, &fX, &fY);
vp_zoom_guide_get_real_position(pNormalView->pZoomGuide, &fX, &fY);
- //VideoLogError("ZoomValue : [%f], offset_x : [%d], offset_y : [%d]", pNormalView->fZoomValue, (int)(fX * rtSrc.w), (int)(fY * rtSrc.h));
- vp_mm_player_set_zoom(pNormalView->pPlayerHandle, pNormalView->fZoomValue, (int)(fX * rtSrc.w), (int)(fY * rtSrc.h));
+ vp_mm_player_set_zoom(pNormalView->pPlayerHandle,
+ pNormalView->fZoomValue,
+ (int) (fX * rtSrc.w), (int) (fY * rtSrc.h));
}
return EVAS_EVENT_FLAG_ON_HOLD;
}
-static Evas_Event_Flags __vp_normal_gesture_momentum_end_cb(void *pUserData, void *pEventInfo)
+static Evas_Event_Flags __vp_normal_gesture_momentum_end_cb(void
+ *pUserData,
+ void
+ *pEventInfo)
{
VideoLogInfo("");
if (!pUserData) {
return EVAS_EVENT_FLAG_NONE;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
if (pNormalView->bLockScreen) {
VideoLogError("Skip for lock mode");
return EVAS_EVENT_FLAG_NONE;
}
-
#ifdef SUBTITLE_K_FEATURE
if (pNormalView->pSubtitleMoveTimer || pNormalView->bSubtitleDown) {
VideoLogWarning("Longpress subtitle");
VideoLogWarning("vp_play_brightness_unrealize is fail");
}
- if (!vp_play_volume_popup_unrealize(pNormalView->pVolumePopupHandle)) {
+ if (!vp_play_volume_popup_unrealize
+ (pNormalView->pVolumePopupHandle)) {
VideoLogWarning("vp_play_volume_popup_unrealize is fail");
}
}
#ifdef ENABLE_GESTURE_ZOOM_FEATURE
-static Evas_Event_Flags __vp_normal_gesture_zoom_start_cb(void *pUserData, void *pEventInfo)
+static Evas_Event_Flags __vp_normal_gesture_zoom_start_cb(void *pUserData,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
if (pNormalView->bLockScreen) {
VideoLogError("Skip for lock mode");
return EVAS_EVENT_FLAG_NONE;
}
- Elm_Gesture_Zoom_Info *pZoomInfo = (Elm_Gesture_Zoom_Info *) pEventInfo;
+ Elm_Gesture_Zoom_Info *pZoomInfo =
+ (Elm_Gesture_Zoom_Info *) pEventInfo;
pNormalView->fActiveZoom = pZoomInfo->zoom;
return EVAS_EVENT_FLAG_ON_HOLD;
}
-static Evas_Event_Flags __vp_normal_gesture_zoom_move_cb(void *pUserData, void *pEventInfo)
+static Evas_Event_Flags __vp_normal_gesture_zoom_move_cb(void *pUserData,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return EVAS_EVENT_FLAG_NONE;
}
- NormalView *pNormalView = (NormalView *)pUserData;
- Elm_Gesture_Zoom_Info *pZoomInfo = (Elm_Gesture_Zoom_Info *) pEventInfo;
+ NormalView *pNormalView = (NormalView *) pUserData;
+ Elm_Gesture_Zoom_Info *pZoomInfo =
+ (Elm_Gesture_Zoom_Info *) pEventInfo;
if (pNormalView->bLockScreen) {
VideoLogError("Skip for lock mode");
} else if (pNormalView->fZoomValue > 3.0) {
pNormalView->fZoomValue = 3.0;
}
-
// event filtering
bool bLandscape = FALSE;
- if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_90 || pNormalView->nRotate == VIDEO_PLAY_ROTATE_270) {
+ if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_90
+ || pNormalView->nRotate == VIDEO_PLAY_ROTATE_270) {
bLandscape = TRUE;
}
- if (bLandscape && fabs(pNormalView->fPrevZoomValue - pNormalView->fZoomValue) < 0.05) {
-// VideoLogWarning("same ZoomValue. skip it");
+ if (bLandscape
+ && fabs(pNormalView->fPrevZoomValue - pNormalView->fZoomValue) <
+ 0.05) {
return EVAS_EVENT_FLAG_ON_HOLD;
}
int nSrcW = 0;
int nSrcH = 0;
- vp_mm_player_get_resolution(pNormalView->pPlayerHandle, &nSrcW, &nSrcH);
+ vp_mm_player_get_resolution(pNormalView->pPlayerHandle, &nSrcW,
+ &nSrcH);
vp_zoom_guide_get_real_position(pNormalView->pZoomGuide, &fX, &fY);
// event filtering
if ((pNormalView->fZoomValue > 1.0 && pNormalView->fZoomValue < 3.0) &&
- (pNormalView->nPrevZoomPosX == (int)(fX * nSrcW)) && (pNormalView->nPrevZoomPosY == (int)(fY * nSrcH))) {
-// VideoLogWarning("skip same position");
+ (pNormalView->nPrevZoomPosX == (int) (fX * nSrcW))
+ && (pNormalView->nPrevZoomPosY == (int) (fY * nSrcH))) {
return EVAS_EVENT_FLAG_ON_HOLD;
}
- pNormalView->nPrevZoomPosX = (int)(fX * nSrcW);
- pNormalView->nPrevZoomPosY = (int)(fY * nSrcH);
+ pNormalView->nPrevZoomPosX = (int) (fX * nSrcW);
+ pNormalView->nPrevZoomPosY = (int) (fY * nSrcH);
pNormalView->fPrevZoomValue = pNormalView->fZoomValue;
-// VideoLogError("ZoomValue : [%f], offset_x : [%d], offset_y : [%d]", pNormalView->fZoomValue, (int)(fX * nSrcW), (int)(fY * nSrcH));
- vp_mm_player_set_zoom(pNormalView->pPlayerHandle, pNormalView->fZoomValue, (int)(fX * nSrcW), (int)(fY * nSrcH));
+ vp_mm_player_set_zoom(pNormalView->pPlayerHandle,
+ pNormalView->fZoomValue, (int) (fX * nSrcW),
+ (int) (fY * nSrcH));
return EVAS_EVENT_FLAG_ON_HOLD;
}
-static Evas_Event_Flags __vp_normal_gesture_zoom_end_cb(void *pUserData, void *pEventInfo)
+static Evas_Event_Flags __vp_normal_gesture_zoom_end_cb(void *pUserData,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return EVAS_EVENT_FLAG_NONE;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
- Elm_Gesture_Zoom_Info *pZoomInfo = (Elm_Gesture_Zoom_Info *) pEventInfo;
+ Elm_Gesture_Zoom_Info *pZoomInfo =
+ (Elm_Gesture_Zoom_Info *) pEventInfo;
if (pNormalView->bLockScreen) {
VideoLogError("Skip for lock mode");
return EVAS_EVENT_FLAG_ON_HOLD;
}
-static Evas_Event_Flags __vp_normal_gesture_zoom_abort_cb(void *pUserData, void *pEventInfo)
+static Evas_Event_Flags __vp_normal_gesture_zoom_abort_cb(void *pUserData,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
#endif
-static Evas_Event_Flags __vp_normal_gesture_double_click_start_cb(void *pUserData, void *pEventInfo)
+static Evas_Event_Flags __vp_normal_gesture_double_click_start_cb(void
+ *pUserData,
+ void
+ *pEventInfo)
{
VideoLogInfo("");
return EVAS_EVENT_FLAG_ON_HOLD;
}
-static Evas_Event_Flags __vp_normal_gesture_double_click_end_cb(void *pUserData, void *pEventInfo)
+static Evas_Event_Flags __vp_normal_gesture_double_click_end_cb(void
+ *pUserData,
+ void
+ *pEventInfo)
{
VideoLogInfo("");
return EVAS_EVENT_FLAG_NONE;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
_vp_play_normal_view_show_layout(pNormalView);
} else {
vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE;
- if (!vp_mm_player_get_state(pNormalView->pPlayerHandle, &nState)) {
+ if (!vp_mm_player_get_state
+ (pNormalView->pPlayerHandle, &nState)) {
VideoLogWarning("vp_mm_player_get_state is fail");
}
if (nState == VP_MM_PLAYER_STATE_PLAYING) {
VP_EVAS_TIMER_DEL(pNormalView->pHideFinishTimer);
VP_EVAS_TIMER_DEL(pNormalView->pSpeedTimer);
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE,
+ "*");
if (bSpeedMode) {
int nPosition = 0;
- if (vp_mm_player_get_position(pNormalView->pPlayerHandle, &nPosition)) {
- VideoLogDebug("nPosition[%d], curPosition[%d]", nPosition, pNormalView->nCurPosition);
-
- if (vp_mm_player_set_position(pNormalView->pPlayerHandle, pNormalView->nCurPosition)) {
+ if (vp_mm_player_get_position
+ (pNormalView->pPlayerHandle, &nPosition)) {
+ VideoLogDebug("nPosition[%d], curPosition[%d]",
+ nPosition,
+ pNormalView->nCurPosition);
+
+ if (vp_mm_player_set_position
+ (pNormalView->pPlayerHandle,
+ pNormalView->nCurPosition)) {
pNormalView->bSeekComplete = FALSE;
pNormalView->nWaitPos = -1;
} else {
pNormalView->nSpeedValue = 1;
pNormalView->bSpeedDown = TRUE;
- if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
- VideoLogWarning("Resume Fail");
- }
- if (pPlayView->win_minicon) {
- vp_minicontroller_update_control(pPlayView);
+ if (_vp_is_current_focus_available() != 0) {
+ VideoLogInfo
+ ("Cannot acquire focus. Setting video to pause state");
+ vp_play_util_status_noti_show
+ (VP_PLAY_STRING_UNABLE_TO_PLAY);
+ pNormalView->bManualPause = TRUE;
}
- if (pPlayView->win_lockmini) {
- vp_lockscreenmini_update_control(pPlayView);
+
+ if (pNormalView->bManualPause == FALSE) {
+ if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
+ VideoLogWarning("Resume Fail");
+ }
+ if (pPlayView && pPlayView->win_minicon) {
+ vp_minicontroller_update_control(pPlayView);
+ }
+ if (pPlayView && pPlayView->win_lockmini) {
+ vp_lockscreenmini_update_control(pPlayView);
+ }
}
VP_EVAS_IDLER_DEL(pNormalView->pControlIdler);
- pNormalView->pControlIdler = ecore_idler_add(__vp_normal_control_idler_cb, (void *)pNormalView);
+ pNormalView->pControlIdler =
+ ecore_idler_add(__vp_normal_control_idler_cb,
+ (void *) pNormalView);
pNormalView->bManualPause = FALSE;
}
return EVAS_EVENT_FLAG_ON_HOLD;
}
-static Evas_Event_Flags __vp_normal_gesture_double_click_abort_cb(void *pUserData, void *pEventInfo)
+static Evas_Event_Flags __vp_normal_gesture_double_click_abort_cb(void
+ *pUserData,
+ void
+ *pEventInfo)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
}
#ifdef FLICK_JUMP
-static Evas_Event_Flags __vp_normal_gesture_flick_start_cb(void *pUserData, void *event_info)
+static Evas_Event_Flags __vp_normal_gesture_flick_start_cb(void *pUserData,
+ void
+ *event_info)
{
Elm_Gesture_Line_Info *pEvent = (Elm_Gesture_Line_Info *) event_info;
}
VideoLogWarning("flick started");
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
if (pNormalView->bFlickWaiting == TRUE) {
VideoLogWarning("seek is not complete. ignore signal");
}
VideoLogWarning("");
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
int nSetPosition = 0;
int nCurPosition = 0;
- if (!vp_mm_player_get_position(pNormalView->pPlayerHandle, &nCurPosition)) {
+ if (!vp_mm_player_get_position
+ (pNormalView->pPlayerHandle, &nCurPosition)) {
VideoLogError("vp_mm_player_get_position is fail");
return EINA_TRUE;
}
pNormalView->bFlickWaiting = TRUE;
- if (vp_mm_player_set_position(pNormalView->pPlayerHandle, nSetPosition)) {
+ if (vp_mm_player_set_position
+ (pNormalView->pPlayerHandle, nSetPosition)) {
pNormalView->nWaitPos = -1;
pNormalView->bSeekComplete = FALSE;
pNormalView->nCurPosition = nSetPosition;
- vp_play_progressbar_set_position(pNormalView->pProgressbar, nSetPosition);
+ vp_play_progressbar_set_position(pNormalView->pProgressbar,
+ nSetPosition);
}
return EINA_TRUE;
}
-static void __vp_normal_flickjump_seek_del_cb(void *pUserData, Evas * e, Evas_Object *obj, void *pEvent)
+static void __vp_normal_flickjump_seek_del_cb(void *pUserData, Evas * e,
+ Evas_Object * obj,
+ void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- evas_object_event_callback_del(obj, EVAS_CALLBACK_DEL, __vp_normal_flickjump_seek_del_cb);
- NormalView *pNormalView = (NormalView *)pUserData;
+ evas_object_event_callback_del(obj, EVAS_CALLBACK_DEL,
+ __vp_normal_flickjump_seek_del_cb);
+ NormalView *pNormalView = (NormalView *) pUserData;
pNormalView->pFlickJumpSeek = NULL;
}
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
if (pNormalView->pFlickJumpSeek) {
int nFlickSeekImageWidth = 80;
int nFlickSeekImageHeight = 60;
int nFlickSeekLeftMargin = 8;
int nScreenWidth = 0;
int nScreenHeight = 0;
- if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_90 || pNormalView->nRotate == VIDEO_PLAY_ROTATE_270) {
+ if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_90
+ || pNormalView->nRotate == VIDEO_PLAY_ROTATE_270) {
nScreenWidth = 1280;
nScreenHeight = 720;
} else {
nScreenHeight = 1280;
}
if (pNormalView->bFlickRewind == FALSE) {
- evas_object_move(pNormalView->pFlickJumpSeek, nScreenWidth - (nFlickSeekLeftMargin + nFlickSeekImageWidth / 2), (nScreenHeight - nFlickSeekImageHeight / 2) / 2);
+ evas_object_move(pNormalView->pFlickJumpSeek,
+ nScreenWidth - (nFlickSeekLeftMargin +
+ nFlickSeekImageWidth / 2),
+ (nScreenHeight -
+ nFlickSeekImageHeight / 2) / 2);
} else {
- evas_object_move(pNormalView->pFlickJumpSeek, nFlickSeekLeftMargin + nFlickSeekImageWidth / 2, (nScreenHeight - nFlickSeekImageHeight / 2) / 2);
+ evas_object_move(pNormalView->pFlickJumpSeek,
+ nFlickSeekLeftMargin +
+ nFlickSeekImageWidth / 2,
+ (nScreenHeight -
+ nFlickSeekImageHeight / 2) / 2);
}
}
}
-static void __vp_normal_gesture_flick_animation_done_cb(void *data, Evas_Object * obj, const char *emission, const char *source)
+static void __vp_normal_gesture_flick_animation_done_cb(void *data,
+ Evas_Object * obj,
+ const char
+ *emission,
+ const char *source)
{
if (!data) {
VideoLogError("data is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)data;
+ NormalView *pNormalView = (NormalView *) data;
if (emission) {
- if (!g_strcmp0(emission, "rew_animation_done") || !g_strcmp0(emission, "ff_animation_done")) {
+ if (!g_strcmp0(emission, "rew_animation_done")
+ || !g_strcmp0(emission, "ff_animation_done")) {
if (pNormalView->bFlickWaiting == TRUE) {
if (pNormalView->bFlickRewind == TRUE) {
if (pNormalView->pFlickJumpSeek) {
- elm_object_signal_emit(pNormalView->pFlickJumpSeek, VP_NORMAL_SIGNAL_FLICKJUMP_FF, "*");
+ elm_object_signal_emit(pNormalView->pFlickJumpSeek,
+ VP_NORMAL_SIGNAL_FLICKJUMP_FF,
+ "*");
}
} else {
if (pNormalView->pFlickJumpSeek) {
- elm_object_signal_emit(pNormalView->pFlickJumpSeek, VP_NORMAL_SIGNAL_FLICKJUMP_REW, "*");
+ elm_object_signal_emit(pNormalView->pFlickJumpSeek,
+ VP_NORMAL_SIGNAL_FLICKJUMP_REW,
+ "*");
}
}
} else {
}
}
-static Evas_Event_Flags __vp_normal_gesture_flick_end_cb(void *pUserData, void *event_info)
+static Evas_Event_Flags __vp_normal_gesture_flick_end_cb(void *pUserData,
+ void *event_info)
{
Elm_Gesture_Line_Info *pEvent = (Elm_Gesture_Line_Info *) event_info;
}
VideoLogWarning("gesture flick end");
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
if (pNormalView->bLockScreen) {
VideoLogError("Skip for lock mode");
return EVAS_EVENT_FLAG_NONE;
}
- if (pNormalView->pFlickJumpSeek || pNormalView->nFlickPressX1 == 0 || pNormalView->nFlickPressY1 == 0) {
+ if (pNormalView->pFlickJumpSeek || pNormalView->nFlickPressX1 == 0
+ || pNormalView->nFlickPressY1 == 0) {
VideoLogWarning("seek is not complete. ignore signal");
return EVAS_EVENT_FLAG_NONE;
}
if (pNormalView->fZoomValue > 1.0) {
- VideoLogWarning("Current zoom level : [%f]", pNormalView->fZoomValue);
+ VideoLogWarning("Current zoom level : [%f]",
+ pNormalView->fZoomValue);
return EVAS_EVENT_FLAG_NONE;
}
if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_WEB &&
- pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_PREVIEW &&
- pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MESSAGE &&
- pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_EMAIL &&
- pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MULTI_PATH) {
- VideoLogWarning("pNormalView->nLaunchingType : [%d]. not support gesture flick in this mode", pNormalView->nLaunchingType);
+ pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_PREVIEW &&
+ pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MESSAGE &&
+ pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_EMAIL &&
+ pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MULTI_PATH) {
+ VideoLogWarning
+ ("pNormalView->nLaunchingType : [%d]. not support gesture flick in this mode",
+ pNormalView->nLaunchingType);
return EVAS_EVENT_FLAG_NONE;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_NORMAL_MAIN_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_NORMAL_MAIN_EDJ);
free(path);
pNormalView->pFlickJumpSeek = elm_layout_add(pNormalView->pMainLayout);
- elm_layout_file_set(pNormalView->pFlickJumpSeek, edj_path, VP_PLAY_EDJ_GROUP_FLICKJUMP_SEEK);
- evas_object_size_hint_weight_set(pNormalView->pFlickJumpSeek, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(pNormalView->pFlickJumpSeek, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_event_callback_add(pNormalView->pFlickJumpSeek, EVAS_CALLBACK_DEL, __vp_normal_flickjump_seek_del_cb, (void *)pNormalView);
- edje_object_signal_callback_add(_EDJ(pNormalView->pFlickJumpSeek), "*", "*", __vp_normal_gesture_flick_animation_done_cb, (void *)pNormalView);
+ elm_layout_file_set(pNormalView->pFlickJumpSeek, edj_path,
+ VP_PLAY_EDJ_GROUP_FLICKJUMP_SEEK);
+ evas_object_size_hint_weight_set(pNormalView->pFlickJumpSeek,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pNormalView->pFlickJumpSeek,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_event_callback_add(pNormalView->pFlickJumpSeek,
+ EVAS_CALLBACK_DEL,
+ __vp_normal_flickjump_seek_del_cb,
+ (void *) pNormalView);
+ edje_object_signal_callback_add(_EDJ(pNormalView->pFlickJumpSeek), "*",
+ "*",
+ __vp_normal_gesture_flick_animation_done_cb,
+ (void *) pNormalView);
evas_object_hide(pNormalView->pFlickJumpSeek);
if (pNormalView->nFlickPressX1 > pEvent->momentum.x2) {
pNormalView->bFlickRewind = TRUE;
- elm_object_signal_emit(pNormalView->pFlickJumpSeek, VP_NORMAL_SIGNAL_FLICKJUMP_FF, "*");
+ elm_object_signal_emit(pNormalView->pFlickJumpSeek,
+ VP_NORMAL_SIGNAL_FLICKJUMP_FF, "*");
__vp_normal_flickjump_layout_position(pNormalView);
__vp_normal_flickjump_seek(pNormalView, TRUE);
} else if (pNormalView->nFlickPressX1 < pEvent->momentum.x2) {
pNormalView->bFlickRewind = FALSE;
- elm_object_signal_emit(pNormalView->pFlickJumpSeek, VP_NORMAL_SIGNAL_FLICKJUMP_REW, "*");
+ elm_object_signal_emit(pNormalView->pFlickJumpSeek,
+ VP_NORMAL_SIGNAL_FLICKJUMP_REW, "*");
__vp_normal_flickjump_layout_position(pNormalView);
__vp_normal_flickjump_seek(pNormalView, FALSE);
}
szTxt = g_strdup_printf(szPdSECS, 5);
if (pNormalView->bFlickRewind == FALSE) {
- elm_object_part_text_set(pNormalView->pFlickJumpSeek, VP_PLAY_PART_FLICKJUMP_SEEK_REW_TEXT, szTxt);
+ elm_object_part_text_set(pNormalView->pFlickJumpSeek,
+ VP_PLAY_PART_FLICKJUMP_SEEK_REW_TEXT,
+ szTxt);
} else {
- elm_object_part_text_set(pNormalView->pFlickJumpSeek, VP_PLAY_PART_FLICKJUMP_SEEK_FF_TEXT, szTxt);
+ elm_object_part_text_set(pNormalView->pFlickJumpSeek,
+ VP_PLAY_PART_FLICKJUMP_SEEK_FF_TEXT,
+ szTxt);
}
VP_FREE(szTxt);
return EVAS_EVENT_FLAG_NONE;
}
-static Evas_Event_Flags __vp_normal_gesture_flick_abort_cb(void *pUserData, void *event_info)
+static Evas_Event_Flags __vp_normal_gesture_flick_abort_cb(void *pUserData,
+ void
+ *event_info)
{
VideoLogWarning("flick abort");
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
if (pNormalView->bFlickWaiting == FALSE) {
pNormalView->nFlickPressX1 = 0;
return EVAS_EVENT_FLAG_NONE;
}
-#endif // FLICK_JUMP
+#endif // FLICK_JUMP
#ifdef K_FEATURE_MICROSEEK
-static void __vp_normal_progress_microseek_textlayout_del_cb(void *pUserData, Evas * e, Evas_Object *obj, void *pEvent)
+static void __vp_normal_progress_microseek_textlayout_del_cb(void
+ *pUserData,
+ Evas * e,
+ Evas_Object *
+ obj,
+ void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- evas_object_event_callback_del(obj, EVAS_CALLBACK_DEL, __vp_normal_progress_microseek_textlayout_del_cb);
- NormalView *pNormalView = (NormalView *)pUserData;
+ evas_object_event_callback_del(obj, EVAS_CALLBACK_DEL,
+ __vp_normal_progress_microseek_textlayout_del_cb);
+ NormalView *pNormalView = (NormalView *) pUserData;
pNormalView->pMicroSeekTextLayout = NULL;
}
-static void __vp_normal_progress_microseek_imagelayout_del_cb(void *pUserData, Evas * e, Evas_Object *obj, void *pEvent)
+static void __vp_normal_progress_microseek_imagelayout_del_cb(void
+ *pUserData,
+ Evas * e,
+ Evas_Object *
+ obj,
+ void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- evas_object_event_callback_del(obj, EVAS_CALLBACK_DEL, __vp_normal_progress_microseek_imagelayout_del_cb);
- NormalView *pNormalView = (NormalView *)pUserData;
+ evas_object_event_callback_del(obj, EVAS_CALLBACK_DEL,
+ __vp_normal_progress_microseek_imagelayout_del_cb);
+ NormalView *pNormalView = (NormalView *) pUserData;
pNormalView->pMicroSeekImageLayout = NULL;
}
#endif
-static void __vp_normal_progress_mouse_down_cb(void *pUserData, Evas * e, Evas_Object *pObj, void *pEvent)
+static void __vp_normal_progress_mouse_down_cb(void *pUserData, Evas * e,
+ Evas_Object * pObj,
+ void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return;
}
- Evas_Event_Mouse_Down *pMouseDownEvent = (Evas_Event_Mouse_Down *)pEvent;
+ Evas_Event_Mouse_Down *pMouseDownEvent =
+ (Evas_Event_Mouse_Down *) pEvent;
- double dRatio = _vp_play_normal_view_get_mouse_pos_ratio(pNormalView->pProgressEvent, pMouseDownEvent->canvas.x);
- elm_object_signal_emit(pNormalView->pProgressEvent, VP_NORMAL_SIGNAL_PROGRESS_PRESS, "*");
+ double dRatio =
+ _vp_play_normal_view_get_mouse_pos_ratio(pNormalView->
+ pProgressEvent,
+ pMouseDownEvent->canvas.
+ x);
+ elm_object_signal_emit(pNormalView->pProgressEvent,
+ VP_NORMAL_SIGNAL_PROGRESS_PRESS, "*");
VP_EVAS_TIMER_DEL(pNormalView->pProgressTimer);
pNormalView->pProgressTimer = NULL;
int nCurPos = dRatio * pNormalView->nDuration;
#ifdef K_FEATURE_MICROSEEK
- pNormalView->nPrevCanvasX = (double)pMouseDownEvent->canvas.x;
- pNormalView->nPrevPositionX = (double)pNormalView->nPrevCanvasX;
+ pNormalView->nPrevCanvasX = (double) pMouseDownEvent->canvas.x;
+ pNormalView->nPrevPositionX = (double) pNormalView->nPrevCanvasX;
VP_EVAS_DEL(pNormalView->pMicroSeekTextLayout);
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_NORMAL_MAIN_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_NORMAL_MAIN_EDJ);
free(path);
- pNormalView->pMicroSeekTextLayout = elm_layout_add(pNormalView->pMainLayout);
- elm_layout_file_set(pNormalView->pMicroSeekTextLayout, edj_path, VP_PLAY_EDJ_GROUP_MICROSEEK_TEXT);
- evas_object_size_hint_weight_set(pNormalView->pMicroSeekTextLayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(pNormalView->pMicroSeekTextLayout, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_event_callback_add(pNormalView->pMicroSeekTextLayout, EVAS_CALLBACK_DEL, __vp_normal_progress_microseek_textlayout_del_cb, (void *)pNormalView);
+ pNormalView->pMicroSeekTextLayout =
+ elm_layout_add(pNormalView->pMainLayout);
+ elm_layout_file_set(pNormalView->pMicroSeekTextLayout, edj_path,
+ VP_PLAY_EDJ_GROUP_MICROSEEK_TEXT);
+ evas_object_size_hint_weight_set(pNormalView->pMicroSeekTextLayout,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pNormalView->pMicroSeekTextLayout,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_event_callback_add(pNormalView->pMicroSeekTextLayout,
+ EVAS_CALLBACK_DEL,
+ __vp_normal_progress_microseek_textlayout_del_cb,
+ (void *) pNormalView);
evas_object_hide(pNormalView->pMicroSeekTextLayout);
- pNormalView->pMicroSeekImageLayout = elm_layout_add(pNormalView->pMainLayout);
- elm_layout_file_set(pNormalView->pMicroSeekImageLayout, edj_path, VP_PLAY_EDJ_GROUP_MICROSEEK_IMAGE);
- evas_object_size_hint_weight_set(pNormalView->pMicroSeekImageLayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(pNormalView->pMicroSeekImageLayout, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_event_callback_add(pNormalView->pMicroSeekImageLayout, EVAS_CALLBACK_DEL, __vp_normal_progress_microseek_imagelayout_del_cb, (void *)pNormalView);
+ pNormalView->pMicroSeekImageLayout =
+ elm_layout_add(pNormalView->pMainLayout);
+ elm_layout_file_set(pNormalView->pMicroSeekImageLayout, edj_path,
+ VP_PLAY_EDJ_GROUP_MICROSEEK_IMAGE);
+ evas_object_size_hint_weight_set(pNormalView->pMicroSeekImageLayout,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pNormalView->pMicroSeekImageLayout,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_event_callback_add(pNormalView->pMicroSeekImageLayout,
+ EVAS_CALLBACK_DEL,
+ __vp_normal_progress_microseek_imagelayout_del_cb,
+ (void *) pNormalView);
evas_object_hide(pNormalView->pMicroSeekImageLayout);
#endif
if (vp_play_util_check_streaming(pNormalView->szMediaURL)) {
if (pNormalView->bManualPause == FALSE) {
vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE;
- if (!vp_mm_player_get_state(pNormalView->pPlayerHandle, &nState)) {
+ if (!vp_mm_player_get_state
+ (pNormalView->pPlayerHandle, &nState)) {
VideoLogWarning("vp_mm_player_get_state is fail");
}
if (nState == VP_MM_PLAYER_STATE_PLAYING) {
}
return;
- } else {
+ } else {
if (pNormalView->bManualPause == FALSE) {
vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE;
- if (!vp_mm_player_get_state(pNormalView->pPlayerHandle, &nState)) {
+ if (!vp_mm_player_get_state
+ (pNormalView->pPlayerHandle, &nState)) {
VideoLogWarning("vp_mm_player_get_state is fail");
}
VideoLogInfo("nState:%d", nState);
if (nState == VP_MM_PLAYER_STATE_PLAYING) {
vp_mm_player_pause(pNormalView->pPlayerHandle);
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
}
}
}
-static void __vp_normal_progress_mouse_up_cb(void *pUserData, Evas * e, Evas_Object *pObj, void *pEvent)
+static void __vp_normal_progress_mouse_up_cb(void *pUserData, Evas * e,
+ Evas_Object * pObj,
+ void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
#ifdef K_FEATURE_MICROSEEK
#else
- Evas_Event_Mouse_Up *pMouseUpEvent = (Evas_Event_Mouse_Up *)pEvent;
+ Evas_Event_Mouse_Up *pMouseUpEvent = (Evas_Event_Mouse_Up *) pEvent;
#endif
VideoLogWarning("Mouse Up");
- if (pNormalView->bIsRealize == FALSE || pNormalView->bProgressDown == FALSE) {
+ if (pNormalView->bIsRealize == FALSE
+ || pNormalView->bProgressDown == FALSE) {
VideoLogWarning("Skip for not realized or prgress down");
return;
}
VideoLogError("pPlayView is NULL");
return;
}
-
#ifdef K_FEATURE_MICROSEEK
- double dRatio = _vp_play_normal_view_get_mouse_pos_ratio(pNormalView->pProgressEvent, pNormalView->nPrevPositionX);
+ double dRatio =
+ _vp_play_normal_view_get_mouse_pos_ratio(pNormalView->
+ pProgressEvent,
+ pNormalView->
+ nPrevPositionX);
#else
- double dRatio = _vp_play_normal_view_get_mouse_pos_ratio(pNormalView->pProgressEvent, pMouseUpEvent->canvas.x);
+ double dRatio =
+ _vp_play_normal_view_get_mouse_pos_ratio(pNormalView->
+ pProgressEvent,
+ pMouseUpEvent->canvas.x);
#endif
- elm_object_signal_emit(pNormalView->pProgressEvent, VP_NORMAL_SIGNAL_PROGRESS_UNPRESS, "*");
+ elm_object_signal_emit(pNormalView->pProgressEvent,
+ VP_NORMAL_SIGNAL_PROGRESS_UNPRESS, "*");
if (fabs(dRatio - 1.0) < 1.0e-6) {
VideoLogWarning("It is the end of the video!");
__vp_normal_completed_cb(pNormalView);
if (vp_play_util_check_streaming(pNormalView->szMediaURL)) {
if (pNormalView->bSeekComplete == FALSE) {
pNormalView->nWaitPos = nCurPos;
- VideoLogWarning("== REAL SEEK SET == [%d]", pNormalView->nWaitPos);
+ VideoLogWarning("== REAL SEEK SET == [%d]",
+ pNormalView->nWaitPos);
} else {
VideoLogWarning("== REAL SEEK == [%d]", nCurPos);
pNormalView->bBufferingComplete = TRUE;
- if (vp_mm_player_set_position(pNormalView->pPlayerHandle, nCurPos)) {
+ if (vp_mm_player_set_position
+ (pNormalView->pPlayerHandle, nCurPos)) {
pNormalView->nWaitPos = -1;
pNormalView->bSeekComplete = FALSE;
if (pNormalView->pLoadingAni) {
}
-static void __vp_normal_progress_del_cb(void *pUserData, Evas * e, Evas_Object *pObj, void *pEvent)
+static void __vp_normal_progress_del_cb(void *pUserData, Evas * e,
+ Evas_Object * pObj, void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
VideoLogError("pNormalView->pProgressEvent is free");
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
pNormalView->pProgressEvent = NULL;
}
-static void __vp_normal_progress_mouse_move_cb(void *pUserData, Evas * e, Evas_Object *pObj, void *pEvent)
+static void __vp_normal_progress_mouse_move_cb(void *pUserData, Evas * e,
+ Evas_Object * pObj,
+ void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
- Evas_Event_Mouse_Move *pMouseMoveEvent = (Evas_Event_Mouse_Move *)pEvent;
+ Evas_Event_Mouse_Move *pMouseMoveEvent =
+ (Evas_Event_Mouse_Move *) pEvent;
if (pNormalView->bHLSMode) {
VideoLogWarning("Skip for HLS");
return;
}
- if (pNormalView->bIsRealize == FALSE || pNormalView->bProgressDown == FALSE) {
+ if (pNormalView->bIsRealize == FALSE
+ || pNormalView->bProgressDown == FALSE) {
VideoLogWarning("Skip for not realized or prgress down");
return;
}
return;
}
- if (pNormalView->bProgressDown == FALSE || pNormalView->bIsRealize == FALSE) {
+ if (pNormalView->bProgressDown == FALSE
+ || pNormalView->bIsRealize == FALSE) {
VideoLogWarning("Skip for not realized or prgress down");
return;
}
-
#ifdef K_FEATURE_MICROSEEK
bool bLandscape = FALSE;
int nScreenWidth = 0;
int nScreenHeight = 0;
int nControllerHeight = 0;
int nSeek_Height = 0;
- if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_90 || pNormalView->nRotate == VIDEO_PLAY_ROTATE_270) {
+ if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_90
+ || pNormalView->nRotate == VIDEO_PLAY_ROTATE_270) {
bLandscape = TRUE;
nScreenWidth = 1280;
nScreenHeight = 720;
nControllerHeight = 180;
- nSeek_Height = (VP_NORMAL_MICROSEEK_TEXT_HEIGHT + ((6 + 70 + 40) * elm_config_scale_get()));
+ nSeek_Height =
+ (VP_NORMAL_MICROSEEK_TEXT_HEIGHT +
+ ((6 + 70 + 40) * elm_config_scale_get()));
} else {
nScreenWidth = 720;
nScreenHeight = 1280;
nControllerHeight = 293;
- nSeek_Height = (VP_NORMAL_MICROSEEK_TEXT_HEIGHT + ((6 + 70 + 20) * elm_config_scale_get()));
+ nSeek_Height =
+ (VP_NORMAL_MICROSEEK_TEXT_HEIGHT +
+ ((6 + 70 + 20) * elm_config_scale_get()));
}
-// VideoLogWarning("canvas.x[%d] canvas.y[%d]", pMouseMoveEvent->cur.canvas.x, pMouseMoveEvent->cur.canvas.y);
-
double dDistance = 0;
SeekLevel Level = SEEK_LEVEL_NORMAL;
- dDistance = (pMouseMoveEvent->cur.canvas.x - pNormalView->nPrevCanvasX);
+ dDistance =
+ (pMouseMoveEvent->cur.canvas.x - pNormalView->nPrevCanvasX);
- if (pMouseMoveEvent->cur.canvas.y > (nScreenHeight - nControllerHeight)) {
+ if (pMouseMoveEvent->cur.canvas.y >
+ (nScreenHeight - nControllerHeight)) {
Level = SEEK_LEVEL_NORMAL;
- } else if (pMouseMoveEvent->cur.canvas.y > (nScreenHeight - nControllerHeight - nSeek_Height)) {
+ } else if (pMouseMoveEvent->cur.canvas.y >
+ (nScreenHeight - nControllerHeight - nSeek_Height)) {
Level = SEEK_LEVEL_HALF;
dDistance = dDistance / 2;
} else {
dDistance = dDistance / 4;
}
- pNormalView->nPrevCanvasX = (double)pMouseMoveEvent->cur.canvas.x;
+ pNormalView->nPrevCanvasX = (double) pMouseMoveEvent->cur.canvas.x;
// Calc position
if (Level == SEEK_LEVEL_NORMAL) {
- pNormalView->nPrevPositionX = (double)pMouseMoveEvent->cur.canvas.x;
+ pNormalView->nPrevPositionX =
+ (double) pMouseMoveEvent->cur.canvas.x;
} else {
- pNormalView->nPrevPositionX = pNormalView->nPrevPositionX + dDistance;
+ pNormalView->nPrevPositionX =
+ pNormalView->nPrevPositionX + dDistance;
}
if (Level == SEEK_LEVEL_NORMAL) {
if (pNormalView->pMicroSeekTextLayout) {
- elm_object_signal_emit(pNormalView->pMicroSeekTextLayout, VP_NORMAL_SIGNAL_MICROSEEK_TEXT_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMicroSeekTextLayout,
+ VP_NORMAL_SIGNAL_MICROSEEK_TEXT_HIDE,
+ "*");
}
if (pNormalView->pMicroSeekImageLayout) {
- elm_object_signal_emit(pNormalView->pMicroSeekImageLayout, VP_NORMAL_SIGNAL_MICROSEEK_IMAGE_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMicroSeekImageLayout,
+ VP_NORMAL_SIGNAL_MICROSEEK_IMAGE_HIDE,
+ "*");
}
} else {
Evas_Coord nTextWidth = -1, nTextHeight = -1;
char *szPsSpeed = VP_PLAY_STRING_SCRUBBING_AT_PSX_SPEED;
if (Level == SEEK_LEVEL_HALF) {
- szTxt = g_strdup_printf(szPsSpeed, VP_NORMAL_SZ_HALF_SPEED);
+ szTxt =
+ g_strdup_printf(szPsSpeed, VP_NORMAL_SZ_HALF_SPEED);
} else if (Level == SEEK_LEVEL_QUARTER) {
- szTxt = g_strdup_printf(szPsSpeed, VP_NORMAL_SZ_QUARTER_SPEED);
+ szTxt =
+ g_strdup_printf(szPsSpeed, VP_NORMAL_SZ_QUARTER_SPEED);
}
- elm_object_part_text_set(pNormalView->pMicroSeekTextLayout, VP_NORMAL_SIGNAL_MICROSEEK_SPEED_TEXT, szTxt);
- edje_object_size_min_restricted_calc(_EDJ(pNormalView->pMicroSeekTextLayout), &nTextWidth, &nTextHeight, nTextWidth, nTextHeight);
- evas_object_resize(pNormalView->pMicroSeekTextLayout, nTextWidth, nTextHeight);
+ elm_object_part_text_set(pNormalView->pMicroSeekTextLayout,
+ VP_NORMAL_SIGNAL_MICROSEEK_SPEED_TEXT,
+ szTxt);
+ edje_object_size_min_restricted_calc(_EDJ
+ (pNormalView->
+ pMicroSeekTextLayout),
+ &nTextWidth, &nTextHeight,
+ nTextWidth, nTextHeight);
+ evas_object_resize(pNormalView->pMicroSeekTextLayout,
+ nTextWidth, nTextHeight);
- int nTextPositionX = (int)pNormalView->nPrevPositionX - nTextWidth / 2;
+ int nTextPositionX =
+ (int) pNormalView->nPrevPositionX - nTextWidth / 2;
if (nTextPositionX < 0) {
nTextPositionX = 0;
}
if (Level == SEEK_LEVEL_HALF) {
- evas_object_move(pNormalView->pMicroSeekTextLayout, nTextPositionX, nScreenHeight - nControllerHeight - nSeek_Height);
+ evas_object_move(pNormalView->pMicroSeekTextLayout,
+ nTextPositionX,
+ nScreenHeight - nControllerHeight -
+ nSeek_Height);
} else if (Level == SEEK_LEVEL_QUARTER) {
- evas_object_move(pNormalView->pMicroSeekTextLayout, nTextPositionX, nScreenHeight - nControllerHeight - nSeek_Height * 2);
- }
- elm_object_signal_emit(pNormalView->pMicroSeekTextLayout, VP_NORMAL_SIGNAL_MICROSEEK_TEXT_SHOW, "*");
+ evas_object_move(pNormalView->pMicroSeekTextLayout,
+ nTextPositionX,
+ nScreenHeight - nControllerHeight -
+ nSeek_Height * 2);
+ }
+ elm_object_signal_emit(pNormalView->pMicroSeekTextLayout,
+ VP_NORMAL_SIGNAL_MICROSEEK_TEXT_SHOW,
+ "*");
evas_object_show(pNormalView->pMicroSeekTextLayout);
VP_FREE(szTxt);
// Image Layout move
if (pNormalView->pMicroSeekImageLayout) {
Evas_Coord nImageWidth = -1, nImageHeight = -1;
- edje_object_size_min_restricted_calc(_EDJ(pNormalView->pMicroSeekImageLayout), &nImageWidth, &nImageHeight, nImageWidth, nImageHeight);
- evas_object_resize(pNormalView->pMicroSeekImageLayout, nImageWidth, nImageHeight);
-
- int nImagePositionX = (int)pNormalView->nPrevPositionX - nImageWidth / 2;
+ edje_object_size_min_restricted_calc(_EDJ
+ (pNormalView->
+ pMicroSeekImageLayout),
+ &nImageWidth,
+ &nImageHeight,
+ nImageWidth,
+ nImageHeight);
+ evas_object_resize(pNormalView->pMicroSeekImageLayout,
+ nImageWidth, nImageHeight);
+
+ int nImagePositionX =
+ (int) pNormalView->nPrevPositionX - nImageWidth / 2;
int nImageLeftPadding = 0;
int nImageRightPadding = 0;
if (nImagePositionX < nImageLeftPadding) {
nImagePositionX = nImageLeftPadding;
- } else if (nImagePositionX > nScreenWidth - nImageRightPadding) {
+ } else if (nImagePositionX >
+ nScreenWidth - nImageRightPadding) {
nImagePositionX = nScreenWidth - nImageRightPadding;
}
if (Level == SEEK_LEVEL_HALF) {
- evas_object_move(pNormalView->pMicroSeekImageLayout, nImagePositionX, nScreenHeight - nControllerHeight - nSeek_Height + nTextHeight + 6);
+ evas_object_move(pNormalView->pMicroSeekImageLayout,
+ nImagePositionX,
+ nScreenHeight - nControllerHeight -
+ nSeek_Height + nTextHeight + 6);
} else if (Level == SEEK_LEVEL_QUARTER) {
- evas_object_move(pNormalView->pMicroSeekImageLayout, nImagePositionX, nScreenHeight - nControllerHeight - nSeek_Height * 2 + nTextHeight + 6);
+ evas_object_move(pNormalView->pMicroSeekImageLayout,
+ nImagePositionX,
+ nScreenHeight - nControllerHeight -
+ nSeek_Height * 2 + nTextHeight + 6);
}
- elm_object_signal_emit(pNormalView->pMicroSeekImageLayout, VP_NORMAL_SIGNAL_MICROSEEK_IMAGE_SHOW, "*");
+ elm_object_signal_emit(pNormalView->pMicroSeekImageLayout,
+ VP_NORMAL_SIGNAL_MICROSEEK_IMAGE_SHOW,
+ "*");
evas_object_show(pNormalView->pMicroSeekImageLayout);
}
}
}
- double dRatio = _vp_play_normal_view_get_mouse_pos_ratio(pNormalView->pProgressEvent, (int)pNormalView->nPrevPositionX , bLandscape);
+ double dRatio =
+ _vp_play_normal_view_get_mouse_pos_ratio(pNormalView->
+ pProgressEvent,
+ (int) pNormalView->
+ nPrevPositionX,
+ bLandscape);
#else
- double dRatio = _vp_play_normal_view_get_mouse_pos_ratio(pNormalView->pProgressEvent, pMouseMoveEvent->cur.canvas.x);
+ double dRatio =
+ _vp_play_normal_view_get_mouse_pos_ratio(pNormalView->
+ pProgressEvent,
+ pMouseMoveEvent->cur.
+ canvas.x);
#endif
int nCurPos = dRatio * pNormalView->nDuration;
vp_play_progressbar_set_position(pNormalView->pProgressbar, nCurPos);
if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_WEB ||
- pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MULTI_PATH) {
+ pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MULTI_PATH) {
return;
}
pNormalView->nWaitPos = nCurPos;
} else {
VideoLogWarning("== I FRMAE SEEK == [%d]", nCurPos);
- if (vp_mm_player_set_position_by_key_frame(pNormalView->pPlayerHandle, nCurPos)) {
+ if (vp_mm_player_set_position_by_key_frame
+ (pNormalView->pPlayerHandle, nCurPos)) {
pNormalView->nWaitPos = -1;
pNormalView->bSeekComplete = FALSE;
}
}
}
-static void __vp_normal_focus_key_down_cb(void *pUserData, Evas * e, Evas_Object *pObj, void *pEvent)
+static void __vp_normal_focus_key_down_cb(void *pUserData, Evas * e,
+ Evas_Object * pObj, void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
if (!strcmp(ev->keyname, "Left")) {
if (pNormalView->bKeySpeed == FALSE) {
- vp_play_normal_view_ff_rew_keyboard_longpress_event_cb(pPlayView->pNormalView, FALSE, FALSE);
+ vp_play_normal_view_ff_rew_keyboard_longpress_event_cb
+ (pPlayView->pNormalView, FALSE, FALSE);
pNormalView->bKeySpeed = TRUE;
}
} else if (!strcmp(ev->keyname, "Right")) {
if (pNormalView->bKeySpeed == FALSE) {
- vp_play_normal_view_ff_rew_keyboard_longpress_event_cb(pPlayView->pNormalView, FALSE, TRUE);
+ vp_play_normal_view_ff_rew_keyboard_longpress_event_cb
+ (pPlayView->pNormalView, FALSE, TRUE);
pNormalView->bKeySpeed = TRUE;
}
}
}
-static void __vp_normal_focus_key_up_cb(void *pUserData, Evas * e, Evas_Object *pObj, void *pEvent)
+static void __vp_normal_focus_key_up_cb(void *pUserData, Evas * e,
+ Evas_Object * pObj, void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
if (!strcmp(ev->keyname, "Left")) {
if (pNormalView->bKeySpeed == TRUE) {
- vp_play_normal_view_ff_rew_keyboard_longpress_event_cb(pPlayView->pNormalView, TRUE, FALSE);
+ vp_play_normal_view_ff_rew_keyboard_longpress_event_cb
+ (pPlayView->pNormalView, TRUE, FALSE);
pNormalView->bKeySpeed = FALSE;
}
} else if (!strcmp(ev->keyname, "Right")) {
if (pNormalView->bKeySpeed == TRUE) {
- vp_play_normal_view_ff_rew_keyboard_longpress_event_cb(pPlayView->pNormalView, TRUE, TRUE);
+ vp_play_normal_view_ff_rew_keyboard_longpress_event_cb
+ (pPlayView->pNormalView, TRUE, TRUE);
pNormalView->bKeySpeed = FALSE;
}
}
}
-/*
-static void __vp_normal_bookmark_item_select_cb(int nPos, const char *szPath, void *pUserData)
-{
- if (!pUserData) {
- VideoLogError("pUserData is NULL");
- return;
- }
-
- NormalView *pNormalView = (NormalView *)pUserData;
-
- if (nPos == -1 && szPath == NULL) {
- _vp_play_normal_view_create_layout_hide_timer(pNormalView);
- return;
- }
-
- if (pNormalView->bSeekComplete == FALSE) {
- pNormalView->nWaitPos = nPos;
- } else {
- if (vp_mm_player_set_position(pNormalView->pPlayerHandle, nPos)) {
- pNormalView->nWaitPos = -1;
- pNormalView->bSeekComplete = FALSE;
-
- if (pNormalView->pLoadingAni) {
- VP_EVAS_TIMER_DEL(pNormalView->pHideTimer);
- VP_EVAS_TIMER_DEL(pNormalView->pHideFinishTimer);
- }
- vp_play_progressbar_set_position(pNormalView->pProgressbar, nPos);
- }
- }
-
- _vp_play_normal_view_show_layout(pNormalView);
-}
-*/
bool vp_normal_rotate_icon_timer_cb(void *pUserData)
{
}
VideoLogWarning("");
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
pNormalView->pHideTimer = NULL;
VP_EVAS_TIMER_DEL(pNormalView->pHideFinishTimer);
VideoLogWarning("vp_mm_player_get_state is fail");
}
- if ((nState != VP_MM_PLAYER_STATE_PLAYING) && (nState != VP_MM_PLAYER_STATE_PAUSED)) {
+ if ((nState != VP_MM_PLAYER_STATE_PLAYING)
+ && (nState != VP_MM_PLAYER_STATE_PAUSED)) {
return EINA_FALSE;
}
return EINA_FALSE;
}
VideoLogWarning("");
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (pNormalView->pSubtitleTimer) {
pNormalView->pHideFinishTimer = NULL;
if (pNormalView->pImageBufferObj == NULL &&
- pNormalView->bIsPopupShow == FALSE &&
- pNormalView->bIsSubtitleShow == FALSE &&
- pPlayView->bMouseOut == FALSE &&
- pNormalView->bVideoOnlyMode == FALSE &&
- pNormalView->bCaptureMode == FALSE) {
+ pNormalView->bIsPopupShow == FALSE &&
+ pNormalView->bIsSubtitleShow == FALSE &&
+ pPlayView->bMouseOut == FALSE &&
+ pNormalView->bVideoOnlyMode == FALSE &&
+ pNormalView->bCaptureMode == FALSE) {
vp_play_util_fb_visible_off(pPlayView->pWin, FALSE);
}
vp_device_set_frame_rate(40);
return EINA_FALSE;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
int nPosition = 0;
if (!vp_mm_player_get_position(pNormalView->pPlayerHandle, &nPosition)) {
}
if (nPosition > pNormalView->dSubtitleStartTime &&
- nPosition < pNormalView->dSubtitleEndTime) {
+ nPosition < pNormalView->dSubtitleEndTime) {
return EINA_TRUE;
}
return EINA_FALSE;
}
-/*
-static Eina_Bool __vp_normal_screenshot_timer_cb(void *pUserData)
-{
- if (!pUserData) {
- VideoLogError("pUserData is NULL");
- return EINA_FALSE;
- }
- VideoLogWarning("");
-
- NormalView *pNormalView = (NormalView *)pUserData;
-
- VP_EVAS_DEL(pNormalView->pScreenShot);
- pNormalView->pScreenShot = NULL;
-
- elm_object_part_content_unset(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_SCREENSHOT_PORTRAIT);
- elm_object_part_content_unset(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_SCREENSHOT_LANDSCAPE);
-
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SCREEN_HIDE, "*");
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_ROTATE_HIDE, "*");
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_VOLUME_HIDE, "*");
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_PLAYING_SPEED_HIDE, "*");
-
- pNormalView->pScreenShotTimer = NULL;
-
- return EINA_FALSE;
-}
-*/
static Eina_Bool __vp_normal_dlna_speed_timer_cb(void *pUserData)
{
}
VideoLogWarning("");
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
VP_EVAS_DEL(pNormalView->pPopup);
pNormalView->pPopup = NULL;
}
pNormalView->bIsPopupShow = TRUE;
- pNormalView->pPopup = vp_popup_create(pPlayView->pWin, POPUP_STYLE_DEFAULT_WITH_CANCEL_BTN,
- NULL,
- VP_PLAY_STRING_UNABLE_TO_FF_REW,
- 0.0, NULL,
- __vp_normal_popup_key_event_cb,
- __vp_normal_popup_mouse_event_cb,
- pNormalView);
+ pNormalView->pPopup =
+ vp_popup_create(pPlayView->pWin,
+ POPUP_STYLE_DEFAULT_WITH_CANCEL_BTN, NULL,
+ VP_PLAY_STRING_UNABLE_TO_FF_REW, 0.0, NULL,
+ __vp_normal_popup_key_event_cb,
+ __vp_normal_popup_mouse_event_cb, pNormalView);
Evas_Object *pBtn = NULL;
pBtn = elm_button_add(pNormalView->pPopup);
elm_object_style_set(pBtn, "popup_button/default");
- elm_object_domain_translatable_text_set(pBtn, VP_SYS_STR_PREFIX, VP_PLAY_STRING_COM_OK_IDS);
+ elm_object_domain_translatable_text_set(pBtn, VP_SYS_STR_PREFIX,
+ VP_PLAY_STRING_COM_OK_IDS);
elm_object_part_content_set(pNormalView->pPopup, "button1", pBtn);
- evas_object_smart_callback_add(pBtn, "clicked", __vp_normal_popup_key_event_cb, (void*)pNormalView);
+ evas_object_smart_callback_add(pBtn, "clicked",
+ __vp_normal_popup_key_event_cb,
+ (void *) pNormalView);
evas_object_show(pNormalView->pPopup);
pNormalView->pSpeedTimer = NULL;
}
VideoLogWarning("");
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
if (pNormalView->bSpeedDown) {
pNormalView->nSpeedValue++;
}
-
//SPEED: *2, *8, *32
//int nSeedVal = pNormalView->nSpeedValue - (pNormalView->nSpeedValue%2);
//SPEED: *2, *4, *8, *16, *32
int nSeedVal = pNormalView->nSpeedValue;
- int nStep = (int) pow(2.0, (double)(nSeedVal - 1));
+ int nStep = (int) pow(2.0, (double) (nSeedVal - 1));
- VideoLogWarning("pNormalView->nSpeedValue : %d", pNormalView->nSpeedValue);
+ VideoLogWarning("pNormalView->nSpeedValue : %d",
+ pNormalView->nSpeedValue);
if (pNormalView->nSpeedValue >= 2) {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SPEED_SHOW, "*");
+
+ if (pPlayView->szAutoPlay
+ && !strcmp(pPlayView->szAutoPlay, "TRUE")) {
+ pPlayView->bResetPlaySpeed = TRUE;
+ }
+
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SPEED_SHOW, "*");
} else {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
if (pNormalView->bManualPause == FALSE) {
vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE;
- if (!vp_mm_player_get_state(pNormalView->pPlayerHandle, &nState)) {
+ if (!vp_mm_player_get_state
+ (pNormalView->pPlayerHandle, &nState)) {
VideoLogWarning("vp_mm_player_get_state is fail");
}
if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
VideoLogError("Pause Fail");
}
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
_vp_play_normal_view_set_play_state(pNormalView);
nStep = VP_NORMAL_SPEED_VALUE_MAX;
}
- char szTxt[5] = {0,};
+ char szTxt[5] = { 0, };
snprintf(szTxt, 5, "%d X", nStep);
- elm_object_part_text_set(pNormalView->pMainLayout, VP_PLAY_PART_NORMAL_SPEED_TXT, szTxt);
+ elm_object_part_text_set(pNormalView->pMainLayout,
+ VP_PLAY_PART_NORMAL_SPEED_TXT, szTxt);
if (pNormalView->bSeekComplete == FALSE) {
VideoLogError("bSeekComplete is fail");
int nSetPosition = 0;
int nCurPosition = 0;
- if (!vp_mm_player_get_position(pNormalView->pPlayerHandle, &nCurPosition)) {
+ if (!vp_mm_player_get_position
+ (pNormalView->pPlayerHandle, &nCurPosition)) {
VideoLogError("vp_mm_player_get_position is fail");
return EINA_TRUE;
}
if (pNormalView->nDuration <= nCurPosition) {
- VideoLogWarning("nCurPosition : %d, Duration : %d", nCurPosition, pNormalView->nDuration);
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
+ VideoLogWarning("nCurPosition : %d, Duration : %d", nCurPosition,
+ pNormalView->nDuration);
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
_vp_play_normal_view_on_next_play(pNormalView, FALSE);
pNormalView->pSpeedTimer = NULL;
return EINA_FALSE;
}
if (nCurPosition <= 0 && pNormalView->bSpeedFF == FALSE) {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
- if (pNormalView->bManualPause == FALSE && pNormalView->bSpeedDown == FALSE) {
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
+ if (pNormalView->bManualPause == FALSE
+ && pNormalView->bSpeedDown == FALSE) {
vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE;
- if (!vp_mm_player_get_state(pNormalView->pPlayerHandle, &nState)) {
+ if (!vp_mm_player_get_state
+ (pNormalView->pPlayerHandle, &nState)) {
VideoLogWarning("vp_mm_player_get_state is fail");
}
}
if (pNormalView->bSpeedFF) {
- nSetPosition = nCurPosition + (nStep * 1000);
+ nSetPosition = nCurPosition + (nStep * 1000);
} else {
- nSetPosition = nCurPosition - (nStep * 1000);
+ nSetPosition = nCurPosition - (nStep * 1000);
}
if (pNormalView->nDuration < nSetPosition) {
nSetPosition = pNormalView->nDuration;
VP_EVAS_TIMER_DEL(pNormalView->pSpeedTimer);
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
}
if (nSetPosition < 0) {
nSetPosition = 0;
-// VP_EVAS_TIMER_DEL(pNormalView->pSpeedTimer);
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
}
if (pNormalView->pProgressTimer) {
VP_EVAS_TIMER_DEL(pNormalView->pProgressTimer);
}
- if (vp_mm_player_set_position_by_key_frame(pNormalView->pPlayerHandle, nSetPosition)) {
+ if (vp_mm_player_set_position_by_key_frame
+ (pNormalView->pPlayerHandle, nSetPosition)) {
pNormalView->bSeekComplete = FALSE;
pNormalView->nCurPosition = nSetPosition;
- vp_play_progressbar_set_position(pNormalView->pProgressbar, nSetPosition);
+ vp_play_progressbar_set_position(pNormalView->pProgressbar,
+ nSetPosition);
}
return EINA_TRUE;
-static void __vp_normal_show_finish_cb(void *pUserData, Evas_Object *pObj, const char *emission, const char *source)
+static void __vp_normal_show_finish_cb(void *pUserData, Evas_Object * pObj,
+ const char *emission,
+ const char *source)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
VideoLogWarning("");
-
- //NormalView *pNormalView = (NormalView *)pUserData;
}
-static void __vp_normal_hide_finish_cb(void *pUserData, Evas_Object *pObj, const char *emission, const char *source)
+static void __vp_normal_hide_finish_cb(void *pUserData, Evas_Object * pObj,
+ const char *emission,
+ const char *source)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
}
VideoLogWarning("");
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VP_EVAS_TIMER_DEL(pNormalView->pHideFinishTimer);
- pNormalView->pHideFinishTimer = ecore_timer_add(VP_NORMAL_HIDE_LAYOUT_FINISH_TIMER_INTERVAL,
- __vp_normal_hide_layout_finish_timer_cb, (void *)pNormalView);
+ pNormalView->pHideFinishTimer =
+ ecore_timer_add(VP_NORMAL_HIDE_LAYOUT_FINISH_TIMER_INTERVAL,
+ __vp_normal_hide_layout_finish_timer_cb,
+ (void *) pNormalView);
#ifndef SUBTITLE_K_FEATURE
if (pNormalView->nDisplayMode != VP_MM_PLAYER_DISPLAY_FULL_SCREEN) {
- if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_NONE || pNormalView->nRotate == VIDEO_PLAY_ROTATE_180) {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SUBTITLE_PORTRAIT, "*");
+ if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_NONE
+ || pNormalView->nRotate == VIDEO_PLAY_ROTATE_180) {
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SUBTITLE_PORTRAIT,
+ "*");
} else {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SUBTITLE_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SUBTITLE_HIDE,
+ "*");
}
} else {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SUBTITLE_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SUBTITLE_HIDE, "*");
}
#endif
}
return EINA_FALSE;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
if (!_vp_play_normal_view_update_progress_value(pNormalView)) {
pNormalView->pProgressTimer = NULL;
return EINA_FALSE;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_LOCKSCREEN_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_LOCKSCREEN_HIDE, "*");
pNormalView->pLockScreenTimer = NULL;
}
VideoLogWarning("");
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
if (pNormalView->pPreparePipe != NULL) {
- ecore_pipe_write(pNormalView->pPreparePipe, pNormalView, sizeof(NormalView));
+ ecore_pipe_write(pNormalView->pPreparePipe, pNormalView,
+ sizeof(NormalView));
}
}
}
VideoLogWarning("");
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return;
}
- if(pPlayView->szAutoPlay != NULL) {
- if(!strcmp(pPlayView->szAutoPlay,"TRUE")) {
- VideoLogError("===========================vp_is_auto_play_on is True");
- _vp_play_normal_view_on_next_play(pNormalView, TRUE);
- }
- else
- {
- VideoLogError("===========================vp_is_auto_play_on is False");
+ if (pPlayView->szAutoPlay != NULL) {
+ if (!strcmp(pPlayView->szAutoPlay, "TRUE")) {
+ VideoLogError
+ ("===========================vp_is_auto_play_on is True");
+ _vp_play_normal_view_on_next_play(pNormalView, TRUE);
+ } else {
+ VideoLogError
+ ("===========================vp_is_auto_play_on is False");
+ _vp_play_normal_view_on_next_play(pNormalView, FALSE);
+ }
+ } else {
+ VideoLogError
+ ("===========================vp_is_auto_play_on is False");
_vp_play_normal_view_on_next_play(pNormalView, FALSE);
}
- }
- else
- {
- VideoLogError("===========================vp_is_auto_play_on is False");
- _vp_play_normal_view_on_next_play(pNormalView, FALSE);
- }
#ifdef FLICK_JUMP
pNormalView->bFlickWaiting = FALSE;
#endif
if (pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_WEB &&
- pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_PREVIEW &&
- pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MESSAGE &&
- pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_EMAIL &&
- pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MULTI_PATH) {
+ pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_PREVIEW &&
+ pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MESSAGE &&
+ pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_EMAIL &&
+ pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MULTI_PATH) {
vp_media_contents_set_played_position(pNormalView->szMediaURL, 0);
} else if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MULTI_PATH) {
- vp_multi_path_set_item_position(pNormalView->szMediaURL, 0, pPlayView->pMultiPathList);
+ vp_multi_path_set_item_position(pNormalView->szMediaURL, 0,
+ pPlayView->pMultiPathList);
}
vp_mm_player_unrealize(pNormalView->pPlayerHandle);
if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MESSAGE ||
- pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_EMAIL ||
- pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_PREVIEW) {
+ pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_EMAIL ||
+ pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_PREVIEW) {
if (!pPlayView->pFunc) {
VideoLogError("pPlayView pFunc is NULL");
return;
}
-static void __vp_play_normal_view_seek_pipe_cb(void *pUserData, void *pBuf, int nByte)
+static void __vp_play_normal_view_seek_pipe_cb(void *pUserData, void *pBuf,
+ int nByte)
{
if (!pUserData) {
VideoLogError("NormalView handle is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
if (pNormalView->nWaitPos >= 0) {
if (pNormalView->bProgressDown == TRUE) {
- VideoLogWarning("== I-FRAME SEEK ==[%d]", pNormalView->nWaitPos);
- if (vp_mm_player_set_position_by_key_frame(pNormalView->pPlayerHandle, pNormalView->nWaitPos)) {
+ VideoLogWarning("== I-FRAME SEEK ==[%d]",
+ pNormalView->nWaitPos);
+ if (vp_mm_player_set_position_by_key_frame
+ (pNormalView->pPlayerHandle, pNormalView->nWaitPos)) {
pNormalView->bSeekComplete = FALSE;
pNormalView->nWaitPos = -1;
return;
}
} else {
VideoLogWarning("== REAL SEEK ==[%d]", pNormalView->nWaitPos);
- if (vp_mm_player_set_position(pNormalView->pPlayerHandle, pNormalView->nWaitPos)) {
+ if (vp_mm_player_set_position
+ (pNormalView->pPlayerHandle, pNormalView->nWaitPos)) {
pNormalView->bSeekComplete = FALSE;
pNormalView->nWaitPos = -1;
return;
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
VideoLogWarning("%d", pNormalView->nWaitPos);
PlayView *pPlayView = pNormalView->pPlayView;
if (vp_play_util_check_streaming(pNormalView->szMediaURL)) {
if (pNormalView->bBufferingComplete == FALSE) {
- VideoLogError("Skip for buffering state : buffering complete(false) so, set StartPosition 0");
+ VideoLogError
+ ("Skip for buffering state : buffering complete(false) so, set StartPosition 0");
if (pNormalView->nStartPosition > 0) {
pNormalView->nStartPosition = 0;
pNormalView->bIsRealize = TRUE;
if (pPlayView->bAVRCP) {
int nPosition = 0;
- if (!vp_mm_player_get_position(pNormalView->pPlayerHandle, &nPosition)) {
+ if (!vp_mm_player_get_position
+ (pNormalView->pPlayerHandle, &nPosition)) {
VideoLogError("vp_mm_player_get_position is fail");
} else {
vp_avrcp_noti_track_position(nPosition);
vp_play_config_get_lcd_off_state(&bLCDOffStatus);
if (bLCDOffStatus && (pNormalView->bVideoOnlyMode == FALSE)) {
VideoLogError("Invalid LCD Status");
- //elm_exit();
pPlayView->pFunc->vp_play_func_exit(pPlayView);
return;
}
- if (pNormalView->bManualPause || pNormalView->bSharepopup || _vp_play_normal_view_check_during_call(pNormalView)) {
+ if (pNormalView->bManualPause || pNormalView->bSharepopup
+ || _vp_play_normal_view_check_during_call(pNormalView)) {
vp_mm_player_pause(pNormalView->pPlayerHandle);
} else {
vp_mm_player_play(pNormalView->pPlayerHandle);
vp_lockscreenmini_update_control(pPlayView);
}
- if (!vp_mm_player_set_subtitle_position(pNormalView->pPlayerHandle, pNormalView->fSubtitleSyncValue * 1000)) {
+ if (!vp_mm_player_set_subtitle_position
+ (pNormalView->pPlayerHandle,
+ pNormalView->fSubtitleSyncValue * 1000)) {
VideoLogError("vp_mm_player_set_subtitle_position is fail");
}
}
_vp_play_normal_view_set_play_state(pNormalView);
_vp_play_normal_view_on_capture_mode(pNormalView);
- //_vp_play_normal_view_show_layout(pNormalView);
return;
}
if (pNormalView->nWaitPos >= 0) {
if (pNormalView->pSeekPipe) {
- ecore_pipe_write(pNormalView->pSeekPipe, pNormalView, sizeof(NormalView));
+ ecore_pipe_write(pNormalView->pSeekPipe, pNormalView,
+ sizeof(NormalView));
}
}
if (pNormalView->bManualPause == FALSE &&
- pNormalView->bProgressDown == FALSE &&
- !pNormalView->pSpeedTimer && !_vp_play_normal_view_check_during_call(pNormalView)) {
+ pNormalView->bProgressDown == FALSE &&
+ !pNormalView->pSpeedTimer
+ && !_vp_play_normal_view_check_during_call(pNormalView)) {
vp_mm_player_play(pNormalView->pPlayerHandle);
if (pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
VideoLogDebug("#################END####################");
}
-static void __vp_normal_interrupted_cb(vp_mm_player_interrupt_t nCode, void *pUserData)
+
+static void __vp_normal_interrupted_cb(vp_mm_player_interrupt_t nCode,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
if (nCode == VP_MM_PLAYER_INTERRUPTED_COMPLETED) {
if (pNormalView->bManualPause == FALSE) {
vp_mm_player_play(pNormalView->pPlayerHandle);
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
}
if (pNormalView->bDeviceRemoveInterrupt) {
if (pNormalView->bManualPause == FALSE) {
vp_mm_player_play(pNormalView->pPlayerHandle);
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
}
_vp_play_normal_view_on_capture_mode(pNormalView);
}
-static void __vp_normal_error_cb(vp_mm_player_error_t nError, void *pUserData)
+static void __vp_normal_error_cb(vp_mm_player_error_t nError,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
VideoLogWarning("Error triggered: 0x%x", nError);
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
VP_EVAS_DEL(pNormalView->pPopup);
case VP_MM_PLAYER_ERR_FILE_NO_SPACE_ON_DEVICE:
case VP_MM_PLAYER_ERR_INVALID_PARAMETER:
pNormalView->pPopup = vp_popup_create(pParent,
- POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
- VP_PLAY_STRING_COM_ERROR,
- VP_PLAY_STRING_ERROR_UNABLE_PLAY,
- 3.0, __vp_normal_error_popup_time_out_cb,
- __vp_normal_error_popup_key_event_cb,
- __vp_normal_error_popup_mouse_event_cb,
- pNormalView);
+ POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
+ VP_PLAY_STRING_COM_ERROR,
+ VP_PLAY_STRING_ERROR_UNABLE_PLAY,
+ 3.0,
+ __vp_normal_error_popup_time_out_cb,
+ __vp_normal_error_popup_key_event_cb,
+ __vp_normal_error_popup_mouse_event_cb,
+ pNormalView);
evas_object_show(pNormalView->pPopup);
pNormalView->bIsPopupShow = TRUE;
break;
case VP_MM_PLAYER_ERR_NO_SUCH_FILE:
pNormalView->pPopup = vp_popup_create(pParent,
- POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
- VP_PLAY_STRING_COM_ERROR,
- VP_PLAY_STRING_ERROR_FILE_NOT_EXIST,
- 3.0, __vp_normal_error_popup_time_out_cb,
- __vp_normal_error_popup_key_event_cb,
- __vp_normal_error_popup_mouse_event_cb,
- pNormalView);
+ POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
+ VP_PLAY_STRING_COM_ERROR,
+ VP_PLAY_STRING_ERROR_FILE_NOT_EXIST,
+ 3.0,
+ __vp_normal_error_popup_time_out_cb,
+ __vp_normal_error_popup_key_event_cb,
+ __vp_normal_error_popup_mouse_event_cb,
+ pNormalView);
evas_object_show(pNormalView->pPopup);
pNormalView->bIsPopupShow = TRUE;
break;
case VP_MM_PLAYER_ERR_NOT_SUPPORTED_FILE:
pNormalView->pPopup = vp_popup_create(pParent,
- POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
- VP_PLAY_STRING_COM_ERROR,
- VP_PLAY_STRING_ERROR_UNSUPPORTED_FORMAT,
- 3.0, __vp_normal_error_popup_time_out_cb,
- __vp_normal_error_popup_key_event_cb,
- __vp_normal_error_popup_mouse_event_cb,
- pNormalView);
+ POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
+ VP_PLAY_STRING_COM_ERROR,
+ VP_PLAY_STRING_ERROR_UNSUPPORTED_FORMAT,
+ 3.0,
+ __vp_normal_error_popup_time_out_cb,
+ __vp_normal_error_popup_key_event_cb,
+ __vp_normal_error_popup_mouse_event_cb,
+ pNormalView);
evas_object_show(pNormalView->pPopup);
pNormalView->bIsPopupShow = TRUE;
break;
case VP_MM_PLAYER_ERR_INVALID_URI:
pNormalView->pPopup = vp_popup_create(pParent,
- POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
- VP_PLAY_STRING_COM_ERROR,
- VP_PLAY_STRING_ERROR_INVALID_URL,
- 3.0, __vp_normal_error_popup_time_out_cb,
- __vp_normal_error_popup_key_event_cb,
- __vp_normal_error_popup_mouse_event_cb,
- pNormalView);
+ POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
+ VP_PLAY_STRING_COM_ERROR,
+ VP_PLAY_STRING_ERROR_INVALID_URL,
+ 3.0,
+ __vp_normal_error_popup_time_out_cb,
+ __vp_normal_error_popup_key_event_cb,
+ __vp_normal_error_popup_mouse_event_cb,
+ pNormalView);
evas_object_show(pNormalView->pPopup);
pNormalView->bIsPopupShow = TRUE;
break;
case VP_MM_PLAYER_ERR_CONNECTION_FAILED:
pNormalView->pPopup = vp_popup_create(pParent,
- POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
- VP_PLAY_STRING_COM_ERROR,
- VP_PLAY_STRING_ERROR_CONNECTION_FAILED,
- 3.0, __vp_normal_error_popup_time_out_cb,
- __vp_normal_error_popup_key_event_cb,
- __vp_normal_error_popup_mouse_event_cb,
- pNormalView);
+ POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
+ VP_PLAY_STRING_COM_ERROR,
+ VP_PLAY_STRING_ERROR_CONNECTION_FAILED,
+ 3.0,
+ __vp_normal_error_popup_time_out_cb,
+ __vp_normal_error_popup_key_event_cb,
+ __vp_normal_error_popup_mouse_event_cb,
+ pNormalView);
evas_object_show(pNormalView->pPopup);
pNormalView->bIsPopupShow = TRUE;
break;
case VP_MM_PLAYER_ERR_DRM_FUTURE_USE:
VideoLogWarning("DRM BUG");
pNormalView->pPopup = vp_popup_create(pParent,
- POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
- VP_PLAY_STRING_COM_ERROR,
- VP_PLAY_STRING_ERROR_UNABLE_PLAY,
- 3.0, __vp_normal_error_popup_time_out_cb,
- __vp_normal_error_popup_key_event_cb,
- __vp_normal_error_popup_mouse_event_cb,
- pNormalView);
+ POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
+ VP_PLAY_STRING_COM_ERROR,
+ VP_PLAY_STRING_ERROR_UNABLE_PLAY,
+ 3.0,
+ __vp_normal_error_popup_time_out_cb,
+ __vp_normal_error_popup_key_event_cb,
+ __vp_normal_error_popup_mouse_event_cb,
+ pNormalView);
evas_object_show(pNormalView->pPopup);
pNormalView->bIsPopupShow = TRUE;
break;
case VP_MM_PLAYER_ERR_DRM_NO_LICENSE:
- pNormalView->pPopup = vp_popup_create(pPlayView->pWin, POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
- VP_PLAY_STRING_COM_ERROR,
- VP_PLAY_STRING_DIVX_DRM_AUTHORIZATION_ERROR,
- 3.0, __vp_normal_error_popup_time_out_cb,
- __vp_normal_error_popup_key_event_cb,
- __vp_normal_error_popup_mouse_event_cb,
- pNormalView);
+ pNormalView->pPopup =
+ vp_popup_create(pPlayView->pWin,
+ POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
+ VP_PLAY_STRING_COM_ERROR,
+ VP_PLAY_STRING_DIVX_DRM_AUTHORIZATION_ERROR,
+ 3.0, __vp_normal_error_popup_time_out_cb,
+ __vp_normal_error_popup_key_event_cb,
+ __vp_normal_error_popup_mouse_event_cb,
+ pNormalView);
evas_object_show(pNormalView->pPopup);
pNormalView->bIsPopupShow = TRUE;
break;
default:
VideoLogWarning("UNKNOWN TYPE : %d", nError);
if (pNormalView->nRepeatMode == VIDEO_PLAY_REPEAT_ONE ||
- pNormalView->nRepeatMode == VIDEO_PLAY_REPEAT_ALL) {
- PlayView *pPlayView = pNormalView->pPlayView;
- if (!pPlayView) {
- VideoLogError("pPlayView is NULL");
- return;
- }
- if (!pPlayView->pFunc) {
- VideoLogError("pPlayView pFunc is NULL");
- return;
- }
-
- if (!pPlayView->pFunc->vp_play_func_exit) {
- VideoLogError("pPlayView exit Func is NULL");
- return;
- }
- vp_device_set_screen_off(FALSE);
- vp_play_util_set_unlock_power_key();
+ pNormalView->nRepeatMode == VIDEO_PLAY_REPEAT_ALL) {
+ PlayView *pPlayView = pNormalView->pPlayView;
+ if (!pPlayView) {
+ VideoLogError("pPlayView is NULL");
+ return;
+ }
+ if (!pPlayView->pFunc) {
+ VideoLogError("pPlayView pFunc is NULL");
+ return;
+ }
- pPlayView->pFunc->vp_play_func_exit(pPlayView);
- } else {
- _vp_play_normal_view_on_next_play(pNormalView, FALSE);
+ if (!pPlayView->pFunc->vp_play_func_exit) {
+ VideoLogError("pPlayView exit Func is NULL");
+ return;
}
+ vp_device_set_screen_off(FALSE);
+ vp_play_util_set_unlock_power_key();
+
+ pPlayView->pFunc->vp_play_func_exit(pPlayView);
+ } else {
+ _vp_play_normal_view_on_next_play(pNormalView, FALSE);
+ }
break;
}
}
-static void _vp_normal_view_loading_ani_layout_del_cb(void *data, Evas *e,
- Evas_Object *obj,
- void *event_info)
+static void _vp_normal_view_loading_ani_layout_del_cb(void *data, Evas * e,
+ Evas_Object * obj,
+ void *event_info)
{
if (!data) {
VideoLogError("pNormalView is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)data;
+ NormalView *pNormalView = (NormalView *) data;
pNormalView->pLoadingAni = NULL;
}
-static bool _vp_play_normal_view_create_loading_ani(NormalView *pNormalView)
+static bool _vp_play_normal_view_create_loading_ani(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
pNormalView->pLoadingAni = NULL;
}
- pNormalView->pLoadingAni = vp_play_loading_ani_create(pParent, VIDEO_LOADING_SIZE_LARGE);
+ pNormalView->pLoadingAni =
+ vp_play_loading_ani_create(pParent, VIDEO_LOADING_SIZE_LARGE);
if (!pNormalView->pLoadingAni) {
VideoLogError("pLoadingAni create fail");
return FALSE;
}
- evas_object_event_callback_add(pNormalView->pLoadingAni, EVAS_CALLBACK_DEL, _vp_normal_view_loading_ani_layout_del_cb, (void *)pNormalView);
+ evas_object_event_callback_add(pNormalView->pLoadingAni,
+ EVAS_CALLBACK_DEL,
+ _vp_normal_view_loading_ani_layout_del_cb,
+ (void *) pNormalView);
- elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_LOADING_ANI, pNormalView->pLoadingAni);
+ elm_object_part_content_set(pParent,
+ VP_PLAY_SWALLOW_NORMAL_LOADING_ANI,
+ pNormalView->pLoadingAni);
return TRUE;
}
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
}
if (pNormalView->nSpeedValue > 1) {
- VideoLogWarning("pNormalView->nSpeedValue : [%d]", pNormalView->nSpeedValue);
+ VideoLogWarning("pNormalView->nSpeedValue : [%d]",
+ pNormalView->nSpeedValue);
} else {
- if (pNormalView->bManualPause || pPlayView->bActivate == FALSE) {
- vp_mm_player_set_visible(pNormalView->pPlayerHandle, TRUE);
+ if (pNormalView->bManualPause
+ || pPlayView->bActivate == FALSE) {
+ vp_mm_player_set_visible(pNormalView->pPlayerHandle,
+ TRUE);
vp_mm_player_pause(pNormalView->pPlayerHandle);
} else {
vp_mm_player_play(pNormalView->pPlayerHandle);
//
} else if (!pNormalView->pLoadingAni) {
if (!_vp_play_normal_view_create_loading_ani(pNormalView)) {
- VideoLogError("_vp_play_normal_view_create_loading_ani fail");
+ VideoLogError
+ ("_vp_play_normal_view_create_loading_ani fail");
return;
}
}
}
}
-static void __vp_normal_subtitle_updated_cb(unsigned long nDuration, char *text, void *pUserData)
+static void __vp_normal_subtitle_updated_cb(unsigned long nDuration,
+ char *text, void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
}
VideoLogWarning("%s", text);
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
int nPosition = 0;
if (!vp_mm_player_get_position(pNormalView->pPlayerHandle, &nPosition)) {
if (bIsWhiteSpace) {
vp_play_subtitle_set_text(pNormalView->pSubtitle, "");
- elm_object_signal_emit(vp_play_subtitle_get_object(pNormalView->pSubtitle), VP_SUBTITLE_SIGNAL_CAPTION_WINDOW_HIDE, "*");
- elm_object_signal_emit(vp_play_subtitle_get_object(pNormalView->pSubtitle), VP_SUBTITLE_SIGNAL_GREP_BOX_HIDE, "*");
+ elm_object_signal_emit(vp_play_subtitle_get_object
+ (pNormalView->pSubtitle),
+ VP_SUBTITLE_SIGNAL_CAPTION_WINDOW_HIDE,
+ "*");
+ elm_object_signal_emit(vp_play_subtitle_get_object
+ (pNormalView->pSubtitle),
+ VP_SUBTITLE_SIGNAL_GREP_BOX_HIDE, "*");
return;
}
- double dTimeInterval = (double)nDuration / (double)1000;
+ double dTimeInterval = (double) nDuration / (double) 1000;
if (!vp_mm_player_get_position(pNormalView->pPlayerHandle, &nPosition)) {
VideoLogError("vp_mm_player_get_position is fail");
pNormalView->dSubtitleEndTime = nPosition + nDuration;
pNormalView->pSubtitleTimer = ecore_timer_add(dTimeInterval,
- __vp_normal_subtitle_timer_cb, (void *)pNormalView);
+ __vp_normal_subtitle_timer_cb,
+ (void *) pNormalView);
vp_play_subtitle_set_text(pNormalView->pSubtitle, text);
#ifdef SUBTITLE_K_FEATURE
- /*Set caption window: size, rel1, color*/
+ /*Set caption window: size, rel1, color */
__vp_normal_subtitle_set_caption_window(pNormalView);
#endif
}
-static void __vp_normal_pd_message_cb(vp_mm_player_pd_message_t nType, void *pUserData)
+static void __vp_normal_pd_message_cb(vp_mm_player_pd_message_t nType,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
VideoLogWarning("");
}
-static void __vp_normal_missed_plugin_cb(vp_mm_player_missed_plugin_t nType, void *pUserData)
+static void __vp_normal_missed_plugin_cb(vp_mm_player_missed_plugin_t
+ nType, void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
}
VideoLogWarning("nType=%d", nType);
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
VP_EVAS_DEL(pNormalView->pPopup);
} else if (nType == VP_MM_PLAYER_MISSED_PLUGIN_VIDEO) {
_vp_play_normal_view_show_audio_only_popup(pNormalView);
}
-#else /* Disabled. please use ecore_pipe if need to use popup. */
+#else /* Disabled. please use ecore_pipe if need to use popup. */
Evas_Object *pParent = pPlayView->pWin;
if (nType == VP_MM_PLAYER_MISSED_PLUGIN_AUDIO) {
pNormalView->pPopup = vp_popup_create(pParent,
- POPUP_STYLE_DEFAULT,
- NULL,
- VP_PLAY_STRING_ERROR_UNSUPPORTED_AUDIO,
- 3.0, __vp_normal_popup_time_out_cb,
- __vp_normal_popup_key_event_cb,
- __vp_normal_popup_mouse_event_cb,
- pNormalView);
+ POPUP_STYLE_DEFAULT,
+ NULL,
+ VP_PLAY_STRING_ERROR_UNSUPPORTED_AUDIO,
+ 3.0,
+ __vp_normal_popup_time_out_cb,
+ __vp_normal_popup_key_event_cb,
+ __vp_normal_popup_mouse_event_cb,
+ pNormalView);
evas_object_show(pNormalView->pPopup);
pNormalView->bIsPopupShow = TRUE;
} else if (nType == VP_MM_PLAYER_MISSED_PLUGIN_VIDEO) {
pNormalView->pPopup = vp_popup_create(pParent,
- POPUP_STYLE_DEFAULT,
- NULL,
- VP_PLAY_STRING_ERROR_UNSUPPORTED_VIDEO,
- 3.0, __vp_normal_popup_time_out_cb,
- __vp_normal_popup_key_event_cb,
- __vp_normal_popup_mouse_event_cb,
- pNormalView);
+ POPUP_STYLE_DEFAULT,
+ NULL,
+ VP_PLAY_STRING_ERROR_UNSUPPORTED_VIDEO,
+ 3.0,
+ __vp_normal_popup_time_out_cb,
+ __vp_normal_popup_key_event_cb,
+ __vp_normal_popup_mouse_event_cb,
+ pNormalView);
evas_object_show(pNormalView->pPopup);
pNormalView->bIsPopupShow = TRUE;
#endif
}
-static void __vp_normal_image_buffer_cb(char *pBuffer, int nSize, void *pUserData)
+static void __vp_normal_image_buffer_cb(char *pBuffer, int nSize,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
VideoLogWarning("%p, %d", pBuffer, nSize);
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
if (pNormalView->pImageBufferObj) {
- elm_object_part_content_unset(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_IMAGE_BUFFER);
+ elm_object_part_content_unset(pNormalView->pMainLayout,
+ VP_PLAY_SWALLOW_NORMAL_IMAGE_BUFFER);
VP_EVAS_DEL(pNormalView->pImageBufferObj);
}
vp_play_util_save_file(VP_PLAY_IMAGE_BUFFER_PATH, pBuffer, nSize);
pNormalView->pImageBufferObj = elm_image_add(pNormalView->pMainLayout);
- elm_image_file_set(pNormalView->pImageBufferObj, VP_PLAY_IMAGE_BUFFER_PATH, NULL);
+ elm_image_file_set(pNormalView->pImageBufferObj,
+ VP_PLAY_IMAGE_BUFFER_PATH, NULL);
- evas_object_size_hint_weight_set(pNormalView->pImageBufferObj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(pNormalView->pImageBufferObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pNormalView->pImageBufferObj,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pNormalView->pImageBufferObj,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_object_part_content_set(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_IMAGE_BUFFER, pNormalView->pImageBufferObj);
+ elm_object_part_content_set(pNormalView->pMainLayout,
+ VP_PLAY_SWALLOW_NORMAL_IMAGE_BUFFER,
+ pNormalView->pImageBufferObj);
evas_object_show(pNormalView->pImageBufferObj);
}
-#if 1
-static void _vp_normal_set_audio_only_image(NormalView *pNormalView, bool bAudioOnly)
+
+static void _vp_normal_set_audio_only_image(NormalView * pNormalView,
+ bool bAudioOnly)
{
if (pNormalView->pImageBufferObj) {
- elm_object_part_content_unset(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_IMAGE_BUFFER);
+ elm_object_part_content_unset(pNormalView->pMainLayout,
+ VP_PLAY_SWALLOW_NORMAL_IMAGE_BUFFER);
VP_EVAS_DEL(pNormalView->pImageBufferObj);
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_RESROUCE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_RESROUCE_EDJ_PATH);
free(path);
if (bAudioOnly == TRUE) {
- pNormalView->pImageBufferObj = vp_button_create_image(pNormalView->pMainLayout,
- edj_path,
- VP_PLAY_NORMAL_AUDIO_ERROR_IMG);
- evas_object_size_hint_weight_set(pNormalView->pImageBufferObj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(pNormalView->pImageBufferObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_color_set(pNormalView->pImageBufferObj, 255, 255, 255, 255);
- elm_object_part_content_set(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_ERROR_IMAGE, pNormalView->pImageBufferObj);
+ pNormalView->pImageBufferObj =
+ vp_button_create_image(pNormalView->pMainLayout, edj_path,
+ VP_PLAY_NORMAL_AUDIO_ERROR_IMG);
+ evas_object_size_hint_weight_set(pNormalView->pImageBufferObj,
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pNormalView->pImageBufferObj,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_color_set(pNormalView->pImageBufferObj, 255, 255, 255,
+ 255);
+ elm_object_part_content_set(pNormalView->pMainLayout,
+ VP_PLAY_SWALLOW_NORMAL_ERROR_IMAGE,
+ pNormalView->pImageBufferObj);
evas_object_show(pNormalView->pImageBufferObj);
- /*double dImageAspectRatio = (double)270/214;
-
- pNormalView->pImageBufferObj = vp_button_create_image(pNormalView->pMainLayout,
- edj_path,
- VP_PLAY_NORMAL_AUDIO_ONLY_IMG);
- evas_object_size_hint_weight_set(pNormalView->pImageBufferObj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(pNormalView->pImageBufferObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
- evas_object_size_hint_max_set(pNormalView->pImageBufferObj, 720, 720/dImageAspectRatio);
- elm_image_aspect_fixed_set(pNormalView->pImageBufferObj, EINA_TRUE);
-
- elm_object_part_content_set(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_IMAGE_BUFFER, pNormalView->pImageBufferObj);
- evas_object_show(pNormalView->pImageBufferObj);*/
}
}
-#endif
-static void __vp_normal_ctx_popup_dismiss_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
+
+static void __vp_normal_ctx_popup_dismiss_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (!pObj) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
VP_EVAS_DEL(pNormalView->pCtxPopup);
_vp_play_normal_view_create_layout_hide_timer(pNormalView);
}
-static void __vp_normal_ctx_popup_share_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
+static void __vp_normal_ctx_popup_share_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogError("[ERR]No have pUserData");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
VP_EVAS_DEL(pNormalView->pCtxPopup);
- if (pNormalView->bSharepopup) {
- VideoLogWarning("Share popup is creating, ignore this event");
- return;
- }
_vp_play_normal_view_on_share_popup(pNormalView);
}
-static void __vp_normal_ctx_popup_audio_only_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
+static void __vp_normal_ctx_popup_audio_only_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogError("[ERR]No have pUserData");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
VP_EVAS_DEL(pNormalView->pCtxPopup);
PlayView *pPlayView = pNormalView->pPlayView;
return;
}
- if(pNormalView->bAudioOnly == TRUE)
- {
+ if (pNormalView->bAudioOnly == TRUE) {
pNormalView->bAudioOnly = FALSE;
pPlayView->bAudioOnly = FALSE;
if (pPlayView->win_lockmini) {
vp_lockscreenmini_destroy(pPlayView);
}
- }
- else
- {
+ } else {
pNormalView->bAudioOnly = TRUE;
pPlayView->bAudioOnly = TRUE;
- vp_play_util_status_noti_show(VP_PLAY_STRING_AUDIO_ONLY_PLAYBACK_MSG);
+ vp_play_util_status_noti_show
+ (VP_PLAY_STRING_AUDIO_ONLY_PLAYBACK_MSG);
if (!pPlayView->win_minicon) {
vp_minicontroller_create(pPlayView);
}
-static void __vp_normal_ctx_popup_subtitle_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
+static void __vp_normal_ctx_popup_subtitle_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogError("[ERR]No have pUserData");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
VP_EVAS_DEL(pNormalView->pCtxPopup);
VideoLogWarning("vp_mm_player_get_state is fail");
}
- /*If it is playing video, pause video*/
- if (pNormalView->bVideoOnlyMode == FALSE && nState == VP_MM_PLAYER_STATE_PLAYING) {
+ /*If it is playing video, pause video */
+ if (pNormalView->bVideoOnlyMode == FALSE
+ && nState == VP_MM_PLAYER_STATE_PLAYING) {
if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
VideoLogError("Pause Fail");
}
}
-static void __vp_normal_del_popup_cancel_cb(void *data, Evas_Object *obj, void *event_info)
+static void __vp_normal_del_popup_cancel_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
- NormalView *pNormalView = (NormalView*)data;
+ NormalView *pNormalView = (NormalView *) data;
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
pNormalView->bIsPopupShow = FALSE;
+ if (_vp_is_current_focus_available() != 0) {
+ VideoLogInfo("Cannot acquire focus. Setting video to pause state");
+ pNormalView->bManualPause = TRUE;
+ }
+
if (pNormalView->bManualPause == FALSE) {
if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
VideoLogWarning("Pause Fail");
}
}
-static void __vp_normal_del_popup_delete_cb(void *data, Evas_Object *obj, void *event_info)
+static void __vp_normal_del_popup_delete_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
- NormalView *pNormalView = (NormalView*)data;
+ NormalView *pNormalView = (NormalView *) data;
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
return;
}
}
-static void __vp_normal_ctx_popup_delete_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
+static void __vp_normal_ctx_popup_delete_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogError("[ERR]No have pUserData");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
VP_EVAS_DEL(pNormalView->pCtxPopup);
VideoLogWarning("vp_mm_player_get_state is fail");
}
- if (pNormalView->bVideoOnlyMode == FALSE && nState == VP_MM_PLAYER_STATE_PLAYING) {
+ if (pNormalView->bVideoOnlyMode == FALSE
+ && nState == VP_MM_PLAYER_STATE_PLAYING) {
if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
VideoLogError("Pause Fail");
}
}
VP_EVAS_DEL(pNormalView->pPopup);
- pNormalView->pPopup = vp_two_button_popup_create(pPlayView->pWin,
- VP_PLAY_STRING_POPUP_DELETE,
- VP_PLAY_STRING_POPUP_DELETE_CONTENT,
- VP_PLAY_STRING_CANCEL,
- __vp_normal_del_popup_cancel_cb,
- VP_PLAY_STRING_POPUP_DELETE,
- __vp_normal_del_popup_delete_cb,
- (const void*)pNormalView);
+ pNormalView->pPopup = vp_two_button_popup_create(pPlayView->pWin,
+ VP_PLAY_STRING_POPUP_DELETE,
+ VP_PLAY_STRING_POPUP_DELETE_CONTENT,
+ VP_PLAY_STRING_CANCEL,
+ __vp_normal_del_popup_cancel_cb,
+ VP_PLAY_STRING_POPUP_DELETE,
+ __vp_normal_del_popup_delete_cb,
+ (const void *)
+ pNormalView);
pNormalView->bIsPopupShow = TRUE;
- eext_object_event_callback_add(pNormalView->pPopup, EEXT_CALLBACK_BACK, __vp_normal_del_popup_cancel_cb, (void*)pNormalView);
+ eext_object_event_callback_add(pNormalView->pPopup, EEXT_CALLBACK_BACK,
+ __vp_normal_del_popup_cancel_cb,
+ (void *) pNormalView);
}
-/*
-static void __vp_normal_ctx_popup_repeat_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
-{
- if (!pUserData) {
- VideoLogError("[ERR]No have pUserData");
- return;
- }
-
- NormalView *pNormalView = (NormalView *)pUserData;
-
- VP_EVAS_DEL(pNormalView->pCtxPopup);
-
- PlayView *pPlayView = pNormalView->pPlayView;
- if (!pPlayView) {
- VideoLogError("pPlayView is NULL");
- return;
- }
-
- vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE;
- if (!vp_mm_player_get_state(pNormalView->pPlayerHandle, &nState)) {
- VideoLogWarning("vp_mm_player_get_state is fail");
- }
-
- if (pNormalView->bVideoOnlyMode == FALSE && nState == VP_MM_PLAYER_STATE_PLAYING) {
- if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
- VideoLogError("Pause Fail");
- }
- _vp_play_normal_view_set_play_state(pNormalView);
- }
-
- pNormalView->pRepeatHandle = vp_repeat_create(pPlayView->pWin,
- pNormalView->szMediaURL,
- __vp_normal_repeat_popup_close_cb);
-
-
- if (!pNormalView->pRepeatHandle) {
- VideoLogError("vp_repeat_create fail");
- return;
- }
- if (!vp_repeat_set_user_data(pNormalView->pRepeatHandle, (void *)pNormalView)) {
- VideoLogWarning("vp_repeat_set_user_data is fail");
- }
-
- if (!vp_repeat_realize(pNormalView->pRepeatHandle)) {
- VideoLogWarning("vp_repeat_realize is fail");
- }
- pNormalView->bIsPopupShow = TRUE;
-
- VP_EVAS_TIMER_DEL(pNormalView->pHideTimer);
- VP_EVAS_TIMER_DEL(pNormalView->pHideFinishTimer);
-}
-*/
-
-static void __vp_normal_ctx_popup_setting_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
+static void __vp_normal_ctx_popup_setting_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogError("[ERR]No have pUserData");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
VP_EVAS_DEL(pNormalView->pCtxPopup);
_vp_play_normal_view_on_setting_popup(pNormalView);
}
-/*
-static void __vp_normal_ctx_popup_sound_alive_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
-{
- if (!pUserData) {
- VideoLogError("[ERR]No have pUserData");
- return;
- }
-
- NormalView *pNormalView = (NormalView *)pUserData;
-
- VP_EVAS_DEL(pNormalView->pCtxPopup);
- _vp_play_normal_view_on_sound_alive_popup(pNormalView);
-}*/
-
-static void __vp_normal_ctx_popup_play_speed_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
+static void __vp_normal_ctx_popup_play_speed_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
VideoLogInfo("");
if (!pUserData) {
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogWarning("vp_mm_player_get_state is fail");
}
- if (pNormalView->bVideoOnlyMode == FALSE && nState == VP_MM_PLAYER_STATE_PLAYING) {
+ if (pNormalView->bVideoOnlyMode == FALSE
+ && nState == VP_MM_PLAYER_STATE_PLAYING) {
if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
VideoLogError("Pause Fail");
}
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
_vp_play_normal_view_set_play_state(pNormalView);
_vp_play_normal_view_on_play_speed_popup(pNormalView);
}
-static void __vp_normal_ctx_popup_detail_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
+static void __vp_normal_ctx_popup_detail_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogError("[ERR]No have pUserData");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
VP_EVAS_DEL(pNormalView->pCtxPopup);
_vp_play_normal_view_on_detail_popup(pNormalView);
}
-static bool _vp_play_normal_view_show_lock_screen(normal_view_handle pViewHandle)
+static bool _vp_play_normal_view_show_lock_screen(normal_view_handle
+ pViewHandle)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (pNormalView->bLockScreen == FALSE) {
return FALSE;
VP_EVAS_TIMER_DEL(pNormalView->pHideTimer);
VP_EVAS_TIMER_DEL(pNormalView->pHideFinishTimer);
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_LOCKSCREEN_SHOW, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_LOCKSCREEN_SHOW, "*");
pNormalView->pLockScreenTimer =
- ecore_timer_add(VP_NORMAL_HIDE_SCREEN_LOCK_TIMER_INTERVAL,
- __vp_normal_lockscreen_timer_cb, (void *)pNormalView);
+ ecore_timer_add(VP_NORMAL_HIDE_SCREEN_LOCK_TIMER_INTERVAL,
+ __vp_normal_lockscreen_timer_cb,
+ (void *) pNormalView);
return TRUE;
}
-static void __vp_normal_more_btn_clicked_cb(void *pUserData, Evas_Object *pObj, void *pEvent)
+
+static void __vp_normal_more_btn_clicked_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pNormalView->pCtxPopup is NULL");
return;
}
- eext_object_event_callback_add(pNormalView->pCtxPopup, EEXT_CALLBACK_BACK, __vp_normal_ctx_popup_dismiss_cb, (void *)pNormalView);
+ eext_object_event_callback_add(pNormalView->pCtxPopup,
+ EEXT_CALLBACK_BACK,
+ __vp_normal_ctx_popup_dismiss_cb,
+ (void *) pNormalView);
VP_EVAS_TIMER_DEL(pNormalView->pHideTimer);
VP_EVAS_TIMER_DEL(pNormalView->pHideFinishTimer);
- elm_object_style_set(pNormalView->pCtxPopup , "more/default");
- evas_object_smart_callback_add(pNormalView->pCtxPopup , "dismissed", __vp_normal_ctx_popup_dismiss_cb, (void *)pNormalView);
+ elm_object_style_set(pNormalView->pCtxPopup, "more/default");
+ evas_object_smart_callback_add(pNormalView->pCtxPopup, "dismissed",
+ __vp_normal_ctx_popup_dismiss_cb,
+ (void *) pNormalView);
elm_ctxpopup_auto_hide_disabled_set(pNormalView->pCtxPopup, EINA_TRUE);
#ifdef ENABLE_DRM_FEATURE
char *szMediaID = NULL;
if (pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_WEB &&
- pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MULTI_PATH) {
- vp_media_contents_get_video_id(pNormalView->szMediaURL, &szMediaID);
+ pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MULTI_PATH) {
+ vp_media_contents_get_video_id(pNormalView->szMediaURL,
+ &szMediaID);
if (!szMediaID) {
}
}
vp_drm_is_playready_drm_file(pNormalView->szMediaURL, &bPlayReady);
#endif
- //bool bIsPersonal = FALSE;
switch (pNormalView->nLaunchingType) {
case VIDEO_PLAY_TYPE_STORE:
case VIDEO_PLAY_TYPE_OTHER:
/* Share via */
- elm_ctxpopup_item_append(pNormalView->pCtxPopup, VP_PLAY_STRING_POPUP_SHARE, NULL, __vp_normal_ctx_popup_share_cb, (void *)pNormalView);
+ elm_ctxpopup_item_append(pNormalView->pCtxPopup,
+ VP_PLAY_STRING_POPUP_SHARE, NULL,
+ __vp_normal_ctx_popup_share_cb,
+ (void *) pNormalView);
/* delete */
- elm_ctxpopup_item_append(pNormalView->pCtxPopup, VP_PLAY_STRING_POPUP_DELETE, NULL, __vp_normal_ctx_popup_delete_cb, (void *)pNormalView);
+ elm_ctxpopup_item_append(pNormalView->pCtxPopup,
+ VP_PLAY_STRING_POPUP_DELETE, NULL,
+ __vp_normal_ctx_popup_delete_cb,
+ (void *) pNormalView);
/* Play speed */
- elm_ctxpopup_item_append(pNormalView->pCtxPopup, VP_PLAY_STRING_POPUP_PLAY_SPEED, NULL, __vp_normal_ctx_popup_play_speed_cb, (void *)pNormalView);
+ elm_ctxpopup_item_append(pNormalView->pCtxPopup,
+ VP_PLAY_STRING_POPUP_PLAY_SPEED, NULL,
+ __vp_normal_ctx_popup_play_speed_cb,
+ (void *) pNormalView);
/* Audio only */
- if(pNormalView->bAudioOnly)
- elm_ctxpopup_item_append(pNormalView->pCtxPopup, VP_PLAY_STRING_POPUP_DISABLE_AUDIO_ONLY, NULL, __vp_normal_ctx_popup_audio_only_cb, (void *)pNormalView);
+ if (pNormalView->bAudioOnly)
+ elm_ctxpopup_item_append(pNormalView->pCtxPopup,
+ VP_PLAY_STRING_POPUP_DISABLE_AUDIO_ONLY,
+ NULL,
+ __vp_normal_ctx_popup_audio_only_cb,
+ (void *) pNormalView);
else
- elm_ctxpopup_item_append(pNormalView->pCtxPopup, VP_PLAY_STRING_POPUP_ENABLE_AUDIO_ONLY, NULL, __vp_normal_ctx_popup_audio_only_cb, (void *)pNormalView);
+ elm_ctxpopup_item_append(pNormalView->pCtxPopup,
+ VP_PLAY_STRING_POPUP_ENABLE_AUDIO_ONLY,
+ NULL,
+ __vp_normal_ctx_popup_audio_only_cb,
+ (void *) pNormalView);
/* subtitles */
- elm_ctxpopup_item_append(pNormalView->pCtxPopup, VP_PLAY_STRING_POPUP_SUBTITLE, NULL, __vp_normal_ctx_popup_subtitle_cb, (void *)pNormalView);
-
- /* repeat mode */
- //elm_ctxpopup_item_append(pNormalView->pCtxPopup, VP_PLAY_STRING_POPUP_REPEAT_SETTING, NULL, __vp_normal_ctx_popup_repeat_cb, (void *)pNormalView);
-
- /* Sound alive */
- //elm_ctxpopup_item_append(pNormalView->pCtxPopup, VP_PLAY_STRING_POPUP_SOUND_ALIVE, NULL, __vp_normal_ctx_popup_sound_alive_cb, (void *)pNormalView);
+ elm_ctxpopup_item_append(pNormalView->pCtxPopup,
+ VP_PLAY_STRING_POPUP_SUBTITLE, NULL,
+ __vp_normal_ctx_popup_subtitle_cb,
+ (void *) pNormalView);
/* Details */
- elm_ctxpopup_item_append(pNormalView->pCtxPopup, VP_PLAY_STRING_COM_DETAILS, NULL, __vp_normal_ctx_popup_detail_cb, (void *)pNormalView);
+ elm_ctxpopup_item_append(pNormalView->pCtxPopup,
+ VP_PLAY_STRING_COM_DETAILS, NULL,
+ __vp_normal_ctx_popup_detail_cb,
+ (void *) pNormalView);
break;
case VIDEO_PLAY_TYPE_MESSAGE:
case VIDEO_PLAY_TYPE_EMAIL:
/* Play speed */
- elm_ctxpopup_item_append(pNormalView->pCtxPopup, VP_PLAY_STRING_POPUP_PLAY_SPEED, NULL, __vp_normal_ctx_popup_play_speed_cb, (void *)pNormalView);
+ elm_ctxpopup_item_append(pNormalView->pCtxPopup,
+ VP_PLAY_STRING_POPUP_PLAY_SPEED, NULL,
+ __vp_normal_ctx_popup_play_speed_cb,
+ (void *) pNormalView);
/* subtitles */
- elm_ctxpopup_item_append(pNormalView->pCtxPopup, VP_PLAY_STRING_POPUP_SUBTITLE, NULL, __vp_normal_ctx_popup_subtitle_cb, (void *)pNormalView);
+ elm_ctxpopup_item_append(pNormalView->pCtxPopup,
+ VP_PLAY_STRING_POPUP_SUBTITLE, NULL,
+ __vp_normal_ctx_popup_subtitle_cb,
+ (void *) pNormalView);
break;
case VIDEO_PLAY_TYPE_WEB:
/* Settings */
if (FALSE) {
- elm_ctxpopup_item_append(pNormalView->pCtxPopup, VP_PLAY_STRING_POPUP_SETTINGS, NULL, __vp_normal_ctx_popup_setting_cb, (void *)pNormalView);
+ elm_ctxpopup_item_append(pNormalView->pCtxPopup,
+ VP_PLAY_STRING_POPUP_SETTINGS, NULL,
+ __vp_normal_ctx_popup_setting_cb,
+ (void *) pNormalView);
}
break;
case VIDEO_PLAY_TYPE_MULTI_PATH:
/* Details */
- elm_ctxpopup_item_append(pNormalView->pCtxPopup, VP_PLAY_STRING_COM_DETAILS, NULL, __vp_normal_ctx_popup_detail_cb, (void *)pNormalView);
+ elm_ctxpopup_item_append(pNormalView->pCtxPopup,
+ VP_PLAY_STRING_COM_DETAILS, NULL,
+ __vp_normal_ctx_popup_detail_cb,
+ (void *) pNormalView);
break;
case VIDEO_PLAY_TYPE_PREVIEW:
int nW = 0;
int nH = 0;
- Evas_Coord_Rectangle rect = {0,};
- elm_win_screen_size_get(pPlayView->pWin, &rect.x, &rect.y, &rect.w, &rect.h);
+ Evas_Coord_Rectangle rect = { 0, };
+ elm_win_screen_size_get(pPlayView->pWin, &rect.x, &rect.y, &rect.w,
+ &rect.h);
if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_NONE) {
nW = rect.w / 2;
nH = rect.h;
if (!pPlayview) {
return;
}
- PlayView *vPlayview = (PlayView *)pPlayview;
+ PlayView *vPlayview = (PlayView *) pPlayview;
NormalView *pNormalView = vPlayview->pNormalView;
vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE;
VideoLogError("Invalid player View)");
return;
}
- PlayView *vPlayview = (PlayView *)pPlayview;
+ PlayView *vPlayview = (PlayView *) pPlayview;
NormalView *pNormalView = vPlayview->pNormalView;
vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE;
if (!pPlayview) {
return;
}
- PlayView *vPlayview = (PlayView *)pPlayview;
+ PlayView *vPlayview = (PlayView *) pPlayview;
NormalView *pNormalView = vPlayview->pNormalView;
pNormalView->pVolumePopupHandle = NULL;
vp_play_volume_update_value(pNormalView->pVolumeHandle);
vp_play_volume_set_focus_in(pNormalView->pVolumeHandle);
}
-static void __vp_normal_function_btn_clicked_cb(void *pUserData, Evas_Object *pObj, void *pEvent)
+static void __vp_normal_function_btn_clicked_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
- if (pObj != pNormalView->pVolumeBtn && pObj != pNormalView->pScreenSizeBtn && pObj != pNormalView->pLockBtn) {
+ if (pObj != pNormalView->pVolumeBtn
+ && pObj != pNormalView->pScreenSizeBtn
+ && pObj != pNormalView->pLockBtn) {
return;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_RESROUCE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_RESROUCE_EDJ_PATH);
free(path);
if (pObj == pNormalView->pVolumeBtn) {
VideoLogWarning("pVolumeBtn button");
VideoLogWarning("pBookmarkBtn button");
bool bIsRealize = FALSE;
- if (!vp_play_bookmark_is_realize(pNormalView->pBookmarkHandle, &bIsRealize)) {
+ if (!vp_play_bookmark_is_realize
+ (pNormalView->pBookmarkHandle, &bIsRealize)) {
VideoLogWarning("vp_play_bookmark_is_realize fail");
return;
}
VideoLogWarning("pLockBtn button");
if (!pNormalView->bLockScreen) {
pNormalView->bLockScreen = TRUE;
- vp_play_normal_view_set_lock_screen(pNormalView, pNormalView->bLockScreen);
+ vp_play_normal_view_set_lock_screen(pNormalView,
+ pNormalView->bLockScreen);
} else {
pNormalView->bLockScreen = FALSE;
- vp_play_normal_view_set_lock_screen(pNormalView, pNormalView->bLockScreen);
+ vp_play_normal_view_set_lock_screen(pNormalView,
+ pNormalView->bLockScreen);
}
} else if (pObj == pNormalView->pSoundAliveBtn) {
VideoLogWarning("pSoundAliveBtn button");
pNormalView->nRepeatMode = VIDEO_PLAY_REPEAT_ONE;
Evas_Object *pIcon = NULL;
- pIcon = elm_object_part_content_get(pNormalView->pRepeatBtn, VP_PLAY_SWALLOW_BUTTON_ICON);
+ pIcon =
+ elm_object_part_content_get(pNormalView->pRepeatBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON);
if (pIcon) {
evas_object_del(pIcon);
pIcon = NULL;
}
- pIcon = elm_object_part_content_get(pNormalView->pRepeatBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON);
+ pIcon =
+ elm_object_part_content_get(pNormalView->pRepeatBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON);
if (pIcon) {
evas_object_del(pIcon);
pIcon = NULL;
}
- pIcon = elm_object_part_content_get(pNormalView->pRepeatBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON);
+ pIcon =
+ elm_object_part_content_get(pNormalView->pRepeatBtn,
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON);
if (pIcon) {
evas_object_del(pIcon);
pIcon = NULL;
}
- pIcon = vp_button_create_icon(pNormalView->pRepeatBtn, edj_path, VP_PLAY_NORMAL_RES_REPEAT_ONE);
- elm_object_part_content_set(pNormalView->pRepeatBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pRepeatBtn, edj_path, VP_PLAY_NORMAL_RES_REPEAT_ONE_PRESS);
- elm_object_part_content_set(pNormalView->pRepeatBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pRepeatBtn, edj_path, VP_PLAY_NORMAL_RES_REPEAT_ONE_DIM);
- elm_object_part_content_set(pNormalView->pRepeatBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
+ pIcon =
+ vp_button_create_icon(pNormalView->pRepeatBtn, edj_path,
+ VP_PLAY_NORMAL_RES_REPEAT_ONE);
+ elm_object_part_content_set(pNormalView->pRepeatBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON,
+ pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pRepeatBtn, edj_path,
+ VP_PLAY_NORMAL_RES_REPEAT_ONE_PRESS);
+ elm_object_part_content_set(pNormalView->pRepeatBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON,
+ pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pRepeatBtn, edj_path,
+ VP_PLAY_NORMAL_RES_REPEAT_ONE_DIM);
+ elm_object_part_content_set(pNormalView->pRepeatBtn,
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON,
+ pIcon);
} else if (pNormalView->nRepeatMode == VIDEO_PLAY_REPEAT_ONE) {
pNormalView->nRepeatMode = VIDEO_PLAY_REPEAT_ALL;
Evas_Object *pIcon = NULL;
- pIcon = elm_object_part_content_get(pNormalView->pRepeatBtn, VP_PLAY_SWALLOW_BUTTON_ICON);
+ pIcon =
+ elm_object_part_content_get(pNormalView->pRepeatBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON);
if (pIcon) {
evas_object_del(pIcon);
pIcon = NULL;
}
- pIcon = elm_object_part_content_get(pNormalView->pRepeatBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON);
+ pIcon =
+ elm_object_part_content_get(pNormalView->pRepeatBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON);
if (pIcon) {
evas_object_del(pIcon);
pIcon = NULL;
}
- pIcon = elm_object_part_content_get(pNormalView->pRepeatBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON);
+ pIcon =
+ elm_object_part_content_get(pNormalView->pRepeatBtn,
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON);
if (pIcon) {
evas_object_del(pIcon);
pIcon = NULL;
}
- pIcon = vp_button_create_icon(pNormalView->pRepeatBtn, edj_path, VP_PLAY_NORMAL_RES_REPEAT_ALL);
- elm_object_part_content_set(pNormalView->pRepeatBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+ pIcon =
+ vp_button_create_icon(pNormalView->pRepeatBtn, edj_path,
+ VP_PLAY_NORMAL_RES_REPEAT_ALL);
+ elm_object_part_content_set(pNormalView->pRepeatBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON,
+ pIcon);
- pIcon = vp_button_create_icon(pNormalView->pRepeatBtn, edj_path, VP_PLAY_NORMAL_RES_REPEAT_ALL_PRESS);
- elm_object_part_content_set(pNormalView->pRepeatBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
+ pIcon =
+ vp_button_create_icon(pNormalView->pRepeatBtn, edj_path,
+ VP_PLAY_NORMAL_RES_REPEAT_ALL_PRESS);
+ elm_object_part_content_set(pNormalView->pRepeatBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON,
+ pIcon);
- pIcon = vp_button_create_icon(pNormalView->pRepeatBtn, edj_path, VP_PLAY_NORMAL_RES_REPEAT_ALL_DIM);
- elm_object_part_content_set(pNormalView->pRepeatBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
+ pIcon =
+ vp_button_create_icon(pNormalView->pRepeatBtn, edj_path,
+ VP_PLAY_NORMAL_RES_REPEAT_ALL_DIM);
+ elm_object_part_content_set(pNormalView->pRepeatBtn,
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON,
+ pIcon);
} else if (pNormalView->nRepeatMode == VIDEO_PLAY_REPEAT_ALL) {
pNormalView->nRepeatMode = VIDEO_PLAY_REPEAT_NONE;
Evas_Object *pIcon = NULL;
- pIcon = elm_object_part_content_get(pNormalView->pRepeatBtn, VP_PLAY_SWALLOW_BUTTON_ICON);
+ pIcon =
+ elm_object_part_content_get(pNormalView->pRepeatBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON);
if (pIcon) {
evas_object_del(pIcon);
pIcon = NULL;
}
- pIcon = elm_object_part_content_get(pNormalView->pRepeatBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON);
+ pIcon =
+ elm_object_part_content_get(pNormalView->pRepeatBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON);
if (pIcon) {
evas_object_del(pIcon);
pIcon = NULL;
}
- pIcon = elm_object_part_content_get(pNormalView->pRepeatBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON);
+ pIcon =
+ elm_object_part_content_get(pNormalView->pRepeatBtn,
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON);
if (pIcon) {
evas_object_del(pIcon);
pIcon = NULL;
}
- pIcon = vp_button_create_icon(pNormalView->pRepeatBtn, edj_path, VP_PLAY_NORMAL_RES_REPEAT_OFF);
- elm_object_part_content_set(pNormalView->pRepeatBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+ pIcon =
+ vp_button_create_icon(pNormalView->pRepeatBtn, edj_path,
+ VP_PLAY_NORMAL_RES_REPEAT_OFF);
+ elm_object_part_content_set(pNormalView->pRepeatBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON,
+ pIcon);
- pIcon = vp_button_create_icon(pNormalView->pRepeatBtn, edj_path, VP_PLAY_NORMAL_RES_REPEAT_OFF_PRESS);
- elm_object_part_content_set(pNormalView->pRepeatBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
+ pIcon =
+ vp_button_create_icon(pNormalView->pRepeatBtn, edj_path,
+ VP_PLAY_NORMAL_RES_REPEAT_OFF_PRESS);
+ elm_object_part_content_set(pNormalView->pRepeatBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON,
+ pIcon);
- pIcon = vp_button_create_icon(pNormalView->pRepeatBtn, edj_path, VP_PLAY_NORMAL_RES_REPEAT_OFF_DIM);
- elm_object_part_content_set(pNormalView->pRepeatBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
+ pIcon =
+ vp_button_create_icon(pNormalView->pRepeatBtn, edj_path,
+ VP_PLAY_NORMAL_RES_REPEAT_OFF_DIM);
+ elm_object_part_content_set(pNormalView->pRepeatBtn,
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON,
+ pIcon);
}
} else if (pObj == pNormalView->pScreenSizeBtn) {
VideoLogWarning("pScreenSizeBtn button");
if (pNormalView->nDisplayMode == VP_MM_PLAYER_DISPLAY_FULL_SCREEN) {
VideoLogWarning(" VP_MM_PLAYER_DISPLAY_LETTER_BOX");
pNormalView->nDisplayMode = VP_MM_PLAYER_DISPLAY_LETTER_BOX;
- vp_play_preference_set_screen_mode_key(pNormalView->nDisplayMode);
+ vp_play_preference_set_screen_mode_key(pNormalView->
+ nDisplayMode);
- vp_mm_player_set_display_mode(pNormalView->pPlayerHandle, pNormalView->nDisplayMode);
+ vp_mm_player_set_display_mode(pNormalView->pPlayerHandle,
+ pNormalView->nDisplayMode);
Evas_Object *pIcon = NULL;
- pIcon = elm_object_part_content_get(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_ICON);
+ pIcon =
+ elm_object_part_content_get(pNormalView->pScreenSizeBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON);
if (pIcon) {
evas_object_del(pIcon);
pIcon = NULL;
}
- pIcon = elm_object_part_content_get(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON);
+ pIcon =
+ elm_object_part_content_get(pNormalView->pScreenSizeBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON);
if (pIcon) {
evas_object_del(pIcon);
pIcon = NULL;
}
- pIcon = elm_object_part_content_get(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON);
+ pIcon =
+ elm_object_part_content_get(pNormalView->pScreenSizeBtn,
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON);
if (pIcon) {
evas_object_del(pIcon);
pIcon = NULL;
}
- pIcon = vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path, VP_PLAY_NORMAL_RES_SCREEN_1_MODE);
- elm_object_part_content_set(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path, VP_PLAY_NORMAL_RES_SCREEN_1_MODE);
- elm_object_part_content_set(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
- elm_object_text_set(pNormalView->pScreenSizeBtn, VP_PLAY_STRING_COM_FULL);
-
- //pIcon = vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path, VP_PLAY_NORMAL_RES_SCREEN_1_MODE_DIM);
- //elm_object_part_content_set(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
+ pIcon =
+ vp_button_create_icon(pNormalView->pScreenSizeBtn,
+ edj_path,
+ VP_PLAY_NORMAL_RES_SCREEN_1_MODE);
+ elm_object_part_content_set(pNormalView->pScreenSizeBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON,
+ pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pScreenSizeBtn,
+ edj_path,
+ VP_PLAY_NORMAL_RES_SCREEN_1_MODE);
+ elm_object_part_content_set(pNormalView->pScreenSizeBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON,
+ pIcon);
+ elm_object_text_set(pNormalView->pScreenSizeBtn,
+ VP_PLAY_STRING_COM_FULL);
return;
- } else if (pNormalView->nDisplayMode == VP_MM_PLAYER_DISPLAY_LETTER_BOX) {
+ } else if (pNormalView->nDisplayMode ==
+ VP_MM_PLAYER_DISPLAY_LETTER_BOX) {
VideoLogWarning("VP_MM_PLAYER_DISPLAY_FULL_SCREEN");
pNormalView->nDisplayMode = VP_MM_PLAYER_DISPLAY_FULL_SCREEN;
- vp_play_preference_set_screen_mode_key(pNormalView->nDisplayMode);
+ vp_play_preference_set_screen_mode_key(pNormalView->
+ nDisplayMode);
- vp_mm_player_set_display_mode(pNormalView->pPlayerHandle, pNormalView->nDisplayMode);
+ vp_mm_player_set_display_mode(pNormalView->pPlayerHandle,
+ pNormalView->nDisplayMode);
Evas_Object *pIcon = NULL;
- pIcon = elm_object_part_content_get(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_ICON);
+ pIcon =
+ elm_object_part_content_get(pNormalView->pScreenSizeBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON);
if (pIcon) {
evas_object_del(pIcon);
pIcon = NULL;
}
- pIcon = elm_object_part_content_get(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON);
+ pIcon =
+ elm_object_part_content_get(pNormalView->pScreenSizeBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON);
if (pIcon) {
evas_object_del(pIcon);
pIcon = NULL;
}
- pIcon = elm_object_part_content_get(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON);
+ pIcon =
+ elm_object_part_content_get(pNormalView->pScreenSizeBtn,
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON);
if (pIcon) {
evas_object_del(pIcon);
pIcon = NULL;
}
- pIcon = vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path, VP_PLAY_NORMAL_RES_SCREEN_2_MODE);
- elm_object_part_content_set(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path, VP_PLAY_NORMAL_RES_SCREEN_2_MODE_PRESS);
- elm_object_part_content_set(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
- elm_object_text_set(pNormalView->pScreenSizeBtn, VP_PLAY_STRING_COM_KEEP_RATIO);
-
- //pIcon = vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path, VP_PLAY_NORMAL_RES_SCREEN_2_MODE_DIM);
- //elm_object_part_content_set(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
+ pIcon =
+ vp_button_create_icon(pNormalView->pScreenSizeBtn,
+ edj_path,
+ VP_PLAY_NORMAL_RES_SCREEN_2_MODE);
+ elm_object_part_content_set(pNormalView->pScreenSizeBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON,
+ pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pScreenSizeBtn,
+ edj_path,
+ VP_PLAY_NORMAL_RES_SCREEN_2_MODE_PRESS);
+ elm_object_part_content_set(pNormalView->pScreenSizeBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON,
+ pIcon);
+ elm_object_text_set(pNormalView->pScreenSizeBtn,
+ VP_PLAY_STRING_COM_KEEP_RATIO);
return;
}
}
}
-static void __vp_normal_control_btn_clicked_cb(void *pUserData, Evas_Object *pObj, void *pEvent)
+static void __vp_normal_control_btn_clicked_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView handle is NULL");
vp_util_release_cpu();
if (pNormalView->bBufferingComplete == FALSE) {
- VideoLogWarning("Bufferring is not completed. ignore pause signal");
+ VideoLogWarning
+ ("Bufferring is not completed. ignore pause signal");
} else {
if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
VideoLogWarning("Pause Fail");
}
VP_EVAS_IDLER_DEL(pNormalView->pControlIdler);
- pNormalView->pControlIdler = ecore_idler_add(__vp_normal_control_idler_cb, (void *)pNormalView);
+ pNormalView->pControlIdler =
+ ecore_idler_add(__vp_normal_control_idler_cb,
+ (void *) pNormalView);
pNormalView->bManualPause = TRUE;
if (pPlayView->win_minicon) {
} else if (pObj == pNormalView->pResumeBtn) {
VideoLogWarning("Resume button");
vp_util_lock_cpu();
- if(_vp_play_normal_view_check_during_call(pNormalView)) {
+ if (_vp_play_normal_view_check_during_call(pNormalView)) {
return;
}
pNormalView->bSpeedDown = TRUE;
if (pNormalView->bBufferingComplete == FALSE) {
- VideoLogWarning("Bufferring is not completed. ignore pause signal");
+ VideoLogWarning
+ ("Bufferring is not completed. ignore pause signal");
} else {
if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
VideoLogWarning("Resume Fail");
}
VP_EVAS_IDLER_DEL(pNormalView->pControlIdler);
- pNormalView->pControlIdler = ecore_idler_add(__vp_normal_control_idler_cb, (void *)pNormalView);
+ pNormalView->pControlIdler =
+ ecore_idler_add(__vp_normal_control_idler_cb,
+ (void *) pNormalView);
pNormalView->bManualPause = FALSE;
if (pPlayView->win_minicon) {
}
} else if (pObj == pNormalView->pPlayFocusBtn) {
VideoLogWarning("pPlayFocusBtn click");
- Evas_Object *pObj = elm_object_part_content_get(pNormalView->pControlLayout, VP_PLAY_SWALLOW_NORMAL_PLAY);
+ Evas_Object *pObj =
+ elm_object_part_content_get(pNormalView->pControlLayout,
+ VP_PLAY_SWALLOW_NORMAL_PLAY);
if (pNormalView->pPauseBtn == pObj) {
if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
}
VP_EVAS_IDLER_DEL(pNormalView->pControlIdler);
- pNormalView->pControlIdler = ecore_idler_add(__vp_normal_control_idler_cb, (void *)pNormalView);
+ pNormalView->pControlIdler =
+ ecore_idler_add(__vp_normal_control_idler_cb,
+ (void *) pNormalView);
pNormalView->bManualPause = TRUE;
} else {
- if(_vp_play_normal_view_check_during_call(pNormalView)) {
+ if (_vp_play_normal_view_check_during_call(pNormalView)) {
return;
}
vp_lockscreenmini_update_control(pPlayView);
}
VP_EVAS_IDLER_DEL(pNormalView->pControlIdler);
- pNormalView->pControlIdler = ecore_idler_add(__vp_normal_control_idler_cb, (void *)pNormalView);
+ pNormalView->pControlIdler =
+ ecore_idler_add(__vp_normal_control_idler_cb,
+ (void *) pNormalView);
pNormalView->bManualPause = FALSE;
}
if (pNormalView->bHLSMode == FALSE) {
if (pNormalView->nSpeedValue < 2) {
VP_EVAS_TIMER_DEL(pNormalView->pSpeedTimer);
- _vp_play_normal_view_on_prev_play(pNormalView, TRUE, FALSE);
+ _vp_play_normal_view_on_prev_play(pNormalView, TRUE,
+ FALSE);
}
}
if (pPlayView->win_minicon) {
}
if (pPlayView->win_lockmini) {
vp_lockscreenmini_update(pPlayView);
+ vp_lockscreenmini_update_control(pPlayView);
}
} else if (pObj == pNormalView->pNextBtn) {
VideoLogWarning("Next button");
if (pNormalView->bHLSMode == FALSE) {
- if (pNormalView->nSpeedValue < 2 && strstr(pPlayView->szMediaURL, "/.") == NULL) {
+ if (pPlayView->bResetPlaySpeed == TRUE) {
+ pPlayView->bResetPlaySpeed = FALSE;
+ VP_EVAS_TIMER_DEL(pNormalView->pSpeedTimer);
+ } else if (pNormalView->nSpeedValue < 2
+ && strstr(pPlayView->szMediaURL, "/.") == NULL) {
VP_EVAS_TIMER_DEL(pNormalView->pSpeedTimer);
_vp_play_normal_view_on_next_play(pNormalView, TRUE);
}
}
if (pPlayView->win_lockmini) {
vp_lockscreenmini_update(pPlayView);
+ vp_lockscreenmini_update_control(pPlayView);
}
} else if (pObj == pNormalView->pRotateBtn) {
VideoLogWarning("Rotate button");
- bool bLandscape = vp_play_util_get_landscape_check(pNormalView->nRotate);
+ bool bLandscape =
+ vp_play_util_get_landscape_check(pNormalView->nRotate);
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
if (bLandscape) {
pPlayView->nRotate = VIDEO_PLAY_ROTATE_NONE;
elm_win_wm_rotation_preferred_rotation_set(pPlayView->pWin, 0);
- vp_play_normal_view_set_rotate((normal_view_handle) pNormalView, VIDEO_PLAY_ROTATE_NONE, TRUE);
+ vp_play_normal_view_set_rotate((normal_view_handle)
+ pNormalView,
+ VIDEO_PLAY_ROTATE_NONE, TRUE);
} else {
pPlayView->nRotate = VIDEO_PLAY_ROTATE_270;
- elm_win_wm_rotation_preferred_rotation_set(pPlayView->pWin, 270);
- vp_play_normal_view_set_rotate((normal_view_handle) pNormalView, VIDEO_PLAY_ROTATE_270, TRUE);
+ elm_win_wm_rotation_preferred_rotation_set(pPlayView->pWin,
+ 270);
+ vp_play_normal_view_set_rotate((normal_view_handle)
+ pNormalView,
+ VIDEO_PLAY_ROTATE_270, TRUE);
}
} else if (pObj == pNormalView->pSoundPathBtn) {
VideoLogWarning("SoundPath button");
}
-void vp_play_normal_view_on_controller_button_press(void *pUserData, int btn) {
+void vp_play_normal_view_on_controller_button_press(void *pUserData,
+ int btn)
+{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
Evas_Object *pObj = NULL;
- if(btn == CONTROLLER_PAUSE_BUTTON) {
+ if (btn == CONTROLLER_PAUSE_BUTTON) {
pObj = pNormalView->pPauseBtn;
- } else if(btn == CONTROLLER_PLAY_BUTTON) {
+ } else if (btn == CONTROLLER_PLAY_BUTTON) {
pObj = pNormalView->pResumeBtn;
- } else if(btn == CONTROLLER_FF_BUTTON) {
+ } else if (btn == CONTROLLER_FF_BUTTON) {
pObj = pNormalView->pNextBtn;
- } else if(btn == CONTROLLER_REW_BUTTON) {
+ } else if (btn == CONTROLLER_REW_BUTTON) {
pObj = pNormalView->pPrevBtn;
} else {
VideoLogError("Unknown Button!");
__vp_normal_control_btn_clicked_cb(pNormalView, pObj, NULL);
}
-static void __vp_normal_control_btn_press_cb(void *pUserData, Evas_Object *pObj, void *pEvent)
+static void __vp_normal_control_btn_press_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
bool bSpeedMode = FALSE;
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
if (pNormalView->bKeyPressed == TRUE) {
VideoLogInfo("Key has been pressed");
return;
VP_EVAS_TIMER_DEL(pNormalView->pHideFinishTimer);
VP_EVAS_TIMER_DEL(pNormalView->pSpeedTimer);
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
if (pObj == pNormalView->pNextBtn) {
VideoLogInfo("pNextBtn Press");
pNormalView->bSpeedFF = TRUE;
pNormalView->nSpeedValue = 1;
pNormalView->bSpeedDown = TRUE;
- pNormalView->pSpeedTimer = ecore_timer_add(VP_NORMAL_LONG_PRESS_TIMER_INTERVAL,
- __vp_normal_speed_timer_cb,
- (void *)pNormalView);
+ pNormalView->pSpeedTimer =
+ ecore_timer_add(VP_NORMAL_LONG_PRESS_TIMER_INTERVAL,
+ __vp_normal_speed_timer_cb,
+ (void *) pNormalView);
} else {
- pNormalView->pSpeedTimer = ecore_timer_add(VP_NORMAL_LONG_PRESS_TIMER_INTERVAL,
- __vp_normal_dlna_speed_timer_cb,
- (void *)pNormalView);
+ pNormalView->pSpeedTimer =
+ ecore_timer_add(VP_NORMAL_LONG_PRESS_TIMER_INTERVAL,
+ __vp_normal_dlna_speed_timer_cb,
+ (void *) pNormalView);
}
} else if (pObj == pNormalView->pPrevBtn) {
pNormalView->bSpeedFF = FALSE;
pNormalView->nSpeedValue = 1;
pNormalView->bSpeedDown = TRUE;
- pNormalView->pSpeedTimer = ecore_timer_add(VP_NORMAL_LONG_PRESS_TIMER_INTERVAL,
- __vp_normal_speed_timer_cb,
- (void *)pNormalView);
+ pNormalView->pSpeedTimer =
+ ecore_timer_add(VP_NORMAL_LONG_PRESS_TIMER_INTERVAL,
+ __vp_normal_speed_timer_cb,
+ (void *) pNormalView);
} else {
- pNormalView->pSpeedTimer = ecore_timer_add(VP_NORMAL_LONG_PRESS_TIMER_INTERVAL,
- __vp_normal_dlna_speed_timer_cb,
- (void *)pNormalView);
+ pNormalView->pSpeedTimer =
+ ecore_timer_add(VP_NORMAL_LONG_PRESS_TIMER_INTERVAL,
+ __vp_normal_dlna_speed_timer_cb,
+ (void *) pNormalView);
}
} else if (pObj == pNormalView->pResumeBtn) {
if (bSpeedMode) {
int nPosition = 0;
- if (vp_mm_player_get_position(pNormalView->pPlayerHandle, &nPosition)) {
- VideoLogDebug("nPosition[%d], curPosition[%d]", nPosition, pNormalView->nCurPosition);
-
- if (vp_mm_player_set_position(pNormalView->pPlayerHandle, pNormalView->nCurPosition)) {
+ if (vp_mm_player_get_position
+ (pNormalView->pPlayerHandle, &nPosition)) {
+ VideoLogDebug("nPosition[%d], curPosition[%d]", nPosition,
+ pNormalView->nCurPosition);
+
+ if (vp_mm_player_set_position
+ (pNormalView->pPlayerHandle,
+ pNormalView->nCurPosition)) {
pNormalView->bSeekComplete = FALSE;
pNormalView->nWaitPos = -1;
} else {
}
} else if (pObj == pNormalView->pPlayFocusBtn) {
VideoLogInfo("pPlayFocusBtn Press");
- Evas_Object *pObj = elm_object_part_content_get(pNormalView->pControlLayout, VP_PLAY_SWALLOW_NORMAL_PLAY);
+ Evas_Object *pObj =
+ elm_object_part_content_get(pNormalView->pControlLayout,
+ VP_PLAY_SWALLOW_NORMAL_PLAY);
if (pNormalView->pResumeBtn == pObj) {
if (bSpeedMode) {
int nPosition = 0;
- if (vp_mm_player_get_position(pNormalView->pPlayerHandle, &nPosition)) {
- if (vp_mm_player_set_position(pNormalView->pPlayerHandle, pNormalView->nCurPosition)) {
+ if (vp_mm_player_get_position
+ (pNormalView->pPlayerHandle, &nPosition)) {
+ if (vp_mm_player_set_position
+ (pNormalView->pPlayerHandle,
+ pNormalView->nCurPosition)) {
pNormalView->bSeekComplete = FALSE;
pNormalView->nWaitPos = -1;
} else {
}
}
-static void __vp_normal_control_btn_unpress_cb(void *pUserData, Evas_Object *pObj, void *pEvent)
+static void __vp_normal_control_btn_unpress_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
}
VideoLogInfo("");
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
pNormalView->bKeyPressed = FALSE;
} else if (pObj == pNormalView->pNextBtn) {
pNormalView->bSpeedDown = FALSE;
VP_EVAS_TIMER_DEL(pNormalView->pSpeedTimer);
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
if (!pNormalView->pProgressTimer) {
_vp_play_normal_view_create_progress_timer(pNormalView);
}
} else if (pObj == pNormalView->pPrevBtn) {
pNormalView->bSpeedDown = FALSE;
VP_EVAS_TIMER_DEL(pNormalView->pSpeedTimer);
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
if (!pNormalView->pProgressTimer) {
_vp_play_normal_view_create_progress_timer(pNormalView);
}
} else if (pObj == pNormalView->pAllsharBtn) {
VP_EVAS_IDLER_DEL(pNormalView->pControlIdler);
- pNormalView->pControlIdler = ecore_idler_add(__vp_normal_control_idler_cb, (void *)pNormalView);
+ pNormalView->pControlIdler =
+ ecore_idler_add(__vp_normal_control_idler_cb,
+ (void *) pNormalView);
}
_vp_play_normal_view_create_layout_hide_timer(pNormalView);
}
-static void __vp_normal_media_key_event_cb(vp_media_key_event_t nKey, bool bRelease, void *pUserData)
+static void __vp_normal_media_key_event_cb(vp_media_key_event_t nKey,
+ bool bRelease, void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
pNormalView->pDetailHandle = NULL;
}
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE;
- if (!vp_mm_player_get_state(pNormalView->pPlayerHandle, &nState)) {
+ if (!vp_mm_player_get_state
+ (pNormalView->pPlayerHandle, &nState)) {
VideoLogWarning("vp_mm_player_get_state is fail");
}
case VP_MEDIA_KEY_PREVIOUS:
if (bRelease) {
VP_EVAS_TIMER_DEL(pNormalView->pSpeedTimer);
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
_vp_play_normal_view_on_prev_play(pNormalView, TRUE, FALSE);
}
break;
case VP_MEDIA_KEY_NEXT:
if (bRelease) {
VP_EVAS_TIMER_DEL(pNormalView->pSpeedTimer);
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
_vp_play_normal_view_on_next_play(pNormalView, TRUE);
}
break;
pNormalView->pDetailHandle = NULL;
}
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
if (pNormalView->bManualPause == FALSE) {
if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
VP_EVAS_TIMER_DEL(pNormalView->pHideFinishTimer);
VP_EVAS_TIMER_DEL(pNormalView->pSpeedTimer);
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
pNormalView->bSpeedFF = FALSE;
pNormalView->nSpeedValue = 1;
pNormalView->bSpeedDown = TRUE;
- pNormalView->pSpeedTimer = ecore_timer_add(VP_NORMAL_LONG_PRESS_TIMER_INTERVAL,
- __vp_normal_speed_timer_cb,
- (void *)pNormalView);
+ pNormalView->pSpeedTimer =
+ ecore_timer_add(VP_NORMAL_LONG_PRESS_TIMER_INTERVAL,
+ __vp_normal_speed_timer_cb,
+ (void *) pNormalView);
}
break;
case VP_MEDIA_KEY_FASTFORWARD:
pNormalView->pDetailHandle = NULL;
}
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
if (pNormalView->bManualPause == FALSE) {
if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
pNormalView->pDetailHandle = NULL;
}
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
pNormalView->bSpeedFF = TRUE;
pNormalView->nSpeedValue = 1;
pNormalView->bSpeedDown = TRUE;
- pNormalView->pSpeedTimer = ecore_timer_add(VP_NORMAL_LONG_PRESS_TIMER_INTERVAL,
- __vp_normal_speed_timer_cb,
- (void *)pNormalView);
+ pNormalView->pSpeedTimer =
+ ecore_timer_add(VP_NORMAL_LONG_PRESS_TIMER_INTERVAL,
+ __vp_normal_speed_timer_cb,
+ (void *) pNormalView);
}
break;
case VP_MEDIA_KEY_STOP:
if (bRelease) {
VP_EVAS_TIMER_DEL(pNormalView->pSpeedTimer);
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE;
- if (!vp_mm_player_get_state(pNormalView->pPlayerHandle, &nState)) {
+ if (!vp_mm_player_get_state
+ (pNormalView->pPlayerHandle, &nState)) {
VideoLogWarning("vp_mm_player_get_state is fail");
}
VideoLogError("Pause Fail");
}
}
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
pNormalView->bManualPause = TRUE;
_vp_play_normal_view_on_capture_mode(pNormalView);
}
break;
- default:
- VideoLogWarning("Undefined key : %d", nKey);
- break;
}
}
video -> play a file -> pause -> key down FF button(long press) -> move seek -> key up FF button -> seek stop -> stay pause
video -> play a file -> playing -> key down FF button(long press) -> move seek -> key up FF button -> seek stop -> resume
*/
-void vp_play_normal_view_ff_rew_keyboard_longpress_event_cb(normal_view_handle pViewHandle, bool bRelease, bool bFFseek)
+void
+vp_play_normal_view_ff_rew_keyboard_longpress_event_cb(normal_view_handle
+ pViewHandle,
+ bool bRelease,
+ bool bFFseek)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
if (pNormalView->pSpeedTimer == NULL && bRelease == FALSE) {
if (bFFseek) {
- __vp_normal_media_key_event_cb(VP_MEDIA_KEY_FASTFORWARD, bRelease, pNormalView);
+ __vp_normal_media_key_event_cb(VP_MEDIA_KEY_FASTFORWARD,
+ bRelease, pNormalView);
} else {
- __vp_normal_media_key_event_cb(VP_MEDIA_KEY_REWIND, bRelease, pNormalView);
+ __vp_normal_media_key_event_cb(VP_MEDIA_KEY_REWIND, bRelease,
+ pNormalView);
}
} else if (pNormalView->pSpeedTimer && bRelease == TRUE) {
if (pNormalView->nSpeedValue < 2) {
_vp_normal_view_speed_for_steps(pNormalView, bFFseek);
} else {
int nPosition = 0;
- if (vp_mm_player_get_position(pNormalView->pPlayerHandle, &nPosition)) {
- if (vp_mm_player_set_position(pNormalView->pPlayerHandle, pNormalView->nCurPosition)) {
+ if (vp_mm_player_get_position
+ (pNormalView->pPlayerHandle, &nPosition)) {
+ if (vp_mm_player_set_position
+ (pNormalView->pPlayerHandle,
+ pNormalView->nCurPosition)) {
pNormalView->bSeekComplete = FALSE;
pNormalView->nWaitPos = -1;
} else {
pNormalView->pDetailHandle = NULL;
}
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
if (pNormalView->bManualPause == FALSE) {
if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
VideoLogError("play Fail");
}
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
pNormalView->bManualPause = FALSE;
}
}
-static void _vp_normal_view_speed_for_steps(NormalView *pNormalView, bool bSpeedFF)
+static void _vp_normal_view_speed_for_steps(NormalView * pNormalView,
+ bool bSpeedFF)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
int nSetPosition = 0;
int nCurPosition = 0;
- if (!vp_mm_player_get_position(pNormalView->pPlayerHandle, &nCurPosition)) {
+ if (!vp_mm_player_get_position
+ (pNormalView->pPlayerHandle, &nCurPosition)) {
VideoLogError("vp_mm_player_get_position is fail");
return;
}
VideoLogInfo("pNormalView->nDuration %d", pNormalView->nDuration);
if (bSpeedFF) {
- nSetPosition = nCurPosition + (15 * 1000);//15 sec
+ nSetPosition = nCurPosition + (15 * 1000); //15 sec
} else {
- nSetPosition = nCurPosition - (15 * 1000);
+ nSetPosition = nCurPosition - (15 * 1000);
}
if (pNormalView->nDuration < nSetPosition) {
if (nSetPosition < 0) {
nSetPosition = 0;
}
-
#if 1
- if (vp_mm_player_set_position(pNormalView->pPlayerHandle, nSetPosition)) {
+ if (vp_mm_player_set_position
+ (pNormalView->pPlayerHandle, nSetPosition)) {
#else
- if (vp_mm_player_set_position_by_key_frame(pNormalView->pPlayerHandle, nSetPosition)) {
+ if (vp_mm_player_set_position_by_key_frame
+ (pNormalView->pPlayerHandle, nSetPosition)) {
#endif
pNormalView->bSeekComplete = FALSE;
pNormalView->nCurPosition = nSetPosition;
- vp_play_progressbar_set_position(pNormalView->pProgressbar, nSetPosition);
+ vp_play_progressbar_set_position(pNormalView->pProgressbar,
+ nSetPosition);
}
return;
}
//Focus UI
-void vp_play_normal_view_set_main_layout_focus_out(normal_view_handle *pViewHandle)
+void vp_play_normal_view_set_main_layout_focus_out(normal_view_handle *
+ pViewHandle)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
VideoLogInfo("");
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
pNormalView->bMainFocusState = FALSE;
elm_object_focus_allow_set(pNormalView->pMainLayout, EINA_FALSE);
}
-void vp_play_normal_view_set_main_layout_focus_in(normal_view_handle *pViewHandle)
+void vp_play_normal_view_set_main_layout_focus_in(normal_view_handle *
+ pViewHandle)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
VideoLogInfo("");
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (pNormalView->bMainFocusState == TRUE) {
VideoLogInfo("Already Focus In");
return;
elm_object_focus_set(pNormalView->pAllsharBtn, EINA_TRUE);
}
-void vp_play_normal_view_set_resume_or_pause(normal_view_handle *pViewHandle)
+void vp_play_normal_view_set_resume_or_pause(normal_view_handle *
+ pViewHandle)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
PlayView *pPlayView = pNormalView->pPlayView;
vp_mm_player_play(pNormalView->pPlayerHandle);
pNormalView->bManualPause = FALSE;
}
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
_vp_play_normal_view_set_play_state(pNormalView);
_vp_play_normal_view_on_capture_mode(pNormalView);
}
-void vp_play_normal_view_show_main_layout(normal_view_handle *pViewHandle)
+void vp_play_normal_view_show_main_layout(normal_view_handle * pViewHandle)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
_vp_play_normal_view_show_layout(pNormalView);
}
-void vp_play_normal_view_create_main_layout_hide_timer(normal_view_handle *pViewHandle)
+void vp_play_normal_view_create_main_layout_hide_timer(normal_view_handle *
+ pViewHandle)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
_vp_play_normal_view_create_layout_hide_timer(pNormalView);
}
-static void _vp_play_normal_view_set_button_focus_sequence(NormalView *pNormalView)
+static void _vp_play_normal_view_set_button_focus_sequence(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
return;
}
- bool bLandscape = vp_play_util_get_landscape_check(pNormalView->nRotate);
+ bool bLandscape =
+ vp_play_util_get_landscape_check(pNormalView->nRotate);
elm_object_focus_set(pNormalView->pVolumeBtn, EINA_TRUE);
- vp_play_util_focus_next_object_set(pNormalView->pPrevBtn, pNormalView->pPlayFocusBtn, ELM_FOCUS_RIGHT);
- vp_play_util_focus_next_object_set(pNormalView->pPlayFocusBtn, pNormalView->pPrevBtn, ELM_FOCUS_LEFT);
-
- vp_play_util_focus_next_object_set(pNormalView->pPlayFocusBtn, pNormalView->pNextBtn, ELM_FOCUS_RIGHT);
- vp_play_util_focus_next_object_set(pNormalView->pNextBtn, pNormalView->pPlayFocusBtn, ELM_FOCUS_LEFT);
-
- vp_play_util_focus_next_object_set(pNormalView->pAllsharBtn, pNormalView->pPlayFocusBtn, ELM_FOCUS_DOWN);
+ vp_play_util_focus_next_object_set(pNormalView->pPrevBtn,
+ pNormalView->pPlayFocusBtn,
+ ELM_FOCUS_RIGHT);
+ vp_play_util_focus_next_object_set(pNormalView->pPlayFocusBtn,
+ pNormalView->pPrevBtn,
+ ELM_FOCUS_LEFT);
+
+ vp_play_util_focus_next_object_set(pNormalView->pPlayFocusBtn,
+ pNormalView->pNextBtn,
+ ELM_FOCUS_RIGHT);
+ vp_play_util_focus_next_object_set(pNormalView->pNextBtn,
+ pNormalView->pPlayFocusBtn,
+ ELM_FOCUS_LEFT);
+
+ vp_play_util_focus_next_object_set(pNormalView->pAllsharBtn,
+ pNormalView->pPlayFocusBtn,
+ ELM_FOCUS_DOWN);
if (pNormalView->pSoundPathBtn) {
- vp_play_util_focus_next_object_set(pNormalView->pAllsharBtn, pNormalView->pSoundPathBtn, ELM_FOCUS_NEXT);
+ vp_play_util_focus_next_object_set(pNormalView->pAllsharBtn,
+ pNormalView->pSoundPathBtn,
+ ELM_FOCUS_NEXT);
} else {
- vp_play_util_focus_next_object_set(pNormalView->pAllsharBtn, pNormalView->pPlayFocusBtn, ELM_FOCUS_NEXT);
+ vp_play_util_focus_next_object_set(pNormalView->pAllsharBtn,
+ pNormalView->pPlayFocusBtn,
+ ELM_FOCUS_NEXT);
}
- vp_play_util_focus_next_object_set(pNormalView->pSoundPathBtn, pNormalView->pPlayFocusBtn, ELM_FOCUS_DOWN);
- vp_play_util_focus_next_object_set(pNormalView->pSoundPathBtn, pNormalView->pPlayFocusBtn, ELM_FOCUS_NEXT);
+ vp_play_util_focus_next_object_set(pNormalView->pSoundPathBtn,
+ pNormalView->pPlayFocusBtn,
+ ELM_FOCUS_DOWN);
+ vp_play_util_focus_next_object_set(pNormalView->pSoundPathBtn,
+ pNormalView->pPlayFocusBtn,
+ ELM_FOCUS_NEXT);
if (bLandscape == TRUE) {
- vp_play_util_focus_next_object_set(pNormalView->pVolumeBtn, pNormalView->pBookmarkBtn, ELM_FOCUS_RIGHT);
- vp_play_util_focus_next_object_set(pNormalView->pBookmarkBtn, pNormalView->pVolumeBtn, ELM_FOCUS_LEFT);
-
- vp_play_util_focus_next_object_set(pNormalView->pBookmarkBtn, pNormalView->pPrevBtn, ELM_FOCUS_RIGHT);
- vp_play_util_focus_next_object_set(pNormalView->pPrevBtn, pNormalView->pBookmarkBtn, ELM_FOCUS_LEFT);
-
- vp_play_util_focus_next_object_set(pNormalView->pNextBtn, pNormalView->pMultiWinBtn, ELM_FOCUS_RIGHT);
- vp_play_util_focus_next_object_set(pNormalView->pMultiWinBtn, pNormalView->pNextBtn, ELM_FOCUS_LEFT);
-
- vp_play_util_focus_next_object_set(pNormalView->pMultiWinBtn, pNormalView->pScreenSizeBtn, ELM_FOCUS_RIGHT);
- vp_play_util_focus_next_object_set(pNormalView->pScreenSizeBtn, pNormalView->pMultiWinBtn, ELM_FOCUS_LEFT);
+ vp_play_util_focus_next_object_set(pNormalView->pVolumeBtn,
+ pNormalView->pBookmarkBtn,
+ ELM_FOCUS_RIGHT);
+ vp_play_util_focus_next_object_set(pNormalView->pBookmarkBtn,
+ pNormalView->pVolumeBtn,
+ ELM_FOCUS_LEFT);
+
+ vp_play_util_focus_next_object_set(pNormalView->pBookmarkBtn,
+ pNormalView->pPrevBtn,
+ ELM_FOCUS_RIGHT);
+ vp_play_util_focus_next_object_set(pNormalView->pPrevBtn,
+ pNormalView->pBookmarkBtn,
+ ELM_FOCUS_LEFT);
+
+ vp_play_util_focus_next_object_set(pNormalView->pNextBtn,
+ pNormalView->pMultiWinBtn,
+ ELM_FOCUS_RIGHT);
+ vp_play_util_focus_next_object_set(pNormalView->pMultiWinBtn,
+ pNormalView->pNextBtn,
+ ELM_FOCUS_LEFT);
+
+ vp_play_util_focus_next_object_set(pNormalView->pMultiWinBtn,
+ pNormalView->pScreenSizeBtn,
+ ELM_FOCUS_RIGHT);
+ vp_play_util_focus_next_object_set(pNormalView->pScreenSizeBtn,
+ pNormalView->pMultiWinBtn,
+ ELM_FOCUS_LEFT);
} else {
- vp_play_util_focus_next_object_set(pNormalView->pBookmarkBtn, pNormalView->pMultiWinBtn, ELM_FOCUS_RIGHT);
- vp_play_util_focus_next_object_set(pNormalView->pMultiWinBtn, pNormalView->pBookmarkBtn, ELM_FOCUS_LEFT);
-
- vp_play_util_focus_next_object_set(pNormalView->pVolumeBtn, pNormalView->pPrevBtn, ELM_FOCUS_RIGHT);
- vp_play_util_focus_next_object_set(pNormalView->pPrevBtn, pNormalView->pVolumeBtn, ELM_FOCUS_LEFT);
-
- vp_play_util_focus_next_object_set(pNormalView->pNextBtn, pNormalView->pScreenSizeBtn, ELM_FOCUS_RIGHT);
- vp_play_util_focus_next_object_set(pNormalView->pScreenSizeBtn, pNormalView->pNextBtn, ELM_FOCUS_LEFT);
-
- vp_play_util_focus_next_object_set(pNormalView->pVolumeBtn, pNormalView->pBookmarkBtn, ELM_FOCUS_UP);
- vp_play_util_focus_next_object_set(pNormalView->pBookmarkBtn, pNormalView->pVolumeBtn, ELM_FOCUS_DOWN);
- }
-}
-
-bool vp_play_normal_view_get_volume_state(normal_view_handle *pViewHandle)
+ vp_play_util_focus_next_object_set(pNormalView->pBookmarkBtn,
+ pNormalView->pMultiWinBtn,
+ ELM_FOCUS_RIGHT);
+ vp_play_util_focus_next_object_set(pNormalView->pMultiWinBtn,
+ pNormalView->pBookmarkBtn,
+ ELM_FOCUS_LEFT);
+
+ vp_play_util_focus_next_object_set(pNormalView->pVolumeBtn,
+ pNormalView->pPrevBtn,
+ ELM_FOCUS_RIGHT);
+ vp_play_util_focus_next_object_set(pNormalView->pPrevBtn,
+ pNormalView->pVolumeBtn,
+ ELM_FOCUS_LEFT);
+
+ vp_play_util_focus_next_object_set(pNormalView->pNextBtn,
+ pNormalView->pScreenSizeBtn,
+ ELM_FOCUS_RIGHT);
+ vp_play_util_focus_next_object_set(pNormalView->pScreenSizeBtn,
+ pNormalView->pNextBtn,
+ ELM_FOCUS_LEFT);
+
+ vp_play_util_focus_next_object_set(pNormalView->pVolumeBtn,
+ pNormalView->pBookmarkBtn,
+ ELM_FOCUS_UP);
+ vp_play_util_focus_next_object_set(pNormalView->pBookmarkBtn,
+ pNormalView->pVolumeBtn,
+ ELM_FOCUS_DOWN);
+ }
+}
+
+bool vp_play_normal_view_get_volume_state(normal_view_handle * pViewHandle)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
bool bIsRealize = FALSE;
if (pNormalView->pVolumeHandle) {
- if (!vp_play_volume_is_realize(pNormalView->pVolumeHandle, &bIsRealize)) {
+ if (!vp_play_volume_is_realize
+ (pNormalView->pVolumeHandle, &bIsRealize)) {
VideoLogWarning("vp_play_volume_is_realize is fail");
}
}
return bIsRealize;
}
-bool vp_play_normal_view_get_main_layout_focus_state(normal_view_handle *pViewHandle)
+bool vp_play_normal_view_get_main_layout_focus_state(normal_view_handle *
+ pViewHandle)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
return pNormalView->bMainFocusState;
}
-bool vp_play_normal_view_get_main_layout_show_state(normal_view_handle *pViewHandle)
+bool vp_play_normal_view_get_main_layout_show_state(normal_view_handle *
+ pViewHandle)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
return pNormalView->bShowLayout;
}
-vp_normalview_popup_style_e vp_play_normal_view_get_popup_show_state(normal_view_handle *pViewHandle)
+vp_normalview_popup_style_e
+vp_play_normal_view_get_popup_show_state(normal_view_handle * pViewHandle)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return VP_PLAY_NORMAL_VIEW_POPUP_NONE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
- vp_normalview_popup_style_e nPopUpShow = VP_PLAY_NORMAL_VIEW_POPUP_NONE;
+ vp_normalview_popup_style_e nPopUpShow =
+ VP_PLAY_NORMAL_VIEW_POPUP_NONE;
if (pNormalView->pCtxPopup) {
nPopUpShow = VP_PLAY_NORMAL_VIEW_CTX_POPUP;
return nPopUpShow;
}
-static void __vp_normal_naviframe_back_btn_cb(void *pUserData, Evas_Object *obj, void *event_info)
+static void __vp_normal_naviframe_back_btn_cb(void *pUserData,
+ Evas_Object * obj,
+ void *event_info)
{
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
_vp_play_normal_view_set_played_time(pNormalView);
- pNormalView->pExitWaitTimer = ecore_timer_add(VP_NORMAL_EXIT_WAIT_TIMER_INTERVAL,
- __vp_normal_exit_wait_timer_cb, (void *)pNormalView);
+ pNormalView->pExitWaitTimer =
+ ecore_timer_add(VP_NORMAL_EXIT_WAIT_TIMER_INTERVAL,
+ __vp_normal_exit_wait_timer_cb,
+ (void *) pNormalView);
elm_naviframe_item_pop(pNormalView->pNaviFrame);
return;
}
-static Eina_Bool __vp_normal_naviframe_pop_cb(void *pUserData, Elm_Object_Item *pItem)
+static Eina_Bool __vp_normal_naviframe_pop_cb(void *pUserData,
+ Elm_Object_Item * pItem)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return EINA_FALSE;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
if (pNormalView->bLockScreen) {
VideoLogError("Skip for bLockScreen");
}
if (pPlayView->bDestroy) {
- pNormalView->pNaviFrame = NULL; // it will be deleted when return TRUE
+ pNormalView->pNaviFrame = NULL; // it will be deleted when return TRUE
return EINA_TRUE;
}
vp_play_util_status_noti_show(VP_PLAY_STRING_COM_WAIT_BACK);
- pNormalView->pExitWaitTimer = ecore_timer_add(VP_NORMAL_EXIT_WAIT_TIMER_INTERVAL,
- __vp_normal_exit_wait_timer_cb, (void *)pNormalView);
+ pNormalView->pExitWaitTimer =
+ ecore_timer_add(VP_NORMAL_EXIT_WAIT_TIMER_INTERVAL,
+ __vp_normal_exit_wait_timer_cb,
+ (void *) pNormalView);
return EINA_FALSE;
}
if (pNormalView->bDestroyNavi) {
VideoLogWarning("bDestroyNavi is TRUE.");
- pNormalView->pNaviFrame = NULL; // it will be deleted when return TRUE
+ pNormalView->pNaviFrame = NULL; // it will be deleted when return TRUE
return EINA_TRUE;
}
return EINA_FALSE;
}
-//static void __vp_normal_sdp_download_state_change_cb(VppDownloadHandle pDownloadHandle, VppDownloadState eState, const char *szPath, void *pUserData)
-//{
-// VideoLogWarning("eState : [%d]", eState);
-//
-// if (!pUserData) {
-// VideoLogError("pUserData is NULL");
-// return;
-// }
-//
-// NormalView *pNormalView = (NormalView *)pUserData;
-//
-// if (!pDownloadHandle) {
-// VideoLogError("pDownloadHandle == NULL!!!");
-// return;
-// }
-//
-// if (eState == VPP_DOWNLOAD_STATE_COMPLETED) {
-// char *szDownloadedFilePath = VppDownloadGetDownloadedFilePath(pDownloadHandle);
-//
-// if (szDownloadedFilePath) {
-// VideoLogWarning("szDownloadedFilePath : %s", szDownloadedFilePath);
-// VP_FREE(pNormalView->szMediaURL);
-// pNormalView->szMediaURL = g_strdup(szDownloadedFilePath);
-// }
-//
-// VP_FREE(szDownloadedFilePath);
-// if (!vp_mm_player_realize_async(pNormalView->pPlayerHandle, pNormalView->szMediaURL)) {
-// VideoLogError("vp_mm_player_realize_async fail");
-// VppDownloadDestroyItem(pNormalView->pDownloadHandle);
-// pNormalView->pDownloadHandle = NULL;
-// return;
-// }
-//
-// VppDownloadDestroyItem(pNormalView->pDownloadHandle);
-// pNormalView->pDownloadHandle = NULL;
-// } else if (eState == VPP_DOWNLOAD_STATE_FAILED || eState == VPP_DOWNLOAD_STATE_CANCELED) {
-// if (!vp_mm_player_realize_async(pNormalView->pPlayerHandle, pNormalView->szMediaURL)) {
-//
-// VppDownloadDestroyItem(pNormalView->pDownloadHandle);
-// pNormalView->pDownloadHandle = NULL;
-//
-// VideoLogError("vp_mm_player_realize_async fail");
-// return;
-// }
-// VppDownloadDestroyItem(pNormalView->pDownloadHandle);
-// pNormalView->pDownloadHandle = NULL;
-// }
-//}
-
-static void __vp_normal_main_layout_resize_cb(void *pUserData, Evas *pEvas, Evas_Object *pObj, void *pEvent)
+
+static void __vp_normal_main_layout_resize_cb(void *pUserData,
+ Evas * pEvas,
+ Evas_Object * pObj,
+ void *pEvent)
{
if (!pUserData) {
VideoLogError("[ERR] No Exist pUserData.");
}
/*szColorHex:#RGBA ---> nColor:ARGB*/
-static unsigned int _vp_play_normal_view_convert_color_to_argb(char *szColorHex)
+static unsigned int _vp_play_normal_view_convert_color_to_argb(char
+ *szColorHex)
{
unsigned int nColor = 0;
- char *szColor = g_strdup_printf("%s%6.6s", (szColorHex + 7), (szColorHex + 1));
+ char *szColor =
+ g_strdup_printf("%s%6.6s", (szColorHex + 7), (szColorHex + 1));
nColor = strtoul(szColor, NULL, 16);
- VideoLogInfo("szColorHex:%s, szColor: %s, nColor:%0x", szColorHex, szColor, nColor);
+ VideoLogInfo("szColorHex:%s, szColor: %s, nColor:%0x", szColorHex,
+ szColor, nColor);
VP_FREE(szColor);
return nColor;
}
/* internal functions */
-static bool _vp_play_normal_view_set_subtitle_font_config(NormalView *pNormalView)
+static bool _vp_play_normal_view_set_subtitle_font_config(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
} else if (nBGColorKey == VIDEO_SUBTITLE_COLOR_NONE) {
nBGColor = 0x00000000;
}
-
#else
char *szColorHex = NULL;
vp_play_preference_get_subtitle_font_color_hex_key(&szColorHex);
if (szColorHex != NULL) {
- nFontColor = _vp_play_normal_view_convert_color_to_argb(szColorHex);
+ nFontColor =
+ _vp_play_normal_view_convert_color_to_argb(szColorHex);
}
char *szBGColorHex = NULL;
vp_play_preference_get_subtitle_bg_color_hex_key(&szBGColorHex);
- if (szBGColorHex != NULL) {
- nBGColor = _vp_play_normal_view_convert_color_to_argb(szBGColorHex);
+ if (szBGColorHex != NULL) {
+ nBGColor =
+ _vp_play_normal_view_convert_color_to_argb(szBGColorHex);
}
vp_play_preference_get_subtitle_alignment_key(&nAlignment);
#endif
- if (!vp_mm_player_set_subtitle_font(pNormalView->pPlayerHandle, szFontFamilyName, NULL, nSubtitleSizeValue)) {
+ if (!vp_mm_player_set_subtitle_font
+ (pNormalView->pPlayerHandle, szFontFamilyName, NULL,
+ nSubtitleSizeValue)) {
VideoLogError("vp_mm_player_set_subtitle_font fail");
}
- if (!vp_mm_player_set_subtitle_font_color(pNormalView->pPlayerHandle, nFontColor, nBGColor)) {
+ if (!vp_mm_player_set_subtitle_font_color
+ (pNormalView->pPlayerHandle, nFontColor, nBGColor)) {
VideoLogError("vp_mm_player_set_subtitle_font_color fail");
}
VP_FREE(szFontFamilyName);
- if (!vp_mm_player_subtitle_ignore_markup_tags(pNormalView->pPlayerHandle, FALSE)) {
+ if (!vp_mm_player_subtitle_ignore_markup_tags
+ (pNormalView->pPlayerHandle, FALSE)) {
VideoLogError("vp_mm_player_subtitle_ignore_markup_tags fail");
}
- if (!vp_mm_player_subtitle_set_alignment_in_line(pNormalView->pPlayerHandle, nAlignment)) {
+ if (!vp_mm_player_subtitle_set_alignment_in_line
+ (pNormalView->pPlayerHandle, nAlignment)) {
VideoLogError("vp_mm_player_subtitle_set_alignment_in_line fail");
}
- if (!vp_mm_player_subtitle_set_alignment_horizontal(pNormalView->pPlayerHandle, nAlignment)) {
- VideoLogError("vp_mm_player_subtitle_set_alignment_horizontal fail");
+ if (!vp_mm_player_subtitle_set_alignment_horizontal
+ (pNormalView->pPlayerHandle, nAlignment)) {
+ VideoLogError
+ ("vp_mm_player_subtitle_set_alignment_horizontal fail");
}
- if (!vp_mm_player_subtitle_apply_alignment_right_away(pNormalView->pPlayerHandle)) {
- VideoLogError("vp_mm_player_subtitle_apply_alignment_right_away fail");
+ if (!vp_mm_player_subtitle_apply_alignment_right_away
+ (pNormalView->pPlayerHandle)) {
+ VideoLogError
+ ("vp_mm_player_subtitle_apply_alignment_right_away fail");
}
return TRUE;
}
-static bool _vp_play_normal_view_update_progress_value(NormalView *pNormalView)
+static bool _vp_play_normal_view_update_progress_value(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
}
if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_WEB) {
int nBufferingPosition = 0;
- vp_mm_player_get_buffering_position(pNormalView->pPlayerHandle, &nBufferingPosition);
- vp_play_progressbar_set_buffering_position(pNormalView->pProgressbar, nBufferingPosition);
+ vp_mm_player_get_buffering_position(pNormalView->pPlayerHandle,
+ &nBufferingPosition);
+ vp_play_progressbar_set_buffering_position(pNormalView->
+ pProgressbar,
+ nBufferingPosition);
}
if (nState == VP_MM_PLAYER_STATE_PLAYING) {
nPosition += 1000;
}
-static bool _vp_play_normal_view_check_during_call(NormalView *pNormalView)
+static bool _vp_play_normal_view_check_during_call(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
PlayView *pPlayView = pNormalView->pPlayView;
bool bCallOn = FALSE;
- if(pPlayView->telinit) {
+ if (pPlayView && pPlayView->telinit) {
vp_play_config_get_call_state(&bCallOn);
} else {
- VideoLogError("telephony was not initialised hence returning call state as default = FALSE");
+ VideoLogError
+ ("telephony was not initialised hence returning call state as default = FALSE");
}
if (bCallOn) {
VP_EVAS_DEL(pNormalView->pPopup);
return FALSE;
}
pNormalView->pPopup = vp_popup_create(pPlayView->pWin,
- POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
- NULL,
- VP_PLAY_STRING_UNABLE_TO_PLAY_VIDEO_DURING_CALL,
- 2.0, __vp_normal_popup_time_out_cb,
- __vp_normal_popup_key_event_cb,
- __vp_normal_popup_mouse_event_cb,
- pNormalView);
+ POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
+ NULL,
+ VP_PLAY_STRING_UNABLE_TO_PLAY_VIDEO_DURING_CALL,
+ 2.0,
+ __vp_normal_popup_time_out_cb,
+ __vp_normal_popup_key_event_cb,
+ __vp_normal_popup_mouse_event_cb,
+ pNormalView);
evas_object_show(pNormalView->pPopup);
pNormalView->bIsPopupShow = TRUE;
return bCallOn;
}
-static void _vp_play_normal_view_show_audio_only_popup(NormalView *pNormalView)
+static void _vp_play_normal_view_show_audio_only_popup(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
return;
}
- VideoLogInfo("Show toast popup: Only audio data supported by this file. Now playing video.");
+ VideoLogInfo
+ ("Show toast popup: Only audio data supported by this file. Now playing video.");
_vp_normal_set_audio_only_image(pNormalView, TRUE);
- vp_play_util_status_noti_show(VP_PLAY_STRING_ERROR_ONLY_AUDIO_DATA_SUPPORTED);
+ vp_play_util_status_noti_show
+ (VP_PLAY_STRING_ERROR_ONLY_AUDIO_DATA_SUPPORTED);
}
-static void _vp_play_normal_view_show_video_only_popup(NormalView *pNormalView)
+static void _vp_play_normal_view_show_video_only_popup(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
return;
}
- VideoLogInfo("Show toast popup: Only video data supported by this file. Now playing video.");
+ VideoLogInfo
+ ("Show toast popup: Only video data supported by this file. Now playing video.");
_vp_normal_set_audio_only_image(pNormalView, FALSE);
- vp_play_util_status_noti_show(VP_PLAY_STRING_ERROR_ONLY_VIDEO_DATA_SUPPORTED);
+ vp_play_util_status_noti_show
+ (VP_PLAY_STRING_ERROR_ONLY_VIDEO_DATA_SUPPORTED);
}
-static bool _vp_play_normal_view_check_audio_only(NormalView *pNormalView)
+static bool _vp_play_normal_view_check_audio_only(NormalView * pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
char *video_codec = NULL;
bool b_audio_only = FALSE;
bool b_video_only = FALSE;
- if (vp_mm_player_get_codecinfo(pNormalView->pPlayerHandle, &audio_codec, &video_codec)) {
- VideoLogWarning("audio_codec=%s, video_codec=%s", audio_codec, video_codec);
+ if (vp_mm_player_get_codecinfo
+ (pNormalView->pPlayerHandle, &audio_codec, &video_codec)) {
+ VideoLogWarning("audio_codec=%s, video_codec=%s", audio_codec,
+ video_codec);
if (video_codec == NULL || strlen(video_codec) <= 1) {
if (audio_codec != NULL && strlen(audio_codec) > 1) {
b_audio_only = TRUE;
VP_FREE(video_codec);
}
- VideoLogWarning("b_audio_only=%d, b_video_only=%d", b_audio_only, b_video_only);
+ VideoLogWarning("b_audio_only=%d, b_video_only=%d", b_audio_only,
+ b_video_only);
if (b_audio_only) {
VideoLogInfo("Only audio data supported.");
}
-static bool _vp_play_normal_view_check_drm_lock(NormalView *pNormalView, bool *bLock)
+static bool _vp_play_normal_view_check_drm_lock(NormalView * pNormalView,
+ bool * bLock)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
bool bIsDivX = FALSE;
bool bIsPlayReadyDRM = FALSE;
- if (vp_drm_is_check_forward_lock(pNormalView->szMediaURL, &bIsFWLock)) {
+ if (vp_drm_is_check_forward_lock
+ (pNormalView->szMediaURL, &bIsFWLock)) {
if (bIsFWLock) {
*bLock = TRUE;
}
}
}
- if (vp_drm_is_playready_drm_file(pNormalView->szMediaURL, &bIsPlayReadyDRM)) {
+ if (vp_drm_is_playready_drm_file
+ (pNormalView->szMediaURL, &bIsPlayReadyDRM)) {
if (bIsPlayReadyDRM) {
*bLock = TRUE;
}
}
#ifdef ENABLE_DRM_FEATURE
-static bool _vp_play_normal_view_check_drm(NormalView *pNormalView, bool *bIsAvailablePlay)
+static bool _vp_play_normal_view_check_drm(NormalView * pNormalView,
+ bool * bIsAvailablePlay)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
*bIsAvailablePlay = TRUE;
bool bIsDrm = FALSE;
- //bool bIsLicense = FALSE;
bool bIsDivXDRM = FALSE;
if (!vp_drm_is_drm_file(pNormalView->szMediaURL, &bIsDrm)) {
}
if (pNormalView->pPlayView->bStoreDownload == TRUE) {
- bool bCheckLicense = FALSE;
- if (!vp_drm_is_check_license(pNormalView->szMediaURL, &bCheckLicense)) {
+ bool bCheckLicense = FALSE;
+ if (!vp_drm_is_check_license
+ (pNormalView->szMediaURL, &bCheckLicense)) {
VideoLogError("vp_drm_is_check_license is fail");
*bIsAvailablePlay = FALSE;
if (bCheckLicense == FALSE) {
if (!vp_store_license_acquisition(pNormalView->szMediaURL,
- pNormalView->pPlayView->pStoreAppId,
- pNormalView->pPlayView->pStoreOrderId,
- pNormalView->pPlayView->pStoreMvId,
- pNormalView->pPlayView->pStoreServerId,
- _vp_play_normal_view_store_la_cb,
- (const void*)pNormalView)) {
+ pNormalView->pPlayView->
+ pStoreAppId,
+ pNormalView->pPlayView->
+ pStoreOrderId,
+ pNormalView->pPlayView->
+ pStoreMvId,
+ pNormalView->pPlayView->
+ pStoreServerId,
+ _vp_play_normal_view_store_la_cb,
+ (const void *) pNormalView)) {
VideoLogError("vp_store_license_acquisition is fail");
*bIsAvailablePlay = FALSE;
char *szMessage = NULL;
char *szTitleTemp = NULL;
- szTitleTemp = vp_play_util_get_title_from_path(pNormalView->szMediaURL);
- szMessage = g_strdup_printf(VP_PLAY_STRING_DRM_CURRENTLY_LOCKED_UNLOCK_Q, szTitleTemp);
-
- pNormalView->pPopup = vp_popup_create(pPlayView->pWin, POPUP_STYLE_DEFAULT,
- VP_PLAY_STRING_COM_ERROR,
- szMessage,
- 3.0, __vp_normal_error_popup_time_out_cb,
- NULL, NULL, pNormalView);
+ szTitleTemp =
+ vp_play_util_get_title_from_path(pNormalView->szMediaURL);
+ szMessage =
+ g_strdup_printf
+ (VP_PLAY_STRING_DRM_CURRENTLY_LOCKED_UNLOCK_Q,
+ szTitleTemp);
+
+ pNormalView->pPopup =
+ vp_popup_create(pPlayView->pWin, POPUP_STYLE_DEFAULT,
+ VP_PLAY_STRING_COM_ERROR, szMessage, 3.0,
+ __vp_normal_error_popup_time_out_cb, NULL,
+ NULL, pNormalView);
evas_object_show(pNormalView->pPopup);
pNormalView->bIsPopupShow = TRUE;
}
}
- vp_drm_constraint_info stConstraintInfo = {0,};
+ vp_drm_constraint_info stConstraintInfo = { 0, };
- if (!vp_drm_get_constarint_info(pNormalView->szMediaURL, &stConstraintInfo)) {
+ if (!vp_drm_get_constarint_info
+ (pNormalView->szMediaURL, &stConstraintInfo)) {
VideoLogError("vp_drm_get_constarint_info is fail");
return FALSE;
}
szTitle = vp_play_util_get_title_from_path(pNormalView->szMediaURL);
if (bIsDivXDRM) {
- if (stConstraintInfo.status == VP_DRM_CONSTRAINT_TYPE_NOT_AUTHORIZED) {
+ if (stConstraintInfo.status ==
+ VP_DRM_CONSTRAINT_TYPE_NOT_AUTHORIZED) {
VP_EVAS_DEL(pNormalView->pPopup);
pNormalView->pPopup = NULL;
- pNormalView->pPopup = vp_popup_create(pPlayView->pWin, POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
- VP_PLAY_STRING_COM_ERROR,
- VP_PLAY_STRING_DIVX_DRM_AUTHORIZATION_ERROR,
- 3.0, __vp_normal_error_popup_time_out_cb,
- NULL, NULL, pNormalView);
+ pNormalView->pPopup =
+ vp_popup_create(pPlayView->pWin,
+ POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
+ VP_PLAY_STRING_COM_ERROR,
+ VP_PLAY_STRING_DIVX_DRM_AUTHORIZATION_ERROR,
+ 3.0, __vp_normal_error_popup_time_out_cb,
+ NULL, NULL, pNormalView);
evas_object_show(pNormalView->pPopup);
pNormalView->bIsPopupShow = TRUE;
while (stConstraintInfo.constraints) {
if (stConstraintInfo.constraints & VP_DRM_CONSTRAINT_COUNT) {
if (stConstraintInfo.remaining_count == 0) {
- szMsg = g_strdup_printf(VP_PLAY_STRING_DIVX_DRM_RENTAL_EXPIRED_ERROR, stConstraintInfo.original_count - stConstraintInfo.remaining_count, stConstraintInfo.original_count);
+ szMsg =
+ g_strdup_printf
+ (VP_PLAY_STRING_DIVX_DRM_RENTAL_EXPIRED_ERROR,
+ stConstraintInfo.original_count -
+ stConstraintInfo.remaining_count,
+ stConstraintInfo.original_count);
} else {
- szMsg = g_strdup_printf(VP_PLAY_STRING_DIVX_DRM_RENTAL_CONFIRMATION_CHOICE, stConstraintInfo.original_count - stConstraintInfo.remaining_count, stConstraintInfo.original_count);
+ szMsg =
+ g_strdup_printf
+ (VP_PLAY_STRING_DIVX_DRM_RENTAL_CONFIRMATION_CHOICE,
+ stConstraintInfo.original_count -
+ stConstraintInfo.remaining_count,
+ stConstraintInfo.original_count);
}
break;
}
while (stConstraintInfo.constraints) {
if (stConstraintInfo.constraints & VP_DRM_CONSTRAINT_COUNT) {
if (stConstraintInfo.remaining_count == 2) {
- szMsg = g_strdup_printf(VP_PLAY_STRING_DRM_PS_2_MORE_TIME_START_NOW_Q, szTitle);
+ szMsg =
+ g_strdup_printf
+ (VP_PLAY_STRING_DRM_PS_2_MORE_TIME_START_NOW_Q,
+ szTitle);
} else if (stConstraintInfo.remaining_count == 1) {
- szMsg = g_strdup_printf(VP_PLAY_STRING_DRM_PS_1_MORE_TIME_START_NOW_Q, szTitle);
+ szMsg =
+ g_strdup_printf
+ (VP_PLAY_STRING_DRM_PS_1_MORE_TIME_START_NOW_Q,
+ szTitle);
} else if (stConstraintInfo.remaining_count == 0) {
bNotiPopup = TRUE;
}
if (stConstraintInfo.remaining_interval_sec == 0) {
bNotiPopup = TRUE;
} else {
- int nDays = stConstraintInfo.remaining_interval_sec / VP_ACCUMULATED_DATE + 1;
- szMsg = g_strdup_printf(VP_PLAY_STRING_DRM_PS_FOR_PD_DAYS_START_NOW_Q, szTitle, nDays);
+ int nDays =
+ stConstraintInfo.remaining_interval_sec /
+ VP_ACCUMULATED_DATE + 1;
+ szMsg =
+ g_strdup_printf
+ (VP_PLAY_STRING_DRM_PS_FOR_PD_DAYS_START_NOW_Q,
+ szTitle, nDays);
}
break;
}
- if (stConstraintInfo.constraints & VP_DRM_CONSTRAINT_TIMED_COUNT) {
+ if (stConstraintInfo.
+ constraints & VP_DRM_CONSTRAINT_TIMED_COUNT) {
if (stConstraintInfo.remaining_timed_count == 2) {
- szMsg = g_strdup_printf(VP_PLAY_STRING_DRM_PS_2_MORE_TIME_START_NOW_Q, szTitle);
+ szMsg =
+ g_strdup_printf
+ (VP_PLAY_STRING_DRM_PS_2_MORE_TIME_START_NOW_Q,
+ szTitle);
} else if (stConstraintInfo.remaining_timed_count == 1) {
- szMsg = g_strdup_printf(VP_PLAY_STRING_DRM_PS_1_MORE_TIME_START_NOW_Q, szTitle);
+ szMsg =
+ g_strdup_printf
+ (VP_PLAY_STRING_DRM_PS_1_MORE_TIME_START_NOW_Q,
+ szTitle);
} else if (stConstraintInfo.remaining_timed_count == 0) {
bNotiPopup = TRUE;
}
break;
}
- if (stConstraintInfo.constraints & VP_DRM_CONSTRAINT_ACCUMLATED_TIME) {
+ if (stConstraintInfo.
+ constraints & VP_DRM_CONSTRAINT_ACCUMLATED_TIME) {
if (stConstraintInfo.remaining_acc_sec == 0) {
bNotiPopup = TRUE;
}
#ifndef ENABLE_SUBTITLE
-static void _vp_play_normal_view_free_subtitle_list(GList *pSubtitleList)
+static void _vp_play_normal_view_free_subtitle_list(GList * pSubtitleList)
{
if (pSubtitleList) {
int nCount = 0;
int i = 0;
nCount = g_list_length(pSubtitleList);
- for (i = 0; i < nCount ; i++) {
+ for (i = 0; i < nCount; i++) {
char *szName = NULL;
- szName = (char *)g_list_nth_data(pSubtitleList, i);
+ szName = (char *) g_list_nth_data(pSubtitleList, i);
VP_FREE(szName);
}
#endif
#ifdef _NATIVE_BUFFER_SYNC
-static Evas_Object *_vp_play_normal_view_create_image_sink(void *pParent, void *pUserData)
+static Evas_Object *_vp_play_normal_view_create_image_sink(void *pParent,
+ void *pUserData)
{
if (!pUserData) {
return NULL;
}
-// NormalView *pNormalView = (NormalView *)pUserData;
Evas *pEvas = NULL;
Evas_Object *pObj = NULL;
return NULL;
}
- evas_object_image_size_set(pObj, VP_NORMAL_DEFAULT_WIDTH, VP_NORMAL_DEFAULT_HEIGHT);
- evas_object_image_fill_set(pObj, 0, 0, VP_NORMAL_DEFAULT_WIDTH, VP_NORMAL_DEFAULT_HEIGHT);
- evas_object_resize(pObj, VP_NORMAL_DEFAULT_WIDTH, VP_NORMAL_DEFAULT_HEIGHT);
+ evas_object_image_size_set(pObj, VP_NORMAL_DEFAULT_WIDTH,
+ VP_NORMAL_DEFAULT_HEIGHT);
+ evas_object_image_fill_set(pObj, 0, 0, VP_NORMAL_DEFAULT_WIDTH,
+ VP_NORMAL_DEFAULT_HEIGHT);
+ evas_object_resize(pObj, VP_NORMAL_DEFAULT_WIDTH,
+ VP_NORMAL_DEFAULT_HEIGHT);
void *pImageBuf = evas_object_image_data_get(pObj, EINA_TRUE);
if (NULL == pImageBuf) {
memset(pImageBuf, 0, nBufSize);
evas_object_image_data_set(pObj, pImageBuf);
-// evas_object_event_callback_add(pObj, EVAS_CALLBACK_RESIZE,
-// __vp_play_multi_view_imagesink_resize_cb, (void *)pNormalView);
-
- elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_SINK, pObj);
+ elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_SINK,
+ pObj);
return pObj;
}
#endif
-static bool _vp_play_normal_view_release_service_share(PlayView *pView)
+static bool _vp_play_normal_view_release_service_share(PlayView * pView)
{
- if(!pView)
+ if (!pView)
return FALSE;
if (pView->pServiceShare) {
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
_vp_play_normal_view_play_start(pNormalView, FALSE);
return TRUE;
}
-static bool _vp_play_normal_view_play_start(NormalView *pNormalView, bool bCheckDRM)
+static bool _vp_play_normal_view_play_start(NormalView * pNormalView,
+ bool bCheckDRM)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
return FALSE;
}
- vp_mm_player_state_t nState = vp_play_normal_view_get_player_state(pPlayView);
+ vp_mm_player_state_t nState =
+ vp_play_normal_view_get_player_state(pPlayView);
pPlayView->lockmini_hide = FALSE;
if (pPlayView->b_lockmini_show && nState == VP_MM_PLAYER_STATE_PAUSED) {
/* Screen unlocked in paused state. So, hide lockscreen minicontrol */
}
if (pNormalView->pImageBufferObj) {
- elm_object_part_content_unset(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_IMAGE_BUFFER);
+ elm_object_part_content_unset(pNormalView->pMainLayout,
+ VP_PLAY_SWALLOW_NORMAL_IMAGE_BUFFER);
VP_EVAS_DEL(pNormalView->pImageBufferObj);
}
#ifdef _NATIVE_BUFFER_SYNC
VP_EVAS_DEL(pNormalView->pVideoSink);
- pNormalView->pVideoSink = _vp_play_normal_view_create_image_sink(pNormalView->pMainLayout, (void *)pNormalView);
+ pNormalView->pVideoSink =
+ _vp_play_normal_view_create_image_sink(pNormalView->pMainLayout,
+ (void *) pNormalView);
if (!pNormalView->pVideoSink) {
- VideoLogError("_vp_play_normal_view_create_image_sink handle is null");
+ VideoLogError
+ ("_vp_play_normal_view_create_image_sink handle is null");
return FALSE;
}
#endif
pNormalView->pSubtitleTimer = NULL;
pNormalView->bIsExistSubtitle = FALSE;
- pNormalView->fPlaySpeed = pNormalView->pPlayView->fPlaySpeed;
+
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_PLAYING_SPEED_HIDE, "*");
VP_EVAS_TIMER_DEL(pNormalView->pSpeedTimer);
}
if (pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_WEB &&
- pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MULTI_PATH) {
+ pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MULTI_PATH) {
if (!vp_play_util_local_file_check(pNormalView->szMediaURL)) {
/* popup show */
VideoLogError("pPlayView is NULL");
return FALSE;
}
- pNormalView->pPopup = vp_popup_create(pPlayView->pWin, POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
- VP_PLAY_STRING_COM_ERROR,
- VP_PLAY_STRING_ERROR_FILE_NOT_EXIST,
- 3.0, __vp_normal_error_popup_time_out_cb,
- NULL, NULL, pNormalView);
+ pNormalView->pPopup =
+ vp_popup_create(pPlayView->pWin,
+ POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
+ VP_PLAY_STRING_COM_ERROR,
+ VP_PLAY_STRING_ERROR_FILE_NOT_EXIST, 3.0,
+ __vp_normal_error_popup_time_out_cb, NULL,
+ NULL, pNormalView);
evas_object_show(pNormalView->pPopup);
pNormalView->bIsPopupShow = TRUE;
if (bCheckDRM) {
if (pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_WEB &&
- pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MULTI_PATH) {
+ pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MULTI_PATH) {
bool bIsAvailablePlay = TRUE;
#ifdef ENABLE_DRM_FEATURE
- if (_vp_play_normal_view_check_drm(pNormalView, &bIsAvailablePlay)) {
+ if (_vp_play_normal_view_check_drm
+ (pNormalView, &bIsAvailablePlay)) {
if (bIsAvailablePlay == FALSE) {
VideoLogWarning("Wait Drm popup result");
return TRUE;
VideoLogWarning("license acquisition failed!!!");
Evas_Object *pPopup = NULL;
- pPopup = vp_popup_create(pNormalView->pPlayView->pWin,
- POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
- VP_PLAY_STRING_COM_ERROR,
- VP_PLAY_STRING_ERROR_UNABLE_PLAY,
- 3.0, __vp_normal_prepare_error_popup_time_out_cb,
- NULL, NULL, pNormalView);
+ pPopup =
+ vp_popup_create(pNormalView->pPlayView->pWin,
+ POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
+ VP_PLAY_STRING_COM_ERROR,
+ VP_PLAY_STRING_ERROR_UNABLE_PLAY,
+ 3.0,
+ __vp_normal_prepare_error_popup_time_out_cb,
+ NULL, NULL, pNormalView);
evas_object_show(pPopup);
if (pNormalView->nStartPosition == 0) {
if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_STORE ||
- pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_LIST ||
- pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_OTHER) {
+ pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_LIST ||
+ pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_OTHER) {
int nStartPos = 0;
- if (vp_media_contents_get_played_position(pNormalView->szMediaURL, &nStartPos)) {
+ if (vp_media_contents_get_played_position
+ (pNormalView->szMediaURL, &nStartPos)) {
pNormalView->nStartPosition = nStartPos;
}
}
}
if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_STORE ||
- pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_LIST ||
- pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_OTHER) {
+ pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_LIST ||
+ pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_OTHER) {
vp_media_contents_set_played_time(pNormalView->szMediaURL);
}
if (bCheckDRM) {
if (pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_WEB &&
- pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MULTI_PATH) {
+ pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MULTI_PATH) {
bool bDRMLock = FALSE;
_vp_play_normal_view_check_drm_lock(pNormalView, &bDRMLock);
if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_EMAIL) {
char *szMediaID = NULL;
bool bReturn = FALSE;
- bReturn = vp_media_contents_get_video_id(pNormalView->szMediaURL, &szMediaID);
+ bReturn =
+ vp_media_contents_get_video_id(pNormalView->szMediaURL,
+ &szMediaID);
if (!szMediaID || bReturn == FALSE) {
VP_EVAS_DISABLE_SET(pNormalView->pTrimBtn, EINA_TRUE);
} else {
VideoLogError("vp_mm_player_create fail");
return FALSE;
}
- MMPlayer *handle = (MMPlayer *)pNormalView->pPlayerHandle;
+ MMPlayer *handle = (MMPlayer *) pNormalView->pPlayerHandle;
int nRet;
- nRet = player_set_audio_policy_info(handle->pPlayer, pNormalView->pPlayView->stream_info);
+ nRet =
+ player_set_sound_stream_info(handle->pPlayer,
+ pNormalView->pPlayView->stream_info);
if (nRet != PLAYER_ERROR_NONE) {
- VideoLogError("unable to set sound policy [%x]", nRet);
+ VideoLogError("unable to set sound policy [%x]", nRet);
}
- if (!vp_mm_player_set_stream_info(pNormalView->pPlayerHandle, (void *)(pNormalView->pPlayView->stream_info))) {
+ if (!vp_mm_player_set_stream_info
+ (pNormalView->pPlayerHandle,
+ (void *) (pNormalView->pPlayView->stream_info))) {
VideoLogError("vp_mm_player_set_stream_info fail");
return FALSE;
}
- if (!vp_mm_player_set_user_param(pNormalView->pPlayerHandle, (void *) pNormalView)) {
+ if (!vp_mm_player_set_user_param
+ (pNormalView->pPlayerHandle, (void *) pNormalView)) {
VideoLogError("vp_mm_player_set_user_param fail");
return FALSE;
}
- if (!vp_mm_player_set_callback(pNormalView->pPlayerHandle, VP_MM_PLAYER_REALIZE_ASYNC_CB, (void *)__vp_normal_prepare_cb)) {
+ if (!vp_mm_player_set_callback
+ (pNormalView->pPlayerHandle, VP_MM_PLAYER_REALIZE_ASYNC_CB,
+ (void *) __vp_normal_prepare_cb)) {
VideoLogError("vp_mm_player_set_callback fail");
return FALSE;
}
- if (!vp_mm_player_set_callback(pNormalView->pPlayerHandle, VP_MM_PLAYER_SEEK_COMPLETE_CB, (void *)__vp_normal_seek_completed_cb)) {
+ if (!vp_mm_player_set_callback
+ (pNormalView->pPlayerHandle, VP_MM_PLAYER_SEEK_COMPLETE_CB,
+ (void *) __vp_normal_seek_completed_cb)) {
VideoLogError("vp_mm_player_set_callback fail");
return FALSE;
}
- if (!vp_mm_player_set_callback(pNormalView->pPlayerHandle, VP_MM_PLAYER_END_OF_STREAM_CB, (void *)__vp_normal_completed_cb)) {
+ if (!vp_mm_player_set_callback
+ (pNormalView->pPlayerHandle, VP_MM_PLAYER_END_OF_STREAM_CB,
+ (void *) __vp_normal_completed_cb)) {
VideoLogError("vp_mm_player_set_callback fail");
return FALSE;
}
- if (!vp_mm_player_set_callback(pNormalView->pPlayerHandle, VP_MM_PLAYER_INTERRUPT_CB, (void *)__vp_normal_interrupted_cb)) {
+ if (!vp_mm_player_set_callback
+ (pNormalView->pPlayerHandle, VP_MM_PLAYER_INTERRUPT_CB,
+ (void *) __vp_normal_interrupted_cb)) {
VideoLogError("vp_mm_player_set_callback fail");
return FALSE;
}
- if (!vp_mm_player_set_callback(pNormalView->pPlayerHandle, VP_MM_PLAYER_ERROR_CB, (void *)__vp_normal_error_cb)) {
+ if (!vp_mm_player_set_callback
+ (pNormalView->pPlayerHandle, VP_MM_PLAYER_ERROR_CB,
+ (void *) __vp_normal_error_cb)) {
VideoLogError("vp_mm_player_set_callback fail");
return FALSE;
}
- if (!vp_mm_player_set_callback(pNormalView->pPlayerHandle, VP_MM_PLAYER_BUFFERING_CB, (void *)__vp_normal_buffering_cb)) {
+ if (!vp_mm_player_set_callback
+ (pNormalView->pPlayerHandle, VP_MM_PLAYER_BUFFERING_CB,
+ (void *) __vp_normal_buffering_cb)) {
VideoLogError("vp_mm_player_set_callback fail");
return FALSE;
}
- if (!vp_mm_player_set_callback(pNormalView->pPlayerHandle, VP_MM_PLAYER_SUBTITLE_UPDATE_CB, (void *)__vp_normal_subtitle_updated_cb)) {
+ if (!vp_mm_player_set_callback
+ (pNormalView->pPlayerHandle, VP_MM_PLAYER_SUBTITLE_UPDATE_CB,
+ (void *) __vp_normal_subtitle_updated_cb)) {
VideoLogError("vp_mm_player_set_callback fail");
return FALSE;
}
- if (!vp_mm_player_set_callback(pNormalView->pPlayerHandle, VP_MM_PLAYER_PD_MESSAGE_CB, (void *)__vp_normal_pd_message_cb)) {
+ if (!vp_mm_player_set_callback
+ (pNormalView->pPlayerHandle, VP_MM_PLAYER_PD_MESSAGE_CB,
+ (void *) __vp_normal_pd_message_cb)) {
VideoLogError("vp_mm_player_set_callback fail");
return FALSE;
}
- if (!vp_mm_player_set_callback(pNormalView->pPlayerHandle, VP_MM_PLAYER_MISSED_PLUGIN_CB, (void *)__vp_normal_missed_plugin_cb)) {
+ if (!vp_mm_player_set_callback
+ (pNormalView->pPlayerHandle, VP_MM_PLAYER_MISSED_PLUGIN_CB,
+ (void *) __vp_normal_missed_plugin_cb)) {
VideoLogError("vp_mm_player_set_callback fail");
return FALSE;
}
- if (!vp_mm_player_set_callback(pNormalView->pPlayerHandle, VP_MM_PLAYER_IMAGE_BUFFER_CB, (void *)__vp_normal_image_buffer_cb)) {
+ if (!vp_mm_player_set_callback
+ (pNormalView->pPlayerHandle, VP_MM_PLAYER_IMAGE_BUFFER_CB,
+ (void *) __vp_normal_image_buffer_cb)) {
VideoLogError("vp_mm_player_set_callback fail");
return FALSE;
}
if (pNormalView->pBookmarkHandle) {
- vp_play_bookmark_set_media_url(pNormalView->pBookmarkHandle, pNormalView->szMediaURL);
+ vp_play_bookmark_set_media_url(pNormalView->pBookmarkHandle,
+ pNormalView->szMediaURL);
}
if (pNormalView->szSubtitleURL) {
- pNormalView->bIsExistSubtitle = vp_mm_player_set_subtitle_url(pNormalView->pPlayerHandle, pNormalView->szSubtitleURL);
+ pNormalView->bIsExistSubtitle =
+ vp_mm_player_set_subtitle_url(pNormalView->pPlayerHandle,
+ pNormalView->szSubtitleURL);
bool bOn = FALSE;
vp_play_preference_get_subtitle_show_key(&bOn);
if (bOn) {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SUBTITLE_PORTRAIT, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SUBTITLE_PORTRAIT,
+ "*");
pNormalView->bIsExistSubtitle = TRUE;
- vp_mm_player_set_deactivate_subtitle(pNormalView->pPlayerHandle, FALSE);
+ vp_mm_player_set_deactivate_subtitle(pNormalView->
+ pPlayerHandle, FALSE);
}
}
-
#ifdef _NATIVE_BUFFER_SYNC
if (!vp_mm_player_set_video_sink(pNormalView->pPlayerHandle,
- VP_MM_PLAYER_VIDEO_TYPE_EVAS,
- (void *)pNormalView->pVideoSink)) {
+ VP_MM_PLAYER_VIDEO_TYPE_EVAS,
+ (void *) pNormalView->pVideoSink)) {
VideoLogError("vp_mm_player_set_video_sink fail");
_vp_play_normal_view_destroy_handle(pNormalView);
return FALSE;
}
#else
- //if (!vp_mm_player_set_video_sink(pNormalView->pPlayerHandle, VP_MM_PLAYER_VIDEO_TYPE_X11, (void *)GET_DISPLAY(pNormalView->pPlayView->pWin))) {
- if (!vp_mm_player_set_video_sink(pNormalView->pPlayerHandle, VP_MM_PLAYER_VIDEO_TYPE_X11, (void *)(pNormalView->pPlayView->pWin))) {
+ if (!vp_mm_player_set_video_sink
+ (pNormalView->pPlayerHandle, VP_MM_PLAYER_VIDEO_TYPE_X11,
+ (void *) (pNormalView->pPlayView->pWin))) {
VideoLogError("vp_mm_player_set_video_sink fail");
return FALSE;
}
#endif
- if (!vp_mm_player_set_hub_download_mode(pNormalView->pPlayerHandle, pPlayView->bStoreDownload)) {
+ if (!vp_mm_player_set_hub_download_mode
+ (pNormalView->pPlayerHandle, pPlayView->bStoreDownload)) {
VideoLogError("vp_mm_player_set_hub_download_mode fail");
}
if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_NONE) {
- vp_mm_player_set_video_rotate(pNormalView->pPlayerHandle, VP_MM_PLAYER_ROTATE_0);
+ vp_mm_player_set_video_rotate(pNormalView->pPlayerHandle,
+ VP_MM_PLAYER_ROTATE_0);
} else if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_90) {
- vp_mm_player_set_video_rotate(pNormalView->pPlayerHandle, VP_MM_PLAYER_ROTATE_90);
+ vp_mm_player_set_video_rotate(pNormalView->pPlayerHandle,
+ VP_MM_PLAYER_ROTATE_90);
} else if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_180) {
- vp_mm_player_set_video_rotate(pNormalView->pPlayerHandle, VP_MM_PLAYER_ROTATE_180);
+ vp_mm_player_set_video_rotate(pNormalView->pPlayerHandle,
+ VP_MM_PLAYER_ROTATE_180);
} else if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_270) {
- vp_mm_player_set_video_rotate(pNormalView->pPlayerHandle, VP_MM_PLAYER_ROTATE_270);
+ vp_mm_player_set_video_rotate(pNormalView->pPlayerHandle,
+ VP_MM_PLAYER_ROTATE_270);
}
vp_mm_player_sound_filter_t nSoundFilter = VP_MM_PLAYER_FILTER_NONE;
}
}
- vp_mm_player_set_display_mode(pNormalView->pPlayerHandle, pNormalView->nDisplayMode);
+ vp_mm_player_set_display_mode(pNormalView->pPlayerHandle,
+ pNormalView->nDisplayMode);
if (nSoundFilter != VP_MM_PLAYER_FILTER_NONE) {
- if (!vp_mm_player_set_sound_filter(pNormalView->pPlayerHandle, nSoundFilter)) {
+ if (!vp_mm_player_set_sound_filter
+ (pNormalView->pPlayerHandle, nSoundFilter)) {
VideoLogWarning("vp_mm_player_set_sound_filter is fail");
}
}
if (pNormalView->nDefaultAudioTrackIndex > 0) {
- vp_mm_player_set_audio_track(pNormalView->pPlayerHandle, pNormalView->nDefaultAudioTrackIndex);
+ vp_mm_player_set_audio_track(pNormalView->pPlayerHandle,
+ pNormalView->nDefaultAudioTrackIndex);
}
if (pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_WEB &&
- pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MULTI_PATH) {
+ pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MULTI_PATH) {
if (pPlayView->szMediaTitle) {
- elm_object_item_text_set(pNormalView->pNaviItem, pPlayView->szMediaTitle);
+ elm_object_item_text_set(pNormalView->pNaviItem,
+ pPlayView->szMediaTitle);
} else {
char *szTitle = NULL;
- szTitle = vp_play_util_get_title_from_path(pNormalView->szMediaURL);
+ szTitle =
+ vp_play_util_get_title_from_path(pNormalView->szMediaURL);
if (szTitle) {
elm_object_item_text_set(pNormalView->pNaviItem, szTitle);
}
VP_FREE(szTitle);
}
- if (!vp_mm_player_realize_async(pNormalView->pPlayerHandle, pNormalView->szMediaURL)) {
+ if (!vp_mm_player_realize_async
+ (pNormalView->pPlayerHandle, pNormalView->szMediaURL)) {
VideoLogError("vp_mm_player_realize_async fail");
- //_vp_play_normal_view_show_layout(pNormalView);
Evas_Object *pPopup = NULL;
pPopup = vp_popup_create(pPlayView->pWin,
- POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
- VP_PLAY_STRING_COM_ERROR,
- VP_PLAY_STRING_ERROR_UNABLE_PLAY,
- 3.0, __vp_normal_prepare_error_popup_time_out_cb,
- NULL, NULL, pNormalView);
+ POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
+ VP_PLAY_STRING_COM_ERROR,
+ VP_PLAY_STRING_ERROR_UNABLE_PLAY,
+ 3.0,
+ __vp_normal_prepare_error_popup_time_out_cb,
+ NULL, NULL, pNormalView);
evas_object_show(pPopup);
}
} else {
if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_WEB) {
- VideoLogInfo("VIDEO_PLAY_TYPE_WEB:%s", pNormalView->szMediaURL);
+ VideoLogInfo("VIDEO_PLAY_TYPE_WEB:%s",
+ pNormalView->szMediaURL);
if (pPlayView->szMediaTitle) {
- elm_object_item_text_set(pNormalView->pNaviItem, pPlayView->szMediaTitle);
+ elm_object_item_text_set(pNormalView->pNaviItem,
+ pPlayView->szMediaTitle);
} else {
- elm_object_item_text_set(pNormalView->pNaviItem, VP_PLAY_STRING_STREAMING_PLAYER);
+ elm_object_item_text_set(pNormalView->pNaviItem,
+ VP_PLAY_STRING_STREAMING_PLAYER);
}
if (pPlayView->szCookie) {
- if (!vp_mm_player_set_cookie(pNormalView->pPlayerHandle, pPlayView->szCookie)) {
+ if (!vp_mm_player_set_cookie
+ (pNormalView->pPlayerHandle, pPlayView->szCookie)) {
VideoLogError("vp_mm_player_set_cookie fail");
}
}
if (pPlayView->szProxy) {
- if (!vp_mm_player_set_proxy(pNormalView->pPlayerHandle, pPlayView->szProxy)) {
+ if (!vp_mm_player_set_proxy
+ (pNormalView->pPlayerHandle, pPlayView->szProxy)) {
VideoLogError("vp_mm_player_set_proxy fail");
}
}
char *szSdpPath = NULL;
- szSdpPath = vp_play_util_get_sdp_url((const char *)pNormalView->szMediaURL);
- if (vp_play_util_check_sdp_url((const char *)szSdpPath)) {
- //_vp_play_normal_view_download_sdp(pNormalView, pNormalView->szMediaURL);
- //_vp_play_normal_view_show_layout(pNormalView);
-
+ szSdpPath =
+ vp_play_util_get_sdp_url((const char *) pNormalView->
+ szMediaURL);
+ if (vp_play_util_check_sdp_url((const char *) szSdpPath)) {
return TRUE;
}
VP_FREE(szSdpPath);
- if (!vp_mm_player_realize_async(pNormalView->pPlayerHandle, pNormalView->szMediaURL)) {
+ if (!vp_mm_player_realize_async
+ (pNormalView->pPlayerHandle, pNormalView->szMediaURL)) {
VideoLogError("vp_mm_player_realize_async fail");
- //_vp_play_normal_view_show_layout(pNormalView);
Evas_Object *pPopup = NULL;
pPopup = vp_popup_create(pPlayView->pWin,
- POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
- VP_PLAY_STRING_COM_ERROR,
- VP_PLAY_STRING_ERROR_UNABLE_PLAY,
- 3.0, __vp_normal_prepare_error_popup_time_out_cb,
- NULL, NULL, pNormalView);
+ POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
+ VP_PLAY_STRING_COM_ERROR,
+ VP_PLAY_STRING_ERROR_UNABLE_PLAY,
+ 3.0,
+ __vp_normal_prepare_error_popup_time_out_cb,
+ NULL, NULL, pNormalView);
evas_object_show(pPopup);
return TRUE;
}
- } else if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MULTI_PATH) {
+ } else if (pNormalView->nLaunchingType ==
+ VIDEO_PLAY_TYPE_MULTI_PATH) {
char *szTitle = NULL;
char *szMultiPathURL = NULL;
bool bIsSameAP = TRUE;
- vp_multi_path_get_current_item(pNormalView->szMediaURL, &szMultiPathURL, &szTitle, &szSubtitleForMultiPath, &nMultiPathPosition, &nMultiPathDuration, &bIsSameAP, pPlayView->pMultiPathList);
+ vp_multi_path_get_current_item(pNormalView->szMediaURL,
+ &szMultiPathURL, &szTitle,
+ &szSubtitleForMultiPath,
+ &nMultiPathPosition,
+ &nMultiPathDuration, &bIsSameAP,
+ pPlayView->pMultiPathList);
if (szSubtitleForMultiPath) {
if (strlen(szSubtitleForMultiPath) > 0) {
if (vp_file_exists(szSubtitleForMultiPath)) {
pNormalView->bIsExistSubtitle = TRUE;
- VideoSecureLogInfo("SUBTITLE : %s", szSubtitleForMultiPath);
- vp_mm_player_set_subtitle_url(pNormalView->pPlayerHandle, szSubtitleForMultiPath);
+ VideoSecureLogInfo("SUBTITLE : %s",
+ szSubtitleForMultiPath);
+ vp_mm_player_set_subtitle_url(pNormalView->
+ pPlayerHandle,
+ szSubtitleForMultiPath);
VP_FREE(pNormalView->szSubtitleURL);
} else {
- pNormalView->pPopup = vp_popup_create(pPlayView->pWin,
- POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
- VP_PLAY_STRING_COM_ERROR,
- VP_PLAY_STRING_ERROR_SUBTITLE_FAIL,
- 3.0, __vp_normal_error_popup_time_out_cb,
- __vp_normal_error_popup_key_event_cb,
- __vp_normal_error_popup_mouse_event_cb,
- pNormalView);
+ pNormalView->pPopup =
+ vp_popup_create(pPlayView->pWin,
+ POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
+ VP_PLAY_STRING_COM_ERROR,
+ VP_PLAY_STRING_ERROR_SUBTITLE_FAIL,
+ 3.0,
+ __vp_normal_error_popup_time_out_cb,
+ __vp_normal_error_popup_key_event_cb,
+ __vp_normal_error_popup_mouse_event_cb,
+ pNormalView);
evas_object_show(pNormalView->pPopup);
pNormalView->bIsPopupShow = TRUE;
- _vp_play_normal_view_release_service_share(pNormalView->pPlayView);
+ _vp_play_normal_view_release_service_share
+ (pNormalView->pPlayView);
}
}
}
if (!szTitle) {
- szTitle = vp_play_util_get_title_from_path(pNormalView->szMediaURL);
+ szTitle =
+ vp_play_util_get_title_from_path(pNormalView->
+ szMediaURL);
}
if (szTitle) {
elm_object_item_text_set(pNormalView->pNaviItem, szTitle);
} else {
- elm_object_item_text_set(pNormalView->pNaviItem, VP_PLAY_STRING_NO_TITLE);
+ elm_object_item_text_set(pNormalView->pNaviItem,
+ VP_PLAY_STRING_NO_TITLE);
}
if (pNormalView->nStartPosition == 0) {
VP_FREE(szSubtitleForMultiPath);
VP_FREE(szTitle);
- if (!vp_mm_player_realize_async(pNormalView->pPlayerHandle, pNormalView->szMediaURL)) {
+ if (!vp_mm_player_realize_async
+ (pNormalView->pPlayerHandle, pNormalView->szMediaURL)) {
VideoLogError("vp_mm_player_realize_async fail");
Evas_Object *pPopup = NULL;
pPopup = vp_popup_create(pPlayView->pWin,
- POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
- VP_PLAY_STRING_COM_ERROR,
- VP_PLAY_STRING_ERROR_UNABLE_PLAY,
- 3.0, __vp_normal_prepare_error_popup_time_out_cb,
- NULL, NULL, pNormalView);
+ POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
+ VP_PLAY_STRING_COM_ERROR,
+ VP_PLAY_STRING_ERROR_UNABLE_PLAY,
+ 3.0,
+ __vp_normal_prepare_error_popup_time_out_cb,
+ NULL, NULL, pNormalView);
evas_object_show(pPopup);
}
}
}
- //_vp_play_normal_view_show_layout(pNormalView);
- vp_play_util_set_lock_power_key();
+
+ if (!pNormalView->bAudioOnly) {
+ vp_play_util_set_lock_power_key();
+ }
VideoLogWarning("<<");
}
-static void _vp_play_normal_view_on_next_play(NormalView *pNormalView, bool bManual)
+static void _vp_play_normal_view_on_next_play(NormalView * pNormalView,
+ bool bManual)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
}
if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MESSAGE ||
- pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_EMAIL ||
- pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_PREVIEW) {
+ pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_EMAIL ||
+ pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_PREVIEW) {
return;
}
pNormalView->nStartPosition = 0;
pNormalView->nDefaultAudioTrackIndex = 0;
pNormalView->nSpeedValue = 1;
+ pNormalView->fPlaySpeed = 1.0;
+
+ VP_FREE(pNormalView->szSubtitleURL);
+ vp_mm_player_set_subtitle_url(pNormalView->pPlayerHandle, "");
_vp_play_normal_view_on_bookmark_mode(pNormalView, FALSE);
char *szSubtitle = NULL;
int nPosition = 0;
int nDuration = 0;
- vp_multi_path_get_next_item(pNormalView->szMediaURL, &szNextURL, &szSubtitle, &nPosition, &nDuration, TRUE, pPlayView->pMultiPathList);
+ vp_multi_path_get_next_item(pNormalView->szMediaURL,
+ &szNextURL, &szSubtitle,
+ &nPosition, &nDuration, TRUE,
+ pPlayView->pMultiPathList);
VP_FREE(szSubtitle);
if (szNextURL) {
VP_FREE(pNormalView->szMediaURL);
bIsExit = TRUE;
} else if (pNormalView->nRepeatMode == VIDEO_PLAY_REPEAT_OFF) {
bIsExit = TRUE;
- } else if (pNormalView->nRepeatMode == VIDEO_PLAY_REPEAT_ALL_STOP) {
+ } else if (pNormalView->nRepeatMode ==
+ VIDEO_PLAY_REPEAT_ALL_STOP) {
char *szNextURL = NULL;
char *szSubtitle = NULL;
int nPosition = 0;
int nDuration = 0;
- vp_multi_path_get_next_item(pNormalView->szMediaURL, &szNextURL, &szSubtitle, &nPosition, &nDuration, FALSE, pPlayView->pMultiPathList);
+ vp_multi_path_get_next_item(pNormalView->szMediaURL,
+ &szNextURL, &szSubtitle,
+ &nPosition, &nDuration, FALSE,
+ pPlayView->pMultiPathList);
VP_FREE(szSubtitle);
char *szSubtitle = NULL;
int nPosition = 0;
int nDuration = 0;
- vp_multi_path_get_next_item(pNormalView->szMediaURL, &szNextURL, &szSubtitle, &nPosition, &nDuration, TRUE, pPlayView->pMultiPathList);
+ vp_multi_path_get_next_item(pNormalView->szMediaURL,
+ &szNextURL, &szSubtitle,
+ &nPosition, &nDuration, TRUE,
+ pPlayView->pMultiPathList);
VP_FREE(szSubtitle);
if (!szNextURL) {
bIsExit = TRUE;
if (bManual) {
_vp_play_normal_view_set_played_time(pNormalView);
char *szNextURL = NULL;
- vp_media_contents_get_next_file_path(pNormalView->szMediaURL, &szNextURL, TRUE, pNormalView->pMediaItemList);
+ vp_media_contents_get_next_file_path(pNormalView->szMediaURL,
+ &szNextURL, TRUE,
+ pNormalView->
+ pMediaItemList);
- VideoSecureLogInfo("pNormalView->szMediaURL is %s", pNormalView->szMediaURL);
+ VideoSecureLogInfo("pNormalView->szMediaURL is %s",
+ pNormalView->szMediaURL);
if (szNextURL) {
VP_FREE(pNormalView->szMediaURL);
VP_STRDUP(pNormalView->szMediaURL, szNextURL);
VP_FREE(szNextURL);
_vp_play_normal_view_play_start(pNormalView, TRUE);
vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE;
- if (!vp_mm_player_get_state(pNormalView->pPlayerHandle, &nState)) {
+ if (!vp_mm_player_get_state
+ (pNormalView->pPlayerHandle, &nState)) {
VideoLogWarning("vp_mm_player_get_state is fail");
}
- if (nState != VP_MM_PLAYER_STATE_PLAYING) {
+ if (!stay_pause && nState != VP_MM_PLAYER_STATE_PLAYING) {
vp_mm_player_play(pNormalView->pPlayerHandle);
pNormalView->bManualPause = FALSE;
- if (pPlayView->win_minicon) {
- vp_minicontroller_update_control(pPlayView);
- }
- if (pPlayView->win_lockmini) {
- vp_lockscreenmini_update_control(pPlayView);
- }
}
+
+ if (stay_pause) {
+ VideoLogDebug
+ ("Some other application requested Video Player to remain in Paused state");
+ stay_pause = false;
+ }
+
+ if (pPlayView->win_minicon) {
+ vp_minicontroller_update_control(pPlayView);
+ }
+ if (pPlayView->win_lockmini) {
+ vp_lockscreenmini_update_control(pPlayView);
+ }
+
_vp_play_normal_view_set_play_state(pNormalView);
_vp_play_normal_view_on_capture_mode(pNormalView);
} else {
bIsExit = TRUE;
} else if (pNormalView->nRepeatMode == VIDEO_PLAY_REPEAT_ALL_STOP) {
char *szNextURL = NULL;
- vp_media_contents_get_next_file_path(pNormalView->szMediaURL, &szNextURL, FALSE, pNormalView->pMediaItemList);
+ vp_media_contents_get_next_file_path(pNormalView->szMediaURL,
+ &szNextURL, FALSE,
+ pNormalView->
+ pMediaItemList);
if (!szNextURL) {
bIsExit = TRUE;
} else {
_vp_play_normal_view_play_start(pNormalView, TRUE);
} else if (pNormalView->nRepeatMode == VIDEO_PLAY_REPEAT_ALL) {
char *szNextURL = NULL;
- vp_media_contents_get_next_file_path(pNormalView->szMediaURL, &szNextURL, TRUE, pNormalView->pMediaItemList);
+ vp_media_contents_get_next_file_path(pNormalView->szMediaURL,
+ &szNextURL, TRUE,
+ pNormalView->
+ pMediaItemList);
if (!szNextURL) {
bIsExit = TRUE;
} else {
}
}
-static void _vp_play_normal_view_on_prev_play(NormalView *pNormalView, bool bManual, bool bVoice)
+static void _vp_play_normal_view_on_prev_play(NormalView * pNormalView,
+ bool bManual, bool bVoice)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
pNormalView->nDefaultAudioTrackIndex = 0;
pNormalView->nSpeedValue = 1;
+ pNormalView->fPlaySpeed = 1.0;
+
+ VP_FREE(pNormalView->szSubtitleURL);
+ vp_mm_player_set_subtitle_url(pNormalView->pPlayerHandle, "");
if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_WEB) {
_vp_play_normal_view_play_start(pNormalView, FALSE);
vp_mm_player_set_position(pNormalView->pPlayerHandle, 0);
if (pNormalView->bManualPause) {
- vp_play_progressbar_set_position(pNormalView->pProgressbar, 0);
+ vp_play_progressbar_set_position(pNormalView->pProgressbar,
+ 0);
}
return;
}
}
if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MESSAGE ||
- pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_EMAIL ||
- pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_PREVIEW ||
- (pPlayView && (strstr(pPlayView->szMediaURL, "/.") != NULL))) {
+ pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_EMAIL ||
+ pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_PREVIEW ||
+ (pPlayView && (strstr(pPlayView->szMediaURL, "/.") != NULL))) {
return;
}
char *szSubtitle = NULL;
int nPosition = 0;
int nDuration = 0;
- vp_multi_path_get_next_item(pNormalView->szMediaURL, &szPrevURL, &szSubtitle, &nPosition, &nDuration, TRUE, pPlayView->pMultiPathList);
+ vp_multi_path_get_next_item(pNormalView->szMediaURL,
+ &szPrevURL, &szSubtitle,
+ &nPosition, &nDuration, TRUE,
+ pPlayView->pMultiPathList);
VP_FREE(szSubtitle);
if (szPrevURL) {
}
} else {
- vp_media_contents_get_prev_file_path(pNormalView->szMediaURL, &szPrevURL, TRUE, pNormalView->pMediaItemList);
- VideoSecureLogInfo("pNormalView->szMediaURL pre is %s", pNormalView->szMediaURL);
+ vp_media_contents_get_prev_file_path(pNormalView->szMediaURL,
+ &szPrevURL, TRUE,
+ pNormalView->pMediaItemList);
+ VideoSecureLogInfo("pNormalView->szMediaURL pre is %s",
+ pNormalView->szMediaURL);
if (szPrevURL) {
VP_FREE(pNormalView->szMediaURL);
VP_STRDUP(pNormalView->szMediaURL, szPrevURL);
if (!vp_mm_player_get_state(pNormalView->pPlayerHandle, &nState)) {
VideoLogWarning("vp_mm_player_get_state is fail");
}
- if (nState != VP_MM_PLAYER_STATE_PLAYING) {
+ if (!stay_pause && nState != VP_MM_PLAYER_STATE_PLAYING) {
vp_mm_player_play(pNormalView->pPlayerHandle);
pNormalView->bManualPause = FALSE;
- if (pPlayView->win_minicon) {
- vp_minicontroller_update_control(pPlayView);
- }
- if (pPlayView->win_lockmini) {
- vp_lockscreenmini_update_control(pPlayView);
- }
}
+
+ if (stay_pause) {
+ VideoLogDebug
+ ("Some other application requested Video Player to remain in Paused state");
+ stay_pause = false;
+ }
+
+ if (pPlayView->win_minicon) {
+ vp_minicontroller_update_control(pPlayView);
+ }
+ if (pPlayView->win_lockmini) {
+ vp_lockscreenmini_update_control(pPlayView);
+ }
+
_vp_play_normal_view_set_play_state(pNormalView);
_vp_play_normal_view_on_capture_mode(pNormalView);
}
}
-static void _vp_play_normal_view_set_played_time(NormalView *pNormalView)
+static void _vp_play_normal_view_set_played_time(NormalView * pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
return;
}
- //PlayView *pPlayView = pNormalView->pPlayView;
int nPosition = 0;
if (pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_WEB &&
- pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_PREVIEW &&
- pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MESSAGE &&
- pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_EMAIL &&
- pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MULTI_PATH) {
- if (!vp_mm_player_get_position(pNormalView->pPlayerHandle, &nPosition)) {
+ pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_PREVIEW &&
+ pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MESSAGE &&
+ pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_EMAIL &&
+ pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MULTI_PATH) {
+ if (!vp_mm_player_get_position
+ (pNormalView->pPlayerHandle, &nPosition)) {
VideoLogError("vp_mm_player_get_position is fail");
} else {
if (nPosition == pNormalView->nDuration) {
- vp_media_contents_set_played_position(pNormalView->szMediaURL, 0);
+ vp_media_contents_set_played_position(pNormalView->
+ szMediaURL, 0);
} else {
vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE;
- if (!vp_mm_player_get_state(pNormalView->pPlayerHandle, &nState)) {
+ if (!vp_mm_player_get_state
+ (pNormalView->pPlayerHandle, &nState)) {
VideoLogWarning("vp_mm_player_get_state is fail");
}
if (nPosition < 0) {
nPosition = 0;
}
- vp_media_contents_set_played_position(pNormalView->szMediaURL, nPosition);
+ vp_media_contents_set_played_position(pNormalView->
+ szMediaURL,
+ nPosition);
}
}
} else if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MULTI_PATH) {
- if (!vp_mm_player_get_position(pNormalView->pPlayerHandle, &nPosition)) {
+ if (!vp_mm_player_get_position
+ (pNormalView->pPlayerHandle, &nPosition)) {
VideoLogError("vp_mm_player_get_position is fail");
} else {
PlayView *pPlayView = pNormalView->pPlayView;
if (nPosition >= pNormalView->nDuration) {
nPosition = 0;
}
- vp_multi_path_set_item_position(pNormalView->szMediaURL, nPosition, pPlayView->pMultiPathList);
+ vp_multi_path_set_item_position(pNormalView->szMediaURL,
+ nPosition,
+ pPlayView->pMultiPathList);
}
}
if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_LIST ||
- pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_OTHER) {
+ pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_OTHER) {
bool bIsCloud = FALSE;
- vp_media_contents_get_cloud_attribute(pNormalView->szMediaURL, &bIsCloud);
+ vp_media_contents_get_cloud_attribute(pNormalView->szMediaURL,
+ &bIsCloud);
if (!bIsCloud) {
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
}
if (pPlayView->bViewChange == FALSE) {
if (vp_file_exists(pNormalView->szMediaURL)) {
- vp_play_config_set_preview_url_videos(pNormalView->szMediaURL);
+ vp_play_config_set_preview_url_videos(pNormalView->
+ szMediaURL);
} else {
- _vp_play_normal_view_release_service_share(pNormalView->pPlayView);
+ _vp_play_normal_view_release_service_share
+ (pNormalView->pPlayView);
}
}
- vp_play_preference_set_preview_audio_track(pNormalView->nDefaultAudioTrackIndex);
+ vp_play_preference_set_preview_audio_track(pNormalView->
+ nDefaultAudioTrackIndex);
}
}
}
-/*
-static void _vp_play_normal_view_screen_capture(NormalView *pNormalView)
-{
- if (!pNormalView) {
- VideoLogError("pNormalView is NULL");
- return;
- }
-
- vp_mm_player_get_position(pNormalView->pPlayerHandle, &(pNormalView->nCapturePosition));
-
- if (pNormalView->bCaptureComplete == FALSE) {
- VideoLogWarning("Not Complete capture");
- return;
- }
-
- pNormalView->bCaptureComplete = FALSE;
- pNormalView->bCaptureBookmark = FALSE;
-
- if (!vp_mm_player_capture_start(pNormalView->pPlayerHandle)) {
- pNormalView->bCaptureComplete = TRUE;
- VideoLogError("vp_mm_player_capture_start fail");
- }
-
-}
-*/
-static void _vp_play_normal_view_screen_move(NormalView *pNormalView, bool bFoward)
+static void _vp_play_normal_view_screen_move(NormalView * pNormalView,
+ bool bFoward)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
int nSetPosition = 0;
int nCurPosition = 0;
- if (!vp_mm_player_get_position(pNormalView->pPlayerHandle, &nCurPosition)) {
+ if (!vp_mm_player_get_position
+ (pNormalView->pPlayerHandle, &nCurPosition)) {
VideoLogError("vp_mm_player_get_position is fail");
return;
}
if (bFoward) {
- nSetPosition = nCurPosition + 1000;
+ nSetPosition = nCurPosition + 1000;
} else {
- nSetPosition = nCurPosition - 1000;
+ nSetPosition = nCurPosition - 1000;
}
if (pNormalView->nDuration < nSetPosition) {
nSetPosition = 0;
}
- if (vp_mm_player_set_position(pNormalView->pPlayerHandle, nSetPosition)) {
+ if (vp_mm_player_set_position
+ (pNormalView->pPlayerHandle, nSetPosition)) {
pNormalView->nWaitPos = -1;
pNormalView->bSeekComplete = FALSE;
- vp_play_progressbar_set_position(pNormalView->pProgressbar, nSetPosition);
+ vp_play_progressbar_set_position(pNormalView->pProgressbar,
+ nSetPosition);
}
}
#ifdef ENABLE_GESTURE_ZOOM_FEATURE
-static void _vp_play_normal_view_on_zoom_mode(NormalView *pNormalView)
+static void _vp_play_normal_view_on_zoom_mode(NormalView * pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
VP_EVAS_JOB_DEL(pNormalView->pVolumeJob);
VP_EVAS_JOB_DEL(pNormalView->pBrightnessJob);
- if (!vp_play_brightness_unrealize(pNormalView->pBrightnessHandle)) {
+ if (!vp_play_brightness_unrealize
+ (pNormalView->pBrightnessHandle)) {
VideoLogWarning("vp_play_brightness_unrealize is fail");
}
- if (!vp_play_volume_popup_unrealize(pNormalView->pVolumePopupHandle)) {
+ if (!vp_play_volume_popup_unrealize
+ (pNormalView->pVolumePopupHandle)) {
VideoLogWarning("vp_play_volume_popup_unrealize is fail");
}
- pNormalView->pZoomGuide = vp_zoom_guide_create(pNormalView->pMainLayout);
+ pNormalView->pZoomGuide =
+ vp_zoom_guide_create(pNormalView->pMainLayout);
vp_zoom_guide_realize(pNormalView->pZoomGuide);
- Evas_Object *pZoomGuideLayout = vp_zoom_guide_get_object(pNormalView->pZoomGuide);
+ Evas_Object *pZoomGuideLayout =
+ vp_zoom_guide_get_object(pNormalView->pZoomGuide);
if (pZoomGuideLayout) {
- elm_object_part_content_set(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_ZOOM_GUIDE, pZoomGuideLayout);
+ elm_object_part_content_set(pNormalView->pMainLayout,
+ VP_PLAY_SWALLOW_NORMAL_ZOOM_GUIDE,
+ pZoomGuideLayout);
} else {
VideoLogError("pZoomGuideLayout is NULL");
}
- Evas_Coord_Rectangle rtSrc = {0,};
- Evas_Coord_Rectangle rtDst = {0,};
- Evas_Coord_Rectangle rtResult = {0,};
+ Evas_Coord_Rectangle rtSrc = { 0, };
+ Evas_Coord_Rectangle rtDst = { 0, };
+ Evas_Coord_Rectangle rtResult = { 0, };
int nWidth = 0;
int nHeight = 0;
- elm_win_screen_size_get(pNormalView->pPlayView->pWin, NULL, NULL, &nWidth, &nHeight);
+ elm_win_screen_size_get(pNormalView->pPlayView->pWin, NULL,
+ NULL, &nWidth, &nHeight);
- if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_90 || pNormalView->nRotate == VIDEO_PLAY_ROTATE_270) {
+ if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_90
+ || pNormalView->nRotate == VIDEO_PLAY_ROTATE_270) {
rtDst.w = nHeight;
rtDst.h = nWidth;
} else {
rtDst.w = nWidth;
rtDst.h = nHeight;
}
- vp_mm_player_get_resolution(pNormalView->pPlayerHandle, &(rtSrc.w), &(rtSrc.h));
- vp_play_util_calculator_position(rtSrc, rtDst, &rtResult, pNormalView->nDisplayMode);
- vp_zoom_guide_set_move_position(pNormalView->pZoomGuide, (double)pNormalView->nZoomPosX / rtDst.w, (double)pNormalView->nZoomPosY / rtDst.h);
+ vp_mm_player_get_resolution(pNormalView->pPlayerHandle,
+ &(rtSrc.w), &(rtSrc.h));
+ vp_play_util_calculator_position(rtSrc, rtDst, &rtResult,
+ pNormalView->nDisplayMode);
+ vp_zoom_guide_set_move_position(pNormalView->pZoomGuide,
+ (double) pNormalView->
+ nZoomPosX / rtDst.w,
+ (double) pNormalView->
+ nZoomPosY / rtDst.h);
float fPosX = pNormalView->nZoomPosX / rtResult.w;
float fPosY = pNormalView->nZoomPosY / rtResult.h;
if (fPosX > 1.0) {
}
// event filtering
bool bLandscape = FALSE;
- if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_90 || pNormalView->nRotate == VIDEO_PLAY_ROTATE_270) {
+ if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_90
+ || pNormalView->nRotate == VIDEO_PLAY_ROTATE_270) {
bLandscape = TRUE;
}
- if (bLandscape && fabs(pNormalView->fPrevZoomValue - pNormalView->fZoomValue) < 0.05) {
-// VideoLogWarning("same ZoomValue. skip it");
+ if (bLandscape
+ && fabs(pNormalView->fPrevZoomValue -
+ pNormalView->fZoomValue) < 0.05) {
return;
}
- vp_zoom_guide_set_zoom_value(pNormalView->pZoomGuide, pNormalView->fZoomValue);
+ vp_zoom_guide_set_zoom_value(pNormalView->pZoomGuide,
+ pNormalView->fZoomValue);
pNormalView->fPrevZoomValue = pNormalView->fZoomValue;
} else {
pNormalView->fZoomValue = 1.0;
pNormalView->bZoomEnable = FALSE;
- vp_zoom_guide_set_zoom_value(pNormalView->pZoomGuide, pNormalView->fZoomValue);
- elm_object_part_content_unset(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_ZOOM_GUIDE);
+ vp_zoom_guide_set_zoom_value(pNormalView->pZoomGuide,
+ pNormalView->fZoomValue);
+ elm_object_part_content_unset(pNormalView->pMainLayout,
+ VP_PLAY_SWALLOW_NORMAL_ZOOM_GUIDE);
- //VideoLogError("ZoomValue : [%f], offset_x : [%d], offset_y : [%d]", pNormalView->fZoomValue, 0, 0);
- vp_mm_player_set_zoom(pNormalView->pPlayerHandle, pNormalView->fZoomValue, 0, 0);
+ vp_mm_player_set_zoom(pNormalView->pPlayerHandle,
+ pNormalView->fZoomValue, 0, 0);
vp_zoom_guide_destroy(pNormalView->pZoomGuide);
pNormalView->pZoomGuide = NULL;
#endif
-static void _vp_play_normal_view_on_capture_mode(NormalView *pNormalView)
+static void _vp_play_normal_view_on_capture_mode(NormalView * pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
}
vp_play_preference_get_capture_on_key(&pNormalView->bCaptureMode);
- elm_object_part_content_unset(pParent, VP_PLAY_SWALLOW_NORMAL_TOP_CAPTURE);
- elm_object_part_content_unset(pParent, VP_PLAY_SWALLOW_NORMAL_TOP_CAPTURE_REW);
- elm_object_part_content_unset(pParent, VP_PLAY_SWALLOW_NORMAL_TOP_CAPTURE_FF);
+ elm_object_part_content_unset(pParent,
+ VP_PLAY_SWALLOW_NORMAL_TOP_CAPTURE);
+ elm_object_part_content_unset(pParent,
+ VP_PLAY_SWALLOW_NORMAL_TOP_CAPTURE_REW);
+ elm_object_part_content_unset(pParent,
+ VP_PLAY_SWALLOW_NORMAL_TOP_CAPTURE_FF);
VP_EVAS_DEL(pNormalView->pCaptureBtn);
VP_EVAS_DEL(pNormalView->pCaptureRewBtn);
VP_EVAS_DEL(pNormalView->pCaptureFFBtn);
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_RESROUCE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_RESROUCE_EDJ_PATH);
free(path);
if (!pNormalView->szMediaURL) {
return;
}
if (pNormalView->bCaptureMode) {
- pNormalView->pCaptureBtn = vp_button_create(
- pNormalView->pNaviFrame, "custom/flat_63_63/default",
- NULL,
- (Evas_Smart_Cb)__vp_normal_control_btn_clicked_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_press_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_unpress_cb,
- (void *)pNormalView);
+ pNormalView->pCaptureBtn =
+ vp_button_create(pNormalView->pNaviFrame,
+ "custom/flat_63_63/default", NULL,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_clicked_cb,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_press_cb,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_unpress_cb,
+ (void *) pNormalView);
Evas_Object *pIcon = NULL;
- pIcon = vp_button_create_icon(pNormalView->pCaptureBtn, edj_path, VP_PLAY_NORMAL_RES_CAPTURE);
- elm_object_part_content_set(pNormalView->pCaptureBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pCaptureBtn, edj_path, VP_PLAY_NORMAL_RES_CAPTURE_PRESS);
- elm_object_part_content_set(pNormalView->pCaptureBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pCaptureBtn, edj_path, VP_PLAY_NORMAL_RES_CAPTURE_DIM);
- elm_object_part_content_set(pNormalView->pCaptureBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
-
- elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_TOP_CAPTURE, pNormalView->pCaptureBtn);
+ pIcon =
+ vp_button_create_icon(pNormalView->pCaptureBtn, edj_path,
+ VP_PLAY_NORMAL_RES_CAPTURE);
+ elm_object_part_content_set(pNormalView->pCaptureBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pCaptureBtn, edj_path,
+ VP_PLAY_NORMAL_RES_CAPTURE_PRESS);
+ elm_object_part_content_set(pNormalView->pCaptureBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON,
+ pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pCaptureBtn, edj_path,
+ VP_PLAY_NORMAL_RES_CAPTURE_DIM);
+ elm_object_part_content_set(pNormalView->pCaptureBtn,
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON,
+ pIcon);
+
+ elm_object_part_content_set(pParent,
+ VP_PLAY_SWALLOW_NORMAL_TOP_CAPTURE,
+ pNormalView->pCaptureBtn);
evas_object_show(pNormalView->pCaptureBtn);
VideoLogWarning("vp_mm_player_get_state is fail");
}
if (nState == VP_MM_PLAYER_STATE_PAUSED ||
- (nState != VP_MM_PLAYER_STATE_PLAYING && pNormalView->bManualPause)) {
- pNormalView->pCaptureRewBtn = vp_button_create(
- pNormalView->pNaviFrame, "custom/flat_63_63/default",
- NULL,
- (Evas_Smart_Cb)__vp_normal_control_btn_clicked_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_press_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_unpress_cb,
- (void *)pNormalView);
-
- pNormalView->pCaptureFFBtn = vp_button_create(
- pNormalView->pNaviFrame, "custom/flat_63_63/default",
- NULL,
- (Evas_Smart_Cb)__vp_normal_control_btn_clicked_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_press_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_unpress_cb,
- (void *)pNormalView);
-
- pIcon = vp_button_create_icon(pNormalView->pCaptureRewBtn, edj_path, VP_PLAY_NORMAL_RES_CAPTURE_REW);
- elm_object_part_content_set(pNormalView->pCaptureRewBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pCaptureRewBtn, edj_path, VP_PLAY_NORMAL_RES_CAPTURE_REW_PRESS);
- elm_object_part_content_set(pNormalView->pCaptureRewBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pCaptureRewBtn, edj_path, VP_PLAY_NORMAL_RES_CAPTURE_REW_DIM);
- elm_object_part_content_set(pNormalView->pCaptureRewBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
-
-
- pIcon = vp_button_create_icon(pNormalView->pCaptureFFBtn, edj_path, VP_PLAY_NORMAL_RES_CAPTURE_FF);
- elm_object_part_content_set(pNormalView->pCaptureFFBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pCaptureFFBtn, edj_path, VP_PLAY_NORMAL_RES_CAPTURE_FF_PRESS);
- elm_object_part_content_set(pNormalView->pCaptureFFBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pCaptureFFBtn, edj_path, VP_PLAY_NORMAL_RES_CAPTURE_FF_DIM);
- elm_object_part_content_set(pNormalView->pCaptureFFBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
-
- elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_TOP_CAPTURE_REW, pNormalView->pCaptureRewBtn);
- elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_TOP_CAPTURE_FF, pNormalView->pCaptureFFBtn);
+ (nState != VP_MM_PLAYER_STATE_PLAYING
+ && pNormalView->bManualPause)) {
+ pNormalView->pCaptureRewBtn =
+ vp_button_create(pNormalView->pNaviFrame,
+ "custom/flat_63_63/default", NULL,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_clicked_cb,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_press_cb,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_unpress_cb,
+ (void *) pNormalView);
+
+ pNormalView->pCaptureFFBtn =
+ vp_button_create(pNormalView->pNaviFrame,
+ "custom/flat_63_63/default", NULL,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_clicked_cb,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_press_cb,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_unpress_cb,
+ (void *) pNormalView);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pCaptureRewBtn,
+ edj_path,
+ VP_PLAY_NORMAL_RES_CAPTURE_REW);
+ elm_object_part_content_set(pNormalView->pCaptureRewBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON,
+ pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pCaptureRewBtn,
+ edj_path,
+ VP_PLAY_NORMAL_RES_CAPTURE_REW_PRESS);
+ elm_object_part_content_set(pNormalView->pCaptureRewBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON,
+ pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pCaptureRewBtn,
+ edj_path,
+ VP_PLAY_NORMAL_RES_CAPTURE_REW_DIM);
+ elm_object_part_content_set(pNormalView->pCaptureRewBtn,
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON,
+ pIcon);
+
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pCaptureFFBtn, edj_path,
+ VP_PLAY_NORMAL_RES_CAPTURE_FF);
+ elm_object_part_content_set(pNormalView->pCaptureFFBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON,
+ pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pCaptureFFBtn, edj_path,
+ VP_PLAY_NORMAL_RES_CAPTURE_FF_PRESS);
+ elm_object_part_content_set(pNormalView->pCaptureFFBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON,
+ pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pCaptureFFBtn, edj_path,
+ VP_PLAY_NORMAL_RES_CAPTURE_FF_DIM);
+ elm_object_part_content_set(pNormalView->pCaptureFFBtn,
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON,
+ pIcon);
+
+ elm_object_part_content_set(pParent,
+ VP_PLAY_SWALLOW_NORMAL_TOP_CAPTURE_REW,
+ pNormalView->pCaptureRewBtn);
+ elm_object_part_content_set(pParent,
+ VP_PLAY_SWALLOW_NORMAL_TOP_CAPTURE_FF,
+ pNormalView->pCaptureFFBtn);
evas_object_show(pNormalView->pCaptureRewBtn);
evas_object_show(pNormalView->pCaptureFFBtn);
}
}
-static void _vp_play_normal_view_on_share_popup(NormalView *pNormalView)
+static void _vp_play_normal_view_on_share_popup(NormalView * pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
VideoLogWarning("vp_mm_player_get_state is fail");
}
pPlayView->bIsSharePopup = TRUE;
- if(nState != VP_MM_PLAYER_STATE_PLAYING)
- {
+ if (nState != VP_MM_PLAYER_STATE_PLAYING) {
pPlayView->bIsPlayBeforeShare = false;
- }
- else
- {
+ } else {
pPlayView->bIsPlayBeforeShare = true;
}
pNormalView->pPopup = NULL;
pNormalView->pPopup = vp_popup_create(pPlayView->pWin,
- POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
- VP_PLAY_STRING_COM_ERROR,
- VP_PLAY_STRING_DRM_UNABLE_TO_SHARE_DRM_FILE,
- 3.0, __vp_normal_popup_time_out_cb,
- NULL, NULL, pNormalView);
+ POPUP_STYLE_DEFAULT_NO_CANCEL_BTN,
+ VP_PLAY_STRING_COM_ERROR,
+ VP_PLAY_STRING_DRM_UNABLE_TO_SHARE_DRM_FILE,
+ 3.0,
+ __vp_normal_popup_time_out_cb,
+ NULL, NULL, pNormalView);
evas_object_show(pNormalView->pPopup);
pNormalView->bIsPopupShow = TRUE;
pNormalView->bSharePanelPause = FALSE;
pNormalView->bSharePanelFocusIn = FALSE;
- VideoLogInfo("share popup: bSharePanelPause = %d", pNormalView->bManualPause);
+ VideoLogInfo("share popup: bSharePanelPause = %d",
+ pNormalView->bManualPause);
if (!pNormalView->bManualPause) {
pNormalView->bSharePanelPause = TRUE;
- //pNormalView->bManualPause = TRUE;
}
- if (vp_play_app_launch_share_panel(pPlayView->pWin, pNormalView->szMediaURL, &pPlayView->pServiceShare, (void *)pNormalView)) {
+ if (vp_play_app_launch_share_panel
+ (pPlayView->pWin, pNormalView->szMediaURL,
+ &pPlayView->pServiceShare, (void *) pNormalView)) {
pNormalView->bSharepopup = TRUE;
} else {
}
-static void _vp_play_normal_view_on_sound_alive_popup(NormalView *pNormalView)
+static void _vp_play_normal_view_on_sound_alive_popup(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
VideoLogWarning("vp_mm_player_get_state is fail");
}
- if (pNormalView->bVideoOnlyMode == FALSE && nState == VP_MM_PLAYER_STATE_PLAYING) {
+ if (pNormalView->bVideoOnlyMode == FALSE
+ && nState == VP_MM_PLAYER_STATE_PLAYING) {
if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
VideoLogError("Pause Fail");
}
}
pNormalView->pSAHandle = vp_sound_alive_create(pPlayView->pWin,
- pNormalView->szMediaURL,
- __vp_normal_sound_alive_popup_close_cb,
- pNormalView->nSoundAlive);
+ pNormalView->szMediaURL,
+ __vp_normal_sound_alive_popup_close_cb,
+ pNormalView->
+ nSoundAlive);
if (!pNormalView->pSAHandle) {
VideoLogError("vp_sound_alive_create fail");
return;
}
- if (!vp_sound_alive_set_user_data(pNormalView->pSAHandle, (void *)pNormalView)) {
+ if (!vp_sound_alive_set_user_data
+ (pNormalView->pSAHandle, (void *) pNormalView)) {
VideoLogWarning("vp_share_set_user_data is fail");
}
}
-static void _vp_play_normal_view_on_sound_path_popup(NormalView *pNormalView)
+static void _vp_play_normal_view_on_sound_path_popup(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
VideoLogWarning("vp_mm_player_get_state is fail");
}
- if (pNormalView->bVideoOnlyMode == FALSE && nState == VP_MM_PLAYER_STATE_PLAYING) {
+ if (pNormalView->bVideoOnlyMode == FALSE
+ && nState == VP_MM_PLAYER_STATE_PLAYING) {
if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
VideoLogError("Pause Fail");
}
}
pNormalView->pSoundPathHandle = vp_sound_path_create(pPlayView->pWin,
- __vp_normal_sound_path_popup_close_cb);
+ __vp_normal_sound_path_popup_close_cb);
if (!pNormalView->pSoundPathHandle) {
VideoLogError("vp_sound_path_create fail");
return;
}
- if (!vp_sound_path_set_user_data(pNormalView->pSoundPathHandle, (void *)pNormalView)) {
+ if (!vp_sound_path_set_user_data
+ (pNormalView->pSoundPathHandle, (void *) pNormalView)) {
VideoLogWarning("vp_sound_path_set_user_data is fail");
}
}
-static void _vp_play_normal_view_on_audio_track_popup(NormalView *pNormalView)
+static void _vp_play_normal_view_on_audio_track_popup(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
VideoLogWarning("vp_mm_player_get_state is fail");
}
- if (pNormalView->bVideoOnlyMode == FALSE && nState == VP_MM_PLAYER_STATE_PLAYING) {
+ if (pNormalView->bVideoOnlyMode == FALSE
+ && nState == VP_MM_PLAYER_STATE_PLAYING) {
if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
VideoLogError("Pause Fail");
}
pNormalView->pAudioTrackHandle = NULL;
pNormalView->pAudioTrackHandle = vp_audio_track_create(pPlayView->pWin,
- __vp_normal_audio_track_popup_close_cb,
- pNormalView->nDefaultAudioTrackIndex);
+ __vp_normal_audio_track_popup_close_cb,
+ pNormalView->
+ nDefaultAudioTrackIndex);
if (!pNormalView->pAudioTrackHandle) {
VideoLogError("vp_audio_track_create fail");
return;
}
- if (!vp_audio_track_set_user_data(pNormalView->pAudioTrackHandle, (void *)pNormalView)) {
+ if (!vp_audio_track_set_user_data
+ (pNormalView->pAudioTrackHandle, (void *) pNormalView)) {
VideoLogWarning("vp_audio_track_set_user_data is fail");
}
int nCount = 0;
- if (vp_mm_player_get_audio_track_count(pNormalView->pPlayerHandle, &nCount)) {
+ if (vp_mm_player_get_audio_track_count
+ (pNormalView->pPlayerHandle, &nCount)) {
if (nCount > 1) {
int nIdx = 0;
for (nIdx = 0; nIdx < nCount; nIdx++) {
char *szCode = NULL;
- if (vp_mm_player_get_audio_track_language_code(pNormalView->pPlayerHandle, nIdx, &szCode)) {
- vp_audio_track_add_Item(pNormalView->pAudioTrackHandle, szCode, nIdx);
+ if (vp_mm_player_get_audio_track_language_code
+ (pNormalView->pPlayerHandle, nIdx, &szCode)) {
+ vp_audio_track_add_Item(pNormalView->pAudioTrackHandle,
+ szCode, nIdx);
} else {
- vp_audio_track_add_Item(pNormalView->pAudioTrackHandle, VP_PLAY_STRING_COM_UNKNOWN, nIdx);
+ vp_audio_track_add_Item(pNormalView->pAudioTrackHandle,
+ VP_PLAY_STRING_COM_UNKNOWN,
+ nIdx);
}
VP_FREE(szCode);
}
} else {
- char *szTrack = g_strdup_printf("%s %d", VP_PLAY_STRING_AUDIO_TRACK, 0);
- vp_audio_track_add_Item(pNormalView->pAudioTrackHandle, szTrack, 0);
+ char *szTrack =
+ g_strdup_printf("%s %d", VP_PLAY_STRING_AUDIO_TRACK, 0);
+ vp_audio_track_add_Item(pNormalView->pAudioTrackHandle,
+ szTrack, 0);
VP_FREE(szTrack);
}
} else {
- char *szTrack = g_strdup_printf("%s %d", VP_PLAY_STRING_AUDIO_TRACK, 0);
- vp_audio_track_add_Item(pNormalView->pAudioTrackHandle, szTrack, 0);
+ char *szTrack =
+ g_strdup_printf("%s %d", VP_PLAY_STRING_AUDIO_TRACK, 0);
+ vp_audio_track_add_Item(pNormalView->pAudioTrackHandle, szTrack,
+ 0);
VP_FREE(szTrack);
}
}
-static void _vp_play_normal_view_on_subtitle_popup(NormalView *pNormalView)
+static void _vp_play_normal_view_on_subtitle_popup(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
return;
}
bool bIsClosedCaption = FALSE;
- bIsClosedCaption = vp_mm_player_is_closed_caption_exist(pNormalView->pPlayerHandle);
+ bIsClosedCaption =
+ vp_mm_player_is_closed_caption_exist(pNormalView->pPlayerHandle);
pSubtitleInfo->bClosedCaption = bIsClosedCaption;
pSubtitleInfo->fSync = pNormalView->fSubtitleSyncValue;
int nCount = 0;
char *szSubtitle = NULL;
- if (vp_mm_player_get_subtitle_track_count(pNormalView->pPlayerHandle, &nCount)) {
+ if (vp_mm_player_get_subtitle_track_count
+ (pNormalView->pPlayerHandle, &nCount)) {
if (nCount > 0) {
char *szCode = NULL;
#ifdef _SUBTITLE_MULTI_LANGUAGE
- if (pNormalView->pSelectedSubtitleLanguage && nCount == pNormalView->nSubtitleLanguageCount) {
+ if (pNormalView->pSelectedSubtitleLanguage
+ && nCount == pNormalView->nSubtitleLanguageCount) {
int index = 0;
VP_FREE(pSubtitleInfo->szLanguage);
for (; index < nCount; ++index) {
if (pNormalView->pSelectedSubtitleLanguage[index]) {
char *szName = NULL;
- vp_mm_player_get_subtitle_track_language_code(pNormalView->pPlayerHandle, index, &szCode);
+ vp_mm_player_get_subtitle_track_language_code
+ (pNormalView->pPlayerHandle, index, &szCode);
vp_subtitle_track_get_name(szCode, &szName);
if (!pSubtitleInfo->szLanguage) {
pSubtitleInfo->szLanguage = g_strdup(szName);
} else {
- char *szTmp = g_strdup(pSubtitleInfo->szLanguage);
+ char *szTmp =
+ g_strdup(pSubtitleInfo->szLanguage);
VP_FREE(pSubtitleInfo->szLanguage);
- pSubtitleInfo->szLanguage = g_strdup_printf("%s,%s", szTmp, szName);
+ pSubtitleInfo->szLanguage =
+ g_strdup_printf("%s,%s", szTmp, szName);
VP_FREE(szTmp);
}
VP_FREE(szName);
} else
#endif
{
- vp_mm_player_get_subtitle_track_language_code(pNormalView->pPlayerHandle, pNormalView->nDefaultSubtitleTrackIndex, &szCode);
- vp_subtitle_track_get_name(szCode, &(pSubtitleInfo->szLanguage));
+ vp_mm_player_get_subtitle_track_language_code(pNormalView->
+ pPlayerHandle,
+ pNormalView->
+ nDefaultSubtitleTrackIndex,
+ &szCode);
+ vp_subtitle_track_get_name(szCode,
+ &(pSubtitleInfo->szLanguage));
VP_FREE(szCode);
}
} else {
- pSubtitleInfo->szLanguage = g_strdup_printf("%s", VP_PLAY_STRING_COM_UNKNOWN);
+ pSubtitleInfo->szLanguage =
+ g_strdup_printf("%s", VP_PLAY_STRING_COM_UNKNOWN);
}
}
if (!pSubtitleInfo->szLanguage) {
- pSubtitleInfo->szLanguage = g_strdup_printf("%s", VP_PLAY_STRING_COM_UNKNOWN);
+ pSubtitleInfo->szLanguage =
+ g_strdup_printf("%s", VP_PLAY_STRING_COM_UNKNOWN);
}
- vp_play_preference_get_subtitle_font_name_key(&(pSubtitleInfo->szFontName));
+ vp_play_preference_get_subtitle_font_name_key(&
+ (pSubtitleInfo->
+ szFontName));
if (pSubtitleInfo->szFontName) {
if (strcmp(pSubtitleInfo->szFontName, "Tizen") == 0) {
VP_FREE(pSubtitleInfo->szFontName);
- pSubtitleInfo->szFontName = g_strdup_printf("%s", VP_PLAY_STRING_FONT_DEFAULT);
+ pSubtitleInfo->szFontName =
+ g_strdup_printf("%s", VP_PLAY_STRING_FONT_DEFAULT);
}
}
vp_play_preference_get_subtitle_size_key(&(pSubtitleInfo->nFontSize));
vp_play_preference_get_subtitle_edge_key(&(pSubtitleInfo->nEdge));
#ifndef SUBTITLE_K_FEATURE
- vp_play_preference_get_subtitle_font_color_key(&(pSubtitleInfo->nTextColor));
- vp_play_preference_get_subtitle_bg_color_key(&(pSubtitleInfo->nBGColor));
+ vp_play_preference_get_subtitle_font_color_key(&
+ (pSubtitleInfo->
+ nTextColor));
+ vp_play_preference_get_subtitle_bg_color_key(&
+ (pSubtitleInfo->
+ nBGColor));
#else
- vp_play_preference_get_subtitle_font_color_hex_key(&(pSubtitleInfo->pTextColorHex));
- vp_play_preference_get_subtitle_bg_color_hex_key(&(pSubtitleInfo->pBGColorHex));
- vp_play_preference_get_subtitle_caption_win_color_hex_key(&(pSubtitleInfo->pCaptionWinColorHex));
+ vp_play_preference_get_subtitle_font_color_hex_key(&
+ (pSubtitleInfo->
+ pTextColorHex));
+ vp_play_preference_get_subtitle_bg_color_hex_key(&
+ (pSubtitleInfo->
+ pBGColorHex));
+ vp_play_preference_get_subtitle_caption_win_color_hex_key(&
+ (pSubtitleInfo->
+ pCaptionWinColorHex));
int nAlignment = VIDEO_SUBTITLE_ALIGNMENT_CENTER;
vp_play_preference_get_subtitle_alignment_key(&nAlignment);
} else {
pSubtitleInfo->bSupportSelect = TRUE;
}
- vp_play_subtitle_get_text(pNormalView->pSubtitle, &pSubtitleInfo->szText);
- vp_play_subtitle_get_size_zoom(pNormalView->pSubtitle, &pSubtitleInfo->fZoom);
+ vp_play_subtitle_get_text(pNormalView->pSubtitle,
+ &pSubtitleInfo->szText);
+ vp_play_subtitle_get_size_zoom(pNormalView->pSubtitle,
+ &pSubtitleInfo->fZoom);
if (pNormalView->pSubtitlePopup) {
VideoLogWarning("pSubtitlePopup has been created");
vp_subtitle_update(pNormalView->pSubtitlePopup, pSubtitleInfo);
} else {
- pNormalView->pSubtitlePopup = vp_subtitle_create(pPlayView->pWin, pSubtitleInfo,
- __vp_normal_subtitle_popup_close_cb);
+ pNormalView->pSubtitlePopup =
+ vp_subtitle_create(pPlayView->pWin, pSubtitleInfo,
+ __vp_normal_subtitle_popup_close_cb);
if (!pNormalView->pSubtitlePopup) {
VideoLogError("vp_subtitle_create fail");
VP_FREE(pSubtitleInfo);
return;
}
- if (!vp_subtitle_set_user_data(pNormalView->pSubtitlePopup, (void *)pNormalView)) {
+ if (!vp_subtitle_set_user_data
+ (pNormalView->pSubtitlePopup, (void *) pNormalView)) {
VideoLogWarning("vp_subtitle_set_user_data is fail");
}
}
-static void _vp_play_normal_view_on_subtitle_sync_popup(NormalView *pNormalView)
+static void _vp_play_normal_view_on_subtitle_sync_popup(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
return;
}
- pNormalView->pSubtitleSyncPopup = vp_subtitle_sync_popup_create(pPlayView->pWin,
- pNormalView->fSubtitleSyncValue,
- __vp_normal_subtitle_sync_popup_update_cb,
- __vp_normal_subtitle_sync_popup_done_cb);
+ pNormalView->pSubtitleSyncPopup =
+ vp_subtitle_sync_popup_create(pPlayView->pWin,
+ pNormalView->fSubtitleSyncValue,
+ __vp_normal_subtitle_sync_popup_update_cb,
+ __vp_normal_subtitle_sync_popup_done_cb);
if (!pNormalView->pSubtitleSyncPopup) {
VideoLogError("vp_subtitle_sync_popup_create fail");
return;
}
- if (!vp_subtitle_sync_popup_set_user_data(pNormalView->pSubtitleSyncPopup, (void *)pNormalView)) {
+ if (!vp_subtitle_sync_popup_set_user_data
+ (pNormalView->pSubtitleSyncPopup, (void *) pNormalView)) {
VideoLogWarning("vp_subtitle_sync_popup_set_user_data is fail");
}
VP_EVAS_TIMER_DEL(pNormalView->pHideFinishTimer);
}
-#ifdef _SUBTITLE_MULTI_LANGUAGE
-/*static bool _vp_play_normal_view_selected_subtitle_language_cb(int nTrackNum, void *pUserData)
-{
- VideoLogInfo("nTrackNum is %d", nTrackNum);
- NormalView *pNormalView = (NormalView *)pUserData;
- if (!pNormalView) {
- VideoLogError("pNormalView is NULL");
- return FALSE;
- }
-
- if (!pNormalView->pPlayerHandle) {
- VideoLogError("pPlayerHandle is NULL");
- return FALSE;
- }
- if (nTrackNum >= 0)
- pNormalView->pSelectedSubtitleLanguage[nTrackNum] = true;
-
- return TRUE;
-}*/
+#ifdef _SUBTITLE_MULTI_LANGUAGE
-static void _vp_play_normal_view_selected_subtitle_language(NormalView *pNormalView)
+static void _vp_play_normal_view_selected_subtitle_language(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
}
VP_FREE(pNormalView->pSelectedSubtitleLanguage);
- pNormalView->pSelectedSubtitleLanguage = calloc(pNormalView->nSubtitleLanguageCount, sizeof(int));
+ pNormalView->pSelectedSubtitleLanguage =
+ calloc(pNormalView->nSubtitleLanguageCount, sizeof(int));
-// if (!vp_mm_player_track_foreach_selected_subtitle_language(pNormalView->pPlayerHandle,
-// _vp_play_normal_view_selected_subtitle_language_cb,
-// pNormalView)) {
-// VideoLogError("vp_mm_player_track_foreach_selected_subtitle_language failed");
-// return;
-// }
}
-static void _vp_play_normal_view_subtitle_add_language_cb(int index, void *pUserData)
+static void _vp_play_normal_view_subtitle_add_language_cb(int index,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
if (!pNormalView->pPlayerHandle) {
VideoLogError("pPlayerHandle is NULL");
return;
if (pNormalView->pSelectedSubtitleLanguage[index]) {
VideoLogWarning("index:%d has been added", index);
} else {
- if (!vp_mm_player_add_subtitle_language(pNormalView->pPlayerHandle, index)) {
- VideoLogError("vp_mm_player_add_subtitle_language:%d failed", index);
+ if (!vp_mm_player_add_subtitle_language
+ (pNormalView->pPlayerHandle, index)) {
+ VideoLogError("vp_mm_player_add_subtitle_language:%d failed",
+ index);
} else {
- VideoLogInfo("vp_mm_player_add_subtitle_language:%d successed", index);
+ VideoLogInfo("vp_mm_player_add_subtitle_language:%d successed",
+ index);
pNormalView->pSelectedSubtitleLanguage[index] = true;
}
}
}
-static void _vp_play_normal_view_subtitle_remove_language_cb(int index, void *pUserData)
+static void _vp_play_normal_view_subtitle_remove_language_cb(int index,
+ void
+ *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
if (!pNormalView->pPlayerHandle) {
VideoLogError("pPlayerHandle is NULL");
return;
}
if (pNormalView->pSelectedSubtitleLanguage[index]) {
- if (!vp_mm_player_remove_subtitle_language(pNormalView->pPlayerHandle, index)) {
- VideoLogError("vp_mm_player_remove_subtitle_language:%d failed", index);
+ if (!vp_mm_player_remove_subtitle_language
+ (pNormalView->pPlayerHandle, index)) {
+ VideoLogError
+ ("vp_mm_player_remove_subtitle_language:%d failed", index);
} else {
- VideoLogInfo("vp_mm_player_remove_subtitle_language:%d successed", index);
+ VideoLogInfo
+ ("vp_mm_player_remove_subtitle_language:%d successed",
+ index);
pNormalView->pSelectedSubtitleLanguage[index] = false;
}
} else {
}
#endif
-static void _vp_play_normal_view_on_subtitle_language_popup(NormalView *pNormalView)
+static void _vp_play_normal_view_on_subtitle_language_popup(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
pNormalView->pSubtitleTrackHandle = NULL;
#ifdef _SUBTITLE_MULTI_LANGUAGE
- pNormalView->pSubtitleTrackHandle = vp_subtitle_track_create(pPlayView->pWin,
- __vp_normal_subtitle_track_popup_close_cb);
+ pNormalView->pSubtitleTrackHandle =
+ vp_subtitle_track_create(pPlayView->pWin,
+ __vp_normal_subtitle_track_popup_close_cb);
#else
- pNormalView->pSubtitleTrackHandle = vp_subtitle_track_create(pPlayView->pWin,
- __vp_normal_subtitle_track_popup_close_cb,
- pNormalView->nDefaultSubtitleTrackIndex);
+ pNormalView->pSubtitleTrackHandle =
+ vp_subtitle_track_create(pPlayView->pWin,
+ __vp_normal_subtitle_track_popup_close_cb,
+ pNormalView->nDefaultSubtitleTrackIndex);
#endif
if (!pNormalView->pSubtitleTrackHandle) {
VideoLogError("vp_subtitle_track_create fail");
return;
}
- if (!vp_subtitle_track_set_user_data(pNormalView->pSubtitleTrackHandle, (void *)pNormalView)) {
+ if (!vp_subtitle_track_set_user_data
+ (pNormalView->pSubtitleTrackHandle, (void *) pNormalView)) {
VideoLogWarning("vp_subtitle_track_set_user_data is fail");
}
int nCount = 0;
- if (vp_mm_player_get_subtitle_track_count(pNormalView->pPlayerHandle, &nCount)) {
+ if (vp_mm_player_get_subtitle_track_count
+ (pNormalView->pPlayerHandle, &nCount)) {
VideoLogInfo("== TRACK : %d ==", nCount);
if (nCount > 0) {
#ifdef _SUBTITLE_MULTI_LANGUAGE
int nIdx = 0;
for (nIdx = 0; nIdx < nCount; nIdx++) {
char *szCode = NULL;
- if (vp_mm_player_get_subtitle_track_language_code(pNormalView->pPlayerHandle, nIdx, &szCode)) {
+ if (vp_mm_player_get_subtitle_track_language_code
+ (pNormalView->pPlayerHandle, nIdx, &szCode)) {
VideoLogWarning("== language : %s ==", szCode);
#ifdef _SUBTITLE_MULTI_LANGUAGE
- vp_subtitle_track_add_Item(pNormalView->pSubtitleTrackHandle, szCode, nIdx, pNormalView->pSelectedSubtitleLanguage[nIdx]);
+ vp_subtitle_track_add_Item(pNormalView->
+ pSubtitleTrackHandle,
+ szCode, nIdx,
+ pNormalView->
+ pSelectedSubtitleLanguage
+ [nIdx]);
#else
- vp_subtitle_track_add_Item(pNormalView->pSubtitleTrackHandle, szCode, nIdx);
+ vp_subtitle_track_add_Item(pNormalView->
+ pSubtitleTrackHandle,
+ szCode, nIdx);
#endif
}
VP_FREE(szCode);
}
#ifdef _SUBTITLE_MULTI_LANGUAGE
- vp_subtitle_track_set_add_language_cb(pNormalView->pSubtitleTrackHandle, _vp_play_normal_view_subtitle_add_language_cb);
- vp_subtitle_track_set_remove_language_cb(pNormalView->pSubtitleTrackHandle, _vp_play_normal_view_subtitle_remove_language_cb);
+ vp_subtitle_track_set_add_language_cb(pNormalView->
+ pSubtitleTrackHandle,
+ _vp_play_normal_view_subtitle_add_language_cb);
+ vp_subtitle_track_set_remove_language_cb(pNormalView->
+ pSubtitleTrackHandle,
+ _vp_play_normal_view_subtitle_remove_language_cb);
#endif
} else {
- char *szTrack = g_strdup_printf("%s %d", VP_PLAY_STRING_COM_DEFAULT, 0);
+ char *szTrack =
+ g_strdup_printf("%s %d", VP_PLAY_STRING_COM_DEFAULT, 0);
#ifdef _SUBTITLE_MULTI_LANGUAGE
- vp_subtitle_track_add_Item(pNormalView->pSubtitleTrackHandle, szTrack, 0, true);
+ vp_subtitle_track_add_Item(pNormalView->pSubtitleTrackHandle,
+ szTrack, 0, true);
#else
- vp_subtitle_track_add_Item(pNormalView->pSubtitleTrackHandle, szTrack, 0);
+ vp_subtitle_track_add_Item(pNormalView->pSubtitleTrackHandle,
+ szTrack, 0);
#endif
VP_FREE(szTrack);
}
} else {
- char *szTrack = g_strdup_printf("%s %d", VP_PLAY_STRING_COM_DEFAULT, 0);
+ char *szTrack =
+ g_strdup_printf("%s %d", VP_PLAY_STRING_COM_DEFAULT, 0);
#ifdef _SUBTITLE_MULTI_LANGUAGE
- vp_subtitle_track_add_Item(pNormalView->pSubtitleTrackHandle, szTrack, 0, true);
+ vp_subtitle_track_add_Item(pNormalView->pSubtitleTrackHandle,
+ szTrack, 0, true);
#else
- vp_subtitle_track_add_Item(pNormalView->pSubtitleTrackHandle, szTrack, 0);
+ vp_subtitle_track_add_Item(pNormalView->pSubtitleTrackHandle,
+ szTrack, 0);
#endif
VP_FREE(szTrack);
}
}
#ifdef SUBTITLE_K_FEATURE
-static void __vp_normal_subtitle_alignment_popup_done_cb(int nType, bool bPause, void *pUserData)
+static void __vp_normal_subtitle_alignment_popup_done_cb(int nType,
+ bool bPause,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
vp_subtitle_alignment_destroy(pNormalView->pSubtitleAlignmentPopup);
pNormalView->pSubtitleAlignmentPopup = NULL;
_vp_play_normal_view_set_subtitle_font_config(pNormalView);
- /*Set caption window: size, rel1, color*/
+ /*Set caption window: size, rel1, color */
__vp_normal_subtitle_set_caption_window(pNormalView);
}
_vp_play_normal_view_on_subtitle_popup(pNormalView);
- /*if (bPause) {
- if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
- VideoLogWarning("Pause Fail");
- }
- _vp_play_normal_view_set_play_state(pNormalView);
- _vp_play_normal_view_on_capture_mode(pNormalView);
- }
- if (pNormalView->bManualPause == FALSE) {
- if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
- VideoLogWarning("Pause Fail");
- }
- _vp_play_normal_view_set_play_state(pNormalView);
- _vp_play_normal_view_on_capture_mode(pNormalView);
- _vp_play_normal_view_create_layout_hide_timer(pNormalView);
- }*/
}
-static void _vp_play_normal_view_on_subtitle_alignment_popup(NormalView *pNormalView)
+static void _vp_play_normal_view_on_subtitle_alignment_popup(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
int nAlignment = 0;
vp_play_preference_get_subtitle_alignment_key(&nAlignment);
- pNormalView->pSubtitleAlignmentPopup = vp_subtitle_alignment_create(pPlayView->pWin,
- __vp_normal_subtitle_alignment_popup_done_cb,
- nAlignment);
+ pNormalView->pSubtitleAlignmentPopup =
+ vp_subtitle_alignment_create(pPlayView->pWin,
+ __vp_normal_subtitle_alignment_popup_done_cb,
+ nAlignment);
if (!pNormalView->pSubtitleAlignmentPopup) {
VideoLogError("vp_subtitle_alignment_create fail");
return;
}
- if (!vp_subtitle_alignment_set_user_data(pNormalView->pSubtitleAlignmentPopup, (void *)pNormalView)) {
+ if (!vp_subtitle_alignment_set_user_data
+ (pNormalView->pSubtitleAlignmentPopup, (void *) pNormalView)) {
VideoLogWarning("vp_subtitle_alignment_set_user_data is fail");
}
- if (!vp_subtitle_alignment_realize(pNormalView->pSubtitleAlignmentPopup)) {
+ if (!vp_subtitle_alignment_realize
+ (pNormalView->pSubtitleAlignmentPopup)) {
VideoLogWarning("vp_subtitle_alignment_realize is fail");
}
pNormalView->bIsPopupShow = TRUE;
}
#endif
-static void _vp_play_normal_view_on_subtitle_select_popup(NormalView *pNormalView)
+static void _vp_play_normal_view_on_subtitle_select_popup(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
szDir = vp_play_util_get_folder_from_path(pNormalView->szMediaURL);
#ifdef ENABLE_SUBTITLE
bool bIsExistSubtitlesInFolder = FALSE;
-// bIsExistSubtitlesInFolder = vp_play_util_is_exist_subtitle_from_path(szDir);
- bIsExistSubtitlesInFolder = vp_play_util_get_subtitle_path_list(&pItemList);
+ bIsExistSubtitlesInFolder =
+ vp_play_util_get_subtitle_path_list(&pItemList);
if (bIsExistSubtitlesInFolder && pItemList) {
if (g_list_length(pItemList) > 0) {
bIsExistSubtitlesInFolder = FALSE;
}
- /*if (bIsExistSubtitlesInFolder == FALSE) {
- VP_EVAS_DEL(pNormalView->pPopup);
-
- pNormalView->bIsPopupShow = TRUE;
- pNormalView->pPopup = vp_popup_create(pPlayView->pWin, POPUP_STYLE_DEFAULT_WITH_CANCEL_BTN,
- NULL,
- VP_PLAY_STRING_ERROR_NO_SUBTITLE,
- 0.0, NULL,
- __vp_normal_popup_key_event_cb,
- __vp_normal_popup_mouse_event_cb,
- pNormalView);
-
- Evas_Object *pBtn = NULL;
- pBtn = elm_button_add(pNormalView->pPopup);
- elm_object_style_set (pBtn, "popup_button/default");
- elm_object_domain_translatable_text_set(pBtn, VP_SYS_STR_PREFIX, VP_PLAY_STRING_COM_OK_IDS);
- elm_object_part_content_set(pNormalView->pPopup, "button1", pBtn);
- evas_object_smart_callback_add(pBtn, "clicked", __vp_normal_subtitle_popup_key_event_cb, (void*)pNormalView);
- evas_object_show(pNormalView->pPopup);
-
- VP_FREE(szDir);
-
- return;
- }*/
#endif
vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE;
if (!vp_mm_player_get_state(pNormalView->pPlayerHandle, &nState)) {
_vp_play_normal_view_set_play_state(pNormalView);
}
-
#ifdef ENABLE_SUBTITLE
- //vp_play_util_get_subtitles_from_path(szDir, &pItemList);
#else
vp_play_util_get_subtitle_path_list(&pItemList);
#endif
VP_FREE(szDir);
vp_mm_player_get_subtitle_url(pNormalView->pPlayerHandle, &szSubtitle);
- pNormalView->pSubtitleSelectPopup = vp_subtitle_select_create(pPlayView->pWin, __vp_normal_subtitle_select_popup_done_cb, __vp_normal_subtitle_select_button_popup_done_cb,
- pItemList, szSubtitle, !(pNormalView->bIsExistSubtitle));
+ pNormalView->pSubtitleSelectPopup =
+ vp_subtitle_select_create(pPlayView->pWin,
+ __vp_normal_subtitle_select_popup_done_cb,
+ __vp_normal_subtitle_select_button_popup_done_cb,
+ pItemList, szSubtitle,
+ !(pNormalView->bIsExistSubtitle));
VP_FREE(szSubtitle);
if (pItemList) {
nCount = g_list_length(pItemList);
for (i = 0; i < nCount; i++) {
char *szName = NULL;
- szName = (char *)g_list_nth_data(pItemList, i);
+ szName = (char *) g_list_nth_data(pItemList, i);
VP_FREE(szName);
}
VideoLogError("vp_subtitle_select_create fail");
return;
}
- if (!vp_subtitle_select_set_user_data(pNormalView->pSubtitleSelectPopup, (void *)pNormalView)) {
+ if (!vp_subtitle_select_set_user_data
+ (pNormalView->pSubtitleSelectPopup, (void *) pNormalView)) {
VideoLogWarning("vp_subtitle_select_set_user_data is fail");
}
}
-static void _vp_play_normal_view_on_subtitle_font_popup(NormalView *pNormalView)
+static void _vp_play_normal_view_on_subtitle_font_popup(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
char *szFont = NULL;
vp_play_preference_get_subtitle_font_name_key(&szFont);
- pNormalView->pSubtitleFontPopup = vp_subtitle_font_create(pPlayView->pWin,
- __vp_normal_subtitle_font_popup_done_cb,
- szFont);
+ pNormalView->pSubtitleFontPopup =
+ vp_subtitle_font_create(pPlayView->pWin,
+ __vp_normal_subtitle_font_popup_done_cb,
+ szFont);
VP_FREE(szFont);
if (!pNormalView->pSubtitleFontPopup) {
VideoLogError("vp_subtitle_font_create fail");
return;
}
- if (!vp_subtitle_font_set_user_data(pNormalView->pSubtitleFontPopup, (void *)pNormalView)) {
+ if (!vp_subtitle_font_set_user_data
+ (pNormalView->pSubtitleFontPopup, (void *) pNormalView)) {
VideoLogWarning("vp_subtitle_font_set_user_data is fail");
}
}
-static void _vp_play_normal_view_on_subtitle_size_popup(NormalView *pNormalView)
+static void _vp_play_normal_view_on_subtitle_size_popup(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
int nSize = 0;
vp_play_preference_get_subtitle_size_key(&nSize);
- pNormalView->pSubtitleSizePopup = vp_subtitle_size_create(pPlayView->pWin,
- __vp_normal_subtitle_size_popup_done_cb,
- nSize);
+ pNormalView->pSubtitleSizePopup =
+ vp_subtitle_size_create(pPlayView->pWin,
+ __vp_normal_subtitle_size_popup_done_cb,
+ nSize);
if (!pNormalView->pSubtitleSizePopup) {
VideoLogError("vp_subtitle_size_create fail");
return;
}
- if (!vp_subtitle_size_set_user_data(pNormalView->pSubtitleSizePopup, (void *)pNormalView)) {
+ if (!vp_subtitle_size_set_user_data
+ (pNormalView->pSubtitleSizePopup, (void *) pNormalView)) {
VideoLogWarning("vp_subtitle_size_set_user_data is fail");
}
}
-static void __vp_normal_subtitle_edge_popup_done_cb(int nType, bool bPause, void *pUserData)
+static void __vp_normal_subtitle_edge_popup_done_cb(int nType, bool bPause,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
// to do
- NormalView *pNormalView = (NormalView *)pUserData;
+ NormalView *pNormalView = (NormalView *) pUserData;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
if (nType != -1) {
vp_play_subtitle_set_edge(pNormalView->pSubtitle, nType);
vp_play_preference_set_subtitle_edge_key(nType);
- //_vp_play_normal_view_set_subtitle_font_config(pNormalView);
- /*Set caption window: size, rel1, color*/
+ /*Set caption window: size, rel1, color */
__vp_normal_subtitle_set_caption_window(pNormalView);
}
if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
VideoLogWarning("Pause Fail");
}
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
_vp_play_normal_view_set_play_state(pNormalView);
}
_vp_play_normal_view_on_subtitle_popup(pNormalView);
- /*if (pNormalView->bManualPause == FALSE) {
- if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
- VideoLogWarning("Pause Fail");
- }
- _vp_play_normal_view_set_play_state(pNormalView);
- _vp_play_normal_view_on_capture_mode(pNormalView);
- _vp_play_normal_view_create_layout_hide_timer(pNormalView);
- }*/
}
-static void _vp_play_normal_view_on_subtitle_edge_popup(NormalView *pNormalView)
+static void _vp_play_normal_view_on_subtitle_edge_popup(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
int nEdge = 0;
vp_play_preference_get_subtitle_edge_key(&nEdge);
- pNormalView->pSubtitleEdgePopup = vp_subtitle_edge_create(pPlayView->pWin,
- __vp_normal_subtitle_edge_popup_done_cb,
- nEdge);
+ pNormalView->pSubtitleEdgePopup =
+ vp_subtitle_edge_create(pPlayView->pWin,
+ __vp_normal_subtitle_edge_popup_done_cb,
+ nEdge);
if (!pNormalView->pSubtitleEdgePopup) {
VideoLogError("vp_subtitle_size_create fail");
return;
}
- if (!vp_subtitle_edge_set_user_data(pNormalView->pSubtitleEdgePopup, (void *)pNormalView)) {
+ if (!vp_subtitle_edge_set_user_data
+ (pNormalView->pSubtitleEdgePopup, (void *) pNormalView)) {
VideoLogWarning("vp_subtitle_size_set_user_data is fail");
}
}
-static void _vp_play_normal_view_on_subtitle_font_color_popup(NormalView *pNormalView)
+static void _vp_play_normal_view_on_subtitle_font_color_popup(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
vp_play_preference_get_subtitle_font_color_key(&nColor);
#ifndef SUBTITLE_K_FEATURE
- pNormalView->pSubtitleFontColorPopup = vp_subtitle_color_create(pPlayView->pWin,
- __vp_normal_subtitle_font_color_popup_done_cb,
- nColor);
+ pNormalView->pSubtitleFontColorPopup =
+ vp_subtitle_color_create(pPlayView->pWin,
+ __vp_normal_subtitle_font_color_popup_done_cb,
+ nColor);
#else
char *szColorHex = NULL;
vp_play_preference_get_subtitle_font_color_hex_key(&szColorHex);
if (!szColorHex) {
VideoLogError("szColorHex is NULL");
} else {
- pNormalView->pSubtitleFontColorPopup = vp_subtitle_color_hex_create(pPlayView->pWin,
- __vp_normal_subtitle_font_color_popup_done_hex_cb,
- szColorHex);
+ pNormalView->pSubtitleFontColorPopup =
+ vp_subtitle_color_hex_create(pPlayView->pWin,
+ __vp_normal_subtitle_font_color_popup_done_hex_cb,
+ szColorHex);
}
VP_FREE(szColorHex);
#endif
VideoLogError("vp_subtitle_color_create fail");
return;
}
- if (!vp_subtitle_color_set_user_data(pNormalView->pSubtitleFontColorPopup, (void *)pNormalView)) {
+ if (!vp_subtitle_color_set_user_data
+ (pNormalView->pSubtitleFontColorPopup, (void *) pNormalView)) {
VideoLogWarning("vp_subtitle_font_color_set_user_data is fail");
}
}
-static void _vp_play_normal_view_on_subtitle_bg_color_popup(NormalView *pNormalView)
+static void _vp_play_normal_view_on_subtitle_bg_color_popup(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
VideoLogError("pPlayView is NULL");
return;
}
-
#ifndef SUBTITLE_K_FEATURE
int nColor = 0;
vp_play_preference_get_subtitle_bg_color_key(&nColor);
- pNormalView->pSubtitleBGColorPopup = vp_subtitle_bg_color_create(pPlayView->pWin,
- __vp_normal_subtitle_bg_color_popup_done_cb,
- nColor);
+ pNormalView->pSubtitleBGColorPopup =
+ vp_subtitle_bg_color_create(pPlayView->pWin,
+ __vp_normal_subtitle_bg_color_popup_done_cb,
+ nColor);
#else
char *szColorHex = NULL;
vp_play_preference_get_subtitle_bg_color_hex_key(&szColorHex);
if (!szColorHex) {
VideoLogError("szColorHex is NULL");
- } else { //prevent issue fix
- pNormalView->pSubtitleBGColorPopup = vp_subtitle_color_hex_create(pPlayView->pWin,
- __vp_normal_subtitle_bg_color_popup_done_hex_cb,
- szColorHex);
+ } else { //prevent issue fix
+ pNormalView->pSubtitleBGColorPopup =
+ vp_subtitle_color_hex_create(pPlayView->pWin,
+ __vp_normal_subtitle_bg_color_popup_done_hex_cb,
+ szColorHex);
VP_FREE(szColorHex);
}
#endif
VideoLogError("vp_subtitle_bg_color_create fail");
return;
}
- if (!vp_subtitle_color_set_user_data(pNormalView->pSubtitleBGColorPopup, (void *)pNormalView)) {
+ if (!vp_subtitle_color_set_user_data
+ (pNormalView->pSubtitleBGColorPopup, (void *) pNormalView)) {
VideoLogWarning("vp_subtitle_color_set_user_data is fail");
}
}
-static void _vp_play_normal_view_on_subtitle_caption_win_color_popup(NormalView *pNormalView)
+static void
+_vp_play_normal_view_on_subtitle_caption_win_color_popup(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
if (!szColorHex) {
VideoLogError("szColorHex is NULL");
} else {
- pNormalView->pSubtitleCaptionWinColorPopup = vp_subtitle_color_hex_create(pPlayView->pWin,
- __vp_normal_subtitle_caption_win_color_popup_done_hex_cb,
- szColorHex);
+ pNormalView->pSubtitleCaptionWinColorPopup =
+ vp_subtitle_color_hex_create(pPlayView->pWin,
+ __vp_normal_subtitle_caption_win_color_popup_done_hex_cb,
+ szColorHex);
}
VP_FREE(szColorHex);
VideoLogError("vp_subtitle_color_hex_create fail");
return;
}
- if (!vp_subtitle_color_set_user_data(pNormalView->pSubtitleCaptionWinColorPopup, (void *)pNormalView)) {
+ if (!vp_subtitle_color_set_user_data
+ (pNormalView->pSubtitleCaptionWinColorPopup,
+ (void *) pNormalView)) {
VideoLogWarning("vp_subtitle_color_set_user_data is fail");
}
- if (!vp_subtitle_color_realize(pNormalView->pSubtitleCaptionWinColorPopup)) {
+ if (!vp_subtitle_color_realize
+ (pNormalView->pSubtitleCaptionWinColorPopup)) {
VideoLogWarning("vp_subtitle_color_realize is fail");
}
pNormalView->bIsPopupShow = TRUE;
VP_EVAS_TIMER_DEL(pNormalView->pHideFinishTimer);
}
-static void _vp_play_normal_view_on_capture_popup(NormalView *pNormalView)
+static void _vp_play_normal_view_on_capture_popup(NormalView * pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
vp_play_preference_get_capture_on_key(&pNormalView->bCaptureMode);
pNormalView->pCapturePopup = vp_capture_popup_create(pPlayView->pWin,
- pNormalView->bCaptureMode,
- __vp_normal_capture_popup_close_cb);
+ pNormalView->
+ bCaptureMode,
+ __vp_normal_capture_popup_close_cb);
if (!pNormalView->pCapturePopup) {
VideoLogError("vp_capture_popup_create fail");
return;
}
- if (!vp_capture_popup_set_user_data(pNormalView->pCapturePopup, (void *)pNormalView)) {
+ if (!vp_capture_popup_set_user_data
+ (pNormalView->pCapturePopup, (void *) pNormalView)) {
VideoLogWarning("vp_capture_popup_set_user_data is fail");
}
}
-static void _vp_play_normal_view_on_play_speed_popup_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+static void _vp_play_normal_view_on_play_speed_popup_cb(void *data,
+ Evas_Object * obj,
+ const char
+ *emission,
+ const char *source)
{
- NormalView *pNormalView = (NormalView *)data;
+ NormalView *pNormalView = (NormalView *) data;
_vp_play_normal_view_on_play_speed_popup(pNormalView);
}
-static void _vp_play_normal_view_on_play_speed_popup(NormalView *pNormalView)
+static void _vp_play_normal_view_on_play_speed_popup(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
return;
}
- pNormalView->pPlaySpeedPopup = vp_play_speed_popup_create(pPlayView->pWin,
- pNormalView->fPlaySpeed,
- __vp_normal_play_speed_popup_update_cb,
- __vp_normal_play_speed_popup_done_cb);
+ pNormalView->pPlaySpeedPopup =
+ vp_play_speed_popup_create(pPlayView->pWin,
+ pNormalView->fPlaySpeed,
+ __vp_normal_play_speed_popup_update_cb,
+ __vp_normal_play_speed_popup_done_cb);
if (!pNormalView->pPlaySpeedPopup) {
VideoLogError("vp_play_speed_popup_create fail");
return;
}
- if (!vp_play_speed_popup_set_user_data(pNormalView->pPlaySpeedPopup, (void *)pNormalView)) {
+ if (!vp_play_speed_popup_set_user_data
+ (pNormalView->pPlaySpeedPopup, (void *) pNormalView)) {
VideoLogWarning("vp_play_speed_popup_set_user_data is fail");
}
}
-static void _vp_play_normal_view_on_setting_popup(NormalView *pNormalView)
+static void _vp_play_normal_view_on_setting_popup(NormalView * pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
VideoLogWarning("vp_mm_player_get_state is fail");
}
- if (pNormalView->bVideoOnlyMode == FALSE && nState == VP_MM_PLAYER_STATE_PLAYING) {
+ if (pNormalView->bVideoOnlyMode == FALSE
+ && nState == VP_MM_PLAYER_STATE_PLAYING) {
if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
VideoLogError("Pause Fail");
}
_vp_play_normal_view_set_play_state(pNormalView);
}
- if (!vp_play_preference_get_sound_alive_status(&pNormalView->nSoundAlive)) {
+ if (!vp_play_preference_get_sound_alive_status
+ (&pNormalView->nSoundAlive)) {
VideoLogError("vp_play_preference_get_sound_alive_status failed");
}
- bool bEarjack = vp_sound_device_is_enable(VP_SOUND_DEVICE_EARJACK, pNormalView->pPlayView);
+ bool bEarjack =
+ vp_sound_device_is_enable(VP_SOUND_DEVICE_EARJACK,
+ pNormalView->pPlayView);
if (bEarjack == FALSE && pNormalView->nSoundAlive == VIDEO_SA_7_1_CH) {
pNormalView->nSoundAlive = VIDEO_SA_NORMAL;
- if (!vp_play_preference_set_sound_alive_status(pNormalView->nSoundAlive)) {
- VideoLogError("vp_play_preference_set_sound_alive_status failed");
+ if (!vp_play_preference_set_sound_alive_status
+ (pNormalView->nSoundAlive)) {
+ VideoLogError
+ ("vp_play_preference_set_sound_alive_status failed");
}
- if (!vp_mm_player_set_sound_filter(pNormalView->pPlayerHandle, VP_MM_PLAYER_FILTER_NONE)) {
+ if (!vp_mm_player_set_sound_filter
+ (pNormalView->pPlayerHandle, VP_MM_PLAYER_FILTER_NONE)) {
VideoLogWarning("vp_mm_player_set_sound_filter is fail");
}
}
pSettingInfo->nRepeatMode = pNormalView->nRepeatMode;
pSettingInfo->bExternalMode = pNormalView->bVideoOnlyMode;
if (pNormalView->bIsExistSubtitle == FALSE) {
- pSettingInfo->bSelectSubtitle = vp_play_util_is_exist_subtitle_from_path(szDir);
+ pSettingInfo->bSelectSubtitle =
+ vp_play_util_is_exist_subtitle_from_path(szDir);
} else {
pSettingInfo->bSelectSubtitle = TRUE;
}
pSettingInfo->bStreaming = FALSE;
if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_WEB ||
- pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MULTI_PATH) {
+ pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MULTI_PATH) {
pSettingInfo->bStreaming = TRUE;
}
#ifdef ENABLE_DRM_FEATURE
#endif
char *szCode = NULL;
int nCount = 0;
- if (vp_mm_player_get_audio_track_count(pNormalView->pPlayerHandle, &nCount)) {
+ if (vp_mm_player_get_audio_track_count
+ (pNormalView->pPlayerHandle, &nCount)) {
if (nCount > 1) {
- if (vp_mm_player_get_audio_track_language_code(pNormalView->pPlayerHandle, pNormalView->nDefaultAudioTrackIndex, &szCode)) {
- vp_audio_track_get_name(szCode, &(pSettingInfo->szAudioTrack));
+ if (vp_mm_player_get_audio_track_language_code
+ (pNormalView->pPlayerHandle,
+ pNormalView->nDefaultAudioTrackIndex, &szCode)) {
+ vp_audio_track_get_name(szCode,
+ &(pSettingInfo->szAudioTrack));
} else {
- pSettingInfo->szAudioTrack = g_strdup_printf("%s", VP_PLAY_STRING_COM_UNKNOWN);
+ pSettingInfo->szAudioTrack =
+ g_strdup_printf("%s", VP_PLAY_STRING_COM_UNKNOWN);
}
} else {
- pSettingInfo->szAudioTrack = g_strdup_printf("%s %d", VP_PLAY_STRING_AUDIO_TRACK, 0);
+ pSettingInfo->szAudioTrack =
+ g_strdup_printf("%s %d", VP_PLAY_STRING_AUDIO_TRACK, 0);
}
} else {
- pSettingInfo->szAudioTrack = g_strdup_printf("%s %d", VP_PLAY_STRING_AUDIO_TRACK, 0);
+ pSettingInfo->szAudioTrack =
+ g_strdup_printf("%s %d", VP_PLAY_STRING_AUDIO_TRACK, 0);
}
VP_FREE(szCode);
vp_play_preference_get_capture_on_key(&pSettingInfo->bCapture);
- pNormalView->pSettingHandle = vp_setting_create(pPlayView->pWin, pSettingInfo,
- __vp_normal_setting_popup_close_cb);
+ pNormalView->pSettingHandle =
+ vp_setting_create(pPlayView->pWin, pSettingInfo,
+ __vp_normal_setting_popup_close_cb);
if (!pNormalView->pSettingHandle) {
VideoLogError("vp_setting_create fail");
VP_FREE(pSettingInfo->szAudioTrack);
VP_FREE(pSettingInfo);
- if (!vp_setting_set_user_data(pNormalView->pSettingHandle, (void *)pNormalView)) {
+ if (!vp_setting_set_user_data
+ (pNormalView->pSettingHandle, (void *) pNormalView)) {
VideoLogWarning("vp_setting_set_user_data is fail");
}
VP_EVAS_TIMER_DEL(pNormalView->pHideFinishTimer);
}
-static void _vp_play_normal_view_on_detail_popup(NormalView *pNormalView)
+static void _vp_play_normal_view_on_detail_popup(NormalView * pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
VideoLogWarning("vp_mm_player_get_state is fail");
}
- if (pNormalView->bVideoOnlyMode == FALSE && nState == VP_MM_PLAYER_STATE_PLAYING) {
+ if (pNormalView->bVideoOnlyMode == FALSE
+ && nState == VP_MM_PLAYER_STATE_PLAYING) {
if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
VideoLogError("Pause Fail");
}
#ifdef ENABLE_DRM_FEATURE
vp_drm_is_drm_file(pNormalView->szMediaURL, &(pDetailInfo->bDrm));
- vp_drm_is_playready_drm_file(pNormalView->szMediaURL, &(pDetailInfo->bPlayready));
- _vp_play_normal_view_check_drm_lock(pNormalView, &(pDetailInfo->bForwardLock));
+ vp_drm_is_playready_drm_file(pNormalView->szMediaURL,
+ &(pDetailInfo->bPlayready));
+ _vp_play_normal_view_check_drm_lock(pNormalView,
+ &(pDetailInfo->bForwardLock));
#endif
- if (pDetailInfo->bPlayready == FALSE) { /* Just check it for performance */
- vp_media_contents_get_content_info(pNormalView->szMediaURL, &szTitle, &nWidth, &nHeight, &nDuration, &dLatitude, &dLongitude, &szModifiedTime);
+ if (pDetailInfo->bPlayready == FALSE) { /* Just check it for performance */
+ vp_media_contents_get_content_info(pNormalView->szMediaURL,
+ &szTitle, &nWidth, &nHeight,
+ &nDuration, &dLatitude,
+ &dLongitude, &szModifiedTime);
if (szTitle) {
- pDetailInfo->szTitle = vp_play_util_get_title_from_path(szTitle);
+ pDetailInfo->szTitle =
+ vp_play_util_get_title_from_path(szTitle);
} else {
- pDetailInfo->szTitle = vp_play_util_get_title_from_path(pNormalView->szMediaURL);
+ pDetailInfo->szTitle =
+ vp_play_util_get_title_from_path(pNormalView->szMediaURL);
}
if (nWidth == 0) {
vp_media_metadata_get_width(pNormalView->szMediaURL, &nWidth);
}
if (nHeight == 0) {
- vp_media_metadata_get_height(pNormalView->szMediaURL, &nHeight);
+ vp_media_metadata_get_height(pNormalView->szMediaURL,
+ &nHeight);
}
} else {
- pDetailInfo->szTitle = vp_play_util_get_title_from_path(pNormalView->szMediaURL);
+ pDetailInfo->szTitle =
+ vp_play_util_get_title_from_path(pNormalView->szMediaURL);
}
- vp_play_util_get_file_info(pNormalView->szMediaURL, &pDetailInfo->szSize, &pDetailInfo->szDate, &pDetailInfo->szFormat);
+ vp_play_util_get_file_info(pNormalView->szMediaURL,
+ &pDetailInfo->szSize, &pDetailInfo->szDate,
+ &pDetailInfo->szFormat);
VP_FREE(szTitle);
VP_FREE(szFileDate);
} else {
pDetailInfo->szLastModified = g_strdup(szModifiedTime);
}
- pDetailInfo->szResolution = g_strdup_printf("%d X %d", nWidth, nHeight);
+ pDetailInfo->szResolution =
+ g_strdup_printf("%d X %d", nWidth, nHeight);
pDetailInfo->szLatitude = g_strdup_printf("%f", dLatitude);
pDetailInfo->szLongitude = g_strdup_printf("%f", dLongitude);
- if (vp_file_exists((const char*)pNormalView->szMediaURL)) {
- pDetailInfo->szLocation = vp_dir_get((const char*)pNormalView->szMediaURL);
+ if (vp_file_exists((const char *) pNormalView->szMediaURL)) {
+ pDetailInfo->szLocation =
+ vp_dir_get((const char *) pNormalView->szMediaURL);
} else {
_vp_play_normal_view_release_service_share(pNormalView->pPlayView);
}
- pNormalView->pDetailHandle = vp_detail_page_create((void *)pPlayView->pNaviframe,__vp_normal_detail_popup_close_cb, pDetailInfo);
- //pNormalView->pDetailHandle = vp_detail_create(pPlayView->pWin, __vp_normal_detail_popup_close_cb, pDetailInfo);
+ pNormalView->pDetailHandle =
+ vp_detail_page_create((void *) pPlayView->pNaviframe,
+ __vp_normal_detail_popup_close_cb,
+ pDetailInfo);
if (!pNormalView->pDetailHandle) {
VideoLogError("vp_detail_create fail");
VP_FREE(pDetailInfo);
return;
}
- if (!vp_detail_set_user_data(pNormalView->pDetailHandle, (void *)pNormalView)) {
+ if (!vp_detail_set_user_data
+ (pNormalView->pDetailHandle, (void *) pNormalView)) {
VideoLogWarning("vp_detail_set_user_data is fail");
}
-/*
- if (!vp_detail_realize(pNormalView->pDetailHandle)) {
- VideoLogWarning("vp_detail_realize is fail");
- }
- pNormalView->bIsPopupShow = TRUE;
-*/
VP_FREE(pDetailInfo->szTitle);
VP_FREE(pDetailInfo->szFormat);
VP_FREE(pDetailInfo->szDate);
VP_EVAS_TIMER_DEL(pNormalView->pHideFinishTimer);
}
-static void _vp_play_normal_view_on_volume_popup(NormalView *pNormalView, bool bToggle)
+static void _vp_play_normal_view_on_volume_popup(NormalView * pNormalView,
+ bool bToggle)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
return;
}
- bool bLandscape = vp_play_util_get_landscape_check(pNormalView->nRotate);
+ bool bLandscape =
+ vp_play_util_get_landscape_check(pNormalView->nRotate);
bool bIsRealize = FALSE;
if (pNormalView->pVolumePopupHandle) {
- if (!vp_play_volume_popup_unrealize(pNormalView->pVolumePopupHandle)) {
+ if (!vp_play_volume_popup_unrealize
+ (pNormalView->pVolumePopupHandle)) {
VideoLogWarning("vp_play_volume_popup_unrealize is fail");
}
}
Evas_Object *pParent = pNormalView->pPlayView->pWin;
- pNormalView->pVolumeHandle = vp_play_volume_create(pParent, pNormalView->pPlayerHandle, __vp_normal_volume_change_value_cb);
+ pNormalView->pVolumeHandle =
+ vp_play_volume_create(pParent, pNormalView->pPlayerHandle,
+ __vp_normal_volume_change_value_cb);
if (!pNormalView->pVolumeHandle) {
VideoLogError("pNormalView->pVolumeHandle is NULL");
return;
}
- if (!vp_play_volume_set_user_data(pNormalView->pVolumeHandle, (void *)pNormalView)) {
+ if (!vp_play_volume_set_user_data
+ (pNormalView->pVolumeHandle, (void *) pNormalView)) {
VideoLogWarning("vp_play_volume_set_user_data is fail");
return;
}
if (!pNormalView->bLockScreen) {
- vp_play_volume_set_mouse_callbacks(pNormalView->pVolumeHandle, pNormalView->pPlayView->pWin);
+ vp_play_volume_set_mouse_callbacks(pNormalView->pVolumeHandle,
+ pNormalView->pPlayView->
+ pWin);
} else {
- vp_play_volume_unset_mouse_callbacks(pNormalView->pVolumeHandle, pNormalView->pPlayView->pWin);
+ vp_play_volume_unset_mouse_callbacks(pNormalView->
+ pVolumeHandle,
+ pNormalView->pPlayView->
+ pWin);
}
}
Evas_Object *pParent = pNormalView->pPlayView->pWin;
- if (!vp_play_volume_set_landscape_mode(pNormalView->pVolumeHandle, bLandscape, pParent)) {
+ if (!vp_play_volume_set_landscape_mode
+ (pNormalView->pVolumeHandle, bLandscape, pParent)) {
VideoLogWarning("vp_play_volume_set_landscape_mode is fail");
return;
}
- if (!vp_play_volume_is_realize(pNormalView->pVolumeHandle, &bIsRealize)) {
+ if (!vp_play_volume_is_realize
+ (pNormalView->pVolumeHandle, &bIsRealize)) {
VideoLogWarning("vp_play_volume_is_realize is fail");
return;
}
VP_EVAS_DEL(pNormalView->pCtxPopup);
- if (!vp_play_volume_realize(pNormalView->pVolumeHandle, pNormalView->pPlayView->pWin)) {
+ if (!vp_play_volume_realize
+ (pNormalView->pVolumeHandle, pNormalView->pPlayView->pWin)) {
VideoLogWarning("vp_play_volume_realize is fail");
}
}
}
-static void _vp_play_normal_view_on_bookmark_mode(NormalView *pNormalView, bool bShow)
+static void _vp_play_normal_view_on_bookmark_mode(NormalView * pNormalView,
+ bool bShow)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
pNormalView->bCaptureComplete = TRUE;
vp_play_bookmark_realize(pNormalView->pBookmarkHandle);
#ifndef SUBTITLE_K_FEATURE
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_BOOKMARK_ON, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_BOOKMARK_ON, "*");
#endif
- elm_object_part_content_set(pNormalView->pControlLayout, VP_PLAY_SWALLOW_NORMAL_BOOKMARK, pNormalView->pBookmarkObj);
+ elm_object_part_content_set(pNormalView->pControlLayout,
+ VP_PLAY_SWALLOW_NORMAL_BOOKMARK,
+ pNormalView->pBookmarkObj);
} else {
pNormalView->bCaptureComplete = TRUE;
#ifndef SUBTITLE_K_FEATURE
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_BOOKMARK_OFF, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_BOOKMARK_OFF, "*");
#endif
- elm_object_part_content_unset(pNormalView->pControlLayout, VP_PLAY_SWALLOW_NORMAL_BOOKMARK);
+ elm_object_part_content_unset(pNormalView->pControlLayout,
+ VP_PLAY_SWALLOW_NORMAL_BOOKMARK);
vp_play_bookmark_unrealize(pNormalView->pBookmarkHandle);
}
}
-//static void _vp_play_normal_view_download_sdp(NormalView *pNormalView, char *szSdpPath)
-//{
-// if (!pNormalView) {
-// VideoLogError("pNormalView is NULL");
-// return;
-// }
-//
-// if (!szSdpPath) {
-// VideoLogError("szSubtitlePath is NULL");
-// return;
-// }
-//
-// if (pNormalView->pDownloadHandle) {
-// VppDownloadDestroyItem(pNormalView->pDownloadHandle);
-// pNormalView->pDownloadHandle = NULL;
-// }
-//
-// VppDownloadCallback pFunc = {0,};
-//
-// pFunc.stateChangedCb = __vp_normal_sdp_download_state_change_cb;
-//
-// VideoSecureLogDebug(" ############### %s ##########################", szSdpPath);
-//
-// char *app_path = app_get_data_path();
-// if (!app_path) {
-// VideoLogError("cannot retrieve app install path");
-// return;
-// }
-// char db_path[1024] = {0,};
-// snprintf(db_path, 1024, "%s%s", app_path, "sdp");
-// VideoLogError("db_path: %s", db_path);
-//
-//
-// pNormalView->pDownloadHandle = VppDownloadCreateItem(szSdpPath, db_path, NULL, VPP_DOWNLOAD_ITEM_TYPE_VIDEO_FILE, pFunc, (void *)pNormalView);
-//
-// if (!pNormalView->pDownloadHandle) {
-// VideoLogError("pDownloadHandle is NULL");
-// return;
-// }
-//
-// if (!VppDownloadRequestAppend(pNormalView->pDownloadHandle)) {
-// VideoLogError("VppDownloadRequestAppend is fail");
-// return;
-// }
-//
-//}
-
-static void _vp_play_normal_view_all_close_popup(NormalView *pNormalView)
+
+static void _vp_play_normal_view_all_close_popup(NormalView * pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
pNormalView->pCtxPopup = NULL;
}
- /*if (pNormalView->pDetailHandle) {
- vp_detail_destroy(pNormalView->pDetailHandle);
- pNormalView->pDetailHandle = NULL;
- }*/
-
if (pNormalView->pSubtitlePopup) {
vp_subtitle_destroy(pNormalView->pSubtitlePopup);
pNormalView->pSubtitlePopup = NULL;
}
if (pNormalView->pSubtitleAlignmentPopup) {
- vp_subtitle_alignment_destroy(pNormalView->pSubtitleAlignmentPopup);
+ vp_subtitle_alignment_destroy(pNormalView->
+ pSubtitleAlignmentPopup);
pNormalView->pSubtitleAlignmentPopup = NULL;
}
}
if (pNormalView->pPlaySpeedPopup) {
- vp_mm_player_set_rate(pNormalView->pPlayerHandle, (float)pNormalView->fPlaySpeed);
+ vp_mm_player_set_rate(pNormalView->pPlayerHandle,
+ (float) pNormalView->fPlaySpeed);
vp_play_speed_popup_destroy(pNormalView->pPlaySpeedPopup);
pNormalView->pPlaySpeedPopup = NULL;
}
pNormalView->bIsPopupShow = FALSE;
}
-static void _vp_play_normal_view_show_layout(NormalView *pNormalView)
+static void _vp_play_normal_view_show_layout(NormalView * pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
if (pNormalView->bLockScreen) {
VideoLogError("bLockScreen is TRUE");
- vp_play_normal_view_set_lock_screen(pNormalView, pNormalView->bLockScreen);
+ vp_play_normal_view_set_lock_screen(pNormalView,
+ pNormalView->bLockScreen);
return;
}
vp_device_set_frame_rate(60);
- //_vp_play_normal_view_update_progress_value(pNormalView);
_vp_play_normal_view_set_rotate_lock_state(pNormalView);
VP_EVAS_TIMER_DEL(pNormalView->pScreenShotTimer);
- elm_object_part_content_unset(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_SCREENSHOT_PORTRAIT);
- elm_object_part_content_unset(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_SCREENSHOT_LANDSCAPE);
+ elm_object_part_content_unset(pNormalView->pMainLayout,
+ VP_PLAY_SWALLOW_NORMAL_SCREENSHOT_PORTRAIT);
+ elm_object_part_content_unset(pNormalView->pMainLayout,
+ VP_PLAY_SWALLOW_NORMAL_SCREENSHOT_LANDSCAPE);
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SCREEN_HIDE, "*");
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_ROTATE_HIDE, "*");
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_VOLUME_HIDE, "*");
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_PLAYING_SPEED_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SCREEN_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_ROTATE_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_VOLUME_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_PLAYING_SPEED_HIDE, "*");
VP_EVAS_DEL(pNormalView->pScreenShot);
pNormalView->pScreenShot = NULL;
- elm_object_item_signal_emit(pNormalView->pNaviItem, VP_NORMAL_SIGNAL_NAVIFRAME_TITLE_SHOW, "elm");
+ elm_object_item_signal_emit(pNormalView->pNaviItem,
+ VP_NORMAL_SIGNAL_NAVIFRAME_TITLE_SHOW,
+ "elm");
_vp_play_normal_view_show_rotate(pNormalView);
_vp_play_normal_view_show_volume(pNormalView);
- bool bLandscape = vp_play_util_get_landscape_check(pNormalView->nRotate);
+ bool bLandscape =
+ vp_play_util_get_landscape_check(pNormalView->nRotate);
if (bLandscape) {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_LANDSCAPE_SHOW, "*");
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_NO_EFFECT_LANDSCAPE_SHOW, "*");
- elm_object_signal_emit(pNormalView->pControlLayout, VP_NORMAL_SIGNAL_CONTROL_LANDSCAPE_MODE, "*");
- elm_object_signal_emit(pNormalView->pFunctionLayout, VP_NORMAL_SIGNAL_FUNCTION_LANDSCAPE_MODE, "*");
- vp_play_progressbar_set_landscape_mode(pNormalView->pProgressbar, TRUE);
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_LANDSCAPE_SHOW, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_NO_EFFECT_LANDSCAPE_SHOW,
+ "*");
+ elm_object_signal_emit(pNormalView->pControlLayout,
+ VP_NORMAL_SIGNAL_CONTROL_LANDSCAPE_MODE,
+ "*");
+ elm_object_signal_emit(pNormalView->pFunctionLayout,
+ VP_NORMAL_SIGNAL_FUNCTION_LANDSCAPE_MODE,
+ "*");
+ vp_play_progressbar_set_landscape_mode(pNormalView->pProgressbar,
+ TRUE);
} else {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_PORTRAIT_SHOW, "*");
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_NO_EFFECT_PORTRAIT_SHOW, "*");
- elm_object_signal_emit(pNormalView->pControlLayout, VP_NORMAL_SIGNAL_CONTROL_PORTRAIT_MODE, "*");
- elm_object_signal_emit(pNormalView->pFunctionLayout, VP_NORMAL_SIGNAL_FUNCTION_PORTRAIT_MODE, "*");
- vp_play_progressbar_set_landscape_mode(pNormalView->pProgressbar, FALSE);
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_PORTRAIT_SHOW, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_NO_EFFECT_PORTRAIT_SHOW,
+ "*");
+ elm_object_signal_emit(pNormalView->pControlLayout,
+ VP_NORMAL_SIGNAL_CONTROL_PORTRAIT_MODE,
+ "*");
+ elm_object_signal_emit(pNormalView->pFunctionLayout,
+ VP_NORMAL_SIGNAL_FUNCTION_PORTRAIT_MODE,
+ "*");
+ vp_play_progressbar_set_landscape_mode(pNormalView->pProgressbar,
+ FALSE);
}
bool bIsRealize = FALSE;
if (pNormalView->pBookmarkHandle) {
- vp_play_bookmark_is_realize(pNormalView->pBookmarkHandle, &bIsRealize);
+ vp_play_bookmark_is_realize(pNormalView->pBookmarkHandle,
+ &bIsRealize);
if (bIsRealize) {
#ifndef SUBTITLE_K_FEATURE
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_BOOKMARK_ON, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_BOOKMARK_ON, "*");
#endif
}
}
VP_EVAS_TIMER_DEL(pNormalView->pHideFinishTimer);
pNormalView->bShowLayout = TRUE;
- vp_play_normal_view_set_main_layout_focus_out((void *)pPlayView->pNormalView);
+ vp_play_normal_view_set_main_layout_focus_out((void *) pPlayView->
+ pNormalView);
_vp_play_normal_view_set_button_focus_sequence(pNormalView);
_vp_play_normal_view_create_layout_hide_timer(pNormalView);
}
-static void _vp_play_normal_view_hide_layout(NormalView *pNormalView, bool bNoEffect)
+static void _vp_play_normal_view_hide_layout(NormalView * pNormalView,
+ bool bNoEffect)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
bool bIsRealize = FALSE;
bool bEditMode = FALSE;
bool bPressed = FALSE;
- if (!vp_play_bookmark_is_realize(pNormalView->pBookmarkHandle, &bIsRealize)) {
+ if (!vp_play_bookmark_is_realize
+ (pNormalView->pBookmarkHandle, &bIsRealize)) {
VideoLogWarning("vp_play_bookmark_is_realize fail");
}
if (bIsRealize) {
- if (!vp_play_bookmark_get_edit_mode(pNormalView->pBookmarkHandle, &bEditMode)) {
+ if (!vp_play_bookmark_get_edit_mode
+ (pNormalView->pBookmarkHandle, &bEditMode)) {
VideoLogWarning("vp_play_bookmark_get_edit_mode fail");
}
if (bEditMode) {
return;
}
- if (!vp_play_bookmark_get_pressed_status(pNormalView->pBookmarkHandle, &bPressed)) {
- VideoLogWarning("vp_play_bookmark_get_pressed_status fail");
+ if (!vp_play_bookmark_get_pressed_status
+ (pNormalView->pBookmarkHandle, &bPressed)) {
+ VideoLogWarning
+ ("vp_play_bookmark_get_pressed_status fail");
}
if (bPressed) {
VP_EVAS_TIMER_DEL(pNormalView->pScreenShotTimer);
- elm_object_part_content_unset(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_SCREENSHOT_PORTRAIT);
- elm_object_part_content_unset(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_SCREENSHOT_LANDSCAPE);
+ elm_object_part_content_unset(pNormalView->pMainLayout,
+ VP_PLAY_SWALLOW_NORMAL_SCREENSHOT_PORTRAIT);
+ elm_object_part_content_unset(pNormalView->pMainLayout,
+ VP_PLAY_SWALLOW_NORMAL_SCREENSHOT_LANDSCAPE);
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SCREEN_HIDE, "*");
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_ROTATE_HIDE, "*");
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_VOLUME_HIDE, "*");
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_PLAYING_SPEED_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SCREEN_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_ROTATE_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_VOLUME_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_PLAYING_SPEED_HIDE, "*");
VP_EVAS_DEL(pNormalView->pScreenShot);
pNormalView->pScreenShot = NULL;
VP_EVAS_TIMER_DEL(pNormalView->pProgressTimer);
if (bNoEffect) {
- elm_object_item_signal_emit(pNormalView->pNaviItem, VP_NORMAL_SIGNAL_NAVIFRAME_TITLE_NO_EFFECT_HIDE, "elm");
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_NO_EFFECT_HIDE, "*");
+ elm_object_item_signal_emit(pNormalView->pNaviItem,
+ VP_NORMAL_SIGNAL_NAVIFRAME_TITLE_NO_EFFECT_HIDE,
+ "elm");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_NO_EFFECT_HIDE, "*");
} else {
- elm_object_item_signal_emit(pNormalView->pNaviItem, VP_NORMAL_SIGNAL_NAVIFRAME_TITLE_HIDE, "elm");
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_HIDE, "*");
- }
- vp_play_normal_view_set_main_layout_focus_out((void *)pPlayView->pNormalView);
+ elm_object_item_signal_emit(pNormalView->pNaviItem,
+ VP_NORMAL_SIGNAL_NAVIFRAME_TITLE_HIDE,
+ "elm");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_HIDE, "*");
+ }
+ vp_play_normal_view_set_main_layout_focus_out((void *) pPlayView->
+ pNormalView);
pNormalView->bShowLayout = FALSE;
}
-static double _vp_play_normal_view_get_mouse_pos_ratio(Evas_Object *pObj, int nCurX)
+static double _vp_play_normal_view_get_mouse_pos_ratio(Evas_Object * pObj,
+ int nCurX)
{
if (!pObj) {
VideoLogError("pObj is NULL");
nCurrent = nWidth;
}
- dRatio = (double)nCurrent / nWidth;
+ dRatio = (double) nCurrent / nWidth;
return dRatio;
}
-static void _vp_play_normal_view_create_progress_timer(NormalView *pNormalView)
+static void _vp_play_normal_view_create_progress_timer(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
VP_EVAS_TIMER_DEL(pNormalView->pProgressTimer);
pNormalView->pProgressTimer =
- ecore_timer_add(VP_NORMAL_PROGRESS_TIMER_INTERVAL,
- __vp_normal_progressbar_timer_cb, (void *)pNormalView);
+ ecore_timer_add(VP_NORMAL_PROGRESS_TIMER_INTERVAL,
+ __vp_normal_progressbar_timer_cb,
+ (void *) pNormalView);
}
-static void _vp_play_normal_view_create_layout_hide_timer(NormalView *pNormalView)
+static void _vp_play_normal_view_create_layout_hide_timer(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
VP_EVAS_TIMER_DEL(pNormalView->pHideTimer);
VP_EVAS_TIMER_DEL(pNormalView->pHideFinishTimer);
- pNormalView->pHideTimer = ecore_timer_add(VP_NORMAL_HIDE_LAYOUT_TIMER_INTERVAL,
- __vp_normal_hide_layout_timer_cb, (void *)pNormalView);
+ pNormalView->pHideTimer =
+ ecore_timer_add(VP_NORMAL_HIDE_LAYOUT_TIMER_INTERVAL,
+ __vp_normal_hide_layout_timer_cb,
+ (void *) pNormalView);
}
-static void _vp_play_normal_view_show_rotate(NormalView *pNormalView)
+static void _vp_play_normal_view_show_rotate(NormalView * pNormalView)
{
bool bLockState = FALSE;
if (!bLockState) {
if (pNormalView->pMainLayout) {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_ROTATE_SHOW, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_ROTATE_SHOW, "*");
}
}
}
-static void _vp_play_normal_view_show_volume(NormalView *pNormalView)
+static void _vp_play_normal_view_show_volume(NormalView * pNormalView)
{
bool bLockState = FALSE;
- /*if (!vp_play_config_get_rotate_lock_status(&bLockState)) {
- VideoLogError("vp_play_config_get_rotate_lock_status is fail");
- return;
- }*/
-
if (!bLockState) {
if (pNormalView->pMainLayout) {
- if ((pNormalView->fPlaySpeed - 0.05) > 1.000 || (pNormalView->fPlaySpeed + 0.05) < 1.000) {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_PLAYING_SPEED_SHOW, "*");
- elm_object_signal_callback_add(pNormalView->pMainLayout, "elm,action,click", "", _vp_play_normal_view_on_play_speed_popup_cb, pNormalView);
+ if ((pNormalView->fPlaySpeed - 0.05) > 1.000
+ || (pNormalView->fPlaySpeed + 0.05) < 1.000) {
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_PLAYING_SPEED_SHOW,
+ "*");
+ elm_object_signal_callback_add(pNormalView->pMainLayout,
+ "elm,action,click", "",
+ _vp_play_normal_view_on_play_speed_popup_cb,
+ pNormalView);
_vp_play_normal_view_create_layout_hide_timer(pNormalView);
} else {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_PLAYING_SPEED_HIDE, "*");
- }
- char szTxt[5] = {0,};
- snprintf(szTxt, 5, "%1.1fX", (float)pNormalView->fPlaySpeed);
- elm_object_part_text_set(pNormalView->pMainLayout, VP_PLAY_PART_NORMAL_PLAYING_SPEED_TXT, szTxt);
- }
- bool bLandscape = vp_play_util_get_landscape_check(pNormalView->nRotate);
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_PLAYING_SPEED_HIDE,
+ "*");
+ }
+ char szTxt[5] = { 0, };
+ snprintf(szTxt, 5, "%1.1fX", (float) pNormalView->fPlaySpeed);
+ elm_object_part_text_set(pNormalView->pMainLayout,
+ VP_PLAY_PART_NORMAL_PLAYING_SPEED_TXT,
+ szTxt);
+ }
+ bool bLandscape =
+ vp_play_util_get_landscape_check(pNormalView->nRotate);
if (bLandscape) {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_VOLUME_LANDSCAPE_SHOW, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_VOLUME_LANDSCAPE_SHOW,
+ "*");
} else {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_VOLUME_PORTRAIT_SHOW, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_VOLUME_PORTRAIT_SHOW,
+ "*");
}
}
}
-static void _vp_play_normal_view_set_rotate_lock_state(NormalView *pNormalView)
+static void _vp_play_normal_view_set_rotate_lock_state(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
return;
}
- /*if (!pNormalView->pSoundPathBtn) {
- elm_object_item_part_content_unset(pNormalView->pNaviItem, "title_right_btn");
- }
- else*/
- {
- if (pNormalView->pMainLayout) {
- elm_object_part_content_unset(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_ROTATE);
- }
+ if (pNormalView->pMainLayout) {
+ elm_object_part_content_unset(pNormalView->pMainLayout,
+ VP_PLAY_SWALLOW_NORMAL_ROTATE);
}
VP_EVAS_DEL(pNormalView->pRotateBtn);
pNormalView->pRotateBtn = NULL;
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_RESROUCE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_RESROUCE_EDJ_PATH);
free(path);
Evas_Object *pParent = NULL;
if (!pNormalView->pSoundPathBtn) {
}
if (!bLockState) {
- pNormalView->pRotateBtn = vp_button_create(
- pParent, "custom/flat_46_46/default",
- VP_PLAY_STRING_COM_ROTATE,
- (Evas_Smart_Cb)__vp_normal_control_btn_clicked_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_press_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_unpress_cb,
- (void *)pNormalView);
+ pNormalView->pRotateBtn =
+ vp_button_create(pParent, "custom/flat_46_46/default",
+ VP_PLAY_STRING_COM_ROTATE,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_clicked_cb,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_press_cb,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_unpress_cb,
+ (void *) pNormalView);
Evas_Object *pIcon = NULL;
- pIcon = vp_button_create_icon(pNormalView->pRotateBtn, edj_path, VP_PLAY_NORMAL_RES_ROTATE);
- elm_object_part_content_set(pNormalView->pRotateBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pRotateBtn, edj_path, VP_PLAY_NORMAL_RES_ROTATE_PRESS);
- elm_object_part_content_set(pNormalView->pRotateBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
+ pIcon =
+ vp_button_create_icon(pNormalView->pRotateBtn, edj_path,
+ VP_PLAY_NORMAL_RES_ROTATE);
+ elm_object_part_content_set(pNormalView->pRotateBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pRotateBtn, edj_path,
+ VP_PLAY_NORMAL_RES_ROTATE_PRESS);
+ elm_object_part_content_set(pNormalView->pRotateBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON,
+ pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pRotateBtn, edj_path,
+ VP_PLAY_NORMAL_RES_ROTATE_DIM);
+ elm_object_part_content_set(pNormalView->pRotateBtn,
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON,
+ pIcon);
- pIcon = vp_button_create_icon(pNormalView->pRotateBtn, edj_path, VP_PLAY_NORMAL_RES_ROTATE_DIM);
- elm_object_part_content_set(pNormalView->pRotateBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
-
- /*if (!pNormalView->pSoundPathBtn) {
- elm_object_item_part_content_set(pNormalView->pNaviItem, "title_right_btn", pNormalView->pRotateBtn);
- }
- else */
- {
- if (pNormalView->pMainLayout) {
- elm_object_part_content_set(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_ROTATE, pNormalView->pRotateBtn);
- }
+ if (pNormalView->pMainLayout) {
+ elm_object_part_content_set(pNormalView->pMainLayout,
+ VP_PLAY_SWALLOW_NORMAL_ROTATE,
+ pNormalView->pRotateBtn);
}
}
}
-static void _vp_play_normal_view_set_volume_lock_state(NormalView *pNormalView)
+static void _vp_play_normal_view_set_volume_lock_state(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
}
bool bLockState = FALSE;
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_RESROUCE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_RESROUCE_EDJ_PATH);
free(path);
- /*if (!vp_play_config_get_rotate_lock_status(&bLockState)) {
- VideoLogError("vp_play_config_get_rotate_lock_status is fail");
- return;
- }*/
-
- /*if (!pNormalView->pSoundPathBtn) {
- elm_object_item_part_content_unset(pNormalView->pNaviItem, "title_right_btn");
- }
- else*/
- {
- if (pNormalView->pMainLayout) {
- elm_object_part_content_unset(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_VOLUME);
- }
+ if (pNormalView->pMainLayout) {
+ elm_object_part_content_unset(pNormalView->pMainLayout,
+ VP_PLAY_SWALLOW_NORMAL_VOLUME);
}
VP_EVAS_DEL(pNormalView->pVolumeBtn);
}
if (!bLockState) {
- pNormalView->pVolumeBtn = vp_button_create(
- pParent, "custom/flat_46_46/default", VP_PLAY_STRING_COM_VOLUME,
- (Evas_Smart_Cb)__vp_normal_function_btn_clicked_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_press_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_unpress_cb,
- (void *)pNormalView);
+ pNormalView->pVolumeBtn =
+ vp_button_create(pParent, "custom/flat_46_46/default",
+ VP_PLAY_STRING_COM_VOLUME,
+ (Evas_Smart_Cb)
+ __vp_normal_function_btn_clicked_cb,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_press_cb,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_unpress_cb,
+ (void *) pNormalView);
if (!pNormalView->pVolumeBtn) {
VideoLogError("elm_button_add is fail");
return;
VideoLogError("nVolume = %d:", nVolume);
if ((nVolume == 0)) {
- pIcon = vp_button_create_icon(pNormalView->pVolumeBtn, edj_path, VP_PLAY_NORMAL_RES_MUTE);
- elm_object_part_content_set(pNormalView->pVolumeBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pVolumeBtn, edj_path, VP_PLAY_NORMAL_RES_MUTE_PRESS);
- elm_object_part_content_set(pNormalView->pVolumeBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pVolumeBtn, edj_path, VP_PLAY_NORMAL_RES_MUTE_DIM);
- elm_object_part_content_set(pNormalView->pVolumeBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
+ pIcon =
+ vp_button_create_icon(pNormalView->pVolumeBtn, edj_path,
+ VP_PLAY_NORMAL_RES_MUTE);
+ elm_object_part_content_set(pNormalView->pVolumeBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON,
+ pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pVolumeBtn, edj_path,
+ VP_PLAY_NORMAL_RES_MUTE_PRESS);
+ elm_object_part_content_set(pNormalView->pVolumeBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON,
+ pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pVolumeBtn, edj_path,
+ VP_PLAY_NORMAL_RES_MUTE_DIM);
+ elm_object_part_content_set(pNormalView->pVolumeBtn,
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON,
+ pIcon);
} else {
- pIcon = vp_button_create_icon(pNormalView->pVolumeBtn, edj_path, VP_PLAY_NORMAL_RES_VOLUME);
- elm_object_part_content_set(pNormalView->pVolumeBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pVolumeBtn, edj_path, VP_PLAY_NORMAL_RES_VOLUME_PRESS);
- elm_object_part_content_set(pNormalView->pVolumeBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pVolumeBtn, edj_path, VP_PLAY_NORMAL_RES_VOLUME_DIM);
- elm_object_part_content_set(pNormalView->pVolumeBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
+ pIcon =
+ vp_button_create_icon(pNormalView->pVolumeBtn, edj_path,
+ VP_PLAY_NORMAL_RES_VOLUME);
+ elm_object_part_content_set(pNormalView->pVolumeBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON,
+ pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pVolumeBtn, edj_path,
+ VP_PLAY_NORMAL_RES_VOLUME_PRESS);
+ elm_object_part_content_set(pNormalView->pVolumeBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON,
+ pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pVolumeBtn, edj_path,
+ VP_PLAY_NORMAL_RES_VOLUME_DIM);
+ elm_object_part_content_set(pNormalView->pVolumeBtn,
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON,
+ pIcon);
}
if (pNormalView->pMainLayout) {
- elm_object_part_content_set(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_VOLUME, pNormalView->pVolumeBtn);
+ elm_object_part_content_set(pNormalView->pMainLayout,
+ VP_PLAY_SWALLOW_NORMAL_VOLUME,
+ pNormalView->pVolumeBtn);
}
}
}
-static void _vp_play_normal_view_set_sound_path_state(NormalView *pNormalView)
+static void _vp_play_normal_view_set_sound_path_state(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
vp_sound_is_sound_path_enable(&bSoundPath);
- bEarjack = vp_sound_device_is_enable(VP_SOUND_DEVICE_EARJACK, pNormalView->pPlayView);
+ bEarjack =
+ vp_sound_device_is_enable(VP_SOUND_DEVICE_EARJACK,
+ pNormalView->pPlayView);
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_RESROUCE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_RESROUCE_EDJ_PATH);
free(path);
if (pNormalView->bEarjackConnect != bEarjack) {
if (bEarjack == FALSE) {
pNormalView->bEarjackConnect = bEarjack;
- if (!vp_play_preference_get_sound_alive_status(&pNormalView->nSoundAlive)) {
+ if (!vp_play_preference_get_sound_alive_status
+ (&pNormalView->nSoundAlive)) {
VideoLogError("vp_play_preference_get_sound_alive_status failed");
}
if (bEarjack == FALSE && pNormalView->nSoundAlive == VIDEO_SA_7_1_CH) {
pNormalView->nSoundAlive = VIDEO_SA_NORMAL;
- if (!vp_play_preference_set_sound_alive_status(pNormalView->nSoundAlive)) {
- VideoLogError("vp_play_preference_set_sound_alive_status failed");
+ if (!vp_play_preference_set_sound_alive_status
+ (pNormalView->nSoundAlive)) {
+ VideoLogError
+ ("vp_play_preference_set_sound_alive_status failed");
}
- if (!vp_mm_player_set_sound_filter(pNormalView->pPlayerHandle, VP_MM_PLAYER_FILTER_NONE)) {
+ if (!vp_mm_player_set_sound_filter
+ (pNormalView->pPlayerHandle, VP_MM_PLAYER_FILTER_NONE)) {
VideoLogWarning("vp_mm_player_set_sound_filter is fail");
}
}
- elm_object_item_part_content_unset(pNormalView->pNaviItem, "title_right_btn");
+ elm_object_item_part_content_unset(pNormalView->pNaviItem,
+ "title_right_btn");
VideoLogInfo("rotate_lock_state_sound:%d", bSoundPath);
VP_EVAS_DEL(pNormalView->pSoundPathBtn);
break;
}
- pNormalView->pSoundPathBtn = vp_navirame_button_create(pNormalView->pNaviFrame, "custom/navi_button/default", edj_path,
- (const char *)szIconPath, (Evas_Smart_Cb)__vp_normal_control_btn_clicked_cb, (void *)pNormalView);
+ pNormalView->pSoundPathBtn =
+ vp_navirame_button_create(pNormalView->pNaviFrame,
+ "custom/navi_button/default",
+ edj_path, (const char *) szIconPath,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_clicked_cb,
+ (void *) pNormalView);
- elm_object_item_part_content_set(pNormalView->pNaviItem, "title_right_btn", pNormalView->pSoundPathBtn);
+ elm_object_item_part_content_set(pNormalView->pNaviItem,
+ "title_right_btn",
+ pNormalView->pSoundPathBtn);
}
}
-static void _vp_play_normal_view_set_play_state(NormalView *pNormalView)
+static void _vp_play_normal_view_set_play_state(NormalView * pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
VideoLogWarning("vp_mm_player_get_state is fail");
}
- if (pPlayView->bAVRCP && nState != VP_MM_PLAYER_STATE_NONE && nState != VP_MM_PLAYER_STATE_IDLE) {
+ if (pPlayView->bAVRCP && nState != VP_MM_PLAYER_STATE_NONE
+ && nState != VP_MM_PLAYER_STATE_IDLE) {
vp_avrcp_noti_player_state(nState);
}
if (nState == VP_MM_PLAYER_STATE_PLAYING) {
VideoLogWarning("VP_MM_PLAYER_STATE_PLAYING");
evas_object_show(pNormalView->pPauseBtn);
-// elm_object_focus_set(pNormalView->pPauseBtn, EINA_TRUE);
- elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_PLAY, pNormalView->pPauseBtn);
+ elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_PLAY,
+ pNormalView->pPauseBtn);
evas_object_hide(pNormalView->pResumeBtn);
if (!pNormalView->pProgressTimer) {
_vp_play_normal_view_create_progress_timer(pNormalView);
}
- vp_play_util_set_lock_power_key();
+ if (!pNormalView->bAudioOnly) {
+ vp_play_util_set_lock_power_key();
+ }
vp_play_progressbar_set_opacity(pNormalView->pProgressbar, FALSE);
} else {
VideoLogWarning("Play_Status[%d]", nState);
evas_object_show(pNormalView->pResumeBtn);
- elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_PLAY, pNormalView->pResumeBtn);
+ elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_PLAY,
+ pNormalView->pResumeBtn);
evas_object_hide(pNormalView->pPauseBtn);
VP_EVAS_TIMER_DEL(pNormalView->pProgressTimer);
VideoLogWarning("STATUS[%d]", nState);
}
-static Evas_Object *_vp_play_normal_view_create_main_layout(Evas_Object *pParent)
+static Evas_Object *_vp_play_normal_view_create_main_layout(Evas_Object *
+ pParent)
{
if (!pParent) {
VideoLogError("Parent is NULL");
VideoLogError("elm_layout_add object is NULL");
return NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_NORMAL_MAIN_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_NORMAL_MAIN_EDJ);
free(path);
- bRet = elm_layout_file_set(pObj, edj_path, VP_PLAY_EDJ_GROUP_NORMAL_MAIN);
+ bRet =
+ elm_layout_file_set(pObj, edj_path, VP_PLAY_EDJ_GROUP_NORMAL_MAIN);
if (bRet != EINA_TRUE) {
- VideoLogError("elm_layout_file_set fail : %s [%s]", edj_path, VP_PLAY_EDJ_GROUP_NORMAL_MAIN);
+ VideoLogError("elm_layout_file_set fail : %s [%s]", edj_path,
+ VP_PLAY_EDJ_GROUP_NORMAL_MAIN);
}
evas_object_show(pObj);
return pObj;
}
-static bool _vp_play_normal_view_create_gesture_layout(NormalView *pNormalView)
+static bool _vp_play_normal_view_create_gesture_layout(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("Parent is NULL");
Eina_Bool bRet = EINA_FALSE;
pParent = pPlayView->pMainLayout;
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_GESTURE_EDJ);
free(path);
pNormalView->pMainEventRect = elm_layout_add(pParent);
- bRet = elm_layout_file_set(pNormalView->pMainEventRect, edj_path, VP_PLAY_EDJ_GROUP_GESTURE);
+ bRet =
+ elm_layout_file_set(pNormalView->pMainEventRect, edj_path,
+ VP_PLAY_EDJ_GROUP_GESTURE);
if (bRet != EINA_TRUE) {
- VideoLogError("elm_layout_file_set fail : %s [%s]", edj_path, VP_PLAY_EDJ_GROUP_GESTURE);
+ VideoLogError("elm_layout_file_set fail : %s [%s]", edj_path,
+ VP_PLAY_EDJ_GROUP_GESTURE);
return FALSE;
}
- elm_object_part_content_set(pParent, "elm.swallow.event", pNormalView->pMainEventRect);
+ elm_object_part_content_set(pParent, "elm.swallow.event",
+ pNormalView->pMainEventRect);
- pNormalView->pGestureRect = elm_gesture_layer_add(pNormalView->pMainEventRect);
+ pNormalView->pGestureRect =
+ elm_gesture_layer_add(pNormalView->pMainEventRect);
if (!pNormalView->pGestureRect) {
VideoLogError("elm_gesture_layer_add is NULL");
return FALSE;
}
- elm_gesture_layer_hold_events_set(pNormalView->pGestureRect, EINA_FALSE);
+ elm_gesture_layer_hold_events_set(pNormalView->pGestureRect,
+ EINA_FALSE);
elm_gesture_layer_cb_set(pNormalView->pGestureRect, ELM_GESTURE_N_TAPS,
- ELM_GESTURE_STATE_START, __vp_normal_gesture_n_tab_start_cb, (void *)pNormalView);
+ ELM_GESTURE_STATE_START,
+ __vp_normal_gesture_n_tab_start_cb,
+ (void *) pNormalView);
elm_gesture_layer_cb_set(pNormalView->pGestureRect, ELM_GESTURE_N_TAPS,
- ELM_GESTURE_STATE_END, __vp_normal_gesture_n_tab_end_cb, (void *)pNormalView);
+ ELM_GESTURE_STATE_END,
+ __vp_normal_gesture_n_tab_end_cb,
+ (void *) pNormalView);
elm_gesture_layer_cb_set(pNormalView->pGestureRect, ELM_GESTURE_N_TAPS,
- ELM_GESTURE_STATE_ABORT, __vp_normal_gesture_n_tab_abort_cb, (void *)pNormalView);
-
- elm_gesture_layer_cb_set(pNormalView->pGestureRect, ELM_GESTURE_MOMENTUM,
- ELM_GESTURE_STATE_START, __vp_normal_gesture_momentum_start_cb, (void *)pNormalView);
- elm_gesture_layer_cb_set(pNormalView->pGestureRect, ELM_GESTURE_MOMENTUM,
- ELM_GESTURE_STATE_END, __vp_normal_gesture_momentum_end_cb, (void *)pNormalView);
- elm_gesture_layer_cb_set(pNormalView->pGestureRect, ELM_GESTURE_MOMENTUM,
- ELM_GESTURE_STATE_ABORT, __vp_normal_gesture_momentum_end_cb, (void *)pNormalView);
- elm_gesture_layer_cb_set(pNormalView->pGestureRect, ELM_GESTURE_MOMENTUM,
- ELM_GESTURE_STATE_MOVE, __vp_normal_gesture_momentum_move_cb, (void *)pNormalView);
+ ELM_GESTURE_STATE_ABORT,
+ __vp_normal_gesture_n_tab_abort_cb,
+ (void *) pNormalView);
+
+ elm_gesture_layer_cb_set(pNormalView->pGestureRect,
+ ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_START,
+ __vp_normal_gesture_momentum_start_cb,
+ (void *) pNormalView);
+ elm_gesture_layer_cb_set(pNormalView->pGestureRect,
+ ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_END,
+ __vp_normal_gesture_momentum_end_cb,
+ (void *) pNormalView);
+ elm_gesture_layer_cb_set(pNormalView->pGestureRect,
+ ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_ABORT,
+ __vp_normal_gesture_momentum_end_cb,
+ (void *) pNormalView);
+ elm_gesture_layer_cb_set(pNormalView->pGestureRect,
+ ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_MOVE,
+ __vp_normal_gesture_momentum_move_cb,
+ (void *) pNormalView);
#ifdef ENABLE_GESTURE_ZOOM_FEATURE
elm_gesture_layer_cb_set(pNormalView->pGestureRect, ELM_GESTURE_ZOOM,
- ELM_GESTURE_STATE_START, __vp_normal_gesture_zoom_start_cb, (void *)pNormalView);
+ ELM_GESTURE_STATE_START,
+ __vp_normal_gesture_zoom_start_cb,
+ (void *) pNormalView);
elm_gesture_layer_cb_set(pNormalView->pGestureRect, ELM_GESTURE_ZOOM,
- ELM_GESTURE_STATE_END, __vp_normal_gesture_zoom_end_cb, (void *)pNormalView);
+ ELM_GESTURE_STATE_END,
+ __vp_normal_gesture_zoom_end_cb,
+ (void *) pNormalView);
elm_gesture_layer_cb_set(pNormalView->pGestureRect, ELM_GESTURE_ZOOM,
- ELM_GESTURE_STATE_ABORT, __vp_normal_gesture_zoom_abort_cb, (void *)pNormalView);
+ ELM_GESTURE_STATE_ABORT,
+ __vp_normal_gesture_zoom_abort_cb,
+ (void *) pNormalView);
elm_gesture_layer_cb_set(pNormalView->pGestureRect, ELM_GESTURE_ZOOM,
- ELM_GESTURE_STATE_MOVE, __vp_normal_gesture_zoom_move_cb, (void *)pNormalView);
+ ELM_GESTURE_STATE_MOVE,
+ __vp_normal_gesture_zoom_move_cb,
+ (void *) pNormalView);
#endif
- elm_gesture_layer_cb_set(pNormalView->pGestureRect, ELM_GESTURE_N_DOUBLE_TAPS,
- ELM_GESTURE_STATE_START, __vp_normal_gesture_double_click_start_cb, (void *)pNormalView);
- elm_gesture_layer_cb_set(pNormalView->pGestureRect, ELM_GESTURE_N_DOUBLE_TAPS,
- ELM_GESTURE_STATE_END, __vp_normal_gesture_double_click_end_cb, (void *)pNormalView);
- elm_gesture_layer_cb_set(pNormalView->pGestureRect, ELM_GESTURE_N_DOUBLE_TAPS,
- ELM_GESTURE_STATE_ABORT, __vp_normal_gesture_double_click_abort_cb, (void *)pNormalView);
+ elm_gesture_layer_cb_set(pNormalView->pGestureRect,
+ ELM_GESTURE_N_DOUBLE_TAPS,
+ ELM_GESTURE_STATE_START,
+ __vp_normal_gesture_double_click_start_cb,
+ (void *) pNormalView);
+ elm_gesture_layer_cb_set(pNormalView->pGestureRect,
+ ELM_GESTURE_N_DOUBLE_TAPS,
+ ELM_GESTURE_STATE_END,
+ __vp_normal_gesture_double_click_end_cb,
+ (void *) pNormalView);
+ elm_gesture_layer_cb_set(pNormalView->pGestureRect,
+ ELM_GESTURE_N_DOUBLE_TAPS,
+ ELM_GESTURE_STATE_ABORT,
+ __vp_normal_gesture_double_click_abort_cb,
+ (void *) pNormalView);
#ifdef FLICK_JUMP
- elm_gesture_layer_cb_set(pNormalView->pGestureRect, ELM_GESTURE_N_FLICKS,
- ELM_GESTURE_STATE_START, __vp_normal_gesture_flick_start_cb, (void *)pNormalView);
- elm_gesture_layer_cb_set(pNormalView->pGestureRect, ELM_GESTURE_N_FLICKS,
- ELM_GESTURE_STATE_END, __vp_normal_gesture_flick_end_cb, (void *)pNormalView);
- elm_gesture_layer_cb_set(pNormalView->pGestureRect, ELM_GESTURE_N_FLICKS,
- ELM_GESTURE_STATE_ABORT, __vp_normal_gesture_flick_abort_cb, (void *)pNormalView);
+ elm_gesture_layer_cb_set(pNormalView->pGestureRect,
+ ELM_GESTURE_N_FLICKS, ELM_GESTURE_STATE_START,
+ __vp_normal_gesture_flick_start_cb,
+ (void *) pNormalView);
+ elm_gesture_layer_cb_set(pNormalView->pGestureRect,
+ ELM_GESTURE_N_FLICKS, ELM_GESTURE_STATE_END,
+ __vp_normal_gesture_flick_end_cb,
+ (void *) pNormalView);
+ elm_gesture_layer_cb_set(pNormalView->pGestureRect,
+ ELM_GESTURE_N_FLICKS, ELM_GESTURE_STATE_ABORT,
+ __vp_normal_gesture_flick_abort_cb,
+ (void *) pNormalView);
#endif
elm_gesture_layer_line_angular_tolerance_set(pNormalView->pGestureRect, 60); // 60 degree ??
- elm_gesture_layer_attach(pNormalView->pGestureRect, pNormalView->pMainEventRect);
+ elm_gesture_layer_attach(pNormalView->pGestureRect,
+ pNormalView->pMainEventRect);
evas_object_show(pNormalView->pMainEventRect);
return TRUE;
}
-static Evas_Object *_vp_play_normal_view_create_top_control_layout(Evas_Object *pParent)
+static Evas_Object
+ *_vp_play_normal_view_create_top_control_layout(Evas_Object * pParent)
{
if (!pParent) {
VideoLogError("Parent is NULL");
VideoLogError("elm_layout_add object is NULL");
return NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_NORMAL_TOP_CONTROL_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_NORMAL_TOP_CONTROL_EDJ);
free(path);
- bRet = elm_layout_file_set(pObj, edj_path, VP_PLAY_EDJ_GROUP_NORMAL_TOP_CONTROL);
+ bRet =
+ elm_layout_file_set(pObj, edj_path,
+ VP_PLAY_EDJ_GROUP_NORMAL_TOP_CONTROL);
if (bRet != EINA_TRUE) {
VideoLogError("elm_layout_file_set fail");
}
return pObj;
}
-static Evas_Object *_vp_play_normal_view_create_control_layout(Evas_Object *pParent)
+static Evas_Object *_vp_play_normal_view_create_control_layout(Evas_Object
+ *pParent)
{
if (!pParent) {
VideoLogError("Parent is NULL");
VideoLogError("elm_layout_add object is NULL");
return NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_NORMAL_CONTROL_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_NORMAL_CONTROL_EDJ);
free(path);
- bRet = elm_layout_file_set(pObj, edj_path, VP_PLAY_EDJ_GROUP_NORMAL_CONTROL);
+ bRet =
+ elm_layout_file_set(pObj, edj_path,
+ VP_PLAY_EDJ_GROUP_NORMAL_CONTROL);
if (bRet != EINA_TRUE) {
VideoLogError("elm_layout_file_set fail");
}
return pObj;
}
-static Evas_Object *_vp_play_normal_view_create_function_layout(Evas_Object *pParent)
+static Evas_Object *_vp_play_normal_view_create_function_layout(Evas_Object
+ *pParent)
{
if (!pParent) {
VideoLogError("Parent is NULL");
VideoLogError("elm_layout_add object is NULL");
return NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_NORMAL_FUNCTION_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_NORMAL_FUNCTION_EDJ_PATH);
free(path);
- bRet = elm_layout_file_set(pObj, edj_path, VP_PLAY_EDJ_GROUP_NORMAL_FUNCTION);
+ bRet =
+ elm_layout_file_set(pObj, edj_path,
+ VP_PLAY_EDJ_GROUP_NORMAL_FUNCTION);
if (bRet != EINA_TRUE) {
VideoLogError("elm_layout_file_set fail");
}
return pObj;
}
-static void _vp_normal_view_top_layout_del_cb(void *data, Evas *e,
- Evas_Object *obj,
- void *event_info)
+static void _vp_normal_view_top_layout_del_cb(void *data, Evas * e,
+ Evas_Object * obj,
+ void *event_info)
{
if (!data) {
VideoLogError("pNormalView is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)data;
+ NormalView *pNormalView = (NormalView *) data;
pNormalView->pTopControlLayout = NULL;
}
-static bool _vp_play_normal_view_create_top_control(NormalView *pNormalView)
+static bool _vp_play_normal_view_create_top_control(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
VideoLogInfo("create top control");
- pNormalView->pTopControlLayout = _vp_play_normal_view_create_top_control_layout(pNormalView->pMainLayout);
+ pNormalView->pTopControlLayout =
+ _vp_play_normal_view_create_top_control_layout(pNormalView->
+ pMainLayout);
if (!pNormalView->pTopControlLayout) {
VideoLogError("pNormalView->pTopControlLayout is NULL");
return FALSE;
}
- evas_object_event_callback_add(pNormalView->pTopControlLayout, EVAS_CALLBACK_DEL, _vp_normal_view_top_layout_del_cb, (void *)pNormalView);
+ evas_object_event_callback_add(pNormalView->pTopControlLayout,
+ EVAS_CALLBACK_DEL,
+ _vp_normal_view_top_layout_del_cb,
+ (void *) pNormalView);
- elm_object_part_content_set(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_TOP_CONTROL, pNormalView->pTopControlLayout);
+ elm_object_part_content_set(pNormalView->pMainLayout,
+ VP_PLAY_SWALLOW_NORMAL_TOP_CONTROL,
+ pNormalView->pTopControlLayout);
_vp_play_normal_view_on_capture_mode(pNormalView);
_vp_play_normal_view_set_sound_path_state(pNormalView);
return TRUE;
}
-static void _vp_play_normal_view_control_layout_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+static void _vp_play_normal_view_control_layout_del_cb(void *data,
+ Evas * e,
+ Evas_Object * obj,
+ void *event_info)
{
if (!data) {
VideoLogError("pNormalView is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)data;
+ NormalView *pNormalView = (NormalView *) data;
if (pNormalView->pControlLayout) {
- evas_object_event_callback_del(pNormalView->pControlLayout, EVAS_CALLBACK_DEL, _vp_play_normal_view_control_layout_del_cb);
+ evas_object_event_callback_del(pNormalView->pControlLayout,
+ EVAS_CALLBACK_DEL,
+ _vp_play_normal_view_control_layout_del_cb);
pNormalView->pControlLayout = NULL;
pNormalView->pResumeBtn = NULL;
pNormalView->pPauseBtn = NULL;
pNormalView->pScreenSizeBtn = NULL;
}
}
-/*
-static void _vp_play_normal_view_bookmark_object_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
- if (!data) {
- VideoLogError("pNormalView is NULL");
- return;
- }
- NormalView *pNormalView = (NormalView *)data;
- if (pNormalView->pBookmarkObj) {
- evas_object_event_callback_del(pNormalView->pBookmarkObj, EVAS_CALLBACK_DEL, _vp_play_normal_view_bookmark_object_del_cb);
- pNormalView->pBookmarkObj = NULL;
- }
-}
-*/
-static bool _vp_play_normal_view_create_main_control(NormalView *pNormalView)
+static bool _vp_play_normal_view_create_main_control(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
Evas_Object *pParent = NULL;
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_RESROUCE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_RESROUCE_EDJ_PATH);
free(path);
- pNormalView->pControlLayout = _vp_play_normal_view_create_control_layout(pNormalView->pMainLayout);
+ pNormalView->pControlLayout =
+ _vp_play_normal_view_create_control_layout(pNormalView->
+ pMainLayout);
if (!pNormalView->pControlLayout) {
VideoLogError("pNormalView->pControlLayout is NULL");
return FALSE;
}
- elm_object_focus_custom_chain_append(pNormalView->pMainLayout, pNormalView->pControlLayout, NULL);
+ elm_object_focus_custom_chain_append(pNormalView->pMainLayout,
+ pNormalView->pControlLayout,
+ NULL);
- elm_object_part_content_set(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_CONTROL, pNormalView->pControlLayout);
- evas_object_event_callback_add(pNormalView->pControlLayout, EVAS_CALLBACK_DEL,
- _vp_play_normal_view_control_layout_del_cb,
- (void *)pNormalView);
+ elm_object_part_content_set(pNormalView->pMainLayout,
+ VP_PLAY_SWALLOW_NORMAL_CONTROL,
+ pNormalView->pControlLayout);
+ evas_object_event_callback_add(pNormalView->pControlLayout,
+ EVAS_CALLBACK_DEL,
+ _vp_play_normal_view_control_layout_del_cb,
+ (void *) pNormalView);
pParent = pNormalView->pControlLayout;
- pNormalView->pResumeBtn = vp_button_create(
- pParent, "custom/circle_1/default", VP_PLAY_STRING_COM_PLAY,
- (Evas_Smart_Cb)__vp_normal_control_btn_clicked_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_press_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_unpress_cb,
- (void *)pNormalView);
+ pNormalView->pResumeBtn =
+ vp_button_create(pParent, "custom/circle_1/default",
+ VP_PLAY_STRING_COM_PLAY,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_clicked_cb,
+ (Evas_Smart_Cb) __vp_normal_control_btn_press_cb,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_unpress_cb,
+ (void *) pNormalView);
if (!pNormalView->pResumeBtn) {
VideoLogError("elm_button_add is fail");
return FALSE;
}
- pNormalView->pPauseBtn = vp_button_create(
- pParent, "custom/circle_1_focus/default", VP_PLAY_STRING_COM_PAUSE,
- (Evas_Smart_Cb)__vp_normal_control_btn_clicked_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_press_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_unpress_cb,
- (void *)pNormalView);
+ pNormalView->pPauseBtn =
+ vp_button_create(pParent, "custom/circle_1_focus/default",
+ VP_PLAY_STRING_COM_PAUSE,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_clicked_cb,
+ (Evas_Smart_Cb) __vp_normal_control_btn_press_cb,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_unpress_cb,
+ (void *) pNormalView);
if (!pNormalView->pPauseBtn) {
VideoLogError("elm_button_add is fail");
return FALSE;
}
- pNormalView->pPlayFocusBtn = vp_button_create(
- pParent, "focus", NULL,
- (Evas_Smart_Cb)__vp_normal_control_btn_clicked_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_press_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_unpress_cb,
- (void *)pNormalView);
+ pNormalView->pPlayFocusBtn = vp_button_create(pParent, "focus", NULL,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_clicked_cb,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_press_cb,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_unpress_cb,
+ (void *) pNormalView);
if (!pNormalView->pPlayFocusBtn) {
VideoLogError("elm_button_add is fail");
return FALSE;
}
- pNormalView->pPrevBtn = vp_button_create(
- pParent, "custom/circle_2/default", VP_PLAY_STRING_COM_PREVIOUS,
- (Evas_Smart_Cb)__vp_normal_control_btn_clicked_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_press_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_unpress_cb,
- (void *)pNormalView);
+ pNormalView->pPrevBtn =
+ vp_button_create(pParent, "custom/circle_2/default",
+ VP_PLAY_STRING_COM_PREVIOUS,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_clicked_cb,
+ (Evas_Smart_Cb) __vp_normal_control_btn_press_cb,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_unpress_cb,
+ (void *) pNormalView);
if (!pNormalView->pPrevBtn) {
VideoLogError("elm_button_add is fail");
return FALSE;
}
- pNormalView->pNextBtn = vp_button_create(
- pParent, "custom/circle_3/default", VP_PLAY_STRING_COM_NEXT,
- (Evas_Smart_Cb)__vp_normal_control_btn_clicked_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_press_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_unpress_cb,
- (void *)pNormalView);
+ pNormalView->pNextBtn =
+ vp_button_create(pParent, "custom/circle_3/default",
+ VP_PLAY_STRING_COM_NEXT,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_clicked_cb,
+ (Evas_Smart_Cb) __vp_normal_control_btn_press_cb,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_unpress_cb,
+ (void *) pNormalView);
if (!pNormalView->pNextBtn) {
VideoLogError("elm_button_add is fail");
return FALSE;
}
- pNormalView->pScreenSizeBtn = vp_button_create(
- pParent, "custom/flat_56_56/default", VP_PLAY_STRING_COM_FULL,
- (Evas_Smart_Cb)__vp_normal_function_btn_clicked_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_press_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_unpress_cb,
- (void *)pNormalView);
+ pNormalView->pScreenSizeBtn =
+ vp_button_create(pParent, "custom/flat_56_56/default",
+ VP_PLAY_STRING_COM_FULL,
+ (Evas_Smart_Cb)
+ __vp_normal_function_btn_clicked_cb,
+ (Evas_Smart_Cb) __vp_normal_control_btn_press_cb,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_unpress_cb,
+ (void *) pNormalView);
evas_object_color_set(pNormalView->pScreenSizeBtn, 0, 166, 191, 255);
if (!pNormalView->pScreenSizeBtn) {
VideoLogError("elm_button_add is fail");
return FALSE;
}
- /*
- pNormalView->pPopupBtn = vp_button_create(
- pParent, "playview/custom/flat_56_56/default", NULL,
- NULL,
- NULL,
- NULL,
- (void *)pNormalView);
- evas_object_color_set(pNormalView->pPopupBtn, 0, 166, 191, 255);
- if (!pNormalView->pPopupBtn) {
- VideoLogError("elm_button_add is fail");
- return FALSE;
- }
- */
- pNormalView->pLockBtn = vp_button_create(
- pNormalView->pMainLayout, "custom/flat_46_46/default", NULL,
- (Evas_Smart_Cb)__vp_normal_function_btn_clicked_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_press_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_unpress_cb,
- (void *)pNormalView);
+
+ pNormalView->pLockBtn =
+ vp_button_create(pNormalView->pMainLayout,
+ "custom/flat_46_46/default", NULL,
+ (Evas_Smart_Cb)
+ __vp_normal_function_btn_clicked_cb,
+ (Evas_Smart_Cb) __vp_normal_control_btn_press_cb,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_unpress_cb,
+ (void *) pNormalView);
if (!pNormalView->pLockBtn) {
VideoLogError("elm_button_add is fail");
return FALSE;
Evas_Object *pIcon = NULL;
- //elm_object_focus_allow_set(pNormalView->pPauseBtn, EINA_TRUE);
- //elm_object_focus_allow_set(pNormalView->pResumeBtn, EINA_TRUE);
- //elm_object_focus_set(pNormalView->pPauseBtn, EINA_TRUE);
- //elm_object_focus_set(pNormalView->pResumeBtn, EINA_TRUE);
-
- //elm_object_focus_custom_chain_append(pParent, pNormalView->pPlayFocusBtn, NULL);
-
- pIcon = vp_button_create_icon(pNormalView->pResumeBtn, edj_path, VP_PLAY_NORMAL_RES_RESUME);
- elm_object_part_content_set(pNormalView->pResumeBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pPauseBtn, edj_path, VP_PLAY_NORMAL_RES_PAUSE);
- elm_object_part_content_set(pNormalView->pPauseBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
-
- //pIcon = vp_button_create_icon(pNormalView->pPrevBtn, edj_path, VP_PLAY_NORMAL_RES_PREV);
- //elm_object_part_content_set(pNormalView->pPrevBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+ pIcon =
+ vp_button_create_icon(pNormalView->pResumeBtn, edj_path,
+ VP_PLAY_NORMAL_RES_RESUME);
+ elm_object_part_content_set(pNormalView->pResumeBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
- //pIcon = vp_button_create_icon(pNormalView->pNextBtn, edj_path, VP_PLAY_NORMAL_RES_NEXT);
- //elm_object_part_content_set(pNormalView->pNextBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
-
- /*
- pIcon = vp_button_create_icon(pNormalView->pPopupBtn, edj_path, VP_PLAY_NORMAL_RES_POPUP_PLAYER);
- elm_object_part_content_set(pNormalView->pPopupBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pPopupBtn, edj_path, VP_PLAY_NORMAL_RES_POPUP_PLAYER);
- elm_object_part_content_set(pNormalView->pPopupBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
- */
+ pIcon =
+ vp_button_create_icon(pNormalView->pPauseBtn, edj_path,
+ VP_PLAY_NORMAL_RES_PAUSE);
+ elm_object_part_content_set(pNormalView->pPauseBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
if (pNormalView->nDisplayMode == VP_MM_PLAYER_DISPLAY_FULL_SCREEN) {
- pIcon = vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path, VP_PLAY_NORMAL_RES_SCREEN_2_MODE);
- elm_object_part_content_set(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path, VP_PLAY_NORMAL_RES_SCREEN_2_MODE);
- elm_object_part_content_set(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
-
- //pIcon = vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path, VP_PLAY_NORMAL_RES_SCREEN_2_MODE_DIM);
- //elm_object_part_content_set(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
- } else if (pNormalView->nDisplayMode == VP_MM_PLAYER_DISPLAY_ORIGIN_SIZE) {
- pIcon = vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path, VP_PLAY_NORMAL_RES_SCREEN_1_MODE);
- elm_object_part_content_set(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+ pIcon =
+ vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path,
+ VP_PLAY_NORMAL_RES_SCREEN_2_MODE);
+ elm_object_part_content_set(pNormalView->pScreenSizeBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path,
+ VP_PLAY_NORMAL_RES_SCREEN_2_MODE);
+ elm_object_part_content_set(pNormalView->pScreenSizeBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON,
+ pIcon);
+
+ } else if (pNormalView->nDisplayMode ==
+ VP_MM_PLAYER_DISPLAY_ORIGIN_SIZE) {
+ pIcon =
+ vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path,
+ VP_PLAY_NORMAL_RES_SCREEN_1_MODE);
+ elm_object_part_content_set(pNormalView->pScreenSizeBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path,
+ VP_PLAY_NORMAL_RES_SCREEN_1_MODE);
+ elm_object_part_content_set(pNormalView->pScreenSizeBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON,
+ pIcon);
+ } else if (pNormalView->nDisplayMode ==
+ VP_MM_PLAYER_DISPLAY_ORIGIN_OR_LETTER) {
+ pIcon =
+ vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path,
+ VP_PLAY_NORMAL_RES_SCREEN_3_MODE);
+ elm_object_part_content_set(pNormalView->pScreenSizeBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
- pIcon = vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path, VP_PLAY_NORMAL_RES_SCREEN_1_MODE);
- elm_object_part_content_set(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
- } else if (pNormalView->nDisplayMode == VP_MM_PLAYER_DISPLAY_ORIGIN_OR_LETTER) {
- pIcon = vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path, VP_PLAY_NORMAL_RES_SCREEN_3_MODE);
- elm_object_part_content_set(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
-
- //pIcon = vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path, VP_PLAY_NORMAL_RES_SCREEN_3_MODE_PRESS);
- //elm_object_part_content_set(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
-
- //pIcon = vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path, VP_PLAY_NORMAL_RES_SCREEN_3_MODE_DIM);
- //elm_object_part_content_set(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
} else {
- pIcon = vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path, VP_PLAY_NORMAL_RES_SCREEN_1_MODE);
- elm_object_part_content_set(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+ pIcon =
+ vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path,
+ VP_PLAY_NORMAL_RES_SCREEN_1_MODE);
+ elm_object_part_content_set(pNormalView->pScreenSizeBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
- //pIcon = vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path, VP_PLAY_NORMAL_RES_SCREEN_1_MODE_PRESS);
- //elm_object_part_content_set(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
-
- //pIcon = vp_button_create_icon(pNormalView->pScreenSizeBtn, edj_path, VP_PLAY_NORMAL_RES_SCREEN_1_MODE_DIM);
- //elm_object_part_content_set(pNormalView->pScreenSizeBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
}
if (pNormalView->pResumeBtn) {
- elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_PLAY, pNormalView->pResumeBtn);
+ elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_PLAY,
+ pNormalView->pResumeBtn);
- elm_object_focus_custom_chain_append(pNormalView->pMainLayout, pNormalView->pResumeBtn, NULL);
+ elm_object_focus_custom_chain_append(pNormalView->pMainLayout,
+ pNormalView->pResumeBtn,
+ NULL);
}
if (pNormalView->pPlayFocusBtn) {
- elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_PLAY_FOCUS, pNormalView->pPlayFocusBtn);
- elm_object_focus_custom_chain_append(pNormalView->pMainLayout, pNormalView->pPlayFocusBtn, NULL);
+ elm_object_part_content_set(pParent,
+ VP_PLAY_SWALLOW_NORMAL_PLAY_FOCUS,
+ pNormalView->pPlayFocusBtn);
+ elm_object_focus_custom_chain_append(pNormalView->pMainLayout,
+ pNormalView->pPlayFocusBtn,
+ NULL);
}
if (pNormalView->pPrevBtn) {
- elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_REW, pNormalView->pPrevBtn);
- elm_object_focus_custom_chain_append(pNormalView->pMainLayout, pNormalView->pPrevBtn, NULL);
+ elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_REW,
+ pNormalView->pPrevBtn);
+ elm_object_focus_custom_chain_append(pNormalView->pMainLayout,
+ pNormalView->pPrevBtn, NULL);
}
if (pNormalView->pNextBtn) {
- elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_FF, pNormalView->pNextBtn);
- elm_object_focus_custom_chain_append(pNormalView->pMainLayout, pNormalView->pNextBtn, NULL);
+ elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_FF,
+ pNormalView->pNextBtn);
+ elm_object_focus_custom_chain_append(pNormalView->pMainLayout,
+ pNormalView->pNextBtn, NULL);
}
if (pNormalView->pScreenSizeBtn) {
- elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_SCREENSIZE, pNormalView->pScreenSizeBtn);
- elm_object_focus_custom_chain_append(pNormalView->pMainLayout, pNormalView->pScreenSizeBtn, NULL);
- }
- /*
- if (pNormalView->pPopupBtn) {
- elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_POPUP_PLAYER, pNormalView->pPopupBtn);
- elm_object_focus_custom_chain_append(pNormalView->pMainLayout, pNormalView->pPopupBtn, NULL);
- }
- */
- vp_play_util_focus_next_object_set(pNormalView->pVolumeBtn, pNormalView->pPrevBtn, ELM_FOCUS_RIGHT);
- vp_play_util_focus_next_object_set(pNormalView->pPrevBtn, pNormalView->pPlayFocusBtn, ELM_FOCUS_RIGHT);
- vp_play_util_focus_next_object_set(pNormalView->pPlayFocusBtn, pNormalView->pNextBtn, ELM_FOCUS_RIGHT);
- vp_play_util_focus_next_object_set(pNormalView->pNextBtn, pNormalView->pScreenSizeBtn, ELM_FOCUS_RIGHT);
+ elm_object_part_content_set(pParent,
+ VP_PLAY_SWALLOW_NORMAL_SCREENSIZE,
+ pNormalView->pScreenSizeBtn);
+ elm_object_focus_custom_chain_append(pNormalView->pMainLayout,
+ pNormalView->pScreenSizeBtn,
+ NULL);
+ }
+
+ vp_play_util_focus_next_object_set(pNormalView->pVolumeBtn,
+ pNormalView->pPrevBtn,
+ ELM_FOCUS_RIGHT);
+ vp_play_util_focus_next_object_set(pNormalView->pPrevBtn,
+ pNormalView->pPlayFocusBtn,
+ ELM_FOCUS_RIGHT);
+ vp_play_util_focus_next_object_set(pNormalView->pPlayFocusBtn,
+ pNormalView->pNextBtn,
+ ELM_FOCUS_RIGHT);
+ vp_play_util_focus_next_object_set(pNormalView->pNextBtn,
+ pNormalView->pScreenSizeBtn,
+ ELM_FOCUS_RIGHT);
_vp_play_normal_view_set_rotate_lock_state(pNormalView);
_vp_play_normal_view_set_volume_lock_state(pNormalView);
return TRUE;
}
-static void _vp_normal_view_function_layout_del_cb(void *data, Evas *e,
- Evas_Object *obj,
- void *event_info)
+static void _vp_normal_view_function_layout_del_cb(void *data, Evas * e,
+ Evas_Object * obj,
+ void *event_info)
{
if (!data) {
VideoLogError("pNormalView is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)data;
+ NormalView *pNormalView = (NormalView *) data;
pNormalView->pTopControlLayout = NULL;
pNormalView->pBookmarkBtn = NULL;
pNormalView->pMultiWinBtn = NULL;
pNormalView->pShareBtn = NULL;
}
-static bool _vp_play_normal_view_create_function_control(NormalView *pNormalView)
+static bool _vp_play_normal_view_create_function_control(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
return FALSE;
}
- pNormalView->pFunctionLayout = _vp_play_normal_view_create_function_layout(pNormalView->pMainLayout);
+ pNormalView->pFunctionLayout =
+ _vp_play_normal_view_create_function_layout(pNormalView->
+ pMainLayout);
if (!pNormalView->pFunctionLayout) {
VideoLogError("pNormalView->pFunctionLayout is NULL");
return FALSE;
}
- evas_object_event_callback_add(pNormalView->pFunctionLayout, EVAS_CALLBACK_DEL, _vp_normal_view_function_layout_del_cb, (void *)pNormalView);
- elm_object_part_content_set(pNormalView->pControlLayout, VP_PLAY_SWALLOW_NORMAL_FUNCTION, pNormalView->pFunctionLayout);
- elm_object_focus_custom_chain_append(pNormalView->pMainLayout, pNormalView->pFunctionLayout, NULL);
+ evas_object_event_callback_add(pNormalView->pFunctionLayout,
+ EVAS_CALLBACK_DEL,
+ _vp_normal_view_function_layout_del_cb,
+ (void *) pNormalView);
+ elm_object_part_content_set(pNormalView->pControlLayout,
+ VP_PLAY_SWALLOW_NORMAL_FUNCTION,
+ pNormalView->pFunctionLayout);
+ elm_object_focus_custom_chain_append(pNormalView->pMainLayout,
+ pNormalView->pFunctionLayout,
+ NULL);
return TRUE;
}
-static bool _vp_play_normal_view_create_progressbar(NormalView *pNormalView)
+static bool _vp_play_normal_view_create_progressbar(NormalView *
+ pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
pParent = pNormalView->pControlLayout;
- pNormalView->pProgressbar = vp_play_progressbar_create(pParent, VIDEO_PROGRESSBAR_TYPE_NORMAL);
+ pNormalView->pProgressbar =
+ vp_play_progressbar_create(pParent, VIDEO_PROGRESSBAR_TYPE_NORMAL);
if (!pNormalView->pProgressbar) {
VideoLogError("pProgressbar create fail");
return FALSE;
}
- pNormalView->pProgressEvent = vp_play_progressbar_get_object(pNormalView->pProgressbar);
+ pNormalView->pProgressEvent =
+ vp_play_progressbar_get_object(pNormalView->pProgressbar);
if (!pNormalView->pProgressEvent) {
VideoLogError("vp_play_progressbar_get_object fail");
return FALSE;
}
- elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_PROGRESS, pNormalView->pProgressEvent);
+ elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_PROGRESS,
+ pNormalView->pProgressEvent);
- evas_object_event_callback_add(pNormalView->pProgressEvent, EVAS_CALLBACK_MOUSE_DOWN,
- __vp_normal_progress_mouse_down_cb, (void *)pNormalView);
+ evas_object_event_callback_add(pNormalView->pProgressEvent,
+ EVAS_CALLBACK_MOUSE_DOWN,
+ __vp_normal_progress_mouse_down_cb,
+ (void *) pNormalView);
- evas_object_event_callback_add(pNormalView->pProgressEvent, EVAS_CALLBACK_MOUSE_UP,
- __vp_normal_progress_mouse_up_cb, (void *)pNormalView);
+ evas_object_event_callback_add(pNormalView->pProgressEvent,
+ EVAS_CALLBACK_MOUSE_UP,
+ __vp_normal_progress_mouse_up_cb,
+ (void *) pNormalView);
- evas_object_event_callback_add(pNormalView->pProgressEvent, EVAS_CALLBACK_MOUSE_MOVE,
- __vp_normal_progress_mouse_move_cb, (void *)pNormalView);
+ evas_object_event_callback_add(pNormalView->pProgressEvent,
+ EVAS_CALLBACK_MOUSE_MOVE,
+ __vp_normal_progress_mouse_move_cb,
+ (void *) pNormalView);
- evas_object_event_callback_add(pNormalView->pProgressEvent, EVAS_CALLBACK_DEL,
- __vp_normal_progress_del_cb, (void *)pNormalView);
+ evas_object_event_callback_add(pNormalView->pProgressEvent,
+ EVAS_CALLBACK_DEL,
+ __vp_normal_progress_del_cb,
+ (void *) pNormalView);
- Evas_Object *pProgressFocus = vp_play_progressbar_get_focus_object(pNormalView->pProgressbar);
+ Evas_Object *pProgressFocus =
+ vp_play_progressbar_get_focus_object(pNormalView->pProgressbar);
evas_object_event_callback_add(pProgressFocus, EVAS_CALLBACK_KEY_DOWN,
- __vp_normal_focus_key_down_cb, (void *)pNormalView);
+ __vp_normal_focus_key_down_cb,
+ (void *) pNormalView);
evas_object_event_callback_add(pProgressFocus, EVAS_CALLBACK_KEY_UP,
- __vp_normal_focus_key_up_cb, (void *)pNormalView);
+ __vp_normal_focus_key_up_cb,
+ (void *) pNormalView);
return TRUE;
}
-static bool _vp_play_normal_view_create_subtitle(NormalView *pNormalView)
+static bool _vp_play_normal_view_create_subtitle(NormalView * pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
Evas_Object *pObj = NULL;
#ifdef SUBTITLE_K_FEATURE
- //PlayView *pPlayView = pNormalView->pPlayView;
- //pParent = pPlayView->pMainLayout;
pParent = pNormalView->pMainLayout;
VideoLogError("1");
#else
#endif
- pNormalView->pSubtitle = vp_play_subtitle_create(pParent, VP_SUBTITLE_TYPE_NORMAL);
+ pNormalView->pSubtitle =
+ vp_play_subtitle_create(pParent, VP_SUBTITLE_TYPE_NORMAL);
if (!pNormalView->pSubtitle) {
VideoLogError("pSubtitle create fail");
return FALSE;
vp_play_subtitle_set_color(pNormalView->pSubtitle, nFontColor);
vp_play_subtitle_set_bg_color(pNormalView->pSubtitle, nBGColor);
- elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_SUBTITLE, pObj);
+ elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_SUBTITLE,
+ pObj);
#else
vp_play_preference_get_subtitle_alignment_key(&nAlignmentKey);
vp_play_subtitle_set_bg_color(pNormalView->pSubtitle, szColorBGHex);
vp_play_subtitle_set_alignment(pNormalView->pSubtitle, nAlignment);
- elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_SUBTITLE, pObj);
+ elm_object_part_content_set(pParent, VP_PLAY_SWALLOW_NORMAL_SUBTITLE,
+ pObj);
evas_object_show(pObj);
#endif
}
#ifdef _PERF_TEST_
-static Evas_Object *_vp_play_normal_view_create_conformant(Evas_Object *pParent)
+static Evas_Object *_vp_play_normal_view_create_conformant(Evas_Object *
+ pParent)
{
if (!pParent) {
VideoLogError("Parent is NULL");
VideoLogError("elm_conformant_add object is NULL");
return NULL;
}
- evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
elm_win_conformant_set(pParent, EINA_TRUE);
elm_win_resize_object_add(pParent, pObj);
elm_object_signal_emit(pObj, "elm,state,indicator,overlap", "");
- evas_object_data_set(pObj, "overlap", (void *)EINA_TRUE);
+ evas_object_data_set(pObj, "overlap", (void *) EINA_TRUE);
evas_object_show(pObj);
return pObj;
}
-static Evas_Object *_vp_play_normal_view_create_layout(Evas_Object *pParent)
+static Evas_Object *_vp_play_normal_view_create_layout(Evas_Object *
+ pParent)
{
if (!pParent) {
VideoLogError("Parent is NULL");
}
bRet = elm_layout_theme_set(pObj, VP_PLAY_CUSTOM_LAYOUT_KLASS,
- VP_PLAY_CUSTOM_LAYOUT_GROUP,
- VP_PLAY_CUSTOM_LAYOUT_STYLE);
+ VP_PLAY_CUSTOM_LAYOUT_GROUP,
+ VP_PLAY_CUSTOM_LAYOUT_STYLE);
if (bRet != EINA_TRUE) {
VideoLogError("elm_layout_theme_set fail");
}
- evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
elm_object_content_set(pParent, pObj);
evas_object_show(pObj);
return pObj;
}
-static Evas_Object *_vp_play_normal_view_create_naviframe(Evas_Object *pParent)
+static Evas_Object *_vp_play_normal_view_create_naviframe(Evas_Object *
+ pParent)
{
if (!pParent) {
VideoLogError("Parent is NULL");
return NULL;
}
- eext_object_event_callback_add(pObj, EEXT_CALLBACK_BACK, eext_naviframe_back_cb, NULL);
- eext_object_event_callback_add(pObj, EEXT_CALLBACK_MORE, eext_naviframe_more_cb, NULL);
+ eext_object_event_callback_add(pObj, EEXT_CALLBACK_BACK,
+ eext_naviframe_back_cb, NULL);
+ eext_object_event_callback_add(pObj, EEXT_CALLBACK_MORE,
+ eext_naviframe_more_cb, NULL);
elm_object_part_content_set(pParent, "elm.swallow.content", pObj);
elm_object_focus_set(pObj, EINA_TRUE);
}
#endif
-static void _vp_play_normal_view_del_cb(void *data, Evas *e,
- Evas_Object *obj,
- void *event_info)
+static void _vp_play_normal_view_del_cb(void *data, Evas * e,
+ Evas_Object * obj,
+ void *event_info)
{
if (!data) {
VideoLogError("pNormalView is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)data;
+ NormalView *pNormalView = (NormalView *) data;
if (pNormalView->pMainLayout) {
- evas_object_event_callback_del(pNormalView->pMainLayout, EVAS_CALLBACK_DEL, _vp_play_normal_view_del_cb);
+ evas_object_event_callback_del(pNormalView->pMainLayout,
+ EVAS_CALLBACK_DEL,
+ _vp_play_normal_view_del_cb);
elm_object_focus_custom_chain_unset(pNormalView->pMainLayout);
pNormalView->pMainLayout = NULL;
- //pNormalView->pNaviItem = NULL;
pNormalView->pAllsharBtn = NULL;
- //if (pNormalView->pPlayView)
- //pNormalView->pPlayView->pNormalView = NULL;
}
}
-static bool _vp_play_normal_view_init_layout(NormalView *pNormalView)
+static bool _vp_play_normal_view_init_layout(NormalView * pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
}
#ifdef _PERF_TEST_
if (pNormalView->pMainLayout) {
- VideoLogError("Already exists MainLayout: %p", pNormalView->pMainLayout);
+ VideoLogError("Already exists MainLayout: %p",
+ pNormalView->pMainLayout);
return TRUE;
}
//////////
PlayView *pPlayView = pNormalView->pPlayView;
- pPlayView->pConformant = _vp_play_normal_view_create_conformant(pPlayView->pWin);
+ pPlayView->pConformant =
+ _vp_play_normal_view_create_conformant(pPlayView->pWin);
if (!pPlayView->pConformant) {
VideoLogError("pConformant is null");
return FALSE;
}
- pPlayView->pMainLayout = _vp_play_normal_view_create_layout(pPlayView->pConformant);
+ pPlayView->pMainLayout =
+ _vp_play_normal_view_create_layout(pPlayView->pConformant);
if (!pPlayView->pMainLayout) {
VideoLogError("pMainLayout is null");
return FALSE;
}
- pPlayView->pNaviframe = _vp_play_normal_view_create_naviframe(pPlayView->pMainLayout);
+ pPlayView->pNaviframe =
+ _vp_play_normal_view_create_naviframe(pPlayView->pMainLayout);
if (!pPlayView->pNaviframe) {
VideoLogError("pNaviframe is null");
return FALSE;
#endif
if (!_vp_play_normal_view_create_gesture_layout(pNormalView)) {
- VideoLogError("_vp_play_normal_view_create_gesture_layout is fail");
+ VideoLogError
+ ("_vp_play_normal_view_create_gesture_layout is fail");
return FALSE;
}
- pNormalView->pMainLayout = _vp_play_normal_view_create_main_layout(pNormalView->pNaviFrame);
+ pNormalView->pMainLayout =
+ _vp_play_normal_view_create_main_layout(pNormalView->pNaviFrame);
if (!pNormalView->pMainLayout) {
VideoLogError("pLayout create fail");
return FALSE;
}
- evas_object_event_callback_add(pNormalView->pMainLayout, EVAS_CALLBACK_DEL, _vp_play_normal_view_del_cb, (void *)pNormalView);
- evas_object_event_callback_add(pNormalView->pMainLayout, EVAS_CALLBACK_RESIZE, __vp_normal_main_layout_resize_cb, (void *)pNormalView);
+ evas_object_event_callback_add(pNormalView->pMainLayout,
+ EVAS_CALLBACK_DEL,
+ _vp_play_normal_view_del_cb,
+ (void *) pNormalView);
+ evas_object_event_callback_add(pNormalView->pMainLayout,
+ EVAS_CALLBACK_RESIZE,
+ __vp_normal_main_layout_resize_cb,
+ (void *) pNormalView);
elm_access_highlight_set(pNormalView->pMainLayout);
- pNormalView->pNaviItem = elm_naviframe_item_push(pNormalView->pNaviFrame , NULL, NULL, NULL, pNormalView->pMainLayout, "playview/1line");
+ pNormalView->pNaviItem =
+ elm_naviframe_item_push(pNormalView->pNaviFrame, NULL, NULL, NULL,
+ pNormalView->pMainLayout,
+ "playview/1line");
- Evas_Object * pLeftbtn = elm_button_add(pNormalView->pNaviFrame);
+ Evas_Object *pLeftbtn = elm_button_add(pNormalView->pNaviFrame);
elm_object_style_set(pLeftbtn, "back");
- evas_object_smart_callback_add(pLeftbtn, "clicked", __vp_normal_naviframe_back_btn_cb, (void *)pNormalView);
- elm_object_item_part_content_set(pNormalView->pNaviItem, "title_left_btn", pLeftbtn);
+ evas_object_smart_callback_add(pLeftbtn, "clicked",
+ __vp_normal_naviframe_back_btn_cb,
+ (void *) pNormalView);
+ elm_object_item_part_content_set(pNormalView->pNaviItem,
+ "title_left_btn", pLeftbtn);
evas_object_show(pLeftbtn);
- elm_naviframe_item_pop_cb_set(pNormalView->pNaviItem, __vp_normal_naviframe_pop_cb, (void *)pNormalView);
+ elm_naviframe_item_pop_cb_set(pNormalView->pNaviItem,
+ __vp_normal_naviframe_pop_cb,
+ (void *) pNormalView);
if (!pNormalView->pNaviItem) {
VideoLogError("elm_naviframe_item_push fail");
return FALSE;
}
- elm_object_signal_callback_add(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SHOW_FINISH, "*", __vp_normal_show_finish_cb, (void *)pNormalView);
- elm_object_signal_callback_add(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_HIDE_FINISH, "*", __vp_normal_hide_finish_cb, (void *)pNormalView);
+ elm_object_signal_callback_add(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SHOW_FINISH, "*",
+ __vp_normal_show_finish_cb,
+ (void *) pNormalView);
+ elm_object_signal_callback_add(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_HIDE_FINISH, "*",
+ __vp_normal_hide_finish_cb,
+ (void *) pNormalView);
if (!_vp_play_normal_view_create_top_control(pNormalView)) {
VideoLogError("_vp_play_normal_view_create_top_control fail");
return TRUE;
}
-static void _vp_play_normal_view_destroy_handle(NormalView *pNormalView)
+static void _vp_play_normal_view_destroy_handle(NormalView * pNormalView)
{
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
pNormalView->pBrightnessHandle = NULL;
}
-// if (pNormalView->pDownloadHandle) {
-// VppDownloadDestroyItem(pNormalView->pDownloadHandle);
-// pNormalView->pDownloadHandle = NULL;
-// }
-
VP_EVAS_PIPE_DEL(pNormalView->pPreparePipe);
VP_EVAS_PIPE_DEL(pNormalView->pSeekPipe);
if (pNormalView->pProgressEvent) {
evas_object_event_callback_del(pNormalView->pProgressEvent,
- EVAS_CALLBACK_MOUSE_DOWN,
- __vp_normal_progress_mouse_down_cb);
+ EVAS_CALLBACK_MOUSE_DOWN,
+ __vp_normal_progress_mouse_down_cb);
evas_object_event_callback_del(pNormalView->pProgressEvent,
- EVAS_CALLBACK_MOUSE_UP,
- __vp_normal_progress_mouse_up_cb);
+ EVAS_CALLBACK_MOUSE_UP,
+ __vp_normal_progress_mouse_up_cb);
evas_object_event_callback_del(pNormalView->pProgressEvent,
- EVAS_CALLBACK_MOUSE_MOVE,
- __vp_normal_progress_mouse_move_cb);
+ EVAS_CALLBACK_MOUSE_MOVE,
+ __vp_normal_progress_mouse_move_cb);
pNormalView->pProgressEvent = NULL;
}
#ifdef K_FEATURE_MICROSEEK
VideoLogError("_vp_play_normal_view_destroy End");
}
-static void _vp_play_normal_view_prepare_pipe_cb(void *data, void *pipeData, unsigned int nbyte)
+static void _vp_play_normal_view_prepare_pipe_cb(void *data,
+ void *pipeData,
+ unsigned int nbyte)
{
if (!data) {
VideoLogError("data is NULL");
}
VideoLogInfo("");
- NormalView *pNormalView = (NormalView*)data;
+ NormalView *pNormalView = (NormalView *) data;
bool bLCDOffStatus = FALSE;
- vp_mm_player_set_rate(pNormalView->pPlayerHandle, (float)pNormalView->fPlaySpeed);
+ vp_mm_player_set_rate(pNormalView->pPlayerHandle,
+ (float) pNormalView->fPlaySpeed);
vp_play_config_get_lcd_off_state(&bLCDOffStatus);
PlayView *pPlayView = pNormalView->pPlayView;
if (bLCDOffStatus && (pNormalView->bVideoOnlyMode == FALSE)) {
VideoLogError("Invalid LCD Status");
- //elm_exit();
pPlayView->pFunc->vp_play_func_exit(pPlayView);
return;
if (!vp_mm_player_get_duration(pNormalView->pPlayerHandle, &nDuration)) {
VideoLogError("vp_mm_player_get_duration is fail");
}
- if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_WEB && nDuration == 0) {
+ if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_WEB
+ && nDuration == 0) {
pNormalView->bHLSMode = TRUE;
} else {
pNormalView->bHLSMode = FALSE;
}
if (pPlayView->bAVRCP) {
- const char *navi_title = elm_object_item_text_get(pNormalView->pNaviItem);
- vp_avrcp_noti_track(navi_title, "Unknown", "Unknown", "Unknown", nDuration);
+ const char *navi_title =
+ elm_object_item_text_get(pNormalView->pNaviItem);
+ vp_avrcp_noti_track(navi_title, "Unknown", "Unknown", "Unknown",
+ nDuration);
}
if (pNormalView->bHLSMode == FALSE) {
pNormalView->nDuration = nDuration;
- vp_play_progressbar_set_duration(pNormalView->pProgressbar, nDuration);
+ vp_play_progressbar_set_duration(pNormalView->pProgressbar,
+ nDuration);
}
if (vp_mm_player_is_closed_caption_exist(pNormalView->pPlayerHandle)) {
_vp_play_normal_view_set_subtitle_font_config(pNormalView);
}
- vp_play_progressbar_set_position(pNormalView->pProgressbar, pNormalView->nStartPosition);
+ vp_play_progressbar_set_position(pNormalView->pProgressbar,
+ pNormalView->nStartPosition);
_vp_play_normal_view_check_audio_only(pNormalView);
if (pNormalView->nStartPosition > 0) {
pNormalView->bSeekComplete = FALSE;
- if (vp_mm_player_set_position(pNormalView->pPlayerHandle, pNormalView->nStartPosition) == FALSE) {
+ if (vp_mm_player_set_position
+ (pNormalView->pPlayerHandle,
+ pNormalView->nStartPosition) == FALSE) {
VideoLogWarning("vp_mm_player_set_position error");
return;
}
bool bXwincheck = TRUE;
if (vp_play_util_is_Xwindow_focused(pNormalView->nXwinID) == FALSE) {
- VideoLogWarning("CASE : Not a splite view and Not focused state in mainwindow[%p]", pPlayView->pWin);
+ VideoLogWarning
+ ("CASE : Not a splite view and Not focused state in mainwindow[%p]",
+ pPlayView->pWin);
bXwincheck = FALSE;
}
if (pNormalView->nStartPosition <= 0) {
- if (pNormalView->bManualPause || bXwincheck == FALSE || _vp_play_normal_view_check_during_call(pNormalView)) {
+ if (pNormalView->bManualPause || bXwincheck == FALSE
+ || _vp_play_normal_view_check_during_call(pNormalView)) {
vp_mm_player_set_visible(pNormalView->pPlayerHandle, TRUE);
vp_mm_player_pause(pNormalView->pPlayerHandle);
} else {
}
}
- if (!vp_mm_player_set_subtitle_position(pNormalView->pPlayerHandle, pNormalView->fSubtitleSyncValue * 1000)) {
+ if (!vp_mm_player_set_subtitle_position
+ (pNormalView->pPlayerHandle,
+ pNormalView->fSubtitleSyncValue * 1000)) {
VideoLogError("vp_mm_player_set_subtitle_position is fail");
}
}
-normal_view_handle vp_play_normal_view_create(PlayView *pPlayView, video_play_launching_type_t nLaunchingType)
+normal_view_handle vp_play_normal_view_create(PlayView * pPlayView,
+ video_play_launching_type_t
+ nLaunchingType)
{
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return NULL;
}
- NormalView *pNormalView = NULL;
+ NormalView *pNormalView = NULL;
pNormalView = calloc(1, sizeof(NormalView));
int nScreenMode = VP_MM_PLAYER_DISPLAY_LETTER_BOX;
vp_play_preference_get_screen_mode_key(&nScreenMode);
- if ((nScreenMode != VP_MM_PLAYER_DISPLAY_LETTER_BOX) && (nScreenMode != VP_MM_PLAYER_DISPLAY_FULL_SCREEN)) {
+ if ((nScreenMode != VP_MM_PLAYER_DISPLAY_LETTER_BOX)
+ && (nScreenMode != VP_MM_PLAYER_DISPLAY_FULL_SCREEN)) {
nScreenMode = VP_MM_PLAYER_DISPLAY_LETTER_BOX;
- vp_play_preference_set_screen_mode_key(VP_MM_PLAYER_DISPLAY_LETTER_BOX);
+ vp_play_preference_set_screen_mode_key
+ (VP_MM_PLAYER_DISPLAY_LETTER_BOX);
}
pNormalView->nDisplayMode = nScreenMode;
// create prepare_cb pipe
VP_EVAS_PIPE_DEL(pNormalView->pPreparePipe);
- pNormalView->pPreparePipe = ecore_pipe_add((Ecore_Pipe_Cb)_vp_play_normal_view_prepare_pipe_cb, (void*)pNormalView);
+ pNormalView->pPreparePipe =
+ ecore_pipe_add((Ecore_Pipe_Cb)
+ _vp_play_normal_view_prepare_pipe_cb,
+ (void *) pNormalView);
VP_EVAS_PIPE_DEL(pNormalView->pSeekPipe);
- pNormalView->pSeekPipe = ecore_pipe_add((Ecore_Pipe_Cb)__vp_play_normal_view_seek_pipe_cb, (void*)pNormalView);
+ pNormalView->pSeekPipe =
+ ecore_pipe_add((Ecore_Pipe_Cb) __vp_play_normal_view_seek_pipe_cb,
+ (void *) pNormalView);
#ifndef _PERF_TEST_
if (!_vp_play_normal_view_init_layout(pNormalView)) {
VideoLogError("_vp_play_normal_view_init_layout is fail");
vp_play_preference_set_multi_play_status(FALSE);
}
- return (normal_view_handle)pNormalView;
+ return (normal_view_handle) pNormalView;
}
-void vp_play_normal_view_key_create(PlayView *pPlayView, normal_view_handle pViewHandle)
+void vp_play_normal_view_key_create(PlayView * pPlayView,
+ normal_view_handle pViewHandle)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
- pNormalView->pMediaKey = vp_media_key_create(pPlayView->pWin, __vp_normal_media_key_event_cb);
- vp_media_key_set_user_data(pNormalView->pMediaKey, (void *)pNormalView);
+ NormalView *pNormalView = (NormalView *) pViewHandle;
+ pNormalView->pMediaKey =
+ vp_media_key_create(pPlayView->pWin,
+ __vp_normal_media_key_event_cb);
+ vp_media_key_set_user_data(pNormalView->pMediaKey,
+ (void *) pNormalView);
vp_media_key_realize(pNormalView->pMediaKey);
}
return;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
if (!pNormalView->pLoadingAni) {
if (!_vp_play_normal_view_create_loading_ani(pNormalView)) {
- VideoLogWarning("_vp_play_normal_view_create_loading_ani fail");
+ VideoLogWarning
+ ("_vp_play_normal_view_create_loading_ani fail");
}
}
} else {
int nVal = 0;
vp_play_preference_get_repeat_mode_key(&nVal);
- pNormalView->nRepeatMode = (video_play_repeat_mode_t)nVal;
+ pNormalView->nRepeatMode = (video_play_repeat_mode_t) nVal;
}
int nScreenMode = 0;
vp_play_preference_get_screen_mode_key(&nScreenMode);
- pNormalView->nDisplayMode = (vp_mm_player_display_mode_t)nScreenMode;
+ pNormalView->nDisplayMode = (vp_mm_player_display_mode_t) nScreenMode;
pNormalView->bSeekComplete = TRUE;
pNormalView->bIsActive = TRUE;
video_play_sort_type_t nType = VIDEO_SORT_BY_NONE;
int nSortVal = 0;
vp_play_config_get_sort_type_key(&nSortVal);
- nType = (video_play_sort_type_t)nSortVal;
+ nType = (video_play_sort_type_t) nSortVal;
_vp_play_normal_view_set_volume_state(pNormalView);
- if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_GALLERY || pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MYFILE) {
- char *szFolder = vp_play_util_get_folder_from_path(pNormalView->szMediaURL);
- vp_media_contents_get_video_items_to_folder(VIDEO_SORT_BY_DATE_MOST_RECENT, szFolder, &(pNormalView->pMediaItemList));
+ if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_GALLERY
+ || pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MYFILE) {
+ char *szFolder =
+ vp_play_util_get_folder_from_path(pNormalView->szMediaURL);
+ vp_media_contents_get_video_items_to_folder
+ (VIDEO_SORT_BY_DATE_MOST_RECENT, szFolder,
+ &(pNormalView->pMediaItemList));
VP_FREE(szFolder);
} else if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MULTI_PATH) {
} else {
if (pPlayView->nListType == VIDEO_PLAY_LIST_TYPE_FOLDER) {
- char *szFolder = vp_play_util_get_folder_from_path(pNormalView->szMediaURL);
- vp_media_contents_get_video_items_to_folder(nType, szFolder, &(pNormalView->pMediaItemList));
+ char *szFolder =
+ vp_play_util_get_folder_from_path(pNormalView->szMediaURL);
+ vp_media_contents_get_video_items_to_folder(nType, szFolder,
+ &(pNormalView->
+ pMediaItemList));
VP_FREE(szFolder);
} else {
- vp_media_contents_get_video_items(nType, &(pNormalView->pMediaItemList));
+ vp_media_contents_get_video_items(nType,
+ &(pNormalView->
+ pMediaItemList));
}
}
#ifdef _PERF_TEST_
vp_play_preference_set_allow_dock_connect_key(FALSE);
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_VIDEO_ON, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_VIDEO_ON, "*");
return TRUE;
}
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (pNormalView->pNaviItem) {
elm_object_item_text_set(pNormalView->pNaviItem, "");
}
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_VIDEO_OFF, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_VIDEO_OFF, "*");
_vp_play_normal_view_set_played_time(pNormalView);
VP_EVAS_DEL(pNormalView->pVideoSink);
#endif
- if (pNormalView->pPlayerHandle && !pNormalView->bAudioOnly) { //check here
+ if (pNormalView->pPlayerHandle && !pNormalView->bAudioOnly) { //check here
vp_mm_player_destroy(pNormalView->pPlayerHandle);
pNormalView->pPlayerHandle = NULL;
}
return TRUE;
}
-bool vp_play_normal_view_is_realize(normal_view_handle pViewHandle, bool *bIsRealize)
+bool vp_play_normal_view_is_realize(normal_view_handle pViewHandle,
+ bool * bIsRealize)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
*bIsRealize = pNormalView->bIsRealize;
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
vp_mm_player_pause(pNormalView->pPlayerHandle);
_vp_play_normal_view_set_play_state(pNormalView);
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
if (pNormalView->pPlayerHandle && pNormalView->bIsRealize) {
_vp_play_normal_view_all_close_popup(pNormalView);
}
- if (pNormalView->bManualPause == FALSE && pNormalView->bSharepopup == FALSE) {
+ if (pNormalView->bManualPause == FALSE
+ && pNormalView->bSharepopup == FALSE) {
vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE;
if (!vp_mm_player_get_state(pNormalView->pPlayerHandle, &nState)) {
VideoLogWarning("vp_mm_player_get_state is fail");
}
- if(!_vp_play_normal_view_check_during_call(pNormalView)) {
+ if (!_vp_play_normal_view_check_during_call(pNormalView)) {
if (nState != VP_MM_PLAYER_STATE_PLAYING) {
if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
VideoLogError("Unable to play!");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
case VP_MM_PLAYER_STATE_READY:
case VP_MM_PLAYER_STATE_PAUSED:
_vp_play_normal_view_all_close_popup(pNormalView);
- if(!_vp_play_normal_view_check_during_call(pNormalView))
+ if (!_vp_play_normal_view_check_during_call(pNormalView))
vp_mm_player_play(pNormalView->pPlayerHandle);
break;
case VP_MM_PLAYER_STATE_PLAYING:
break;
}
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
_vp_play_normal_view_set_play_state(pNormalView);
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
_vp_play_normal_view_on_next_play(pNormalView, TRUE);
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
_vp_play_normal_view_on_prev_play(pNormalView, TRUE, FALSE);
return TRUE;
}
-bool vp_play_normal_view_set_url(normal_view_handle pViewHandle, const char *szMediaURL)
+bool vp_play_normal_view_set_url(normal_view_handle pViewHandle,
+ const char *szMediaURL)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
VP_FREE(pNormalView->szMediaURL);
VP_STRDUP(pNormalView->szMediaURL, szMediaURL);
}
-bool vp_play_normal_view_player_state_changed_get(normal_view_handle pViewHandle)
+bool vp_play_normal_view_player_state_changed_get(normal_view_handle
+ pViewHandle)
{
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (!pNormalView) {
VideoLogError("pNormalView is NULL");
return FALSE;
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (!(vp_mm_player_stop(pNormalView->pPlayerHandle))) {
VideoLogError("player_stop failed");
return FALSE;
return TRUE;
}
-bool vp_play_normal_view_set_video_only(normal_view_handle pViewHandle, bool bVideoOnly)
+bool vp_play_normal_view_set_video_only(normal_view_handle pViewHandle,
+ bool bVideoOnly)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
PlayView *pPlayView = pNormalView->pPlayView;
VideoLogWarning("vp_mm_player_get_state is fail");
}
- if (nState != VP_MM_PLAYER_STATE_NONE && nState != VP_MM_PLAYER_STATE_IDLE) {
+ if (nState != VP_MM_PLAYER_STATE_NONE
+ && nState != VP_MM_PLAYER_STATE_IDLE) {
vp_play_subtitle_set_text(pNormalView->pSubtitle, "");
}
if (bVideoOnly == TRUE) {
if (pNormalView->pImageBufferObj) {
- elm_object_part_content_unset(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_IMAGE_BUFFER);
+ elm_object_part_content_unset(pNormalView->pMainLayout,
+ VP_PLAY_SWALLOW_NORMAL_IMAGE_BUFFER);
VP_EVAS_DEL(pNormalView->pImageBufferObj);
}
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_NO_CONTNES_SHOW, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_NO_CONTNES_SHOW, "*");
VP_EVAS_DISABLE_SET(pNormalView->pSoundPathBtn, EINA_TRUE);
- //VP_EVAS_DISABLE_SET(pNormalView->pRotateBtn, EINA_TRUE);
if (pNormalView->pRotateBtn) {
_vp_play_normal_view_set_rotate_lock_state(pNormalView);
_vp_play_normal_view_set_volume_lock_state(pNormalView);
VP_EVAS_DISABLE_SET(pNormalView->pTrimBtn, EINA_TRUE);
VP_EVAS_DISABLE_SET(pNormalView->pShareBtn, EINA_TRUE);
} else {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_NO_CONTNES_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_NO_CONTNES_HIDE, "*");
VP_FREE(pNormalView->szScreenMirrorMacAddr);
- //VP_EVAS_DISABLE_SET(pNormalView->pRotateBtn, EINA_FALSE);
if (pNormalView->pRotateBtn) {
_vp_play_normal_view_set_rotate_lock_state(pNormalView);
_vp_play_normal_view_set_volume_lock_state(pNormalView);
if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_EMAIL) {
char *szMediaID = NULL;
bool bReturn = FALSE;
- bReturn = vp_media_contents_get_video_id(pNormalView->szMediaURL, &szMediaID);
+ bReturn =
+ vp_media_contents_get_video_id(pNormalView->szMediaURL,
+ &szMediaID);
if (szMediaID && bReturn) {
VP_EVAS_DISABLE_SET(pNormalView->pTrimBtn, EINA_FALSE);
VP_EVAS_DISABLE_SET(pNormalView->pSoundAliveBtn, EINA_FALSE);
if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MULTI_PATH) {
- if (vp_play_util_check_streaming(pNormalView->szMediaURL) == TRUE) {
+ if (vp_play_util_check_streaming(pNormalView->szMediaURL) ==
+ TRUE) {
VP_EVAS_DISABLE_SET(pNormalView->pShareBtn, EINA_TRUE);
} else {
VP_EVAS_DISABLE_SET(pNormalView->pShareBtn, EINA_FALSE);
return TRUE;
}
-bool vp_play_normal_view_get_video_only(normal_view_handle pViewHandle, bool *bVideoOnly)
+bool vp_play_normal_view_get_video_only(normal_view_handle pViewHandle,
+ bool * bVideoOnly)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
*bVideoOnly = pNormalView->bVideoOnlyMode;
}
-bool vp_play_normal_view_set_device_unplug_interrupt(normal_view_handle pViewHandle, bool bDeviceUnplugInterrupt)
+bool vp_play_normal_view_set_device_unplug_interrupt(normal_view_handle
+ pViewHandle,
+ bool
+ bDeviceUnplugInterrupt)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
pNormalView->bDeviceRemoveInterrupt = bDeviceUnplugInterrupt;
return TRUE;
}
-bool vp_play_normal_view_set_start_position(normal_view_handle pViewHandle, int nStartPosition)
+bool vp_play_normal_view_set_start_position(normal_view_handle pViewHandle,
+ int nStartPosition)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
pNormalView->nStartPosition = nStartPosition;
return TRUE;
}
-bool vp_play_normal_view_get_last_position(normal_view_handle pViewHandle, int *nCurPos)
+bool vp_play_normal_view_get_last_position(normal_view_handle pViewHandle,
+ int *nCurPos)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
int nPosition = 0;
return TRUE;
}
-bool vp_play_normal_view_set_update_last_position(normal_view_handle pViewHandle)
+bool vp_play_normal_view_set_update_last_position(normal_view_handle
+ pViewHandle)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
_vp_play_normal_view_set_played_time(pNormalView);
}
-bool vp_play_normal_view_set_subtitle(normal_view_handle pViewHandle, char *szSubtitle)
+bool vp_play_normal_view_set_subtitle(normal_view_handle pViewHandle,
+ char *szSubtitle)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
VP_FREE(pNormalView->szSubtitleURL);
return TRUE;
}
-bool vp_play_normal_view_get_subtitle(normal_view_handle pViewHandle, char **szSubtitle)
+bool vp_play_normal_view_get_subtitle(normal_view_handle pViewHandle,
+ char **szSubtitle)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
- if (!vp_mm_player_get_subtitle_url(pNormalView->pPlayerHandle, szSubtitle)) {
+ if (!vp_mm_player_get_subtitle_url
+ (pNormalView->pPlayerHandle, szSubtitle)) {
VideoLogError("vp_mm_player_get_subtitle_url is fail");
return FALSE;
}
return TRUE;
}
-bool vp_play_normal_view_get_video_duration(normal_view_handle pViewHandle, int *nDuration)
+bool vp_play_normal_view_get_video_duration(normal_view_handle pViewHandle,
+ int *nDuration)
{
if (!pViewHandle || !nDuration) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
*nDuration = pNormalView->nDuration;
return TRUE;
}
-bool vp_play_normal_view_get_audio_track(normal_view_handle pViewHandle, int *nAudioTrack)
+bool vp_play_normal_view_get_audio_track(normal_view_handle pViewHandle,
+ int *nAudioTrack)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
*nAudioTrack = pNormalView->nDefaultAudioTrackIndex;
return TRUE;
}
-bool vp_play_normal_view_set_audio_track(normal_view_handle pViewHandle, int nAudioTrack)
+bool vp_play_normal_view_set_audio_track(normal_view_handle pViewHandle,
+ int nAudioTrack)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
pNormalView->nDefaultAudioTrackIndex = nAudioTrack;
return TRUE;
}
-bool vp_play_normal_view_set_manual_pause(normal_view_handle pViewHandle, bool bManualPause)
+bool vp_play_normal_view_set_manual_pause(normal_view_handle pViewHandle,
+ bool bManualPause)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
pNormalView->bManualPause = bManualPause;
}
-bool vp_play_normal_view_get_manual_pause(normal_view_handle pViewHandle, bool *bManualPause)
+bool vp_play_normal_view_get_manual_pause(normal_view_handle pViewHandle,
+ bool * bManualPause)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
*bManualPause = pNormalView->bManualPause;
return TRUE;
}
-void vp_play_normal_check_detail_view(normal_view_handle pViewHandle) {
+void vp_play_normal_check_detail_view(normal_view_handle pViewHandle)
+{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (pNormalView->pDetailHandle) {
vp_detail_destroy(pNormalView->pDetailHandle);
return;
}
-bool vp_play_normal_view_get_pause_status(normal_view_handle pViewHandle, bool *bPause)
+bool vp_play_normal_view_get_pause_status(normal_view_handle pViewHandle,
+ bool * bPause)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE;
if (!vp_mm_player_get_state(pNormalView->pPlayerHandle, &nState)) {
return TRUE;
}
-bool vp_play_normal_view_get_sound_filter(normal_view_handle pViewHandle, video_sound_alive_t *nSoundAlive)
+bool vp_play_normal_view_get_sound_filter(normal_view_handle pViewHandle,
+ video_sound_alive_t *
+ nSoundAlive)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
*nSoundAlive = pNormalView->nSoundAlive;
return TRUE;
}
-bool vp_play_normal_view_set_sound_filter(normal_view_handle pViewHandle, video_sound_alive_t nSoundAlive)
+bool vp_play_normal_view_set_sound_filter(normal_view_handle pViewHandle,
+ video_sound_alive_t nSoundAlive)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
pNormalView->nSoundAlive = nSoundAlive;
}
-bool vp_play_normal_view_set_rotate(normal_view_handle pViewHandle, video_play_rotate_t nRotate, bool bLayoutHide)
+bool vp_play_normal_view_set_rotate(normal_view_handle pViewHandle,
+ video_play_rotate_t nRotate,
+ bool bLayoutHide)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
- PlayView *pPlayView = pNormalView->pPlayView;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
+ PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
}
if (nRotate == VIDEO_PLAY_ROTATE_NONE) {
- vp_mm_player_set_video_rotate(pNormalView->pPlayerHandle, VP_MM_PLAYER_ROTATE_0);
+ vp_mm_player_set_video_rotate(pNormalView->pPlayerHandle,
+ VP_MM_PLAYER_ROTATE_0);
} else if (nRotate == VIDEO_PLAY_ROTATE_90) {
- vp_mm_player_set_video_rotate(pNormalView->pPlayerHandle, VP_MM_PLAYER_ROTATE_90);
+ vp_mm_player_set_video_rotate(pNormalView->pPlayerHandle,
+ VP_MM_PLAYER_ROTATE_90);
} else if (nRotate == VIDEO_PLAY_ROTATE_180) {
- vp_mm_player_set_video_rotate(pNormalView->pPlayerHandle, VP_MM_PLAYER_ROTATE_180);
+ vp_mm_player_set_video_rotate(pNormalView->pPlayerHandle,
+ VP_MM_PLAYER_ROTATE_180);
} else if (nRotate == VIDEO_PLAY_ROTATE_270) {
- vp_mm_player_set_video_rotate(pNormalView->pPlayerHandle, VP_MM_PLAYER_ROTATE_270);
+ vp_mm_player_set_video_rotate(pNormalView->pPlayerHandle,
+ VP_MM_PLAYER_ROTATE_270);
}
int nAngle = elm_win_rotation_get(pPlayView->pWin);
if (nRotate == VIDEO_PLAY_ROTATE_NONE) {
elm_win_wm_rotation_preferred_rotation_set(pPlayView->pWin, 0);
} else if (nRotate == VIDEO_PLAY_ROTATE_90) {
- elm_win_wm_rotation_preferred_rotation_set(pPlayView->pWin, 90);
+ elm_win_wm_rotation_preferred_rotation_set(pPlayView->pWin,
+ 90);
} else if (nRotate == VIDEO_PLAY_ROTATE_180) {
- elm_win_wm_rotation_preferred_rotation_set(pPlayView->pWin, 180);
+ elm_win_wm_rotation_preferred_rotation_set(pPlayView->pWin,
+ 180);
} else if (nRotate == VIDEO_PLAY_ROTATE_270) {
- elm_win_wm_rotation_preferred_rotation_set(pPlayView->pWin, 270);
+ elm_win_wm_rotation_preferred_rotation_set(pPlayView->pWin,
+ 270);
}
}
if (pNormalView->nRotate != nRotate) {
if (pNormalView->pBookmarkHandle) {
bool bIsReailze = FALSE;
- vp_play_bookmark_is_realize(pNormalView->pBookmarkHandle, &bIsReailze);
+ vp_play_bookmark_is_realize(pNormalView->pBookmarkHandle,
+ &bIsReailze);
if (bIsReailze) {
_vp_play_normal_view_on_bookmark_mode(pNormalView, FALSE);
if (pNormalView->pVolumeHandle) {
bool bIsRealize = FALSE;
- if (!vp_play_volume_is_realize(pNormalView->pVolumeHandle, &bIsRealize)) {
+ if (!vp_play_volume_is_realize
+ (pNormalView->pVolumeHandle, &bIsRealize)) {
VideoLogWarning("vp_play_volume_is_realize is fail");
}
if (pNormalView->pVolumePopupHandle) {
bool bIsRealize = FALSE;
- if (!vp_play_volume_popup_is_realize(pNormalView->pVolumePopupHandle, &bIsRealize)) {
+ if (!vp_play_volume_popup_is_realize
+ (pNormalView->pVolumePopupHandle, &bIsRealize)) {
VideoLogWarning("vp_play_volume_popup_is_realize is fail");
}
if (bIsRealize) {
- if (!vp_play_volume_popup_unrealize(pNormalView->pVolumePopupHandle)) {
+ if (!vp_play_volume_popup_unrealize
+ (pNormalView->pVolumePopupHandle)) {
VideoLogWarning("vp_play_volume_popup_unrealize is fail");
}
}
if (pNormalView->pBrightnessHandle) {
bool bIsRealize = FALSE;
- if (!vp_play_brightness_is_realize(pNormalView->pBrightnessHandle, &bIsRealize)) {
+ if (!vp_play_brightness_is_realize
+ (pNormalView->pBrightnessHandle, &bIsRealize)) {
VideoLogWarning("vp_play_volume_is_realize is fail");
}
if (bIsRealize) {
- if (!vp_play_brightness_unrealize(pNormalView->pBrightnessHandle)) {
+ if (!vp_play_brightness_unrealize
+ (pNormalView->pBrightnessHandle)) {
VideoLogWarning("vp_play_brightness_unrealize is fail");
}
}
bool bLandscape = vp_play_util_get_landscape_check(nRotate);
if (bLandscape) {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_NO_EFFECT_LANDSCAPE_SHOW, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_NO_EFFECT_LANDSCAPE_SHOW,
+ "*");
#ifdef SUBTITLE_K_FEATURE
- elm_object_signal_emit(vp_play_subtitle_get_object(pNormalView->pSubtitle), VP_SUBTITLE_SIGNAL_MAIN_LANDSCAPE_SHOW, "*");
- evas_object_move(vp_play_subtitle_get_object(pNormalView->pSubtitle), VP_SUBTITLE_LANDSCAPE_POSX, VP_SUBTITLE_LANDSCAPE_POSY);
+ elm_object_signal_emit(vp_play_subtitle_get_object
+ (pNormalView->pSubtitle),
+ VP_SUBTITLE_SIGNAL_MAIN_LANDSCAPE_SHOW,
+ "*");
+ evas_object_move(vp_play_subtitle_get_object
+ (pNormalView->pSubtitle),
+ VP_SUBTITLE_LANDSCAPE_POSX,
+ VP_SUBTITLE_LANDSCAPE_POSY);
pNormalView->nInitSubtitleX = VP_SUBTITLE_LANDSCAPE_POSX;
pNormalView->nInitSubtitleY = VP_SUBTITLE_LANDSCAPE_POSY;
#endif
} else {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_NO_EFFECT_PORTRAIT_SHOW, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_NO_EFFECT_PORTRAIT_SHOW,
+ "*");
#ifdef SUBTITLE_K_FEATURE
- elm_object_signal_emit(vp_play_subtitle_get_object(pNormalView->pSubtitle), VP_SUBTITLE_SIGNAL_MAIN_PORTRAIT_SHOW, "*");
- evas_object_move(vp_play_subtitle_get_object(pNormalView->pSubtitle), VP_SUBTITLE_PORTRAIT_POSX, VP_SUBTITLE_PORTRAIT_POSY);
+ elm_object_signal_emit(vp_play_subtitle_get_object
+ (pNormalView->pSubtitle),
+ VP_SUBTITLE_SIGNAL_MAIN_PORTRAIT_SHOW, "*");
+ evas_object_move(vp_play_subtitle_get_object
+ (pNormalView->pSubtitle),
+ VP_SUBTITLE_PORTRAIT_POSX,
+ VP_SUBTITLE_PORTRAIT_POSY);
pNormalView->nInitSubtitleX = VP_SUBTITLE_PORTRAIT_POSX;
pNormalView->nInitSubtitleY = VP_SUBTITLE_PORTRAIT_POSY;
#endif
#ifndef SUBTITLE_K_FEATURE
if (pNormalView->nDisplayMode != VP_MM_PLAYER_DISPLAY_FULL_SCREEN) {
- if (nRotate == VIDEO_PLAY_ROTATE_NONE || nRotate == VIDEO_PLAY_ROTATE_180) {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SUBTITLE_PORTRAIT, "*");
+ if (nRotate == VIDEO_PLAY_ROTATE_NONE
+ || nRotate == VIDEO_PLAY_ROTATE_180) {
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SUBTITLE_PORTRAIT,
+ "*");
} else {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SUBTITLE_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SUBTITLE_HIDE,
+ "*");
}
} else {
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SUBTITLE_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SUBTITLE_HIDE, "*");
}
#endif
}
VP_EVAS_TIMER_DEL(pNormalView->pSpeedTimer);
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_MAIN_SPEED_HIDE, "*");
pNormalView->nRotate = nRotate;
#ifdef FLICK_JUMP
int nW = 0;
int nH = 0;
- Evas_Coord_Rectangle rect = {0,};
- elm_win_screen_size_get(pPlayView->pWin, &rect.x, &rect.y, &rect.w, &rect.h);
+ Evas_Coord_Rectangle rect = { 0, };
+ elm_win_screen_size_get(pPlayView->pWin, &rect.x, &rect.y, &rect.w,
+ &rect.h);
if (pNormalView->nRotate == VIDEO_PLAY_ROTATE_NONE) {
nW = rect.w / 2;
nH = rect.h;
return TRUE;
}
-bool vp_play_normal_view_set_launching_mode(normal_view_handle pViewHandle, video_play_launching_type_t nLaunchingType)
+bool vp_play_normal_view_set_launching_mode(normal_view_handle pViewHandle,
+ video_play_launching_type_t
+ nLaunchingType)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
pNormalView->nLaunchingType = nLaunchingType;
return TRUE;
}
+
bool vp_play_normal_view_update(normal_view_handle pViewHandle)
{
if (!pViewHandle) {
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
PlayView *pPlayView = pNormalView->pPlayView;
VideoLogWarning(" == NORMAL VIEW UPDATE ==");
if (pNormalView->pVolumeHandle) {
bool bIsRealize = FALSE;
- if (!vp_play_volume_is_realize(pNormalView->pVolumeHandle, &bIsRealize)) {
+ if (!vp_play_volume_is_realize
+ (pNormalView->pVolumeHandle, &bIsRealize)) {
VideoLogWarning("vp_play_volume_is_realize is fail");
}
if (bIsRealize) {
- /*update volume popup*/
+ /*update volume popup */
if (!vp_play_normal_view_volume_update(pNormalView)) {
- VideoLogWarning("vp_play_normal_view_volume_update is fail");
+ VideoLogWarning
+ ("vp_play_normal_view_volume_update is fail");
}
}
}
if (pNormalView->pVolumePopupHandle) {
bool bIsRealize = FALSE;
- if (!vp_play_volume_popup_is_realize(pNormalView->pVolumePopupHandle, &bIsRealize)) {
+ if (!vp_play_volume_popup_is_realize
+ (pNormalView->pVolumePopupHandle, &bIsRealize)) {
VideoLogWarning("vp_play_volume_popup_is_realize is fail");
}
if (bIsRealize) {
- if (!vp_play_volume_popup_unrealize(pNormalView->pVolumePopupHandle)) {
+ if (!vp_play_volume_popup_unrealize
+ (pNormalView->pVolumePopupHandle)) {
VideoLogWarning("vp_play_volume_popup_unrealize is fail");
}
}
if (pNormalView->pBrightnessHandle) {
bool bIsRealize = FALSE;
- if (!vp_play_brightness_is_realize(pNormalView->pBrightnessHandle, &bIsRealize)) {
+ if (!vp_play_brightness_is_realize
+ (pNormalView->pBrightnessHandle, &bIsRealize)) {
VideoLogWarning("vp_play_volume_is_realize is fail");
}
if (bIsRealize) {
- if (!vp_play_brightness_unrealize(pNormalView->pBrightnessHandle)) {
+ if (!vp_play_brightness_unrealize
+ (pNormalView->pBrightnessHandle)) {
VideoLogWarning("vp_play_brightness_unrealize is fail");
}
}
}
_vp_play_normal_view_set_sound_path_state(pNormalView);
-// _vp_play_normal_view_set_rotate_lock_state(pNormalView);
-// _vp_play_normal_view_set_volume_lock_state(pNormalView);
- VideoLogWarning("share popup==%d,%d", pNormalView->bSharePanelFocusIn, pNormalView->bSharePanelPause);
+ VideoLogWarning("share popup==%d,%d", pNormalView->bSharePanelFocusIn,
+ pNormalView->bSharePanelPause);
if (pNormalView->bSharePanelFocusIn && pNormalView->bSharePanelPause) {
VideoLogWarning("pNormalView->bManualPause == FALSE");
pNormalView->bSharePanelPause = FALSE;
if (!vp_mm_player_get_state(pNormalView->pPlayerHandle, &nState)) {
VideoLogWarning("vp_mm_player_get_state is fail");
}
- if(!_vp_play_normal_view_check_during_call(pNormalView)) {
+ if (!_vp_play_normal_view_check_during_call(pNormalView)) {
if (nState != VP_MM_PLAYER_STATE_PLAYING) {
if (!vp_mm_player_play(pNormalView->pPlayerHandle)) {
VideoLogError("Unable to play");
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
_vp_play_normal_view_set_rotate_lock_state(pNormalView);
if (pNormalView->bShowLayout) {
_vp_play_normal_view_hide_layout(pNormalView, TRUE);
return TRUE;
}
-bool vp_play_normal_view_set_share_panel_state(normal_view_handle pViewHandle)
+bool vp_play_normal_view_set_share_panel_state(normal_view_handle
+ pViewHandle)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
pNormalView->bSharepopup = FALSE;
pNormalView->bSharePanelFocusIn = TRUE;
PlayView *pPlayView = pNormalView->pPlayView;
- if(pPlayView->bIsPlayBeforeShare) {
+ pPlayView->bIsSharePopup = FALSE;
+ if (pPlayView->bIsPlayBeforeShare) {
vp_play_normal_view_resume_or_pause(pPlayView->pNormalView);
+ pPlayView->bIsPlayBeforeShare = FALSE;
}
return TRUE;
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
- VideoLogInfo("bIsPopupShow=%d,bIsSubtitleShow=%d", pNormalView->bIsPopupShow, pNormalView->bIsSubtitleShow);
+ NormalView *pNormalView = (NormalView *) pViewHandle;
+ VideoLogInfo("bIsPopupShow=%d,bIsSubtitleShow=%d",
+ pNormalView->bIsPopupShow, pNormalView->bIsSubtitleShow);
if (pNormalView->pDetailHandle != NULL) {
VideoLogError("Detail View exists");
VideoLogWarning("vp_play_volume_unrealize is fail");
}
} else {
- __vp_normal_more_btn_clicked_cb((void *)pNormalView, pNormalView->pMoreBtn, NULL);
+ __vp_normal_more_btn_clicked_cb((void *) pNormalView,
+ pNormalView->pMoreBtn, NULL);
}
return TRUE;
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (pNormalView->pCtxPopup) {
elm_ctxpopup_dismiss(pNormalView->pCtxPopup);
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (pNormalView->pCtxPopup) {
elm_ctxpopup_dismiss(pNormalView->pCtxPopup);
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
_vp_play_normal_view_on_volume_popup(pNormalView, FALSE);
- int nMuteVal = vp_play_volume_get_mute_value(pNormalView->pVolumeHandle);
+ int nMuteVal =
+ vp_play_volume_get_mute_value(pNormalView->pVolumeHandle);
if (nMuteVal > 0) {
pNormalView->nLastVolume = nMuteVal;
- vp_play_volume_set_value(pNormalView->pVolumeHandle, pNormalView->nLastVolume);
+ vp_play_volume_set_value(pNormalView->pVolumeHandle,
+ pNormalView->nLastVolume);
} else {
vp_play_volume_set_mute_value(pNormalView->pVolumeHandle);
pNormalView->nLastVolume = 0;
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (!pNormalView->pVolumeHandle) {
return TRUE;
}
-bool vp_play_normal_view_set_lock_screen(normal_view_handle pViewHandle, bool bLock)
+bool vp_play_normal_view_set_lock_screen(normal_view_handle pViewHandle,
+ bool bLock)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (pNormalView->bAudioOnly) {
VideoLogDebug("Audio only mode is on hence lock feature disabled");
pNormalView->bLockScreen = bLock;
VP_EVAS_TIMER_DEL(pNormalView->pLockScreenTimer);
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_RESROUCE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_RESROUCE_EDJ_PATH);
free(path);
- elm_object_part_content_unset(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_LOCKSCREEN);
+ elm_object_part_content_unset(pNormalView->pMainLayout,
+ VP_PLAY_SWALLOW_NORMAL_LOCKSCREEN);
VP_EVAS_DEL(pNormalView->pLockBtn);
PlayView *pPlayView = pNormalView->pPlayView;
Evas_Object *pParent = NULL;
VP_EVAS_TIMER_DEL(pNormalView->pHideFinishTimer);
_vp_play_normal_view_hide_layout(pNormalView, TRUE);
- vp_play_volume_unset_mouse_callbacks(pNormalView->pVolumeHandle, pNormalView->pPlayView->pWin);
+ vp_play_volume_unset_mouse_callbacks(pNormalView->pVolumeHandle,
+ pNormalView->pPlayView->pWin);
pNormalView->pLockScreenTimer =
- ecore_timer_add(VP_NORMAL_HIDE_SCREEN_LOCK_TIMER_INTERVAL,
- __vp_normal_lockscreen_timer_cb, (void *)pNormalView);
-
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_LOCKSCREEN_SHOW, "*");
-
- pNormalView->pLockBtn = vp_button_create(
- pParent, "custom/flat_46_46/default", NULL,
- (Evas_Smart_Cb)__vp_normal_function_btn_clicked_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_press_cb,
- (Evas_Smart_Cb)__vp_normal_control_btn_unpress_cb,
- (void *)pNormalView);
+ ecore_timer_add(VP_NORMAL_HIDE_SCREEN_LOCK_TIMER_INTERVAL,
+ __vp_normal_lockscreen_timer_cb,
+ (void *) pNormalView);
+
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_LOCKSCREEN_SHOW, "*");
+
+ pNormalView->pLockBtn =
+ vp_button_create(pParent, "custom/flat_46_46/default", NULL,
+ (Evas_Smart_Cb)
+ __vp_normal_function_btn_clicked_cb,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_press_cb,
+ (Evas_Smart_Cb)
+ __vp_normal_control_btn_unpress_cb,
+ (void *) pNormalView);
if (!pNormalView->pLockBtn) {
VideoLogError("elm_button_add is fail");
return FALSE;
Evas_Object *pIcon = NULL;
- pIcon = vp_button_create_icon(pNormalView->pLockBtn, edj_path, VP_PLAY_NORMAL_RES_LOCK);
- elm_object_part_content_set(pNormalView->pLockBtn, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pLockBtn, edj_path, VP_PLAY_NORMAL_RES_LOCK_PRESS);
- elm_object_part_content_set(pNormalView->pLockBtn, VP_PLAY_SWALLOW_BUTTON_PRESS_ICON, pIcon);
-
- pIcon = vp_button_create_icon(pNormalView->pLockBtn, edj_path, VP_PLAY_NORMAL_RES_LOCK);
- elm_object_part_content_set(pNormalView->pLockBtn, VP_PLAY_SWALLOW_BUTTON_DIM_ICON, pIcon);
-
- elm_object_part_content_set(pNormalView->pMainLayout, VP_PLAY_SWALLOW_NORMAL_LOCKSCREEN, pNormalView->pLockBtn);
+ pIcon =
+ vp_button_create_icon(pNormalView->pLockBtn, edj_path,
+ VP_PLAY_NORMAL_RES_LOCK);
+ elm_object_part_content_set(pNormalView->pLockBtn,
+ VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pLockBtn, edj_path,
+ VP_PLAY_NORMAL_RES_LOCK_PRESS);
+ elm_object_part_content_set(pNormalView->pLockBtn,
+ VP_PLAY_SWALLOW_BUTTON_PRESS_ICON,
+ pIcon);
+
+ pIcon =
+ vp_button_create_icon(pNormalView->pLockBtn, edj_path,
+ VP_PLAY_NORMAL_RES_LOCK);
+ elm_object_part_content_set(pNormalView->pLockBtn,
+ VP_PLAY_SWALLOW_BUTTON_DIM_ICON,
+ pIcon);
+
+ elm_object_part_content_set(pNormalView->pMainLayout,
+ VP_PLAY_SWALLOW_NORMAL_LOCKSCREEN,
+ pNormalView->pLockBtn);
evas_object_show(pNormalView->pLockBtn);
VideoLogWarning("================ UNLOCK HOME KEY ==============");
vp_play_util_key_ungrab(pPlayView->pWin, VP_HOME_KEY);
- elm_object_signal_emit(pNormalView->pMainLayout, VP_NORMAL_SIGNAL_LOCKSCREEN_HIDE, "*");
- vp_play_volume_set_mouse_callbacks(pNormalView->pVolumeHandle, pNormalView->pPlayView->pWin);
+ elm_object_signal_emit(pNormalView->pMainLayout,
+ VP_NORMAL_SIGNAL_LOCKSCREEN_HIDE, "*");
+ vp_play_volume_set_mouse_callbacks(pNormalView->pVolumeHandle,
+ pNormalView->pPlayView->pWin);
vp_play_util_key_grab(pPlayView->pWin, VP_VOLUME_UP_KEY);
vp_play_util_key_grab(pPlayView->pWin, VP_VOLUME_DOWN_KEY);
vp_play_util_key_grab(pPlayView->pWin, VP_VOLUME_MUTE);
return TRUE;
}
-bool vp_play_normal_view_get_lock_screen(normal_view_handle pViewHandle, bool *bLock)
+bool vp_play_normal_view_get_lock_screen(normal_view_handle pViewHandle,
+ bool * bLock)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
*bLock = pNormalView->bLockScreen;
return;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (pNormalView->bIsPopupShow) {
}
}
-void vp_play_normal_view_web_type_disconnect(normal_view_handle pViewHandle)
+void vp_play_normal_view_web_type_disconnect(normal_view_handle
+ pViewHandle)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (!pNormalView->pPlayView) {
VideoLogError("pNormalView->pPlayView is NULL");
if (pPlayView->nStartPosition <= 0) {
int nPosition = 0;
- if (!vp_mm_player_get_position(pNormalView->pPlayerHandle, &nPosition)) {
+ if (!vp_mm_player_get_position
+ (pNormalView->pPlayerHandle, &nPosition)) {
VideoLogError("vp_mm_player_get_position is fail");
}
if (nPosition > 0) {
vp_mm_player_destroy(pNormalView->pPlayerHandle);
pNormalView->pPlayerHandle = NULL;
- VideoLogInfo("pNormalView->nStartPosition : [%d]", pNormalView->nStartPosition);
+ VideoLogInfo("pNormalView->nStartPosition : [%d]",
+ pNormalView->nStartPosition);
}
void vp_play_normal_view_web_type_reconnect(normal_view_handle pViewHandle)
return;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (!pNormalView->pPlayView) {
VideoLogError("pNormalView->pPlayView is NULL");
pNormalView->nStartPosition = pPlayView->nStartPosition;
}
- VideoLogInfo("pNormalView->nStartPosition : [%d]", pNormalView->nStartPosition);
+ VideoLogInfo("pNormalView->nStartPosition : [%d]",
+ pNormalView->nStartPosition);
_vp_play_normal_view_play_start(pNormalView, FALSE);
}
//For mini controller
bool vp_controller_play_normal_view_pause(normal_view_handle pViewHandle)
{
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (!pNormalView) {
VideoLogError("pViewHandle is NULL");
return FALSE;
if (!vp_mm_player_pause(pNormalView->pPlayerHandle)) {
VideoLogWarning("Pause Fail");
}
- if (pPlayView->win_minicon) {
+ if (pPlayView && pPlayView->win_minicon) {
vp_minicontroller_update_control(pPlayView);
}
- if (pPlayView->win_lockmini) {
+ if (pPlayView && pPlayView->win_lockmini) {
vp_lockscreenmini_update_control(pPlayView);
}
VP_EVAS_IDLER_DEL(pNormalView->pControlIdler);
- pNormalView->pControlIdler = ecore_idler_add(__vp_normal_control_idler_cb, (void *)pNormalView);
+ pNormalView->pControlIdler =
+ ecore_idler_add(__vp_normal_control_idler_cb,
+ (void *) pNormalView);
pNormalView->bManualPause = TRUE;
return TRUE;
bool vp_controller_play_normal_view_resume(normal_view_handle pViewHandle)
{
VideoLogInfo("Resume button");
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (!pNormalView) {
VideoLogError("pViewHandle is NULL");
return FALSE;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
}
- if(_vp_play_normal_view_check_during_call(pNormalView)) {
+ if (_vp_play_normal_view_check_during_call(pNormalView)) {
return FALSE;
}
vp_lockscreenmini_update_control(pPlayView);
}
VP_EVAS_IDLER_DEL(pNormalView->pControlIdler);
- pNormalView->pControlIdler = ecore_idler_add(__vp_normal_control_idler_cb, (void *)pNormalView);
+ pNormalView->pControlIdler =
+ ecore_idler_add(__vp_normal_control_idler_cb,
+ (void *) pNormalView);
pNormalView->bManualPause = FALSE;
return TRUE;
}
-bool vp_controller_play_normal_view_next_play(normal_view_handle pViewHandle)
+bool vp_controller_play_normal_view_next_play(normal_view_handle
+ pViewHandle)
{
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (!pNormalView) {
VideoLogError("pViewHandle is NULL");
return FALSE;
return TRUE;
}
-bool vp_controller_play_normal_view_prev_play(normal_view_handle pViewHandle)
+bool vp_controller_play_normal_view_prev_play(normal_view_handle
+ pViewHandle)
{
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (!pNormalView) {
VideoLogError("pViewHandle is NULL");
return FALSE;
return TRUE;
}
-char *vp_controller_normal_view_get_thumbnail(normal_view_handle pViewHandle)
+char *vp_controller_normal_view_get_thumbnail(normal_view_handle
+ pViewHandle)
{
char *szThumbnail = NULL;
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (!pNormalView) {
VideoLogError("pViewHandle is NULL ");
return NULL;
VideoLogError("pNormalView->szMediaURL");
return NULL;
}
- vp_media_contents_get_video_thumbnail_path(pNormalView->szMediaURL, &szThumbnail);
- VideoLogInfo("thumbnail = %s:%s", pNormalView->szMediaURL, szThumbnail);
+ vp_media_contents_get_video_thumbnail_path(pNormalView->szMediaURL,
+ &szThumbnail);
+ VideoLogInfo("thumbnail = %s:%s", pNormalView->szMediaURL,
+ szThumbnail);
return szThumbnail;
}
char *vp_controller_normal_view_get_title(normal_view_handle pViewHandle)
{
char *pTitle = NULL;
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (!pNormalView) {
VideoLogError("pViewHandle is NULL");
return NULL;
int vp_controller_normal_view_get_duration(normal_view_handle pViewHandle)
{
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (!pNormalView) {
VideoLogError("pViewHandle is NULL");
return 0;
bool vp_controller_normal_view_pop_view(normal_view_handle pViewHandle)
{
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (!pNormalView) {
VideoLogError("pViewHandle is NULL");
return FALSE;
return TRUE;
}
-int vp_controller_normal_view_get_played_state(normal_view_handle pViewHandle)
+int vp_controller_normal_view_get_played_state(normal_view_handle
+ pViewHandle)
{
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE;
if (!pNormalView) {
VideoLogError("pViewHandle is NULL");
}
VideoLogError("state is %d", nState);
- return (int)nState;
+ return (int) nState;
}
-bool vp_controller_normal_view_add_played_state_cb(normal_view_handle pViewHandle, vp_normal_view_state_cb fState_cb)
+bool vp_controller_normal_view_add_played_state_cb(normal_view_handle
+ pViewHandle,
+ vp_normal_view_state_cb
+ fState_cb)
{
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
if (!pNormalView) {
VideoLogError("pViewHandle is NULL");
return FALSE;
return;
}
- NormalView *pNormalView = (NormalView *)pViewHandle;
+ NormalView *pNormalView = (NormalView *) pViewHandle;
PlayView *pPlayView = pNormalView->pPlayView;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
}
if (pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_WEB &&
- pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_PREVIEW &&
- pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MESSAGE &&
- pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_EMAIL &&
- pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MULTI_PATH) {
+ pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_PREVIEW &&
+ pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MESSAGE &&
+ pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_EMAIL &&
+ pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MULTI_PATH) {
char *pVideoId = NULL;
vp_media_contents_get_video_id(pNormalView->szMediaURL, &pVideoId);
- VideoSecureLogInfo("change == %d, %s, %s", pNormalView->nLaunchingType, pNormalView->szMediaURL, pVideoId);
+ VideoSecureLogInfo("change == %d, %s, %s",
+ pNormalView->nLaunchingType,
+ pNormalView->szMediaURL, pVideoId);
if (!vp_file_exists(pNormalView->szMediaURL) || !pVideoId) {
VideoLogError("current file is deleted");
- _vp_play_normal_view_release_service_share(pNormalView->pPlayView);
+ _vp_play_normal_view_release_service_share(pNormalView->
+ pPlayView);
VP_FREE(pVideoId);
if (!pPlayView->pFunc) {
VideoLogError("pPlayView pFunc is NULL");
vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE;
- if (!vp_mm_player_get_state(pNormalView->pPlayerHandle, &nState)) {
+ if (!vp_mm_player_get_state
+ (pNormalView->pPlayerHandle, &nState)) {
VideoLogWarning("vp_mm_player_get_state is fail");
}
if (nState == VP_MM_PLAYER_STATE_PAUSED) {
pPlayView->pFunc->vp_play_func_exit(pPlayView);
}
+
+ PlayView *pPlayView = pNormalView->pPlayView;
+ if (pNormalView->bAudioOnly == TRUE) {
+ pNormalView->bAudioOnly = FALSE;
+ if (pPlayView) {
+ pPlayView->bAudioOnly = FALSE;
+
+ vp_play_normal_view_on_controller_button_press
+ (pPlayView->pNormalView, CONTROLLER_PAUSE_BUTTON);
+ if (pPlayView->win_minicon) {
+ vp_minicontroller_destroy(pPlayView);
+ }
+ if (pPlayView->win_lockmini) {
+ vp_lockscreenmini_destroy(pPlayView);
+ }
+ }
+
+ }
}
VP_FREE(pVideoId);
}
}
-vp_mm_player_state_t vp_play_normal_view_get_player_state(PlayView *pPlayView)
+vp_mm_player_state_t vp_play_normal_view_get_player_state(PlayView *
+ pPlayView)
{
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return -1;
}
- NormalView *pNormalView = (NormalView *)pPlayView->pNormalView;
+ NormalView *pNormalView = (NormalView *) pPlayView->pNormalView;
+
+ if (!pNormalView) {
+ VideoLogError("pNormalView is NULL");
+ return -1;
+ }
+
vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE;
if (!vp_mm_player_get_state(pNormalView->pPlayerHandle, &nState)) {
return nState;
}
-bool vp_play_normal_view_is_audio_only(PlayView *pPlayView)
+bool vp_play_normal_view_is_audio_only(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return FALSE;
}
- NormalView *pNormalView = (NormalView *)pPlayView->pNormalView;
+ NormalView *pNormalView = (NormalView *) pPlayView->pNormalView;
if (pNormalView->bAudioOnly == TRUE) {
return TRUE;
return FALSE;
}
+
+
+bool vp_play_normal_view_reset_audio_only(normal_view_handle * pViewHandle)
+{
+
+ NormalView *pNormalView = (NormalView *) pViewHandle;
+ if (!pNormalView) {
+ VideoLogError("pNormalView is NULL");
+ return FALSE;
+ }
+
+ pNormalView->bAudioOnly = FALSE;
+ return TRUE;
+
+}
+
+
+bool vp_play_normal_view_handle_language_change(normal_view_handle * pViewHandle)
+{
+ NormalView *pNormalView = (NormalView *) pViewHandle;
+
+ if (!pNormalView) {
+ VideoLogError("pNormalView is NULL");
+ return FALSE;
+ }
+
+ VP_EVAS_DEL(pNormalView->pCtxPopup);
+ return TRUE;
+}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <runtime_info.h>
#include <network/wifi.h>
#define VP_PLAY_VIEW_VOLUME_SPEED_TIMER 0.05
#define VP_PLAY_VIEW_DB_UPDATE_TIMER 1.0
-static bool _vp_play_view_create_mode(PlayView *pPlayView);
-static bool _vp_play_view_destroy_mode(PlayView *pPlayView);
+static bool _vp_play_view_create_mode(PlayView * pPlayView);
+static bool _vp_play_view_destroy_mode(PlayView * pPlayView);
-static void _vp_play_view_destroy_handle(PlayView *pPlayView);
-static void _vp_play_view_create_volume_timer(PlayView *pPlayView);
+static void _vp_play_view_destroy_handle(PlayView * pPlayView);
+static void _vp_play_view_create_volume_timer(PlayView * pPlayView);
-#if 0//Tizen3.0 Build error
-/* callback functions */
-static Eina_Bool __vp_play_caller_window_event_cb(void *pUserData, int nType, void *pEvent)
-{
- if (!pUserData) {
- VideoLogError("[ERR] No exist pUserData.");
- return ECORE_CALLBACK_PASS_ON;
- }
-
- if (!pEvent) {
- VideoLogError("[ERR] No exist pEvent.");
- return ECORE_CALLBACK_PASS_ON;
- }
-
- PlayView *pPlayView = (PlayView *)pUserData;
-
- if (pPlayView->bViewChange) {
- return ECORE_CALLBACK_PASS_ON;
- }
-
- Ecore_X_Event_Window_Focus_In *ev = (Ecore_X_Event_Window_Focus_In *)pEvent;
-
- if (ev->win == pPlayView->nCallerXwinID) {
- elm_exit();
- }
-
- return ECORE_CALLBACK_PASS_ON;
-
-}
-
-static Eina_Bool __vp_play_view_mouse_in_cb(void *pUserData, int type, void *event)
-{
- if (!pUserData) {
- VideoLogError("[ERR] No exist pUserData.");
- return ECORE_CALLBACK_PASS_ON;
- }
-
- Ecore_X_Event_Mouse_In *e = event;
-
- PlayView *pPlayView = (PlayView *)pUserData;
-
- if (e->win == pPlayView->nXwinID) {
- VideoLogWarning("Mouse IN");
- pPlayView->bMouseOut = FALSE;
- }
- vp_play_normal_view_rotate_update(pPlayView->pNormalView);
- vp_play_util_key_grab(pPlayView->pWin, VP_VOLUME_UP_KEY);
- vp_play_util_key_grab(pPlayView->pWin, VP_VOLUME_DOWN_KEY);
- vp_play_util_key_grab(pPlayView->pWin, VP_VOLUME_MUTE);
- return ECORE_CALLBACK_PASS_ON;
-}
-
-static Eina_Bool __vp_play_view_mouse_out_cb(void *pUserData, int type, void *event)
-{
- if (!pUserData) {
- VideoLogError("[ERR] No exist pUserData.");
- return ECORE_CALLBACK_PASS_ON;
- }
-
-
- Ecore_X_Event_Mouse_Out *e = event;
-
- PlayView *pPlayView = (PlayView *)pUserData;
-
- if (e->win == pPlayView->nXwinID) {
- VideoLogWarning("Mouse OUT");
- pPlayView->bMouseOut = TRUE;
- }
- vp_play_util_key_ungrab(pPlayView->pWin, VP_VOLUME_UP_KEY);
- vp_play_util_key_ungrab(pPlayView->pWin, VP_VOLUME_DOWN_KEY);
- vp_play_util_key_ungrab(pPlayView->pWin, VP_VOLUME_MUTE);
- return ECORE_CALLBACK_PASS_ON;
-}
-
-
-static Eina_Bool __vp_play_focus_in_cb(void *pUserData, int nType, void *pEvent)
-{
-#if 0
- if (!pUserData) {
- VideoLogError("[ERR] No exist pUserData.");
- return ECORE_CALLBACK_PASS_ON;
- }
-
- if (!pEvent) {
- VideoLogError("[ERR] No exist pEvent.");
- return ECORE_CALLBACK_PASS_ON;
- }
-
- PlayView *pPlayView = (PlayView *)pUserData;
-
- if (pPlayView->bViewChange) {
- return ECORE_CALLBACK_PASS_ON;
- }
-
- Ecore_X_Event_Window_Focus_In *ev = (Ecore_X_Event_Window_Focus_In *)pEvent;
-
- if (ev->win != pPlayView->nXwinID) {
- VideoLogWarning("Invalid Window => cur:0x%x - video:0x%x", ev->win, pPlayView->nXwinID);
- return ECORE_CALLBACK_PASS_ON;
- }
-
- if (ev->win == pPlayView->nXwinID) {
- VideoLogWarning("Focus In");
- if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
-// If type is EMAIL/MESSAGE MODE,
-// Email -> play -> detail -> popup -> focus in cb -> resume function -> close all popup(in resume function)
- vp_play_normal_view_set_share_panel_state(pPlayView->pNormalView);
- if (!vp_play_normal_view_update(pPlayView->pNormalView)) {
- VideoLogError("vp_play_normal_view_update handle is null");
- return ECORE_CALLBACK_PASS_ON;
- }
- }
- }
-#endif
- return ECORE_CALLBACK_PASS_ON;
-}
-
-static Eina_Bool __vp_play_focus_out_cb(void *pUserData, int nType, void *pEvent)
-{
-#if 0
- if (!pUserData) {
- VideoLogError("[ERR] No exist pUserData.");
- return ECORE_CALLBACK_PASS_ON;
- }
-
- if (!pEvent) {
- VideoLogError("[ERR] No exist pEvent.");
- return ECORE_CALLBACK_PASS_ON;
- }
-
- PlayView *pPlayView = (PlayView *)pUserData;
-
- Ecore_X_Event_Window_Focus_Out *ev = (Ecore_X_Event_Window_Focus_Out *)pEvent;
-
- if (pPlayView->bViewChange) {
- return ECORE_CALLBACK_PASS_ON;
- }
-
- if (ev->win != pPlayView->nXwinID) {
- VideoLogWarning("Invalid Window => cur:0x%x - video:0x%x", ev->win, pPlayView->nXwinID);
- return ECORE_CALLBACK_PASS_ON;
- }
-
- if (ev->win == pPlayView->nXwinID) {
- VideoLogWarning("Focus Out");
- if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- }
- }
-#endif
- return ECORE_CALLBACK_PASS_ON;
-}
-
-static Eina_Bool __vp_play_visibility_cb(void *pUserData, int nType, void *pEvent)
-{
- if (!pUserData) {
- VideoLogError("[ERR] No exist pUserData.");
- return ECORE_CALLBACK_PASS_ON;
- }
-
- if (!pEvent) {
- VideoLogError("[ERR] No exist pEvent.");
- return ECORE_CALLBACK_PASS_ON;
- }
-
- PlayView *pPlayView = (PlayView *)pUserData;
-
- Ecore_X_Event_Window_Visibility_Change* ev = (Ecore_X_Event_Window_Visibility_Change *)pEvent;
-
- if (ev->win != pPlayView->nXwinID) {
- VideoLogWarning("Invalid Window => cur:0x%x - video:0x%x", ev->win, pPlayView->nXwinID);
- return ECORE_CALLBACK_PASS_ON;
- }
-
- if (pPlayView->bViewChange) {
- return ECORE_CALLBACK_PASS_ON;
- }
-
-
- if (ev->win == pPlayView->nXwinID) {
- if (ev->fully_obscured == 1) {
- VideoLogWarning("hide main window");
- pPlayView->bVisible = FALSE;
- if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- if (!vp_play_normal_view_pause(pPlayView->pNormalView)) {
- VideoLogError("vp_play_normal_view_resume handle is null");
- return ECORE_CALLBACK_PASS_ON;
- }
- if (!vp_play_normal_view_update(pPlayView->pNormalView)) {
- VideoLogError("vp_play_normal_view_update handle is null");
- return ECORE_CALLBACK_PASS_ON;
- }
- }
- } else {
- VideoLogWarning("show main window");
- pPlayView->bVisible = TRUE;
- if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- if (!vp_play_normal_view_resume(pPlayView->pNormalView)) {
- VideoLogError("vp_play_normal_view_resume handle is null");
- return ECORE_CALLBACK_PASS_ON;
- }
- if (!vp_play_normal_view_update(pPlayView->pNormalView)) {
- VideoLogError("vp_play_normal_view_update handle is null");
- return ECORE_CALLBACK_PASS_ON;
- }
- }
- }
- }
-
- return ECORE_CALLBACK_PASS_ON;
-}
-
-static Eina_Bool __vp_play_client_message_cb(void *pUserData, int nType, void *pEvent)
-{
- if (!pUserData) {
- VideoLogError("[ERR] No exist pUserData.");
- return ECORE_CALLBACK_PASS_ON;
- }
-
- if (!pEvent) {
- VideoLogError("[ERR] No exist pEvent.");
- return ECORE_CALLBACK_PASS_ON;
- }
-
- PlayView *pPlayView = (PlayView *)pUserData;
-
- Ecore_X_Event_Client_Message *ev = (Ecore_X_Event_Client_Message *) pEvent;
-
- if (ev->win != pPlayView->nXwinID) {
- VideoLogWarning("Invalid Window => cur:0x%x - video:0x%x", ev->win, pPlayView->nXwinID);
- return ECORE_CALLBACK_PASS_ON;
- }
-
- if (pPlayView->bViewChange) {
- return ECORE_CALLBACK_PASS_ON;
- }
-
- return ECORE_CALLBACK_PASS_ON;
-}
-
-static Eina_Bool __vp_play_view_window_property_change(void *pUserData, int type, void *event)
-{
- if (!pUserData) {
- VideoLogError("[ERR] No exist pUserData.");
- return ECORE_CALLBACK_PASS_ON;
- }
-
- Ecore_X_Event_Window_Property *e = event;
-
- PlayView *pPlayView = (PlayView *)pUserData;
-
- if (e->win == pPlayView->nXwinID) {
- bool bVideoOnly = FALSE;
- if (pPlayView->bActivate == FALSE) {
- VideoLogInfo("__vp_play_view_window_property_change");
- vp_play_view_unrealize(pPlayView);
- } else {
- if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- if (vp_play_normal_view_player_state_changed_get(pPlayView->pNormalView)) {
- vp_play_normal_view_set_video_only(pPlayView->pNormalView, bVideoOnly);
- }
- }
- }
- } else if (pPlayView->pMultiView) {
- if (e->atom == ECORE_X_ATOM_WM_STATE) {
- Ecore_X_Window_State_Hint state;
- state = ecore_x_icccm_state_get(e->win);
-
- switch (state) {
- case ECORE_X_WINDOW_STATE_HINT_ICONIC:
- VideoLogInfo("MINI : Iconified");
- break;
- case ECORE_X_WINDOW_STATE_HINT_WITHDRAWN:
- VideoLogInfo("MINI : Hide");
- /* pause */
- vp_play_multi_view_get_last_position(pPlayView->pMultiView, &(pPlayView->nStartPosition));
- vp_play_multi_view_get_audio_track(pPlayView->pMultiView, &(pPlayView->nAudioIndex));
- VP_FREE(pPlayView->szSubtitleURL);
- vp_play_multi_view_get_subtitle(pPlayView->pMultiView, &(pPlayView->szSubtitleURL));
- vp_play_multi_view_pause(pPlayView->pMultiView);
- if (!vp_play_multi_view_set_manual_pause(pPlayView->pMultiView, TRUE)) {
- VideoLogError("vp_play_normal_view_set_manual_pause fail");
- }
- break;
- case ECORE_X_WINDOW_STATE_HINT_NORMAL:
- VideoLogInfo("MINI : Show");
- break;
- default:
- // do something for handling error
- break;
- }
- }
- }
-
- return ECORE_CALLBACK_PASS_ON;
-}
-
-static Eina_Bool __vp_play_delete_request_cb(void *pUserData, int nType, void *pEvent)
-{
- if (!pUserData) {
- VideoLogError("[ERR] No exist pUserData.");
- return ECORE_CALLBACK_PASS_ON;
- }
-
- if (!pEvent) {
- VideoLogError("[ERR] No exist pEvent.");
- return ECORE_CALLBACK_PASS_ON;
- }
-
- PlayView *pPlayView = (PlayView *)pUserData;
-
- VideoLogWarning("DELETE REQUEST CALL");
-
- Ecore_X_Event_Window_Delete_Request *ev = (Ecore_X_Event_Window_Delete_Request *) pEvent;
-
- if (ev->win != pPlayView->nXwinID) {
- VideoLogWarning("Invalid Window => cur:0x%x - video:0x%x", ev->win, pPlayView->nXwinID);
- return ECORE_CALLBACK_PASS_ON;
- }
-
- if (pPlayView->bViewChange) {
- return ECORE_CALLBACK_PASS_ON;
- }
-
- elm_exit();
-
- return ECORE_CALLBACK_PASS_ON;
-}
-#endif
static Eina_Bool __vp_play_view_volume_timer_cb(void *pUserData)
return EINA_FALSE;
}
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
if (pPlayView->bVolumeIncrease) {
vp_play_normal_view_volume_increase(pPlayView->pNormalView);
} else {
VP_EVAS_TIMER_DEL(pPlayView->pVolumeTimer);
- pPlayView->pVolumeTimer = ecore_timer_add(VP_PLAY_VIEW_VOLUME_SPEED_TIMER,
- __vp_play_view_volume_timer_cb, (void *)pPlayView);
+ pPlayView->pVolumeTimer =
+ ecore_timer_add(VP_PLAY_VIEW_VOLUME_SPEED_TIMER,
+ __vp_play_view_volume_timer_cb,
+ (void *) pPlayView);
return EINA_FALSE;
}
return EINA_FALSE;
}
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
pPlayView->pHwKeyLongPressTimer = NULL;
return EINA_FALSE;
return EINA_FALSE;
}
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
VP_EVAS_TIMER_DEL(pPlayView->pMediaLongPressTimer);
return EINA_FALSE;
}
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
if (pPlayView->nMediaKeyPressCount == 1) {
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
return EINA_FALSE;
}
-static void __vp_play_view_noti_pipe_cb(void *pUserData, void *pBuf, int nByte)
+static void __vp_play_view_noti_pipe_cb(void *pUserData, void *pBuf,
+ int nByte)
{
if (!pUserData) {
VideoLogError("PlayView handle is NULL");
return;
}
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
vp_play_normal_view_hide_sound_popup(pPlayView->pNormalView);
}
}
-static void __vp_play_sound_route_change_cb(int nRoute, bool bAvailable, void *pUserData)
+static void __vp_play_sound_route_change_cb(int nRoute, bool bAvailable,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("PlayView handle is NULL");
return;
}
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
if (pPlayView->pNotiPipe) {
- ecore_pipe_write(pPlayView->pNotiPipe, pUserData, sizeof(PlayView));
+ ecore_pipe_write(pPlayView->pNotiPipe, pUserData,
+ sizeof(PlayView));
}
}
-static void __vp_play_sound_volume_change_cb(int nType, int nVolume, void *pUserData)
+static void __vp_play_sound_volume_change_cb(int nType, int nVolume,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("PlayView handle is NULL");
return;
}
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
vp_play_normal_view_volume_update(pPlayView->pNormalView);
}
}
-static void __vp_play_rotate_changed_cb(void *pUserData, Evas_Object *pObj, void *pEventInfo)
+static void __vp_play_rotate_changed_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogError("PlayView handle is NULL");
return;
}
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
- int nAngle = elm_win_rotation_get((Evas_Object *)pObj);
+ int nAngle = elm_win_rotation_get((Evas_Object *) pObj);
video_play_rotate_t nRotate = VIDEO_PLAY_ROTATE_NONE;
switch (nAngle) {
if (pPlayView->nRotate != nRotate) {
vp_play_view_set_rotate(pPlayView, nRotate);
}
- if(pPlayView->win_minicon) {
- vp_minicontroller_rotate(pPlayView, nRotate);
+ if (pPlayView->win_minicon) {
+ vp_minicontroller_rotate(pPlayView, nAngle);
}
}
vp_util_lock_cpu();
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
/* send event to parent */
return;
}
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
/* send event to parent */
if (!pPlayView->pCallback) {
elm_exit();
}
-static Eina_Bool __vp_play_view_event_key_down_cb(void *pUserData, int nType, void *pEvent)
+static Eina_Bool __vp_play_view_event_key_down_cb(void *pUserData,
+ int nType, void *pEvent)
{
if (!pUserData) {
VideoLogError("PlayView handle is NULL");
}
- PlayView *pPlayView = (PlayView *)pUserData;
- Ecore_Event_Key *pKeyEvent = (Ecore_Event_Key *)pEvent;
+ PlayView *pPlayView = (PlayView *) pUserData;
+ Ecore_Event_Key *pKeyEvent = (Ecore_Event_Key *) pEvent;
/* default operation */
VideoLogWarning("HW EVENT KEY DOWN:%s", pKeyEvent->keyname);
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
bool bLock = FALSE;
pPlayView->bManualAppPause = TRUE;
- vp_play_normal_view_get_lock_screen(pPlayView->pNormalView, &bLock);
+ vp_play_normal_view_get_lock_screen(pPlayView->pNormalView,
+ &bLock);
if (bLock) {
- vp_play_normal_view_set_lock_screen(pPlayView->pNormalView, bLock);
+ vp_play_normal_view_set_lock_screen(pPlayView->pNormalView,
+ bLock);
+ }
+ if (vp_play_normal_view_is_audio_only(pPlayView)) {
+ VideoLogDebug("Lock the screen");
+ vp_play_util_set_unlock_power_key();
}
}
} else if (!strcmp(pKeyEvent->keyname, VP_MEDIA_KEY)) {
VP_EVAS_TIMER_DEL(pPlayView->pMediaLongPressTimer);
- pPlayView->pMediaLongPressTimer = ecore_timer_add(0.5, __vp_play_view_media_long_press_timer_cb, (void *)pPlayView);
+ pPlayView->pMediaLongPressTimer =
+ ecore_timer_add(0.5, __vp_play_view_media_long_press_timer_cb,
+ (void *) pPlayView);
} else if (!strcmp(pKeyEvent->keyname, VP_VOLUME_DOWN_KEY)) {
VideoLogWarning("VOLUME DOWN");
VP_EVAS_TIMER_DEL(pPlayView->pVolumeTimer);
sound_manager_set_current_sound_type(SOUND_TYPE_MEDIA);
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- vp_normalview_popup_style_e nPopupState = vp_play_normal_view_get_popup_show_state(pPlayView->pNormalView);
- if (nPopupState == VP_PLAY_NORMAL_VIEW_POPUP_NONE || nPopupState == VP_PLAY_NORMAL_VIEW_CTX_POPUP) {
- vp_play_normal_view_volume_decrease(pPlayView->pNormalView);
+ vp_normalview_popup_style_e nPopupState =
+ vp_play_normal_view_get_popup_show_state(pPlayView->
+ pNormalView);
+ if (nPopupState == VP_PLAY_NORMAL_VIEW_POPUP_NONE
+ || nPopupState == VP_PLAY_NORMAL_VIEW_CTX_POPUP) {
+ vp_play_normal_view_volume_decrease(pPlayView->
+ pNormalView);
pPlayView->bVolumeIncrease = FALSE;
_vp_play_view_create_volume_timer(pPlayView);
}
VideoLogWarning("KEY DOWN");
VP_EVAS_TIMER_DEL(pPlayView->pVolumeTimer);
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- vp_normalview_popup_style_e nPopupState = vp_play_normal_view_get_popup_show_state(pPlayView->pNormalView);
+ vp_normalview_popup_style_e nPopupState =
+ vp_play_normal_view_get_popup_show_state(pPlayView->
+ pNormalView);
if (nPopupState == VP_PLAY_NORMAL_VIEW_POPUP_NONE) {
- if (vp_play_normal_view_get_main_layout_focus_state(pPlayView->pNormalView) == FALSE) {
- vp_play_normal_view_volume_decrease(pPlayView->pNormalView);
+ if (vp_play_normal_view_get_main_layout_focus_state
+ (pPlayView->pNormalView) == FALSE) {
+ vp_play_normal_view_volume_decrease(pPlayView->
+ pNormalView);
pPlayView->bVolumeIncrease = FALSE;
_vp_play_view_create_volume_timer(pPlayView);
}
VP_EVAS_TIMER_DEL(pPlayView->pVolumeTimer);
sound_manager_set_current_sound_type(SOUND_TYPE_MEDIA);
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- vp_normalview_popup_style_e nPopupState = vp_play_normal_view_get_popup_show_state(pPlayView->pNormalView);
- if (nPopupState == VP_PLAY_NORMAL_VIEW_POPUP_NONE || nPopupState == VP_PLAY_NORMAL_VIEW_CTX_POPUP) {
- vp_play_normal_view_volume_increase(pPlayView->pNormalView);
+ vp_normalview_popup_style_e nPopupState =
+ vp_play_normal_view_get_popup_show_state(pPlayView->
+ pNormalView);
+ if (nPopupState == VP_PLAY_NORMAL_VIEW_POPUP_NONE
+ || nPopupState == VP_PLAY_NORMAL_VIEW_CTX_POPUP) {
+ vp_play_normal_view_volume_increase(pPlayView->
+ pNormalView);
pPlayView->bVolumeIncrease = TRUE;
_vp_play_view_create_volume_timer(pPlayView);
}
VideoLogWarning("KEY UP");
VP_EVAS_TIMER_DEL(pPlayView->pVolumeTimer);
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- vp_normalview_popup_style_e nPopupState = vp_play_normal_view_get_popup_show_state(pPlayView->pNormalView);
+ vp_normalview_popup_style_e nPopupState =
+ vp_play_normal_view_get_popup_show_state(pPlayView->
+ pNormalView);
if (nPopupState == VP_PLAY_NORMAL_VIEW_POPUP_NONE) {
- if (vp_play_normal_view_get_main_layout_focus_state(pPlayView->pNormalView) == FALSE) {
- vp_play_normal_view_volume_increase(pPlayView->pNormalView);
+ if (vp_play_normal_view_get_main_layout_focus_state
+ (pPlayView->pNormalView) == FALSE) {
+ vp_play_normal_view_volume_increase(pPlayView->
+ pNormalView);
pPlayView->bVolumeIncrease = TRUE;
_vp_play_view_create_volume_timer(pPlayView);
}
_vp_play_view_create_volume_timer(pPlayView);
}
- } else if (!strcmp(pKeyEvent->keyname, VP_POWER_KEY) || !strcmp(pKeyEvent->keyname, VP_SCREENSAVER_KEY)) {
+ } else if (!strcmp(pKeyEvent->keyname, VP_POWER_KEY)
+ || !strcmp(pKeyEvent->keyname, VP_SCREENSAVER_KEY)) {
VideoLogWarning("POWER KEY or SCREENSAVER KEY");
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
VP_EVAS_TIMER_DEL(pPlayView->pHwKeyLongPressTimer);
- pPlayView->pHwKeyLongPressTimer = ecore_timer_add(0.5, __vp_play_view_hw_key_long_press_timer_cb, (void *)pPlayView);
+ pPlayView->pHwKeyLongPressTimer =
+ ecore_timer_add(0.5,
+ __vp_play_view_hw_key_long_press_timer_cb,
+ (void *) pPlayView);
vp_play_normal_check_detail_view(pPlayView->pNormalView);
bool bPause = FALSE;
- vp_play_normal_view_get_pause_status(pPlayView->pNormalView, &bPause);
+ vp_play_normal_view_get_pause_status(pPlayView->pNormalView,
+ &bPause);
if (bPause && !vp_play_normal_view_is_audio_only(pPlayView)) {
vp_play_util_set_lock_power_key();
} else {
+ if (vp_play_normal_view_is_audio_only(pPlayView)) {
+ VideoLogDebug("Lock the screen");
+ vp_play_util_set_unlock_power_key();
+ }
VideoLogDebug("Lock feature disabled");
}
- vp_mm_player_state_t nState = vp_play_normal_view_get_player_state(pPlayView);
- if (nState == VP_MM_PLAYER_STATE_PLAYING && pPlayView->win_lockmini)
+ vp_mm_player_state_t nState =
+ vp_play_normal_view_get_player_state(pPlayView);
+ if (nState == VP_MM_PLAYER_STATE_PLAYING
+ && pPlayView->win_lockmini)
vp_lockscreenmini_show(pPlayView);
return EINA_TRUE;
}
- } else if (!strcmp(pKeyEvent->keyname, VP_KEY_CANCLE) || !strcmp(pKeyEvent->keyname, "Esc")) {
+ } else if (!strcmp(pKeyEvent->keyname, VP_KEY_CANCLE)
+ || !strcmp(pKeyEvent->keyname, "Esc")) {
VideoLogWarning("CANCLE KEY");
VP_EVAS_TIMER_DEL(pPlayView->pVolumeTimer);
- } else if (!strcmp(pKeyEvent->keyname, VP_PLAY_KEY) || !strcmp(pKeyEvent->keyname, VP_PAUSE_KEY)) {
+ } else if (!strcmp(pKeyEvent->keyname, VP_PLAY_KEY)
+ || !strcmp(pKeyEvent->keyname, VP_PAUSE_KEY)) {
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
vp_play_normal_view_resume_or_pause(pPlayView->pNormalView);
}
}
} else if (!strcmp(pKeyEvent->keyname, VP_FORWARD_KEY)) {
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- vp_normalview_popup_style_e nPopupState = vp_play_normal_view_get_popup_show_state(pPlayView->pNormalView);
- if (nPopupState == VP_PLAY_NORMAL_VIEW_POPUP_NONE || nPopupState == VP_PLAY_NORMAL_VIEW_CTX_POPUP) {
- if (vp_play_normal_view_get_main_layout_focus_state(pPlayView->pNormalView) == FALSE) {
- if (vp_play_normal_view_get_main_layout_show_state(pPlayView->pNormalView) == FALSE) {
- vp_play_normal_view_show_main_layout(pPlayView->pNormalView);
+ vp_normalview_popup_style_e nPopupState =
+ vp_play_normal_view_get_popup_show_state(pPlayView->
+ pNormalView);
+ if (nPopupState == VP_PLAY_NORMAL_VIEW_POPUP_NONE
+ || nPopupState == VP_PLAY_NORMAL_VIEW_CTX_POPUP) {
+ if (vp_play_normal_view_get_main_layout_focus_state
+ (pPlayView->pNormalView) == FALSE) {
+ if (vp_play_normal_view_get_main_layout_show_state
+ (pPlayView->pNormalView) == FALSE) {
+ vp_play_normal_view_show_main_layout(pPlayView->
+ pNormalView);
}
if (pPlayView->bKeySpeed == FALSE) {
- vp_play_normal_view_ff_rew_keyboard_longpress_event_cb(pPlayView->pNormalView, FALSE, TRUE);
+ vp_play_normal_view_ff_rew_keyboard_longpress_event_cb
+ (pPlayView->pNormalView, FALSE, TRUE);
pPlayView->bKeySpeed = TRUE;
}
}
}
} else if (!strcmp(pKeyEvent->keyname, VP_REWIND_KEY)) {
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- vp_normalview_popup_style_e nPopupState = vp_play_normal_view_get_popup_show_state(pPlayView->pNormalView);
- if (nPopupState == VP_PLAY_NORMAL_VIEW_POPUP_NONE || nPopupState == VP_PLAY_NORMAL_VIEW_CTX_POPUP) {
- if (vp_play_normal_view_get_main_layout_focus_state(pPlayView->pNormalView) == FALSE) {
- if (vp_play_normal_view_get_main_layout_show_state(pPlayView->pNormalView) == FALSE) {
- vp_play_normal_view_show_main_layout(pPlayView->pNormalView);
+ vp_normalview_popup_style_e nPopupState =
+ vp_play_normal_view_get_popup_show_state(pPlayView->
+ pNormalView);
+ if (nPopupState == VP_PLAY_NORMAL_VIEW_POPUP_NONE
+ || nPopupState == VP_PLAY_NORMAL_VIEW_CTX_POPUP) {
+ if (vp_play_normal_view_get_main_layout_focus_state
+ (pPlayView->pNormalView) == FALSE) {
+ if (vp_play_normal_view_get_main_layout_show_state
+ (pPlayView->pNormalView) == FALSE) {
+ vp_play_normal_view_show_main_layout(pPlayView->
+ pNormalView);
}
if (pPlayView->bKeySpeed == FALSE) {
- vp_play_normal_view_ff_rew_keyboard_longpress_event_cb(pPlayView->pNormalView, FALSE, FALSE);
+ vp_play_normal_view_ff_rew_keyboard_longpress_event_cb
+ (pPlayView->pNormalView, FALSE, FALSE);
pPlayView->bKeySpeed = TRUE;
}
}
} else if (!strcmp(pKeyEvent->keyname, "Tab")) {
VideoLogInfo("Tab Press Down");
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- bool bMainShowState = vp_play_normal_view_get_main_layout_show_state(pPlayView->pNormalView);
+ bool bMainShowState =
+ vp_play_normal_view_get_main_layout_show_state(pPlayView->
+ pNormalView);
if (bMainShowState) {
VideoLogInfo("main focus in");
- vp_play_normal_view_set_main_layout_focus_in(pPlayView->pNormalView);
+ vp_play_normal_view_set_main_layout_focus_in(pPlayView->
+ pNormalView);
}
}
} else if (!strcmp(pKeyEvent->keyname, "Return")) {
VideoLogInfo("Return Press Down");
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- bool bMainFocusState = vp_play_normal_view_get_main_layout_focus_state(pPlayView->pNormalView);
+ bool bMainFocusState =
+ vp_play_normal_view_get_main_layout_focus_state(pPlayView->
+ pNormalView);
if (bMainFocusState == FALSE) {
- vp_normalview_popup_style_e nPopupState = vp_play_normal_view_get_popup_show_state(pPlayView->pNormalView);
+ vp_normalview_popup_style_e nPopupState =
+ vp_play_normal_view_get_popup_show_state(pPlayView->
+ pNormalView);
if (nPopupState == VP_PLAY_NORMAL_VIEW_POPUP_NONE) {
- vp_play_normal_view_set_resume_or_pause(pPlayView->pNormalView);
+ vp_play_normal_view_set_resume_or_pause(pPlayView->
+ pNormalView);
}
}
}
} else if (!strcmp(pKeyEvent->keyname, "space")) {
VideoLogInfo("space Press Down");
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- vp_normalview_popup_style_e nPopupState = vp_play_normal_view_get_popup_show_state(pPlayView->pNormalView);
+ vp_normalview_popup_style_e nPopupState =
+ vp_play_normal_view_get_popup_show_state(pPlayView->
+ pNormalView);
if (nPopupState == VP_PLAY_NORMAL_VIEW_POPUP_NONE) {
- vp_play_normal_view_set_resume_or_pause(pPlayView->pNormalView);
+ vp_play_normal_view_set_resume_or_pause(pPlayView->
+ pNormalView);
}
}
}
-
//For normal view hide control layout
- if (!strcmp(pKeyEvent->keyname, "Tab") || !strcmp(pKeyEvent->keyname, "Right") || !strcmp(pKeyEvent->keyname, "Left")
- || !strcmp(pKeyEvent->keyname, "Up") || !strcmp(pKeyEvent->keyname, "Down")) {
+ if (!strcmp(pKeyEvent->keyname, "Tab")
+ || !strcmp(pKeyEvent->keyname, "Right")
+ || !strcmp(pKeyEvent->keyname, "Left")
+ || !strcmp(pKeyEvent->keyname, "Up")
+ || !strcmp(pKeyEvent->keyname, "Down")) {
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- vp_play_normal_view_create_main_layout_hide_timer(pPlayView->pNormalView);
+ vp_play_normal_view_create_main_layout_hide_timer(pPlayView->
+ pNormalView);
}
}
/* send event to parent */
return EINA_FALSE;
}
- pPlayView->pCallback->pEventKeyDown(pPlayView->pUserData, nType, pEvent);
+ pPlayView->pCallback->pEventKeyDown(pPlayView->pUserData, nType,
+ pEvent);
return EINA_FALSE;
}
-static Eina_Bool __vp_play_view_event_key_up_cb(void *pUserData, int nType, void *pEvent)
+static Eina_Bool __vp_play_view_event_key_up_cb(void *pUserData, int nType,
+ void *pEvent)
{
if (!pUserData) {
VideoLogError("PlayView handle is NULL");
return EINA_FALSE;
}
- PlayView *pPlayView = (PlayView *)pUserData;
- Ecore_Event_Key *pKeyEvent = (Ecore_Event_Key *)pEvent;
+ PlayView *pPlayView = (PlayView *) pUserData;
+ Ecore_Event_Key *pKeyEvent = (Ecore_Event_Key *) pEvent;
/* default operation */
VideoLogWarning("HW EVENT KEY UP:%s", pKeyEvent->keyname);
if (!strcmp(pKeyEvent->keyname, VP_END_KEY)) {
VideoLogWarning("Back(End) key");
- } else if (!strcmp(pKeyEvent->keyname, VP_MENU_KEY) || !strcmp(pKeyEvent->keyname, "Menu")) {
+ } else if (!strcmp(pKeyEvent->keyname, VP_MENU_KEY)
+ || !strcmp(pKeyEvent->keyname, "Menu")) {
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
vp_play_normal_view_on_more_menu(pPlayView->pNormalView);
}
VideoLogWarning("HOME_KEY");
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
bool bLock = FALSE;
- vp_play_normal_view_get_lock_screen(pPlayView->pNormalView, &bLock);
+ vp_play_normal_view_get_lock_screen(pPlayView->pNormalView,
+ &bLock);
if (!bLock && !pPlayView->bAudioOnly) {
if (!vp_play_normal_view_pause(pPlayView->pNormalView)) {
VideoLogError("vp_play_normal_view_pause fail");
}
}
}
- } else if (!strcmp(pKeyEvent->keyname, VP_VOLUME_DOWN_KEY) || !strcmp(pKeyEvent->keyname, "Down")) {
+ } else if (!strcmp(pKeyEvent->keyname, VP_VOLUME_DOWN_KEY)
+ || !strcmp(pKeyEvent->keyname, "Down")) {
VideoLogWarning("VOLUME DOWN");
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
VP_EVAS_TIMER_DEL(pPlayView->pVolumeTimer);
}
- } else if (!strcmp(pKeyEvent->keyname, VP_VOLUME_UP_KEY) || !strcmp(pKeyEvent->keyname, "Up")) {
+ } else if (!strcmp(pKeyEvent->keyname, VP_VOLUME_UP_KEY)
+ || !strcmp(pKeyEvent->keyname, "Up")) {
VideoLogWarning("VOLUME UP");
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
VP_EVAS_TIMER_DEL(pPlayView->pVolumeTimer);
if (pPlayView->pMediaLongPressTimer) {
VP_EVAS_TIMER_DEL(pPlayView->pMediaKeyTimer);
- pPlayView->pMediaKeyTimer = ecore_timer_add(0.5, __vp_play_view_media_key_timer_cb, (void *)pPlayView);
+ pPlayView->pMediaKeyTimer =
+ ecore_timer_add(0.5, __vp_play_view_media_key_timer_cb,
+ (void *) pPlayView);
pPlayView->nMediaKeyPressCount++;
} else {
VP_EVAS_TIMER_DEL(pPlayView->pMediaLongPressTimer);
- //vp_play_app_launch_svoice(pPlayView->pWin, (void *)pPlayView);
pPlayView->nMediaKeyPressCount = 0;
}
- } else if (!strcmp(pKeyEvent->keyname, VP_POWER_KEY) || !strcmp(pKeyEvent->keyname, VP_SCREENSAVER_KEY)) {
+ } else if (!strcmp(pKeyEvent->keyname, VP_POWER_KEY)
+ || !strcmp(pKeyEvent->keyname, VP_SCREENSAVER_KEY)) {
VideoLogWarning("POWER KEY");
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
if (pPlayView->pHwKeyLongPressTimer) {
VideoLogWarning("HW Key: It is click event!");
VP_EVAS_TIMER_DEL(pPlayView->pHwKeyLongPressTimer);
bool bLock = FALSE;
- vp_play_normal_view_get_lock_screen(pPlayView->pNormalView, &bLock);
+ vp_play_normal_view_get_lock_screen(pPlayView->pNormalView,
+ &bLock);
bLock = !bLock;
- vp_play_normal_view_set_lock_screen(pPlayView->pNormalView, bLock);
+ vp_play_normal_view_set_lock_screen(pPlayView->pNormalView,
+ bLock);
}
bool bPause = FALSE;
- vp_play_normal_view_get_pause_status(pPlayView->pNormalView, &bPause);
+ vp_play_normal_view_get_pause_status(pPlayView->pNormalView,
+ &bPause);
if (bPause || vp_play_normal_view_is_audio_only(pPlayView)) {
vp_play_util_set_unlock_power_key();
}
}
- } else if (!strcmp(pKeyEvent->keyname, VP_KEY_CANCLE) || !strcmp(pKeyEvent->keyname, "Esc")) {
+ } else if (!strcmp(pKeyEvent->keyname, VP_KEY_CANCLE)
+ || !strcmp(pKeyEvent->keyname, "Esc")) {
VideoLogWarning("CANCLE KEY");
VP_EVAS_TIMER_DEL(pPlayView->pVolumeTimer);
VideoLogWarning("Right");
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
if (pPlayView->bKeySpeed == TRUE) {
- vp_play_normal_view_ff_rew_keyboard_longpress_event_cb(pPlayView->pNormalView, TRUE, TRUE);
+ vp_play_normal_view_ff_rew_keyboard_longpress_event_cb
+ (pPlayView->pNormalView, TRUE, TRUE);
pPlayView->bKeySpeed = FALSE;
}
}
VideoLogWarning("Left");
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
if (pPlayView->bKeySpeed == TRUE) {
- vp_play_normal_view_ff_rew_keyboard_longpress_event_cb(pPlayView->pNormalView, TRUE, FALSE);
+ vp_play_normal_view_ff_rew_keyboard_longpress_event_cb
+ (pPlayView->pNormalView, TRUE, FALSE);
pPlayView->bKeySpeed = FALSE;
}
}
}
#ifdef OLD_SENSOR_API
-static void __vp_play_view_sensor_event_cb(vp_sensor_type_t nType, unsigned long long timestamp, void *pUserData)
+static void __vp_play_view_sensor_event_cb(vp_sensor_type_t nType,
+ unsigned long long timestamp,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
if (nType != VP_SENSOR_TYPE_FACEDOWN) {
VideoLogWarning("Invalid sensor type");
video_sound_device_type_t nSoundDevType = VP_SOUND_DEVICE_NONE;
vp_sound_get_active_device(&nSoundDevType);
- if (nSoundDevType == VP_SOUND_DEVICE_EARJACK || nSoundDevType == VP_SOUND_DEVICE_BLUETOOTH) {
- VideoLogWarning("Earjack or Bluetooth is connected. ignore sensor event");
+ if (nSoundDevType == VP_SOUND_DEVICE_EARJACK
+ || nSoundDevType == VP_SOUND_DEVICE_BLUETOOTH) {
+ VideoLogWarning
+ ("Earjack or Bluetooth is connected. ignore sensor event");
return;
}
if (!vp_play_normal_view_pause(pPlayView->pNormalView)) {
VideoLogError("vp_play_normal_view_realize fail");
}
- if (!vp_play_normal_view_set_manual_pause(pPlayView->pNormalView, TRUE)) {
+ if (!vp_play_normal_view_set_manual_pause
+ (pPlayView->pNormalView, TRUE)) {
VideoLogError("vp_play_normal_view_set_manual_pause fail");
}
}
}
#endif
-static void __vp_play_view_rotate_lock_key_changed_cb(system_settings_key_e key, void *pUserData)
+static void __vp_play_view_rotate_lock_key_changed_cb(system_settings_key_e
+ key, void *pUserData)
{
if (!pUserData) {
return;
}
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
bool bLockState = FALSE;
if (!vp_play_config_get_rotate_lock_status(&bLockState)) {
}
}
-static Eina_Bool _vp_lockscreenmini_hide_video_mini_controller(void *pUserData)
+static Eina_Bool _vp_lockscreenmini_hide_video_mini_controller(void
+ *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return EINA_FALSE;
}
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
if (pPlayView->lockmini_visible) {
vp_lockscreenmini_hide(pPlayView);
}
-static void __vp_play_view_lock_state_key_changed_cb(system_settings_key_e key, void *pUserData)
+static void __vp_play_view_lock_state_key_changed_cb(system_settings_key_e
+ key, void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
int lock_state = SYSTEM_SETTINGS_LOCK_STATE_UNLOCK;
if (key == SYSTEM_SETTINGS_KEY_LOCK_STATE) {
system_settings_get_value_int(key, &lock_state);
- vp_mm_player_state_t nState = vp_play_normal_view_get_player_state(pPlayView);
- if (lock_state == SYSTEM_SETTINGS_LOCK_STATE_UNLOCK && pPlayView->lockmini_hide) {
- /* Hide Lock Screen Handle */
- VP_EVAS_TIMER_DEL(pPlayView->lockmini_idle_timer);
- if (pPlayView->b_lockmini_show) {
- vp_lockscreenmini_hide(pPlayView);
+ if (vp_play_normal_view_is_audio_only(pPlayView)) {
+ vp_mm_player_state_t nState =
+ vp_play_normal_view_get_player_state(pPlayView);
+
+ if (lock_state == SYSTEM_SETTINGS_LOCK_STATE_LOCK) {
+ VideoLogInfo("Screen locked in Audio only mode");
+ if (nState == VP_MM_PLAYER_STATE_PLAYING)
+ vp_lockscreenmini_show(pPlayView);
+ else
+ vp_lockscreenmini_hide(pPlayView);
+ }
+
+ if (lock_state == SYSTEM_SETTINGS_LOCK_STATE_UNLOCK) {
+ VideoLogInfo("Screen unlocked in Audio only mode");
+ if (nState == VP_MM_PLAYER_STATE_PLAYING)
+ vp_lockscreenmini_hide(pPlayView);
}
- } else if (lock_state == SYSTEM_SETTINGS_LOCK_STATE_LOCK && nState == VP_MM_PLAYER_STATE_PAUSED) {
- /* Starting Timer */
- VP_EVAS_TIMER_DEL(pPlayView->lockmini_idle_timer);
- pPlayView->lockmini_idle_timer = ecore_timer_add((2 * 60), _vp_lockscreenmini_hide_video_mini_controller, pPlayView);
}
}
}
-static void __vp_play_view_wifi_key_changed_cb(wifi_connection_state_e state, wifi_ap_h ap, void *user_data)
+static void
+__vp_play_view_wifi_key_changed_cb(wifi_manager_connection_state_e state,
+ wifi_manager_ap_h ap, void *user_data)
{
VideoLogError("not supported");
}
-static void __vp_play_view_delete_request_cb(void *pUserData, Evas_Object *pEvasObject, void *pEvent)
+static void __vp_play_view_delete_request_cb(void *pUserData,
+ Evas_Object * pEvasObject,
+ void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- evas_object_smart_callback_del(pEvasObject, "delete,request", __vp_play_view_delete_request_cb);
+ evas_object_smart_callback_del(pEvasObject, "delete,request",
+ __vp_play_view_delete_request_cb);
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
VideoLogError("== delete request call ==");
_vp_play_view_destroy_handle(pPlayView);
}
/* internal functions */
-static void __vp_play_view_func_change_mode(void *pViewHandle, video_play_mode_t nMode, const char *szMediaURL, int nStartPos, bool bManualPause)
+static void __vp_play_view_func_change_mode(void *pViewHandle,
+ video_play_mode_t nMode,
+ const char *szMediaURL,
+ int nStartPos,
+ bool bManualPause)
{
if (!pViewHandle) {
VideoLogError("pViewHandle is NULL");
return;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
if (nMode == pPlayView->nPlayMode) {
VideoLogWarning("Skip for Same mode");
_vp_play_view_destroy_mode(pPlayView);
- //only for naviitem list test
- //int count = eina_list_count(elm_naviframe_items_get(pPlayView->pNaviframe));
- //VideoLogInfo("naviitems = %d", count);
-
- //bool bRender = FALSE;
- VideoLogInfo("previous model = %d,current view = %d", pPlayView->nPlayMode, nMode);
+ VideoLogInfo("previous model = %d,current view = %d",
+ pPlayView->nPlayMode, nMode);
pPlayView->nPlayMode = nMode;
if (bLockState == FALSE) {
// if auto rotation is locked. set player window as orientation 0
- elm_win_rotation_with_resize_set(pPlayView->pWin, APP_DEVICE_ORIENTATION_0);
+ elm_win_rotation_with_resize_set(pPlayView->pWin,
+ APP_DEVICE_ORIENTATION_0);
vp_play_view_set_rotate(pPlayView, VIDEO_PLAY_ROTATE_NONE);
}
}
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- if (!vp_play_normal_view_set_url(pPlayView->pNormalView, pPlayView->szMediaURL)) {
+ if (!vp_play_normal_view_set_url
+ (pPlayView->pNormalView, pPlayView->szMediaURL)) {
VideoLogError("vp_play_normal_view_set_url fail");
return;
}
- if (!vp_play_normal_view_set_sound_filter(pPlayView->pNormalView, pPlayView->nSoundAlive)) {
- VideoLogError("vp_play_normal_view_set_sound_filter handle is null");
+ if (!vp_play_normal_view_set_sound_filter
+ (pPlayView->pNormalView, pPlayView->nSoundAlive)) {
+ VideoLogError
+ ("vp_play_normal_view_set_sound_filter handle is null");
return;
}
- if (!vp_play_normal_view_set_manual_pause(pPlayView->pNormalView, pPlayView->bStartPause)) {
+ if (!vp_play_normal_view_set_manual_pause
+ (pPlayView->pNormalView, pPlayView->bStartPause)) {
VideoLogError("vp_play_normal_view_set_manual_pause fail");
return;
}
- if (!vp_play_normal_view_set_rotate(pPlayView->pNormalView, pPlayView->nRotate, FALSE)) {
+ if (!vp_play_normal_view_set_rotate
+ (pPlayView->pNormalView, pPlayView->nRotate, FALSE)) {
VideoLogError("vp_play_normal_view_set_rotate fail");
return;
}
pPlayView->bViewChange = FALSE;
VideoLogWarning("== Complete View Change ==");
- //Dead-Code----bRender is false
- //if (bRender) {
- // elm_win_norender_pop(pPlayView->pWin);
- //}
}
static void __vp_play_view_func_exit(void *pViewHandle)
VideoLogError("play view handle is NULL");
return;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
pPlayView->bManualAppPause = TRUE;
/* launching videos
- Scenario 1 : Videos - Play - MultiWin - Idle - Change to PlayView(Maximize) - back => Launch Videos.
- */
- if (pPlayView->bRelaunchCaller &&
- pPlayView->bActivate == TRUE) {
+ Scenario 1 : Videos - Play - MultiWin - Idle - Change to PlayView(Maximize) - back => Launch Videos.
+ */
+ if (pPlayView->bRelaunchCaller && pPlayView->bActivate == TRUE) {
- vp_play_app_launch_videos(pPlayView->pWin, TRUE, (void *)pPlayView);
+ vp_play_app_launch_videos(pPlayView->pWin, TRUE,
+ (void *) pPlayView);
}
- __vp_play_view_destroy_cb((void *)pPlayView);
+ __vp_play_view_destroy_cb((void *) pPlayView);
}
#ifdef NOT_USED
-static void __vp_play_view_sensor_popup_close_cb(int nType, bool bPause, void *pUserData)
+static void __vp_play_view_sensor_popup_close_cb(int nType, bool bPause,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
vp_play_sensor_popup_destroy(pPlayView->pSensorPopup);
pPlayView->pSensorPopup = NULL;
}
#endif
-#if 1
-#endif
/* internal functions */
-static void _vp_play_view_init_config(PlayView *pPlayView)
+static void _vp_play_view_init_config(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("play view handle is NULL");
return;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_CUSTOM_THEME);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_CUSTOM_THEME);
free(path);
elm_theme_extension_add(NULL, edj_path);
}
-static void _vp_play_view_deinit_config(PlayView *pPlayView)
+static void _vp_play_view_deinit_config(PlayView * pPlayView)
{
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_CUSTOM_THEME);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_CUSTOM_THEME);
free(path);
elm_theme_extension_del(NULL, edj_path);
}
-static void _vp_play_view_create_volume_timer(PlayView *pPlayView)
+static void _vp_play_view_create_volume_timer(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("play view handle is NULL");
VP_EVAS_TIMER_DEL(pPlayView->pVolumeTimer);
pPlayView->pVolumeTimer = ecore_timer_add(VP_PLAY_VIEW_VOLUME_TIMER,
- __vp_play_view_volume_timer_cb, (void *)pPlayView);
+ __vp_play_view_volume_timer_cb,
+ (void *) pPlayView);
}
-static Evas_Object *_vp_play_view_create_window(Evas_Object *pParent, const char *pName)
+static Evas_Object *_vp_play_view_create_window(Evas_Object * pParent,
+ const char *pName)
{
Evas_Object *pObj = NULL;
elm_win_title_set(pObj, pName);
evas_object_smart_callback_add(pObj, "delete,request",
- __vp_play_view_delete_request_cb, NULL);
+ __vp_play_view_delete_request_cb, NULL);
elm_win_indicator_mode_set(pObj, ELM_WIN_INDICATOR_SHOW);
elm_win_indicator_opacity_set(pObj, ELM_WIN_INDICATOR_TRANSPARENT);
- /*elm_win_indicator_mode_set(pObj, ELM_WIN_INDICATOR_HIDE);*/
if (elm_win_wm_rotation_supported_get(pObj)) {
const int rots[4] = { 0, 90, 180, 270 };
elm_win_wm_rotation_available_rotations_set(pObj, rots, 4);
}
- //evas_object_show(pObj);
-
return pObj;
}
-static Evas_Object *_vp_play_view_create_render_rect(Evas_Object *pParent)
+static Evas_Object *_vp_play_view_create_render_rect(Evas_Object * pParent)
{
if (!pParent) {
VideoLogError("Parent is NULL");
return NULL;
}
- evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
evas_object_color_set(pObj, 0, 0, 0, 0);
evas_object_render_op_set(pObj, EVAS_RENDER_COPY);
evas_object_show(pObj);
return pObj;
}
-static Evas_Object *_vp_play_view_create_conformant(Evas_Object *pParent)
+static Evas_Object *_vp_play_view_create_conformant(Evas_Object * pParent)
{
if (!pParent) {
VideoLogError("Parent is NULL");
return NULL;
}
- evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
elm_win_conformant_set(pParent, EINA_TRUE);
elm_win_resize_object_add(pParent, pObj);
elm_object_signal_emit(pObj, "elm,state,indicator,overlap", "");
- evas_object_data_set(pObj, "overlap", (void *)EINA_TRUE);
+ evas_object_data_set(pObj, "overlap", (void *) EINA_TRUE);
evas_object_show(pObj);
return pObj;
}
-static Evas_Object *_vp_play_view_create_layout(Evas_Object *pParent)
+static Evas_Object *_vp_play_view_create_layout(Evas_Object * pParent)
{
if (!pParent) {
VideoLogError("Parent is NULL");
}
bRet = elm_layout_theme_set(pObj, VP_PLAY_CUSTOM_LAYOUT_KLASS,
- VP_PLAY_CUSTOM_LAYOUT_GROUP,
- VP_PLAY_CUSTOM_LAYOUT_STYLE);
+ VP_PLAY_CUSTOM_LAYOUT_GROUP,
+ VP_PLAY_CUSTOM_LAYOUT_STYLE);
if (bRet != EINA_TRUE) {
VideoLogError("elm_layout_theme_set fail");
}
- evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
elm_object_content_set(pParent, pObj);
evas_object_show(pObj);
return pObj;
}
-static Evas_Object *_vp_play_view_create_naviframe(Evas_Object *pParent)
+static Evas_Object *_vp_play_view_create_naviframe(Evas_Object * pParent)
{
if (!pParent) {
VideoLogError("Parent is NULL");
return NULL;
}
- eext_object_event_callback_add(pObj, EEXT_CALLBACK_BACK, eext_naviframe_back_cb, NULL);
- eext_object_event_callback_add(pObj, EEXT_CALLBACK_MORE, eext_naviframe_more_cb, NULL);
+ eext_object_event_callback_add(pObj, EEXT_CALLBACK_BACK,
+ eext_naviframe_back_cb, NULL);
+ eext_object_event_callback_add(pObj, EEXT_CALLBACK_MORE,
+ eext_naviframe_more_cb, NULL);
elm_object_part_content_set(pParent, "elm.swallow.content", pObj);
elm_object_focus_set(pObj, EINA_TRUE);
return pObj;
}
-static bool _vp_play_view_init_layout(PlayView *pPlayView)
+static bool _vp_play_view_init_layout(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("play view handle is NULL");
}
VideoLogWarning(">> Play view : Init layout");
- pPlayView->pWin = _vp_play_view_create_window(pPlayView->pParent, VP_PLAY_MAIN_WINDOW_NAME);
+ pPlayView->pWin =
+ _vp_play_view_create_window(pPlayView->pParent,
+ VP_PLAY_MAIN_WINDOW_NAME);
if (pPlayView->pWin == NULL) {
VideoLogError("pWin is null");
return FALSE;
}
- //elm_win_alpha_set(pPlayView->pWin, EINA_TRUE);
- //elm_win_shaped_set(pPlayView->pWin, EINA_TRUE);
+ evas_object_smart_callback_add(pPlayView->pWin, "wm,rotation,changed",
+ __vp_play_rotate_changed_cb, pPlayView);
- evas_object_smart_callback_add(pPlayView->pWin, "wm,rotation,changed", __vp_play_rotate_changed_cb, pPlayView);
-
- pPlayView->pRenderRect = _vp_play_view_create_render_rect(pPlayView->pWin);
+ pPlayView->pRenderRect =
+ _vp_play_view_create_render_rect(pPlayView->pWin);
if (pPlayView->pRenderRect == NULL) {
VideoLogError("pRenderRect is null");
return FALSE;
} else
#endif
{
- pPlayView->pConformant = _vp_play_view_create_conformant(pPlayView->pWin);
+ pPlayView->pConformant =
+ _vp_play_view_create_conformant(pPlayView->pWin);
if (pPlayView->pConformant == NULL) {
VideoLogError("pConformant is null");
return FALSE;
}
- pPlayView->pMainLayout = _vp_play_view_create_layout(pPlayView->pConformant);
+ pPlayView->pMainLayout =
+ _vp_play_view_create_layout(pPlayView->pConformant);
if (pPlayView->pMainLayout == NULL) {
VideoLogError("pMainLayout is null");
return FALSE;
}
- pPlayView->pNaviframe = _vp_play_view_create_naviframe(pPlayView->pMainLayout);
+ pPlayView->pNaviframe =
+ _vp_play_view_create_naviframe(pPlayView->pMainLayout);
if (pPlayView->pNaviframe == NULL) {
VideoLogError("pNaviframe is null");
return FALSE;
}
}
- /*rotation check*/
+ /*rotation check */
VideoLogInfo("<< Play view : Checking initial rotation!");
- int nAngle = elm_win_rotation_get((Evas_Object *)pPlayView->pWin);
+ int nAngle = elm_win_rotation_get((Evas_Object *) pPlayView->pWin);
video_play_rotate_t nRotate = VIDEO_PLAY_ROTATE_NONE;
switch (nAngle) {
return TRUE;
}
-static bool _vp_play_view_create_mode(PlayView *pPlayView)
+static bool _vp_play_view_create_mode(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("play view handle is NULL");
}
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- pPlayView->pNormalView = vp_play_normal_view_create(pPlayView, pPlayView->nLaunchingType);
+ pPlayView->pNormalView =
+ vp_play_normal_view_create(pPlayView,
+ pPlayView->nLaunchingType);
if (pPlayView->pNormalView == NULL) {
VideoLogError("vp_play_normal_view_create handle is null");
return FALSE;
return TRUE;
}
-static bool _vp_play_view_destroy_mode(PlayView *pPlayView)
+static bool _vp_play_view_destroy_mode(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("play view handle is NULL");
return TRUE;
}
-static void _vp_play_view_create_callback(PlayView *pPlayView)
+static void _vp_play_view_create_callback(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("play view handle is NULL");
}
- pPlayView->pCallback = (PlayViewCbFunc *)calloc(1, sizeof(PlayViewCbFunc));
+ pPlayView->pCallback =
+ (PlayViewCbFunc *) calloc(1, sizeof(PlayViewCbFunc));
if (pPlayView->pCallback == NULL) {
VideoLogError("playview Callback alloc fail");
return;
return;
}
-static void _vp_play_view_destroy_callback(PlayView *pPlayView)
+static void _vp_play_view_destroy_callback(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("play view handle is NULL");
VP_FREE(pPlayView->pCallback);
}
-static void _vp_play_view_create_func(PlayView *pPlayView)
+static void _vp_play_view_create_func(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("play view handle is NULL");
}
- pPlayView->pFunc = (PlayViewFunc *)calloc(1, sizeof(PlayViewFunc));
+ pPlayView->pFunc = (PlayViewFunc *) calloc(1, sizeof(PlayViewFunc));
if (pPlayView->pFunc == NULL) {
VideoLogError("playview func alloc fail");
return;
}
- pPlayView->pFunc->vp_play_func_change_mode = __vp_play_view_func_change_mode;
+ pPlayView->pFunc->vp_play_func_change_mode =
+ __vp_play_view_func_change_mode;
pPlayView->pFunc->vp_play_func_exit = __vp_play_view_func_exit;
}
-static void _vp_play_view_destroy_func(PlayView *pPlayView)
+static void _vp_play_view_destroy_func(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("play view handle is NULL");
VP_FREE(pPlayView->pFunc);
}
-static void _vp_play_view_destroy_handle(PlayView *pPlayView)
+static void _vp_play_view_destroy_handle(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("play view handle is NULL");
pPlayView = NULL;
}
-static void _vp_play_view_net_status_changed_cb(connection_type_e type, void *pUserData)
+static void _vp_play_view_net_status_changed_cb(connection_type_e type,
+ void *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return;
}
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
int net_status = type;
VideoSecureLogInfo("Changed : NETWORK_STATUS(%d)", net_status);
return;
}
- if (vp_play_util_rtsp_url_check((const char*)pPlayView->szMediaURL) == FALSE) {
- VideoLogWarning("Not a RTSP/RTP url. skip wifi key changed signal");
+ if (vp_play_util_rtsp_url_check((const char *) pPlayView->szMediaURL)
+ == FALSE) {
+ VideoLogWarning
+ ("Not a RTSP/RTP url. skip wifi key changed signal");
return;
} else {
VideoLogWarning("RTSP/RTP url");
Network change info
WIFI(2) -> OFF(0) -> CELLULAR(1)
CELLULAR(1) -> WIFI(2)
- */
+ */
if (net_status == CONNECTION_TYPE_DISCONNECTED) {
VideoSecureLogInfo("network off");
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
VideoLogInfo("normal view disconnect");
- vp_play_normal_view_web_type_disconnect(pPlayView->pNormalView);
+ vp_play_normal_view_web_type_disconnect(pPlayView->
+ pNormalView);
}
} else if (net_status == CONNECTION_TYPE_CELLULAR) {
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
}
}
-static void __vp_play_view_holl_ic_changed_cb(bool bCover_state, void *pUserData)
+static void __vp_play_view_holl_ic_changed_cb(bool bCover_state,
+ void *pUserData)
{
// bCover_state : TRUE(Cover Opened), bCover_state : FALSE(Cover closed)
if (!pUserData) {
return;
}
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
if (pPlayView->bActivate == FALSE) {
return;
}
if (!vp_play_normal_view_pause(pPlayView->pNormalView)) {
VideoLogError("vp_play_normal_view_realize fail");
}
- if (!vp_play_normal_view_set_manual_pause(pPlayView->pNormalView, TRUE)) {
+ if (!vp_play_normal_view_set_manual_pause
+ (pPlayView->pNormalView, TRUE)) {
VideoLogError("vp_play_normal_view_set_manual_pause fail");
}
}
VideoLogError("pUserData is NULL");
return;
}
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
if (pPlayView->connection) {
- if (connection_unset_type_changed_cb(pPlayView->connection) != CONNECTION_ERROR_NONE) {
+ if (connection_unset_type_changed_cb(pPlayView->connection) !=
+ CONNECTION_ERROR_NONE) {
VideoLogError("failed to unregister network status callback");
}
- if (connection_destroy(pPlayView->connection) != CONNECTION_ERROR_NONE) {
+ if (connection_destroy(pPlayView->connection) !=
+ CONNECTION_ERROR_NONE) {
VideoLogError("failed to destroy connection handle");
}
pPlayView->connection = NULL;
VideoLogError("pUserData is NULL");
return ECORE_CALLBACK_CANCEL;
}
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
pPlayView->pDbUpdateTimer = NULL;
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
VideoLogError("pUserData is NULL");
return;
}
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
VP_EVAS_TIMER_DEL(pPlayView->pDbUpdateTimer);
- pPlayView->pDbUpdateTimer = ecore_timer_add(VP_PLAY_VIEW_DB_UPDATE_TIMER, __vp_play_view_db_update_timer_cb, (void *)pUserData);
+ pPlayView->pDbUpdateTimer =
+ ecore_timer_add(VP_PLAY_VIEW_DB_UPDATE_TIMER,
+ __vp_play_view_db_update_timer_cb,
+ (void *) pUserData);
}
-play_view_handle vp_play_view_create(Evas_Object *pParent, Ecore_X_Window nParentXID, video_play_mode_t nMode, video_play_launching_type_t nLaunchingType)
+play_view_handle vp_play_view_create(Evas_Object * pParent,
+ Ecore_X_Window nParentXID,
+ video_play_mode_t nMode,
+ video_play_launching_type_t
+ nLaunchingType)
{
if (!pParent) {
VideoLogWarning("pParent handle is NULL");
return NULL;
}
-#if 0//Tizen3.0 Build error
-//Instead specify h/w acceleration in the application xml.
-#ifndef _USE_PROCESS_POOL
-
-#ifdef TARGET
- VideoLogWarning("opengl_x11");
- elm_config_preferred_engine_set("opengl_x11");
-#else
- VideoLogWarning("software_x11");
- elm_config_preferred_engine_set("software_x11");
-#endif
-
-#endif
-#endif
-
pPlayView->pParent = pParent;
pPlayView->nPlayMode = nMode;
pPlayView->nLaunchingType = nLaunchingType;
return NULL;
}
-#if 0//Tizen3.0 Build error
- pPlayView->nXwinID = elm_win_xwindow_get(pPlayView->pWin);
-#endif
pPlayView->fPlaySpeed = 1.0;
-
-#if 0//Tizen3.0 Build error
- if (nParentXID > 0) {
- ecore_x_icccm_transient_for_set(pPlayView->nXwinID, nParentXID);
- ecore_x_window_client_manage(nParentXID);
- pPlayView->nCallerXwinID = nParentXID;
- pPlayView->pCallerWinEventHandler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, (void *)__vp_play_caller_window_event_cb, (void *)pPlayView);
- }
-#endif
-
pPlayView->bActivate = TRUE;
- //elm_win_activate(pPlayView->pWin);
if (!_vp_play_view_create_mode(pPlayView)) {
VideoLogError("_vp_play_view_handle_create is fail");
return NULL;
}
- pPlayView->pKeyEventDown = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, (void *)__vp_play_view_event_key_down_cb, (void *)pPlayView);
- pPlayView->pKeyEventUp = ecore_event_handler_add(ECORE_EVENT_KEY_UP, (void *)__vp_play_view_event_key_up_cb, (void *)pPlayView);
-#if 0//Tizen3.0 Build error
- pPlayView->pFocusIn = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_FOCUS_IN, __vp_play_focus_in_cb, (void *)pPlayView);
- pPlayView->pFocusOut = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_FOCUS_OUT, __vp_play_focus_out_cb, (void *)pPlayView);
- pPlayView->pVisiblility = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE, __vp_play_visibility_cb, (void *)pPlayView);
- pPlayView->pClientMessage = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, __vp_play_client_message_cb, (void *)pPlayView);
- pPlayView->pDeleteRequest = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DELETE_REQUEST, __vp_play_delete_request_cb, (void *)pPlayView);
- pPlayView->pPropertyHandler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROPERTY, __vp_play_view_window_property_change, (void *)pPlayView);
- pPlayView->pMouseInHandler = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_IN, __vp_play_view_mouse_in_cb, (void *)pPlayView);
- pPlayView->pMouseOutHandler = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_OUT, __vp_play_view_mouse_out_cb, (void *)pPlayView);
-#endif
+ pPlayView->pKeyEventDown =
+ ecore_event_handler_add(ECORE_EVENT_KEY_DOWN,
+ (void *) __vp_play_view_event_key_down_cb,
+ (void *) pPlayView);
+ pPlayView->pKeyEventUp =
+ ecore_event_handler_add(ECORE_EVENT_KEY_UP,
+ (void *) __vp_play_view_event_key_up_cb,
+ (void *) pPlayView);
- pPlayView->pNotiPipe = ecore_pipe_add((Ecore_Pipe_Cb)__vp_play_view_noti_pipe_cb, (void *)pPlayView);
+ pPlayView->pNotiPipe =
+ ecore_pipe_add((Ecore_Pipe_Cb) __vp_play_view_noti_pipe_cb,
+ (void *) pPlayView);
#ifdef OLD_SENSOR_API
- pPlayView->pSensorHandle = vp_sensor_create(__vp_play_view_sensor_event_cb);
+ pPlayView->pSensorHandle =
+ vp_sensor_create(__vp_play_view_sensor_event_cb);
if (pPlayView->pSensorHandle) {
- vp_sensor_set_user_data(pPlayView->pSensorHandle, (void *)pPlayView);
+ vp_sensor_set_user_data(pPlayView->pSensorHandle,
+ (void *) pPlayView);
}
#endif
bool bWifiConnect = FALSE;
vp_play_config_get_wifi_direct_connect_status(&bWifiConnect);
- vp_media_contents_set_update_cb(__vp_playview_media_update_cb, (void *)pPlayView);
+ vp_media_contents_set_update_cb(__vp_playview_media_update_cb,
+ (void *) pPlayView);
return pPlayView;
}
return;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
if (nMode != pPlayView->nPlayMode) {
VideoLogError("Another mode(%d), reset playview", nMode);
VideoLogWarning("");
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
vp_play_config_set_multi_play_status(FALSE);
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE;
- nState = vp_controller_normal_view_get_played_state(pPlayView->pNormalView);
+ nState =
+ vp_controller_normal_view_get_played_state(pPlayView->pNormalView);
if (nState == VP_MM_PLAYER_STATE_IDLE) {
return TRUE;
}
int nDuration = 0;
- if (vp_play_normal_view_get_video_duration(pPlayView->pNormalView, &nDuration)) {
+ if (vp_play_normal_view_get_video_duration
+ (pPlayView->pNormalView, &nDuration)) {
pPlayView->nDuration = nDuration;
}
- VideoLogInfo(">> Play View : %d",pPlayView->nDuration);
+ VideoLogInfo(">> Play View : %d", pPlayView->nDuration);
if (pPlayView->nDuration == 0) {
vp_play_normal_view_play_start(pPlayView->pNormalView);
return TRUE;
- }else{
- if(pPlayView->bIsPlayBeforeShare)
- {
- vp_play_normal_view_set_resume_or_pause(pPlayView->pNormalView);
+ } else {
+ if (pPlayView->bIsPlayBeforeShare
+ && pPlayView->bIsSharePopup == FALSE) {
+ vp_play_normal_view_set_resume_or_pause(pPlayView->
+ pNormalView);
return TRUE;
+ } else if (pPlayView->bAudioOnly && pPlayView->bIsSharePopup
+ && nState == VP_MM_PLAYER_STATE_PLAYING) {
+ vp_play_normal_view_set_resume_or_pause(pPlayView->
+ pNormalView);
}
}
return TRUE;
bool vp_play_view_realize(play_view_handle pViewHandle)
{
- int error = SOUND_MANAGER_ERROR_NONE;
+ int error = SOUND_MANAGER_ERROR_NONE;
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
VideoLogInfo(">> Play View : Realize");
if (vp_play_normal_view_is_audio_only(pPlayView)) {
int nCurPos;
- vp_play_normal_view_get_last_position(pPlayView->pNormalView, &nCurPos);
+ vp_mm_player_state_t nState =
+ vp_play_normal_view_get_player_state(pPlayView);
+
+ vp_play_normal_view_get_last_position(pPlayView->pNormalView,
+ &nCurPos);
pPlayView->nStartPosition = nCurPos;
+
+ if (nState == VP_MM_PLAYER_STATE_PLAYING) {
+ return TRUE;
+ }
}
pPlayView->bActivate = TRUE;
pPlayView->bVisible = TRUE;
- pPlayView->telinit = vp_play_telephony_initialize((void *)pPlayView);
+ pPlayView->telinit = vp_play_telephony_initialize((void *) pPlayView);
vp_play_normal_view_key_create(pPlayView, pPlayView->pNormalView);
- //vp_play_normal_view_set_share_panel_state(pPlayView->pNormalView);
+
if (!vp_play_normal_view_is_audio_only(pPlayView)) {
vp_sound_init_session(pViewHandle);
sound_stream_focus_state_e state_for_playback;
sound_stream_focus_state_e state_for_recording;
int ret = -1;
- ret = sound_manager_get_focus_state(pPlayView->stream_info, &state_for_playback, &state_for_recording);
+
+ ret =
+ sound_manager_get_focus_state(pPlayView->stream_info,
+ &state_for_playback,
+ &state_for_recording);
if (ret != SOUND_MANAGER_ERROR_NONE) {
VideoLogError("failed to get focus state error[%x]", ret);
}
if (state_for_playback == SOUND_STREAM_FOCUS_STATE_RELEASED) {
- error = sound_manager_acquire_focus(pPlayView->stream_info, SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
+ error =
+ sound_manager_acquire_focus(pPlayView->stream_info,
+ SOUND_STREAM_FOCUS_FOR_PLAYBACK,
+ SOUND_BEHAVIOR_NONE, NULL);
if (error != SOUND_MANAGER_ERROR_NONE) {
VideoLogError("failed to acquire focus [%x]", error);
}
- sound_manager_get_focus_reacquisition(pPlayView->stream_info, &pPlayView->reacquire_state);
+ sound_manager_get_focus_reacquisition(pPlayView->stream_info,
+ &pPlayView->
+ reacquire_state);
if (pPlayView->reacquire_state == EINA_FALSE)
- sound_manager_set_focus_reacquisition(pPlayView->stream_info, EINA_TRUE);
+ sound_manager_set_focus_reacquisition(pPlayView->
+ stream_info,
+ EINA_TRUE);
}
}
if (pPlayView->bRealized == TRUE) {
VideoLogWarning("Already Realize state");
- //return TRUE;
}
- /*unregister callbacks*/
+ /*unregister callbacks */
_vp_play_view_ignore_callbacks(pPlayView);
if (pPlayView->pHollICHandle) {
vp_hollic_destroy_handle(pPlayView->pHollICHandle);
pPlayView->pHollICHandle = NULL;
}
- pPlayView->pHollICHandle = vp_hollic_create_handle(__vp_play_view_holl_ic_changed_cb, (void *)pPlayView);
+ pPlayView->pHollICHandle =
+ vp_hollic_create_handle(__vp_play_view_holl_ic_changed_cb,
+ (void *) pPlayView);
#ifdef OLD_SENSOR_API
vp_sensor_realize(pPlayView->pSensorHandle);
#endif
- //vp_sound_init_session(pViewHandle);
- vp_sound_set_route_change_cb(__vp_play_sound_route_change_cb, (void *)pPlayView);
- vp_sound_set_volume_change_cb(__vp_play_sound_volume_change_cb, (void *)pPlayView);
+ vp_sound_set_route_change_cb(__vp_play_sound_route_change_cb,
+ (void *) pPlayView);
+ vp_sound_set_volume_change_cb(__vp_play_sound_volume_change_cb,
+ (void *) pPlayView);
if (!pPlayView->connection) {
int ret = connection_create(&pPlayView->connection);
if (ret != CONNECTION_ERROR_NONE || !pPlayView->connection) {
- VideoLogWarning("Fail to create connection handle [%d]\n", ret);
+ VideoLogWarning("Fail to create connection handle [%d]\n",
+ ret);
}
if (pPlayView->connection) {
ret = connection_set_type_changed_cb(pPlayView->connection,
- _vp_play_view_net_status_changed_cb,
- (void *)pPlayView);
+ _vp_play_view_net_status_changed_cb,
+ (void *) pPlayView);
if (ret != CONNECTION_ERROR_NONE) {
- VideoLogWarning("Fail to register network status callback [%d]\n", ret);
+ VideoLogWarning
+ ("Fail to register network status callback [%d]\n",
+ ret);
}
}
}
- vp_play_config_set_rotate_state_key_changed_cb(__vp_play_view_rotate_lock_key_changed_cb, (void *)pPlayView);
- vp_play_config_set_lock_state_key_changed_cb(__vp_play_view_lock_state_key_changed_cb, (void *)pPlayView);
+ vp_play_config_set_rotate_state_key_changed_cb
+ (__vp_play_view_rotate_lock_key_changed_cb, (void *) pPlayView);
+ vp_play_config_set_lock_state_key_changed_cb
+ (__vp_play_view_lock_state_key_changed_cb, (void *) pPlayView);
if (pPlayView->bWifi) {
- vp_play_config_set_wifi_state_key_changed_cb(__vp_play_view_wifi_key_changed_cb, (void *)pPlayView);
+ vp_play_config_set_wifi_state_key_changed_cb
+ (__vp_play_view_wifi_key_changed_cb, (void *) pPlayView);
}
-// int nColorTone = 0;
-// bool bOutdoor = FALSE;
-
-// vp_play_config_get_color_tone_key(&nColorTone);
-// vp_play_config_get_outdoor_key(&bOutdoor);
-
-// vp_device_display_init(nColorTone, (int)bOutdoor);
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
vp_play_util_key_grab(pPlayView->pWin, VP_VOLUME_UP_KEY);
vp_play_util_key_grab(pPlayView->pWin, VP_VOLUME_DOWN_KEY);
vp_play_preference_set_allow_dock_connect_key(FALSE);
if (pPlayView->szDMRID) {
- if (!vp_play_normal_view_set_manual_pause((normal_view_handle)pPlayView->pNormalView, TRUE)) {
- VideoLogError("vp_play_normal_view_set_start_position fail");
+ if (!vp_play_normal_view_set_manual_pause
+ ((normal_view_handle) pPlayView->pNormalView, TRUE)) {
+ VideoLogError
+ ("vp_play_normal_view_set_start_position fail");
return FALSE;
}
- if (!vp_play_normal_view_set_video_only(pPlayView->pNormalView, TRUE)) {
+ if (!vp_play_normal_view_set_video_only
+ (pPlayView->pNormalView, TRUE)) {
VideoLogError("vp_play_normal_view_set_video_only fail");
return FALSE;
}
} else {
- if (!vp_play_normal_view_set_video_only(pPlayView->pNormalView, bVideoOnly)) {
+ if (!vp_play_normal_view_set_video_only
+ (pPlayView->pNormalView, bVideoOnly)) {
VideoLogError("vp_play_normal_view_set_video_only fail");
return FALSE;
}
}
- if (!vp_play_normal_view_set_start_position((normal_view_handle)pPlayView->pNormalView, pPlayView->nStartPosition)) {
+ if (!vp_play_normal_view_set_start_position
+ ((normal_view_handle) pPlayView->pNormalView,
+ pPlayView->nStartPosition)) {
VideoLogError("vp_play_normal_view_set_start_position fail");
return FALSE;
}
- if (!vp_play_normal_view_set_audio_track((normal_view_handle)pPlayView->pNormalView, pPlayView->nAudioIndex)) {
+ if (!vp_play_normal_view_set_audio_track
+ ((normal_view_handle) pPlayView->pNormalView,
+ pPlayView->nAudioIndex)) {
VideoLogError("vp_play_normal_view_set_audio_track fail");
return FALSE;
}
- if (!vp_play_normal_view_set_subtitle((normal_view_handle)pPlayView->pNormalView, pPlayView->szSubtitleURL)) {
+ if (!vp_play_normal_view_set_subtitle
+ ((normal_view_handle) pPlayView->pNormalView,
+ pPlayView->szSubtitleURL)) {
VideoLogInfo("vp_play_normal_view_set_subtitle fail");
}
- if (!vp_play_normal_view_realize((normal_view_handle)pPlayView->pNormalView)) {
+ if (!vp_play_normal_view_realize
+ ((normal_view_handle) pPlayView->pNormalView)) {
VideoLogError("vp_play_normal_view_realize fail");
vp_play_view_unrealize(pPlayView);
return FALSE;
pPlayView->bRealized = TRUE;
- __vp_play_view_realize_cb((void *)pPlayView);
+ __vp_play_view_realize_cb((void *) pPlayView);
VideoLogWarning("<< Play View : Realize");
bool vp_play_view_unrealize(play_view_handle pViewHandle)
{
- int error = SOUND_MANAGER_ERROR_NONE;
+ int error = SOUND_MANAGER_ERROR_NONE;
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
pPlayView->bActivate = FALSE;
}
if (vp_play_normal_view_is_audio_only(pPlayView)) {
VideoLogInfo("In audio only mode!!!!");
- vp_play_util_set_unlock_power_key();
return TRUE;
}
sound_stream_focus_state_e state_for_playback;
sound_stream_focus_state_e state_for_recording;
int ret = -1;
- ret = sound_manager_get_focus_state(pPlayView->stream_info, &state_for_playback, &state_for_recording);
+ ret =
+ sound_manager_get_focus_state(pPlayView->stream_info,
+ &state_for_playback,
+ &state_for_recording);
if (ret != SOUND_MANAGER_ERROR_NONE) {
VideoLogError("failed to get focus state error[%x]", ret);
- }
+ }
if (state_for_playback != SOUND_STREAM_FOCUS_STATE_RELEASED) {
- error = sound_manager_release_focus(pPlayView->stream_info, SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
+ error =
+ sound_manager_release_focus(pPlayView->stream_info,
+ SOUND_STREAM_FOCUS_FOR_PLAYBACK,
+ SOUND_BEHAVIOR_NONE, NULL);
if (error != SOUND_MANAGER_ERROR_NONE) {
VideoLogError("failed to release focus error[%x]", error);
- }
+ }
}
media_key_release();
int nDuration = 0;
- if (vp_play_normal_view_get_video_duration(pPlayView->pNormalView, &nDuration)) {
+ if (vp_play_normal_view_get_video_duration
+ (pPlayView->pNormalView, &nDuration)) {
pPlayView->nDuration = nDuration;
}
if (pPlayView->nDuration == 0) {
vp_sensor_unrealize(pPlayView->pSensorHandle);
#endif
-#if 1
-// vp_device_display_deinit();
-#endif
vp_sound_deinit_session(pPlayView);
vp_play_wifi_deinitialize();
pPlayView->bWifi = FALSE;
}
- if(pPlayView->telinit) {
+ if (pPlayView->telinit) {
vp_play_telephony_deinitialize();
}
int nAudioIndex = 0;
video_sound_alive_t nSoundAlive = VIDEO_SA_NONE;
- if (vp_play_normal_view_get_last_position(pPlayView->pNormalView, &nCurPos)) {
+ if (vp_play_normal_view_get_last_position
+ (pPlayView->pNormalView, &nCurPos)) {
pPlayView->nStartPosition = nCurPos;
}
- if (vp_play_normal_view_get_sound_filter(pPlayView->pNormalView, &nSoundAlive)) {
+ if (vp_play_normal_view_get_sound_filter
+ (pPlayView->pNormalView, &nSoundAlive)) {
pPlayView->nSoundAlive = nSoundAlive;
}
- if (vp_play_normal_view_get_audio_track(pPlayView->pNormalView, &nAudioIndex)) {
+ if (vp_play_normal_view_get_audio_track
+ (pPlayView->pNormalView, &nAudioIndex)) {
pPlayView->nAudioIndex = nAudioIndex;
}
VP_FREE(pPlayView->szSubtitleURL);
- //vp_play_normal_view_get_subtitle(pPlayView->pNormalView, &(pPlayView->szSubtitleURL));
VideoLogInfo("vp_play_normal_view_unrealize START");
- if(!pPlayView->bIsSharePopup) {
- if (!vp_play_normal_view_unrealize(pPlayView->pNormalView)) {
- VideoLogError("vp_play_normal_view_unrealize fail");
- }
+ if (!pPlayView->bIsSharePopup) {
+ if (!vp_play_normal_view_unrealize(pPlayView->pNormalView)) {
+ VideoLogError("vp_play_normal_view_unrealize fail");
+ }
}
}
return TRUE;
}
-bool vp_play_view_is_realize(play_view_handle pViewHandle, bool *bRealized)
+
+bool vp_play_view_is_realize(play_view_handle pViewHandle,
+ bool * bRealized)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
bool bRealize = FALSE;
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- if (!vp_play_normal_view_is_realize(pPlayView->pNormalView, &bRealize)) {
+ if (!vp_play_normal_view_is_realize
+ (pPlayView->pNormalView, &bRealize)) {
VideoLogError("vp_play_normal_view_is_realize is fail");
return FALSE;
}
return TRUE;
}
-bool vp_play_view_set_user_data(play_view_handle pViewHandle, void *pUserData)
+bool vp_play_view_set_user_data(play_view_handle pViewHandle,
+ void *pUserData)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
pPlayView->pUserData = pUserData;
return TRUE;
}
-bool vp_play_view_set_url(play_view_handle pViewHandle, const char *szMediaURL)
+bool vp_play_view_set_url(play_view_handle pViewHandle,
+ const char *szMediaURL)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
VP_FREE(pPlayView->szMediaURL);
- char *szConvert = vp_play_util_remove_prefix_to_url((char *)szMediaURL);
+ char *szConvert =
+ vp_play_util_remove_prefix_to_url((char *) szMediaURL);
if (szConvert) {
VP_STRDUP(pPlayView->szMediaURL, szConvert);
} else {
VP_FREE(szPreviewURL);
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- if (!vp_play_normal_view_set_url(pPlayView->pNormalView, pPlayView->szMediaURL)) {
+ if (!vp_play_normal_view_set_url
+ (pPlayView->pNormalView, pPlayView->szMediaURL)) {
VideoLogError("vp_play_normal_view_set_url fail");
return FALSE;
}
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
VP_STRDUP(*szMediaURL, pPlayView->szMediaURL);
return TRUE;
}
-bool vp_play_view_get_visible_status(play_view_handle pViewHandle, bool *bVisible)
+bool vp_play_view_get_visible_status(play_view_handle pViewHandle,
+ bool * bVisible)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
*bVisible = pPlayView->bVisible;
}
bool vp_play_view_add_multi_path(play_view_handle pViewHandle,
- const char *szURL,
- char *szTitle,
- char *szSubTitle,
- int nPosition,
- int nDuration,
- bool bIsSameAP)
+ const char *szURL,
+ char *szTitle,
+ char *szSubTitle,
+ int nPosition,
+ int nDuration, bool bIsSameAP)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
- VideoSecureLogInfo("URL[%s],SubTitle[%s],Pos[%d], Duration[%d], Title[%s], SameAP[%d]", szURL, szSubTitle, nPosition, nDuration, szTitle, (int)bIsSameAP);
+ VideoSecureLogInfo
+ ("URL[%s],SubTitle[%s],Pos[%d], Duration[%d], Title[%s], SameAP[%d]",
+ szURL, szSubTitle, nPosition, nDuration, szTitle,
+ (int) bIsSameAP);
- if (!vp_multi_path_add_item(&(pPlayView->pMultiPathList), szURL, szTitle, szSubTitle, nPosition, nDuration, bIsSameAP)) {
+ if (!vp_multi_path_add_item
+ (&(pPlayView->pMultiPathList), szURL, szTitle, szSubTitle,
+ nPosition, nDuration, bIsSameAP)) {
VideoLogError("vp_multi_path_add_item is fail");
return FALSE;
}
return TRUE;
}
-bool vp_play_view_set_device_id(play_view_handle pViewHandle, const char *szDeviceID)
+bool vp_play_view_set_device_id(play_view_handle pViewHandle,
+ const char *szDeviceID)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
VP_FREE(pPlayView->szDeviceID);
VP_STRDUP(pPlayView->szDeviceID, szDeviceID);
return TRUE;
}
-bool vp_play_view_set_auto_play_setting(play_view_handle pViewHandle, const char *autoplay)
+bool vp_play_view_set_auto_play_setting(play_view_handle pViewHandle,
+ const char *autoplay)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
VP_FREE(pPlayView->szAutoPlay);
VP_STRDUP(pPlayView->szAutoPlay, autoplay);
return TRUE;
}
-bool vp_play_view_set_dmr_id(play_view_handle pViewHandle, const char *szDMRID)
+bool vp_play_view_set_dmr_id(play_view_handle pViewHandle,
+ const char *szDMRID)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
VP_FREE(pPlayView->szDMRID);
VP_STRDUP(pPlayView->szDMRID, szDMRID);
return TRUE;
}
-bool vp_play_view_set_media_title(play_view_handle pViewHandle, const char *szMediaTitle)
+bool vp_play_view_set_media_title(play_view_handle pViewHandle,
+ const char *szMediaTitle)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
VP_FREE(pPlayView->szMediaTitle);
VP_STRDUP(pPlayView->szMediaTitle, szMediaTitle);
return TRUE;
}
-bool vp_play_view_set_start_position(play_view_handle pViewHandle, int nPosition)
+bool vp_play_view_set_start_position(play_view_handle pViewHandle,
+ int nPosition)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
pPlayView->nStartPosition = nPosition;
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- if (!vp_play_normal_view_set_start_position(pPlayView->pNormalView, nPosition)) {
+ if (!vp_play_normal_view_set_start_position
+ (pPlayView->pNormalView, nPosition)) {
VideoLogError("vp_play_normal_view_set_url fail");
return FALSE;
}
return TRUE;
}
-bool vp_play_view_set_rotate(play_view_handle pViewHandle, video_play_rotate_t nRotate)
+bool vp_play_view_set_rotate(play_view_handle pViewHandle,
+ video_play_rotate_t nRotate)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- if (!vp_play_normal_view_set_rotate(pPlayView->pNormalView, nRotate, TRUE)) {
+ if (!vp_play_normal_view_set_rotate
+ (pPlayView->pNormalView, nRotate, TRUE)) {
VideoLogError("vp_play_normal_view_set_rotate fail");
return FALSE;
}
return TRUE;
}
-bool vp_play_view_get_popup_mode(play_view_handle pViewHandle, bool *bPopupMode)
+bool vp_play_view_get_popup_mode(play_view_handle pViewHandle,
+ bool * bPopupMode)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return TRUE;
}
-bool vp_play_view_set_relaunch_caller(play_view_handle pViewHandle, bool bRelaunch)
+bool vp_play_view_set_relaunch_caller(play_view_handle pViewHandle,
+ bool bRelaunch)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
pPlayView->bRelaunchCaller = bRelaunch;
return TRUE;
}
-bool vp_play_view_set_launching_mode(play_view_handle pViewHandle, video_play_launching_type_t nLaunchingType)
+bool vp_play_view_set_launching_mode(play_view_handle pViewHandle,
+ video_play_launching_type_t
+ nLaunchingType)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
pPlayView->nLaunchingType = nLaunchingType;
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
- if (!vp_play_normal_view_set_launching_mode(pPlayView->pNormalView, nLaunchingType)) {
- VideoLogError("vp_play_normal_view_set_launching_mode is fail");
+ if (!vp_play_normal_view_set_launching_mode
+ (pPlayView->pNormalView, nLaunchingType)) {
+ VideoLogError
+ ("vp_play_normal_view_set_launching_mode is fail");
return FALSE;
}
}
return TRUE;
}
-bool vp_play_view_set_list_mode(play_view_handle pViewHandle, video_play_list_type_t nListType)
+bool vp_play_view_set_list_mode(play_view_handle pViewHandle,
+ video_play_list_type_t nListType)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
pPlayView->nListType = nListType;
return TRUE;
}
-bool vp_play_view_set_cookie(play_view_handle pViewHandle, const char *szCookie)
+bool vp_play_view_set_cookie(play_view_handle pViewHandle,
+ const char *szCookie)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
VP_FREE(pPlayView->szCookie);
return TRUE;
}
-bool vp_play_view_set_proxy(play_view_handle pViewHandle, const char *szProxy)
+bool vp_play_view_set_proxy(play_view_handle pViewHandle,
+ const char *szProxy)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
VP_FREE(pPlayView->szProxy);
return TRUE;
}
-bool vp_play_view_set_store_download_mode(play_view_handle pViewHandle, bool bStoreDownload)
+bool vp_play_view_set_store_download_mode(play_view_handle pViewHandle,
+ bool bStoreDownload)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
pPlayView->bStoreDownload = bStoreDownload;
return TRUE;
}
-bool vp_play_view_set_stop_after_repeat_mode(play_view_handle pViewHandle, bool bStopAfterRepeat)
+bool vp_play_view_set_stop_after_repeat_mode(play_view_handle pViewHandle,
+ bool bStopAfterRepeat)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
pPlayView->bStopAfterRepeat = bStopAfterRepeat;
return TRUE;
}
-bool vp_play_view_set_store_download_filesize(play_view_handle pViewHandle, double dStoreDL_FileSize)
+bool vp_play_view_set_store_download_filesize(play_view_handle pViewHandle,
+ double dStoreDL_FileSize)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
pPlayView->dStoreDL_FileSize = dStoreDL_FileSize;
return TRUE;
}
-bool vp_play_view_set_store_order_info(play_view_handle pViewHandle, char *pStoreOrderId, char *pStoreServerId, char *pStoreAppId, char *pStoreMvId)
+bool vp_play_view_set_store_order_info(play_view_handle pViewHandle,
+ char *pStoreOrderId,
+ char *pStoreServerId,
+ char *pStoreAppId, char *pStoreMvId)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- VideoSecureLogInfo("pStoreOrderId : [%s], pStoreServerId : [%s], pStoreAppId : [%s], pStoreMvId : [%s]", pStoreOrderId, pStoreServerId, pStoreAppId, pStoreMvId);
+ VideoSecureLogInfo
+ ("pStoreOrderId : [%s], pStoreServerId : [%s], pStoreAppId : [%s], pStoreMvId : [%s]",
+ pStoreOrderId, pStoreServerId, pStoreAppId, pStoreMvId);
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
VP_FREE(pPlayView->pStoreOrderId);
VP_STRDUP(pPlayView->pStoreOrderId, pStoreOrderId);
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
-
+ PlayView *pPlayView = (PlayView *) pViewHandle;
if (pPlayView->nPlayMode == VIDEO_PLAY_MODE_NORMAL_VIEW) {
vp_play_normal_view_update(pPlayView->pNormalView);
}
return TRUE;
}
-bool vp_play_view_set_callback(play_view_handle pViewHandle, video_play_callback_type_t nCbType, void *pFunc)
+bool vp_play_view_set_callback(play_view_handle pViewHandle,
+ video_play_callback_type_t nCbType,
+ void *pFunc)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
if (pPlayView->pCallback == NULL) {
VideoLogError("PlayView Callback is NULL");
return TRUE;
}
-bool vp_play_view_unset_callback(play_view_handle pViewHandle, video_play_callback_type_t nCbType)
+bool vp_play_view_unset_callback(play_view_handle pViewHandle,
+ video_play_callback_type_t nCbType)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
if (!pPlayView->pCallback) {
VideoLogError("PlayView Callback is NULL");
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
return pPlayView->pWin;
}
-bool vp_play_view_change_style_minimode_to_fullmode(play_view_handle pViewHandle, video_play_launching_type_t nLaunchingType)
+bool vp_play_view_change_style_minimode_to_fullmode(play_view_handle
+ pViewHandle,
+ video_play_launching_type_t
+ nLaunchingType)
{
if (!pViewHandle) {
VideoLogError("PlayView handle is NULL");
return FALSE;
}
- PlayView *pPlayView = (PlayView *)pViewHandle;
+ PlayView *pPlayView = (PlayView *) pViewHandle;
pPlayView->nLaunchingType = nLaunchingType;
- if (nLaunchingType == VIDEO_PLAY_TYPE_MESSAGE || nLaunchingType == VIDEO_PLAY_TYPE_EMAIL) {
+ if (nLaunchingType == VIDEO_PLAY_TYPE_MESSAGE
+ || nLaunchingType == VIDEO_PLAY_TYPE_EMAIL) {
//change multi mode to mini mode
}
return TRUE;
}
+
+
+bool vp_play_view_reset_audio_only(play_view_handle * pPlayViewHandle)
+{
+ PlayView *pPlayView = (PlayView *) pPlayViewHandle;
+ vp_play_normal_view_reset_audio_only(pPlayView->pNormalView);
+ return TRUE;
+}
+
+
+bool vp_play_view_handle_language_change(play_view_handle * pPlayViewHandle)
+{
+ PlayView *pPlayView = (PlayView *) pPlayViewHandle;
+ if (!pPlayView) {
+ VideoLogError("pPlayView is NULL");
+ return FALSE;
+ }
+
+ return vp_play_normal_view_handle_language_change(pPlayView->pNormalView);
+}
+
+
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
typedef void *bookmark_handle;
-typedef void (*BookmarkCaptureStartCbFunc)(void *pUserData);
-typedef void (*BookmarkItemSelectCbFunc)(int nPos, const char *szPath, void* pUserData);
+typedef void (*BookmarkCaptureStartCbFunc) (void *pUserData);
+typedef void (*BookmarkItemSelectCbFunc) (int nPos, const char *szPath,
+ void *pUserData);
-bookmark_handle vp_play_bookmark_create(Evas_Object *pParent);
+bookmark_handle vp_play_bookmark_create(Evas_Object * pParent);
void vp_play_bookmark_destroy(bookmark_handle pWidgetHandle);
bool vp_play_bookmark_realize(bookmark_handle pWidgetHandle);
bool vp_play_bookmark_unrealize(bookmark_handle pWidgetHandle);
-bool vp_play_bookmark_is_realize(bookmark_handle pWidgetHandle, bool *bIsRealize);
+bool vp_play_bookmark_is_realize(bookmark_handle pWidgetHandle,
+ bool * bIsRealize);
Evas_Object *vp_play_bookmark_get_object(bookmark_handle pWidgetHandle);
-bool vp_play_bookmark_set_capture_callback(bookmark_handle pWidgetHandle, BookmarkCaptureStartCbFunc func);
-bool vp_play_bookmark_set_item_select_callback(bookmark_handle pWidgetHandle, BookmarkItemSelectCbFunc func);
-bool vp_play_bookmark_set_user_param(bookmark_handle pWidgetHandle, void *pUserData);
-bool vp_play_bookmark_set_media_url(bookmark_handle pWidgetHandle, const char *szMediaURL);
-bool vp_play_bookmark_set_edit_mode(bookmark_handle pWidgetHandle, bool bEditMode);
-bool vp_play_bookmark_get_edit_mode(bookmark_handle pWidgetHandle, bool *bEditMode);
-bool vp_play_bookmark_get_pressed_status(bookmark_handle pWidgetHandle, bool *bPressed);
-
-bool vp_play_bookmark_insert_item(bookmark_handle pWidgetHandle, const char *szBookmarkURL, int nPos);
-bool vp_play_bookmark_get_item_count(bookmark_handle pWidgetHandle, int *nCount);
+bool vp_play_bookmark_set_capture_callback(bookmark_handle pWidgetHandle,
+ BookmarkCaptureStartCbFunc
+ func);
+bool vp_play_bookmark_set_item_select_callback(bookmark_handle
+ pWidgetHandle,
+ BookmarkItemSelectCbFunc
+ func);
+bool vp_play_bookmark_set_user_param(bookmark_handle pWidgetHandle,
+ void *pUserData);
+bool vp_play_bookmark_set_media_url(bookmark_handle pWidgetHandle,
+ const char *szMediaURL);
+bool vp_play_bookmark_set_edit_mode(bookmark_handle pWidgetHandle,
+ bool bEditMode);
+bool vp_play_bookmark_get_edit_mode(bookmark_handle pWidgetHandle,
+ bool * bEditMode);
+bool vp_play_bookmark_get_pressed_status(bookmark_handle pWidgetHandle,
+ bool * bPressed);
+bool vp_play_bookmark_insert_item(bookmark_handle pWidgetHandle,
+ const char *szBookmarkURL, int nPos);
+bool vp_play_bookmark_get_item_count(bookmark_handle pWidgetHandle,
+ int *nCount);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
typedef void *brightness_handle;
-brightness_handle vp_play_brightness_create(Evas_Object *pParent);
+brightness_handle vp_play_brightness_create(Evas_Object * pParent);
void vp_play_brightness_destroy(brightness_handle pBrightnessHandle);
bool vp_play_brightness_realize(brightness_handle pBrightnessHandlee);
bool vp_play_brightness_unrealize(brightness_handle pBrightnessHandlee);
-bool vp_play_brightness_set_landscape_mode(brightness_handle pBrightnessHandle, bool bLandscape);
-bool vp_play_brightness_is_realize(brightness_handle pBrightnessHandle, bool *bIsRealize);
-bool vp_play_brightness_set_value(brightness_handle pBrightnessHandle, int nCurVal);
+bool vp_play_brightness_set_landscape_mode(brightness_handle
+ pBrightnessHandle,
+ bool bLandscape);
+bool vp_play_brightness_is_realize(brightness_handle pBrightnessHandle,
+ bool * bIsRealize);
+bool vp_play_brightness_set_value(brightness_handle pBrightnessHandle,
+ int nCurVal);
bool vp_play_brightness_get_value(int *nCurVal);
bool vp_play_brightness_get_max_value(int *nMaxVal);
bool vp_play_brightness_get_min_value(int *nMinVal);
-
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
#include <Elementary.h>
-Evas_Object *vp_button_create(Evas_Object *pParent,const char *pStyle, const char *pTxt, Evas_Smart_Cb pClickFunc, Evas_Smart_Cb pPressFunc, Evas_Smart_Cb pUnpressFunc, void *pUserData);
-Evas_Object *vp_button_create_icon(Evas_Object *pParent, const char *pEdjPath, const char *pGroupName);
-Evas_Object *vp_button_create_image(Evas_Object *pParent, const char *pEdjPath, const char *pGroupName);
-Evas_Object *vp_navirame_button_create(Evas_Object *pParent,const char *pStyle, const char *pEdjPath, const char *pGroupName, Evas_Smart_Cb pClickFunc, void *pUserData);
-
+Evas_Object *vp_button_create(Evas_Object * pParent, const char *pStyle,
+ const char *pTxt, Evas_Smart_Cb pClickFunc,
+ Evas_Smart_Cb pPressFunc,
+ Evas_Smart_Cb pUnpressFunc, void *pUserData);
+Evas_Object *vp_button_create_icon(Evas_Object * pParent,
+ const char *pEdjPath,
+ const char *pGroupName);
+Evas_Object *vp_button_create_image(Evas_Object * pParent,
+ const char *pEdjPath,
+ const char *pGroupName);
+Evas_Object *vp_navirame_button_create(Evas_Object * pParent,
+ const char *pStyle,
+ const char *pEdjPath,
+ const char *pGroupName,
+ Evas_Smart_Cb pClickFunc,
+ void *pUserData);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
VIDEO_LOADING_SIZE_MIDUM,
VIDEO_LOADING_SIZE_LARGE,
VIDEO_LOADING_SIZE_XLARGE,
-}video_loading_size_t;
-
-Evas_Object *vp_play_loading_ani_create(Evas_Object *pParent, video_loading_size_t nSize);
-void vp_play_loading_ani_destroy(Evas_Object *pProgress);
+} video_loading_size_t;
+Evas_Object *vp_play_loading_ani_create(Evas_Object * pParent,
+ video_loading_size_t nSize);
+void vp_play_loading_ani_destroy(Evas_Object * pProgress);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 VP_PLAY_LOCKSCREENMC_H_
#define VP_PLAY_LOCKSCREENMC_H_
-//#include "mp-ta.h"
-//#include "music.h"
-//#include "mp-item.h"
-//#include "mp-player-control.h"
-//#include "mp-common.h"
-//#include "mp-player-mgr.h"
-//#include "mp-player-debug.h"
-//
-//#ifdef MP_FEATURE_LOCKSCREEN
#include "vp-play-view-priv.h"
enum vp_lc_controller_button_type {
LC_CONTROLLER_PLAY_BUTTON = 0,
LC_CONTROLLER_REW_BUTTON
};
-int vp_lockscreenmini_create(PlayView *pPlayView);
-int vp_lockscreenmini_hide(PlayView *pPlayView);
-int vp_lockscreenmini_show(PlayView *pPlayView);
-int vp_lockscreenmini_destroy(PlayView *pPlayView);
-void vp_lockscreenmini_update_control(PlayView *pPlayView);
-void vp_lockscreenmini_update(PlayView *pPlayView);
-//void mp_lockscreenmini_visible_set(struct appdata *ad, bool visible);
-//bool mp_lockscreenmini_visible_get(struct appdata *ad);
-//void mp_lockscreenmini_on_lcd_event(struct appdata *ad, bool lcd_on);
-//
-//#endif
+int vp_lockscreenmini_create(PlayView * pPlayView);
+int vp_lockscreenmini_hide(PlayView * pPlayView);
+int vp_lockscreenmini_show(PlayView * pPlayView);
+int vp_lockscreenmini_destroy(PlayView * pPlayView);
+void vp_lockscreenmini_update_control(PlayView * pPlayView);
+void vp_lockscreenmini_update(PlayView * pPlayView);
-#endif /* VP_PLAY_LOCKSCREENMC_H_ */
+#endif /* VP_PLAY_LOCKSCREENMC_H_ */
/*
- /*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 VP_PLAY_MINICONTROLLER_H_
#define VP_PLAY_MINICONTROLLER_H_
CONTROLLER_REW_BUTTON
};
-int vp_minicontroller_create(PlayView *pPlayView);
-//int vp_minicontroller_hide(struct appdata *ad);
-int vp_minicontroller_show(PlayView *pPlayView);
-int vp_minicontroller_destroy(PlayView *pPlayView);
-void vp_minicontroller_update_control(PlayView *pPlayView);
-void vp_minicontroller_update(PlayView *pPlayView, bool with_title);
-void vp_minicontroller_rotate(PlayView *pPlayView, video_play_rotate_t angle);
-//void vp_minicontroller_visible_set(struct appdata *ad, bool visible);
-//bool vp_minicontroller_visible_get(struct appdata *ad);
-//void vp_minicontroller_on_lcd_event(struct appdata *ad, bool lcd_on);
-
-#endif /* VP_PLAY_MINICONTROLLER_H_ */
+int vp_minicontroller_create(PlayView * pPlayView);
+int vp_minicontroller_show(PlayView * pPlayView);
+int vp_minicontroller_destroy(PlayView * pPlayView);
+void vp_minicontroller_update_control(PlayView * pPlayView);
+void vp_minicontroller_update(PlayView * pPlayView, bool with_title);
+void vp_minicontroller_rotate(PlayView * pPlayView, int angle);
+int _vp_is_current_focus_available();
+#endif /* VP_PLAY_MINICONTROLLER_H_ */
/*
-* 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.
-*
-*/
-
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#define FALSE 0
#endif
-typedef void (*PopupCloseCbFunc)(int nType, bool bPause, void* pUserData);
+typedef void (*PopupCloseCbFunc) (int nType, bool bPause, void *pUserData);
typedef enum {
POPUP_STYLE_DEFAULT_NO_CANCEL_BTN = 0x00,
POPUP_STYLE_PROGRESS_WITH_NO_CANCEL_BTN,
POPUP_STYLE_FULLSCREEN_NO_CANCEL_BTN,
POPUP_STYLE_FULLSCREEN_NO_TITLE_NO_CANCEL_BTN
-}video_popup_style_t;
+} video_popup_style_t;
-typedef enum
-{
+typedef enum {
VIDEOS_POPUP_NONE = 0x00,
VIDEO_POPUP_DEFAULT,
VIDEO_POPUP_2_TEXT,
VIDEO_POPUP_2_TEXT_1_ICON,
VIDEO_POPUP_LOADING_LIST,
VIDEOS_POPUP_MAX
-}video_list_popup_style_t;
+} video_list_popup_style_t;
-Evas_Object *vp_popup_create(Evas_Object *pParent, video_popup_style_t nStyle, char *szTitle, char *szContent, double dTimeOut, Evas_Smart_Cb pTimeoutFunc, Eext_Event_Cb pCancelKeyCb, Evas_Object_Event_Cb pCancelMouseCb, void *pUserData);
-Evas_Object *vp_two_button_popup_create( Evas_Object *pParent, char *szTitle, char *szContent, char *pLeftButtonText, Evas_Smart_Cb leftButtonCb, char *pRightButtonText, Evas_Smart_Cb rightButtonCb, const void *pUserData );
+Evas_Object *vp_popup_create(Evas_Object * pParent,
+ video_popup_style_t nStyle, char *szTitle,
+ char *szContent, double dTimeOut,
+ Evas_Smart_Cb pTimeoutFunc,
+ Eext_Event_Cb pCancelKeyCb,
+ Evas_Object_Event_Cb pCancelMouseCb,
+ void *pUserData);
+Evas_Object *vp_two_button_popup_create(Evas_Object * pParent,
+ char *szTitle, char *szContent,
+ char *pLeftButtonText,
+ Evas_Smart_Cb leftButtonCb,
+ char *pRightButtonText,
+ Evas_Smart_Cb rightButtonCb,
+ const void *pUserData);
#ifdef _SUBTITLE_MULTI_LANGUAGE
-Evas_Object *vp_title_two_button_popup_create( Evas_Object *pParent, char *szTitle, char *szContent, char *pLeftButtonText, Evas_Smart_Cb leftButtonCb, char *pRightButtonText, Evas_Smart_Cb rightButtonCb, const void *pUserData );
+Evas_Object *vp_title_two_button_popup_create(Evas_Object * pParent,
+ char *szTitle,
+ char *szContent,
+ char *pLeftButtonText,
+ Evas_Smart_Cb leftButtonCb,
+ char *pRightButtonText,
+ Evas_Smart_Cb rightButtonCb,
+ const void *pUserData);
#endif
-bool vp_popup_check_landspace_by_win(Evas_Object *pWin);
-void vp_popup_set_popup_min_size(Evas_Object *pWin, Evas_Object *pBox, int nListCount, video_list_popup_style_t eStyle);
-
+bool vp_popup_check_landspace_by_win(Evas_Object * pWin);
+void vp_popup_set_popup_min_size(Evas_Object * pWin, Evas_Object * pBox,
+ int nListCount,
+ video_list_popup_style_t eStyle);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
typedef enum {
VIDEO_PROGRESSBAR_TYPE_NORMAL = 0x00,
- VIDEO_PROGRESSBAR_TYPE_TRIM ,
-}video_progressbar_type_t;
+ VIDEO_PROGRESSBAR_TYPE_TRIM,
+} video_progressbar_type_t;
-progressbar_handle vp_play_progressbar_create(Evas_Object *pParent, video_progressbar_type_t nType);
+progressbar_handle vp_play_progressbar_create(Evas_Object * pParent,
+ video_progressbar_type_t
+ nType);
void vp_play_progressbar_destroy(progressbar_handle pWidgetHandle);
bool vp_play_progressbar_realize(progressbar_handle pWidgetHandle);
bool vp_play_progressbar_unrealize(progressbar_handle pWidgetHandle);
-Evas_Object *vp_play_progressbar_get_object(progressbar_handle pWidgetHandle);
-bool vp_play_progressbar_set_duration(progressbar_handle pWidgetHandle, int nDuration);
-bool vp_play_progressbar_set_position(progressbar_handle pWidgetHandle, int nPosition);
-bool vp_play_progressbar_set_buffering_position(progressbar_handle pWidgetHandle, int nBufferinPosition);
-bool vp_play_progressbar_set_landscape_mode(progressbar_handle pWidgetHandle, bool bLandscape);
-bool vp_play_progressbar_set_opacity(progressbar_handle pWidgetHandle, bool bDefault);
-Evas_Object *vp_play_progressbar_get_focus_object(progressbar_handle pWidgetHandle);
-
+Evas_Object *vp_play_progressbar_get_object(progressbar_handle
+ pWidgetHandle);
+bool vp_play_progressbar_set_duration(progressbar_handle pWidgetHandle,
+ int nDuration);
+bool vp_play_progressbar_set_position(progressbar_handle pWidgetHandle,
+ int nPosition);
+bool vp_play_progressbar_set_buffering_position(progressbar_handle
+ pWidgetHandle,
+ int nBufferinPosition);
+bool vp_play_progressbar_set_landscape_mode(progressbar_handle
+ pWidgetHandle,
+ bool bLandscape);
+bool vp_play_progressbar_set_opacity(progressbar_handle pWidgetHandle,
+ bool bDefault);
+Evas_Object *vp_play_progressbar_get_focus_object(progressbar_handle
+ pWidgetHandle);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
VP_SUBTITLE_SMALL = 0x00,
VP_SUBTITLE_MEDIUM,
VP_SUBTITLE_LARGE,
-}video_subtitle_size_t;
+} video_subtitle_size_t;
typedef enum {
VP_SUBTITLE_COLOR_WHITE = 0x00,
VP_SUBTITLE_COLOR_CYAN,
VP_SUBTITLE_COLOR_CUSTOM,
VP_SUBTITLE_COLOR_NONE
-}video_subtitle_color_t;
+} video_subtitle_color_t;
typedef enum {
VP_SUBTITLE_ALIGNMENT_LEFT = 0x00,
VP_SUBTITLE_ALIGNMENT_CENTER,
VP_SUBTITLE_ALIGNMENT_RIGHT
-}vp_subtitle_alignment_t;
+} vp_subtitle_alignment_t;
typedef enum {
VP_SUBTITLE_TYPE_NORMAL = 0x00,
VP_SUBTITLE_TYPE_MULTI
-}vp_subtitle_type_t;
+} vp_subtitle_type_t;
-typedef struct _SubtitleWidget
-{
- Evas_Object *pParent;
- Evas_Object *pLayout;
- Evas_Object *pTextBlock;
- char *szFontName;
- char *szText;
- video_subtitle_size_t nSize;
- int nEdge;
- float fZoom;
+typedef struct _SubtitleWidget {
+ Evas_Object *pParent;
+ Evas_Object *pLayout;
+ Evas_Object *pTextBlock;
+ char *szFontName;
+ char *szText;
+ video_subtitle_size_t nSize;
+ int nEdge;
+ float fZoom;
#ifdef SUBTITLE_K_FEATURE
vp_subtitle_alignment_t nAlignment;
#endif
#ifndef SUBTITLE_K_FEATURE
- video_subtitle_color_t nFontColor;
- video_subtitle_color_t nBGColor;
+ video_subtitle_color_t nFontColor;
+ video_subtitle_color_t nBGColor;
#else
char *pFontColorHex;
char *pBGColorHex;
char *pCaptionWinColorHex;
#endif
- bool bIsRealize;
- bool bShowCaptionWin;
-}Subtitle;
+ bool bIsRealize;
+ bool bShowCaptionWin;
+} Subtitle;
-subtitle_handle vp_play_subtitle_create(Evas_Object *pParent, vp_subtitle_type_t nType);
+subtitle_handle vp_play_subtitle_create(Evas_Object * pParent,
+ vp_subtitle_type_t nType);
void vp_play_subtitle_destroy(subtitle_handle pWidgetHandle);
bool vp_play_subtitle_realize(subtitle_handle pWidgetHandle);
bool vp_play_subtitle_unrealize(subtitle_handle pWidgetHandle);
-bool vp_play_subtitle_is_realize(subtitle_handle pWidgetHandle, bool *bIsRealize);
+bool vp_play_subtitle_is_realize(subtitle_handle pWidgetHandle,
+ bool * bIsRealize);
Evas_Object *vp_play_subtitle_get_object(subtitle_handle pWidgetHandle);
-bool vp_play_subtitle_set_font(subtitle_handle pWidgetHandle, char *szFontName);
-bool vp_play_subtitle_get_font(subtitle_handle pWidgetHandle, char **szFontName);
-bool vp_play_subtitle_set_size(subtitle_handle pWidgetHandle, video_subtitle_size_t nSize);
-bool vp_play_subtitle_get_size(subtitle_handle pWidgetHandle, video_subtitle_size_t *nSize);
-bool vp_play_subtitle_set_size_zoom(subtitle_handle pWidgetHandle, float fZoom);
-bool vp_play_subtitle_get_size_zoom(subtitle_handle pWidgetHandle, float *fZoom);
-void vp_play_subtitle_text_update(Subtitle *pSubtitle, const char *szTxt);
+bool vp_play_subtitle_set_font(subtitle_handle pWidgetHandle,
+ char *szFontName);
+bool vp_play_subtitle_get_font(subtitle_handle pWidgetHandle,
+ char **szFontName);
+bool vp_play_subtitle_set_size(subtitle_handle pWidgetHandle,
+ video_subtitle_size_t nSize);
+bool vp_play_subtitle_get_size(subtitle_handle pWidgetHandle,
+ video_subtitle_size_t * nSize);
+bool vp_play_subtitle_set_size_zoom(subtitle_handle pWidgetHandle,
+ float fZoom);
+bool vp_play_subtitle_get_size_zoom(subtitle_handle pWidgetHandle,
+ float *fZoom);
+void vp_play_subtitle_text_update(Subtitle * pSubtitle, const char *szTxt);
#ifndef SUBTITLE_K_FEATURE
-bool vp_play_subtitle_set_color(subtitle_handle pWidgetHandle, video_subtitle_color_t nColor);
-bool vp_play_subtitle_get_color(subtitle_handle pWidgetHandle, video_subtitle_color_t *nColor);
-bool vp_play_subtitle_set_bg_color(subtitle_handle pWidgetHandle, video_subtitle_color_t nColor);
-bool vp_play_subtitle_get_bg_color(subtitle_handle pWidgetHandle, video_subtitle_color_t *nColor);
+bool vp_play_subtitle_set_color(subtitle_handle pWidgetHandle,
+ video_subtitle_color_t nColor);
+bool vp_play_subtitle_get_color(subtitle_handle pWidgetHandle,
+ video_subtitle_color_t * nColor);
+bool vp_play_subtitle_set_bg_color(subtitle_handle pWidgetHandle,
+ video_subtitle_color_t nColor);
+bool vp_play_subtitle_get_bg_color(subtitle_handle pWidgetHandle,
+ video_subtitle_color_t * nColor);
#else
-bool vp_play_subtitle_get_color(subtitle_handle pWidgetHandle, char **pColorHex);
-bool vp_play_subtitle_set_color(subtitle_handle pWidgetHandle, char *pColorHex);
-bool vp_play_subtitle_get_bg_color(subtitle_handle pWidgetHandle, char **pColorHex);
-bool vp_play_subtitle_set_bg_color(subtitle_handle pWidgetHandle, char *pColorHex);
+bool vp_play_subtitle_get_color(subtitle_handle pWidgetHandle,
+ char **pColorHex);
+bool vp_play_subtitle_set_color(subtitle_handle pWidgetHandle,
+ char *pColorHex);
+bool vp_play_subtitle_get_bg_color(subtitle_handle pWidgetHandle,
+ char **pColorHex);
+bool vp_play_subtitle_set_bg_color(subtitle_handle pWidgetHandle,
+ char *pColorHex);
#endif
-bool vp_play_subtitle_set_text(subtitle_handle pWidgetHandle, const char *szText);
-bool vp_play_subtitle_get_text(subtitle_handle pWidgetHandle, char **szText);
+bool vp_play_subtitle_set_text(subtitle_handle pWidgetHandle,
+ const char *szText);
+bool vp_play_subtitle_get_text(subtitle_handle pWidgetHandle,
+ char **szText);
#ifdef SUBTITLE_K_FEATURE
-bool vp_play_subtitle_set_alignment(subtitle_handle pWidgetHandle, vp_subtitle_alignment_t nAlignment);
-bool vp_play_subtitle_get_alignment(subtitle_handle pWidgetHandle, vp_subtitle_alignment_t *nAlignment);
-bool vp_play_subtitle_set_caption_win_color(subtitle_handle pWidgetHandle, bool bShowCaption);
-bool vp_play_subtitle_get_geometry(subtitle_handle pWidgetHandle, bool bLandscape, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
+bool vp_play_subtitle_set_alignment(subtitle_handle pWidgetHandle,
+ vp_subtitle_alignment_t nAlignment);
+bool vp_play_subtitle_get_alignment(subtitle_handle pWidgetHandle,
+ vp_subtitle_alignment_t * nAlignment);
+bool vp_play_subtitle_set_caption_win_color(subtitle_handle pWidgetHandle,
+ bool bShowCaption);
+bool vp_play_subtitle_get_geometry(subtitle_handle pWidgetHandle,
+ bool bLandscape, Evas_Coord * x,
+ Evas_Coord * y, Evas_Coord * w,
+ Evas_Coord * h);
#endif
bool vp_play_subtitle_set_edge(subtitle_handle pWidgetHandle, int nEdge);
bool vp_play_subtitle_get_edge(subtitle_handle pWidgetHandle, int *nEdge);
-bool vp_play_subtitle_get_size_formatted(subtitle_handle pWidgetHandle, Evas_Coord *ww, Evas_Coord *hh);
+bool vp_play_subtitle_get_size_formatted(subtitle_handle pWidgetHandle,
+ Evas_Coord * ww, Evas_Coord * hh);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
typedef void *volume_popup_handle;
-volume_popup_handle vp_play_volume_popup_create(Evas_Object *pParent);
+volume_popup_handle vp_play_volume_popup_create(Evas_Object * pParent);
void vp_play_volume_popup_destroy(volume_popup_handle pVolumeHandle);
bool vp_play_volume_popup_realize(volume_popup_handle pVolumeHandle);
bool vp_play_volume_popup_unrealize(volume_popup_handle pVolumeHandle);
-bool vp_play_volume_popup_set_landscape_mode(volume_popup_handle pVolumeHandle, bool bLandscape);
-bool vp_play_volume_popup_is_realize(volume_popup_handle pVolumeHandle, bool *bIsRealize);
-bool vp_play_volume_popup_set_value(volume_popup_handle pVolumeHandle, int nCurVal);
+bool vp_play_volume_popup_set_landscape_mode(volume_popup_handle
+ pVolumeHandle,
+ bool bLandscape);
+bool vp_play_volume_popup_is_realize(volume_popup_handle pVolumeHandle,
+ bool * bIsRealize);
+bool vp_play_volume_popup_set_value(volume_popup_handle pVolumeHandle,
+ int nCurVal);
bool vp_play_volume_popup_get_value(int *nCurVal);
bool vp_play_volume_popup_get_max_value(int *nMaxVal);
-bool vp_play_volume_popup_is_mute(volume_popup_handle pVolumeHandle, bool *bIsMute);
-
-
-
+bool vp_play_volume_popup_is_mute(volume_popup_handle pVolumeHandle,
+ bool * bIsMute);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#pragma once
#include <stdbool.h>
typedef void *volume_handle;
-typedef void (*NormalVolumeChangeCbFunc)(int nValue, void* pUserData);
+typedef void (*NormalVolumeChangeCbFunc) (int nValue, void *pUserData);
-volume_handle vp_play_volume_create(Evas_Object *pParent, void *pPlayerHandle, NormalVolumeChangeCbFunc pFunc);
+volume_handle vp_play_volume_create(Evas_Object * pParent,
+ void *pPlayerHandle,
+ NormalVolumeChangeCbFunc pFunc);
void vp_play_volume_destroy(volume_handle pVolumeHandle);
-bool vp_play_volume_realize(volume_handle pVolumeHandle, Evas_Object *pWin);
+bool vp_play_volume_realize(volume_handle pVolumeHandle,
+ Evas_Object * pWin);
bool vp_play_volume_unrealize(volume_handle pVolumeHandle);
-bool vp_play_volume_set_landscape_mode(volume_handle pVolumeHandle, bool bLandscape, Evas_Object *pWin);
-bool vp_play_volume_set_user_data(volume_handle pVolumeHandle, void *pUserData);
-bool vp_play_volume_is_realize(volume_handle pVolumeHandle, bool *bIsRealize);
+bool vp_play_volume_set_landscape_mode(volume_handle pVolumeHandle,
+ bool bLandscape,
+ Evas_Object * pWin);
+bool vp_play_volume_set_user_data(volume_handle pVolumeHandle,
+ void *pUserData);
+bool vp_play_volume_is_realize(volume_handle pVolumeHandle,
+ bool * bIsRealize);
bool vp_play_volume_increase_value(volume_handle pVolumeHandle);
bool vp_play_volume_decrease_value(volume_handle pVolumeHandle);
bool vp_play_volume_update_value(volume_handle pVolumeHandle);
-bool vp_play_volume_is_mute(volume_handle pVolumeHandle, bool *bIsMute);
+bool vp_play_volume_is_mute(volume_handle pVolumeHandle, bool * bIsMute);
int vp_play_volume_get_max_value(volume_handle pVolumeHandle);
int vp_play_volume_get_value(volume_handle pVolumeHandle);
bool vp_play_volume_set_value(volume_handle pVolumeHandle, int nVolumeVal);
bool vp_play_volume_set_mute_value(volume_handle pVolumeHandle);
int vp_play_volume_get_mute_value(volume_handle pVolumeHandle);
bool vp_play_volume_set_focus_in(volume_handle pVolumeHandle);
-bool vp_play_volume_set_mouse_callbacks(volume_handle pVolumeHandle, Evas_Object *pWin);
-bool vp_play_volume_unset_mouse_callbacks(volume_handle pVolumeHandle, Evas_Object *pWin);
+bool vp_play_volume_set_mouse_callbacks(volume_handle pVolumeHandle,
+ Evas_Object * pWin);
+bool vp_play_volume_unset_mouse_callbacks(volume_handle pVolumeHandle,
+ Evas_Object * pWin);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
#include "vp-play-type-define.h"
#define VP_BOOKMARK_GENGRID_DATA_KEY "vp.bookmark.gengrid"
#define VP_BOOKMARK_GENGRID_ITEM_DATA_KEY "vp.bookmark.gengrid.item"
-#define VP_BOOKMARK_PLAY_TIME_LENGTH 9
-#define VP_BOOKMARK_PLAY_TIME_FORMAT "02u:%02u:%02u"
+#define VP_BOOKMARK_PLAY_TIME_LENGTH 9
+#define VP_BOOKMARK_PLAY_TIME_FORMAT "02u:%02u:%02u"
#define VP_BOOKMARK_PLAY_TIME_ARGS(t) \
(t) / (60 * 60), \
((t) / 60) % 60, \
} BookmarkWidget;
static void _vp_play_bookmark_destory_handle(BookmarkWidget *
- pBookmarkWidget);
+ pBookmarkWidget);
static void _vp_play_bookmark_gengrid_item_update(BookmarkWidget *
- pBookmarkWidget);
+ pBookmarkWidget);
static void _vp_play_bookmark_gengrid_item_clear(BookmarkWidget *
- pBookmarkWidget);
+ pBookmarkWidget);
/* callbackk functions */
static void __vp_play_bookmark_delete_btn_clicked_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEvent)
+ Evas_Object * pObj,
+ void *pEvent)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
static void __vp_play_bookmark_delete_btn_press_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEvent)
+ Evas_Object * pObj,
+ void *pEvent)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
VideoLogError("press");
Evas_Object *pIcon = NULL;
- pIcon =
- elm_object_part_content_get(pObj, VP_PLAY_SWALLOW_BUTTON_ICON);
+ pIcon = elm_object_part_content_get(pObj, VP_PLAY_SWALLOW_BUTTON_ICON);
if (pIcon) {
evas_object_del(pIcon);
pIcon = NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_RESROUCE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_RESROUCE_EDJ_PATH);
free(path);
pIcon =
- vp_button_create_icon(pObj, edj_path,
- VP_PLAY_BOOKMARK_RES_DEL_PRESS);
+ vp_button_create_icon(pObj, edj_path,
+ VP_PLAY_BOOKMARK_RES_DEL_PRESS);
elm_object_part_content_set(pObj, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
BookmarkWidget *pBookmarkWidget =
- (BookmarkWidget *) evas_object_data_get(pObj,
- VP_BOOKMARK_GENGRID_ITEM_DATA_KEY);
+ (BookmarkWidget *) evas_object_data_get(pObj,
+ VP_BOOKMARK_GENGRID_ITEM_DATA_KEY);
if (pBookmarkWidget == NULL) {
VideoLogError("pBookmarkWidget is NULL");
return;
}
if (!vp_media_contents_bookmark_delete
- (pBookmarkWidget->szMediaID, pBookmarkItem->nPos)) {
+ (pBookmarkWidget->szMediaID, pBookmarkItem->nPos)) {
VideoLogError("vp_media_contents_bookmark_delete is fail");
return;
}
pBookmarkWidget->pItemList =
- g_list_remove(pBookmarkWidget->pItemList, (void *) pBookmarkItem);
+ g_list_remove(pBookmarkWidget->pItemList, (void *) pBookmarkItem);
VP_EVAS_ITEM_DEL(pBookmarkItem->pElmItem);
}
static void __vp_play_bookmark_delete_btn_unpress_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEvent)
+ Evas_Object * pObj,
+ void *pEvent)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
VideoLogError("unpress");
Evas_Object *pIcon = NULL;
- pIcon =
- elm_object_part_content_get(pObj, VP_PLAY_SWALLOW_BUTTON_ICON);
+ pIcon = elm_object_part_content_get(pObj, VP_PLAY_SWALLOW_BUTTON_ICON);
if (pIcon) {
evas_object_del(pIcon);
pIcon = NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_RESROUCE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_RESROUCE_EDJ_PATH);
free(path);
pIcon =
- vp_button_create_icon(pObj, edj_path,
- VP_PLAY_BOOKMARK_RES_DEL);
+ vp_button_create_icon(pObj, edj_path, VP_PLAY_BOOKMARK_RES_DEL);
elm_object_part_content_set(pObj, VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
}
static Evas_Object *__vp_play_bookmark_gengrid_icon_get_cb(const void
- *pUserData,
- Evas_Object *
- pObj,
- const char
- *pPart)
+ *pUserData,
+ Evas_Object *
+ pObj, const char
+ *pPart)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
BookmarkItem *pBookmarkItem = (BookmarkItem *) pUserData;
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_BOOKMARK_ITEM_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_BOOKMARK_ITEM_EDJ_PATH);
free(path);
if (!strcmp(pPart, "elm.swallow.icon")) {
Evas_Object *layout = NULL;
return NULL;
}
elm_layout_file_set(layout, edj_path,
- VP_PLAY_EDJ_GROUP_BOOKMARK_ITEM);
+ VP_PLAY_EDJ_GROUP_BOOKMARK_ITEM);
elm_bg_load_size_set(bg, VP_BOOKMARK_THUMB_WIDTH,
- VP_BOOKMARK_THUMB_HEIGHT);
+ VP_BOOKMARK_THUMB_HEIGHT);
elm_bg_file_set(bg, pBookmarkItem->szFilePath, NULL);
evas_object_size_hint_max_set(bg, VP_BOOKMARK_THUMB_WIDTH,
- VP_BOOKMARK_THUMB_HEIGHT);
+ VP_BOOKMARK_THUMB_HEIGHT);
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bg, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
elm_object_part_content_set(layout,
- VP_PLAY_SWALLOW_BOOKMARK_ITEM_ICON,
- bg);
+ VP_PLAY_SWALLOW_BOOKMARK_ITEM_ICON,
+ bg);
snprintf(buf, VP_BOOKMARK_PLAY_TIME_LENGTH,
- "%" VP_BOOKMARK_PLAY_TIME_FORMAT,
- VP_BOOKMARK_PLAY_TIME_ARGS(pBookmarkItem->nPos / 1000));
+ "%" VP_BOOKMARK_PLAY_TIME_FORMAT,
+ VP_BOOKMARK_PLAY_TIME_ARGS(pBookmarkItem->nPos / 1000));
elm_object_part_text_set(layout,
- VP_PLAY_SWALLOW_BOOKMARK_ITEM_TXT, buf);
+ VP_PLAY_SWALLOW_BOOKMARK_ITEM_TXT, buf);
evas_object_show(bg);
evas_object_show(layout);
} else if (!strcmp(pPart, "elm.swallow.end")) {
BookmarkWidget *pBookmarkWidget =
- (BookmarkWidget *) evas_object_data_get(pObj,
- VP_BOOKMARK_GENGRID_DATA_KEY);
+ (BookmarkWidget *) evas_object_data_get(pObj,
+ VP_BOOKMARK_GENGRID_DATA_KEY);
if (pBookmarkWidget == NULL) {
VideoLogError("pBookmarkWidget is NULL");
return NULL;
layout = elm_layout_add(pObj);
elm_layout_file_set(layout, edj_path,
- VP_PLAY_EDJ_GROUP_BOOKMARK_ITEM_END);
+ VP_PLAY_EDJ_GROUP_BOOKMARK_ITEM_END);
pBtn =
- vp_button_create(layout, "custom/icon_48_48", NULL,
- (Evas_Smart_Cb)
- __vp_play_bookmark_delete_btn_clicked_cb,
- (Evas_Smart_Cb)
- __vp_play_bookmark_delete_btn_press_cb,
- (Evas_Smart_Cb)
- __vp_play_bookmark_delete_btn_unpress_cb,
- (void *) pBookmarkItem);
+ vp_button_create(layout, "custom/icon_48_48", NULL,
+ (Evas_Smart_Cb)
+ __vp_play_bookmark_delete_btn_clicked_cb,
+ (Evas_Smart_Cb)
+ __vp_play_bookmark_delete_btn_press_cb,
+ (Evas_Smart_Cb)
+ __vp_play_bookmark_delete_btn_unpress_cb,
+ (void *) pBookmarkItem);
evas_object_data_set(pBtn, VP_BOOKMARK_GENGRID_ITEM_DATA_KEY,
- (void *) pBookmarkWidget);
- char edje_path[1024] = {0};
+ (void *) pBookmarkWidget);
+ char edje_path[1024] = { 0 };
char *pPath = app_get_resource_path();
- snprintf(edje_path, 1024, "%s%s/%s", pPath , "edje", VP_PLAY_RESROUCE_EDJ_PATH);
+ snprintf(edje_path, 1024, "%s%s/%s", pPath, "edje",
+ VP_PLAY_RESROUCE_EDJ_PATH);
free(pPath);
pIcon =
- vp_button_create_icon(pBtn, edje_path,
- VP_PLAY_BOOKMARK_RES_DEL);
+ vp_button_create_icon(pBtn, edje_path,
+ VP_PLAY_BOOKMARK_RES_DEL);
elm_object_part_content_set(pBtn, VP_PLAY_SWALLOW_BUTTON_ICON,
- pIcon);
+ pIcon);
elm_object_part_content_set(layout,
- VP_PLAY_SWALLOW_BOOKMARK_ITEM_DEL,
- pBtn);
+ VP_PLAY_SWALLOW_BOOKMARK_ITEM_DEL,
+ pBtn);
evas_object_show(pBtn);
evas_object_show(layout);
static void __vp_play_bookmark_longpress_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEvent)
+ Evas_Object * pObj,
+ void *pEvent)
{
VideoLogInfo("");
}
static void __vp_play_bookmark_scroll_cb(void *pUserData,
- Evas_Object *pObj, void *pEvent)
+ Evas_Object * pObj, void *pEvent)
{
return;
}
static void __vp_play_bookmark_change_cb(void *pUserData,
- Evas_Object *pObj, void *pEvent)
+ Evas_Object * pObj, void *pEvent)
{
if (pUserData == NULL) {
VideoLogError("bookmark data is NULL");
}
elm_gengrid_item_bring_in(pBookmarkWidget->pLastItem,
- ELM_GENGRID_ITEM_SCROLLTO_MIDDLE);
+ ELM_GENGRID_ITEM_SCROLLTO_MIDDLE);
pBookmarkWidget->pLastItem = NULL;
}
static void __vp_play_bookmark_pressed_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEvent)
+ Evas_Object * pObj, void *pEvent)
{
if (pUserData == NULL) {
VideoLogError("bookmark data is NULL");
static void __vp_play_bookmark_released_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEvent)
+ Evas_Object * pObj,
+ void *pEvent)
{
if (pUserData == NULL) {
VideoLogError("bookmark data is NULL");
static void __vp_play_bookmark_item_select_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEvent)
+ Evas_Object * pObj,
+ void *pEvent)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
BookmarkWidget *pBookmarkWidget = (BookmarkWidget *) pUserData;
BookmarkItem *pBookmarkItem = NULL;
pBookmarkItem =
- (BookmarkItem *) elm_object_item_data_get((Elm_Object_Item *)
- pEvent);
+ (BookmarkItem *) elm_object_item_data_get((Elm_Object_Item *)
+ pEvent);
if (pBookmarkItem == NULL) {
VideoLogError("pBookmarkItem is NULL");
return;
} else {
if (pBookmarkWidget->pSelectCb) {
pBookmarkWidget->pSelectCb(pBookmarkItem->nPos,
- pBookmarkItem->szFilePath,
- pBookmarkWidget->pUserData);
+ pBookmarkItem->szFilePath,
+ pBookmarkWidget->pUserData);
}
}
}
static void __vp_play_bookmark_btn_clicked_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEvent)
+ Evas_Object * pObj,
+ void *pEvent)
{
if (pUserData == NULL) {
VideoLogError("bookmark data is NULL");
}
static void __vp_play_bookmark_btn_press_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEvent)
+ Evas_Object * pObj,
+ void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
if (pBookmarkWidget->pAddButton == pObj) {
Evas_Object *pIcon = NULL;
pIcon =
- elm_object_part_content_get(pBookmarkWidget->pAddButton,
- VP_PLAY_SWALLOW_BUTTON_ICON);
+ elm_object_part_content_get(pBookmarkWidget->pAddButton,
+ VP_PLAY_SWALLOW_BUTTON_ICON);
if (pIcon) {
evas_object_del(pIcon);
pIcon = NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_RESROUCE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_RESROUCE_EDJ_PATH);
free(path);
pIcon =
- vp_button_create_icon(pBookmarkWidget->pAddButton,
- edj_path,
- VP_PLAY_BOOKMARK_RES_ADD_PRESS);
+ vp_button_create_icon(pBookmarkWidget->pAddButton,
+ edj_path,
+ VP_PLAY_BOOKMARK_RES_ADD_PRESS);
elm_object_part_content_set(pBookmarkWidget->pAddButton,
- VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
}
}
static void __vp_play_bookmark_btn_unpress_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEvent)
+ Evas_Object * pObj,
+ void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
if (pBookmarkWidget->pAddButton == pObj) {
Evas_Object *pIcon = NULL;
pIcon =
- elm_object_part_content_get(pBookmarkWidget->pAddButton,
- VP_PLAY_SWALLOW_BUTTON_ICON);
+ elm_object_part_content_get(pBookmarkWidget->pAddButton,
+ VP_PLAY_SWALLOW_BUTTON_ICON);
if (pIcon) {
evas_object_del(pIcon);
pIcon = NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_RESROUCE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_RESROUCE_EDJ_PATH);
free(path);
pIcon =
- vp_button_create_icon(pBookmarkWidget->pAddButton,
- edj_path,
- VP_PLAY_BOOKMARK_RES_ADD);
+ vp_button_create_icon(pBookmarkWidget->pAddButton,
+ edj_path, VP_PLAY_BOOKMARK_RES_ADD);
elm_object_part_content_set(pBookmarkWidget->pAddButton,
- VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
}
}
/* internal functions */
static void _vp_play_bookmark_destory_handle(BookmarkWidget *
- pBookmarkWidget)
+ pBookmarkWidget)
{
if (pBookmarkWidget == NULL) {
VideoLogError("pBookmarkWidget is NULL");
VP_FREE(pBookmarkWidget);
}
-static Elm_Object_Item *_vp_play_bookmark_find_before_item(GList *pList,
- int nPosition,
- int *nPos)
+static Elm_Object_Item *_vp_play_bookmark_find_before_item(GList * pList,
+ int nPosition,
+ int *nPos)
{
if (pList == NULL) {
VideoLogError("pBookmarkItem list is NULL");
if (pBookmarkItem) {
if (pBookmarkItem->nPos > nPosition) {
VideoLogError("Item : %d , nPosition : %d",
- pBookmarkItem->nPos, nPosition);
+ pBookmarkItem->nPos, nPosition);
*nPos = idx + 1;
return pBookmarkItem->pElmItem;
}
}
-static gint __vp_play_bookmark_compare_cb(BookmarkItem *pItem1,
- BookmarkItem *pItem2)
+static gint __vp_play_bookmark_compare_cb(BookmarkItem * pItem1,
+ BookmarkItem * pItem2)
{
if (pItem1 == NULL) {
VideoLogError("pItem1 is NULL");
static void _vp_play_bookmark_gengrid_item_append(BookmarkWidget *
- pBookmarkWidget,
- BookmarkItem *pItem)
+ pBookmarkWidget,
+ BookmarkItem * pItem)
{
if (pBookmarkWidget == NULL) {
VideoLogError("pBookmarkWidget is NULL");
pBookmarkWidget->pItemClass->item_style = "bookmark";
pBookmarkWidget->pItemClass->func.text_get = NULL;
pBookmarkWidget->pItemClass->func.content_get =
- (void *) __vp_play_bookmark_gengrid_icon_get_cb;
+ (void *) __vp_play_bookmark_gengrid_icon_get_cb;
pBookmarkWidget->pItemClass->func.state_get = NULL;
pBookmarkWidget->pItemClass->func.del = NULL;
Elm_Object_Item *pBeforeItem = NULL;
int nPos = 0;
pBeforeItem =
- _vp_play_bookmark_find_before_item(pBookmarkWidget->pItemList,
- pItem->nPos, &nPos);
+ _vp_play_bookmark_find_before_item(pBookmarkWidget->pItemList,
+ pItem->nPos, &nPos);
if (pBeforeItem) {
pItem->pElmItem =
- elm_gengrid_item_insert_before(pBookmarkWidget->pGengrid,
- pBookmarkWidget->pItemClass,
- (void *) pItem, pBeforeItem,
- __vp_play_bookmark_item_select_cb,
- (void *) pBookmarkWidget);
+ elm_gengrid_item_insert_before(pBookmarkWidget->pGengrid,
+ pBookmarkWidget->pItemClass,
+ (void *) pItem, pBeforeItem,
+ __vp_play_bookmark_item_select_cb,
+ (void *) pBookmarkWidget);
} else {
pItem->pElmItem =
- elm_gengrid_item_append(pBookmarkWidget->pGengrid,
- pBookmarkWidget->pItemClass,
- (void *) pItem,
- __vp_play_bookmark_item_select_cb,
- (void *) pBookmarkWidget);
+ elm_gengrid_item_append(pBookmarkWidget->pGengrid,
+ pBookmarkWidget->pItemClass,
+ (void *) pItem,
+ __vp_play_bookmark_item_select_cb,
+ (void *) pBookmarkWidget);
}
pBookmarkWidget->pLastItem = pItem->pElmItem;
pBookmarkWidget->pItemList =
- g_list_insert_sorted(pBookmarkWidget->pItemList, pItem,
- (GCompareFunc)
- __vp_play_bookmark_compare_cb);
+ g_list_insert_sorted(pBookmarkWidget->pItemList, pItem,
+ (GCompareFunc)
+ __vp_play_bookmark_compare_cb);
}
static void _vp_play_bookmark_gengrid_item_update(BookmarkWidget *
- pBookmarkWidget)
+ pBookmarkWidget)
{
if (pBookmarkWidget == NULL) {
VideoLogError("pBookmarkWidget is NULL");
for (i = 0; i < nCount; i++) {
BookmarkItem *pBookmarkItem = NULL;
pBookmarkItem =
- (BookmarkItem *) g_list_nth_data(pBookmarkWidget->pItemList,
- i);
+ (BookmarkItem *) g_list_nth_data(pBookmarkWidget->pItemList,
+ i);
if (pBookmarkItem) {
if (pBookmarkItem->pElmItem) {
elm_gengrid_item_update(pBookmarkItem->pElmItem);
elm_gengrid_item_selected_set(pBookmarkItem->pElmItem,
- EINA_FALSE);
+ EINA_FALSE);
}
}
}
}
static void _vp_play_bookmark_gengrid_item_clear(BookmarkWidget *
- pBookmarkWidget)
+ pBookmarkWidget)
{
if (pBookmarkWidget == NULL) {
VideoLogError("pBookmarkWidget is NULL");
BookmarkItem *pBookmarkItem = NULL;
pBookmarkItem =
- (BookmarkItem *) g_list_nth_data(pBookmarkWidget->pItemList,
- i);
+ (BookmarkItem *) g_list_nth_data(pBookmarkWidget->pItemList,
+ i);
if (pBookmarkItem) {
VP_FREE(pBookmarkItem->szFilePath);
VP_FREE(pBookmarkItem);
}
-static Evas_Object *_vp_play_bookmark_create_layout(Evas_Object *pParent)
+static Evas_Object *_vp_play_bookmark_create_layout(Evas_Object * pParent)
{
if (!pParent) {
VideoLogError("Parent is NULL");
VideoLogError("elm_layout_add object is NULL");
return NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_BOOKMARK_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_BOOKMARK_EDJ_PATH);
free(path);
- bRet =
- elm_layout_file_set(pObj, edj_path,
- VP_PLAY_EDJ_GROUP_BOOKMARK);
+ bRet = elm_layout_file_set(pObj, edj_path, VP_PLAY_EDJ_GROUP_BOOKMARK);
if (bRet != EINA_TRUE) {
VideoLogError("elm_layout_file_set fail");
return NULL;
}
-static Evas_Object *_vp_play_bookmark_create_gengrid(Evas_Object *
- pParent)
+static Evas_Object *_vp_play_bookmark_create_gengrid(Evas_Object * pParent)
{
if (!pParent) {
VideoLogError("Parent is NULL");
}
elm_gengrid_item_size_set(pObj, VP_BOOKMARK_ITEM_WIDTH,
- VP_BOOKMARK_ITEM_HEIGHT);
+ VP_BOOKMARK_ITEM_HEIGHT);
elm_gengrid_align_set(pObj, 0.0, 0.0);
elm_gengrid_horizontal_set(pObj, EINA_TRUE);
elm_gengrid_multi_select_set(pObj, EINA_TRUE);
evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_show(pObj);
return pObj;
}
-static void _vp_play_bookmark_layout_del_cb(void *data, Evas *e,
- Evas_Object *obj,
- void *event_info)
+static void _vp_play_bookmark_layout_del_cb(void *data, Evas * e,
+ Evas_Object * obj,
+ void *event_info)
{
if (data == NULL) {
VideoLogError("pBookmarkWidget is NULL");
pBookmarkWidget->pGengrid = NULL;
}
-static bool _vp_play_bookmark_init_layout(BookmarkWidget *
- pBookmarkWidget)
+static bool _vp_play_bookmark_init_layout(BookmarkWidget * pBookmarkWidget)
{
if (pBookmarkWidget == NULL) {
VideoLogError("pBookmarkWidget is NULL");
return FALSE;
}
evas_object_event_callback_add(pBookmarkWidget->pLayout,
- EVAS_CALLBACK_DEL,
- _vp_play_bookmark_layout_del_cb,
- (void *) pBookmarkWidget);
+ EVAS_CALLBACK_DEL,
+ _vp_play_bookmark_layout_del_cb,
+ (void *) pBookmarkWidget);
pBookmarkWidget->pGengrid =
- _vp_play_bookmark_create_gengrid(pBookmarkWidget->pLayout);
+ _vp_play_bookmark_create_gengrid(pBookmarkWidget->pLayout);
if (pBookmarkWidget->pGengrid == NULL) {
VideoLogError("_vp_play_bookmark_create_gengrid is fail");
return FALSE;
}
evas_object_data_set(pBookmarkWidget->pGengrid,
- VP_BOOKMARK_GENGRID_DATA_KEY,
- (void *) pBookmarkWidget);
+ VP_BOOKMARK_GENGRID_DATA_KEY,
+ (void *) pBookmarkWidget);
pBookmarkWidget->pAddButton =
- vp_button_create(pParent, "custom/icon_44_44", NULL,
- (Evas_Smart_Cb)
- __vp_play_bookmark_btn_clicked_cb,
- (Evas_Smart_Cb) __vp_play_bookmark_btn_press_cb,
- (Evas_Smart_Cb)
- __vp_play_bookmark_btn_unpress_cb,
- (void *) pBookmarkWidget);
+ vp_button_create(pParent, "custom/icon_44_44", NULL,
+ (Evas_Smart_Cb)
+ __vp_play_bookmark_btn_clicked_cb,
+ (Evas_Smart_Cb) __vp_play_bookmark_btn_press_cb,
+ (Evas_Smart_Cb)
+ __vp_play_bookmark_btn_unpress_cb,
+ (void *) pBookmarkWidget);
if (!pBookmarkWidget->pAddButton) {
VideoLogError("elm_button_add is fail");
return FALSE;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_RESROUCE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_RESROUCE_EDJ_PATH);
free(path);
Evas_Object *pIcon = NULL;
pIcon =
- vp_button_create_icon(pBookmarkWidget->pAddButton,
- edj_path,
- VP_PLAY_BOOKMARK_RES_ADD);
+ vp_button_create_icon(pBookmarkWidget->pAddButton,
+ edj_path, VP_PLAY_BOOKMARK_RES_ADD);
elm_object_part_content_set(pBookmarkWidget->pAddButton,
- VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
+ VP_PLAY_SWALLOW_BUTTON_ICON, pIcon);
elm_object_part_content_set(pBookmarkWidget->pLayout,
- VP_PLAY_SWALLOW_BOOKMARK_ADD_BUTTON,
- pBookmarkWidget->pAddButton);
+ VP_PLAY_SWALLOW_BOOKMARK_ADD_BUTTON,
+ pBookmarkWidget->pAddButton);
elm_object_part_content_set(pBookmarkWidget->pLayout,
- VP_PLAY_SWALLOW_BOOKMARK_LIST,
- pBookmarkWidget->pGengrid);
+ VP_PLAY_SWALLOW_BOOKMARK_LIST,
+ pBookmarkWidget->pGengrid);
evas_object_smart_callback_add(pBookmarkWidget->pGengrid,
- "longpressed",
- __vp_play_bookmark_longpress_cb,
- (void *) pBookmarkWidget);
+ "longpressed",
+ __vp_play_bookmark_longpress_cb,
+ (void *) pBookmarkWidget);
evas_object_smart_callback_add(pBookmarkWidget->pGengrid, "scroll",
- __vp_play_bookmark_scroll_cb,
- (void *) pBookmarkWidget);
+ __vp_play_bookmark_scroll_cb,
+ (void *) pBookmarkWidget);
evas_object_smart_callback_add(pBookmarkWidget->pGengrid, "changed",
- __vp_play_bookmark_change_cb,
- (void *) pBookmarkWidget);
+ __vp_play_bookmark_change_cb,
+ (void *) pBookmarkWidget);
evas_object_smart_callback_add(pBookmarkWidget->pGengrid, "pressed",
- __vp_play_bookmark_pressed_cb,
- (void *) pBookmarkWidget);
+ __vp_play_bookmark_pressed_cb,
+ (void *) pBookmarkWidget);
evas_object_smart_callback_add(pBookmarkWidget->pGengrid, "released",
- __vp_play_bookmark_released_cb,
- (void *) pBookmarkWidget);
+ __vp_play_bookmark_released_cb,
+ (void *) pBookmarkWidget);
return TRUE;
}
/* external functions */
-bookmark_handle vp_play_bookmark_create(Evas_Object *pParent)
+bookmark_handle vp_play_bookmark_create(Evas_Object * pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
int nCnt = 0;
int idx = 0;
if (!vp_media_contents_bookmark_list_get
- (pBookmarkWidget->szMediaID, &pList)) {
+ (pBookmarkWidget->szMediaID, &pList)) {
VideoLogError("vp_media_contents_bookmark_list_get is Fail");
return FALSE;
}
char *szPath = NULL;
int nPos = 0;
if (!vp_media_contents_bookmark_get_item_info
- (pItem, &szPath, &nPos)) {
+ (pItem, &szPath, &nPos)) {
VideoLogWarning
- ("vp_media_contents_bookmark_get_item_info is Fail");
+ ("vp_media_contents_bookmark_get_item_info is Fail");
continue;
}
VP_FREE(szPath);
_vp_play_bookmark_gengrid_item_append(pBookmarkWidget,
- pBookmarkItem);
+ pBookmarkItem);
}
}
}
bool vp_play_bookmark_is_realize(bookmark_handle pWidgetHandle,
- bool *bIsRealize)
+ bool * bIsRealize)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_bookmark_set_capture_callback(bookmark_handle pWidgetHandle,
- BookmarkCaptureStartCbFunc
- func)
+ BookmarkCaptureStartCbFunc func)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_bookmark_set_item_select_callback(bookmark_handle
- pWidgetHandle,
- BookmarkItemSelectCbFunc
- func)
+ pWidgetHandle,
+ BookmarkItemSelectCbFunc
+ func)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_bookmark_set_user_param(bookmark_handle pWidgetHandle,
- void *pUserData)
+ void *pUserData)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_bookmark_set_media_url(bookmark_handle pWidgetHandle,
- const char *szMediaURL)
+ const char *szMediaURL)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
VP_STRDUP(pBookmarkWidget->szMediaURL, szMediaURL);
if (!vp_media_contents_get_video_id
- (szMediaURL, &(pBookmarkWidget->szMediaID))) {
+ (szMediaURL, &(pBookmarkWidget->szMediaID))) {
VideoLogError("vp_media_contents_get_video_id is fail");
return FALSE;
}
}
bool vp_play_bookmark_set_edit_mode(bookmark_handle pWidgetHandle,
- bool bEditMode)
+ bool bEditMode)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_bookmark_get_edit_mode(bookmark_handle pWidgetHandle,
- bool *bEditMode)
+ bool * bEditMode)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_bookmark_get_pressed_status(bookmark_handle pWidgetHandle,
- bool *bPressed)
+ bool * bPressed)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_bookmark_insert_item(bookmark_handle pWidgetHandle,
- const char *szBookmarkURL, int nPos)
+ const char *szBookmarkURL, int nPos)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
BookmarkWidget *pBookmarkWidget = (BookmarkWidget *) pWidgetHandle;
if (!vp_media_contents_bookmark_insert
- (pBookmarkWidget->szMediaID, nPos, szBookmarkURL)) {
+ (pBookmarkWidget->szMediaID, nPos, szBookmarkURL)) {
VideoLogError("vp_media_contents_bookmark_insert is fail");
return FALSE;
}
}
bool vp_play_bookmark_get_item_count(bookmark_handle pWidgetHandle,
- int *nCount)
+ int *nCount)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <pthread.h>
} BrightnessWidget;
static void _vp_play_brightness_destory_handle(BrightnessWidget *
- pBrightnessWidget);
-static double _vp_play_brightness_get_mouse_pos_ratio(Evas_Object *pObj,
- bool bLandscape,
- int nCurY);
+ pBrightnessWidget);
+static double _vp_play_brightness_get_mouse_pos_ratio(Evas_Object * pObj,
+ bool bLandscape,
+ int nCurY);
static void _vp_play_brightness_set_value(BrightnessWidget *
- pBrightnessWidget, int nValue);
+ pBrightnessWidget, int nValue);
static void _vp_play_brightness_create_timer(BrightnessWidget *
- pBrightnessWidget);
+ pBrightnessWidget);
/* callback functions */
-static void __vp_brightness_mouse_down_cb(void *pUserData, Evas *e,
- Evas_Object *pObj,
- void *pEvent)
+static void __vp_brightness_mouse_down_cb(void *pUserData, Evas * e,
+ Evas_Object * pObj, void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
}
Evas_Event_Mouse_Down *pMouseDownEvent =
- (Evas_Event_Mouse_Down *) pEvent;
+ (Evas_Event_Mouse_Down *) pEvent;
double dRatio =
- _vp_play_brightness_get_mouse_pos_ratio(pBrightnessWidget->
- pLayout,
- pBrightnessWidget->
- bLandscape,
- pMouseDownEvent->canvas.
- y);
+ _vp_play_brightness_get_mouse_pos_ratio(pBrightnessWidget->pLayout,
+ pBrightnessWidget->bLandscape,
+ pMouseDownEvent->canvas.y);
int nCurVal =
- pBrightnessWidget->nMaxVal -
- (dRatio * pBrightnessWidget->nMaxVal);
+ pBrightnessWidget->nMaxVal - (dRatio * pBrightnessWidget->nMaxVal);
_vp_play_brightness_set_value(pBrightnessWidget, nCurVal);
pBrightnessWidget->bMouseDown = TRUE;
}
-static void __vp_brightness_mouse_up_cb(void *pUserData, Evas *e,
- Evas_Object *pObj, void *pEvent)
+static void __vp_brightness_mouse_up_cb(void *pUserData, Evas * e,
+ Evas_Object * pObj, void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
}
double dRatio =
- _vp_play_brightness_get_mouse_pos_ratio(pBrightnessWidget->
- pLayout,
- pBrightnessWidget->
- bLandscape,
- pMouseUpEvent->canvas.y);
+ _vp_play_brightness_get_mouse_pos_ratio(pBrightnessWidget->pLayout,
+ pBrightnessWidget->bLandscape,
+ pMouseUpEvent->canvas.y);
int nCurVal =
- pBrightnessWidget->nMaxVal -
- (dRatio * pBrightnessWidget->nMaxVal);
+ pBrightnessWidget->nMaxVal - (dRatio * pBrightnessWidget->nMaxVal);
_vp_play_brightness_set_value(pBrightnessWidget, nCurVal);
_vp_play_brightness_create_timer(pBrightnessWidget);
pBrightnessWidget->bMouseDown = FALSE;
}
-static void __vp_brightness_mouse_move_cb(void *pUserData, Evas *e,
- Evas_Object *pObj,
- void *pEvent)
+static void __vp_brightness_mouse_move_cb(void *pUserData, Evas * e,
+ Evas_Object * pObj, void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
BrightnessWidget *pBrightnessWidget = (BrightnessWidget *) pUserData;
Evas_Event_Mouse_Move *pMouseMoveEvent =
- (Evas_Event_Mouse_Move *) pEvent;
+ (Evas_Event_Mouse_Move *) pEvent;
if (pBrightnessWidget->bIsRealize == FALSE
- || pBrightnessWidget->bMouseDown == FALSE) {
+ || pBrightnessWidget->bMouseDown == FALSE) {
return;
}
double dRatio =
- _vp_play_brightness_get_mouse_pos_ratio(pBrightnessWidget->
- pLayout,
- pBrightnessWidget->
- bLandscape,
- pMouseMoveEvent->cur.
- canvas.y);
+ _vp_play_brightness_get_mouse_pos_ratio(pBrightnessWidget->pLayout,
+ pBrightnessWidget->bLandscape,
+ pMouseMoveEvent->
+ cur.canvas.y);
int nCurVal =
- pBrightnessWidget->nMaxVal -
- (dRatio * pBrightnessWidget->nMaxVal);
+ pBrightnessWidget->nMaxVal - (dRatio * pBrightnessWidget->nMaxVal);
if (nCurVal != pBrightnessWidget->nCurVal) {
_vp_play_brightness_set_value(pBrightnessWidget, nCurVal);
VP_EVAS_TIMER_DEL(pBrightnessWidget->pHideTimer);
if (!vp_play_brightness_unrealize
- ((brightness_handle) pBrightnessWidget)) {
+ ((brightness_handle) pBrightnessWidget)) {
VideoLogWarning("vp_play_brightness_unrealize is fail");
}
/* internal functions */
static void _vp_play_brightness_destory_handle(BrightnessWidget *
- pBrightnessWidget)
+ pBrightnessWidget)
{
if (pBrightnessWidget == NULL) {
VideoLogError("pBrightnessWidget is NULL");
VP_FREE(pBrightnessWidget);
}
-static double _vp_play_brightness_get_mouse_pos_ratio(Evas_Object *pObj,
- bool bLandscape,
- int nCurY)
+static double _vp_play_brightness_get_mouse_pos_ratio(Evas_Object * pObj,
+ bool bLandscape,
+ int nCurY)
{
if (pObj == NULL) {
VideoLogError("pObj is NULL");
static void _vp_play_brightness_set_widget_position(BrightnessWidget *
- pBrightnessWidget)
+ pBrightnessWidget)
{
if (pBrightnessWidget == NULL) {
VideoLogError("pBrightnessWidget is NULL");
int nHeight = 0;
elm_win_screen_size_get(pBrightnessWidget->pParent, NULL, NULL,
- &nWidth, &nHeight);
+ &nWidth, &nHeight);
if (bLandscape) {
evas_object_move(pBrightnessWidget->pLayout,
- nHeight -
- VP_BRIGHTNESS_LANDSCAPE_POS_X * VP_SCALE,
- VP_BRIGHTNESS_LANDSCAPE_POS_Y * VP_SCALE);
+ nHeight -
+ VP_BRIGHTNESS_LANDSCAPE_POS_X * VP_SCALE,
+ VP_BRIGHTNESS_LANDSCAPE_POS_Y * VP_SCALE);
} else {
evas_object_move(pBrightnessWidget->pLayout,
- nWidth - VP_BRIGHTNESS_PORTRAIT_POS_X * VP_SCALE,
- VP_BRIGHTNESS_PORTRAIT_POS_Y * VP_SCALE);
+ nWidth - VP_BRIGHTNESS_PORTRAIT_POS_X * VP_SCALE,
+ VP_BRIGHTNESS_PORTRAIT_POS_Y * VP_SCALE);
}
}
static void _vp_play_brightness_update_icon(BrightnessWidget *
- pBrightnessWidget,
- double nValueRatio)
+ pBrightnessWidget,
+ double nValueRatio)
{
if (pBrightnessWidget == NULL) {
VideoLogError("pBrightnessWidget is NULL");
VideoLogError("pBrightnessWidget->pIcon is NULL");
return;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_RESROUCE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_RESROUCE_EDJ_PATH);
free(path);
gchar *popup_path = NULL;
int req = 0;
if (pBrightnessWidget->nCurVal == pBrightnessWidget->nMaxVal) {
req = VP_BRIGHTNESS_ICON_NUM - 1;
} else if (pBrightnessWidget->nCurVal > pBrightnessWidget->nMinVal) {
- req = (int)(nValueRatio * (VP_BRIGHTNESS_ICON_NUM - 2) + 1);
+ req = (int) (nValueRatio * (VP_BRIGHTNESS_ICON_NUM - 2) + 1);
}
popup_path = g_strdup_printf(VP_PLAY_BRIGHTNESS_POPUP_ICON_PATH, req);
- elm_image_file_set(pBrightnessWidget->pIcon,
- edj_path, popup_path);
+ elm_image_file_set(pBrightnessWidget->pIcon, edj_path, popup_path);
g_free(popup_path);
}
static void _vp_play_brightness_update_value(BrightnessWidget *
- pBrightnessWidget)
+ pBrightnessWidget)
{
if (pBrightnessWidget == NULL) {
VideoLogError("pBrightnessWidget is NULL");
char szPlayingTime[VP_BRIGHTNESS_TEXT_MAX_LEN] = { 0, };
snprintf(szPlayingTime, VP_BRIGHTNESS_TEXT_MAX_LEN, "%d",
- pBrightnessWidget->nCurVal);
+ pBrightnessWidget->nCurVal);
nValueRatio =
- ((double) pBrightnessWidget->nCurVal /
- (double)(pBrightnessWidget->nMaxVal -
- pBrightnessWidget->nMinVal));
+ ((double) pBrightnessWidget->nCurVal /
+ (double) (pBrightnessWidget->nMaxVal -
+ pBrightnessWidget->nMinVal));
if (!edje_object_part_drag_value_set
- (_EDJ(pBrightnessWidget->pLayout),
- VP_PLAY_SWALLOW_BRIGHTNESS_POPUP_DRAG_RECT, 0.0, nValueRatio)) {
+ (_EDJ(pBrightnessWidget->pLayout),
+ VP_PLAY_SWALLOW_BRIGHTNESS_POPUP_DRAG_RECT, 0.0, nValueRatio)) {
VideoLogWarning("Drag value set fail : %lf", nValueRatio);
}
elm_object_part_text_set(pBrightnessWidget->pLayout,
- VP_PLAY_SWALLOW_BRIGHTNESS_POPUP_VALUE_LABEL,
- szPlayingTime);
+ VP_PLAY_SWALLOW_BRIGHTNESS_POPUP_VALUE_LABEL,
+ szPlayingTime);
/*update brightness icon */
_vp_play_brightness_update_icon(pBrightnessWidget, nValueRatio);
}
static void _vp_play_brightness_create_timer(BrightnessWidget *
- pBrightnessWidget)
+ pBrightnessWidget)
{
if (pBrightnessWidget == NULL) {
VideoLogError("pBrightnessWidgetis NULL");
VP_EVAS_TIMER_DEL(pBrightnessWidget->pHideTimer);
pBrightnessWidget->pHideTimer =
- ecore_timer_add(VP_BRIGHTNESS_HIDE_LAYOUT_TIMER_INTERVAL,
- __vp_brightness_hide_timer_cb,
- (void *) pBrightnessWidget);
+ ecore_timer_add(VP_BRIGHTNESS_HIDE_LAYOUT_TIMER_INTERVAL,
+ __vp_brightness_hide_timer_cb,
+ (void *) pBrightnessWidget);
}
static Eina_Bool __vp_brightness_popup_device_timer_cb(void *pUserData)
}
static void _vp_play_brightness_set_value(BrightnessWidget *
- pBrightnessWidget, int nValue)
+ pBrightnessWidget, int nValue)
{
if (pBrightnessWidget == NULL) {
VideoLogError("pBrightnessWidget is NULL");
if (pBrightnessWidget->pDeviceTimer == NULL) {
pBrightnessWidget->pDeviceTimer = ecore_timer_add(0.1,
- __vp_brightness_popup_device_timer_cb,
- (void *)
- pBrightnessWidget);
+ __vp_brightness_popup_device_timer_cb,
+ (void *)
+ pBrightnessWidget);
}
}
static Evas_Object *_vp_play_brightness_create_layout(Evas_Object *
- pParent)
+ pParent)
{
if (!pParent) {
VideoLogError("Parent is NULL");
VideoLogError("elm_layout_add object is NULL");
return NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_BRIGHTNESS_POPUP_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_BRIGHTNESS_POPUP_EDJ_PATH);
free(path);
bRet =
- elm_layout_file_set(pObj, edj_path,
- VP_PLAY_EDJ_GROUP_BRIGHTNESS_POPUP);
+ elm_layout_file_set(pObj, edj_path,
+ VP_PLAY_EDJ_GROUP_BRIGHTNESS_POPUP);
if (bRet != EINA_TRUE) {
VideoLogError("elm_layout_file_set fail");
return NULL;
return pObj;
}
-static Evas_Object *_vp_play_brightness_create_icon(Evas_Object *pParent)
+static Evas_Object *_vp_play_brightness_create_icon(Evas_Object * pParent)
{
if (!pParent) {
VideoLogError("Parent is NULL");
Evas_Object *pIcon = elm_image_add(pParent);
evas_object_size_hint_weight_set(pIcon, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(pIcon, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pIcon, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_part_content_set(pParent,
- VP_PLAY_SWALLOW_BRIGHTNESS_POPUP_ICON,
- pIcon);
+ VP_PLAY_SWALLOW_BRIGHTNESS_POPUP_ICON,
+ pIcon);
evas_object_show(pIcon);
return pIcon;
}
static bool _vp_play_brightness_init_layout(BrightnessWidget *
- pBrightnessWidget)
+ pBrightnessWidget)
{
if (pBrightnessWidget == NULL) {
VideoLogError("pBrightnessWidget is NULL");
Evas_Object *pParent = pBrightnessWidget->pParent;
pBrightnessWidget->pLayout =
- _vp_play_brightness_create_layout(pParent);
+ _vp_play_brightness_create_layout(pParent);
if (pBrightnessWidget->pLayout == NULL) {
VideoLogError("_vp_play_brightness_create_layout is fail");
return FALSE;
}
pBrightnessWidget->pIcon =
- _vp_play_brightness_create_icon(pBrightnessWidget->pLayout);
+ _vp_play_brightness_create_icon(pBrightnessWidget->pLayout);
if (pBrightnessWidget->pIcon == NULL) {
VideoLogError("_vp_play_brightness_create_icon is fail");
return FALSE;
}
evas_object_event_callback_add(pBrightnessWidget->pLayout,
- EVAS_CALLBACK_MOUSE_DOWN,
- __vp_brightness_mouse_down_cb,
- (void *) pBrightnessWidget);
+ EVAS_CALLBACK_MOUSE_DOWN,
+ __vp_brightness_mouse_down_cb,
+ (void *) pBrightnessWidget);
evas_object_event_callback_add(pBrightnessWidget->pLayout,
- EVAS_CALLBACK_MOUSE_UP,
- __vp_brightness_mouse_up_cb,
- (void *) pBrightnessWidget);
+ EVAS_CALLBACK_MOUSE_UP,
+ __vp_brightness_mouse_up_cb,
+ (void *) pBrightnessWidget);
evas_object_event_callback_add(pBrightnessWidget->pLayout,
- EVAS_CALLBACK_MOUSE_MOVE,
- __vp_brightness_mouse_move_cb,
- (void *) pBrightnessWidget);
+ EVAS_CALLBACK_MOUSE_MOVE,
+ __vp_brightness_mouse_move_cb,
+ (void *) pBrightnessWidget);
return TRUE;
}
/* external functions */
-brightness_handle vp_play_brightness_create(Evas_Object *pParent)
+brightness_handle vp_play_brightness_create(Evas_Object * pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
}
pBrightnessWidget->nBrightnessUnit =
- pBrightnessWidget->nMaxVal / VP_BRIGHTNESS_BRIGHTNESS_UNIT;
+ pBrightnessWidget->nMaxVal / VP_BRIGHTNESS_BRIGHTNESS_UNIT;
if (!vp_device_get_brightness(&(pBrightnessWidget->nCurVal))) {
VideoLogError("vp_device_get_brightness fail");
}
BrightnessWidget *pBrightnessWidget =
- (BrightnessWidget *) pBrightnessHandle;
+ (BrightnessWidget *) pBrightnessHandle;
_vp_play_brightness_destory_handle(pBrightnessWidget);
}
}
BrightnessWidget *pBrightnessWidget =
- (BrightnessWidget *) pBrightnessHandle;
+ (BrightnessWidget *) pBrightnessHandle;
pBrightnessWidget->bIsRealize = TRUE;
_vp_play_brightness_set_widget_position(pBrightnessWidget);
_vp_play_brightness_set_value(pBrightnessWidget,
- pBrightnessWidget->nCurVal);
+ pBrightnessWidget->nCurVal);
evas_object_show(pBrightnessWidget->pLayout);
}
BrightnessWidget *pBrightnessWidget =
- (BrightnessWidget *) pBrightnessHandle;
+ (BrightnessWidget *) pBrightnessHandle;
pBrightnessWidget->bIsRealize = FALSE;
}
bool vp_play_brightness_set_landscape_mode(brightness_handle
- pBrightnessHandle,
- bool bLandscape)
+ pBrightnessHandle,
+ bool bLandscape)
{
if (pBrightnessHandle == NULL) {
VideoLogError("pBrightnessHandle is NULL");
}
BrightnessWidget *pBrightnessWidget =
- (BrightnessWidget *) pBrightnessHandle;
+ (BrightnessWidget *) pBrightnessHandle;
pBrightnessWidget->bLandscape = bLandscape;
}
bool vp_play_brightness_is_realize(brightness_handle pBrightnessHandle,
- bool *bIsRealize)
+ bool * bIsRealize)
{
if (pBrightnessHandle == NULL) {
VideoLogError("pBrightnessHandle is NULL");
}
BrightnessWidget *pBrightnessWidget =
- (BrightnessWidget *) pBrightnessHandle;
+ (BrightnessWidget *) pBrightnessHandle;
*bIsRealize = pBrightnessWidget->bIsRealize;
}
bool vp_play_brightness_set_value(brightness_handle pBrightnessHandle,
- int nCurVal)
+ int nCurVal)
{
if (pBrightnessHandle == NULL) {
VideoLogError("pBrightnessHandle is NULL");
}
BrightnessWidget *pBrightnessWidget =
- (BrightnessWidget *) pBrightnessHandle;
+ (BrightnessWidget *) pBrightnessHandle;
_vp_play_brightness_create_timer(pBrightnessWidget);
}
_vp_play_brightness_set_value(pBrightnessWidget,
- pBrightnessWidget->nCurVal);
+ pBrightnessWidget->nCurVal);
return TRUE;
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-play-button.h"
/* check temp */
#include "vp-play-log.h"
-Evas_Object *vp_button_create(Evas_Object *pParent, const char *pStyle,
- const char *pTxt, Evas_Smart_Cb pClickFunc,
- Evas_Smart_Cb pPressFunc,
- Evas_Smart_Cb pUnpressFunc, void *pUserData)
+Evas_Object *vp_button_create(Evas_Object * pParent, const char *pStyle,
+ const char *pTxt, Evas_Smart_Cb pClickFunc,
+ Evas_Smart_Cb pPressFunc,
+ Evas_Smart_Cb pUnpressFunc, void *pUserData)
{
if (!pParent) {
VideoLogError("pParent is NULL");
}
evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_smart_callback_add(pObj, "clicked", pClickFunc,
- pUserData);
- evas_object_smart_callback_add(pObj, "pressed", pPressFunc,
- pUserData);
+ evas_object_smart_callback_add(pObj, "clicked", pClickFunc, pUserData);
+ evas_object_smart_callback_add(pObj, "pressed", pPressFunc, pUserData);
evas_object_smart_callback_add(pObj, "unpressed", pUnpressFunc,
- pUserData);
+ pUserData);
return pObj;
}
-Evas_Object *vp_button_create_icon(Evas_Object *pParent,
- const char *pEdjPath,
- const char *pGroupName)
+Evas_Object *vp_button_create_icon(Evas_Object * pParent,
+ const char *pEdjPath,
+ const char *pGroupName)
{
if (!pParent) {
VideoLogError("pParent is NULL");
return NULL;
}
evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pObj, EVAS_HINT_FILL, EVAS_HINT_FILL);
return pObj;
}
-Evas_Object *vp_button_create_image(Evas_Object *pParent,
- const char *pEdjPath,
- const char *pGroupName)
+Evas_Object *vp_button_create_image(Evas_Object * pParent,
+ const char *pEdjPath,
+ const char *pGroupName)
{
if (!pParent) {
VideoLogError("pParent is NULL");
return pObj;
}
-Evas_Object *vp_navirame_button_create(Evas_Object *pParent,
- const char *pStyle,
- const char *pEdjPath,
- const char *pGroupName,
- Evas_Smart_Cb pClickFunc,
- void *pUserData)
+Evas_Object *vp_navirame_button_create(Evas_Object * pParent,
+ const char *pStyle,
+ const char *pEdjPath,
+ const char *pGroupName,
+ Evas_Smart_Cb pClickFunc,
+ void *pUserData)
{
if (!pParent) {
VideoLogError("pParent is NULL");
pImage = elm_image_add(pParent);
elm_image_file_set(pImage, pEdjPath, pGroupName);
evas_object_size_hint_aspect_set(pImage, EVAS_ASPECT_CONTROL_BOTH, 1,
- 1);
+ 1);
elm_image_resizable_set(pImage, EINA_TRUE, EINA_TRUE);
elm_object_part_content_set(btn, "icon", pImage);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-play-macro-define.h"
#include "vp-play-log.h"
-Evas_Object *vp_play_loading_ani_create(Evas_Object *pParent,
- video_loading_size_t nSize)
+Evas_Object *vp_play_loading_ani_create(Evas_Object * pParent,
+ video_loading_size_t nSize)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
}
evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, 0.5);
evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_show(progressbar);
elm_progressbar_pulse(progressbar, EINA_TRUE);
}
-void vp_play_loading_ani_destroy(Evas_Object *pProgress)
+void vp_play_loading_ani_destroy(Evas_Object * pProgress)
{
if (pProgress == NULL) {
VideoLogError("pProgress is 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <runtime_info.h>
#include <network/wifi.h>
#include "vp-file-util.h"
#include "vp-avrcp.h"
#include "Ecore.h"
-//#include <sys/time.h>
-//#include <minicontrol-provider.h>
-//#include <minicontrol-type.h>
-//#include "mp-lockscreenmini.h"
-//#include "mp-player-control.h"
-//#include "mp-play.h"
-//#include "Ecore.h"
-//#include "mp-player-mgr.h"
-//#include "mp-util.h"
-//#include "mp-widget.h"
-//#include "mp-setting-ctrl.h"
-//#include "mp-player-view.h"
-//#include <device/display.h>
-//#include <device/callback.h>
-//
-//#ifdef MP_FEATURE_LOCKSCREEN
-//
+
int LOCKSCREEN_MINI_CONTROLLER_WIDTH;
#define LOCKSCREEN_MINI_CONTROLLER_HEIGHT (93)
-//
-////#define LOCKSCREEN_MSG_DOMAIN_CONTROL_ACCESS (int)ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL
static time_t press_time;
static time_t release_time;
-static Evas_Object *_load_edj(Evas_Object * parent, const char *file, const char *group);
-static void _load_lockscreenmini(PlayView *pPlayView);
-static void _vp_lockscreenmini_update_layout(PlayView *pPlayView, bool landscape);
-static Eina_Bool _vp_lockscreenmini_hide_video_mini_controller(void *pUserData);
-
-//static bool _mp_lockscreenmini_is_long_press()
-//{
-// bool result = false;
-// VideoLogDebug("press time is %s", ctime(&press_time));
-// VideoLogDebug("release time is %s", ctime(&release_time));
-// if (difftime(release_time, press_time) > 1.0) {
-// result = true;
-// }
-//
-// memset(&release_time, 0, sizeof(time_t));
-// memset(&press_time, 0, sizeof(time_t));
-//
-// VideoLogDebug("is %s long press", result ? "" : "not");
-// return result;
-//}
-
-static Evas_Object *
-_load_edj(Evas_Object *parent, const char *file, const char *group)
+static Evas_Object *_load_edj(Evas_Object * parent, const char *file,
+ const char *group);
+static void _load_lockscreenmini(PlayView * pPlayView);
+static void _vp_lockscreenmini_update_layout(PlayView * pPlayView,
+ bool landscape);
+static Eina_Bool _vp_lockscreenmini_hide_video_mini_controller(void
+ *pUserData);
+
+
+static Evas_Object *_load_edj(Evas_Object * parent, const char *file,
+ const char *group)
{
Evas_Object *eo;
int r;
eo = elm_layout_add(parent);
if (eo) {
- char edje_path[1024] ={0};
- char * path = app_get_resource_path();
+ char edje_path[1024] = { 0 };
+ char *path = app_get_resource_path();
if (path == NULL) {
VideoLogError("path is null");
evas_object_del(eo);
return NULL;
}
- evas_object_size_hint_weight_set(eo, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_weight_set(eo, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
elm_win_resize_object_add(parent, eo);
evas_object_show(eo);
}
return eo;
}
-static void _lockscreen_cb(minicontrol_viewer_event_e event_type, bundle *event_arg)
+static void _lockscreen_cb(minicontrol_viewer_event_e event_type,
+ bundle * event_arg)
{
- /*Need to handle events*/
+ /*Need to handle events */
}
-static void
-_load_lockscreenmini(PlayView *pPlayView)
+static void _load_lockscreenmini(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
}
Evas_Object *win = NULL;
- win = minicontrol_create_window("video-minicontrol.LOCKSCREEN", MINICONTROL_TARGET_VIEWER_STOCK_LOCK_SCREEN, _lockscreen_cb);
+ win =
+ minicontrol_create_window("video-minicontrol.LOCKSCREEN",
+ MINICONTROL_TARGET_VIEWER_STOCK_LOCK_SCREEN,
+ _lockscreen_cb);
if (!win) {
return;
/* load edje */
_vp_lockscreenmini_update_layout(pPlayView, false);
- /*evas_object_show(eo);*/
return;
}
-//static void
-//_mp_lockscreenmini_register_reader(void *data)
-//{
-// struct appdata *pPlayView = data;
-// MP_CHECK(pPlayView);
-//}
-void vp_lockscreenmini_update_winmini_size(PlayView *pPlayView)
+void vp_lockscreenmini_update_winmini_size(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
LOCKSCREEN_MINI_CONTROLLER_WIDTH = 300;
}
- evas_object_resize(pPlayView->win_lockmini, LOCKSCREEN_MINI_CONTROLLER_WIDTH * scale, LOCKSCREEN_MINI_CONTROLLER_HEIGHT * scale);
+ evas_object_resize(pPlayView->win_lockmini,
+ LOCKSCREEN_MINI_CONTROLLER_WIDTH * scale,
+ LOCKSCREEN_MINI_CONTROLLER_HEIGHT * scale);
return;
}
-int
-vp_lockscreenmini_create(PlayView *pPlayView)
+int vp_lockscreenmini_create(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
VideoLogError("layout not made");
return -1;
}
-// _vp_lockscreenmini_register_reader(pPlayView);
}
vp_lockscreenmini_update_winmini_size(pPlayView);
}
-int vp_lockscreenmini_show(PlayView *pPlayView)
+int vp_lockscreenmini_show(PlayView * pPlayView)
{
VideoLogDebug("minicontroller view show!!");
if (!pPlayView) {
return 0;
}
-static void _vp_lockscreenmini_update_btn(PlayView *pPlayView)
+static void _vp_lockscreenmini_update_btn(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return;
}
- //MP_CHECK(!pPlayView->is_lcd_off);
- vp_mm_player_state_t nState = vp_play_normal_view_get_player_state(pPlayView);
+ vp_mm_player_state_t nState =
+ vp_play_normal_view_get_player_state(pPlayView);
VideoLogInfo("nState:%d", nState);
- if (nState == VP_MM_PLAYER_STATE_PAUSED) {
- edje_object_signal_emit(elm_layout_edje_get(pPlayView->lockmini_layout), "play_btn_invisible", "play_btn");
- edje_object_signal_emit(elm_layout_edje_get(pPlayView->lockmini_layout), "pause_btn_visible", "pause_btn");
+ if (nState == VP_MM_PLAYER_STATE_PLAYING) {
+ edje_object_signal_emit(elm_layout_edje_get
+ (pPlayView->lockmini_layout),
+ "play_btn_visible", "play_btn");
+ edje_object_signal_emit(elm_layout_edje_get
+ (pPlayView->lockmini_layout),
+ "pause_btn_invisible", "pause_btn");
} else {
- edje_object_signal_emit(elm_layout_edje_get(pPlayView->lockmini_layout), "play_btn_visible", "play_btn");
- edje_object_signal_emit(elm_layout_edje_get(pPlayView->lockmini_layout), "pause_btn_invisible", "pause_btn");
+ edje_object_signal_emit(elm_layout_edje_get
+ (pPlayView->lockmini_layout),
+ "play_btn_invisible", "play_btn");
+ edje_object_signal_emit(elm_layout_edje_get
+ (pPlayView->lockmini_layout),
+ "pause_btn_visible", "pause_btn");
}
}
-static Eina_Bool
-_vp_lockscreenmini_btn_update_timer(void *data)
+static Eina_Bool _vp_lockscreenmini_btn_update_timer(void *data)
{
- PlayView *pPlayView = (PlayView *)data;
+ PlayView *pPlayView = (PlayView *) data;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
}
_vp_lockscreenmini_update_btn(pPlayView);
- pPlayView->lockmini_button_timer = NULL;
+ if (pPlayView)
+ pPlayView->lockmini_button_timer = NULL;
return EINA_FALSE;
}
-static void _vp_lockscreenmini_update_playpause_btn(PlayView *pPlayView)
+static void _vp_lockscreenmini_update_playpause_btn(PlayView * pPlayView)
{
VP_EVAS_TIMER_DEL(pPlayView->lockmini_button_timer);
- vp_mm_player_state_t nState = vp_play_normal_view_get_player_state(pPlayView);
+ vp_mm_player_state_t nState =
+ vp_play_normal_view_get_player_state(pPlayView);
VideoLogInfo("nState:%d", nState);
- if (nState == VP_MM_PLAYER_STATE_PLAYING || nState == VP_MM_PLAYER_STATE_PAUSED) {
+ if (nState == VP_MM_PLAYER_STATE_PLAYING
+ || nState == VP_MM_PLAYER_STATE_PAUSED) {
_vp_lockscreenmini_update_btn(pPlayView);
} else {
- pPlayView->lockmini_button_timer = ecore_timer_add(1.0, _vp_lockscreenmini_btn_update_timer, (void *)pPlayView);
+ pPlayView->lockmini_button_timer =
+ ecore_timer_add(1.0, _vp_lockscreenmini_btn_update_timer,
+ (void *) pPlayView);
}
}
-void vp_lockscreenmini_update_control(PlayView *pPlayView)
+void vp_lockscreenmini_update_control(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
VideoLogError("pPlayView->win_lockmini is NULL");
return;
}
-// MP_CHECK(!pPlayView->is_lcd_off);
_vp_lockscreenmini_update_playpause_btn(pPlayView);
}
-static void _vp_lockscreenmini_play_pause_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+static void _vp_lockscreenmini_play_pause_btn_clicked_cb(void *data,
+ Evas_Object * obj,
+ void *event_info)
{
VideoLogDebug("play/pause button clicked");
- PlayView *pPlayView = (PlayView *)data;
- if(!pPlayView) {
+ PlayView *pPlayView = (PlayView *) data;
+ if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return;
}
int lock_state = SYSTEM_SETTINGS_LOCK_STATE_UNLOCK;
- system_settings_get_value_int(SYSTEM_SETTINGS_KEY_LOCK_STATE, &lock_state);
+ system_settings_get_value_int(SYSTEM_SETTINGS_KEY_LOCK_STATE,
+ &lock_state);
- vp_mm_player_state_t nState = vp_play_normal_view_get_player_state(pPlayView);
+ vp_mm_player_state_t nState =
+ vp_play_normal_view_get_player_state(pPlayView);
VideoLogInfo("nState:%d", nState);
if (nState == VP_MM_PLAYER_STATE_PLAYING) {
- /*if playing state then on click it should pause and set button for play*/
- edje_object_signal_emit(elm_layout_edje_get(pPlayView->lockmini_layout), "play_btn_invisible", "play_btn");
- edje_object_signal_emit(elm_layout_edje_get(pPlayView->lockmini_layout), "pause_btn_visible", "pause_btn");
- vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView, LC_CONTROLLER_PAUSE_BUTTON);
-
- system_settings_get_value_int(SYSTEM_SETTINGS_KEY_LOCK_STATE, &lock_state);
+ /*if playing state then on click it should pause and set button for play */
+ edje_object_signal_emit(elm_layout_edje_get
+ (pPlayView->lockmini_layout),
+ "play_btn_invisible", "play_btn");
+ edje_object_signal_emit(elm_layout_edje_get
+ (pPlayView->lockmini_layout),
+ "pause_btn_visible", "pause_btn");
+ vp_play_normal_view_on_controller_button_press(pPlayView->
+ pNormalView,
+ LC_CONTROLLER_PAUSE_BUTTON);
+
+ system_settings_get_value_int(SYSTEM_SETTINGS_KEY_LOCK_STATE,
+ &lock_state);
if (lock_state == SYSTEM_SETTINGS_LOCK_STATE_LOCK) {
VP_EVAS_TIMER_DEL(pPlayView->lockmini_idle_timer);
- pPlayView->lockmini_idle_timer = ecore_timer_add((2 * 60), _vp_lockscreenmini_hide_video_mini_controller, pPlayView);
+ pPlayView->lockmini_idle_timer =
+ ecore_timer_add((2 * 60),
+ _vp_lockscreenmini_hide_video_mini_controller,
+ pPlayView);
}
} else {
- edje_object_signal_emit(elm_layout_edje_get(pPlayView->lockmini_layout), "play_btn_visible", "play_btn");
- edje_object_signal_emit(elm_layout_edje_get(pPlayView->lockmini_layout), "pause_btn_invisible", "pause_btn");
- vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView, LC_CONTROLLER_PLAY_BUTTON);
+ edje_object_signal_emit(elm_layout_edje_get
+ (pPlayView->lockmini_layout),
+ "play_btn_visible", "play_btn");
+ edje_object_signal_emit(elm_layout_edje_get
+ (pPlayView->lockmini_layout),
+ "pause_btn_invisible", "pause_btn");
+ vp_play_normal_view_on_controller_button_press(pPlayView->
+ pNormalView,
+ LC_CONTROLLER_PLAY_BUTTON);
VP_EVAS_TIMER_DEL(pPlayView->lockmini_idle_timer);
}
}
-static void _vp_lockscreenmini_ff_btn_pressed_cb(void *data, Evas_Object *obj, void *event_info)
+static void _vp_lockscreenmini_ff_btn_pressed_cb(void *data,
+ Evas_Object * obj,
+ void *event_info)
{
VideoLogDebug("ff button pressed");
time(&press_time);
-// char *source = (char *)data;
-// if (!g_strcmp0(source, CONTROLLER_FF_SOURCE)) {
-// vp_play_control_ff(true, false, false);
-// } else {
-// vp_play_control_rew(true, false, false);
-// }
}
-static void _vp_lockscreenmini_ff_btn_unpressed_cb(void *data, Evas_Object *obj, void *event_info)
+static void _vp_lockscreenmini_ff_btn_unpressed_cb(void *data,
+ Evas_Object * obj,
+ void *event_info)
{
VideoLogDebug("ff button unpressed");
time(&release_time);
- PlayView *pPlayView = (PlayView *)data;
- if(!pPlayView) {
+ PlayView *pPlayView = (PlayView *) data;
+ if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return;
}
- if(!pPlayView->lockmini_layout) {
+ if (!pPlayView->lockmini_layout) {
VideoLogError("pPlayView->lockmini_layout is NULL");
return;
}
- //vp_play_control_ff(false, false, false);
- elm_object_signal_emit(pPlayView->lockmini_layout, "signal.button.unpressed", "ff_btn");
+ elm_object_signal_emit(pPlayView->lockmini_layout,
+ "signal.button.unpressed", "ff_btn");
}
-static void _vp_lockscreenmini_ff_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+static void _vp_lockscreenmini_ff_btn_clicked_cb(void *data,
+ Evas_Object * obj,
+ void *event_info)
{
VideoLogDebug("ff button clicked");
-// if (_vp_minicontroller_is_long_press()) {
-// return;
-// }
-//
-// char *source = (char *)data;
-// if (!g_strcmp0(source, CONTROLLER_FF_SOURCE)) {
-// vp_play_control_ff(false, false, true);
-// } else {
-// vp_play_control_rew(false, false, true);
-// }
- PlayView *pPlayView = (PlayView *)data;
- if(!pPlayView) {
+ PlayView *pPlayView = (PlayView *) data;
+ if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return;
}
- vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView, LC_CONTROLLER_FF_BUTTON);
+ vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView,
+ LC_CONTROLLER_FF_BUTTON);
}
-static void _vp_lockscreenmini_rew_btn_pressed_cb(void *data, Evas_Object *obj, void *event_info)
+static void _vp_lockscreenmini_rew_btn_pressed_cb(void *data,
+ Evas_Object * obj,
+ void *event_info)
{
VideoLogDebug("rew button pressed");
time(&press_time);
-// char *source = (char *)data;
-// if (!g_strcmp0(source, CONTROLLER_FF_SOURCE)) {
-// vp_play_control_ff(true, false, false);
-// } else {
-// vp_play_control_rew(true, false, false);
-// }
}
-static void _vp_lockscreenmini_rew_btn_unpressed_cb(void *data, Evas_Object *obj, void *event_info)
+static void _vp_lockscreenmini_rew_btn_unpressed_cb(void *data,
+ Evas_Object * obj,
+ void *event_info)
{
VideoLogDebug("rew button unpressed");
time(&release_time);
- PlayView *pPlayView = (PlayView *)data;
- if(!pPlayView) {
+ PlayView *pPlayView = (PlayView *) data;
+ if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return;
}
- if(!pPlayView->lockmini_layout) {
+ if (!pPlayView->lockmini_layout) {
VideoLogError("pPlayView->lockmini_layout is NULL");
return;
}
- // vp_play_control_rew(false, false, false);
- elm_object_signal_emit(pPlayView->lockmini_layout, "signal.button.unpressed", "rew_btn");
+ elm_object_signal_emit(pPlayView->lockmini_layout,
+ "signal.button.unpressed", "rew_btn");
}
-static void _vp_lockscreenmini_rew_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+static void _vp_lockscreenmini_rew_btn_clicked_cb(void *data,
+ Evas_Object * obj,
+ void *event_info)
{
VideoLogDebug("rew button clicked");
- PlayView *pPlayView = (PlayView *)data;
- if(!pPlayView) {
+ PlayView *pPlayView = (PlayView *) data;
+ if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return;
}
- vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView, LC_CONTROLLER_REW_BUTTON);
+ vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView,
+ LC_CONTROLLER_REW_BUTTON);
}
/*end of focused UI callbacks*/
static void
-_vp_lockscreenmini_update_layout(PlayView *pPlayView, bool landscape)
+_vp_lockscreenmini_update_layout(PlayView * pPlayView, bool landscape)
{
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
VP_EVAS_TIMER_DEL(pPlayView->lockmini_button_timer);
- if(pPlayView->lockmini_layout) {
+ if (pPlayView->lockmini_layout) {
evas_object_del(pPlayView->lockmini_layout);
}
- pPlayView->lockmini_layout = _load_edj(pPlayView->win_lockmini, LOCKSCREENMINI_EDJ_NAME, "video-lockscreenmini");
+ pPlayView->lockmini_layout =
+ _load_edj(pPlayView->win_lockmini, LOCKSCREENMINI_EDJ_NAME,
+ "video-lockscreenmini");
if (!pPlayView->lockmini_layout) {
VideoLogError("layout making failed");
- return ;
+ return;
}
- elm_win_resize_object_add(pPlayView->win_lockmini, pPlayView->lockmini_layout);
+ elm_win_resize_object_add(pPlayView->win_lockmini,
+ pPlayView->lockmini_layout);
- /*add focused UI related*/
+ /*add focused UI related */
pPlayView->lsicon_icon = elm_image_add(pPlayView->lockmini_layout);
- evas_object_size_hint_align_set(pPlayView->lsicon_icon, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(pPlayView->lsicon_icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pPlayView->lsicon_icon, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pPlayView->lsicon_icon,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_image_fill_outside_set(pPlayView->lsicon_icon, true);
- elm_object_part_content_set(pPlayView->lockmini_layout, "albumart_image", pPlayView->lsicon_icon);
- elm_object_focus_custom_chain_append(pPlayView->lockmini_layout, pPlayView->lsicon_icon, NULL);
+ elm_object_part_content_set(pPlayView->lockmini_layout,
+ "albumart_image", pPlayView->lsicon_icon);
+ elm_object_focus_custom_chain_append(pPlayView->lockmini_layout,
+ pPlayView->lsicon_icon, NULL);
elm_object_focus_allow_set(pPlayView->lsicon_icon, EINA_TRUE);
/*-------> REW button ------->*/
- Evas_Object *rew_focus_btn = elm_button_add(pPlayView->lockmini_layout);
+ Evas_Object *rew_focus_btn =
+ elm_button_add(pPlayView->lockmini_layout);
elm_object_style_set(rew_focus_btn, "focus");
- elm_object_part_content_set(pPlayView->lockmini_layout, "rew_focus", rew_focus_btn);
- elm_object_focus_custom_chain_append(pPlayView->lockmini_layout, rew_focus_btn, NULL);
- evas_object_smart_callback_add(rew_focus_btn, "clicked", _vp_lockscreenmini_rew_btn_clicked_cb, pPlayView);
- evas_object_smart_callback_add(rew_focus_btn, "pressed", _vp_lockscreenmini_rew_btn_pressed_cb, pPlayView);
- evas_object_smart_callback_add(rew_focus_btn, "unpressed", _vp_lockscreenmini_rew_btn_unpressed_cb, pPlayView);
+ elm_object_part_content_set(pPlayView->lockmini_layout, "rew_focus",
+ rew_focus_btn);
+ elm_object_focus_custom_chain_append(pPlayView->lockmini_layout,
+ rew_focus_btn, NULL);
+ evas_object_smart_callback_add(rew_focus_btn, "clicked",
+ _vp_lockscreenmini_rew_btn_clicked_cb,
+ pPlayView);
+ evas_object_smart_callback_add(rew_focus_btn, "pressed",
+ _vp_lockscreenmini_rew_btn_pressed_cb,
+ pPlayView);
+ evas_object_smart_callback_add(rew_focus_btn, "unpressed",
+ _vp_lockscreenmini_rew_btn_unpressed_cb,
+ pPlayView);
/*-------> play/pause button ------->*/
- Evas_Object *play_pause_focus_btn = elm_button_add(pPlayView->lockmini_layout);
+ Evas_Object *play_pause_focus_btn =
+ elm_button_add(pPlayView->lockmini_layout);
elm_object_style_set(play_pause_focus_btn, "focus");
- elm_object_part_content_set(pPlayView->lockmini_layout, "play_pause_focus", play_pause_focus_btn);
- elm_object_focus_custom_chain_append(pPlayView->lockmini_layout, play_pause_focus_btn, NULL);
- evas_object_smart_callback_add(play_pause_focus_btn, "clicked", _vp_lockscreenmini_play_pause_btn_clicked_cb, pPlayView);
+ elm_object_part_content_set(pPlayView->lockmini_layout,
+ "play_pause_focus", play_pause_focus_btn);
+ elm_object_focus_custom_chain_append(pPlayView->lockmini_layout,
+ play_pause_focus_btn, NULL);
+ evas_object_smart_callback_add(play_pause_focus_btn, "clicked",
+ _vp_lockscreenmini_play_pause_btn_clicked_cb,
+ pPlayView);
/*------->FF button ------->*/
Evas_Object *ff_focus_btn = elm_button_add(pPlayView->lockmini_layout);
elm_object_style_set(ff_focus_btn, "focus");
- elm_object_part_content_set(pPlayView->lockmini_layout, "ff_focus", ff_focus_btn);
- elm_object_focus_custom_chain_append(pPlayView->lockmini_layout, ff_focus_btn, NULL);
- evas_object_smart_callback_add(ff_focus_btn, "clicked", _vp_lockscreenmini_ff_btn_clicked_cb, pPlayView);
- evas_object_smart_callback_add(ff_focus_btn, "pressed", _vp_lockscreenmini_ff_btn_pressed_cb, pPlayView);
- evas_object_smart_callback_add(ff_focus_btn, "unpressed", _vp_lockscreenmini_ff_btn_unpressed_cb, pPlayView);
+ elm_object_part_content_set(pPlayView->lockmini_layout, "ff_focus",
+ ff_focus_btn);
+ elm_object_focus_custom_chain_append(pPlayView->lockmini_layout,
+ ff_focus_btn, NULL);
+ evas_object_smart_callback_add(ff_focus_btn, "clicked",
+ _vp_lockscreenmini_ff_btn_clicked_cb,
+ pPlayView);
+ evas_object_smart_callback_add(ff_focus_btn, "pressed",
+ _vp_lockscreenmini_ff_btn_pressed_cb,
+ pPlayView);
+ evas_object_smart_callback_add(ff_focus_btn, "unpressed",
+ _vp_lockscreenmini_ff_btn_unpressed_cb,
+ pPlayView);
_vp_lockscreenmini_update_btn(pPlayView);
}
-static void
-_vp_lockscreenmini_title_set(PlayView *pPlayView)
+static void _vp_lockscreenmini_title_set(PlayView * pPlayView)
{
VideoLogDebug("title set");
VideoLogError("pPlayView is NULL");
return;
}
- Evas_Object *label = elm_object_part_content_get(pPlayView->lockmini_layout, "elm.text");
+ Evas_Object *label =
+ elm_object_part_content_get(pPlayView->lockmini_layout,
+ "elm.text");
- char *markup_title = elm_entry_utf8_to_markup(vp_play_util_get_title_from_path(pPlayView->szMediaURL));
- //char *markup_artist = elm_entry_utf8_to_markup(current_item->artist);
+ char *markup_title =
+ elm_entry_utf8_to_markup(vp_play_util_get_title_from_path
+ (pPlayView->szMediaURL));
- char *title_shadow = g_strdup_printf("far_shadow,bottom shadow_color=#00000080");
- char *title_format = "<align=center><style=%s><font_size=%d><color=#%s><color_class=%s>%s</font></color_class></font_size></style></align>";
+ char *title_shadow =
+ g_strdup_printf("far_shadow,bottom shadow_color=#00000080");
+ char *title_format =
+ "<align=center><style=%s><font_size=%d><color=#%s><color_class=%s>%s</font></color_class></font_size></style></align>";
char *title = NULL;
- char *title_format_left = "<align=left><style=%s><font_size=%d><color=#%s><color_class=%s>%s</font></color_class></font_size></style></align>";
+ char *title_format_left =
+ "<align=left><style=%s><font_size=%d><color=#%s><color_class=%s>%s%s</font></color_class></font_size></style></align>";
if (markup_title) {
- if (strlen(markup_title) + 3 <= 50) {
- title = g_strdup_printf(title_format, title_shadow, 30, "FFFFFFFF", "ATO003", markup_title);
+ if (strlen(markup_title) + 3 <= 35) {
+ title =
+ g_strdup_printf(title_format, title_shadow, 30, "FFFFFFFF",
+ "ATO003", markup_title);
} else {
- title = g_strdup_printf(title_format_left, title_shadow, 30, "FFFFFFFF", "ATO003", markup_title);
+ title =
+ g_strdup_printf(title_format_left, title_shadow, 30,
+ "FFFFFFFF", "ATO003", markup_title,
+ " ");
}
}
- edje_object_part_text_set(_EDJ(pPlayView->lockmini_layout), "elm.text", markup_title);
+ edje_object_part_text_set(_EDJ(pPlayView->lockmini_layout), "elm.text",
+ markup_title);
if (!label) {
label = elm_label_add(pPlayView->lockmini_layout);
elm_object_style_set(label, "slide_roll");
// set the label text
elm_object_text_set(label, title);
evas_object_show(label);
- elm_object_part_content_set(pPlayView->lockmini_layout, "elm.text", label);
+ elm_object_part_content_set(pPlayView->lockmini_layout, "elm.text",
+ label);
} else {
elm_object_text_set(label, title);
}
VP_FREE(title);
VP_FREE(markup_title);
+ VP_FREE(title_shadow);
evas_object_show(label);
}
-static Eina_Bool _vp_lockscreenmini_hide_video_mini_controller(void *pUserData)
+static Eina_Bool _vp_lockscreenmini_hide_video_mini_controller(void
+ *pUserData)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
return EINA_FALSE;
}
- PlayView *pPlayView = (PlayView *)pUserData;
+ PlayView *pPlayView = (PlayView *) pUserData;
vp_lockscreenmini_hide(pPlayView);
pPlayView->lockmini_idle_timer = NULL;
return EINA_FALSE;
}
-void vp_lockscreenmini_update(PlayView *pPlayView)
+void vp_lockscreenmini_update(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
VideoLogError("pPlayView->win_lockmini is NULL");
return;
}
- //MP_CHECK(!pPlayView->is_lcd_off);
- /*thumbnail set*/
+ /*thumbnail set */
char *thumbnail_path = NULL;
- vp_media_contents_get_video_thumbnail_path(pPlayView->szMediaURL, &thumbnail_path);
- VideoLogInfo("thumbnail = %s:%s", pPlayView->szMediaURL, thumbnail_path);
+ vp_media_contents_get_video_thumbnail_path(pPlayView->szMediaURL,
+ &thumbnail_path);
+ VideoLogInfo("thumbnail = %s:%s", pPlayView->szMediaURL,
+ thumbnail_path);
elm_image_file_set(pPlayView->lsicon_icon, thumbnail_path, NULL);
vp_lockscreenmini_update_control(pPlayView);
}
-int vp_lockscreenmini_hide(PlayView *pPlayView)
+int vp_lockscreenmini_hide(PlayView * pPlayView)
{
- if(!pPlayView || !pPlayView->win_lockmini)
+ if (!pPlayView || !pPlayView->win_lockmini)
return -1;
evas_object_hide(pPlayView->win_lockmini);
}
-int
-vp_lockscreenmini_destroy(PlayView *pPlayView)
+int vp_lockscreenmini_destroy(PlayView * pPlayView)
{
VideoLogDebug("lockscreenmini view destroy!!");
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return -1;
}
- if (!pPlayView->win_lockmini) {
- VideoLogError("pPlayView->win_lockmini is NULL");
- return -1;
- }
-
- if (pPlayView->lockmini_layout != NULL) {
- pPlayView->b_lockmini_show = FALSE;
- }
- evas_object_hide(pPlayView->win_lockmini);
VP_EVAS_TIMER_DEL(pPlayView->lockmini_button_timer);
VP_EVAS_TIMER_DEL(pPlayView->lockmini_idle_timer);
pPlayView->lockmini_visible = false;
+ if (pPlayView->lockmini_layout != NULL) {
+ evas_object_hide(pPlayView->lockmini_layout);
+ evas_object_del(pPlayView->lockmini_layout);
+ pPlayView->lockmini_layout = NULL;
+ pPlayView->b_lockmini_show = FALSE;
+ }
+ if (pPlayView->win_lockmini != NULL) {
+ evas_object_hide(pPlayView->win_lockmini);
+ evas_object_del(pPlayView->win_lockmini);
+ pPlayView->win_lockmini = NULL;
+ }
+
return 0;
}
-
-//void
-//mp_lockscreenmini_visible_set(struct appdata *pPlayView, bool visible)
-//{
-// VideoLogDebug("visible: %d", visible);
-// MP_CHECK(pPlayView);
-// MP_CHECK(pPlayView->win_lockmini);
-//
-// pPlayView->lockmini_visible = visible;
-// _mp_lockscreenmini_title_set(pPlayView);
-// mp_lockscreenmini_update_control(pPlayView);
-//
-// if (visible) {
-//#ifdef LOCKSCREEN_ENABLE_PROGRESS
-// _lockscreenmini_progress_timer_add(pPlayView);
-//#endif
-// } else {
-// display_state_e lock_state;
-// int ret = device_display_get_state(&lock_state);
-// if (ret == DEVICE_ERROR_NONE) {
-// ERROR_TRACE("[SUCCESSFULL] Return value is %d", ret);
-// } else {
-// ERROR_TRACE("[ERROR] Return value is %d", ret);
-// }
-// if (lock_state == DISPLAY_STATE_SCREEN_OFF || lock_state == DISPLAY_STATE_SCREEN_DIM) {
-// ERROR_TRACE("timer locks deleted");
-// mp_ecore_timer_del(pPlayView->lockmini_progress_timer);
-// }
-// }
-//}
-//
-//bool
-//mp_lockscreenmini_visible_get(struct appdata *pPlayView)
-//{
-// MP_CHECK_FALSE(pPlayView);
-// MP_CHECK_FALSE(pPlayView->win_lockmini);
-//
-// return pPlayView->lockmini_visible;
-//}
-//
-//void mp_lockscreenmini_on_lcd_event(struct appdata *pPlayView, bool lcd_on)
-//{
-// VideoLogDebug("lcd_on [%d]", lcd_on);
-// MP_CHECK(pPlayView);
-//
-// if (lcd_on && mp_util_is_now_active_player()) {
-// if (pPlayView->player_state == PLAY_STATE_PLAYING) {
-// mp_lockscreenmini_show(pPlayView);
-// }
-// }
-//
-// mp_lockscreenmini_visible_set(pPlayView, lcd_on);
-//}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <runtime_info.h>
#include <network/wifi.h>
#include "vp-avrcp.h"
#define MINI_CONTROLLER_HEIGHT (93)
-#define WL_INDI_H 27 //Window Layout Indicator Height
+#define WL_INDI_H 27 //Window Layout Indicator Height
#define PAUSE_TIME_OUT 120.
static time_t press_time;
int MINI_CONTROLLER_WIDTH;
int MINI_CONTROLLER_WIDTH_LANDSCAPE;
-static void _minicontroller_action_cb(void *data, Evas_Object * obj, const char *emission, const char *source);
-static Evas_Object *_load_edj(Evas_Object * parent, const char *file, const char *group);
-static void _load_minicontroller(PlayView *pPlayView);
-static void _vp_minicontroller_update_layout(PlayView *pPlayView, bool landscape);
-static void _vp_minicontroller_title_set(PlayView *pPlayView);
+static void _minicontroller_action_cb(void *data, Evas_Object * obj,
+ const char *emission,
+ const char *source);
+static Evas_Object *_load_edj(Evas_Object * parent, const char *file,
+ const char *group);
+static void _load_minicontroller(PlayView * pPlayView);
+static void _vp_minicontroller_update_layout(PlayView * pPlayView,
+ bool landscape);
+static void _vp_minicontroller_title_set(PlayView * pPlayView);
+
+PlayView *app_data;
static bool _vp_minicontroller_is_long_press()
{
}
static bool
-_vp_minicontroller_landscape_is(PlayView *pPlayView, video_play_rotate_t angle)
+_vp_minicontroller_landscape_is(PlayView * pPlayView, int angle)
{
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return false;
}
- bool landscape = false;
- if (angle == VIDEO_PLAY_ROTATE_90 || angle == VIDEO_PLAY_ROTATE_270) {
+ bool landscape = false;
+ if (angle == 90 || angle == 270) {
landscape = true;
} else {
landscape = false;
}
static void
-_vp_minicontroller_action_show_player_view(PlayView *pPlayView)
+_vp_minicontroller_action_show_player_view(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
+ } else {
+ VideoLogDebug("Showing controller.");
+ minicontrol_send_event(pPlayView->win_minicon,
+ MINICONTROL_EVENT_REQUEST_HIDE, NULL);
}
- VideoLogDebug("Showing controller.");
- minicontrol_send_event(pPlayView->win_minicon, MINICONTROL_EVENT_REQUEST_HIDE, NULL);
vp_play_util_app_resume();
}
static void
-_minicontroller_action_cb(void *data, Evas_Object * obj, const char *emission, const char *source)
+_minicontroller_action_cb(void *data, Evas_Object * obj,
+ const char *emission, const char *source)
{
- PlayView *pPlayView = (PlayView *)data;
+ PlayView *pPlayView = (PlayView *) data;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
}
if (emission) {
if (!g_strcmp0(emission, "close_btn_clicked")) {
VideoLogDebug("close button clicked!!");
- vp_minicontroller_destroy(pPlayView);
- vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView, CONTROLLER_PAUSE_BUTTON);
+ elm_exit();
} else if (!g_strcmp0(emission, "albumart_clicked")) {
VideoLogDebug("albumart clicked!!");
_vp_minicontroller_action_show_player_view(pPlayView);
}
-static Evas_Object *
-_load_edj(Evas_Object * parent, const char *file, const char *group)
+static Evas_Object *_load_edj(Evas_Object * parent, const char *file,
+ const char *group)
{
Evas_Object *eo;
int r;
eo = elm_layout_add(parent);
if (eo) {
- char edje_path[1024] ={0};
- char * path = app_get_resource_path();
+ char edje_path[1024] = { 0 };
+ char *path = app_get_resource_path();
if (path == NULL) {
VideoLogError("path is null");
evas_object_del(eo);
return NULL;
}
- evas_object_size_hint_weight_set(eo, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_weight_set(eo, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
elm_win_resize_object_add(parent, eo);
evas_object_show(eo);
}
return eo;
}
-static void _quick_panel_cb(minicontrol_viewer_event_e event_type, bundle *event_arg)
+static void _quick_panel_cb(minicontrol_viewer_event_e event_type,
+ bundle * event_arg)
{
-// startfunc;
-// struct appdata *ad = vp_util_get_appdata();
-// if (event_type == MINICONTROL_EVENT_REQUEST_HIDE) {
-// DEBUG_TRACE("CLOSE");
-// if (!vp_util_is_other_player_playing()) {
-// int ret_set = 0;
-// ret_set = preference_set_int(PREF_MUSIC_STATE, PREF_MUSIC_OFF);
-// if (ret_set) {
-// ERROR_TRACE("set preference failed");
-// }
-// }
-// vp_play_control_reset_ff_rew();
-// xD = 0;
-// yD = 0;
-// xDMove = 0;
-// yDMove = 0;
-// xU = 0;
-// yU = 0;
-// if (!ad->is_sdcard_removed) {
-// elm_exit();
-// }
-// ad->is_sdcard_removed = false;
-// }
+ VideoLogDebug("Handling events for Minicontroller!!");
+ if (event_type ==
+ (minicontrol_viewer_event_e) MINICONTROL_EVENT_REQUEST_HIDE) {
+ VideoLogDebug("Request to close Video Player");
+ }
+ if (event_type ==
+ (minicontrol_viewer_event_e) MINICONTROL_VIEWER_EVENT_REPORT_ANGLE) {
+ char *value = NULL;
+ int angle = 0;
+ bundle_get_str(event_arg, "angle", &value);
+ if (value && strlen(value) > 0) {
+ angle = atoi(value);
+ VideoLogDebug("Angle is : %d", angle);
+ }
+ vp_minicontroller_rotate(app_data, angle);
+ } else if (event_type == MINICONTROL_EVENT_REQUEST_HIDE) {
+ VideoLogDebug("Closing.");
+ elm_exit();
+ }
}
-static void
-_load_minicontroller(PlayView *pPlayView)
+static void _load_minicontroller(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return;
}
+ app_data = pPlayView;
Evas_Object *win = NULL;
- win = minicontrol_create_window("videoplayer-mini", MINICONTROL_TARGET_VIEWER_QUICK_PANEL, _quick_panel_cb);
+ win =
+ minicontrol_create_window("videoplayer-mini",
+ MINICONTROL_TARGET_VIEWER_QUICK_PANEL,
+ _quick_panel_cb);
if (!win) {
VideoLogError("window is NULL");
pPlayView->win_minicon = win;
- /*check initial rotation*/
- int nAngle = elm_win_rotation_get((Evas_Object *)pPlayView->pWin);
- video_play_rotate_t nRotate = VIDEO_PLAY_ROTATE_NONE;
-
- switch (nAngle) {
- case 0:
- nRotate = VIDEO_PLAY_ROTATE_NONE;
- break;
- case 90:
- nRotate = VIDEO_PLAY_ROTATE_90;
- break;
- case 180:
- nRotate = VIDEO_PLAY_ROTATE_180;
- break;
- case 270:
- nRotate = VIDEO_PLAY_ROTATE_270;
- break;
- }
+ /*check initial rotation */
+ int nAngle = elm_win_rotation_get((Evas_Object *) pPlayView->pWin);
bool landscape = _vp_minicontroller_landscape_is(pPlayView, nAngle);
- VideoLogDebug("landscape ========== %d",landscape);
+ VideoLogDebug("Current Orientation Landscape: %d", landscape);
_vp_minicontroller_update_layout(pPlayView, landscape);
- //evas_object_show(eo);
return;
}
-//static void
-//_vp_minicontroller_register_reader(void *data)
-//{
-// struct appdata *ad = data;
-// MP_CHECK(ad);
-//}
-//
-void vp_minicontroller_update_winmini_size(PlayView *pPlayView)
+void vp_minicontroller_update_winmini_size(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return;
}
- int angle = elm_win_rotation_get((Evas_Object *)pPlayView->pWin);
+ int angle = elm_win_rotation_get((Evas_Object *) pPlayView->pWin);
- VideoLogError("angle======================%d",angle);
+ VideoLogError("angle======================%d", angle);
int w = 0;
if ((elm_config_scale_get() - 1.7) < 0.0001) {
MINI_CONTROLLER_WIDTH = 318;
}
double scale = elm_config_scale_get();
- VideoLogDebug("scale: %f and width: %d and height: %d", scale, w, MINI_CONTROLLER_HEIGHT);
- evas_object_resize(pPlayView->win_minicon, w * scale, MINI_CONTROLLER_HEIGHT * scale);
+ VideoLogDebug("scale: %f and width: %d and height: %d", scale, w,
+ MINI_CONTROLLER_HEIGHT);
+ evas_object_resize(pPlayView->win_minicon, w * scale,
+ MINI_CONTROLLER_HEIGHT * scale);
return;
}
-int vp_minicontroller_create(PlayView *pPlayView)
+int vp_minicontroller_create(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return -1;
}
- //MP_CHECK_VAL(!ad->is_lcd_off, -1);
-
if (!(pPlayView->minicontroller_layout && pPlayView->win_minicon)) {
_load_minicontroller(pPlayView);
return -1;
}
- //vp_language_mgr_register_object(ad->minicontroller_layout, OBJ_TYPE_EDJE_OBJECT, "elm.text.app_name", "IDS_COM_BODY_MUSIC");
- //elm_object_part_text_set(ad->minicontroller_layout, "elm.text.app_name", GET_SYS_STR("IDS_COM_BODY_MUSIC"));
}
vp_minicontroller_update_winmini_size(pPlayView);
}
-int
-vp_minicontroller_show(PlayView *pPlayView)
+int vp_minicontroller_show(PlayView * pPlayView)
{
VideoLogDebug("Showing controller!");
if (!pPlayView) {
VideoLogError("pPlayView->win_minicon is NULL");
return -1;
}
-// MP_CHECK_VAL(!ad->is_lcd_off, -1);
-// /* Not show minicontrol when current track not exsit */
-// MP_CHECK_VAL(ad->current_track_info, -1);
-//
+
pPlayView->b_minicontroller_show = TRUE;
vp_minicontroller_update(pPlayView, true);
evas_object_show(pPlayView->win_minicon);
}
-static void _vp_minicontroller_update_btn(PlayView *pPlayView)
+static void _vp_minicontroller_update_btn(PlayView * pPlayView)
{
VideoLogError("Updating play/pause button!!!!!!!!!!!");
if (!pPlayView) {
VideoLogError("pPlayView->win_minicon is NULL");
return;
}
- //MP_CHECK(!ad->is_lcd_off);
- vp_mm_player_state_t nState = vp_play_normal_view_get_player_state(pPlayView);
+ vp_mm_player_state_t nState =
+ vp_play_normal_view_get_player_state(pPlayView);
VideoLogInfo("nState:%d", nState);
if (nState == VP_MM_PLAYER_STATE_PLAYING) {
- elm_object_signal_emit(pPlayView->minicontroller_layout, "set_pause", "c_source");
+ elm_object_signal_emit(pPlayView->minicontroller_layout,
+ "set_pause", "c_source");
} else {
- elm_object_signal_emit(pPlayView->minicontroller_layout, "set_play", "c_source");
+ elm_object_signal_emit(pPlayView->minicontroller_layout,
+ "set_play", "c_source");
}
}
-static Eina_Bool
-_vp_minicontroller_btn_update_timer(void *data)
+static Eina_Bool _vp_minicontroller_btn_update_timer(void *data)
{
- PlayView *pPlayView = (PlayView *)data;
+ PlayView *pPlayView = (PlayView *) data;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
}
_vp_minicontroller_update_btn(pPlayView);
- pPlayView->minicon_button_timer = NULL;
+ if (pPlayView)
+ pPlayView->minicon_button_timer = NULL;
return EINA_FALSE;
}
-static void _vp_minicontroller_update_playpause_btn(PlayView *pPlayView)
+static void _vp_minicontroller_update_playpause_btn(PlayView * pPlayView)
{
VP_EVAS_TIMER_DEL(pPlayView->minicon_button_timer);
- vp_mm_player_state_t nState = vp_play_normal_view_get_player_state(pPlayView);
+ vp_mm_player_state_t nState =
+ vp_play_normal_view_get_player_state(pPlayView);
VideoLogInfo("nState:%d", nState);
- if (nState == VP_MM_PLAYER_STATE_PLAYING || nState == VP_MM_PLAYER_STATE_PAUSED) {
+ if (nState == VP_MM_PLAYER_STATE_PLAYING
+ || nState == VP_MM_PLAYER_STATE_PAUSED) {
_vp_minicontroller_update_btn(pPlayView);
} else {
- pPlayView->minicon_button_timer = ecore_timer_add(1.0, _vp_minicontroller_btn_update_timer, pPlayView);
+ pPlayView->minicon_button_timer =
+ ecore_timer_add(1.0, _vp_minicontroller_btn_update_timer,
+ pPlayView);
}
}
-void
-vp_minicontroller_update_control(PlayView *pPlayView)
+void vp_minicontroller_update_control(PlayView * pPlayView)
{
VideoLogDebug("Updating controller!!!!");
if (!pPlayView) {
VideoLogError("pPlayView->win_minicon is NULL");
return;
}
-// MP_CHECK(!ad->is_lcd_off);
_vp_minicontroller_update_playpause_btn(pPlayView);
}
-static void _vp_minicontroller_play_pause_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+int _vp_is_current_focus_available()
+{
+ sound_stream_focus_change_reason_e changed_by =
+ SOUND_STREAM_FOCUS_CHANGED_BY_MEDIA;
+ int ret = 0;
+ int rec_flag = 0;
+ int playback_flag = 0;
+ char *additional_info = NULL;
+
+ ret =
+ sound_manager_get_current_recording_focus(&changed_by, &rec_flag,
+ &additional_info);
+ if (ret != SOUND_MANAGER_ERROR_NONE) {
+ VideoLogError("Cannot determine current recording focus");
+ }
+
+ if (!g_strcmp0(additional_info, "video_recorder")) {
+ VideoLogError
+ ("Video Recorder Timer is active. Cannot resume Video Player");
+ return -1;
+ }
+
+ VideoLogInfo("Recorder state changed by : %d", changed_by);
+ if (changed_by == SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_RECOGNITION) {
+ VideoLogError("Cannot resume Video Player. Speak Mode is on");
+ vp_play_util_status_noti_show(VP_PLAY_STRING_UNABLE_TO_PLAY);
+ return -1;
+ }
+
+ if (additional_info) {
+ free(additional_info);
+ additional_info = NULL;
+ }
+
+ changed_by = SOUND_STREAM_FOCUS_CHANGED_BY_MEDIA;
+ ret =
+ sound_manager_get_current_playback_focus(&changed_by,
+ &playback_flag,
+ &additional_info);
+ if (ret != SOUND_MANAGER_ERROR_NONE) {
+ VideoLogError("Cannot determine current playback focus");
+ }
+
+ VideoLogInfo("Playback state changed by : %d", changed_by);
+ if (changed_by == SOUND_STREAM_FOCUS_CHANGED_BY_CALL
+ || changed_by == SOUND_STREAM_FOCUS_CHANGED_BY_RINGTONE
+ || changed_by == SOUND_STREAM_FOCUS_CHANGED_BY_VOIP) {
+ VideoLogError("Cannot resume Video Player due to call");
+ return -1;
+ }
+
+ return 0;
+}
+
+static void _vp_minicontroller_play_pause_btn_clicked_cb(void *data,
+ Evas_Object * obj,
+ void *event_info)
{
VideoLogDebug("play/pause button clicked");
- PlayView *pPlayView = (PlayView *)data;
- if(!pPlayView) {
+ PlayView *pPlayView = (PlayView *) data;
+ if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return;
}
- vp_mm_player_state_t nState = vp_play_normal_view_get_player_state(pPlayView);
+ vp_mm_player_state_t nState =
+ vp_play_normal_view_get_player_state(pPlayView);
VideoLogInfo("nState:%d", nState);
if (nState == VP_MM_PLAYER_STATE_PLAYING) {
- /*if playing state then on click it should pause and set button for play*/
- elm_object_signal_emit(pPlayView->minicontroller_layout, "set_play", "c_source");
- vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView, CONTROLLER_PAUSE_BUTTON);
+ /*if playing state then on click it should pause and set button for play */
+ elm_object_signal_emit(pPlayView->minicontroller_layout,
+ "set_play", "c_source");
+ vp_play_normal_view_on_controller_button_press(pPlayView->
+ pNormalView,
+ CONTROLLER_PAUSE_BUTTON);
} else {
- elm_object_signal_emit(pPlayView->minicontroller_layout, "set_pause", "c_source");
- vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView, CONTROLLER_PLAY_BUTTON);
+ if (_vp_is_current_focus_available() != 0) {
+ VideoLogError
+ ("Some other application has the focus currently... Returning...");
+ vp_play_util_status_noti_show(VP_PLAY_STRING_UNABLE_TO_PLAY);
+ return;
+ }
+
+ elm_object_signal_emit(pPlayView->minicontroller_layout,
+ "set_pause", "c_source");
+ vp_play_normal_view_on_controller_button_press(pPlayView->
+ pNormalView,
+ CONTROLLER_PLAY_BUTTON);
}
}
-static void _vp_minicontroller_ff_btn_pressed_cb(void *data, Evas_Object *obj, void *event_info)
+static void _vp_minicontroller_ff_btn_pressed_cb(void *data,
+ Evas_Object * obj,
+ void *event_info)
{
VideoLogDebug("ff button pressed");
time(&press_time);
-// char *source = (char *)data;
-// if (!g_strcmp0(source, CONTROLLER_FF_SOURCE)) {
-// vp_play_control_ff(true, false, false);
-// } else {
-// vp_play_control_rew(true, false, false);
-// }
}
-static void _vp_minicontroller_ff_btn_unpressed_cb(void *data, Evas_Object *obj, void *event_info)
+static void _vp_minicontroller_ff_btn_unpressed_cb(void *data,
+ Evas_Object * obj,
+ void *event_info)
{
VideoLogDebug("ff button unpressed");
time(&release_time);
- PlayView *pPlayView = (PlayView *)data;
- if(!pPlayView) {
+ PlayView *pPlayView = (PlayView *) data;
+ if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return;
}
- if(!pPlayView->minicontroller_layout) {
+ if (!pPlayView->minicontroller_layout) {
VideoLogError("pPlayView->minicontroller_layout is NULL");
return;
}
- //vp_play_control_ff(false, false, false);
- elm_object_signal_emit(pPlayView->minicontroller_layout, "ff_btn_unpressed", "c_source");
+ elm_object_signal_emit(pPlayView->minicontroller_layout,
+ "ff_btn_unpressed", "c_source");
}
-static void _vp_minicontroller_ff_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+static void _vp_minicontroller_ff_btn_clicked_cb(void *data,
+ Evas_Object * obj,
+ void *event_info)
{
VideoLogDebug("ff button clicked");
-// if (_vp_minicontroller_is_long_press()) {
-// return;
-// }
-//
-// char *source = (char *)data;
-// if (!g_strcmp0(source, CONTROLLER_FF_SOURCE)) {
-// vp_play_control_ff(false, false, true);
-// } else {
-// vp_play_control_rew(false, false, true);
-// }
- PlayView *pPlayView = (PlayView *)data;
- if(!pPlayView) {
+ PlayView *pPlayView = (PlayView *) data;
+ if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return;
}
- vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView, CONTROLLER_FF_BUTTON);
+
+ if (_vp_is_current_focus_available() != 0) {
+ VideoLogError
+ ("Some other application has the focus currently... Changing to paused state...");
+ stay_pause = true;
+ }
+
+ vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView,
+ CONTROLLER_FF_BUTTON);
}
static void
-_vp_minicontroller_ff_btn_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+_vp_minicontroller_ff_btn_del_cb(void *data, Evas * e, Evas_Object * obj,
+ void *event_info)
{
-// startfunc;
-// vp_play_control_reset_ff_rew();
+ /* Forward button remove cb */
}
-static void _vp_minicontroller_rew_btn_pressed_cb(void *data, Evas_Object *obj, void *event_info)
+static void _vp_minicontroller_rew_btn_pressed_cb(void *data,
+ Evas_Object * obj,
+ void *event_info)
{
VideoLogDebug("rew button pressed");
time(&press_time);
-// char *source = (char *)data;
-// if (!g_strcmp0(source, CONTROLLER_FF_SOURCE)) {
-// vp_play_control_ff(true, false, false);
-// } else {
-// vp_play_control_rew(true, false, false);
-// }
}
-static void _vp_minicontroller_rew_btn_unpressed_cb(void *data, Evas_Object *obj, void *event_info)
+static void _vp_minicontroller_rew_btn_unpressed_cb(void *data,
+ Evas_Object * obj,
+ void *event_info)
{
VideoLogDebug("rew button unpressed");
time(&release_time);
- PlayView *pPlayView = (PlayView *)data;
- if(!pPlayView) {
+ PlayView *pPlayView = (PlayView *) data;
+ if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return;
}
- if(!pPlayView->minicontroller_layout) {
+ if (!pPlayView->minicontroller_layout) {
VideoLogError("pPlayView->minicontroller_layout is NULL");
return;
}
- // vp_play_control_rew(false, false, false);
- elm_object_signal_emit(pPlayView->minicontroller_layout, "rew_btn_unpressed", "c_source");
+ elm_object_signal_emit(pPlayView->minicontroller_layout,
+ "rew_btn_unpressed", "c_source");
}
-static void _vp_minicontroller_rew_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+static void _vp_minicontroller_rew_btn_clicked_cb(void *data,
+ Evas_Object * obj,
+ void *event_info)
{
VideoLogDebug("rew button clicked");
-// if (_vp_minicontroller_is_long_press()) {
-// return;
-// }
- PlayView *pPlayView = (PlayView *)data;
- if(!pPlayView) {
+ PlayView *pPlayView = (PlayView *) data;
+ if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return;
}
- vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView, CONTROLLER_REW_BUTTON);
+
+ if (_vp_is_current_focus_available() != 0) {
+ VideoLogError
+ ("Some other application has the focus currently... Changing to paused state...");
+ stay_pause = true;
+ }
+
+ vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView,
+ CONTROLLER_REW_BUTTON);
}
static void
-_vp_minicontroller_rew_btn_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+_vp_minicontroller_rew_btn_del_cb(void *data, Evas * e, Evas_Object * obj,
+ void *event_info)
{
-// startfunc;
-// vp_play_control_reset_ff_rew();
+ /* Rewind button remove cb */
}
/*end of focused UI callbacks*/
static void
-_vp_minicontroller_update_layout(PlayView *pPlayView, bool landscape)
+_vp_minicontroller_update_layout(PlayView * pPlayView, bool landscape)
{
- if(!pPlayView) {
+ if (!pPlayView) {
VideoLogError("pPlayView is NULL");
return;
}
VP_EVAS_TIMER_DEL(pPlayView->minicon_button_timer);
- //vp_evas_object_del(pPlayView->minicontroller_layout);
+ if (pPlayView->minicontroller_layout) {
+ evas_object_del(pPlayView->minicontroller_layout);
+ pPlayView->minicontroller_layout = NULL;
+ }
if (landscape) {
VideoLogDebug("angle: 90 or 270");
- pPlayView->minicontroller_layout = _load_edj(pPlayView->win_minicon, MINICON_EDJ_NAME, "video-minicontroller-ld");
+ pPlayView->minicontroller_layout =
+ _load_edj(pPlayView->win_minicon, MINICON_EDJ_NAME,
+ "video-minicontroller-ld");
} else {
VideoLogDebug("angle: 0");
- pPlayView->minicontroller_layout = _load_edj(pPlayView->win_minicon, MINICON_EDJ_NAME, "video-minicontroller");
+ pPlayView->minicontroller_layout =
+ _load_edj(pPlayView->win_minicon, MINICON_EDJ_NAME,
+ "video-minicontroller");
}
if (!pPlayView->minicontroller_layout) {
- return ;
+ return;
}
- elm_win_resize_object_add(pPlayView->win_minicon, pPlayView->minicontroller_layout);
+ elm_win_resize_object_add(pPlayView->win_minicon,
+ pPlayView->minicontroller_layout);
- /*add focused UI related*/
- pPlayView->minicon_icon = elm_image_add(pPlayView->minicontroller_layout);
- evas_object_size_hint_align_set(pPlayView->minicon_icon, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(pPlayView->minicon_icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ /*add focused UI related */
+ pPlayView->minicon_icon =
+ elm_image_add(pPlayView->minicontroller_layout);
+ evas_object_size_hint_align_set(pPlayView->minicon_icon,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pPlayView->minicon_icon,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_image_fill_outside_set(pPlayView->minicon_icon, true);
- elm_object_part_content_set(pPlayView->minicontroller_layout, "albumart_image", pPlayView->minicon_icon);
- elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout, pPlayView->minicon_icon, NULL);
+ elm_object_part_content_set(pPlayView->minicontroller_layout,
+ "albumart_image", pPlayView->minicon_icon);
+ elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout,
+ pPlayView->minicon_icon, NULL);
elm_object_focus_allow_set(pPlayView->minicon_icon, EINA_TRUE);
/*-------> REW button ------->*/
- Evas_Object *rew_focus_btn = elm_button_add(pPlayView->minicontroller_layout);
+ Evas_Object *rew_focus_btn =
+ elm_button_add(pPlayView->minicontroller_layout);
elm_object_style_set(rew_focus_btn, "focus");
- elm_object_part_content_set(pPlayView->minicontroller_layout, "rew_btn_focus", rew_focus_btn);
-
- elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout, rew_focus_btn, NULL);
- evas_object_smart_callback_add(rew_focus_btn, "clicked", _vp_minicontroller_rew_btn_clicked_cb, pPlayView);
- evas_object_smart_callback_add(rew_focus_btn, "pressed", _vp_minicontroller_rew_btn_pressed_cb, pPlayView);
- evas_object_smart_callback_add(rew_focus_btn, "unpressed", _vp_minicontroller_rew_btn_unpressed_cb, pPlayView);
- evas_object_event_callback_add(rew_focus_btn, EVAS_CALLBACK_DEL, _vp_minicontroller_rew_btn_del_cb, NULL);
+ elm_object_part_content_set(pPlayView->minicontroller_layout,
+ "rew_btn_focus", rew_focus_btn);
+
+ elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout,
+ rew_focus_btn, NULL);
+ evas_object_smart_callback_add(rew_focus_btn, "clicked",
+ _vp_minicontroller_rew_btn_clicked_cb,
+ pPlayView);
+ evas_object_smart_callback_add(rew_focus_btn, "pressed",
+ _vp_minicontroller_rew_btn_pressed_cb,
+ pPlayView);
+ evas_object_smart_callback_add(rew_focus_btn, "unpressed",
+ _vp_minicontroller_rew_btn_unpressed_cb,
+ pPlayView);
+ evas_object_event_callback_add(rew_focus_btn, EVAS_CALLBACK_DEL,
+ _vp_minicontroller_rew_btn_del_cb,
+ NULL);
/*-------> play/pause button ------->*/
- Evas_Object *play_pause_focus_btn = elm_button_add(pPlayView->minicontroller_layout);
+ Evas_Object *play_pause_focus_btn =
+ elm_button_add(pPlayView->minicontroller_layout);
elm_object_style_set(play_pause_focus_btn, "focus");
- elm_object_part_content_set(pPlayView->minicontroller_layout, "play_pause_focus", play_pause_focus_btn);
- elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout, play_pause_focus_btn, NULL);
- evas_object_smart_callback_add(play_pause_focus_btn, "clicked", _vp_minicontroller_play_pause_btn_clicked_cb, pPlayView);
+ elm_object_part_content_set(pPlayView->minicontroller_layout,
+ "play_pause_focus", play_pause_focus_btn);
+ elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout,
+ play_pause_focus_btn, NULL);
+ evas_object_smart_callback_add(play_pause_focus_btn, "clicked",
+ _vp_minicontroller_play_pause_btn_clicked_cb,
+ pPlayView);
/*------->FF button ------->*/
- Evas_Object *ff_focus_btn = elm_button_add(pPlayView->minicontroller_layout);
+ Evas_Object *ff_focus_btn =
+ elm_button_add(pPlayView->minicontroller_layout);
elm_object_style_set(ff_focus_btn, "focus");
- elm_object_part_content_set(pPlayView->minicontroller_layout, "ff_btn_focus", ff_focus_btn);
-
- elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout, ff_focus_btn, NULL);
- evas_object_smart_callback_add(ff_focus_btn, "clicked", _vp_minicontroller_ff_btn_clicked_cb, pPlayView);
- evas_object_smart_callback_add(ff_focus_btn, "pressed", _vp_minicontroller_ff_btn_pressed_cb, pPlayView);
- evas_object_smart_callback_add(ff_focus_btn, "unpressed", _vp_minicontroller_ff_btn_unpressed_cb, pPlayView);
- evas_object_event_callback_add(ff_focus_btn, EVAS_CALLBACK_DEL, _vp_minicontroller_ff_btn_del_cb, NULL);
+ elm_object_part_content_set(pPlayView->minicontroller_layout,
+ "ff_btn_focus", ff_focus_btn);
+
+ elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout,
+ ff_focus_btn, NULL);
+ evas_object_smart_callback_add(ff_focus_btn, "clicked",
+ _vp_minicontroller_ff_btn_clicked_cb,
+ pPlayView);
+ evas_object_smart_callback_add(ff_focus_btn, "pressed",
+ _vp_minicontroller_ff_btn_pressed_cb,
+ pPlayView);
+ evas_object_smart_callback_add(ff_focus_btn, "unpressed",
+ _vp_minicontroller_ff_btn_unpressed_cb,
+ pPlayView);
+ evas_object_event_callback_add(ff_focus_btn, EVAS_CALLBACK_DEL,
+ _vp_minicontroller_ff_btn_del_cb, NULL);
/*-------> close button ------->*/
- edje_object_signal_callback_add(_EDJ(pPlayView->minicontroller_layout), "*", "*", _minicontroller_action_cb, pPlayView);
+ edje_object_signal_callback_add(_EDJ(pPlayView->minicontroller_layout),
+ "*", "*", _minicontroller_action_cb,
+ pPlayView);
_vp_minicontroller_update_btn(pPlayView);
-// _vp_minicontroller_register_reader(pPlayView);
}
-static void
-_vp_minicontroller_title_set(PlayView *pPlayView)
+static void _vp_minicontroller_title_set(PlayView * pPlayView)
{
if (!pPlayView) {
VideoLogError("pPlayView is null");
VideoLogError("pPlayView->minicontroller_layout is null");
return;
}
- Evas_Object *label = elm_object_part_content_get(pPlayView->minicontroller_layout, "elm.text");
+ Evas_Object *label =
+ elm_object_part_content_get(pPlayView->minicontroller_layout,
+ "elm.text");
int r = 0;
int g = 0;
int b = 0;
int a = 255;
- //pTitle = vp_play_util_get_title_from_path(pPlayView->szMediaURL);
- char *markup_title = elm_entry_utf8_to_markup(vp_play_util_get_title_from_path(pPlayView->szMediaURL));
- //char *markup_artist = elm_entry_utf8_to_markup(current_item->artist);
- char *title_format = "<align=left><font_size=%d><color=#%02x%02x%02x%02x>%s</color></font_size></align>";
+ char *markup_title =
+ elm_entry_utf8_to_markup(vp_play_util_get_title_from_path
+ (pPlayView->szMediaURL));
+ char *title_format =
+ "<align=left><font_size=%d><color=#%02x%02x%02x%02x>%s</color></font_size></align>";
char *title = NULL;
- if ((markup_title == NULL || strlen(markup_title) == 0) ){
- // && (markup_artist == NULL || strlen(markup_artist) == 0)) {
+ if ((markup_title == NULL || strlen(markup_title) == 0)) {
title = NULL;
} else {
- title = g_strdup_printf(title_format, 24, r, g, b, a, markup_title);
+ title =
+ g_strdup_printf(title_format, 24, r, g, b, a, markup_title);
}
if (!label) {
// set the label text
elm_object_text_set(label, title);
evas_object_show(label);
- elm_object_part_content_set(pPlayView->minicontroller_layout, "elm.text", label);
+ elm_object_part_content_set(pPlayView->minicontroller_layout,
+ "elm.text", label);
} else {
elm_object_text_set(label, title);
}
VP_FREE(title);
VP_FREE(markup_title);
-// SAFE_FREE(markup_artist);
evas_object_show(label);
}
-void
-vp_minicontroller_update(PlayView *pPlayView, bool with_title)
+void vp_minicontroller_update(PlayView * pPlayView, bool with_title)
{
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
VideoLogError("pPlayView->win_minicon is NULL");
return;
}
-// MP_CHECK(!ad->is_lcd_off);
-
//_vp_minicontroller_update_btn(pPlayView);
VideoLogDebug("Updating thumbnail!!!!!!!!!!!!!!");
char *thumbnail_path = NULL;
- vp_media_contents_get_video_thumbnail_path(pPlayView->szMediaURL, &thumbnail_path);
+ vp_media_contents_get_video_thumbnail_path(pPlayView->szMediaURL,
+ &thumbnail_path);
if (thumbnail_path == NULL) {
- VideoLogInfo("Cannot generate thumbnail for video file. Switching to default path.");
- char edj_path[1024] = {0};
+ VideoLogInfo
+ ("Cannot generate thumbnail for video file. Switching to default path.");
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_IMAGE_NAME_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_IMAGE_NAME_EDJ);
free(path);
- elm_image_file_set(pPlayView->minicon_icon, edj_path, VP_PLAY_NORMAL_AUDIO_ONLY_IMG);
+ elm_image_file_set(pPlayView->minicon_icon, edj_path,
+ VP_PLAY_NORMAL_AUDIO_ONLY_IMG);
evas_object_color_set(pPlayView->minicon_icon, 0, 0, 0, 255);
} else {
- VideoLogInfo("thumbnail = %s:%s", pPlayView->szMediaURL, thumbnail_path);
+ VideoLogInfo("thumbnail = %s:%s", pPlayView->szMediaURL,
+ thumbnail_path);
elm_image_file_set(pPlayView->minicon_icon, thumbnail_path, NULL);
}
evas_object_show(pPlayView->minicon_icon);
evas_object_show(pPlayView->minicontroller_layout);
}
-/*
-int
-vp_minicontroller_hide(struct appdata *ad)
-{
- DEBUG_TRACE("minicontroller view hide!!\n");
- vp_retvm_if(ad == NULL, -1, "appdata is NULL");
- MP_CHECK_VAL(ad->win_minicon, -1);
-
- evas_object_hide(ad->win_minicon);
- ad->b_minicontroller_show = FALSE;
- vp_ecore_timer_del(ad->minicon_progress_timer);
- vp_ecore_timer_del(ad->minicon_button_timer);
-
- return 0;
-
-}
-*/
-int vp_minicontroller_destroy(PlayView *pPlayView)
+int vp_minicontroller_destroy(PlayView * pPlayView)
{
VideoLogDebug("minicontroller view destroy!!");
VideoLogError("pPlayView->win_minicon is NULL");
return -1;
}
- /*stop playing before destroy*/
- vp_mm_player_state_t nState = vp_play_normal_view_get_player_state(pPlayView);
+ /*stop playing before destroy */
+ vp_mm_player_state_t nState =
+ vp_play_normal_view_get_player_state(pPlayView);
if (nState == VP_MM_PLAYER_STATE_PLAYING) {
- /*if playing state then on click it should pause and set button for play*/
- elm_object_signal_emit(pPlayView->minicontroller_layout, "set_pause", "c_source");
+ /*if playing state then on click it should pause and set button for play */
+ elm_object_signal_emit(pPlayView->minicontroller_layout,
+ "set_pause", "c_source");
}
if (pPlayView->win_lockmini) {
pPlayView->minicontroller_layout = NULL;
pPlayView->b_minicontroller_show = FALSE;
}
- if (pPlayView->win_minicon)
- {
+ if (pPlayView->win_minicon) {
evas_object_hide(pPlayView->win_minicon);
evas_object_del(pPlayView->win_minicon);
pPlayView->win_minicon = NULL;
}
- //VP_EVAS_TIMER_DEL(pPlayView->minicon_progress_timer);
+
VP_EVAS_TIMER_DEL(pPlayView->minicon_button_timer);
pPlayView->minicon_visible = false;
return 0;
}
-void vp_minicontroller_rotate(PlayView *pPlayView, video_play_rotate_t angle)
+void vp_minicontroller_rotate(PlayView * pPlayView, int angle)
{
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
int w = 0;
const char *signal = NULL;
- bool landscape = _vp_minicontroller_landscape_is(pPlayView, angle);
+ bool landscape = _vp_minicontroller_landscape_is(pPlayView, angle);
if (landscape) {
- VideoLogError("llllllllllllllllllllllllllllllllllll-====%d",landscape);
+ VideoLogDebug("Landscape mode enabled");
signal = "sig_set_landscape_mode";
w = MINI_CONTROLLER_WIDTH_LANDSCAPE;
landscape = true;
} else {
+ VideoLogDebug("Portrait mode enabled");
signal = "sig_set_portrait_mode";
w = MINI_CONTROLLER_WIDTH;
landscape = false;
}
- elm_object_signal_emit(pPlayView->minicontroller_layout, signal, "c_source");
+ elm_object_signal_emit(pPlayView->minicontroller_layout, signal,
+ "c_source");
double scale = elm_config_scale_get();
- evas_object_resize(pPlayView->win_minicon, w * scale, MINI_CONTROLLER_HEIGHT * scale);
-// _vp_minicontroller_update_layout(pPlayView, landscape);
+ evas_object_resize(pPlayView->win_minicon, w * scale,
+ MINI_CONTROLLER_HEIGHT * scale);
+ _vp_minicontroller_update_layout(pPlayView, landscape);
vp_minicontroller_update(pPlayView, true);
}
-
-//void
-//vp_minicontroller_visible_set(struct appdata *ad, bool visible)
-//{
-// DEBUG_TRACE("visible: %d", visible);
-// MP_CHECK(ad);
-// MP_CHECK(ad->win_minicon);
-// MP_CHECK(ad->minicontroller_layout);
-//
-// ad->minicon_visible = visible;
-// _vp_minicontroller_title_set(ad);
-// vp_minicontroller_update_control(ad);
-//
-// if (visible) {
-//#ifdef MINICONTROLLER_ENABLE_PROGRESS
-// _minicontroller_progress_timer_add(ad);
-//#endif
-// } else {
-// display_state_e lock_state;
-// int ret = device_display_get_state(&lock_state);
-// if (ret == DEVICE_ERROR_NONE) {
-// ERROR_TRACE("[SUCCESSFULL] return value %d", ret);
-// } else {
-// ERROR_TRACE("[ERROR] Return value is %d", ret);
-// }
-//
-// DEBUG_TRACE("lock_state: %d", lock_state);
-// if (lock_state == DISPLAY_STATE_SCREEN_OFF || lock_state == DISPLAY_STATE_SCREEN_DIM) {
-// ERROR_TRACE("Timer deleted");
-// vp_ecore_timer_del(ad->minicon_progress_timer);
-// }
-// }
-//}
-//
-//bool
-//vp_minicontroller_visible_get(struct appdata *ad)
-//{
-// MP_CHECK_FALSE(ad);
-// MP_CHECK_FALSE(ad->win_minicon);
-//
-// return ad->minicon_visible;
-//}
-//
-//void vp_minicontroller_on_lcd_event(struct appdata *ad, bool lcd_on)
-//{
-// DEBUG_TRACE("lcd_on [%d]", lcd_on);
-// MP_CHECK(ad);
-// MP_CHECK(ad->win_minicon);
-//
-// if (lcd_on && vp_util_is_now_active_player()) {
-// vp_minicontroller_show(ad);
-// }
-//
-// vp_minicontroller_visible_set(ad, lcd_on);
-//}
-//
-//void vp_minicontroller_update_progressbar(struct appdata *ad)
-//{
-//#ifdef MINICONTROLLER_ENABLE_PROGRESS
-// _vp_minicontroller_update_elapsed_time(ad, false);
-//#endif
-//}
/*
-* 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.
-*
-*/
-
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-play-value-define.h"
#include "vp-play-log.h"
#include "vp-util.h"
-Evas_Object *vp_popup_create(Evas_Object *pParent,
- video_popup_style_t nStyle, char *szTitle,
- char *szContent, double dTimeOut,
- Evas_Smart_Cb pTimeoutFunc,
- Eext_Event_Cb pCancelKeyCb,
- Evas_Object_Event_Cb pCancelMouseCb,
- void *pUserData)
+Evas_Object *vp_popup_create(Evas_Object * pParent,
+ video_popup_style_t nStyle, char *szTitle,
+ char *szContent, double dTimeOut,
+ Evas_Smart_Cb pTimeoutFunc,
+ Eext_Event_Cb pCancelKeyCb,
+ Evas_Object_Event_Cb pCancelMouseCb,
+ void *pUserData)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
return NULL;
}
- /*if (nStyle == POPUP_STYLE_DEFAULT) {
- //elm_object_style_set(pObj, "popup/default");
- }
- else if (nStyle == POPUP_STYLE_MENU_LIST) {
- elm_object_style_set(pObj, "content_no_vhpad");
- }
- else if (nStyle == POPUP_STYLE_EXPAND) {
- //elm_object_style_set(pObj, "content_expand");
- elm_object_style_set(pObj, "content_no_vhpad");
- } */
if (nStyle == POPUP_STYLE_FULLSCREEN_NO_CANCEL_BTN) {
elm_layout_theme_set(pObj, "popup", "fullsrceen", "default");
if (nStyle == POPUP_STYLE_FULLSCREEN_NO_TITLE_NO_CANCEL_BTN) {
elm_layout_theme_set(pObj, "popup", "fullsrceen/notitle",
- "default");
+ "default");
}
evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
if (szTitle) {
elm_object_part_text_set(pObj, "title,text", szTitle);
elm_popup_timeout_set(pObj, dTimeOut);
if (pTimeoutFunc) {
evas_object_smart_callback_add(pObj, "timeout", pTimeoutFunc,
- (void *) pUserData);
+ (void *) pUserData);
}
}
if (pCancelKeyCb) {
eext_object_event_callback_add(pObj, EEXT_CALLBACK_BACK,
- pCancelKeyCb, (void *) pUserData);
+ pCancelKeyCb, (void *) pUserData);
}
if (nStyle == POPUP_STYLE_DEFAULT_NO_CANCEL_BTN
- || nStyle == POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN
- || nStyle == POPUP_STYLE_EXPAND_NO_CANCEL_BTN
- || nStyle == POPUP_STYLE_PROGRESS_WITH_NO_CANCEL_BTN)
+ || nStyle == POPUP_STYLE_MENU_LIST_NO_CANCEL_BTN
+ || nStyle == POPUP_STYLE_EXPAND_NO_CANCEL_BTN
+ || nStyle == POPUP_STYLE_PROGRESS_WITH_NO_CANCEL_BTN)
evas_object_smart_callback_add(pObj, "block,clicked",
- pCancelKeyCb, (void *) pUserData);
+ pCancelKeyCb, (void *) pUserData);
if (pCancelMouseCb) {
evas_object_event_callback_add(pObj, EVAS_CALLBACK_MOUSE_UP,
- pCancelMouseCb,
- (void *) pUserData);
+ pCancelMouseCb, (void *) pUserData);
}
return pObj;
}
-Evas_Object *vp_two_button_popup_create(Evas_Object *pParent,
- char *szTitle,
- char *szContent,
- char *pLeftButtonText,
- Evas_Smart_Cb leftButtonCb,
- char *pRightButtonText,
- Evas_Smart_Cb rightButtonCb,
- const void *pUserData)
+Evas_Object *vp_two_button_popup_create(Evas_Object * pParent,
+ char *szTitle,
+ char *szContent,
+ char *pLeftButtonText,
+ Evas_Smart_Cb leftButtonCb,
+ char *pRightButtonText,
+ Evas_Smart_Cb rightButtonCb,
+ const void *pUserData)
{
Evas_Object *pPopup = NULL;
Evas_Object *pBtn1 = NULL;
}
evas_object_size_hint_weight_set(pPopup, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
if (szContent) {
elm_object_part_text_set(pPopup, "default", szContent);
}
elm_object_part_content_set(pPopup, "button1", pBtn1);
if (leftButtonCb)
evas_object_smart_callback_add(pBtn1, "clicked", leftButtonCb,
- (const void *) pUserData);
+ (const void *) pUserData);
pBtn2 = elm_button_add(pPopup);
elm_object_style_set(pBtn2, "popup");
if (rightButtonCb)
evas_object_smart_callback_add(pBtn2, "clicked", rightButtonCb,
- (const void *) pUserData);
+ (const void *) pUserData);
evas_object_show(pPopup);
}
#ifdef _SUBTITLE_MULTI_LANGUAGE
-Evas_Object *vp_title_two_button_popup_create(Evas_Object *pParent,
- char *szTitle,
- char *szContent,
- char *pLeftButtonText,
- Evas_Smart_Cb leftButtonCb,
- char *pRightButtonText,
- Evas_Smart_Cb rightButtonCb,
- const void *pUserData)
+Evas_Object *vp_title_two_button_popup_create(Evas_Object * pParent,
+ char *szTitle,
+ char *szContent,
+ char *pLeftButtonText,
+ Evas_Smart_Cb leftButtonCb,
+ char *pRightButtonText,
+ Evas_Smart_Cb rightButtonCb,
+ const void *pUserData)
{
Evas_Object *pPopup = NULL;
pPopup =
- vp_two_button_popup_create(pParent, NULL, szContent,
- pLeftButtonText, leftButtonCb,
- pRightButtonText, rightButtonCb,
- pUserData);
+ vp_two_button_popup_create(pParent, NULL, szContent,
+ pLeftButtonText, leftButtonCb,
+ pRightButtonText, rightButtonCb,
+ pUserData);
if (szTitle && pPopup) {
elm_object_part_text_set(pPopup, "title,text", szTitle);
}
return pPopup;
}
#endif
-bool vp_popup_check_landspace_by_win(Evas_Object *pWin)
+bool vp_popup_check_landspace_by_win(Evas_Object * pWin)
{
if (!pWin) {
VideoLogError("win is NULL.");
return bLandSpace;
}
-void vp_popup_set_popup_min_size(Evas_Object *pWin, Evas_Object *pBox,
- int nListCount,
- video_list_popup_style_t eStyle)
+void vp_popup_set_popup_min_size(Evas_Object * pWin, Evas_Object * pBox,
+ int nListCount,
+ video_list_popup_style_t eStyle)
{
if (!pWin) {
VideoLogError("win is NULL.");
case VIDEO_POPUP_2_TEXT_1_ICON:
if (vp_popup_check_landspace_by_win(pWin)) {
nMinHeight =
- VP_POPUP_LIST_2_TEXT_1_ICON_HEIGHT_L(nListCount);
+ VP_POPUP_LIST_2_TEXT_1_ICON_HEIGHT_L(nListCount);
} else {
nMinHeight =
- VP_POPUP_LIST_2_TEXT_1_ICON_HEIGHT(nListCount);
+ VP_POPUP_LIST_2_TEXT_1_ICON_HEIGHT(nListCount);
}
break;
case VIDEO_POPUP_LOADING_LIST:
}
evas_object_size_hint_min_set(pBox,
- VP_POPUP_LIST_WIDTH * VP_SCALE,
- nMinHeight * VP_SCALE);
+ VP_POPUP_LIST_WIDTH * VP_SCALE,
+ nMinHeight * VP_SCALE);
}
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
#include "vp-play-type-define.h"
static void _vp_play_progressbar_destory_handle(ProgressWidget *
- pProgressWidget);
+ pProgressWidget);
/* callback functions */
static void __vp_play_progressbar_key_focus_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
elm_object_signal_emit(pProgressWidget->pLayout,
- VP_NORMAL_SIGNAL_PROGRESS_PRESS, "*");
+ VP_NORMAL_SIGNAL_PROGRESS_PRESS, "*");
VideoLogInfo("progress focus in");
}
static void __vp_play_progressbar_key_unfocus_cb(void *pUserData,
- Evas_Object *pObj,
- void *pEventInfo)
+ Evas_Object * pObj,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
}
elm_object_signal_emit(pProgressWidget->pLayout,
- VP_NORMAL_SIGNAL_PROGRESS_UNPRESS, "*");
+ VP_NORMAL_SIGNAL_PROGRESS_UNPRESS, "*");
VideoLogInfo("progress focus out");
}
/* internal functions */
static void _vp_play_progressbar_value_update(ProgressWidget *
- pProgressWidget)
+ pProgressWidget)
{
if (pProgressWidget == NULL) {
VideoLogError("pProgressWidget is NULL");
char szPlayingTime[PROGRESSBAR_TIME_LENGTH] = { 0, };
snprintf(szPlayingTime, PROGRESSBAR_TIME_LENGTH,
- "%" PROGRESSBAR_TIME_FORMAT,
- PROGRESSBAR_TIME_ARGS(pProgressWidget->nCurrentPos / 1000));
+ "%" PROGRESSBAR_TIME_FORMAT,
+ PROGRESSBAR_TIME_ARGS(pProgressWidget->nCurrentPos / 1000));
dPlayedRatio =
- ((double) pProgressWidget->nCurrentPos /
- (double) pProgressWidget->nDuration);
+ ((double) pProgressWidget->nCurrentPos /
+ (double) pProgressWidget->nDuration);
dBufferingRatio =
- ((double) pProgressWidget->nBufferingPos / (double) 100);
+ ((double) pProgressWidget->nBufferingPos / (double) 100);
edje_object_part_drag_value_set(_EDJ(pProgressWidget->pLayout),
- VP_PLAY_SWALLOW_PROGRESS_DRAG_RECT,
- dPlayedRatio, 0.0);
+ VP_PLAY_SWALLOW_PROGRESS_DRAG_RECT,
+ dPlayedRatio, 0.0);
edje_object_part_drag_value_set(_EDJ(pProgressWidget->pLayout),
- "pv.progress.buffering",
- dBufferingRatio, 0.0);
+ "pv.progress.buffering",
+ dBufferingRatio, 0.0);
- //elm_object_part_text_set(pProgressWidget->pStartLabel, "elm.text", szPlayingTime);
elm_object_part_text_set(pProgressWidget->pLayout,
- VP_PLAY_SWALLOW_PROGRESS_PLAYING_LABEL,
- szPlayingTime);
+ VP_PLAY_SWALLOW_PROGRESS_PLAYING_LABEL,
+ szPlayingTime);
}
static void _vp_play_progressbar_destory_handle(ProgressWidget *
- pProgressWidget)
+ pProgressWidget)
{
if (pProgressWidget == NULL) {
VideoLogError("pProgressWidget is NULL");
vp_play_progressbar_unrealize((progressbar_handle) pProgressWidget);
if (pProgressWidget->pFocusPoint) {
evas_object_smart_callback_del(pProgressWidget->pFocusPoint,
- "focused",
- __vp_play_progressbar_key_focus_cb);
+ "focused",
+ __vp_play_progressbar_key_focus_cb);
evas_object_smart_callback_del(pProgressWidget->pFocusPoint,
- "unfocused",
- __vp_play_progressbar_key_unfocus_cb);
+ "unfocused",
+ __vp_play_progressbar_key_unfocus_cb);
VP_EVAS_DEL(pProgressWidget->pFocusPoint);
}
}
static Evas_Object *_vp_play_progressbar_create_layout(Evas_Object *
- pParent,
- video_progressbar_type_t
- nType)
+ pParent,
+ video_progressbar_type_t
+ nType)
{
if (!pParent) {
VideoLogError("Parent is NULL");
VideoLogError("elm_layout_add object is NULL");
return NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_PROGRESSBAR_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_PROGRESSBAR_EDJ_PATH);
free(path);
if (nType == VIDEO_PROGRESSBAR_TYPE_NORMAL) {
bRet =
- elm_layout_file_set(pObj, edj_path,
- VP_PLAY_EDJ_GROUP_PROGRESSBAR);
+ elm_layout_file_set(pObj, edj_path,
+ VP_PLAY_EDJ_GROUP_PROGRESSBAR);
if (bRet != EINA_TRUE) {
VideoLogError("elm_layout_file_set fail");
return NULL;
}
-static void _vp_play_progressbar_layout_del_cb(void *pUserData, Evas *e,
- Evas_Object *pObject,
- void *pEventInfo)
+static void _vp_play_progressbar_layout_del_cb(void *pUserData, Evas * e,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogError("pProgressWidget is NULL");
}
static bool _vp_play_progressbar_init_layout(ProgressWidget *
- pProgressWidget)
+ pProgressWidget)
{
if (pProgressWidget == NULL) {
VideoLogError("pProgressWidget is NULL");
Evas_Object *pParent = pProgressWidget->pParent;
pProgressWidget->pLayout =
- _vp_play_progressbar_create_layout(pParent,
- pProgressWidget->nType);
+ _vp_play_progressbar_create_layout(pParent,
+ pProgressWidget->nType);
if (pProgressWidget->pLayout == NULL) {
VideoLogError("_vp_play_progressbar_create_layout is fail");
return FALSE;
}
evas_object_event_callback_add(pProgressWidget->pLayout,
- EVAS_CALLBACK_DEL,
- _vp_play_progressbar_layout_del_cb,
- (void *) pProgressWidget);
+ EVAS_CALLBACK_DEL,
+ _vp_play_progressbar_layout_del_cb,
+ (void *) pProgressWidget);
pProgressWidget->pFocusPoint =
- vp_button_create(pProgressWidget->pLayout, "focus", NULL, NULL,
- NULL, NULL, (void *) pProgressWidget);
+ vp_button_create(pProgressWidget->pLayout, "focus", NULL, NULL,
+ NULL, NULL, (void *) pProgressWidget);
if (!pProgressWidget->pFocusPoint) {
VideoLogError("elm_button_add is fail");
return FALSE;
}
elm_object_focus_next_object_set(pProgressWidget->pFocusPoint,
- pProgressWidget->pFocusPoint,
- ELM_FOCUS_RIGHT);
+ pProgressWidget->pFocusPoint,
+ ELM_FOCUS_RIGHT);
elm_object_focus_next_object_set(pProgressWidget->pFocusPoint,
- pProgressWidget->pFocusPoint,
- ELM_FOCUS_LEFT);
+ pProgressWidget->pFocusPoint,
+ ELM_FOCUS_LEFT);
evas_object_smart_callback_add(pProgressWidget->pFocusPoint,
- "focused",
- __vp_play_progressbar_key_focus_cb,
- pProgressWidget);
+ "focused",
+ __vp_play_progressbar_key_focus_cb,
+ pProgressWidget);
evas_object_smart_callback_add(pProgressWidget->pFocusPoint,
- "unfocused",
- __vp_play_progressbar_key_unfocus_cb,
- pProgressWidget);
+ "unfocused",
+ __vp_play_progressbar_key_unfocus_cb,
+ pProgressWidget);
elm_object_part_content_set(pProgressWidget->pLayout,
- "pv.progress.point.focus",
- pProgressWidget->pFocusPoint);
+ "pv.progress.point.focus",
+ pProgressWidget->pFocusPoint);
return TRUE;
}
-progressbar_handle vp_play_progressbar_create(Evas_Object *pParent,
- video_progressbar_type_t
- nType)
+progressbar_handle vp_play_progressbar_create(Evas_Object * pParent,
+ video_progressbar_type_t
+ nType)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
}
Evas_Object *vp_play_progressbar_get_object(progressbar_handle
- pWidgetHandle)
+ pWidgetHandle)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
Evas_Object *vp_play_progressbar_get_focus_object(progressbar_handle
- pWidgetHandle)
+ pWidgetHandle)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_progressbar_set_duration(progressbar_handle pWidgetHandle,
- int nDuration)
+ int nDuration)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
pProgressWidget->nDuration = nDuration;
snprintf(szDurationTime, PROGRESSBAR_TIME_LENGTH,
- "%" PROGRESSBAR_TIME_FORMAT,
- PROGRESSBAR_TIME_ARGS(pProgressWidget->nDuration / 1000));
+ "%" PROGRESSBAR_TIME_FORMAT,
+ PROGRESSBAR_TIME_ARGS(pProgressWidget->nDuration / 1000));
- //elm_object_part_text_set(pProgressWidget->pTotalLabel, "elm.text", szDurationTime);
elm_object_part_text_set(pProgressWidget->pLayout,
- VP_PLAY_SWALLOW_PROGRESS_DURATION_LABEL,
- szDurationTime);
+ VP_PLAY_SWALLOW_PROGRESS_DURATION_LABEL,
+ szDurationTime);
return TRUE;
}
bool vp_play_progressbar_set_position(progressbar_handle pWidgetHandle,
- int nPosition)
+ int nPosition)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_progressbar_set_buffering_position(progressbar_handle
- pWidgetHandle,
- int nBufferinPosition)
+ pWidgetHandle,
+ int nBufferinPosition)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_progressbar_set_landscape_mode(progressbar_handle
- pWidgetHandle,
- bool bLandscape)
+ pWidgetHandle, bool bLandscape)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
if (bLandscape) {
elm_object_signal_emit(pProgressWidget->pLayout,
- VP_NORMAL_SIGNAL_PROGRESS_LANDSCAPE_MODE,
- "*");
+ VP_NORMAL_SIGNAL_PROGRESS_LANDSCAPE_MODE,
+ "*");
} else {
elm_object_signal_emit(pProgressWidget->pLayout,
- VP_NORMAL_SIGNAL_PROGRESS_PORTRAIT_MODE,
- "*");
+ VP_NORMAL_SIGNAL_PROGRESS_PORTRAIT_MODE,
+ "*");
}
return TRUE;
}
bool vp_play_progressbar_set_opacity(progressbar_handle pWidgetHandle,
- bool bOpacity)
+ bool bOpacity)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
if (bOpacity) {
elm_object_signal_emit(pProgressWidget->pLayout,
- VP_NORMAL_SIGNAL_PROGRESS_OPACITY_60, "*");
+ VP_NORMAL_SIGNAL_PROGRESS_OPACITY_60, "*");
} else {
elm_object_signal_emit(pProgressWidget->pLayout,
- VP_NORMAL_SIGNAL_PROGRESS_OPACITY_DEFAULT,
- "*");
+ VP_NORMAL_SIGNAL_PROGRESS_OPACITY_DEFAULT,
+ "*");
}
return TRUE;
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
#endif
#define VP_SUBTITLE_SET_CAPTION_WINDOW_COLOR_ID 3
-#define VP_SUBTITLE_PROTRAIT_W 720
-#define VP_SUBTITLE_PROTRAIT_H 990
-#define VP_SUBTITLE_LANDSCAPE_W 1280
-#define VP_SUBTITLE_LANDSCAPE_H 530
+#define VP_SUBTITLE_PROTRAIT_W 720
+#define VP_SUBTITLE_PROTRAIT_H 990
+#define VP_SUBTITLE_LANDSCAPE_W 1280
+#define VP_SUBTITLE_LANDSCAPE_H 530
#define VP_NORMAL_SUTITLE_TEXT_STYLE \
"DEFAULT='font=Tizen:style=Roman align=center valign=bottom wrap=word'"\
"b='+ font=Tizen:style=Roman'" \
"tab='\t'"
-void _vp_play_subtitle_destroy_handle(Subtitle *pSubtitle);
+void _vp_play_subtitle_destroy_handle(Subtitle * pSubtitle);
/* callback functions */
/* internal functions */
-void _vp_play_subtitle_destroy_handle(Subtitle *pSubtitle)
+void _vp_play_subtitle_destroy_handle(Subtitle * pSubtitle)
{
if (pSubtitle == NULL) {
VideoLogError("pSubtitle is NULL");
VP_FREE(pSubtitle);
}
-static Evas_Object *_vp_play_subtitle_create_layout(Evas_Object *pParent,
- vp_subtitle_type_t
- nType)
+static Evas_Object *_vp_play_subtitle_create_layout(Evas_Object * pParent,
+ vp_subtitle_type_t
+ nType)
{
if (!pParent) {
VideoLogError("Parent is NULL");
VideoLogError("elm_layout_add object is NULL");
return NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_SUBTITLE_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_SUBTITLE_EDJ_PATH);
free(path);
if (nType == VP_SUBTITLE_TYPE_NORMAL) {
bRet =
- elm_layout_file_set(pObj, edj_path,
- VP_PLAY_EDJ_GROUP_SUBTITLE_MULTI);
+ elm_layout_file_set(pObj, edj_path,
+ VP_PLAY_EDJ_GROUP_SUBTITLE_MULTI);
} else if (nType == VP_SUBTITLE_TYPE_MULTI) {
bRet =
- elm_layout_file_set(pObj, edj_path,
- VP_PLAY_EDJ_GROUP_SUBTITLE_MULTI);
+ elm_layout_file_set(pObj, edj_path,
+ VP_PLAY_EDJ_GROUP_SUBTITLE_MULTI);
}
if (bRet != EINA_TRUE) {
return pObj;
}
-static void _vp_play_subtitle_layout_del_cb(void *pUserData, Evas *e,
- Evas_Object *pObject,
- void *pEventInfo)
+static void _vp_play_subtitle_layout_del_cb(void *pUserData, Evas * e,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogError("pSubtitle is NULL");
}
-static bool _vp_play_subtitle_init_layout(Subtitle *pSubtitle,
- vp_subtitle_type_t nType)
+static bool _vp_play_subtitle_init_layout(Subtitle * pSubtitle,
+ vp_subtitle_type_t nType)
{
if (pSubtitle == NULL) {
VideoLogError("pSubtitle is NULL");
pSubtitle->pTextBlock = NULL;
evas_object_event_callback_add(pSubtitle->pLayout, EVAS_CALLBACK_DEL,
- _vp_play_subtitle_layout_del_cb,
- (void *) pSubtitle);
+ _vp_play_subtitle_layout_del_cb,
+ (void *) pSubtitle);
return TRUE;
}
-void vp_play_subtitle_text_update(Subtitle *pSubtitle, const char *szTxt)
+void vp_play_subtitle_text_update(Subtitle * pSubtitle, const char *szTxt)
{
if (!pSubtitle || !pSubtitle->pLayout) {
VideoLogError("pSubtitle is NULL");
if (!szTxt || strlen(szTxt) == 0) {
VideoLogWarning
- ("Text is null or empty, need hide caption window.");
+ ("Text is null or empty, need hide caption window.");
vp_play_subtitle_set_caption_win_color(pSubtitle, FALSE);
} else if (!pSubtitle->bShowCaptionWin) {
VideoLogWarning("Caption window is hidden, need show it again!");
}
#else
+ VP_FREE(pSubtitle->pFontColorHex);
+ vp_play_preference_get_subtitle_font_color_hex_key(&
+ (pSubtitle->
+ pFontColorHex));
+
VideoLogInfo
- ("pSubtitle->pFontColorHex %s, pSubtitle->pBGColorHex is %s",
- pSubtitle->pFontColorHex, pSubtitle->pBGColorHex);
+ ("pSubtitle->pFontColorHex %s, pSubtitle->pBGColorHex is %s",
+ pSubtitle->pFontColorHex, pSubtitle->pBGColorHex);
if (pSubtitle->pFontColorHex) {
szColor = strdup(pSubtitle->pFontColorHex);
} else {
#ifdef SUBTITLE_K_FEATURE
szTxtFormat =
- g_strdup_printf(VP_SUBTITLE_STRING_TXT_FORMAT, nSize, szFontEdge,
- pSubtitle->szFontName, szFontWeight, szColor,
- szBGColor, szBGColorOn, szAlignment, szOutput);
+ g_strdup_printf(VP_SUBTITLE_STRING_TXT_FORMAT, nSize, szFontEdge,
+ pSubtitle->szFontName, szFontWeight, szColor,
+ szBGColor, szBGColorOn, szAlignment, szOutput);
#else
szTxtFormat =
- g_strdup_printf(VP_SUBTITLE_STRING_TXT_FORMAT, nSize, szFontEdge,
- pSubtitle->szFontName, szFontWeight, szColor,
- szBGColor, szBGColorOn, szOutput);
+ g_strdup_printf(VP_SUBTITLE_STRING_TXT_FORMAT, nSize, szFontEdge,
+ pSubtitle->szFontName, szFontWeight, szColor,
+ szBGColor, szBGColorOn, szOutput);
#endif
if (pSubtitle->pTextBlock) {
evas_object_textblock_text_markup_set(pSubtitle->pTextBlock,
- szTxtFormat);
+ szTxtFormat);
} else {
elm_object_part_text_set(pSubtitle->pLayout,
- VP_PLAY_PART_SUBTITLE_TEXT, szTxtFormat);
+ VP_PLAY_PART_SUBTITLE_TEXT, szTxtFormat);
}
VP_FREE(szFontEdge);
/* external functions */
-subtitle_handle vp_play_subtitle_create(Evas_Object *pParent,
- vp_subtitle_type_t nType)
+subtitle_handle vp_play_subtitle_create(Evas_Object * pParent,
+ vp_subtitle_type_t nType)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
}
bool vp_play_subtitle_is_realize(subtitle_handle pWidgetHandle,
- bool *bIsRealize)
+ bool * bIsRealize)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_subtitle_set_font(subtitle_handle pWidgetHandle,
- char *szFontName)
+ char *szFontName)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_subtitle_get_font(subtitle_handle pWidgetHandle,
- char **szFontName)
+ char **szFontName)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_subtitle_set_size(subtitle_handle pWidgetHandle,
- video_subtitle_size_t nSize)
+ video_subtitle_size_t nSize)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_subtitle_get_size(subtitle_handle pWidgetHandle,
- video_subtitle_size_t *nSize)
+ video_subtitle_size_t * nSize)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_subtitle_set_size_zoom(subtitle_handle pWidgetHandle,
- float fZoom)
+ float fZoom)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_subtitle_get_size_zoom(subtitle_handle pWidgetHandle,
- float *fZoom)
+ float *fZoom)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
#ifndef SUBTITLE_K_FEATURE
bool vp_play_subtitle_set_color(subtitle_handle pWidgetHandle,
- video_subtitle_color_t nColor)
+ video_subtitle_color_t nColor)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_subtitle_get_color(subtitle_handle pWidgetHandle,
- video_subtitle_color_t *nColor)
+ video_subtitle_color_t * nColor)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_subtitle_set_bg_color(subtitle_handle pWidgetHandle,
- video_subtitle_color_t nColor)
+ video_subtitle_color_t nColor)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_subtitle_get_bg_color(subtitle_handle pWidgetHandle,
- video_subtitle_color_t *nColor)
+ video_subtitle_color_t * nColor)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
#else
bool vp_play_subtitle_get_color(subtitle_handle pWidgetHandle,
- char **pColorHex)
+ char **pColorHex)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_subtitle_set_color(subtitle_handle pWidgetHandle,
- char *pColorHex)
+ char *pColorHex)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_subtitle_get_bg_color(subtitle_handle pWidgetHandle,
- char **pColorHex)
+ char **pColorHex)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_subtitle_set_bg_color(subtitle_handle pWidgetHandle,
- char *pColorHex)
+ char *pColorHex)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
#endif
bool vp_play_subtitle_set_text(subtitle_handle pWidgetHandle,
- const char *szText)
+ const char *szText)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_subtitle_get_text(subtitle_handle pWidgetHandle,
- char **szText)
+ char **szText)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
#ifdef SUBTITLE_K_FEATURE
bool vp_play_subtitle_set_alignment(subtitle_handle pWidgetHandle,
- vp_subtitle_alignment_t nAlignment)
+ vp_subtitle_alignment_t nAlignment)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_subtitle_get_alignment(subtitle_handle pWidgetHandle,
- vp_subtitle_alignment_t *nAlignment)
+ vp_subtitle_alignment_t * nAlignment)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
bool vp_play_subtitle_set_caption_win_color(subtitle_handle pWidgetHandle,
- bool bShowCaption)
+ bool bShowCaption)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
if (!bShowCaption) {
VideoLogWarning("Hide caption window!");
vp_play_util_set_object_color(_EDJ(pSubtitle->pLayout), 0, 0, 0,
- 0,
- VP_SUBTITLE_SET_CAPTION_WINDOW_COLOR_ID);
+ 0,
+ VP_SUBTITLE_SET_CAPTION_WINDOW_COLOR_ID);
return TRUE;
}
if (pText == NULL || strlen(pText) == 0) {
VideoLogWarning
- ("pText is NULL or length is zero, need hide caption window!");
+ ("pText is NULL or length is zero, need hide caption window!");
pSubtitle->bShowCaptionWin = FALSE;
vp_play_util_set_object_color(_EDJ(pSubtitle->pLayout), 0, 0, 0,
- 0,
- VP_SUBTITLE_SET_CAPTION_WINDOW_COLOR_ID);
+ 0,
+ VP_SUBTITLE_SET_CAPTION_WINDOW_COLOR_ID);
if (pText) {
VP_FREE(pText);
}
char *pCaptionWinColorHex = NULL;
if (!vp_play_preference_get_subtitle_caption_win_color_hex_key
- (&pCaptionWinColorHex)) {
+ (&pCaptionWinColorHex)) {
VideoLogWarning
- ("vp_play_preference_get_subtitle_caption_win_color_hex_key failed");
+ ("vp_play_preference_get_subtitle_caption_win_color_hex_key failed");
}
int nAlignment = 0;
int b = 0;
int a = 0;
vp_play_util_convert_hex_to_rgba(pCaptionWinColorHex, &r, &g, &b,
- &a);
+ &a);
vp_play_util_set_object_color(elm_layout_edje_get
- (pSubtitle->pLayout), r, g, b, a,
- VP_SUBTITLE_SET_CAPTION_WINDOW_COLOR_ID);
+ (pSubtitle->pLayout), r, g, b, a,
+ VP_SUBTITLE_SET_CAPTION_WINDOW_COLOR_ID);
}
VP_FREE(pText);
return TRUE;
}
bool vp_play_subtitle_get_geometry(subtitle_handle pWidgetHandle,
- bool bLandscape, Evas_Coord *x,
- Evas_Coord *y, Evas_Coord *w,
- Evas_Coord *h)
+ bool bLandscape, Evas_Coord * x,
+ Evas_Coord * y, Evas_Coord * w,
+ Evas_Coord * h)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
#endif
bool vp_play_subtitle_get_size_formatted(subtitle_handle pWidgetHandle,
- Evas_Coord *ww, Evas_Coord *hh)
+ Evas_Coord * ww, Evas_Coord * hh)
{
if (pWidgetHandle == NULL) {
VideoLogError("pWidgetHandle is NULL");
}
evas_object_textblock_size_formatted_get(pSubtitle->pTextBlock, ww,
- hh);
+ hh);
return TRUE;
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-play-type-define.h"
} VolumePopupWidget;
static void _vp_play_volume_popup_destory_handle(VolumePopupWidget *
- pVolumeWidget);
+ pVolumeWidget);
static double _vp_play_volume_popup_get_mouse_pos_ratio(Evas_Object *
- pObj,
- bool bLandscape,
- int nCurY);
+ pObj,
+ bool bLandscape,
+ int nCurY);
static void _vp_play_volume_popup_set_value(VolumePopupWidget *
- pVolumeWidget, int nValue);
+ pVolumeWidget, int nValue);
static void _vp_play_volume_popup_create_timer(VolumePopupWidget *
- pVolumeWidget);
+ pVolumeWidget);
/* callback functions */
-static void __vp_volume_popup_mouse_down_cb(void *pUserData, Evas *e,
- Evas_Object *pObj,
- void *pEvent)
+static void __vp_volume_popup_mouse_down_cb(void *pUserData, Evas * e,
+ Evas_Object * pObj,
+ void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
}
Evas_Event_Mouse_Down *pMouseDownEvent =
- (Evas_Event_Mouse_Down *) pEvent;
+ (Evas_Event_Mouse_Down *) pEvent;
double dRatio =
- _vp_play_volume_popup_get_mouse_pos_ratio(pVolumeWidget->pLayout,
- pVolumeWidget->
- bLandscape,
- pMouseDownEvent->canvas.
- y);
+ _vp_play_volume_popup_get_mouse_pos_ratio(pVolumeWidget->pLayout,
+ pVolumeWidget->bLandscape,
+ pMouseDownEvent->
+ canvas.y);
int nCurVal =
- pVolumeWidget->nMaxVal - (dRatio * pVolumeWidget->nMaxVal);
+ pVolumeWidget->nMaxVal - (dRatio * pVolumeWidget->nMaxVal);
_vp_play_volume_popup_set_value(pVolumeWidget, nCurVal);
pVolumeWidget->bMouseDown = TRUE;
}
-static void __vp_volume_popup_mouse_up_cb(void *pUserData, Evas *e,
- Evas_Object *pObj,
- void *pEvent)
+static void __vp_volume_popup_mouse_up_cb(void *pUserData, Evas * e,
+ Evas_Object * pObj, void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
}
double dRatio =
- _vp_play_volume_popup_get_mouse_pos_ratio(pVolumeWidget->pLayout,
- pVolumeWidget->
- bLandscape,
- pMouseUpEvent->canvas.
- y);
+ _vp_play_volume_popup_get_mouse_pos_ratio(pVolumeWidget->pLayout,
+ pVolumeWidget->bLandscape,
+ pMouseUpEvent->canvas.y);
int nCurVal =
- pVolumeWidget->nMaxVal - (dRatio * pVolumeWidget->nMaxVal);
+ pVolumeWidget->nMaxVal - (dRatio * pVolumeWidget->nMaxVal);
_vp_play_volume_popup_set_value(pVolumeWidget, nCurVal);
_vp_play_volume_popup_create_timer(pVolumeWidget);
pVolumeWidget->bMouseDown = FALSE;
}
-static void __vp_volume_popup_mouse_move_cb(void *pUserData, Evas *e,
- Evas_Object *pObj,
- void *pEvent)
+static void __vp_volume_popup_mouse_move_cb(void *pUserData, Evas * e,
+ Evas_Object * pObj,
+ void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
VolumePopupWidget *pVolumeWidget = (VolumePopupWidget *) pUserData;
Evas_Event_Mouse_Move *pMouseMoveEvent =
- (Evas_Event_Mouse_Move *) pEvent;
+ (Evas_Event_Mouse_Move *) pEvent;
if (pVolumeWidget->bIsRealize == FALSE
- || pVolumeWidget->bMouseDown == FALSE) {
+ || pVolumeWidget->bMouseDown == FALSE) {
return;
}
double dRatio =
- _vp_play_volume_popup_get_mouse_pos_ratio(pVolumeWidget->pLayout,
- pVolumeWidget->
- bLandscape,
- pMouseMoveEvent->cur.
- canvas.y);
+ _vp_play_volume_popup_get_mouse_pos_ratio(pVolumeWidget->pLayout,
+ pVolumeWidget->bLandscape,
+ pMouseMoveEvent->
+ cur.canvas.y);
int nCurVal =
- pVolumeWidget->nMaxVal - (dRatio * pVolumeWidget->nMaxVal);
+ pVolumeWidget->nMaxVal - (dRatio * pVolumeWidget->nMaxVal);
if (nCurVal != pVolumeWidget->nCurVal) {
_vp_play_volume_popup_set_value(pVolumeWidget, nCurVal);
VP_EVAS_TIMER_DEL(pVolumeWidget->pHideTimer);
if (!vp_play_volume_popup_unrealize
- ((volume_popup_handle) pVolumeWidget)) {
+ ((volume_popup_handle) pVolumeWidget)) {
VideoLogWarning("vp_play_volume_popup_unrealize is fail");
}
/* internal functions */
static void _vp_play_volume_popup_destory_handle(VolumePopupWidget *
- pVolumeWidget)
+ pVolumeWidget)
{
if (pVolumeWidget == NULL) {
VideoLogError("pVolumeWidget is NULL");
}
static double _vp_play_volume_popup_get_mouse_pos_ratio(Evas_Object *
- pObj,
- bool bLandscape,
- int nCurY)
+ pObj,
+ bool bLandscape,
+ int nCurY)
{
if (pObj == NULL) {
VideoLogError("pObj is NULL");
static void _vp_play_volume_popup_set_widget_position(VolumePopupWidget *
- pVolumeWidget)
+ pVolumeWidget)
{
if (pVolumeWidget == NULL) {
VideoLogError("pVolumeWidget is NULL");
if (bLandscape) {
evas_object_move(pVolumeWidget->pLayout,
- VP_VOLUME_POPUP_LANDSCAPE_POS_X * VP_SCALE,
- VP_VOLUME_POPUP_LANDSCAPE_POS_Y * VP_SCALE);
+ VP_VOLUME_POPUP_LANDSCAPE_POS_X * VP_SCALE,
+ VP_VOLUME_POPUP_LANDSCAPE_POS_Y * VP_SCALE);
} else {
evas_object_move(pVolumeWidget->pLayout,
- VP_VOLUME_POPUP_PORTRAIT_POS_X * VP_SCALE,
- VP_VOLUME_POPUP_PORTRAIT_POS_Y * VP_SCALE);
+ VP_VOLUME_POPUP_PORTRAIT_POS_X * VP_SCALE,
+ VP_VOLUME_POPUP_PORTRAIT_POS_Y * VP_SCALE);
}
}
static void _vp_play_volume_popup_update_value(VolumePopupWidget *
- pVolumeWidget)
+ pVolumeWidget)
{
if (pVolumeWidget == NULL) {
VideoLogError("pVolumeWidget is NULL");
char szPlayingTime[VP_VOLUME_POPUP_TEXT_MAX_LEN] = { 0, };
snprintf(szPlayingTime, VP_VOLUME_POPUP_TEXT_MAX_LEN, "%d",
- pVolumeWidget->nCurVal);
+ pVolumeWidget->nCurVal);
nVolumeRatio =
- ((double) pVolumeWidget->nCurVal /
- (double) pVolumeWidget->nMaxVal);
+ ((double) pVolumeWidget->nCurVal /
+ (double) pVolumeWidget->nMaxVal);
if (!edje_object_part_drag_value_set
- (_EDJ(pVolumeWidget->pLayout),
- VP_PLAY_SWALLOW_VOLUME_POPUP_DRAG_RECT, 0.0, nVolumeRatio)) {
+ (_EDJ(pVolumeWidget->pLayout),
+ VP_PLAY_SWALLOW_VOLUME_POPUP_DRAG_RECT, 0.0, nVolumeRatio)) {
VideoLogWarning("Drag value set fail : %lf", nVolumeRatio);
}
elm_object_part_text_set(pVolumeWidget->pLayout,
- VP_PLAY_SWALLOW_VOLUME_POPUP_VALUE_LABEL,
- szPlayingTime);
+ VP_PLAY_SWALLOW_VOLUME_POPUP_VALUE_LABEL,
+ szPlayingTime);
if (pVolumeWidget->nCurVal == 0) {
edje_object_signal_emit(_EDJ(pVolumeWidget->pLayout), "set,mute",
- "volume.popup.icon");
+ "volume.popup.icon");
} else {
edje_object_signal_emit(_EDJ(pVolumeWidget->pLayout),
- "set,volume", "volume.popup.icon");
+ "set,volume", "volume.popup.icon");
}
}
}
static void _vp_play_volume_popup_set_value(VolumePopupWidget *
- pVolumeWidget, int nValue)
+ pVolumeWidget, int nValue)
{
if (pVolumeWidget == NULL) {
VideoLogError("pParent is NULL");
if (pVolumeWidget->pDeviceTimer == NULL) {
pVolumeWidget->pDeviceTimer = ecore_timer_add(0.1,
- __vp_volume_popup_device_timer_cb,
- (void *)
- pVolumeWidget);
+ __vp_volume_popup_device_timer_cb,
+ (void *)
+ pVolumeWidget);
}
}
static void _vp_play_volume_popup_create_timer(VolumePopupWidget *
- pVolumeWidget)
+ pVolumeWidget)
{
if (pVolumeWidget == NULL) {
VideoLogError("pParent is NULL");
VP_EVAS_TIMER_DEL(pVolumeWidget->pHideTimer);
pVolumeWidget->pHideTimer =
- ecore_timer_add(VP_VOLUME_POPUP_HIDE_LAYOUT_TIMER_INTERVAL,
- __vp_volume_popup_hide_timer_cb,
- (void *) pVolumeWidget);
+ ecore_timer_add(VP_VOLUME_POPUP_HIDE_LAYOUT_TIMER_INTERVAL,
+ __vp_volume_popup_hide_timer_cb,
+ (void *) pVolumeWidget);
}
static Evas_Object *_vp_play_volume_popup_create_layout(Evas_Object *
- pParent)
+ pParent)
{
if (!pParent) {
VideoLogError("Parent is NULL");
VideoLogError("elm_layout_add object is NULL");
return NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_VOLUME_POPUP_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_VOLUME_POPUP_EDJ_PATH);
free(path);
bRet =
- elm_layout_file_set(pObj, edj_path,
- VP_PLAY_EDJ_GROUP_VOLUME_POPUP);
+ elm_layout_file_set(pObj, edj_path,
+ VP_PLAY_EDJ_GROUP_VOLUME_POPUP);
if (bRet != EINA_TRUE) {
VideoLogError("elm_layout_file_set fail");
return NULL;
static bool _vp_play_volume_popup_init_layout(VolumePopupWidget *
- pVolumeWidget)
+ pVolumeWidget)
{
if (pVolumeWidget == NULL) {
VideoLogError("pVolumeWidget is NULL");
return FALSE;
}
evas_object_event_callback_add(pVolumeWidget->pLayout,
- EVAS_CALLBACK_MOUSE_DOWN,
- __vp_volume_popup_mouse_down_cb,
- (void *) pVolumeWidget);
+ EVAS_CALLBACK_MOUSE_DOWN,
+ __vp_volume_popup_mouse_down_cb,
+ (void *) pVolumeWidget);
evas_object_event_callback_add(pVolumeWidget->pLayout,
- EVAS_CALLBACK_MOUSE_UP,
- __vp_volume_popup_mouse_up_cb,
- (void *) pVolumeWidget);
+ EVAS_CALLBACK_MOUSE_UP,
+ __vp_volume_popup_mouse_up_cb,
+ (void *) pVolumeWidget);
evas_object_event_callback_add(pVolumeWidget->pLayout,
- EVAS_CALLBACK_MOUSE_MOVE,
- __vp_volume_popup_mouse_move_cb,
- (void *) pVolumeWidget);
+ EVAS_CALLBACK_MOUSE_MOVE,
+ __vp_volume_popup_mouse_move_cb,
+ (void *) pVolumeWidget);
return TRUE;
}
/* external functions */
-volume_popup_handle vp_play_volume_popup_create(Evas_Object *pParent)
+volume_popup_handle vp_play_volume_popup_create(Evas_Object * pParent)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
return;
}
- VolumePopupWidget *pVolumeWidget =
- (VolumePopupWidget *) pVolumeHandle;
+ VolumePopupWidget *pVolumeWidget = (VolumePopupWidget *) pVolumeHandle;
_vp_play_volume_popup_destory_handle(pVolumeWidget);
}
return FALSE;
}
- VolumePopupWidget *pVolumeWidget =
- (VolumePopupWidget *) pVolumeHandle;
+ VolumePopupWidget *pVolumeWidget = (VolumePopupWidget *) pVolumeHandle;
pVolumeWidget->bIsRealize = TRUE;
_vp_play_volume_popup_set_widget_position(pVolumeWidget);
- _vp_play_volume_popup_set_value(pVolumeWidget,
- pVolumeWidget->nCurVal);
+ _vp_play_volume_popup_set_value(pVolumeWidget, pVolumeWidget->nCurVal);
evas_object_show(pVolumeWidget->pLayout);
_vp_play_volume_popup_create_timer(pVolumeWidget);
return FALSE;
}
- VolumePopupWidget *pVolumeWidget =
- (VolumePopupWidget *) pVolumeHandle;
+ VolumePopupWidget *pVolumeWidget = (VolumePopupWidget *) pVolumeHandle;
pVolumeWidget->bIsRealize = FALSE;
}
bool vp_play_volume_popup_set_landscape_mode(volume_popup_handle
- pVolumeHandle,
- bool bLandscape)
+ pVolumeHandle,
+ bool bLandscape)
{
if (pVolumeHandle == NULL) {
VideoLogError("pParent is NULL");
return FALSE;
}
- VolumePopupWidget *pVolumeWidget =
- (VolumePopupWidget *) pVolumeHandle;
+ VolumePopupWidget *pVolumeWidget = (VolumePopupWidget *) pVolumeHandle;
pVolumeWidget->bLandscape = bLandscape;
}
bool vp_play_volume_popup_is_realize(volume_popup_handle pVolumeHandle,
- bool *bIsRealize)
+ bool * bIsRealize)
{
if (pVolumeHandle == NULL) {
VideoLogError("pParent is NULL");
return FALSE;
}
- VolumePopupWidget *pVolumeWidget =
- (VolumePopupWidget *) pVolumeHandle;
+ VolumePopupWidget *pVolumeWidget = (VolumePopupWidget *) pVolumeHandle;
*bIsRealize = pVolumeWidget->bIsRealize;
bool vp_play_volume_popup_set_value(volume_popup_handle pVolumeHandle,
- int nCurVal)
+ int nCurVal)
{
if (pVolumeHandle == NULL) {
VideoLogError("pParent is NULL");
return FALSE;
}
- VolumePopupWidget *pVolumeWidget =
- (VolumePopupWidget *) pVolumeHandle;
+ VolumePopupWidget *pVolumeWidget = (VolumePopupWidget *) pVolumeHandle;
_vp_play_volume_popup_create_timer(pVolumeWidget);
return TRUE;
}
- _vp_play_volume_popup_set_value(pVolumeWidget,
- pVolumeWidget->nCurVal);
+ _vp_play_volume_popup_set_value(pVolumeWidget, pVolumeWidget->nCurVal);
return TRUE;
}
bool vp_play_volume_popup_is_mute(volume_popup_handle pVolumeHandle,
- bool *bIsMute)
+ bool * bIsMute)
{
if (pVolumeHandle == NULL) {
VideoLogError("pParent is NULL");
return FALSE;
}
- VolumePopupWidget *pVolumeWidget =
- (VolumePopupWidget *) pVolumeHandle;
+ VolumePopupWidget *pVolumeWidget = (VolumePopupWidget *) pVolumeHandle;
if (pVolumeWidget->nCurVal == 0) {
*bIsMute = TRUE;
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "vp-play-type-define.h"
#include "vp-play-string-define.h"
NormalVolumeChangeCbFunc pChangeVolFunc;
} VolumeWidget;
-static void _vp_play_volume_destory_handle(VolumeWidget *pVolumeWidget);
-static double _vp_play_volume_get_mouse_pos_ratio(Evas_Object *pObj,
- bool bLandscape,
- int nCurY,
- Evas_Object *pWin);
-static bool _vp_play_volume_set_value(VolumeWidget *pVolumeWidget,
- int nValue);
-static void _vp_play_volume_create_timer(VolumeWidget *pVolumeWidget);
+static void _vp_play_volume_destory_handle(VolumeWidget * pVolumeWidget);
+static double _vp_play_volume_get_mouse_pos_ratio(Evas_Object * pObj,
+ bool bLandscape,
+ int nCurY,
+ Evas_Object * pWin);
+static bool _vp_play_volume_set_value(VolumeWidget * pVolumeWidget,
+ int nValue);
+static void _vp_play_volume_create_timer(VolumeWidget * pVolumeWidget);
/* callback functions */
-static void __vp_volume_focus_key_down_cb(void *pUserData, Evas *e,
- Evas_Object *pObj,
- void *pEvent)
+static void __vp_volume_focus_key_down_cb(void *pUserData, Evas * e,
+ Evas_Object * pObj, void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
}
}
-static void __vp_volume_mouse_down_cb(void *pUserData, Evas *e,
- Evas_Object *pObj, void *pEvent)
+static void __vp_volume_mouse_down_cb(void *pUserData, Evas * e,
+ Evas_Object * pObj, void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
}
Evas_Event_Mouse_Down *pMouseDownEvent =
- (Evas_Event_Mouse_Down *) pEvent;
+ (Evas_Event_Mouse_Down *) pEvent;
double dRatio =
- _vp_play_volume_get_mouse_pos_ratio(pVolumeWidget->pLayout,
- pVolumeWidget->bLandscape,
- pMouseDownEvent->canvas.y,
- pVolumeWidget->pWin);
+ _vp_play_volume_get_mouse_pos_ratio(pVolumeWidget->pLayout,
+ pVolumeWidget->bLandscape,
+ pMouseDownEvent->canvas.y,
+ pVolumeWidget->pWin);
int nCurVal =
- pVolumeWidget->nMaxVal - (dRatio * pVolumeWidget->nMaxVal);
+ pVolumeWidget->nMaxVal - (dRatio * pVolumeWidget->nMaxVal);
_vp_play_volume_set_value(pVolumeWidget, nCurVal);
pVolumeWidget->bMouseDown = TRUE;
}
-static void __vp_volume_mouse_up_cb(void *pUserData, Evas *e,
- Evas_Object *pObj, void *pEvent)
+static void __vp_volume_mouse_up_cb(void *pUserData, Evas * e,
+ Evas_Object * pObj, void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
}
double dRatio =
- _vp_play_volume_get_mouse_pos_ratio(pVolumeWidget->pLayout,
- pVolumeWidget->bLandscape,
- pMouseUpEvent->canvas.y,
- pVolumeWidget->pWin);
+ _vp_play_volume_get_mouse_pos_ratio(pVolumeWidget->pLayout,
+ pVolumeWidget->bLandscape,
+ pMouseUpEvent->canvas.y,
+ pVolumeWidget->pWin);
int nCurVal =
- pVolumeWidget->nMaxVal - (dRatio * pVolumeWidget->nMaxVal);
+ pVolumeWidget->nMaxVal - (dRatio * pVolumeWidget->nMaxVal);
_vp_play_volume_set_value(pVolumeWidget, nCurVal);
_vp_play_volume_create_timer(pVolumeWidget);
pVolumeWidget->bMouseDown = FALSE;
}
-static void __vp_volume_mouse_move_cb(void *pUserData, Evas *e,
- Evas_Object *pObj, void *pEvent)
+static void __vp_volume_mouse_move_cb(void *pUserData, Evas * e,
+ Evas_Object * pObj, void *pEvent)
{
if (!pUserData) {
VideoLogError("pUserData is NULL");
VolumeWidget *pVolumeWidget = (VolumeWidget *) pUserData;
Evas_Event_Mouse_Move *pMouseMoveEvent =
- (Evas_Event_Mouse_Move *) pEvent;
+ (Evas_Event_Mouse_Move *) pEvent;
if (pVolumeWidget->bIsRealize == FALSE
- || pVolumeWidget->bMouseDown == FALSE) {
+ || pVolumeWidget->bMouseDown == FALSE) {
return;
}
double dRatio =
- _vp_play_volume_get_mouse_pos_ratio(pVolumeWidget->pLayout,
- pVolumeWidget->bLandscape,
- pMouseMoveEvent->cur.canvas.y,
- pVolumeWidget->pWin);
+ _vp_play_volume_get_mouse_pos_ratio(pVolumeWidget->pLayout,
+ pVolumeWidget->bLandscape,
+ pMouseMoveEvent->cur.canvas.y,
+ pVolumeWidget->pWin);
int nCurVal =
- pVolumeWidget->nMaxVal - (dRatio * pVolumeWidget->nMaxVal);
+ pVolumeWidget->nMaxVal - (dRatio * pVolumeWidget->nMaxVal);
if (nCurVal != pVolumeWidget->nCurVal) {
_vp_play_volume_set_value(pVolumeWidget, nCurVal);
/* internal functions */
-static void _vp_play_volume_destory_handle(VolumeWidget *pVolumeWidget)
+static void _vp_play_volume_destory_handle(VolumeWidget * pVolumeWidget)
{
if (pVolumeWidget == NULL) {
VideoLogError("pVolumeWidget is NULL");
VP_FREE(pVolumeWidget);
}
-static double _vp_play_volume_get_mouse_pos_ratio(Evas_Object *pObj,
- bool bLandscape,
- int nCurY,
- Evas_Object *pWin)
+static double _vp_play_volume_get_mouse_pos_ratio(Evas_Object * pObj,
+ bool bLandscape,
+ int nCurY,
+ Evas_Object * pWin)
{
if (pObj == NULL) {
VideoLogError("pObj is NULL");
if (bLandscape) {
nHeight = VP_VOLUME_LANDSCAPE_HEIGHT;
nCurrent =
- nCurY - VP_VOLUME_LANDSCAPE_POS_Y - VP_VOLUME_TOP_PADDING_H +
- 10;
+ nCurY - VP_VOLUME_LANDSCAPE_POS_Y -
+ VP_VOLUME_TOP_PADDING_H + 10;
} else {
nHeight = 350;
nCurrent =
- nCurY - VP_VOLUME_PORTRAIT_POS_Y - VP_VOLUME_TOP_PADDING_H -
- 310;
+ nCurY - VP_VOLUME_PORTRAIT_POS_Y -
+ VP_VOLUME_TOP_PADDING_H - 310;
}
} else if ((elm_config_scale_get() - 1.8) == 0.0) {
if (bLandscape) {
nHeight = 125;
nCurrent =
- nCurY - VP_VOLUME_LANDSCAPE_POS_Y - VP_VOLUME_TOP_PADDING_H + 70;
+ nCurY - VP_VOLUME_LANDSCAPE_POS_Y -
+ VP_VOLUME_TOP_PADDING_H + 70;
} else {
nHeight = 255;
nCurrent =
- nCurY - VP_VOLUME_PORTRAIT_POS_Y - VP_VOLUME_TOP_PADDING_H - 42;
+ nCurY - VP_VOLUME_PORTRAIT_POS_Y -
+ VP_VOLUME_TOP_PADDING_H - 42;
}
} else {
if (bLandscape) {
nHeight = VP_VOLUME_LANDSCAPE_HEIGHT;
nCurrent =
- nCurY - VP_VOLUME_LANDSCAPE_POS_Y - VP_VOLUME_TOP_PADDING_H + 10;
+ nCurY - VP_VOLUME_LANDSCAPE_POS_Y -
+ VP_VOLUME_TOP_PADDING_H + 10;
} else {
nHeight = 390;
nCurrent =
- nCurY - VP_VOLUME_PORTRAIT_POS_Y - VP_VOLUME_TOP_PADDING_H - 150;
+ nCurY - VP_VOLUME_PORTRAIT_POS_Y -
+ VP_VOLUME_TOP_PADDING_H - 150;
}
}
static void _vp_play_volume_set_widget_position(VolumeWidget *
- pVolumeWidget,
- Evas_Object *pWin)
+ pVolumeWidget,
+ Evas_Object * pWin)
{
if (pVolumeWidget == NULL) {
VideoLogError("pVolumeWidget is NULL");
if ((elm_config_scale_get() - 2.6) == 0.0) {
if (bLandscape) {
elm_object_signal_emit(pVolumeWidget->pLayout,
- VP_NORMAL_SIGNAL_VOLUME_LANDSCAPE_MODE,
- "*");
+ VP_NORMAL_SIGNAL_VOLUME_LANDSCAPE_MODE,
+ "*");
evas_object_move(pVolumeWidget->pLayout, h - 80, w / 10);
} else {
elm_object_signal_emit(pVolumeWidget->pLayout,
- VP_NORMAL_SIGNAL_VOLUME_PORTRAIT_MODE,
- "*");
- evas_object_move(pVolumeWidget->pLayout, w - w / 9, (5 * h) / 16);
+ VP_NORMAL_SIGNAL_VOLUME_PORTRAIT_MODE,
+ "*");
+ evas_object_move(pVolumeWidget->pLayout, w - w / 9,
+ (5 * h) / 16);
}
} else if ((elm_config_scale_get() - 1.8) == 0.0) {
if (bLandscape) {
elm_object_signal_emit(pVolumeWidget->pLayout,
- VP_NORMAL_SIGNAL_VOLUME_LANDSCAPE_MODE,
- "*");
+ VP_NORMAL_SIGNAL_VOLUME_LANDSCAPE_MODE,
+ "*");
evas_object_move(pVolumeWidget->pLayout, h - h / 16, w / 16);
} else {
elm_object_signal_emit(pVolumeWidget->pLayout,
- VP_NORMAL_SIGNAL_VOLUME_PORTRAIT_MODE,
- "*");
+ VP_NORMAL_SIGNAL_VOLUME_PORTRAIT_MODE,
+ "*");
evas_object_move(pVolumeWidget->pLayout, w - w / 10, h / 5);
}
} else {
if (bLandscape) {
elm_object_signal_emit(pVolumeWidget->pLayout,
- VP_NORMAL_SIGNAL_VOLUME_LANDSCAPE_MODE,
- "*");
+ VP_NORMAL_SIGNAL_VOLUME_LANDSCAPE_MODE,
+ "*");
evas_object_move(pVolumeWidget->pLayout, h - h / 16, w / 16);
} else {
elm_object_signal_emit(pVolumeWidget->pLayout,
- VP_NORMAL_SIGNAL_VOLUME_PORTRAIT_MODE,
- "*");
+ VP_NORMAL_SIGNAL_VOLUME_PORTRAIT_MODE,
+ "*");
evas_object_move(pVolumeWidget->pLayout, w - w / 10, h / 5);
}
}
}
-static void _vp_play_volume_update_value(VolumeWidget *pVolumeWidget)
+static void _vp_play_volume_update_value(VolumeWidget * pVolumeWidget)
{
if (pVolumeWidget == NULL) {
VideoLogError("pVolumeWidget is NULL");
char szPlayingTime[VP_VOLUME_TEXT_MAX_LEN] = { 0, };
snprintf(szPlayingTime, VP_VOLUME_TEXT_MAX_LEN, "%d",
- pVolumeWidget->nCurVal);
+ pVolumeWidget->nCurVal);
nVolumeRatio =
- ((double) pVolumeWidget->nCurVal /
- (double) pVolumeWidget->nMaxVal);
+ ((double) pVolumeWidget->nCurVal /
+ (double) pVolumeWidget->nMaxVal);
if (!edje_object_part_drag_value_set
- (_EDJ(pVolumeWidget->pLayout), VP_PLAY_SWALLOW_VOLUME_DRAG_RECT,
- 0.0, nVolumeRatio)) {
+ (_EDJ(pVolumeWidget->pLayout), VP_PLAY_SWALLOW_VOLUME_DRAG_RECT,
+ 0.0, nVolumeRatio)) {
VideoLogWarning("Drag value set fail : %lf", nVolumeRatio);
}
elm_object_part_text_set(pVolumeWidget->pLayout,
- VP_PLAY_SWALLOW_VOLUME_VALUE_LABEL,
- szPlayingTime);
+ VP_PLAY_SWALLOW_VOLUME_VALUE_LABEL,
+ szPlayingTime);
}
static Eina_Bool __vp_volume_device_timer_cb(void *pUserData)
_vp_play_volume_update_value(pVolumeWidget);
if (pVolumeWidget->pChangeVolFunc) {
pVolumeWidget->pChangeVolFunc(pVolumeWidget->nCurVal,
- pVolumeWidget->pUserData);
+ pVolumeWidget->pUserData);
}
VideoLogWarning
- ("vp_sound_set_volume successed, need update volume bar! = %d",
- pVolumeWidget->nCurVal);
+ ("vp_sound_set_volume successed, need update volume bar! = %d",
+ pVolumeWidget->nCurVal);
}
return EINA_FALSE;
}
-static bool _vp_play_volume_set_value(VolumeWidget *pVolumeWidget,
- int nValue)
+static bool _vp_play_volume_set_value(VolumeWidget * pVolumeWidget,
+ int nValue)
{
if (pVolumeWidget == NULL) {
VideoLogError("pParent is NULL");
if (pVolumeWidget->pDeviceTimer == NULL) {
pVolumeWidget->pDeviceTimer = ecore_timer_add(0.1,
- __vp_volume_device_timer_cb,
- (void *)
- pVolumeWidget);
+ __vp_volume_device_timer_cb,
+ (void *)
+ pVolumeWidget);
}
return TRUE;
}
-static void _vp_play_volume_create_timer(VolumeWidget *pVolumeWidget)
+static void _vp_play_volume_create_timer(VolumeWidget * pVolumeWidget)
{
if (pVolumeWidget == NULL) {
VideoLogError("pParent is NULL");
VP_EVAS_TIMER_DEL(pVolumeWidget->pHideTimer);
pVolumeWidget->pHideTimer =
- ecore_timer_add(VP_VOLUME_HIDE_LAYOUT_TIMER_INTERVAL,
- __vp_volume_hide_timer_cb,
- (void *) pVolumeWidget);
+ ecore_timer_add(VP_VOLUME_HIDE_LAYOUT_TIMER_INTERVAL,
+ __vp_volume_hide_timer_cb, (void *) pVolumeWidget);
}
-static Evas_Object *_vp_play_volume_create_layout(Evas_Object *pParent)
+static Evas_Object *_vp_play_volume_create_layout(Evas_Object * pParent)
{
if (!pParent) {
VideoLogError("Parent is NULL");
VideoLogError("elm_layout_add object is NULL");
return NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VP_PLAY_VOLUME_EDJ_PATH);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VP_PLAY_VOLUME_EDJ_PATH);
free(path);
- bRet =
- elm_layout_file_set(pObj, edj_path,
- VP_PLAY_EDJ_GROUP_VOLUME);
+ bRet = elm_layout_file_set(pObj, edj_path, VP_PLAY_EDJ_GROUP_VOLUME);
if (bRet != EINA_TRUE) {
VideoLogError("elm_layout_file_set fail");
return NULL;
}
-static bool _vp_play_volume_init_layout(VolumeWidget *pVolumeWidget)
+static bool _vp_play_volume_init_layout(VolumeWidget * pVolumeWidget)
{
if (pVolumeWidget == NULL) {
VideoLogError("pVolumeWidget is NULL");
return FALSE;
}
pVolumeWidget->pFocusPoint =
- vp_button_create(pVolumeWidget->pLayout, "focus", NULL, NULL,
- NULL, NULL, (void *) pVolumeWidget);
+ vp_button_create(pVolumeWidget->pLayout, "focus", NULL, NULL,
+ NULL, NULL, (void *) pVolumeWidget);
if (!pVolumeWidget->pFocusPoint) {
VideoLogError("elm_button_add is fail");
return FALSE;
elm_object_focus_allow_set(pVolumeWidget->pFocusPoint, EINA_FALSE);
elm_object_part_content_set(pVolumeWidget->pLayout,
- "pv.volume.point.focus",
- pVolumeWidget->pFocusPoint);
+ "pv.volume.point.focus",
+ pVolumeWidget->pFocusPoint);
return TRUE;
}
/* external functions */
-volume_handle vp_play_volume_create(Evas_Object *pParent,
- void *pPlayerHandle,
- NormalVolumeChangeCbFunc pFunc)
+volume_handle vp_play_volume_create(Evas_Object * pParent,
+ void *pPlayerHandle,
+ NormalVolumeChangeCbFunc pFunc)
{
if (pParent == NULL) {
VideoLogError("pParent is NULL");
VolumeWidget *pVolumeWidget = (VolumeWidget *) pVolumeHandle;
vp_play_volume_unset_mouse_callbacks(pVolumeWidget,
- pVolumeWidget->pWin);
+ pVolumeWidget->pWin);
_vp_play_volume_destory_handle(pVolumeWidget);
}
bool vp_play_volume_realize(volume_handle pVolumeHandle,
- Evas_Object *pWin)
+ Evas_Object * pWin)
{
VideoLogInfo("");
if (pVolumeHandle == NULL) {
}
bool vp_play_volume_set_landscape_mode(volume_handle pVolumeHandle,
- bool bLandscape,
- Evas_Object *pWin)
+ bool bLandscape, Evas_Object * pWin)
{
if (pVolumeHandle == NULL) {
VideoLogError("pVolumeHandle is NULL");
}
bool vp_play_volume_set_user_data(volume_handle pVolumeHandle,
- void *pUserData)
+ void *pUserData)
{
if (pVolumeHandle == NULL) {
VideoLogError("pVolumeHandle is NULL");
}
bool vp_play_volume_is_realize(volume_handle pVolumeHandle,
- bool *bIsRealize)
+ bool * bIsRealize)
{
if (pVolumeHandle == NULL) {
VideoLogError("pVolumeHandle is NULL");
}
-bool vp_play_volume_is_mute(volume_handle pVolumeHandle, bool *bIsMute)
+bool vp_play_volume_is_mute(volume_handle pVolumeHandle, bool * bIsMute)
{
if (pVolumeHandle == NULL) {
VideoLogError("pVolumeHandle is NULL");
elm_object_focus_set(pVolumeWidget->pFocusPoint, EINA_TRUE);
elm_object_focus_next_object_set(pVolumeWidget->pFocusPoint,
- pVolumeWidget->pFocusPoint,
- ELM_FOCUS_UP);
+ pVolumeWidget->pFocusPoint,
+ ELM_FOCUS_UP);
elm_object_focus_next_object_set(pVolumeWidget->pFocusPoint,
- pVolumeWidget->pFocusPoint,
- ELM_FOCUS_DOWN);
+ pVolumeWidget->pFocusPoint,
+ ELM_FOCUS_DOWN);
evas_object_event_callback_del(pVolumeWidget->pFocusPoint,
- EVAS_CALLBACK_KEY_DOWN,
- __vp_volume_focus_key_down_cb);
+ EVAS_CALLBACK_KEY_DOWN,
+ __vp_volume_focus_key_down_cb);
evas_object_event_callback_add(pVolumeWidget->pFocusPoint,
- EVAS_CALLBACK_KEY_DOWN,
- __vp_volume_focus_key_down_cb,
- (void *) pVolumeWidget);
+ EVAS_CALLBACK_KEY_DOWN,
+ __vp_volume_focus_key_down_cb,
+ (void *) pVolumeWidget);
return TRUE;
}
bool vp_play_volume_set_mouse_callbacks(volume_handle pVolumeHandle,
- Evas_Object *pWin)
+ Evas_Object * pWin)
{
if (pVolumeHandle == NULL) {
VideoLogError("pVolumeHandle is NULL");
pVolumeWidget->pWin = pWin;
evas_object_event_callback_add(pVolumeWidget->pLayout,
- EVAS_CALLBACK_MOUSE_DOWN,
- __vp_volume_mouse_down_cb,
- (void *) pVolumeWidget);
+ EVAS_CALLBACK_MOUSE_DOWN,
+ __vp_volume_mouse_down_cb,
+ (void *) pVolumeWidget);
evas_object_event_callback_add(pVolumeWidget->pLayout,
- EVAS_CALLBACK_MOUSE_UP,
- __vp_volume_mouse_up_cb,
- (void *) pVolumeWidget);
+ EVAS_CALLBACK_MOUSE_UP,
+ __vp_volume_mouse_up_cb,
+ (void *) pVolumeWidget);
evas_object_event_callback_add(pVolumeWidget->pLayout,
- EVAS_CALLBACK_MOUSE_MOVE,
- __vp_volume_mouse_move_cb,
- (void *) pVolumeWidget);
+ EVAS_CALLBACK_MOUSE_MOVE,
+ __vp_volume_mouse_move_cb,
+ (void *) pVolumeWidget);
return TRUE;
}
bool vp_play_volume_unset_mouse_callbacks(volume_handle pVolumeHandle,
- Evas_Object *pWin)
+ Evas_Object * pWin)
{
if (pVolumeHandle == NULL) {
VideoLogError("pVolumeHandle is NULL");
pVolumeWidget->pWin = pWin;
evas_object_event_callback_del(pVolumeWidget->pLayout,
- EVAS_CALLBACK_MOUSE_DOWN,
- __vp_volume_mouse_down_cb);
+ EVAS_CALLBACK_MOUSE_DOWN,
+ __vp_volume_mouse_down_cb);
evas_object_event_callback_del(pVolumeWidget->pLayout,
- EVAS_CALLBACK_MOUSE_UP,
- __vp_volume_mouse_up_cb);
+ EVAS_CALLBACK_MOUSE_UP,
+ __vp_volume_mouse_up_cb);
evas_object_event_callback_del(pVolumeWidget->pLayout,
- EVAS_CALLBACK_MOUSE_MOVE,
- __vp_volume_mouse_move_cb);
+ EVAS_CALLBACK_MOUSE_MOVE,
+ __vp_volume_mouse_move_cb);
return TRUE;
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define RESOURCE_IMAGE( FILE_NAME ) \
group { \
name: FILE_NAME; \
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
images {
image: "T01_toolbar_bg.png" COMP;
image: "T01_toolbar_press.png" COMP;
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define GRAY_RECT_COLOR 128 128 128 128
#define SPEEDBOX_OFFSET_Y 225
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "image_res.edc"
#include "vp_font.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
collections {
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define BUTTON_BG_NORMAL "white/common/00_button_01.png"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC 42 42
#define CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC 255 255 255 255
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
/*
* Refer to nbeat-theme\themes\groups\controlbar.edc
*/
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
///////////////////////////////////////////////////////////////////////////////////////
//
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
///////////////////////////////////////////////////////////////////////////////////////
//
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define GENLIST_HEIGHT_MULTILINE_SUB 38
#define GENLIST_HEIGHT_2LINE_SUB 42
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "image_res.edc"
//#include "tizen-hd-inc.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
group { name: "popup_detail";
parts {
part { name: "pad_t";
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define GRAY_RECT_COLOR 128 128 128 128
#define SPEEDBOX_OFFSET_Y 225
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define VP_POPUP_ENTRY_WIDTH_HEIGHT_MIN 0 60
#define PV_POPUP_ENTRY_CONTENT_MIN 0 60
#define POPUP_CONTENT_PADDING_LEFT_MIN_INC 15
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
/*PD*/
#define GENGRID_PD_TEXT_LEFT_TOP_PAD_INC 0 0
#define GENGRID_PD_TEXT_RIGHT_BOTTOM_PAD_INC 31 46
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define GENGRID_FONT_STYLE_18_INC "26"
#define GENGRID_PART_BG_COLOR_INC 0 0 0 0
#define GENGRID_PART_ITEM_BG_COLOR_INC 255 0 0 255
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
/*
* vim:ts=3
*/
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "image_res.edc"
#include "vp_font.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "edc_image_macro.edc"
collections {
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
/*************************************************/
/* elm_layout -> video style */
/*************************************************/
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define VIDEO_STROE_DEFAULT_TOP_BG_IMAGE "title_line_top_video.png"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "image_res.edc"
#include "vp_font.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "image_res.edc"
#include "vp_font.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "image_res.edc"
#include "vp_font.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define NAVIFRAME_TOP_LINE_COLOR 146 130 255 255
#define SEARCHBAR_H_INC 69
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define NOCONTENT_TEXT_BLOCK_TEXT_SIZE_INC 32*0.444
#define NOCONTENT_TEXT_BLOCK_STYLE_COLOR_INC 173 170 165 255
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define NUMBER_INFO_BACKGROUND_COLOR_INC 189 187 181 255
#define NUMBER_INFO_TEXT_COLOR_INC 77 77 77 255//248 246 239 255
#define NUMBER_INFO_VER_PADDING_INC 50
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define PROGRESSBAR_TITLE_FONT_SIZE_INC 28
#define PROGRESSBAR_STATUS_TEXT_FONT_SIZE_INC 20
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define GRAY_RECT_COLOR 128 128 128 128
#define SPEEDBOX_OFFSET_Y 225
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define SCROLLER_DEFAULT_SCROLLBAR_COLOR_INC 248 246 239 255
#define SCROLLER_DEFAULT_SCROLLBAR_VBAR_IMAGE "00_scroll_bar_v.png"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define GRAY_RECT_COLOR 128 128 128 128
#define SPEEDBOX_OFFSET_Y 225
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "image_res.edc"
#include "vp_font.edc"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
//portrait
#define GRID_LEFT_PAD_INC 7
#define GRID_TOP_PAD_INC 4
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
group { name: "elm/toolbar/2buttons";
parts {
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
#define FONT_BOLD_TYPE "Tizen:style=Bold"
#define FONT_MEDIUM_TYPE "Tizen:style=Medium"
#define FONT_REGULAR_TYPE "Tizen:style=Regular"
msgstr "Després de gravar vídeos amb la càmera, es mostraran els vídeos"
msgid "IDS_VIDEO_SK_CANCEL_ABB"
-msgstr "Canc"
+msgstr "Cancel·lar"
msgid "IDS_VIDEO_OPT_STOP_AFTER_ALL_ABB"
msgstr "Aturar després tot"
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
collections {
group {
name: "effect";
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 ENABLE_DRM_FEATURE
#include <glib.h>
#include <drm_client.h>
#include <drm_client_types.h>
#endif
-/*#include <drm_trusted_client.h>*/
-/*#include <drm_trusted_client_types.h>*/
#include "mp-util.h"
#include "mp-video-log.h"
#include "mp-drm-ctrl.h"
#include "mp-external-ug.h"
-/*static DRM_DECRYPT_HANDLE pDrmConsumeHandle = NULL;*/
-/*static int CheckConsumption = VIDEO_DRM_CONSUMPTION_STATE_DISABLE;*/
#define ACCUMULATED_DATE 86400
#define RO_MESSAGE_LEN 1024
#define MOUNTH_COUNT 12
nRet = drm_is_drm_file(szPath, &is_drm);
if (nRet != DRM_RETURN_SUCCESS) {
VideoLogError("[ERR]Fail to get whether drm file or not : %d",
- nRet);
+ nRet);
return FALSE;
}
{
if (!szPath) {
VideoLogInfo
- ("[ERR] szPath is not existed for checking drm license.");
+ ("[ERR] szPath is not existed for checking drm license.");
return FALSE;
}
drm_license_status_e nLicenseStatus = DRM_LICENSE_STATUS_UNDEFINED;
- int nRet =
- drm_get_license_status(szPath, DRM_PERMISSION_TYPE_PLAY,
- &nLicenseStatus);
+ int nRet = drm_get_license_status(szPath, DRM_PERMISSION_TYPE_PLAY,
+ &nLicenseStatus);
if (nRet != DRM_RETURN_SUCCESS) {
VideoLogWarning("[ERR]Fail to get license info : %d", nRet);
int nRet = drm_get_file_info(szPath, &st_DrmFileInfo);
if (nRet == DRM_RETURN_SUCCESS) {
if (st_DrmFileInfo.oma_info.method ==
- DRM_METHOD_TYPE_COMBINED_DELIVERY
- || st_DrmFileInfo.oma_info.method ==
- DRM_METHOD_TYPE_FORWARD_LOCK) {
+ DRM_METHOD_TYPE_COMBINED_DELIVERY
+ || st_DrmFileInfo.oma_info.method ==
+ DRM_METHOD_TYPE_FORWARD_LOCK) {
VideoLogInfo
- ("st_DrmFileInfo.oma_info.method == DRM_METHOD_TYPE_COMBINED_DELIVERY || st_DrmFileInfo.oma_info.method == DRM_METHOD_TYPE_FORWARD_LOCK");
+ ("st_DrmFileInfo.oma_info.method == DRM_METHOD_TYPE_COMBINED_DELIVERY || st_DrmFileInfo.oma_info.method == DRM_METHOD_TYPE_FORWARD_LOCK");
return TRUE;
}
}
int nRet = drm_get_file_info(szPath, &st_DrmFileInfo);
if (nRet == DRM_RETURN_SUCCESS) {
- if (st_DrmFileInfo.oma_info.method ==
- DRM_METHOD_TYPE_FORWARD_LOCK) {
+ if (st_DrmFileInfo.oma_info.method == DRM_METHOD_TYPE_FORWARD_LOCK) {
VideoLogInfo
- ("st_DrmFileInfo.oma_info.method == DRM_METHOD_TYPE_FORWARD_LOCK");
+ ("st_DrmFileInfo.oma_info.method == DRM_METHOD_TYPE_FORWARD_LOCK");
return TRUE;
}
}
{
if (!szPath) {
VideoLogError
- ("[ERR] szPath is not existed for checking drm license.");
+ ("[ERR] szPath is not existed for checking drm license.");
return FALSE;
}
}
bool mp_drm_get_left_ro_info(char *szPath,
- st_MpConstraintsInfo *pLeftRoInfo,
- bool *pbHasValidRo)
+ st_MpConstraintsInfo * pLeftRoInfo,
+ bool * pbHasValidRo)
{
if (!szPath) {
VideoLogError("[ERR]szPath is not existed.");
memset(pLeftRoInfo, 0x0, sizeof(st_MpConstraintsInfo));
memset(&st_pDrmConstraintInfo, 0x0, sizeof(drm_constraint_info_s));
- int nRes =
- drm_get_constraint_info(szPath, DRM_PERMISSION_TYPE_PLAY,
- &st_pDrmConstraintInfo);
+ int nRes = drm_get_constraint_info(szPath, DRM_PERMISSION_TYPE_PLAY,
+ &st_pDrmConstraintInfo);
if (nRes == DRM_RETURN_SUCCESS) {
if (st_pDrmConstraintInfo.const_type.is_unlimited) {
VideoLogInfo("UNLIMITED");
if (st_pDrmConstraintInfo.const_type.is_count) {
VideoLogInfo("DRM_COUNT [%d]",
- st_pDrmConstraintInfo.remaining_count);
+ st_pDrmConstraintInfo.remaining_count);
pLeftRoInfo->constraints |= MP_DRM_CONSTRAINT_COUNT;
pLeftRoInfo->remaining_count =
- st_pDrmConstraintInfo.remaining_count;
+ st_pDrmConstraintInfo.remaining_count;
}
if (st_pDrmConstraintInfo.const_type.is_datetime) {
pLeftRoInfo->constraints |= MP_DRM_CONSTRAINT_DATE_TIME;
VideoLogInfo("%d.%d.%d %d:%d~%d.%d.%d %d:%d",
- st_pDrmConstraintInfo.start_time.tm_mday,
- st_pDrmConstraintInfo.start_time.tm_mon + 1,
- st_pDrmConstraintInfo.start_time.tm_year + 1900,
- st_pDrmConstraintInfo.start_time.tm_hour,
- st_pDrmConstraintInfo.start_time.tm_min,
- st_pDrmConstraintInfo.end_time.tm_mday,
- st_pDrmConstraintInfo.end_time.tm_mon + 1,
- st_pDrmConstraintInfo.end_time.tm_year + 1900,
- st_pDrmConstraintInfo.end_time.tm_hour,
- st_pDrmConstraintInfo.end_time.tm_min);
+ st_pDrmConstraintInfo.start_time.tm_mday,
+ st_pDrmConstraintInfo.start_time.tm_mon + 1,
+ st_pDrmConstraintInfo.start_time.tm_year + 1900,
+ st_pDrmConstraintInfo.start_time.tm_hour,
+ st_pDrmConstraintInfo.start_time.tm_min,
+ st_pDrmConstraintInfo.end_time.tm_mday,
+ st_pDrmConstraintInfo.end_time.tm_mon + 1,
+ st_pDrmConstraintInfo.end_time.tm_year + 1900,
+ st_pDrmConstraintInfo.end_time.tm_hour,
+ st_pDrmConstraintInfo.end_time.tm_min);
struct timeval tv;
gettimeofday(&tv, NULL);
ptm = localtime(&tv.tv_sec);
if (ptm->tm_year >= st_pDrmConstraintInfo.start_time.tm_year
- && ptm->tm_mon >= st_pDrmConstraintInfo.start_time.tm_mon
- && ptm->tm_mday >=
- st_pDrmConstraintInfo.start_time.tm_mday
- && ptm->tm_hour >=
- st_pDrmConstraintInfo.start_time.tm_hour
- && ptm->tm_min >= st_pDrmConstraintInfo.start_time.tm_min
- && ptm->tm_mon <= st_pDrmConstraintInfo.end_time.tm_mon
- && ptm->tm_mday <= st_pDrmConstraintInfo.end_time.tm_mday
- && ptm->tm_hour <= st_pDrmConstraintInfo.end_time.tm_hour
- && ptm->tm_min <= st_pDrmConstraintInfo.end_time.tm_min) {
- /* not expired*/
+ && ptm->tm_mon >= st_pDrmConstraintInfo.start_time.tm_mon
+ && ptm->tm_mday >=
+ st_pDrmConstraintInfo.start_time.tm_mday
+ && ptm->tm_hour >=
+ st_pDrmConstraintInfo.start_time.tm_hour
+ && ptm->tm_min >= st_pDrmConstraintInfo.start_time.tm_min
+ && ptm->tm_mon <= st_pDrmConstraintInfo.end_time.tm_mon
+ && ptm->tm_mday <= st_pDrmConstraintInfo.end_time.tm_mday
+ && ptm->tm_hour <= st_pDrmConstraintInfo.end_time.tm_hour
+ && ptm->tm_min <= st_pDrmConstraintInfo.end_time.tm_min) {
+ /* not expired */
pLeftRoInfo->date_time_expired = false;
} else {
pLeftRoInfo->date_time_expired = true;
if (st_pDrmConstraintInfo.const_type.is_interval) {
pLeftRoInfo->constraints |= MP_DRM_CONSTRAINT_INTERVAL;
VideoLogInfo("Remain... %d.%d.%d %d:%d",
- st_pDrmConstraintInfo.interval_time.tm_mon,
- st_pDrmConstraintInfo.interval_time.tm_mday,
- st_pDrmConstraintInfo.interval_time.tm_year,
- st_pDrmConstraintInfo.interval_time.tm_hour,
- st_pDrmConstraintInfo.interval_time.tm_min);
+ st_pDrmConstraintInfo.interval_time.tm_mon,
+ st_pDrmConstraintInfo.interval_time.tm_mday,
+ st_pDrmConstraintInfo.interval_time.tm_year,
+ st_pDrmConstraintInfo.interval_time.tm_hour,
+ st_pDrmConstraintInfo.interval_time.tm_min);
pLeftRoInfo->remaining_interval_sec =
- st_pDrmConstraintInfo.interval_time.tm_sec +
- st_pDrmConstraintInfo.interval_time.tm_min * 60 +
- st_pDrmConstraintInfo.interval_time.tm_hour * 3600;
+ st_pDrmConstraintInfo.interval_time.tm_sec +
+ st_pDrmConstraintInfo.interval_time.tm_min * 60 +
+ st_pDrmConstraintInfo.interval_time.tm_hour * 3600;
pLeftRoInfo->remaining_interval_sec +=
- (st_pDrmConstraintInfo.interval_time.tm_mday +
- st_pDrmConstraintInfo.interval_time.tm_mon * 30 +
- st_pDrmConstraintInfo.interval_time.tm_year * 365) *
- (3600 * 24);
+ (st_pDrmConstraintInfo.interval_time.tm_mday +
+ st_pDrmConstraintInfo.interval_time.tm_mon * 30 +
+ st_pDrmConstraintInfo.interval_time.tm_year * 365) *
+ (3600 * 24);
}
if (st_pDrmConstraintInfo.const_type.is_timedcount) {
VideoLogInfo("%d left (%d sec)",
- st_pDrmConstraintInfo.timed_remaining_count,
- st_pDrmConstraintInfo.timed_count_timer);
+ st_pDrmConstraintInfo.timed_remaining_count,
+ st_pDrmConstraintInfo.timed_count_timer);
pLeftRoInfo->constraints |= MP_DRM_CONSTRAINT_TIMED_COUNT;
pLeftRoInfo->remaining_timed_count =
- st_pDrmConstraintInfo.timed_remaining_count;
+ st_pDrmConstraintInfo.timed_remaining_count;
}
if (st_pDrmConstraintInfo.const_type.is_accumulated) {
VideoLogInfo("DRM_ACCUMULATED [%d]",
- st_pDrmConstraintInfo.
- accumulated_remaining_seconds);
+ st_pDrmConstraintInfo.accumulated_remaining_seconds);
pLeftRoInfo->constraints |= MP_DRM_CONSTRAINT_ACCUMLATED_TIME;
pLeftRoInfo->remaining_acc_sec =
- st_pDrmConstraintInfo.accumulated_remaining_seconds;
+ st_pDrmConstraintInfo.accumulated_remaining_seconds;
}
if (st_pDrmConstraintInfo.const_type.is_individual) {
VideoLogInfo("DRM_INDIVISUAL_ID [%s]",
- st_pDrmConstraintInfo.individual_id);
+ st_pDrmConstraintInfo.individual_id);
}
if (st_pDrmConstraintInfo.const_type.is_system) {
VideoLogInfo("DRM_SYSTEM [ID:%s, type:%d]",
- st_pDrmConstraintInfo.system_id,
- st_pDrmConstraintInfo.system_identity_type);
+ st_pDrmConstraintInfo.system_id,
+ st_pDrmConstraintInfo.system_identity_type);
}
} else {
VideoLogWarning("drm_get_constraint_info().. 0x%x", nRes);
}
bool mp_drm_get_content_info(char *szPath,
- MpVideoDrmContentInfoType nFirstInfoType,
- ...)
+ MpVideoDrmContentInfoType nFirstInfoType, ...)
{
/* return info shoud be free */
VideoLogInfo("");
}
static void mp_drm_popup_unlock_drm_yes_button_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogInfo("[ERR] No exist pUserData");
mp_drm_check_remain_ro(pUserData, NULL);
} else {
char *szRightsUrl = NULL;
- bool bRet =
- mp_drm_get_content_info(g_szMediaUri,
- DRM_CONTENT_INFO_RIGHTS_URL,
- &szRightsUrl, -1);
+ bool bRet = mp_drm_get_content_info(g_szMediaUri,
+ DRM_CONTENT_INFO_RIGHTS_URL,
+ &szRightsUrl, -1);
if (bRet && szRightsUrl) {
VideoSecureLogInfo("szRightsUrl : %s", szRightsUrl);
}
static void mp_drm_popup_unlock_drm_no_button_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogInfo("[ERR] No exist pUserData");
char *szMessage = NULL;
if (pMpConstraintsInfo.constraints & MP_DRM_CONSTRAINT_COUNT
- && pMpConstraintsInfo.remaining_count <= 2) {
+ && pMpConstraintsInfo.remaining_count <= 2) {
int nRemain = pMpConstraintsInfo.remaining_count - 1;
if (nRemain == 1) {
szFormat =
- MP_VPL_DRM_PS_CAN_USE_1_MORE_TIME_GET_ANOTHER_LICENCE_Q;
+ MP_VPL_DRM_PS_CAN_USE_1_MORE_TIME_GET_ANOTHER_LICENCE_Q;
szMessage = g_strdup_printf(szFormat, szTitle);
} else if (nRemain == 0) {
szFormat =
- MP_VPL_DRM_PS_CANNOT_USE_ANY_MORE_TIMES_GET_ANOTHER_LICENCE_Q;
+ MP_VPL_DRM_PS_CANNOT_USE_ANY_MORE_TIMES_GET_ANOTHER_LICENCE_Q;
szMessage = g_strdup_printf(szFormat, szTitle);
}
- } else if (pMpConstraintsInfo.
- constraints & MP_DRM_CONSTRAINT_ACCUMLATED_TIME) {
+ } else if (pMpConstraintsInfo.constraints &
+ MP_DRM_CONSTRAINT_ACCUMLATED_TIME) {
if (pMpConstraintsInfo.remaining_acc_sec / ACCUMULATED_DATE <= 1) {
szFormat =
- MP_VPL_DRM_PS_IS_ABOUT_TO_EXPIRE_GET_ANOTHER_LICENCE_Q;
+ MP_VPL_DRM_PS_IS_ABOUT_TO_EXPIRE_GET_ANOTHER_LICENCE_Q;
szMessage = g_strdup_printf(szFormat, szTitle);
}
}
if (szMessage) {
bCanPlayDrmContents = FALSE;
mp_util_yes_no_popup(pUserData, NULL, szMessage,
- mp_drm_popup_unlock_drm_yes_button_cb,
- mp_drm_popup_unlock_drm_no_button_cb);
+ mp_drm_popup_unlock_drm_yes_button_cb,
+ mp_drm_popup_unlock_drm_no_button_cb);
free(szMessage);
}
}
{
if (!szPath) {
VideoLogWarning
- ("[ERR]szPath is not existed for checking drm license.");
+ ("[ERR]szPath is not existed for checking drm license.");
return FALSE;
}
memset(&pMpConstraintsInfo, 0, sizeof(st_MpConstraintsInfo));
if (!mp_drm_get_left_ro_info
- (szPath, &pMpConstraintsInfo, &bHasValidRo)) {
+ (szPath, &pMpConstraintsInfo, &bHasValidRo)) {
VideoLogWarning("Fail to get left ro info.");
return FALSE;
}
}
}
- if (pMpConstraintsInfo.
- constraints & MP_DRM_CONSTRAINT_DATE_TIME) {
+ if (pMpConstraintsInfo.constraints &
+ MP_DRM_CONSTRAINT_DATE_TIME) {
if (pMpConstraintsInfo.date_time_expired) {
bWapLaunch = TRUE;
break;
}
}
- if (pMpConstraintsInfo.
- constraints & MP_DRM_CONSTRAINT_INTERVAL) {
+ if (pMpConstraintsInfo.constraints &
+ MP_DRM_CONSTRAINT_INTERVAL) {
if (pMpConstraintsInfo.remaining_interval_sec == 0) {
bWapLaunch = TRUE;
break;
} else if (!bCheckIntervalConstraint) {
bCheckIntervalConstraint = TRUE;
int nDays =
- pMpConstraintsInfo.remaining_interval_sec /
- ACCUMULATED_DATE + 1;
+ pMpConstraintsInfo.remaining_interval_sec /
+ ACCUMULATED_DATE + 1;
szFormat = MP_VPL_DRM_PS_FOR_PD_DAYS_START_NOW_Q;
szMessage = g_strdup_printf(szFormat, szTitle, nDays);
}
}
- if (pMpConstraintsInfo.
- constraints & MP_DRM_CONSTRAINT_TIMED_COUNT) {
+ if (pMpConstraintsInfo.constraints &
+ MP_DRM_CONSTRAINT_TIMED_COUNT) {
if (pMpConstraintsInfo.remaining_timed_count == 2) {
szFormat = MP_VPL_DRM_PS_2_MORE_TIME_START_NOW_Q;
szMessage = g_strdup_printf(szFormat, szTitle);
}
}
- if (pMpConstraintsInfo.
- constraints & MP_DRM_CONSTRAINT_ACCUMLATED_TIME) {
+ if (pMpConstraintsInfo.constraints &
+ MP_DRM_CONSTRAINT_ACCUMLATED_TIME) {
if (pMpConstraintsInfo.remaining_acc_sec == 0) {
bWapLaunch = TRUE;
break;
}
if (!bHasValidRo
- || (bWapLaunch && !mp_drm_check_expiration(szPath, bExpired))) {
+ || (bWapLaunch && !mp_drm_check_expiration(szPath, bExpired))) {
VideoLogWarning("have no valid ro");
szFormat = MP_VPL_DRM_PS_CURRENTLY_LOCKED_UNLOCK_Q;
szMessage = g_strdup_printf(szFormat, szTitle);
mp_util_yes_no_popup(pUserData, NULL, szMessage,
- mp_drm_popup_unlock_drm_yes_button_cb,
- mp_drm_popup_unlock_drm_no_button_cb);
+ mp_drm_popup_unlock_drm_yes_button_cb,
+ mp_drm_popup_unlock_drm_no_button_cb);
if (szMessage) {
free(szMessage);
VideoLogWarning("warning popup=[%s]", szMessage);
mp_util_yes_no_popup(pUserData, NULL, szMessage,
- mp_drm_popup_unlock_drm_yes_button_cb,
- mp_drm_popup_unlock_drm_no_button_cb);
+ mp_drm_popup_unlock_drm_yes_button_cb,
+ mp_drm_popup_unlock_drm_no_button_cb);
if (szMessage) {
free(szMessage);
}
bool mp_drm_check_divx_rental_expired(char *szPath, int *use_count,
- int *total_count)
+ int *total_count)
{
VideoLogInfo("");
drm_constraint_info_s constraint_info;
memset(&constraint_info, 0, sizeof(drm_constraint_info_s));
nRet =
- drm_get_constraint_info(szPath, DRM_PERMISSION_TYPE_PLAY,
- &constraint_info);
+ drm_get_constraint_info(szPath, DRM_PERMISSION_TYPE_PLAY,
+ &constraint_info);
if (nRet != DRM_RETURN_SUCCESS) {
VideoLogError("[ERR]drm_get_file_info : %d", nRet);
return FALSE;
}
VideoLogError("[TYPE]\n"
- "unlimied : %d\n"
- "is_count : %d\n"
- "is_datetime : %d\n"
- "is_interval : %d\n"
- "is_timedcount : %d\n"
- "is_accumulated : %d\n"
- "is_individual : %d\n"
- "is_system : %d\n"
- "constraint_type : %d",
- constraint_info.const_type.is_unlimited,
- constraint_info.const_type.is_count,
- constraint_info.const_type.is_datetime,
- constraint_info.const_type.is_interval,
- constraint_info.const_type.is_timedcount,
- constraint_info.const_type.is_accumulated,
- constraint_info.const_type.is_individual,
- constraint_info.const_type.is_system,
- constraint_info.const_type.constraint_type);
+ "unlimied : %d\n"
+ "is_count : %d\n"
+ "is_datetime : %d\n"
+ "is_interval : %d\n"
+ "is_timedcount : %d\n"
+ "is_accumulated : %d\n"
+ "is_individual : %d\n"
+ "is_system : %d\n"
+ "constraint_type : %d",
+ constraint_info.const_type.is_unlimited,
+ constraint_info.const_type.is_count,
+ constraint_info.const_type.is_datetime,
+ constraint_info.const_type.is_interval,
+ constraint_info.const_type.is_timedcount,
+ constraint_info.const_type.is_accumulated,
+ constraint_info.const_type.is_individual,
+ constraint_info.const_type.is_system,
+ constraint_info.const_type.constraint_type);
if (constraint_info.const_type.is_unlimited) {
VideoLogError("unlimited");
} else if (constraint_info.const_type.is_count) {
*use_count =
- constraint_info.original_count -
- constraint_info.remaining_count;
+ constraint_info.original_count -
+ constraint_info.remaining_count;
*total_count = constraint_info.original_count;
if (constraint_info.remaining_count <= 0) {
}
void mp_drm_get_file_extension(char *szPath, char *szContentType,
- int nContentTypeStrSize)
+ int nContentTypeStrSize)
{
if (!szContentType) {
VideoLogError("[ERR]");
VideoLogInfo("nRet : [%d] contentType: %s", nRet,
- content_info.mime_type);
+ content_info.mime_type);
strncpy(szContentType, content_info.mime_type,
- nContentTypeStrSize - 1);
+ nContentTypeStrSize - 1);
}
#endif
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <Elementary.h>
static VideosRotateStatus_t nCurrentRotateStatus = VIDEOS_ROTATE_NONE;
-void mp_rotate_ctrl_changed_cb(void *pUserData, Evas_Object *pObject,
- void *pEventInfo)
+void mp_rotate_ctrl_changed_cb(void *pUserData, Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("Rotate state before changing : %d",
- nCurrentRotateStatus);
+ nCurrentRotateStatus);
switch (elm_win_rotation_get((Evas_Object *) pObject)) {
case 0:
*/
mp_list_view_rotate_view(LIST_UPDATE_TYPE_VIEW);
- /*if (MpVideoListViewIsTopView())
- {
- VideoLogInfo("top view is main list view");
- mp_list_view_rotate_view(LIST_UPDATE_TYPE_VIEW);
- } */
-
}
if (pWindowHandle) {
if (elm_win_wm_rotation_supported_get(pWindowHandle)) {
- /*int nRotateType[4] = { 0, 90, 180, 270 };*/
+ /*int nRotateType[4] = { 0, 90, 180, 270 }; */
const int nRotateType[4] = { 0, 90, 180, 270 };
elm_win_wm_rotation_available_rotations_set(pWindowHandle,
- nRotateType, 4);
+ nRotateType, 4);
}
nCurrentRotateStatus = VIDEOS_ROTATE_NONE;
-
- /*evas_object_smart_callback_add(pWindowHandle, "wm,rotation,changed", mp_rotate_ctrl_changed_cb, NULL);*/
}
}
{
VideoLogInfo("");
nCurrentRotateStatus = VIDEOS_ROTATE_NONE;
- /*evas_object_smart_callback_del(mp_util_get_main_window_handle(), "wm,rotation,changed", mp_rotate_ctrl_changed_cb);*/
}
VideosRotateStatus_t mp_rotate_ctrl_get_current_state(void)
{
bool bLandSpace = FALSE;
if (nCurrentRotateStatus == VIDEOS_ROTATE_90
- || nCurrentRotateStatus == VIDEOS_ROTATE_270) {
+ || nCurrentRotateStatus == VIDEOS_ROTATE_270) {
bLandSpace = TRUE;
}
return bLandSpace;
}
-bool mp_rotate_ctrl_check_landspace_by_win(Evas_Object *pWin)
+bool mp_rotate_ctrl_check_landspace_by_win(Evas_Object * pWin)
{
if (!pWin) {
VideoLogError("win is 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app_preference.h>
nErr = preference_set_boolean(PREF_MP_MULTI_PLAY_FLAG, bMultiPlay);
if (nErr != 0) {
- VideoLogError
- ("SET PREF_MP_MULTI_PLAY_FLAG is fail [0x%x]",
- nErr);
+ VideoLogError("SET PREF_MP_MULTI_PLAY_FLAG is fail [0x%x]", nErr);
return FALSE;
}
return TRUE;
}
-bool mp_util_config_get_multi_play_status(bool *bMultiPlay)
+bool mp_util_config_get_multi_play_status(bool * bMultiPlay)
{
int nErr = 0;
bool nVal = 0;
nErr = preference_get_boolean(PREF_MP_MULTI_PLAY_FLAG, &nVal);
if (nErr != 0) {
- VideoLogError
- ("GET PREF_MP_MULTI_PLAY_FLAG is fail [0x%x]",
- nErr);
+ VideoLogError("GET PREF_MP_MULTI_PLAY_FLAG is fail [0x%x]", nErr);
return FALSE;
}
if (szPreviewUrl) {
if (preference_set_string
- (MP_UTIL_PREFERENCE_KEY_PREVIEW_URL_VIDEOS,
- szPreviewUrl)) {
+ (MP_UTIL_PREFERENCE_KEY_PREVIEW_URL_VIDEOS, szPreviewUrl)) {
VideoLogError("Fail to write szPreviewUrl.");
bRet = FALSE;
} else {
bRet = TRUE;
}
} else {
- if (preference_set_string(MP_UTIL_PREFERENCE_KEY_PREVIEW_URL_VIDEOS, "")) {
+ if (preference_set_string
+ (MP_UTIL_PREFERENCE_KEY_PREVIEW_URL_VIDEOS, "")) {
VideoLogError("Fail to write szPreviewUrl.");
bRet = FALSE;
} else {
char *pTmpVideoUrl = NULL;
int nErr = 0;
- nErr = preference_get_string(MP_UTIL_PREFERENCE_KEY_PREVIEW_URL_VIDEOS, &pTmpVideoUrl);
+ nErr =
+ preference_get_string(MP_UTIL_PREFERENCE_KEY_PREVIEW_URL_VIDEOS,
+ &pTmpVideoUrl);
if (nErr != 0 || !pTmpVideoUrl) {
- VideoLogError("fail to retrive url [0x%x]",nErr);
+ VideoLogError("fail to retrive url [0x%x]", nErr);
return NULL;
}
}
bool mp_util_config_preview_key_changed_cb(preference_changed_cb callback,
- void *pUserData)
+ void *pUserData)
{
int nErr = 0;
- nErr = preference_set_changed_cb(MP_UTIL_PREFERENCE_KEY_PREVIEW_URL_VIDEOS,
- callback, pUserData);
+ nErr =
+ preference_set_changed_cb
+ (MP_UTIL_PREFERENCE_KEY_PREVIEW_URL_VIDEOS, callback, pUserData);
if (nErr != 0) {
VideoLogError("failed to register callback [0x%x]", nErr);
return FALSE;
bool mp_util_config_ignore_preview_key_changed_cb()
{
int nErr = 0;
- nErr = preference_unset_changed_cb(MP_UTIL_PREFERENCE_KEY_PREVIEW_URL_VIDEOS);
+ nErr =
+ preference_unset_changed_cb
+ (MP_UTIL_PREFERENCE_KEY_PREVIEW_URL_VIDEOS);
if (nErr != 0) {
VideoLogError("failed to unregister [0x%x]", nErr);
return FALSE;
return TRUE;
}
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
#include <glib.h>
static int nWhatFileType = MP_MEDIA_VIDEO_FILE_TYPE;
static int nTotalVideoTypeFiles = 0;
static int nNumberOfVideoItemByType = 0;
-//media_content_noti_h g_pCloud_h; /* Notify handle for cloud content updating in DB */
+static media_content_noti_h noti_handle = NULL;
bool mp_util_svc_is_3gp_file(char *szFileUri)
char *szExt = NULL;
szExt = strrchr(szTmpUriPath, '.');
- if ((szExt != NULL) && ((szExt+1) != NULL)) {
- if (!strcmp(szExt+1, "3gp")) {
+ if ((szExt != NULL) && ((szExt + 1) != NULL)) {
+ if (!strcmp(szExt + 1, "3gp")) {
nRet = TRUE;
} else {
nRet = FALSE;
VideoLogError("No exist extension.");
nRet = FALSE;
}
- }
- else
- {
+ } else {
VideoLogError("No exist file uri.");
nRet = FALSE;
}
return nRet;
}
-static bool mp_util_svc_iterate_for_get_video_item_cb(media_info_h pVideoItem, void *pUserData)
+static bool mp_util_svc_iterate_for_get_video_item_cb(media_info_h
+ pVideoItem,
+ void *pUserData)
{
- media_info_h *pAssignFolderItem = (media_info_h*)pUserData;
+ media_info_h *pAssignFolderItem = (media_info_h *) pUserData;
if (pVideoItem != NULL) {
char *szTmpStr = NULL;
return FALSE;
}
-static bool mp_util_svc_iterate_for_video_item_list_view_cb(media_info_h pMediaItem, void *pUserData)
+static bool mp_util_svc_iterate_for_video_item_list_view_cb(media_info_h
+ pMediaItem,
+ void
+ *pUserData)
{
media_info_h pAssignMediaItem = NULL;
media_content_type_e nMediaType = MEDIA_CONTENT_TYPE_OTHERS;
if (nMediaType == MEDIA_CONTENT_TYPE_VIDEO) {
char *szTmpItemFilePath = NULL;
- char szItemFilePath[STR_LEN_MAX] = {0,};
+ char szItemFilePath[STR_LEN_MAX] = { 0, };
media_info_get_file_path(pMediaItem, &szTmpItemFilePath);
nNumberOfVideoItemByType++;
media_info_clone(&pAssignMediaItem, pMediaItem);
- Eina_List **pList = (Eina_List **)pUserData;
+ Eina_List **pList = (Eina_List **) pUserData;
*pList = eina_list_append(*pList, pAssignMediaItem);
}
return TRUE;
}
-static bool mp_util_svc_iterate_cb(media_info_h pMediaItem, void *pUserData)
+static bool mp_util_svc_iterate_cb(media_info_h pMediaItem,
+ void *pUserData)
{
media_info_h pAssignMediaItem = NULL;
media_content_type_e nMediaType = MEDIA_CONTENT_TYPE_OTHERS;
if (nMediaType == MEDIA_CONTENT_TYPE_VIDEO) {
media_info_clone(&pAssignMediaItem, pMediaItem);
- Eina_List **pList = (Eina_List **)pUserData;
+ Eina_List **pList = (Eina_List **) pUserData;
*pList = eina_list_append(*pList, pAssignMediaItem);
nTotalVideoTypeFiles++;
return TRUE;
}
-static bool mp_util_svc_iterate_for_get_folder_cb(media_folder_h pFolderItem, void *pUserData)
+static bool mp_util_svc_iterate_for_get_folder_cb(media_folder_h
+ pFolderItem,
+ void *pUserData)
{
- media_folder_h *pAssignFolderItem = (media_folder_h*)pUserData;
+ media_folder_h *pAssignFolderItem = (media_folder_h *) pUserData;
if (pFolderItem != NULL) {
char *szTmpStr = NULL;
return TRUE;
}
-static int mp_util_svc_sort_for_folder_list_cb(const void *pFolder1, const void *pFolder2)
+static int mp_util_svc_sort_for_folder_list_cb(const void *pFolder1,
+ const void *pFolder2)
{
- media_folder_h pFolderType1 = (media_folder_h)pFolder1;
- media_folder_h pFolderType2 = (media_folder_h)pFolder2;
+ media_folder_h pFolderType1 = (media_folder_h) pFolder1;
+ media_folder_h pFolderType2 = (media_folder_h) pFolder2;
char *folderName1 = NULL;
char *folderName2 = NULL;
return nRet;
}
-static bool mp_util_svc_iterate_for_folder_list_cb(media_folder_h pFolderItem, void *pUserData)
+static bool mp_util_svc_iterate_for_folder_list_cb(media_folder_h
+ pFolderItem,
+ void *pUserData)
{
media_folder_h pAssignFolderItem = NULL;
- Eina_Compare_Cb pCmpFunc = (Eina_Compare_Cb)mp_util_svc_sort_for_folder_list_cb;
+ Eina_Compare_Cb pCmpFunc =
+ (Eina_Compare_Cb) mp_util_svc_sort_for_folder_list_cb;
media_folder_clone(&pAssignFolderItem, pFolderItem);
- Eina_List **pList = (Eina_List **)pUserData;
+ Eina_List **pList = (Eina_List **) pUserData;
*pList = eina_list_append(*pList, pAssignFolderItem);
*pList = eina_list_sort(*pList, eina_list_count(*pList), pCmpFunc);
return TRUE;
}
-static bool mp_util_svc_iterate_for_personal_folder_list_cb(media_folder_h pFolderItem, void *pUserData)
+static bool mp_util_svc_iterate_for_personal_folder_list_cb(media_folder_h
+ pFolderItem,
+ void
+ *pUserData)
{
media_folder_h pAssignFolderItem = NULL;
media_folder_clone(&pAssignFolderItem, pFolderItem);
- Eina_List **pList = (Eina_List **)pUserData;
- Eina_Compare_Cb pCmpFunc = (Eina_Compare_Cb)mp_util_svc_sort_for_folder_list_cb;
+ Eina_List **pList = (Eina_List **) pUserData;
+ Eina_Compare_Cb pCmpFunc =
+ (Eina_Compare_Cb) mp_util_svc_sort_for_folder_list_cb;
char *szFolderPath = NULL;
if (pAssignFolderItem) {
MP_FREE_STRING(szFolderPath);
media_folder_destroy(pAssignFolderItem);
- pAssignFolderItem = NULL;
+ pAssignFolderItem = NULL;
return TRUE;
}
//
// Internal function
//
-bool mp_util_svc_get_file_directory_name(char *szFilePath, char *szFileName, char *szDirectoryName, char *szDirectoryPath)
+bool mp_util_svc_get_file_directory_name(char *szFilePath,
+ char *szFileName,
+ char *szDirectoryName,
+ char *szDirectoryPath)
{
if (!szFilePath) {
VideoLogError("[ERR]");
if (szDirectoryName) {
nCount = 0;
- for (--nLoopCount; nLoopCount >= 0; nLoopCount--)
- {
+ for (--nLoopCount; nLoopCount >= 0; nLoopCount--) {
nCount++;
if (szFilePath[nLoopCount] == '/') {
- memcpy(szDirectoryName, &szFilePath[nLoopCount + 1], --nCount);
+ memcpy(szDirectoryName,
+ &szFilePath[nLoopCount + 1], --nCount);
*(szDirectoryName + nCount) = '\0';
return TRUE;
{
if (media_content_connect() != MEDIA_CONTENT_ERROR_NONE) {
VideoLogInfo("Fail to connect to media content db.");
- }
- else
- {
+ } else {
VideoLogInfo("Success to connect to media content db.");
}
}
void mp_util_svc_finish_session(void)
{
- //mp_util_svc_unset_update_db_cb_func();
if (media_content_disconnect() != MEDIA_CONTENT_ERROR_NONE) {
VideoLogInfo("Fail to disconnect from media content db.");
return TRUE;
}
-bool mp_util_svc_extract_video_list_from_folder(char *szFolderPath, int nSortType, int nItemType)
+bool mp_util_svc_extract_video_list_from_folder(char *szFolderPath,
+ int nSortType,
+ int nItemType)
{
if (VideoItemList) {
VideoLogError("Already exist video list.");
media_content_order_e nOrderType = MEDIA_CONTENT_ORDER_ASC;
char *szFolderID = NULL;
- char szTmpStr[STR_LEN_MAX] = {0,};
- char szOrderObj[STR_LEN_MAX] = {0,};
+ char szTmpStr[STR_LEN_MAX] = { 0, };
+ char szOrderObj[STR_LEN_MAX] = { 0, };
nTotalVideoTypeFiles = 0;
nNumberOfVideoItemByType = 0;
}
switch (nItemType) {
- case MP_LIST_VIEW_ALL:
- if (!mp_util_get_personal_status()) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) and FOLDER_PATH = \"%s\" and FOLDER_PATH NOT LIKE \"%s%%\"", szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
- } else {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\"", szFolderPath);
- }
+ case MP_LIST_VIEW_ALL:
+ if (!mp_util_get_personal_status()) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) and FOLDER_PATH = \"%s\" and FOLDER_PATH NOT LIKE \"%s%%\"",
+ szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\"",
+ szFolderPath);
+ }
break;
- case MP_LIST_VIEW_PHONE:
- if (!mp_util_get_personal_status()) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 and (MEDIA_STORAGE_TYPE = 0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\" and FOLDER_PATH NOT LIKE \"%s%%\"", szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
- } else {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\"", szFolderPath);
- }
+ case MP_LIST_VIEW_PHONE:
+ if (!mp_util_get_personal_status()) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 and (MEDIA_STORAGE_TYPE = 0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\" and FOLDER_PATH NOT LIKE \"%s%%\"",
+ szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\"",
+ szFolderPath);
+ }
break;
- case MP_LIST_VIEW_CLOUD:
- if (!mp_util_get_personal_status()) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) and MEDIA_STORAGE_TYPE = 101 and FOLDER_PATH = \"%s\" and FOLDER_PATH NOT LIKE \"%s%%\"", szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
- } else {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_STORAGE_TYPE = 101 and FOLDER_PATH = \"%s\"", szFolderPath);
- }
+ case MP_LIST_VIEW_CLOUD:
+ if (!mp_util_get_personal_status()) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) and MEDIA_STORAGE_TYPE = 101 and FOLDER_PATH = \"%s\" and FOLDER_PATH NOT LIKE \"%s%%\"",
+ szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_STORAGE_TYPE = 101 and FOLDER_PATH = \"%s\"",
+ szFolderPath);
+ }
break;
- default:
- if (!mp_util_get_personal_status()) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) and FOLDER_PATH = \"%s\" and FOLDER_PATH NOT LIKE \"%s%%\"", szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
- } else {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\"", szFolderPath);
- }
- break;
+ default:
+ if (!mp_util_get_personal_status()) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) and FOLDER_PATH = \"%s\" and FOLDER_PATH NOT LIKE \"%s%%\"",
+ szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\"",
+ szFolderPath);
+ }
+ break;
}
if (media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE) {
return FALSE;
}
- if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_filter_set_condition
+ (m_FilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_folder_foreach_folder_from_db(m_FilterHandle, mp_util_svc_iterate_for_get_folder_cb, &m_FolderHandle) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_folder_foreach_folder_from_db
+ (m_FilterHandle, mp_util_svc_iterate_for_get_folder_cb,
+ &m_FolderHandle) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail media_folder_foreach_folder_from_db().");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
memset(szTmpStr, 0, STR_LEN_MAX);
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101)");
- if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101)");
+ if (media_filter_set_condition
+ (m_FilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_filter_set_order(m_FilterHandle, nOrderType, szOrderObj, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_filter_set_order
+ (m_FilterHandle, nOrderType, szOrderObj,
+ MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set order.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_folder_get_folder_id(m_FolderHandle, &szFolderID) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_folder_get_folder_id(m_FolderHandle, &szFolderID) !=
+ MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to get folder id.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_folder_foreach_media_from_db(szFolderID, m_FilterHandle, mp_util_svc_iterate_cb, &VideoItemList) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_folder_foreach_media_from_db
+ (szFolderID, m_FilterHandle, mp_util_svc_iterate_cb,
+ &VideoItemList) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set order.");
media_filter_destroy(m_FilterHandle);
}
media_folder_h m_FolderHandle = NULL;
- m_FolderHandle = (media_folder_h)eina_list_nth(VideoFolderList, nVideoFolderIndex);
+ m_FolderHandle =
+ (media_folder_h) eina_list_nth(VideoFolderList, nVideoFolderIndex);
if (!m_FolderHandle) {
VideoLogError("Fail to get folder handle.");
return NULL;
filter_h m_FilterHandle = NULL;
media_content_order_e nOrderType = MEDIA_CONTENT_ORDER_ASC;
char *szFolderID = NULL;
- char szOrderObj[STR_LEN_MAX] = {0,};
- char szTmpStr[STR_LEN_MAX] = {0,};
+ char szOrderObj[STR_LEN_MAX] = { 0, };
+ char szTmpStr[STR_LEN_MAX] = { 0, };
switch (nSortType) {
case MP_MEDIA_SORT_BY_NONE:
}
memset(szTmpStr, 0, STR_LEN_MAX);
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121)");
- if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121)");
+ if (media_filter_set_condition
+ (m_FilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return NULL;
}
- if (media_filter_set_order(m_FilterHandle, nOrderType, szOrderObj, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_filter_set_order
+ (m_FilterHandle, nOrderType, szOrderObj,
+ MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set order.");
media_filter_destroy(m_FilterHandle);
return NULL;
}
- if (media_folder_get_folder_id(m_FolderHandle, &szFolderID) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_folder_get_folder_id(m_FolderHandle, &szFolderID) !=
+ MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to get folder id.");
media_filter_destroy(m_FilterHandle);
return NULL;
}
- if (media_folder_foreach_media_from_db(szFolderID, m_FilterHandle, mp_util_svc_iterate_for_get_video_item_cb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_folder_foreach_media_from_db
+ (szFolderID, m_FilterHandle,
+ mp_util_svc_iterate_for_get_video_item_cb,
+ &pVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set order.");
media_filter_destroy(m_FilterHandle);
if (pVideoItem) {
media_info_get_thumbnail_path(pVideoItem, &szThumbnailPath);
- VideoSecureLogInfo("Video thumbnail file path : %s", szThumbnailPath);
+ VideoSecureLogInfo("Video thumbnail file path : %s",
+ szThumbnailPath);
media_info_destroy(pVideoItem);
}
return szThumbnailPath;
}
-bool mp_util_svc_extract_video_list_by_item_type(int nSortType, int nItemType)
+bool mp_util_svc_extract_video_list_by_item_type(int nSortType,
+ int nItemType)
{
if (VideoItemList) {
VideoLogError("Already exist video list.");
filter_h m_FilterHandle = NULL;
media_content_order_e nOrderType = MEDIA_CONTENT_ORDER_ASC;
- char szTmpStr[STR_LEN_MAX] = {0,};
- char szOrderObj[STR_LEN_MAX] = {0,};
+ char szTmpStr[STR_LEN_MAX] = { 0, };
+ char szOrderObj[STR_LEN_MAX] = { 0, };
nNumberOfVideoItemByType = 0;
switch (nItemType) {
case MP_LIST_VIEW_ALL:
- if (!mp_util_get_personal_status()) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) and MEDIA_PATH not like \"%s%%\"", VIDEO_UTIL_PERSONAL_HEAD_STR);
- } else {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121)");
- }
+ if (!mp_util_get_personal_status()) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) and MEDIA_PATH not like \"%s%%\"",
+ VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121)");
+ }
break;
case MP_LIST_VIEW_PHONE:
- if (!mp_util_get_personal_status()) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 and (MEDIA_STORAGE_TYPE = 0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH not like \"%s%%\"", VIDEO_UTIL_PERSONAL_HEAD_STR);
- } else {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 and (MEDIA_STORAGE_TYPE = 0 OR MEDIA_STORAGE_TYPE=1)");
- }
+ if (!mp_util_get_personal_status()) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 and (MEDIA_STORAGE_TYPE = 0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH not like \"%s%%\"",
+ VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 and (MEDIA_STORAGE_TYPE = 0 OR MEDIA_STORAGE_TYPE=1)");
+ }
break;
case MP_LIST_VIEW_CLOUD:
- if (!mp_util_get_personal_status()) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) and MEDIA_STORAGE_TYPE = 101 and MEDIA_PATH not like \"%s%%\"", VIDEO_UTIL_PERSONAL_HEAD_STR);
- } else {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) and MEDIA_STORAGE_TYPE = 101");
- }
+ if (!mp_util_get_personal_status()) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) and MEDIA_STORAGE_TYPE = 101 and MEDIA_PATH not like \"%s%%\"",
+ VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) and MEDIA_STORAGE_TYPE = 101");
+ }
break;
default:
- if (!mp_util_get_personal_status()) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) and MEDIA_PATH not like \"%s%%\"", VIDEO_UTIL_PERSONAL_HEAD_STR);
- } else {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121)");
- }
+ if (!mp_util_get_personal_status()) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) and MEDIA_PATH not like \"%s%%\"",
+ VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121)");
+ }
break;
}
VideoLogInfo("MEDIA_PATH not like %s", szTmpStr);
VideoLogInfo("Fail to create media filter handle.");
return FALSE;
}
- if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_filter_set_condition
+ (m_FilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_filter_set_order(m_FilterHandle, nOrderType, szOrderObj, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_filter_set_order
+ (m_FilterHandle, nOrderType, szOrderObj,
+ MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set order.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_info_foreach_media_from_db(m_FilterHandle, mp_util_svc_iterate_for_video_item_list_view_cb, &VideoItemList) != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("Fail to get video item list with filter condition.");
+ if (media_info_foreach_media_from_db
+ (m_FilterHandle, mp_util_svc_iterate_for_video_item_list_view_cb,
+ &VideoItemList) != MEDIA_CONTENT_ERROR_NONE) {
+ VideoLogError
+ ("Fail to get video item list with filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
filter_h m_FilterHandle = NULL;
media_content_order_e nOrderType = MEDIA_CONTENT_ORDER_ASC;
- char szOrderObj[STR_LEN_MAX] = {0,};
- char szTmpStr[STR_LEN_MAX] = {0,};
+ char szOrderObj[STR_LEN_MAX] = { 0, };
+ char szTmpStr[STR_LEN_MAX] = { 0, };
nWhatFileType = MP_MEDIA_ALL_FILE_TYPE;
}
if (!mp_util_get_personal_status()) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 and MEDIA_FAVOURITE = 1 and MEDIA_PATH NOT LIKE \"%s%%\"", VIDEO_UTIL_PERSONAL_HEAD_STR);
- }
- else
- {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 and MEDIA_FAVOURITE = 1");
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 and MEDIA_FAVOURITE = 1 and MEDIA_PATH NOT LIKE \"%s%%\"",
+ VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 and MEDIA_FAVOURITE = 1");
}
- if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_filter_set_condition
+ (m_FilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_filter_set_order(m_FilterHandle, nOrderType, szOrderObj, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_filter_set_order
+ (m_FilterHandle, nOrderType, szOrderObj,
+ MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set order.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_info_foreach_media_from_db(m_FilterHandle, mp_util_svc_iterate_for_video_item_list_view_cb, &VideoItemList) != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("Fail to get video item list with filter condition.");
+ if (media_info_foreach_media_from_db
+ (m_FilterHandle, mp_util_svc_iterate_for_video_item_list_view_cb,
+ &VideoItemList) != MEDIA_CONTENT_ERROR_NONE) {
+ VideoLogError
+ ("Fail to get video item list with filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
}
-bool mp_util_svc_index_list_for_search_view(const char *keyword, void **index_list)
+bool mp_util_svc_index_list_for_search_view(const char *keyword,
+ void **index_list)
{
media_info_h pVideoItem = NULL;
Eina_List *pIterateList = NULL;
char *szTitle = NULL;
media_info_get_display_name(pVideoItem, &szTitle);
if (szTitle && mp_util_str_str_same_case(szTitle, keyword)) {
- pSearchList = eina_list_append(pSearchList, (const void*)index);
+ pSearchList =
+ eina_list_append(pSearchList, (const void *) index);
}
MP_FREE_STRING(szTitle);
}
- index ++;
+ index++;
}
*index_list = pSearchList;
return TRUE;
}
-bool mp_util_svc_index_list_for_cloud_view(void **index_list, int *nListSize)
-{
-// media_info_h pVideoItem = NULL;
-// Eina_List *pIterateList = NULL;
-// int index = 0;
-// int size = 0;
-// if (!VideoItemList) {
-// VideoLogError("VideoItemList IS null");
-// return FALSE;
-// }
-// EINA_LIST_FOREACH(VideoItemList, pIterateList, pVideoItem)
-// {
-// if (pVideoItem)
-// {
-// media_content_storage_ex_e storage_type = MEDIA_CONTENT_STORAGE_INTERNAL_EX;
-// media_info_get_storage_type_ex(pVideoItem, &storage_type);
-// if (storage_type == MEDIA_CONTENT_STORAGE_DROPBOX_EX) {
-// *index_list = eina_list_append(*index_list, (const void*)index);
-// size ++;
-// }
-// }
-// index ++;
-// }
-// *nListSize = size;
-// return TRUE;
+bool mp_util_svc_index_list_for_cloud_view(void **index_list,
+ int *nListSize)
+{
return FALSE;
}
-bool mp_util_svc_extract_video_list_for_search_view(const char *keyword, int nItemType)
+bool mp_util_svc_extract_video_list_for_search_view(const char *keyword,
+ int nItemType)
{
if (VideoItemList) {
VideoLogError("Already exist video list.");
filter_h m_FilterHandle = NULL;
media_content_order_e nOrderType = MEDIA_CONTENT_ORDER_ASC;
- char szOrderObj[STR_LEN_MAX] = {0,};
- char szTmpStr[STR_LEN_MAX] = {0,};
+ char szOrderObj[STR_LEN_MAX] = { 0, };
+ char szTmpStr[STR_LEN_MAX] = { 0, };
nWhatFileType = MP_MEDIA_ALL_FILE_TYPE;
nTotalVideoTypeFiles = 0;
}
switch (nItemType) {
- case MP_LIST_VIEW_ALL:
- if (!mp_util_get_personal_status()) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) and MEDIA_DISPLAY_NAME like \"%%%s%%\" and MEDIA_PATH NOT LIKE \"%s%%\"", keyword, VIDEO_UTIL_PERSONAL_HEAD_STR);
- } else {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) and MEDIA_DISPLAY_NAME like \"%%%s%%\"", keyword);
- }
- break;
+ case MP_LIST_VIEW_ALL:
+ if (!mp_util_get_personal_status()) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) and MEDIA_DISPLAY_NAME like \"%%%s%%\" and MEDIA_PATH NOT LIKE \"%s%%\"",
+ keyword, VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) and MEDIA_DISPLAY_NAME like \"%%%s%%\"",
+ keyword);
+ }
+ break;
- case MP_LIST_VIEW_PHONE:
- if (!mp_util_get_personal_status()) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 and (MEDIA_STORAGE_TYPE = 0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_DISPLAY_NAME like \"%%%s%%\" and MEDIA_PATH NOT LIKE \"%s%%\"", keyword, VIDEO_UTIL_PERSONAL_HEAD_STR);
- } else {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 and (MEDIA_STORAGE_TYPE = 0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_DISPLAY_NAME like \"%%%s%%\"", keyword);
- }
- break;
+ case MP_LIST_VIEW_PHONE:
+ if (!mp_util_get_personal_status()) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 and (MEDIA_STORAGE_TYPE = 0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_DISPLAY_NAME like \"%%%s%%\" and MEDIA_PATH NOT LIKE \"%s%%\"",
+ keyword, VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 and (MEDIA_STORAGE_TYPE = 0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_DISPLAY_NAME like \"%%%s%%\"",
+ keyword);
+ }
+ break;
- case MP_LIST_VIEW_CLOUD:
- if (!mp_util_get_personal_status()) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) and MEDIA_STORAGE_TYPE = 101 and MEDIA_DISPLAY_NAME like \"%%%s%%\" and MEDIA_PATH NOT LIKE \"%s%%\"", keyword, VIDEO_UTIL_PERSONAL_HEAD_STR);
- } else {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) and MEDIA_STORAGE_TYPE = 101 and MEDIA_DISPLAY_NAME like \"%%%s%%\"", keyword);
- }
- break;
+ case MP_LIST_VIEW_CLOUD:
+ if (!mp_util_get_personal_status()) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) and MEDIA_STORAGE_TYPE = 101 and MEDIA_DISPLAY_NAME like \"%%%s%%\" and MEDIA_PATH NOT LIKE \"%s%%\"",
+ keyword, VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) and MEDIA_STORAGE_TYPE = 101 and MEDIA_DISPLAY_NAME like \"%%%s%%\"",
+ keyword);
+ }
+ break;
- default:
- if (!mp_util_get_personal_status()) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) and MEDIA_DISPLAY_NAME like \"%%%s%%\" and MEDIA_PATH NOT LIKE \"%s%%\"", keyword, VIDEO_UTIL_PERSONAL_HEAD_STR);
- } else {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) and MEDIA_DISPLAY_NAME like \"%%%s%%\"", keyword);
- }
- break;
+ default:
+ if (!mp_util_get_personal_status()) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) and MEDIA_DISPLAY_NAME like \"%%%s%%\" and MEDIA_PATH NOT LIKE \"%s%%\"",
+ keyword, VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) and MEDIA_DISPLAY_NAME like \"%%%s%%\"",
+ keyword);
+ }
+ break;
}
- //snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 and MEDIA_TITLE like \"%%%s%%\"", keyword);
- if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_filter_set_condition
+ (m_FilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_filter_set_order(m_FilterHandle, nOrderType, szOrderObj, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_filter_set_order
+ (m_FilterHandle, nOrderType, szOrderObj,
+ MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set order.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_info_foreach_media_from_db(m_FilterHandle, mp_util_svc_iterate_for_video_item_list_view_cb, &VideoItemList) != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("Fail to get video item list with filter condition.");
+ if (media_info_foreach_media_from_db
+ (m_FilterHandle, mp_util_svc_iterate_for_video_item_list_view_cb,
+ &VideoItemList) != MEDIA_CONTENT_ERROR_NONE) {
+ VideoLogError
+ ("Fail to get video item list with filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
Eina_List *pIterateList = NULL;
EINA_LIST_FOREACH(VideoItemList, pIterateList, pItem) {
if (pItem) {
- if (media_info_get_file_path(pItem, &szGetFilePath) == MEDIA_CONTENT_ERROR_NONE) {
+ if (media_info_get_file_path(pItem, &szGetFilePath) ==
+ MEDIA_CONTENT_ERROR_NONE) {
if (szGetFilePath) {
if (!strcmp(szGetFilePath, szFilePath)) {
char *szMediaID = NULL;
media_info_get_media_id(pItem, &szMediaID);
media_info_delete_from_db(szMediaID);
mp_util_delete_wall_file(szMediaID);
- VideoItemList = eina_list_remove(VideoItemList, pItem);
+ VideoItemList =
+ eina_list_remove(VideoItemList, pItem);
media_info_destroy(pItem);
nNumberOfVideoItemByType--;
return TRUE;
}
} else {
- VideoLogError("No exist %s in media info Database module.", szFilePath);
+ VideoLogError
+ ("No exist %s in media info Database module.",
+ szFilePath);
return FALSE;
}
}
media_info_destroy(pItem);
nNumberOfVideoItemByType--;
} else {
- VideoLogError("No exist media ID in index %d of list.", nVideoItemIndex);
+ VideoLogError("No exist media ID in index %d of list.",
+ nVideoItemIndex);
return FALSE;
}
} else {
media_info_delete_from_db(szMediaID);
free(szMediaID);
} else {
- VideoLogError("No exist media ID in index %d of list.", nVideoItemIndex);
+ VideoLogError("No exist media ID in index %d of list.",
+ nVideoItemIndex);
return FALSE;
}
} else {
return TRUE;
}
-bool mp_util_svc_get_video_id_by_video_url(const char *szPath, char **szVideoID)
+bool mp_util_svc_get_video_id_by_video_url(const char *szPath,
+ char **szVideoID)
{
media_info_h pVideoItem = NULL;
filter_h m_FilterHandle = NULL;
- char szTmpStr[STR_LEN_MAX] = {0,};
+ char szTmpStr[STR_LEN_MAX] = { 0, };
bool bRet = FALSE;
int ret = -1;
snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_PATH = \"%s\"", szPath);
if (media_filter_set_condition(m_FilterHandle,
- szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) !=
- MEDIA_CONTENT_ERROR_NONE) {
+ szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) !=
+ MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
m_FilterHandle = NULL;
}
if (media_info_foreach_media_from_db(m_FilterHandle,
- mp_util_svc_iterate_for_get_video_item_cb, &pVideoItem) !=
- MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("Fail to get video item list with filter condition.");
- if(m_FilterHandle) {
+ mp_util_svc_iterate_for_get_video_item_cb,
+ &pVideoItem) !=
+ MEDIA_CONTENT_ERROR_NONE) {
+ VideoLogError
+ ("Fail to get video item list with filter condition.");
+ if (m_FilterHandle) {
media_filter_destroy(m_FilterHandle);
m_FilterHandle = NULL;
}
bRet = FALSE;
}
- if(m_FilterHandle) {
+ if (m_FilterHandle) {
ret = media_filter_destroy(m_FilterHandle);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to destroy media filter handle.");
return bRet;
}
-unsigned int mp_util_svc_get_video_last_play_time_by_video_url(const char *szPath)
+unsigned int mp_util_svc_get_video_last_play_time_by_video_url(const char
+ *szPath)
{
if (!szPath) {
VideoLogError("No exist video path.");
int nLastPlayedTime = 0;
media_info_h pVideoItem = NULL;
filter_h m_FilterHandle = NULL;
- char szTmpStr[STR_LEN_MAX] = {0,};
+ char szTmpStr[STR_LEN_MAX] = { 0, };
if (media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to create media filter handle.");
return FALSE;
}
- //snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_PATH = \"%s\"", szPath);
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) AND MEDIA_PATH = \"%s\"", szPath);
- if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) AND MEDIA_PATH = \"%s\"",
+ szPath);
+ if (media_filter_set_condition
+ (m_FilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_info_foreach_media_from_db(m_FilterHandle, mp_util_svc_iterate_for_get_video_item_cb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("Fail to get video item list with filter condition.");
+ if (media_info_foreach_media_from_db
+ (m_FilterHandle, mp_util_svc_iterate_for_get_video_item_cb,
+ &pVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
+ VideoLogError
+ ("Fail to get video item list with filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
video_meta_h pVideoMetaHandle = NULL;
if (media_info_get_video(pVideoItem, &pVideoMetaHandle) ==
MEDIA_CONTENT_ERROR_NONE) {
- video_meta_get_played_position(pVideoMetaHandle, &nLastPlayedTime);
+ video_meta_get_played_position(pVideoMetaHandle,
+ &nLastPlayedTime);
VideoLogInfo("Last Played Time : %d", nLastPlayedTime);
video_meta_destroy(pVideoMetaHandle);
}
media_info_destroy(pVideoItem);
}
- return (unsigned int)nLastPlayedTime;
+ return (unsigned int) nLastPlayedTime;
}
-unsigned int mp_util_svc_get_video_duration_by_video_url(const char *szPath)
+unsigned int mp_util_svc_get_video_duration_by_video_url(const char
+ *szPath)
{
if (!szPath) {
VideoLogError("No exist video path.");
int nDurationTime = 0;
media_info_h pVideoItem = NULL;
filter_h m_FilterHandle = NULL;
- char szTmpStr[STR_LEN_MAX] = {0,};
+ char szTmpStr[STR_LEN_MAX] = { 0, };
if (media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to create media filter handle.");
return FALSE;
}
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) AND MEDIA_PATH = \"%s\"", szPath);
- if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) AND MEDIA_PATH = \"%s\"",
+ szPath);
+ if (media_filter_set_condition
+ (m_FilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_info_foreach_media_from_db(m_FilterHandle, mp_util_svc_iterate_for_get_video_item_cb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("Fail to get video item list with filter condition.");
+ if (media_info_foreach_media_from_db
+ (m_FilterHandle, mp_util_svc_iterate_for_get_video_item_cb,
+ &pVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
+ VideoLogError
+ ("Fail to get video item list with filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
if (pVideoItem) {
video_meta_h pVideoMetaHandle = NULL;
- if (media_info_get_video(pVideoItem, &pVideoMetaHandle) == MEDIA_CONTENT_ERROR_NONE) {
+ if (media_info_get_video(pVideoItem, &pVideoMetaHandle) ==
+ MEDIA_CONTENT_ERROR_NONE) {
video_meta_get_duration(pVideoMetaHandle, &nDurationTime);
video_meta_destroy(pVideoMetaHandle);
}
media_info_destroy(pVideoItem);
}
- return (unsigned int)nDurationTime;
+ return (unsigned int) nDurationTime;
}
int mp_util_svc_get_video_file_size_by_video_url(const char *szPath)
unsigned long long nSize = 0;
media_info_h pVideoItem = NULL;
filter_h m_FilterHandle = NULL;
- char szTmpStr[STR_LEN_MAX] = {0,};
+ char szTmpStr[STR_LEN_MAX] = { 0, };
if (media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to create media filter handle.");
return FALSE;
}
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) AND MEDIA_PATH = \"%s\"", szPath);
- if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) AND MEDIA_PATH = \"%s\"",
+ szPath);
+ if (media_filter_set_condition
+ (m_FilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_info_foreach_media_from_db(m_FilterHandle, mp_util_svc_iterate_for_get_video_item_cb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("Fail to get video item list with filter condition.");
+ if (media_info_foreach_media_from_db
+ (m_FilterHandle, mp_util_svc_iterate_for_get_video_item_cb,
+ &pVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
+ VideoLogError
+ ("Fail to get video item list with filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
media_info_h pVideoItem = NULL;
filter_h m_FilterHandle = NULL;
char *szThumbnailPath = NULL;
- char szTmpStr[STR_LEN_MAX] = {0,};
+ char szTmpStr[STR_LEN_MAX] = { 0, };
if (media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to create media filter handle.");
}
memset(szTmpStr, 0, STR_LEN_MAX);
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) AND MEDIA_PATH = \"%s\"", szMediaUri);
- if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) AND MEDIA_PATH = \"%s\"",
+ szMediaUri);
+ if (media_filter_set_condition
+ (m_FilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_info_foreach_media_from_db(m_FilterHandle, mp_util_svc_iterate_for_get_video_item_cb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("Fail to get video item list with filter condition.");
+ if (media_info_foreach_media_from_db
+ (m_FilterHandle, mp_util_svc_iterate_for_get_video_item_cb,
+ &pVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
+ VideoLogError
+ ("Fail to get video item list with filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
if (pVideoItem) {
media_info_get_thumbnail_path(pVideoItem, &szThumbnailPath);
- VideoSecureLogInfo("Video thumbnail file path : %s", szThumbnailPath);
+ VideoSecureLogInfo("Video thumbnail file path : %s",
+ szThumbnailPath);
media_info_destroy(pVideoItem);
}
media_info_h pVideoItem = NULL;
filter_h m_FilterHandle = NULL;
- char szTmpStr[STR_LEN_MAX] = {0,};
+ char szTmpStr[STR_LEN_MAX] = { 0, };
int nWidth = 0;
if (media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE) {
}
memset(szTmpStr, 0, STR_LEN_MAX);
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) AND MEDIA_PATH = \"%s\"", szMediaUri);
- if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) AND MEDIA_PATH = \"%s\"",
+ szMediaUri);
+ if (media_filter_set_condition
+ (m_FilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_info_foreach_media_from_db(m_FilterHandle, mp_util_svc_iterate_for_get_video_item_cb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("Fail to get video item list with filter condition.");
+ if (media_info_foreach_media_from_db
+ (m_FilterHandle, mp_util_svc_iterate_for_get_video_item_cb,
+ &pVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
+ VideoLogError
+ ("Fail to get video item list with filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
if (pVideoItem) {
video_meta_h pVideoMetaHandle = NULL;
- if (media_info_get_video(pVideoItem, &pVideoMetaHandle) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_info_get_video(pVideoItem, &pVideoMetaHandle) !=
+ MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to get pVideoMetaHandle.");
} else {
if (pVideoMetaHandle) {
media_info_h pVideoItem = NULL;
filter_h m_FilterHandle = NULL;
- char szTmpStr[STR_LEN_MAX] = {0,};
+ char szTmpStr[STR_LEN_MAX] = { 0, };
int nHeight = 0;
if (media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE) {
}
memset(szTmpStr, 0, STR_LEN_MAX);
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) AND MEDIA_PATH = \"%s\"", szMediaUri);
- if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) AND MEDIA_PATH = \"%s\"",
+ szMediaUri);
+ if (media_filter_set_condition
+ (m_FilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_info_foreach_media_from_db(m_FilterHandle, mp_util_svc_iterate_for_get_video_item_cb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("Fail to get video item list with filter condition.");
+ if (media_info_foreach_media_from_db
+ (m_FilterHandle, mp_util_svc_iterate_for_get_video_item_cb,
+ &pVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
+ VideoLogError
+ ("Fail to get video item list with filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
if (pVideoItem) {
video_meta_h pVideoMetaHandle = NULL;
- if (media_info_get_video(pVideoItem, &pVideoMetaHandle) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_info_get_video(pVideoItem, &pVideoMetaHandle) !=
+ MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to get pVideoMetaHandle.");
} else {
if (pVideoMetaHandle) {
return nHeight;
}
-void mp_util_svc_set_video_last_played_time_by_url(char *szMediaUri, unsigned int nPosition)
+void mp_util_svc_set_video_last_played_time_by_url(char *szMediaUri,
+ unsigned int nPosition)
{
if (!szMediaUri) {
VideoLogError("No exist media uri.");
return;
}
- VideoSecureLogInfo("szMediaUri : %s, nLastPlayedTime : %d", szMediaUri, nPosition);
+ VideoSecureLogInfo("szMediaUri : %s, nLastPlayedTime : %d", szMediaUri,
+ nPosition);
- int nLastPlayedTime = (int)nPosition;
+ int nLastPlayedTime = (int) nPosition;
media_info_h pVideoItem = NULL;
filter_h m_FilterHandle = NULL;
- char szTmpStr[STR_LEN_MAX] = {0,};
+ char szTmpStr[STR_LEN_MAX] = { 0, };
if (media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to create media filter handle.");
return;
}
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) AND MEDIA_PATH = \"%s\"", szMediaUri);
- if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) AND MEDIA_PATH = \"%s\"",
+ szMediaUri);
+ if (media_filter_set_condition
+ (m_FilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return;
}
- if (media_info_foreach_media_from_db(m_FilterHandle, mp_util_svc_iterate_for_get_video_item_cb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("Fail to get video item list with filter condition.");
+ if (media_info_foreach_media_from_db
+ (m_FilterHandle, mp_util_svc_iterate_for_get_video_item_cb,
+ &pVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
+ VideoLogError
+ ("Fail to get video item list with filter condition.");
media_filter_destroy(m_FilterHandle);
return;
}
video_meta_h pVideoMetaHandle = NULL;
if (pVideoItem) {
- if (media_info_get_video(pVideoItem, &pVideoMetaHandle) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_info_get_video(pVideoItem, &pVideoMetaHandle) !=
+ MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to get pVideoMetaHandle.");
} else {
if (pVideoMetaHandle) {
- video_meta_set_played_position(pVideoMetaHandle, nLastPlayedTime);
+ video_meta_set_played_position(pVideoMetaHandle,
+ nLastPlayedTime);
video_meta_update_to_db(pVideoMetaHandle);
video_meta_destroy(pVideoMetaHandle);
} else {
}
}
-bool mp_util_svc_get_video_current_url_pre_next_item(char *szCurrMediaUri, char *szPreMediaUri, char *szNextMediaUri, bool bLoop)
+bool mp_util_svc_get_video_current_url_pre_next_item(char *szCurrMediaUri,
+ char *szPreMediaUri,
+ char *szNextMediaUri,
+ bool bLoop)
{
if (!szCurrMediaUri) {
if (!VideoItemList) {
VideoLogError("No exist VideoItemList.");
if (bLoop) {
- strncpy(szNextMediaUri, szCurrMediaUri, (sizeof(char) * STR_LEN_MAX) - 1);
+ strncpy(szNextMediaUri, szCurrMediaUri,
+ (sizeof(char) * STR_LEN_MAX) - 1);
}
return FALSE;
}
char *szVideoItemFilePath = NULL;
media_info_get_file_path(pVideoItem, &szVideoItemFilePath);
if (szVideoItemFilePath) {
- VideoSecureLogInfo("URL of the File item - %s (%d / %d)", szVideoItemFilePath, nCount, nListSize);
+ VideoSecureLogInfo("URL of the File item - %s (%d / %d)",
+ szVideoItemFilePath, nCount, nListSize);
if (!strcmp(szVideoItemFilePath, szCurrMediaUri)) {
free(szVideoItemFilePath);
szVideoItemFilePath = NULL;
pVideoItem = NULL;
- pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nCount - 1);
+ pVideoItem =
+ (media_info_h) eina_list_nth(VideoItemList,
+ nCount - 1);
if (pVideoItem) {
- media_info_get_file_path(pVideoItem, &szVideoItemFilePath);
- strncpy(szPreMediaUri, szVideoItemFilePath, (sizeof(char) * STR_LEN_MAX) - 1);
+ media_info_get_file_path(pVideoItem,
+ &szVideoItemFilePath);
+ strncpy(szPreMediaUri, szVideoItemFilePath,
+ (sizeof(char) * STR_LEN_MAX) - 1);
free(szVideoItemFilePath);
szVideoItemFilePath = NULL;
} else if (bLoop) {
- media_info_h m_LastItem = (media_info_h)eina_list_nth(VideoItemList, nListSize - 1);
+ media_info_h m_LastItem =
+ (media_info_h) eina_list_nth(VideoItemList,
+ nListSize - 1);
VideoLogError("%p", m_LastItem);
if (m_LastItem) {
- media_info_get_file_path(m_LastItem, &szVideoItemFilePath);
- strncpy(szPreMediaUri, szVideoItemFilePath, (sizeof(char) * STR_LEN_MAX) - 1);
+ media_info_get_file_path(m_LastItem,
+ &szVideoItemFilePath);
+ strncpy(szPreMediaUri, szVideoItemFilePath,
+ (sizeof(char) * STR_LEN_MAX) - 1);
free(szVideoItemFilePath);
szVideoItemFilePath = NULL;
}
pVideoItem = NULL;
- pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nCount + 1);
+ pVideoItem =
+ (media_info_h) eina_list_nth(VideoItemList,
+ nCount + 1);
if (pVideoItem) {
- media_info_get_file_path(pVideoItem, &szVideoItemFilePath);
- strncpy(szNextMediaUri, szVideoItemFilePath, (sizeof(char) * STR_LEN_MAX) - 1);
+ media_info_get_file_path(pVideoItem,
+ &szVideoItemFilePath);
+ strncpy(szNextMediaUri, szVideoItemFilePath,
+ (sizeof(char) * STR_LEN_MAX) - 1);
free(szVideoItemFilePath);
szVideoItemFilePath = NULL;
} else if (bLoop) {
- media_info_h m_FirstItem = (media_info_h)eina_list_nth(VideoItemList, 0);
+ media_info_h m_FirstItem =
+ (media_info_h) eina_list_nth(VideoItemList, 0);
if (m_FirstItem) {
- media_info_get_file_path(m_FirstItem, &szVideoItemFilePath);
- strncpy(szNextMediaUri, szVideoItemFilePath, (sizeof(char) * STR_LEN_MAX) - 1);
+ media_info_get_file_path(m_FirstItem,
+ &szVideoItemFilePath);
+ strncpy(szNextMediaUri, szVideoItemFilePath,
+ (sizeof(char) * STR_LEN_MAX) - 1);
free(szVideoItemFilePath);
szVideoItemFilePath = NULL;
m_FirstItem = NULL;
}
- VideoSecureLogInfo("PreMediaUri-NextMediaUri:%s-%s", szPreMediaUri, szNextMediaUri);
+ VideoSecureLogInfo("PreMediaUri-NextMediaUri:%s-%s",
+ szPreMediaUri, szNextMediaUri);
return TRUE;
}
return NULL;
}
- if (nVideoItemIndex < 0 || nVideoItemIndex >= mp_util_svc_get_video_list_size_for_checking_index()) {
+ if (nVideoItemIndex < 0
+ || nVideoItemIndex >=
+ mp_util_svc_get_video_list_size_for_checking_index()) {
VideoLogError("Error number of list item.");
return NULL;
}
char *szVideoItemFilePath = NULL;
- media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ media_info_h pVideoItem =
+ (media_info_h) eina_list_nth(VideoItemList, nVideoItemIndex);
if (pVideoItem) {
media_info_get_file_path(pVideoItem, &szVideoItemFilePath);
- VideoSecureLogInfo("szVideoItemFilePath : %s", szVideoItemFilePath);
+ VideoSecureLogInfo("szVideoItemFilePath : %s",
+ szVideoItemFilePath);
}
return szVideoItemFilePath;
return NULL;
}
- if (nVideoItemIndex < 0 || nVideoItemIndex >= mp_util_svc_get_video_list_size_for_checking_index()) {
+ if (nVideoItemIndex < 0
+ || nVideoItemIndex >=
+ mp_util_svc_get_video_list_size_for_checking_index()) {
VideoLogError("Error number of list item.");
return NULL;
}
char *szVideoItemThumbnailPath = NULL;
- media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ media_info_h pVideoItem =
+ (media_info_h) eina_list_nth(VideoItemList, nVideoItemIndex);
if (pVideoItem) {
- media_info_get_thumbnail_path(pVideoItem, &szVideoItemThumbnailPath);
+ media_info_get_thumbnail_path(pVideoItem,
+ &szVideoItemThumbnailPath);
}
VideoSecureLogInfo("pThumbIconUri = %s", szVideoItemThumbnailPath);
char *szTitle = NULL;
if (!szTitle) {
- media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ media_info_h pVideoItem =
+ (media_info_h) eina_list_nth(VideoItemList, nVideoItemIndex);
if (pVideoItem) {
media_info_get_display_name(pVideoItem, &szTitle);
return 0;
}
- if (nVideoItemIndex < 0 || nVideoItemIndex >= mp_util_svc_get_video_list_size_for_checking_index()) {
+ if (nVideoItemIndex < 0
+ || nVideoItemIndex >=
+ mp_util_svc_get_video_list_size_for_checking_index()) {
VideoLogError("Error number of list item.");
return 0;
}
int nDurationTime = 0;
- media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ media_info_h pVideoItem =
+ (media_info_h) eina_list_nth(VideoItemList, nVideoItemIndex);
if (pVideoItem) {
video_meta_h pVideoMetaHandle = NULL;
- if (media_info_get_video(pVideoItem, &pVideoMetaHandle) == MEDIA_CONTENT_ERROR_NONE) {
- if (video_meta_get_duration(pVideoMetaHandle, &nDurationTime) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_info_get_video(pVideoItem, &pVideoMetaHandle) ==
+ MEDIA_CONTENT_ERROR_NONE) {
+ if (video_meta_get_duration(pVideoMetaHandle, &nDurationTime)
+ != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("fail to get duration of video metadata");
}
}
int nLastPlayedTime = 0;
- media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ media_info_h pVideoItem =
+ (media_info_h) eina_list_nth(VideoItemList, nVideoItemIndex);
if (pVideoItem) {
video_meta_h pVideoMetaHandle = NULL;
- if (media_info_get_video(pVideoItem, &pVideoMetaHandle) == MEDIA_CONTENT_ERROR_NONE) {
- video_meta_get_played_position(pVideoMetaHandle, &nLastPlayedTime);
+ if (media_info_get_video(pVideoItem, &pVideoMetaHandle) ==
+ MEDIA_CONTENT_ERROR_NONE) {
+ video_meta_get_played_position(pVideoMetaHandle,
+ &nLastPlayedTime);
- VideoLogInfo("nIndexGenlist : %d==%d", nLastPlayedTime, nVideoItemIndex);
+ VideoLogInfo("nIndexGenlist : %d==%d", nLastPlayedTime,
+ nVideoItemIndex);
video_meta_destroy(pVideoMetaHandle);
}
}
- return (int)nLastPlayedTime;
+ return (int) nLastPlayedTime;
}
-unsigned long long mp_util_svc_get_video_item_size(const int nVideoItemIndex)
+unsigned long long mp_util_svc_get_video_item_size(const int
+ nVideoItemIndex)
{
if (!VideoItemList) {
VideoLogError("Not exist video item list handle.");
unsigned long long nSize = 0;
- media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ media_info_h pVideoItem =
+ (media_info_h) eina_list_nth(VideoItemList, nVideoItemIndex);
if (pVideoItem) {
media_info_get_size(pVideoItem, &nSize);
}
}
int nWidth = 0;
- media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ media_info_h pVideoItem =
+ (media_info_h) eina_list_nth(VideoItemList, nVideoItemIndex);
video_meta_h pVideoMetaHandle = NULL;
if (pVideoItem) {
- if (media_info_get_video(pVideoItem, &pVideoMetaHandle) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_info_get_video(pVideoItem, &pVideoMetaHandle) !=
+ MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to get pVideoMetaHandle.");
} else {
if (pVideoMetaHandle) {
}
int nHeight = 0;
- media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ media_info_h pVideoItem =
+ (media_info_h) eina_list_nth(VideoItemList, nVideoItemIndex);
video_meta_h pVideoMetaHandle = NULL;
if (pVideoItem) {
- if (media_info_get_video(pVideoItem, &pVideoMetaHandle) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_info_get_video(pVideoItem, &pVideoMetaHandle) !=
+ MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to get pVideoMetaHandle.");
} else {
if (pVideoMetaHandle) {
}
time_t nDateTime = 0;
- media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ media_info_h pVideoItem =
+ (media_info_h) eina_list_nth(VideoItemList, nVideoItemIndex);
if (pVideoItem) {
- if (media_info_get_modified_time(pVideoItem, &nDateTime) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_info_get_modified_time(pVideoItem, &nDateTime) !=
+ MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("media_info_get_modified_time fail");
return 0;
}
}
double nLongitude = 0;
- media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ media_info_h pVideoItem =
+ (media_info_h) eina_list_nth(VideoItemList, nVideoItemIndex);
if (pVideoItem) {
- int nRet = MEDIA_CONTENT_ERROR_NONE;
- nRet = media_info_get_longitude(pVideoItem, &nLongitude);
+ int nRet = MEDIA_CONTENT_ERROR_NONE;
+ nRet = media_info_get_longitude(pVideoItem, &nLongitude);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("media_info_get_longitude failed : [%d]!!!", nRet);
+ VideoLogError("media_info_get_longitude failed : [%d]!!!",
+ nRet);
return 0;
}
}
}
double dLatitude = 0;
- media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ media_info_h pVideoItem =
+ (media_info_h) eina_list_nth(VideoItemList, nVideoItemIndex);
if (pVideoItem) {
- int nRet = MEDIA_CONTENT_ERROR_NONE;
+ int nRet = MEDIA_CONTENT_ERROR_NONE;
nRet = media_info_get_latitude(pVideoItem, &dLatitude);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("media_info_get_latitude failed : [%d]!!!", nRet);
+ VideoLogError("media_info_get_latitude failed : [%d]!!!",
+ nRet);
return 0;
}
}
char *mp_util_svc_get_video_item_modified_time(const int nVideoItemIndex)
{
- if (!VideoItemList){
+ if (!VideoItemList) {
VideoLogError("Not exist video item list handle.");
return 0;
}
time_t pModifiedTime;
struct tm sModifiedTime;
- char szModifiedTime[STR_LEN_MAX] = {0,};
- media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ char szModifiedTime[STR_LEN_MAX] = { 0, };
+ media_info_h pVideoItem =
+ (media_info_h) eina_list_nth(VideoItemList, nVideoItemIndex);
if (pVideoItem) {
int nRet = MEDIA_CONTENT_ERROR_NONE;
nRet = media_info_get_modified_time(pVideoItem, &pModifiedTime);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("media_info_get_modified_time failed : [%d]!!!", nRet);
+ VideoLogError("media_info_get_modified_time failed : [%d]!!!",
+ nRet);
return 0;
}
gmtime_r(&pModifiedTime, &sModifiedTime);
- strftime(szModifiedTime, STR_LEN_MAX-1, "%d %b. %Y. %H:%M", &sModifiedTime);
+ strftime(szModifiedTime, STR_LEN_MAX - 1, "%d %b. %Y. %H:%M",
+ &sModifiedTime);
return g_strdup(szModifiedTime);
}
return 0;
}
- return (int)eina_list_count(VideoItemList);
+ return (int) eina_list_count(VideoItemList);
}
int mp_util_svc_get_number_of_video_item_by_type(void)
int mp_util_svc_get_total_video_type_files(void)
{
- return (int)nTotalVideoTypeFiles;
+ return (int) nTotalVideoTypeFiles;
}
void *mp_util_svc_get_video_item(const int nVideoItemIndex)
return NULL;
}
- if (nVideoItemIndex < 0 || nVideoItemIndex >= mp_util_svc_get_video_list_size_for_checking_index()) {
+ if (nVideoItemIndex < 0
+ || nVideoItemIndex >=
+ mp_util_svc_get_video_list_size_for_checking_index()) {
VideoLogError("Error number of list item.");
return NULL;
}
- return (void*)eina_list_nth(VideoItemList, nVideoItemIndex);
+ return (void *) eina_list_nth(VideoItemList, nVideoItemIndex);
}
void mp_util_svc_print_list_info(void)
return;
}
- VideoLogInfo("List size : %d", mp_util_svc_get_number_of_video_item_by_type());
+ VideoLogInfo("List size : %d",
+ mp_util_svc_get_number_of_video_item_by_type());
media_info_h pVideoItem = NULL;
Eina_List *pIterateList = NULL;
char *szTitle = NULL;
media_info_get_display_name(pVideoItem, &szTitle);
if (szTitle) {
- VideoLogInfo("%d - Print title of all list items : %s", nCounter, szTitle);
+ VideoLogInfo("%d - Print title of all list items : %s",
+ nCounter, szTitle);
free(szTitle);
} else {
- VideoLogInfo("%d - Print title of all list items : NULL.", nCounter);
+ VideoLogInfo("%d - Print title of all list items : NULL.",
+ nCounter);
}
nCounter++;
}
EINA_LIST_FOREACH(VideoItemList, pCurList, pVideoItem) {
if (pVideoItem) {
char *szUrl = NULL;
- //media_info_get_display_name(pVideoItem, &szTitle);
media_info_get_file_path(pVideoItem, &szUrl);
if (szUrl && szPath) {
- if (!g_strcmp0(szUrl , szPath))
- {
- VideoSecureLogDebug("Find same file url. index : %d", nCounter);
+ if (!g_strcmp0(szUrl, szPath)) {
+ VideoSecureLogDebug("Find same file url. index : %d",
+ nCounter);
free(szUrl);
return nCounter;
}
return 99999;
}
-bool mp_util_svc_extract_video_folder_list_by_type(int nSortType, int nItemType)
+bool mp_util_svc_extract_video_folder_list_by_type(int nSortType,
+ int nItemType)
{
filter_h m_FilterHandle = NULL;
- char szTmpStr[STR_LEN_MAX] = {0,};
+ char szTmpStr[STR_LEN_MAX] = { 0, };
switch (nItemType) {
case MP_LIST_VIEW_ALL:
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121)");
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121)");
break;
case MP_LIST_VIEW_PHONE:
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 and (MEDIA_STORAGE_TYPE = 0 OR MEDIA_STORAGE_TYPE=1)");
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 and (MEDIA_STORAGE_TYPE = 0 OR MEDIA_STORAGE_TYPE=1)");
break;
case MP_LIST_VIEW_CLOUD:
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) and MEDIA_STORAGE_TYPE = 101");
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) and MEDIA_STORAGE_TYPE = 101");
break;
default:
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121)");
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121)");
break;
}
return FALSE;
}
- if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_filter_set_condition
+ (m_FilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_folder_foreach_folder_from_db(m_FilterHandle, mp_util_svc_iterate_for_folder_list_cb, &VideoFolderList) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_folder_foreach_folder_from_db
+ (m_FilterHandle, mp_util_svc_iterate_for_folder_list_cb,
+ &VideoFolderList) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail media_folder_foreach_folder_from_db().");
media_filter_destroy(m_FilterHandle);
return FALSE;
return TRUE;
}
-bool mp_util_svc_extract_personal_video_folder_list(int nSortType, bool bPersonal)
+bool mp_util_svc_extract_personal_video_folder_list(int nSortType,
+ bool bPersonal)
{
filter_h m_FilterHandle = NULL;
- char szTmpStr[STR_LEN_MAX] = {0,};
+ char szTmpStr[STR_LEN_MAX] = { 0, };
if (media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to create media filter handle.");
}
if (bPersonal == FALSE) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH NOT LIKE \"%s%%\"", VIDEO_UTIL_PERSONAL_HEAD_STR);
- }
- else
- {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH LIKE \"%s%%\"", VIDEO_UTIL_PERSONAL_HEAD_STR);
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH NOT LIKE \"%s%%\"",
+ VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH LIKE \"%s%%\"",
+ VIDEO_UTIL_PERSONAL_HEAD_STR);
}
- if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_filter_set_condition
+ (m_FilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_folder_foreach_folder_from_db(m_FilterHandle, mp_util_svc_iterate_for_personal_folder_list_cb, &VideoFolderList) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_folder_foreach_folder_from_db
+ (m_FilterHandle, mp_util_svc_iterate_for_personal_folder_list_cb,
+ &VideoFolderList) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail media_folder_foreach_folder_from_db().");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
if (VideoFolderList) {
- return (int)eina_list_count(VideoFolderList);
+ return (int) eina_list_count(VideoFolderList);
}
return 0;
return 0;
}
- if (nVideoFolderIndex < 0 || nVideoFolderIndex >= mp_util_svc_get_video_folder_size()) {
+ if (nVideoFolderIndex < 0
+ || nVideoFolderIndex >= mp_util_svc_get_video_folder_size()) {
VideoLogError("Error number of list item.");
return NULL;
}
char *szFolderName = NULL;
- media_folder_h pFolderItem = (media_folder_h)eina_list_nth(VideoFolderList, nVideoFolderIndex);
+ media_folder_h pFolderItem =
+ (media_folder_h) eina_list_nth(VideoFolderList, nVideoFolderIndex);
if (pFolderItem) {
media_folder_get_name(pFolderItem, &szFolderName);
return NULL;
}
- if (nVideoFolderIndex < 0 || nVideoFolderIndex >= mp_util_svc_get_video_folder_size()) {
+ if (nVideoFolderIndex < 0
+ || nVideoFolderIndex >= mp_util_svc_get_video_folder_size()) {
VideoLogError("Error number of list item.");
return NULL;
}
char *szFolderPath = NULL;
- media_folder_h pFolderItem = (media_folder_h)eina_list_nth(VideoFolderList, nVideoFolderIndex);
+ media_folder_h pFolderItem =
+ (media_folder_h) eina_list_nth(VideoFolderList, nVideoFolderIndex);
if (pFolderItem) {
media_folder_get_path(pFolderItem, &szFolderPath);
return NULL;
}
- if (nVideoFolderIndex < 0 || nVideoFolderIndex >= mp_util_svc_get_video_folder_size()) {
+ if (nVideoFolderIndex < 0
+ || nVideoFolderIndex >= mp_util_svc_get_video_folder_size()) {
VideoLogError("Error number of list item.");
return NULL;
}
char *szFolderId = NULL;
- media_folder_h pFolderItem = (media_folder_h)eina_list_nth(VideoFolderList, nVideoFolderIndex);
+ media_folder_h pFolderItem =
+ (media_folder_h) eina_list_nth(VideoFolderList, nVideoFolderIndex);
if (pFolderItem) {
media_folder_get_folder_id(pFolderItem, &szFolderId);
return NULL;
}
-void mp_util_svc_register_thumbnail_update_func(int nVideoItemIndex, void *pUserCallbackFunc, void *pUserData)
+void mp_util_svc_register_thumbnail_update_func(int nVideoItemIndex,
+ void *pUserCallbackFunc,
+ void *pUserData)
{
if (!pUserCallbackFunc) {
VideoLogError("[ERR]");
return;
}
- if (nVideoItemIndex < 0 || nVideoItemIndex >= mp_util_svc_get_video_list_size_for_checking_index()) {
+ if (nVideoItemIndex < 0
+ || nVideoItemIndex >=
+ mp_util_svc_get_video_list_size_for_checking_index()) {
VideoLogError("Error number of list item.");
return;
}
- media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ media_info_h pVideoItem =
+ (media_info_h) eina_list_nth(VideoItemList, nVideoItemIndex);
- if (media_info_create_thumbnail(pVideoItem, pUserCallbackFunc, pUserData) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_info_create_thumbnail
+ (pVideoItem, pUserCallbackFunc,
+ pUserData) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogWarning("media_info_create_thumbnail is Fail");
}
}
void mp_util_svc_cancel_thumbnail_update(int nVideoItemIndex)
{
- //VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+ VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
- if (nVideoItemIndex < 0 || nVideoItemIndex >= mp_util_svc_get_video_list_size_for_checking_index()) {
+ if (nVideoItemIndex < 0
+ || nVideoItemIndex >=
+ mp_util_svc_get_video_list_size_for_checking_index()) {
VideoLogError("Error number of list item.");
return;
}
- media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ media_info_h pVideoItem =
+ (media_info_h) eina_list_nth(VideoItemList, nVideoItemIndex);
if (pVideoItem) {
- if (media_info_cancel_thumbnail(pVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_info_cancel_thumbnail(pVideoItem) !=
+ MEDIA_CONTENT_ERROR_NONE) {
VideoLogWarning("media_info_cancel_thumbnail is Fail");
return;
}
- }
- else
- {
+ } else {
VideoLogError("[ERR] pVideoItem is not existed.");
}
}
media_info_h pUpdatedVideoItem = NULL;
filter_h m_FilterHandle = NULL;
- char szTmpStr[STR_LEN_MAX] = {0,};
+ char szTmpStr[STR_LEN_MAX] = { 0, };
if (media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogInfo("Fail to create media filter handle.");
}
memset(szTmpStr, 0, STR_LEN_MAX);
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) AND MEDIA_PATH = \"%s\"", szMediaUri);
- if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) AND MEDIA_PATH = \"%s\"",
+ szMediaUri);
+ if (media_filter_set_condition
+ (m_FilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
if (szMediaUri) {
return;
}
- if (media_info_foreach_media_from_db(m_FilterHandle, mp_util_svc_iterate_for_get_video_item_cb, &pUpdatedVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("Fail to get video item list with filter condition.");
+ if (media_info_foreach_media_from_db
+ (m_FilterHandle, mp_util_svc_iterate_for_get_video_item_cb,
+ &pUpdatedVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
+ VideoLogError
+ ("Fail to get video item list with filter condition.");
media_filter_destroy(m_FilterHandle);
if (szMediaUri) {
free(szMediaUri);
if (pUpdatedVideoItem) {
char *szTmpStr = NULL;
media_info_get_thumbnail_path(pUpdatedVideoItem, &szTmpStr);
- VideoSecureLogDebug("pUpdatedVideoItem - thumbnail path : %s", szTmpStr);
+ VideoSecureLogDebug("pUpdatedVideoItem - thumbnail path : %s",
+ szTmpStr);
if (szTmpStr) {
free(szTmpStr);
szTmpStr = NULL;
EINA_LIST_FOREACH(VideoItemList, pCurList, pTmpVideoItem) {
if (nCounter == nVideoItemIndex) {
VideoLogError("nCounter : %d", nCounter);
- if (pTmpVideoItem)
- {
+ if (pTmpVideoItem) {
media_info_destroy(pTmpVideoItem);
}
pCurList->data = pUpdatedVideoItem;
}
++nCounter;
}
- }
- else
- {
+ } else {
VideoLogError("Fail to get video item from db..");
}
return NULL;
}
- if (nVideoItemIndex < 0 || nVideoItemIndex >= mp_util_svc_get_video_list_size_for_checking_index()) {
+ if (nVideoItemIndex < 0
+ || nVideoItemIndex >=
+ mp_util_svc_get_video_list_size_for_checking_index()) {
VideoLogError("Error number of list item.");
return NULL;
}
- media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ media_info_h pVideoItem =
+ (media_info_h) eina_list_nth(VideoItemList, nVideoItemIndex);
char *szMediaId = NULL;
if (pVideoItem) {
return szMediaId;
}
-MpMediaStorageType mp_util_svc_get_folder_storage(const int nVideoFolderIndex)
+MpMediaStorageType mp_util_svc_get_folder_storage(const int
+ nVideoFolderIndex)
{
MpMediaStorageType storage_local = MP_MEDIA_TYPE_STORAGE_UNKNOWN;
return storage_local;
}
- if (nVideoFolderIndex < 0 || nVideoFolderIndex >= mp_util_svc_get_video_folder_size()) {
+ if (nVideoFolderIndex < 0
+ || nVideoFolderIndex >= mp_util_svc_get_video_folder_size()) {
VideoLogError("Error number of list item.");
return storage_local;
}
media_content_storage_e storage_type = MEDIA_CONTENT_STORAGE_INTERNAL;
- media_folder_h pFolderItem = (media_folder_h)eina_list_nth(VideoFolderList, nVideoFolderIndex);
- if (media_folder_get_storage_type(pFolderItem, &storage_type) != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("fail to get the folder storage type");
+ media_folder_h pFolderItem =
+ (media_folder_h) eina_list_nth(VideoFolderList, nVideoFolderIndex);
+ if (media_folder_get_storage_type(pFolderItem, &storage_type) !=
+ MEDIA_CONTENT_ERROR_NONE) {
+ VideoLogError("fail to get the folder storage type");
}
- if (storage_type == MEDIA_CONTENT_STORAGE_INTERNAL)
- {
+ if (storage_type == MEDIA_CONTENT_STORAGE_INTERNAL) {
storage_local = MP_MEDIA_TYPE_STORAGE_INTERNAL;
- } else if (storage_type == MEDIA_CONTENT_STORAGE_EXTERNAL)
- {
+ } else if (storage_type == MEDIA_CONTENT_STORAGE_EXTERNAL) {
storage_local = MP_MEDIA_TYPE_STORAGE_EXTERNAL;
}
- //char *szFolderName = NULL;
-// media_folder_h pFolderItem = (media_folder_h)eina_list_nth(VideoFolderList, nVideoFolderIndex);
-// media_content_storage_ex_e storage_type = MEDIA_CONTENT_STORAGE_INTERNAL_EX;
-// if (pFolderItem)
-// {
-// if (media_folder_get_storage_type_ex(pFolderItem, &storage_type) != MEDIA_CONTENT_ERROR_NONE) {
-// VideoLogError("fail to get the folder storage type");
-// }
-//
-// VideoSecureLogInfo("storage_type : %d", storage_type);
-// if (storage_type == MEDIA_CONTENT_STORAGE_INTERNAL_EX)
-// {
-// storage_local = MP_MEDIA_TYPE_STORAGE_INTERNAL;
-// }
-// else if (storage_type == MEDIA_CONTENT_STORAGE_EXTERNAL_EX)
-// {
-// storage_local = MP_MEDIA_TYPE_STORAGE_EXTERNAL;
-// }
-// else if (storage_type == MEDIA_CONTENT_STORAGE_DROPBOX_EX)
-// {
-// storage_local = MP_MEDIA_TYPE_STORAGE_DROPBOX;
-// }
-// else
-// {
-// storage_local = MP_MEDIA_TYPE_STORAGE_UNKNOWN;
-// }
-// }
-
return storage_local;
}
return storage_local;
}
- if (nVideoItemIndex < 0 || nVideoItemIndex >= mp_util_svc_get_video_list_size_for_checking_index()) {
+ if (nVideoItemIndex < 0
+ || nVideoItemIndex >=
+ mp_util_svc_get_video_list_size_for_checking_index()) {
VideoLogError("Error number of list item.");
return storage_local;
}
- //media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
-// media_content_storage_ex_e storage_type = MEDIA_CONTENT_STORAGE_DROPBOX_EX;
-
-// if (pVideoItem)
-// {
-// if (media_info_get_storage_type_ex(pVideoItem, &storage_type) != MEDIA_CONTENT_ERROR_NONE) {
-// VideoLogError("fail to get the content storage type");
-// }
-//
-// VideoSecureLogInfo("storage_type : %d", storage_type);
-// if (storage_type == MEDIA_CONTENT_STORAGE_INTERNAL_EX)
-// {
-// storage_local = MP_MEDIA_TYPE_STORAGE_INTERNAL;
-// }
-// else if (storage_type == MEDIA_CONTENT_STORAGE_EXTERNAL_EX)
-// {
-// storage_local = MP_MEDIA_TYPE_STORAGE_EXTERNAL;
-// }
-// else if (storage_type == MEDIA_CONTENT_STORAGE_DROPBOX_EX)
-// {
-// storage_local = MP_MEDIA_TYPE_STORAGE_DROPBOX;
-// }
-// else
-// {
-// storage_local = MP_MEDIA_TYPE_STORAGE_UNKNOWN;
-// }
-// }
-
return storage_local;
}
int nRet = MEDIA_CONTENT_ERROR_NONE;
nRet = media_info_insert_to_db(szFilePath, &info);
if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("Fail to insert a download file into media-content database. : %d", nRet);
+ VideoLogError
+ ("Fail to insert a download file into media-content database. : %d",
+ nRet);
if (info) {
media_info_destroy(info);
info = NULL;
}
void mp_util_svc_update_database_cb(media_content_error_e nError, int nPid,
- media_content_db_update_item_type_e nUpdateItem,
- media_content_db_update_type_e nUpdateType,
+ media_content_db_update_item_type_e
+ nUpdateItem,
+ media_content_db_update_type_e
+ nUpdateType,
media_content_type_e nMediaType,
- char *szUuid, char *szPath, char *szMimeType, void *pUserData)
+ char *szUuid, char *szPath,
+ char *szMimeType, void *pUserData)
{
if (nError) {
VideoLogError("error occured! : %d", nError);
VideoLogError("Updated contents are not video items.");
return;
}
- }
- else if (nUpdateItem == MEDIA_ITEM_DIRECTORY) {
+ } else if (nUpdateItem == MEDIA_ITEM_DIRECTORY) {
VideoLogInfo("MEDIA_ITEM_DIRECTORY");
///////////////////////////////////////////////////////////////////
// UPDATE ALL because It is not possible to extract video items. //
///////////////////////////////////////////////////////////////////
- }
- else
- {
+ } else {
VideoLogInfo("Nothing item type.");
}
if (nUpdateType == MEDIA_CONTENT_INSERT) {
VideoLogInfo("MEDIA_CONTENT_INSERT");
- }
- else if (nUpdateType == MEDIA_CONTENT_DELETE) {
+ } else if (nUpdateType == MEDIA_CONTENT_DELETE) {
VideoLogInfo("MEDIA_CONTENT_DELETE");
- }
- else if (nUpdateType == MEDIA_CONTENT_UPDATE) {
+ } else if (nUpdateType == MEDIA_CONTENT_UPDATE) {
VideoLogInfo("MEDIA_CONTENT_UPDATE");
- }
- else
- {
+ } else {
VideoLogInfo("Nothing update type.");
}
if (pUpdateDbCbFunc) {
- VideoLogInfo("Update List View. = %d,%d", nUpdateItem, nUpdateType);
- pUpdateDbCbFunc((void *)nUpdateType, 1.0, nUpdateType);
+ VideoLogInfo("Update List View. = %d,%d", nUpdateItem,
+ nUpdateType);
+ pUpdateDbCbFunc((void *) nUpdateType, 1.0, nUpdateType);
}
}
-bool mp_util_svc_set_update_db_cb_func(UpdateDatabaseCbFunc pUpdateDbCbFunc)
+bool mp_util_svc_set_update_db_cb_func(UpdateDatabaseCbFunc
+ pUpdateDbCbFunc)
{
if (!pUpdateDbCbFunc) {
VideoLogError("No exsited pUpdateDbCbFunc.");
bool bRet = TRUE;
mp_util_svc_unset_update_db_cb_func();
- if (media_content_set_db_updated_cb((void*)mp_util_svc_update_database_cb, pUpdateDbCbFunc) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_content_add_db_updated_cb
+ ((void *) mp_util_svc_update_database_cb, pUpdateDbCbFunc,
+ ¬i_handle) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogInfo("Fail to registe update database callback function.");
bRet = FALSE;
}
-// if (media_content_set_db_updated_cloud_cb(&g_pCloud_h, (void*)mp_util_svc_update_database_cb, pUpdateDbCbFunc) != MEDIA_CONTENT_ERROR_NONE)
-// {
-// VideoLogInfo("Fail to registe update database callback function.");
-// bRet = FALSE;
-// }
-
return bRet;
}
void mp_util_svc_unset_update_db_cb_func(void)
{
- if (media_content_unset_db_updated_cb() != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogInfo("Fail to unregiste media_content_set_db_updated_cb.");
+ if (media_content_remove_db_updated_cb(noti_handle) !=
+ MEDIA_CONTENT_ERROR_NONE) {
+ VideoLogInfo
+ ("Fail to unregiste media_content_remove_db_updated_cb.");
}
-// if (media_content_unset_db_updated_cloud_cb(g_pCloud_h) != MEDIA_CONTENT_ERROR_NONE)
-// {
-// VideoLogInfo("Fail to unregiste media_content_set_db_updated_cb.");
-// }
- //g_pCloud_h = NULL;
}
///////////////////////////////////////////////////////
// For livebox list
-static bool mp_util_svc_iterate_for_last_played_video_item_cb(media_info_h pMediaItem, void *pUserData)
+static bool mp_util_svc_iterate_for_last_played_video_item_cb(media_info_h
+ pMediaItem,
+ void
+ *pUserData)
{
media_info_h pAssignMediaItem = NULL;
media_content_type_e nMediaType = MEDIA_CONTENT_TYPE_OTHERS;
if (nMediaType == MEDIA_CONTENT_TYPE_VIDEO) {
char *szTmpItemFilePath = NULL;
- char szItemFilePath[STR_LEN_MAX] = {0,};
+ char szItemFilePath[STR_LEN_MAX] = { 0, };
media_info_get_file_path(pMediaItem, &szTmpItemFilePath);
szTmpItemFilePath = NULL;
media_info_clone(&pAssignMediaItem, pMediaItem);
- Eina_List **pList = (Eina_List **)pUserData;
+ Eina_List **pList = (Eina_List **) pUserData;
*pList = eina_list_append(*pList, pAssignMediaItem);
if (eina_list_count(*pList) > RECENTLY_PLAYED_VIDEO_ITEM_MAX) {
- VideoLogError("Break extract video item about recentl played item.");
+ VideoLogError
+ ("Break extract video item about recentl played item.");
return FALSE;
}
}
return FALSE;
}
- if (media_filter_set_condition(m_FilterHandle, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121)", MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_filter_set_condition
+ (m_FilterHandle,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121)",
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_filter_set_order(m_FilterHandle, MEDIA_CONTENT_ORDER_DESC, MEDIA_LAST_PLAYED_TIME, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_filter_set_order
+ (m_FilterHandle, MEDIA_CONTENT_ORDER_DESC, MEDIA_LAST_PLAYED_TIME,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set order.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_info_foreach_media_from_db(m_FilterHandle, mp_util_svc_iterate_for_last_played_video_item_cb, &RecentPlayedItemList) != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("Fail to get video item list with filter condition.");
+ if (media_info_foreach_media_from_db
+ (m_FilterHandle, mp_util_svc_iterate_for_last_played_video_item_cb,
+ &RecentPlayedItemList) != MEDIA_CONTENT_ERROR_NONE) {
+ VideoLogError
+ ("Fail to get video item list with filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
return TRUE;
}
-char *mp_util_svc_get_last_played_video_item_thumbnail(const int nVideoItemIndex)
+char *mp_util_svc_get_last_played_video_item_thumbnail(const int
+ nVideoItemIndex)
{
if (!RecentPlayedItemList) {
VideoLogError("Not exist video item list handle.");
return NULL;
}
- if (nVideoItemIndex < 0 || nVideoItemIndex > (int)eina_list_count(RecentPlayedItemList)) {
+ if (nVideoItemIndex < 0
+ || nVideoItemIndex > (int) eina_list_count(RecentPlayedItemList)) {
VideoLogError("Error number of list item.");
return NULL;
}
char *szVideoItemThumbnailPath = NULL;
- media_info_h pVideoItem = (media_info_h)eina_list_nth(RecentPlayedItemList, nVideoItemIndex);
+ media_info_h pVideoItem =
+ (media_info_h) eina_list_nth(RecentPlayedItemList,
+ nVideoItemIndex);
if (pVideoItem) {
- media_info_get_thumbnail_path(pVideoItem, &szVideoItemThumbnailPath);
- VideoSecureLogInfo("szVideoItemThumbnailFilePath : %s", szVideoItemThumbnailPath);
+ media_info_get_thumbnail_path(pVideoItem,
+ &szVideoItemThumbnailPath);
+ VideoSecureLogInfo("szVideoItemThumbnailFilePath : %s",
+ szVideoItemThumbnailPath);
}
return szVideoItemThumbnailPath;
char *mp_util_svc_get_duration_str_time(int nVideoItemIndex)
{
- char szTmpStr[STR_LEN_MAX] = {0, };
- char szTmpStrDurationTime[STR_LEN_MAX] = {0, };
- char szTmpStrLastPlayedPos[STR_LEN_MAX] = {0, };
+ char szTmpStr[STR_LEN_MAX] = { 0, };
+ char szTmpStrDurationTime[STR_LEN_MAX] = { 0, };
+ char szTmpStrLastPlayedPos[STR_LEN_MAX] = { 0, };
- unsigned int nVideoInfoDuration = mp_util_svc_get_video_duration_time(nVideoItemIndex);
- unsigned int nVideoInfoLastTime = mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
+ unsigned int nVideoInfoDuration =
+ mp_util_svc_get_video_duration_time(nVideoItemIndex);
+ unsigned int nVideoInfoLastTime =
+ mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
if (nVideoInfoDuration > 0) {
- mp_util_convert_time(nVideoInfoDuration, szTmpStrDurationTime, FALSE);
+ mp_util_convert_time(nVideoInfoDuration, szTmpStrDurationTime,
+ FALSE);
- /* if (nVideoInfoLastTime > 0) {
- mp_util_convert_time(nVideoInfoLastTime, szTmpStrLastPlayedPos, TRUE);
- snprintf(szTmpStr, STR_LEN_MAX, "<match>%s</match>/%s", szTmpStrLastPlayedPos, szTmpStrDurationTime);
- } else {*/
- snprintf(szTmpStr, STR_LEN_MAX, "%s", szTmpStrDurationTime);
- /* }*/
- }
- else
- {
+ snprintf(szTmpStr, STR_LEN_MAX, "%s", szTmpStrDurationTime);
+ } else {
snprintf(szTmpStr, STR_LEN_MAX, "--:--:--");
}
}
bool mp_util_svc_get_video_detail_by_video_url(const char *szPath,
- int *nWidth, int *nHeight, char **szTitle, unsigned int *nDuration, unsigned int *nPlayedTime)
+ int *nWidth, int *nHeight,
+ char **szTitle,
+ unsigned int *nDuration,
+ unsigned int *nPlayedTime)
{
if (!szPath) {
VideoLogError("No exist video path.");
media_info_h pVideoItem = NULL;
filter_h m_FilterHandle = NULL;
- char szTmpStr[STR_LEN_MAX] = {0,};
+ char szTmpStr[STR_LEN_MAX] = { 0, };
if (media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to create media filter handle.");
return FALSE;
}
- //snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_PATH = \"%s\"", szPath);
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) AND MEDIA_PATH = \"%s\"", szPath);
- if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) AND MEDIA_PATH = \"%s\"",
+ szPath);
+ if (media_filter_set_condition
+ (m_FilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_info_foreach_media_from_db(m_FilterHandle, mp_util_svc_iterate_for_get_video_item_cb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("Fail to get video item list with filter condition.");
+ if (media_info_foreach_media_from_db
+ (m_FilterHandle, mp_util_svc_iterate_for_get_video_item_cb,
+ &pVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
+ VideoLogError
+ ("Fail to get video item list with filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
if (pVideoItem) {
video_meta_h pVideoMetaHandle = NULL;
- if (media_info_get_video(pVideoItem, &pVideoMetaHandle) == MEDIA_CONTENT_ERROR_NONE) {
+ if (media_info_get_video(pVideoItem, &pVideoMetaHandle) ==
+ MEDIA_CONTENT_ERROR_NONE) {
//last played time
int nLastPlayedTime = 0;
- video_meta_get_played_position(pVideoMetaHandle, &nLastPlayedTime);
- *nPlayedTime = (unsigned int)nLastPlayedTime;
+ video_meta_get_played_position(pVideoMetaHandle,
+ &nLastPlayedTime);
+ *nPlayedTime = (unsigned int) nLastPlayedTime;
//Duratiom time
int duration = 0;
video_meta_get_duration(pVideoMetaHandle, &duration);
- *nDuration = (unsigned int)duration;
+ *nDuration = (unsigned int) duration;
//get width
int width = 0;
video_meta_destroy(pVideoMetaHandle);
}
-
//display name
char *szName = NULL;
media_info_get_display_name(pVideoItem, &szName);
*szTitle = szName;
media_info_destroy(pVideoItem);
}
- VideoSecureLogDebug("Last Played Time : %s,%d:%d,%d,%d", *szTitle, *nPlayedTime, *nDuration, *nWidth, *nHeight);
+ VideoSecureLogDebug("Last Played Time : %s,%d:%d,%d,%d", *szTitle,
+ *nPlayedTime, *nDuration, *nWidth, *nHeight);
return TRUE;
}
-bool mp_util_svc_extract_video_list_from_folder_by_personal(char *szFolderPath, int nSortType, int nItemType, int nViewType)
+bool mp_util_svc_extract_video_list_from_folder_by_personal(char
+ *szFolderPath,
+ int nSortType,
+ int nItemType,
+ int nViewType)
{
if (VideoItemList) {
VideoLogError("Already exist video list.");
media_content_order_e nOrderType = MEDIA_CONTENT_ORDER_ASC;
char *szFolderID = NULL;
- char szTmpStr[STR_LEN_MAX] = {0,};
- char szOrderObj[STR_LEN_MAX] = {0,};
+ char szTmpStr[STR_LEN_MAX] = { 0, };
+ char szOrderObj[STR_LEN_MAX] = { 0, };
nTotalVideoTypeFiles = 0;
nNumberOfVideoItemByType = 0;
}
switch (nItemType) {
- case MP_LIST_VIEW_ALL:
- if (nViewType == 0) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\" and MEDIA_PATH NOT LIKE \"%s%%\"", szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
- } else {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\" and MEDIA_PATH LIKE \"%s%%\"", szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
- }
+ case MP_LIST_VIEW_ALL:
+ if (nViewType == 0) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\" and MEDIA_PATH NOT LIKE \"%s%%\"",
+ szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\" and MEDIA_PATH LIKE \"%s%%\"",
+ szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
+ }
break;
- case MP_LIST_VIEW_PHONE:
- if (nViewType == 0) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 and (MEDIA_STORAGE_TYPE = 0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\" and MEDIA_PATH NOT LIKE \"%s%%\"", szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
- } else {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 and (MEDIA_STORAGE_TYPE = 0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\" and MEDIA_PATH LIKE \"%s%%\"", szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
- }
+ case MP_LIST_VIEW_PHONE:
+ if (nViewType == 0) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 and (MEDIA_STORAGE_TYPE = 0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\" and MEDIA_PATH NOT LIKE \"%s%%\"",
+ szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 and (MEDIA_STORAGE_TYPE = 0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\" and MEDIA_PATH LIKE \"%s%%\"",
+ szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
+ }
break;
- case MP_LIST_VIEW_CLOUD:
- if (nViewType == 0) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\" and MEDIA_PATH NOT LIKE \"%s%%\"", szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
- } else {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\" and MEDIA_PATH LIKE \"%s%%\"", szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
- }
+ case MP_LIST_VIEW_CLOUD:
+ if (nViewType == 0) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\" and MEDIA_PATH NOT LIKE \"%s%%\"",
+ szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\" and MEDIA_PATH LIKE \"%s%%\"",
+ szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
+ }
break;
- default:
- if (nViewType == 0) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\" and MEDIA_PATH NOT LIKE \"%s%%\"", szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
- } else {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\" and MEDIA_PATH LIKE \"%s%%\"", szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
- }
- break;
+ default:
+ if (nViewType == 0) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\" and MEDIA_PATH NOT LIKE \"%s%%\"",
+ szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and FOLDER_PATH = \"%s\" and MEDIA_PATH LIKE \"%s%%\"",
+ szFolderPath, VIDEO_UTIL_PERSONAL_HEAD_STR);
+ }
+ break;
}
if (media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE) {
return FALSE;
}
- if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_filter_set_condition
+ (m_FilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_folder_foreach_folder_from_db(m_FilterHandle, mp_util_svc_iterate_for_get_folder_cb, &m_FolderHandle) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_folder_foreach_folder_from_db
+ (m_FilterHandle, mp_util_svc_iterate_for_get_folder_cb,
+ &m_FolderHandle) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail media_folder_foreach_folder_from_db().");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1");
- if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_filter_set_condition
+ (m_FilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_filter_set_order(m_FilterHandle, nOrderType, szOrderObj, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_filter_set_order
+ (m_FilterHandle, nOrderType, szOrderObj,
+ MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set order.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_folder_get_folder_id(m_FolderHandle, &szFolderID) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_folder_get_folder_id(m_FolderHandle, &szFolderID) !=
+ MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to get folder id.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_folder_foreach_media_from_db(szFolderID, m_FilterHandle, mp_util_svc_iterate_cb, &VideoItemList) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_folder_foreach_media_from_db
+ (szFolderID, m_FilterHandle, mp_util_svc_iterate_cb,
+ &VideoItemList) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set order.");
media_filter_destroy(m_FilterHandle);
return TRUE;
}
-bool mp_util_svc_extract_video_list_by_personal(int nSortType, int nItemType, int nViewType)
+bool mp_util_svc_extract_video_list_by_personal(int nSortType,
+ int nItemType,
+ int nViewType)
{
if (VideoItemList) {
VideoLogError("Already exist video list.");
filter_h m_FilterHandle = NULL;
media_content_order_e nOrderType = MEDIA_CONTENT_ORDER_ASC;
- char szTmpStr[STR_LEN_MAX] = {0,};
- char szOrderObj[STR_LEN_MAX] = {0,};
+ char szTmpStr[STR_LEN_MAX] = { 0, };
+ char szOrderObj[STR_LEN_MAX] = { 0, };
nTotalVideoTypeFiles = 0;
nNumberOfVideoItemByType = 0;
switch (nItemType) {
case MP_LIST_VIEW_ALL:
- if (nViewType == 0) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH NOT LIKE \"%s%%\"", VIDEO_UTIL_PERSONAL_HEAD_STR);
- } else {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH LIKE \"%s%%\"", VIDEO_UTIL_PERSONAL_HEAD_STR);
- }
+ if (nViewType == 0) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH NOT LIKE \"%s%%\"",
+ VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH LIKE \"%s%%\"",
+ VIDEO_UTIL_PERSONAL_HEAD_STR);
+ }
break;
case MP_LIST_VIEW_PHONE:
- if (nViewType == 0) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 and (MEDIA_STORAGE_TYPE = 0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH NOT LIKE \"%s%%\"", VIDEO_UTIL_PERSONAL_HEAD_STR);
- } else {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 and (MEDIA_STORAGE_TYPE = 0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH LIKE \"%s%%\"", VIDEO_UTIL_PERSONAL_HEAD_STR);
- }
+ if (nViewType == 0) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 and (MEDIA_STORAGE_TYPE = 0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH NOT LIKE \"%s%%\"",
+ VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 and (MEDIA_STORAGE_TYPE = 0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH LIKE \"%s%%\"",
+ VIDEO_UTIL_PERSONAL_HEAD_STR);
+ }
break;
case MP_LIST_VIEW_CLOUD:
- if (nViewType == 0) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH NOT LIKE \"%s%%\"", VIDEO_UTIL_PERSONAL_HEAD_STR);
- } else {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH LIKE \"%s%%\"", VIDEO_UTIL_PERSONAL_HEAD_STR);
- }
+ if (nViewType == 0) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH NOT LIKE \"%s%%\"",
+ VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH LIKE \"%s%%\"",
+ VIDEO_UTIL_PERSONAL_HEAD_STR);
+ }
break;
default:
- if (nViewType == 0) {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH NOT LIKE \"%s%%\"", VIDEO_UTIL_PERSONAL_HEAD_STR);
- } else {
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH LIKE \"%s%%\"", VIDEO_UTIL_PERSONAL_HEAD_STR);
- }
+ if (nViewType == 0) {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH NOT LIKE \"%s%%\"",
+ VIDEO_UTIL_PERSONAL_HEAD_STR);
+ } else {
+ snprintf(szTmpStr, STR_LEN_MAX,
+ "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1) and MEDIA_PATH LIKE \"%s%%\"",
+ VIDEO_UTIL_PERSONAL_HEAD_STR);
+ }
break;
}
VideoLogInfo("MEDIA_PATH not like %s", szTmpStr);
VideoLogInfo("Fail to create media filter handle.");
return FALSE;
}
- if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_filter_set_condition
+ (m_FilterHandle, szTmpStr,
+ MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_filter_set_order(m_FilterHandle, nOrderType, szOrderObj, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_filter_set_order
+ (m_FilterHandle, nOrderType, szOrderObj,
+ MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Fail to set order.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (media_info_foreach_media_from_db(m_FilterHandle, mp_util_svc_iterate_for_video_item_list_view_cb, &VideoItemList) != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("Fail to get video item list with filter condition.");
+ if (media_info_foreach_media_from_db
+ (m_FilterHandle, mp_util_svc_iterate_for_video_item_list_view_cb,
+ &VideoItemList) != MEDIA_CONTENT_ERROR_NONE) {
+ VideoLogError
+ ("Fail to get video item list with filter condition.");
media_filter_destroy(m_FilterHandle);
return FALSE;
}
int nIndex = 0;
for (nIndex = 0; nIndex < nVideoListSize; nIndex++) {
- bDeviceVideo = mp_util_svc_is_device_storage(nIndex);
+ bDeviceVideo = mp_util_svc_is_device_storage(nIndex);
if (!bDeviceVideo) {
continue;
}
pVideoFile = mp_util_svc_get_video_url(nIndex);
- bRet = mp_util_check_video_personal_status((const char*)pVideoFile);
+ bRet =
+ mp_util_check_video_personal_status((const char *) pVideoFile);
MP_FREE_STRING(pVideoFile);
if (nViewType == 0) {
if (!bRet) {
}
-void mp_util_svc_move_to_db(const int nVideoItemIndex, const char *szVideoPath)
+void mp_util_svc_move_to_db(const int nVideoItemIndex,
+ const char *szVideoPath)
{
if (!VideoItemList) {
VideoLogError("Not exist video item list handle.");
return;
}
- if (nVideoItemIndex < 0 || nVideoItemIndex >= mp_util_svc_get_video_list_size_for_checking_index()) {
+ if (nVideoItemIndex < 0
+ || nVideoItemIndex >=
+ mp_util_svc_get_video_list_size_for_checking_index()) {
VideoLogError("Error number of list item.");
return;
}
- media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ media_info_h pVideoItem =
+ (media_info_h) eina_list_nth(VideoItemList, nVideoItemIndex);
if (pVideoItem) {
- if (media_info_move_to_db(pVideoItem, szVideoPath) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_info_move_to_db(pVideoItem, szVideoPath) !=
+ MEDIA_CONTENT_ERROR_NONE) {
VideoLogError("Failed move to db");
}
}
VideoItemList = eina_list_remove(VideoItemList, pItem);
media_info_destroy(pItem);
nNumberOfVideoItemByType--;
- }
- else
- {
+ } else {
VideoLogError("Fail to remove item in media svc and list.");
return FALSE;
}
if (pItem) {
VideoFolderList = eina_list_remove(VideoFolderList, pItem);
media_folder_destroy(pItem);
- }
- else
- {
+ } else {
VideoLogError("Fail to remove item in media svc and list.");
return FALSE;
}
char *szVideoItemFilePath = NULL;
int nVideoIndex = 0;
- for (nVideoIndex = 0; nVideoIndex < nNumberOfVideoItemByType; nVideoIndex++) {
+ for (nVideoIndex = 0; nVideoIndex < nNumberOfVideoItemByType;
+ nVideoIndex++) {
szVideoItemFilePath = mp_util_svc_get_video_url(nVideoIndex);
bool bDRMLock = FALSE;
- mp_util_check_drm_lock((const char*)szVideoItemFilePath, &bDRMLock);
+ mp_util_check_drm_lock((const char *) szVideoItemFilePath,
+ &bDRMLock);
if (bDRMLock) {
mp_util_svc_remove_list_item_from_list(nVideoIndex);
- nVideoIndex --;
+ nVideoIndex--;
}
if (szVideoItemFilePath) {
if (pVideoItem) {
media_info_get_file_path(pVideoItem, &szVideoItemFilePath);
if (szVideoItemFilePath) {
- mp_util_check_drm_lock((const char*)szVideoItemFilePath, &bDRMLock);
+ mp_util_check_drm_lock((const char *) szVideoItemFilePath,
+ &bDRMLock);
free(szVideoItemFilePath);
szVideoItemFilePath = NULL;
}
bool mp_util_svc_is_device_storage(const int nVideoItemIndex)
{
- MpMediaStorageType storage_type = mp_util_svc_get_video_storage(nVideoItemIndex);
- if ((storage_type == MP_MEDIA_TYPE_STORAGE_INTERNAL) || (storage_type == MP_MEDIA_TYPE_STORAGE_EXTERNAL)) {
+ MpMediaStorageType storage_type =
+ mp_util_svc_get_video_storage(nVideoItemIndex);
+ if ((storage_type == MP_MEDIA_TYPE_STORAGE_INTERNAL)
+ || (storage_type == MP_MEDIA_TYPE_STORAGE_EXTERNAL)) {
return TRUE;
}
int nRet = MEDIA_CONTENT_ERROR_NONE;
int result = 0;
- media_info_h pVideoItem_1 = (media_info_h)d1;
- media_info_h pVideoItem_2 = (media_info_h)d2;
+ media_info_h pVideoItem_1 = (media_info_h) d1;
+ media_info_h pVideoItem_2 = (media_info_h) d2;
nRet = media_info_get_mime_type(pVideoItem_1, &szMime_1);
if (nRet != MEDIA_CONTENT_ERROR_NONE || szMime_1 == NULL) {
int nRet = MEDIA_CONTENT_ERROR_NONE;
int result = 0;
- media_info_h pVideoItem_1 = (media_info_h)d1;
- media_info_h pVideoItem_2 = (media_info_h)d2;
+ media_info_h pVideoItem_1 = (media_info_h) d1;
+ media_info_h pVideoItem_2 = (media_info_h) d2;
nRet = media_info_get_display_name(pVideoItem_1, &szTitle_1);
if (nRet != MEDIA_CONTENT_ERROR_NONE || szTitle_1 == NULL) {
VideoLogError("[ERR] Fail to get item title. - 0x%x", nRet);
int nRet = MEDIA_CONTENT_ERROR_NONE;
int result = 0;
- media_info_h pVideoItem_1 = (media_info_h)d1;
- media_info_h pVideoItem_2 = (media_info_h)d2;
+ media_info_h pVideoItem_1 = (media_info_h) d1;
+ media_info_h pVideoItem_2 = (media_info_h) d2;
nRet = media_info_get_size(pVideoItem_1, &nFileSize1);
return result;
}
-/*
-static int __mp_util_svc_sort_by_date(const void *d1, const void *d2)
-{
- if (d1 == NULL) {
- return (1);
- }
- if (d2 == NULL) {
- return (-1);
- }
- time_t nTime_1 = 0;
- time_t nTime_2 = 0;
-
- int nRet = MEDIA_CONTENT_ERROR_NONE;
- int result = 0;
-
- media_info_h pVideoItem_1 = (media_info_h)d1;
- media_info_h pVideoItem_2 = (media_info_h)d2;
-
-
- nRet = media_info_get_modified_time(pVideoItem_1, &nTime_1);
- if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("[ERR] Fail to get item date. - 0x%x", nRet);
- return (1);
- }
-
- nRet = media_info_get_modified_time(pVideoItem_2, &nTime_2);
- if (nRet != MEDIA_CONTENT_ERROR_NONE) {
- VideoLogError("[ERR] Fail to get item date. - 0x%x", nRet);
- return (-1);
- }
-
- if (nTime_1 < nTime_2) {
- result = -1;
- } else if (nTime_1 > nTime_2) {
- result = 1;
- } else {
- result = -1;
- }
-
- return result;
-}
-*/
void mp_util_svc_ctrl_sort_list(int SortType)
{
if (!VideoItemList) {
switch (SortType) {
case MP_MEDIA_SORT_BY_RECENTLY_VIEWED:
-// sort_func = __mp_util_svc_sort_by_recently_viewed;
-// break;
case MP_MEDIA_SORT_BY_RECENTLY_ADDED:
-// sort_func = __mp_util_svc_sort_by_recently_added;
-// break;
case MP_MEDIA_SORT_BY_NAME:
sort_func = __mp_util_svc_sort_by_name;
break;
VideoItemList = eina_list_sort(VideoItemList, nVideoTotal, sort_func);
}
-bool mp_util_svc_get_frame_by_position(const char *szFilePath, const char *szDestImage, int nPosition, int nWidth, int nHeight)
+bool mp_util_svc_get_frame_by_position(const char *szFilePath,
+ const char *szDestImage,
+ int nPosition, int nWidth,
+ int nHeight)
{
if (!szFilePath || !szDestImage) {
VideoLogInfo("[ERR] No exist szFilePath or szDestImage.");
int nRotate = 0;
unsigned char *pRotBuf = NULL;
- if (metadata_extractor_create(&pMetadata) != METADATA_EXTRACTOR_ERROR_NONE) {
+ if (metadata_extractor_create(&pMetadata) !=
+ METADATA_EXTRACTOR_ERROR_NONE) {
VideoLogInfo("[ERR] - metadata_extractor_create()");
goto Execption;
}
- if (metadata_extractor_set_path(pMetadata, szFilePath) != METADATA_EXTRACTOR_ERROR_NONE) {
+ if (metadata_extractor_set_path(pMetadata, szFilePath) !=
+ METADATA_EXTRACTOR_ERROR_NONE) {
VideoLogInfo("[ERR] - metadata_extractor_set_path()");
goto Execption;
}
- if (metadata_extractor_get_metadata(pMetadata, METADATA_ROTATE, &szVal) != METADATA_EXTRACTOR_ERROR_NONE) {
+ if (metadata_extractor_get_metadata(pMetadata, METADATA_ROTATE, &szVal)
+ != METADATA_EXTRACTOR_ERROR_NONE) {
VideoLogInfo("[ERR] - metadata_extractor_get_metadata()");
goto Execption;
}
if (szVal == NULL) {
nRotate = 0;
- }
- else {
+ } else {
nRotate = atoi(szVal);
MP_FREE_STRING(szVal);
}
- if (metadata_extractor_get_frame_at_time(pMetadata, nPosition, TRUE, &pFrame, &nFrameSize) != METADATA_EXTRACTOR_ERROR_NONE) {
+ if (metadata_extractor_get_frame_at_time
+ (pMetadata, nPosition, TRUE, &pFrame,
+ &nFrameSize) != METADATA_EXTRACTOR_ERROR_NONE) {
VideoLogInfo("[ERR] - metadata_extractor_get_frame_at_time()");
goto Execption;
- }
+ }
if (pFrame == NULL) {
VideoLogInfo("pFrame is NULL");
image_util_rotation_e nRot = IMAGE_UTIL_ROTATION_NONE;
if (nRotate == 90) {
nRot = IMAGE_UTIL_ROTATION_90;
- }
- else if (nRotate == 180) {
+ } else if (nRotate == 180) {
nRot = IMAGE_UTIL_ROTATION_180;
- }
- else if (nRotate == 270) {
+ } else if (nRotate == 270) {
nRot = IMAGE_UTIL_ROTATION_270;
}
unsigned int nResizBufSize = 0;
int nSrcW = nWidth;
int nSrcH = nHeight;
- if (image_util_calculate_buffer_size(nWidth, nHeight, IMAGE_UTIL_COLORSPACE_RGB888, &nResizBufSize) != IMAGE_UTIL_ERROR_NONE) {
- VideoLogInfo("image_util_calculate_buffer_size is fail : [0x%x]", nRet);
+ if (image_util_calculate_buffer_size
+ (nWidth, nHeight, IMAGE_UTIL_COLORSPACE_RGB888,
+ &nResizBufSize) != IMAGE_UTIL_ERROR_NONE) {
+ VideoLogInfo
+ ("image_util_calculate_buffer_size is fail : [0x%x]",
+ nRet);
goto Execption;
}
- pRotBuf = calloc(1,sizeof(unsigned char) * nResizBufSize);
+ pRotBuf = calloc(1, sizeof(unsigned char) * nResizBufSize);
if (pRotBuf == NULL) {
VideoLogInfo("pRotBuf alloc fail");
goto Execption;
- }
- else {
+ } else {
VideoLogInfo("ResizeBuf Size : %d", nResizBufSize);
- if (vp_util_image_rotate(pRotBuf, &nWidth, &nHeight, nRot, pFrame, nSrcW, nSrcH, IMAGE_UTIL_COLORSPACE_RGB888) != IMAGE_UTIL_ERROR_NONE) {
- VideoLogInfo("vp_util_image_rotate is fail : [0x%x]", nRet);
+ if (vp_util_image_rotate
+ (pRotBuf, &nWidth, &nHeight, nRot, pFrame, nSrcW,
+ nSrcH,
+ IMAGE_UTIL_COLORSPACE_RGB888) !=
+ IMAGE_UTIL_ERROR_NONE) {
+ VideoLogInfo("vp_util_image_rotate is fail : [0x%x]",
+ nRet);
goto Execption;
}
}
}
}
if (pRotBuf) {
- if (image_util_encode_jpeg(pRotBuf, nWidth, nHeight, IMAGE_UTIL_COLORSPACE_RGB888, 100, szDestImage)!= IMAGE_UTIL_ERROR_NONE) {
+ if (image_util_encode_jpeg
+ (pRotBuf, nWidth, nHeight, IMAGE_UTIL_COLORSPACE_RGB888, 100,
+ szDestImage) != IMAGE_UTIL_ERROR_NONE) {
VideoLogInfo("image_util_encode_jpeg is fail : [0x%x]", nRet);
goto Execption;
}
} else {
- if (image_util_encode_jpeg(pFrame, nWidth, nHeight, IMAGE_UTIL_COLORSPACE_RGB888, 100, szDestImage)!= IMAGE_UTIL_ERROR_NONE) {
+ if (image_util_encode_jpeg
+ (pFrame, nWidth, nHeight, IMAGE_UTIL_COLORSPACE_RGB888, 100,
+ szDestImage) != IMAGE_UTIL_ERROR_NONE) {
VideoLogInfo("image_util_encode_jpeg is fail : [0x%x]", nRet);
goto Execption;
}
}
if (pMetadata) {
- metadata_extractor_destroy(pMetadata);
- pMetadata = NULL;
+ metadata_extractor_destroy(pMetadata);
+ pMetadata = NULL;
}
MP_FREE_STRING(pFrame);
MP_FREE_STRING(pRotBuf);
return TRUE;
-Execption:
+ Execption:
MP_FREE_STRING(pFrame);
MP_FREE_STRING(pRotBuf);
if (pMetadata) {
- metadata_extractor_destroy(pMetadata);
- pMetadata = NULL;
+ metadata_extractor_destroy(pMetadata);
+ pMetadata = NULL;
}
return FALSE;
}
-//static bool __mp_util_svc_check_invalid_video_id(void *pInvalidList, char *pVideoId)
-//{
-// if (!pInvalidList || !pVideoId)
-// {
-// return FALSE;
-// }
-// char *pVideoTmpId = NULL;
-// Eina_List *pIterateList = NULL;
-//
-// EINA_LIST_FOREACH(pInvalidList, pIterateList, pVideoTmpId)
-// {
-// if (pVideoId)
-// {
-// if (g_strcmp0(pVideoTmpId, pVideoId) == 0)
-// {
-// return TRUE;
-// }
-// }
-// }
-//
-// return FALSE;
-//}
int mp_util_svc_get_wall_video_index(void *pInvalidList)
{
-// media_info_h pVideoItem = NULL;
-// Eina_List *pIterateList = NULL;
-// int nVideoIndex = 0;
-// if (!VideoItemList) {
-// VideoLogError("VideoItemList IS null");
-// return -1;
-// }
-// char *szWallDir = NULL;
-// char *szWallFile = NULL;
-// char *szMediaId = NULL;
-
-// EINA_LIST_FOREACH(VideoItemList, pIterateList, pVideoItem)
-// {
-// if (pVideoItem)
-// {
-// media_content_storage_ex_e storage_type = MEDIA_CONTENT_STORAGE_INTERNAL_EX;
-// media_info_get_storage_type_ex(pVideoItem, &storage_type);
-// if ((storage_type == MEDIA_CONTENT_STORAGE_INTERNAL_EX) || (storage_type == MEDIA_CONTENT_STORAGE_EXTERNAL_EX)) {
-// media_info_get_media_id(pVideoItem, &szMediaId);
-// if (szMediaId)
-// {
-// szWallDir = g_strdup_printf("%s/%s", MP_VIDEO_WALL_DIR, szMediaId);
-// szWallFile = g_strdup_printf(MP_VIDEO_WALL_FRAME_FILE_PREFIX, szWallDir);
-// if (!__mp_util_svc_check_invalid_video_id(pInvalidList, szMediaId))
-// {
-// if (szWallFile && !vp_file_exists(szWallFile))
-// {
-// MP_FREE_STRING(szWallFile);
-// MP_FREE_STRING(szMediaId);
-// return nVideoIndex;
-// }
-// }
-// MP_FREE_STRING(szMediaId);
-// }
-// MP_FREE_STRING(szWallFile);
-// }
-// ++nVideoIndex;
-// }
-// }
return -1;
}
-bool mp_util_svc_check_valid_media_id(char *pMediaId, int style, int *nMediaIndex)
+bool mp_util_svc_check_valid_media_id(char *pMediaId, int style,
+ int *nMediaIndex)
{
if (!pMediaId) {
return FALSE;
if (pVideoItem) {
media_info_get_media_id(pVideoItem, &szMediaId);
- if (szMediaId && (g_strcmp0(szMediaId, pMediaId) == 0))
- {
+ if (szMediaId && (g_strcmp0(szMediaId, pMediaId) == 0)) {
MP_FREE_STRING(szMediaId);
*nMediaIndex = nIndex;
return TRUE;
MP_FREE_STRING(szMediaId);
}
}
- }
- else if (style == MEDIA_TYPE_DIRECTORY) {
+ } else if (style == MEDIA_TYPE_DIRECTORY) {
if (!VideoFolderList) {
return FALSE;
}
EINA_LIST_FOREACH(VideoFolderList, pIterateList, pFolderItem) {
if (pFolderItem) {
media_folder_get_folder_id(pFolderItem, &szMediaId);
- if (g_strcmp0(szMediaId, pMediaId) == 0)
- {
+ if (g_strcmp0(szMediaId, pMediaId) == 0) {
MP_FREE_STRING(szMediaId);
*nMediaIndex = nIndex;
return FALSE;
}
-
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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-util-preference.h"
#include "vp-play-log.h"
{
int nErr = 0;
nErr = preference_set_boolean(MP_UTIL_PREFERENCE_KEY_MULTI_PLAY_FLAG,
- set);
+ set);
if (nErr != 0) {
VideoLogError
- ("SET MP_UTIL_PREFERENCE_KEY_MULTI_PLAY_FLAG is fail [0x%x]",
- nErr);
+ ("SET MP_UTIL_PREFERENCE_KEY_MULTI_PLAY_FLAG is fail [0x%x]",
+ nErr);
return FALSE;
}
return TRUE;
}
-bool mp_util_preference_get_multi_play_status(bool *bMultiPlay)
+bool mp_util_preference_get_multi_play_status(bool * bMultiPlay)
{
int nErr = 0;
bool nVal = false;
nErr = preference_get_boolean(MP_UTIL_PREFERENCE_KEY_MULTI_PLAY_FLAG,
- &nVal);
+ &nVal);
if (nErr != 0) {
VideoLogError
- ("GET MP_UTIL_PREFERENCE_KEY_MULTI_PLAY_FLAG is fail [0x%x]",
- nErr);
+ ("GET MP_UTIL_PREFERENCE_KEY_MULTI_PLAY_FLAG is fail [0x%x]",
+ nErr);
return FALSE;
}
int nErr = 0;
nErr = preference_get_string(MP_UTIL_PREFERENCE_KEY_PREVIEW_URL_VIDEOS,
- &szPreview);
+ &szPreview);
if (nErr != 0) {
VideoLogError("fail to retrieve preview url [0x%x]", nErr);
}
if (szPreview) {
if (preference_set_string
- (MP_UTIL_PREFERENCE_KEY_PREVIEW_URL_VIDEOS,
- szPreview)) {
+ (MP_UTIL_PREFERENCE_KEY_PREVIEW_URL_VIDEOS, szPreview)) {
VideoLogError("Fail to write url.");
bRet = FALSE;
} else {
}
} else {
if (preference_set_string
- (MP_UTIL_PREFERENCE_KEY_PREVIEW_URL_VIDEOS,
- "")) {
+ (MP_UTIL_PREFERENCE_KEY_PREVIEW_URL_VIDEOS, "")) {
VideoLogError("Fail to write url.");
bRet = FALSE;
} else {
}
bool mp_util_preference_set_preview_change(preference_changed_cb callback,
- void *pUserData)
+ void *pUserData)
{
bool bRet = FALSE;
int nErr = 0;
nErr = preference_set_changed_cb
- (MP_UTIL_PREFERENCE_KEY_PREVIEW_URL_VIDEOS, callback,
- pUserData);
+ (MP_UTIL_PREFERENCE_KEY_PREVIEW_URL_VIDEOS, callback, pUserData);
if (nErr != 0) {
VideoLogError("Failed to register callback [0x%x]", nErr);
} else {
void mp_util_preference_init()
{
- /*if add preference key. it is necessary to init new preference here.*/
+ /*if add preference key. it is necessary to init new preference here. */
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
#include <stdbool.h>
#include <media_key.h>
#include <Elementary.h>
-//#include <appcore-common.h>
#include <notification.h>
#include <media_content.h>
#include <sys/statvfs.h>
#include <runtime_info.h>
-/*#include <telephony_network.h>*/
#include <net_connection.h>
#include <telephony.h>
#include <wifi-direct.h>
};
-#define MP_UTIL_PHONE_PATH "/opt/usr/media"
+#define MP_UTIL_PHONE_PATH "/opt/usr/media"
#define MP_UTIL_SD_PATH "/opt/storage/sdcard"
#define MP_UTIL_USB_PATH "/opt/storage/usb"
#define MP_UTIL_MEDIA_DIR "/opt/usr/media/Videos"
#define MP_UTIL_FILE_PREFIX "file://"
#define FILE_SIZE_LEN_MAX 64
-#define BASIC_SIZE 1024 /*used for file size check*/
+#define BASIC_SIZE 1024 /*used for file size check */
#define VIDEO_TIME_MSEC_PER_SEC 1000
#define VIDEO_TIME_SEC_PER_MIN 60
mpColorThemeChangedCb g_fThemeChangedCb = NULL;
static bool auto_play = false;
-bool vp_is_auto_play_on(){
+bool vp_is_auto_play_on()
+{
VideoLogInfo("");
int nErr = 0;
bool nVal = 0;
VideoLogError("failed to get MULTI PLAY FLAG [0x%x]", nErr);
return FALSE;
}
- if(nVal)
+ if (nVal)
return TRUE;
else
return false;
}
-void vp_set_auto_play(bool val){
+
+void vp_set_auto_play(bool val)
+{
auto_play = val;
int nErr = 0;
nErr = preference_set_boolean(PREF_MP_VIDEO_AUTO_PLAY_TYPE_KEY, val);
void mp_util_create_main_theme(void)
{
mp_util_free_main_theme();
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_CUSTOM_THEME);
char *pItem = NULL;
pExtensionThemeList = elm_theme_extension_list_get(NULL);
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_CUSTOM_THEME);
int nType = 0;
if (preference_get_int(PREF_MP_UTIL_MAIN_TAB_TYPE, &nType) !=
- PREFERENCE_ERROR_NONE) {
+ PREFERENCE_ERROR_NONE) {
VideoLogError("[ERR] PREF_MP_UTIL_MAIN_TAB_TYPE fail!!!");
}
void mp_util_set_main_tab_type(int nType)
{
- if (preference_set_int(PREF_MP_UTIL_MAIN_TAB_TYPE, nType) != PREFERENCE_ERROR_NONE) {
+ if (preference_set_int(PREF_MP_UTIL_MAIN_TAB_TYPE, nType) !=
+ PREFERENCE_ERROR_NONE) {
VideoLogError("[ERR] PREF_MP_UTIL_MAIN_TAB_TYPE fail!!!");
}
}
{
if (!pMainConformant || !pMainWindowHandle) {
VideoLogError
- ("[ERR] No exist pMainConformant, pMainWindowHandle.");
+ ("[ERR] No exist pMainConformant, pMainWindowHandle.");
return;
}
elm_win_indicator_mode_set((Evas_Object *) pMainWindowHandle,
- ELM_WIN_INDICATOR_SHOW);
+ ELM_WIN_INDICATOR_SHOW);
elm_win_indicator_opacity_set((Evas_Object *) pMainWindowHandle,
- ELM_WIN_INDICATOR_OPAQUE);
+ ELM_WIN_INDICATOR_OPAQUE);
elm_object_signal_emit((Evas_Object *) pMainConformant,
- "elm,state,indicator,nooverlap", "");
- evas_object_data_set((Evas_Object *) pMainConformant, "overlap",
- NULL);
+ "elm,state,indicator,nooverlap", "");
+ evas_object_data_set((Evas_Object *) pMainConformant, "overlap", NULL);
}
void mp_util_hide_indicator(void)
{
if (!pMainConformant || !pMainWindowHandle) {
VideoLogError
- ("[ERR] No exist pMainConformant, pMainWindowHandle.");
+ ("[ERR] No exist pMainConformant, pMainWindowHandle.");
return;
}
- /*elm_win_indicator_mode_set((Evas_Object *) pMainWindowHandle,
- ELM_WIN_INDICATOR_HIDE);*/
elm_win_indicator_mode_set((Evas_Object *) pMainWindowHandle,
- ELM_WIN_INDICATOR_SHOW);
+ ELM_WIN_INDICATOR_SHOW);
elm_win_indicator_opacity_set((Evas_Object *) pMainWindowHandle,
- ELM_WIN_INDICATOR_TRANSPARENT);
+ ELM_WIN_INDICATOR_TRANSPARENT);
elm_object_signal_emit((Evas_Object *) pMainConformant,
- "elm,state,indicator,overlap", "");
+ "elm,state,indicator,overlap", "");
evas_object_data_set((Evas_Object *) pMainConformant, "overlap",
- (void *) EINA_TRUE);
+ (void *) EINA_TRUE);
}
void mp_util_set_main_window_handle(void *pWindowHandle)
}
void *mp_util_create_title_icon_btn(void *pParent, const char *icon_path,
- Evas_Smart_Cb pFunc, void *pUserData)
+ Evas_Smart_Cb pFunc, void *pUserData)
{
if (!pParent || !icon_path) {
VideoLogError("invalid parent and icon path");
}
Evas_Object *pIcon = NULL;
Evas_Object *pTitleBtn = NULL;
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_IMAGE_NAME_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_IMAGE_NAME_EDJ);
free(path);
pIcon = elm_image_add((Evas_Object *) pParent);
elm_image_file_set(pIcon, edj_path, icon_path);
evas_object_size_hint_aspect_set(pIcon, EVAS_ASPECT_CONTROL_BOTH, 1,
- 1);
+ 1);
pTitleBtn = elm_button_add((Evas_Object *) pParent);
elm_object_style_set(pTitleBtn, "naviframe/title_icon");
elm_object_part_content_set(pTitleBtn, "icon", pIcon);
- evas_object_smart_callback_add(pTitleBtn, "clicked", pFunc,
- pUserData);
+ evas_object_smart_callback_add(pTitleBtn, "clicked", pFunc, pUserData);
return pTitleBtn;
}
}
}
-static void __mp_util_popup_back_cb(void *data, Evas_Object *pObj,
- void *event_info)
+static void __mp_util_popup_back_cb(void *data, Evas_Object * pObj,
+ void *event_info)
{
mp_util_delete_popup_handle();
}
bool mp_util_notify_popup(void *pUserData, char *szTitle,
- char *szContents, void *PopupButtonCallbackFunc)
+ char *szContents, void *PopupButtonCallbackFunc)
{
if (!szContents) {
VideoLogError("No have popup message is null.");
pPopUpHandle = elm_popup_add(mp_util_get_main_window_handle());
eext_object_event_callback_add(pPopUpHandle, EEXT_CALLBACK_BACK,
- PopupButtonCallbackFunc, NULL);
+ PopupButtonCallbackFunc, NULL);
evas_object_smart_callback_add(pPopUpHandle, "block,clicked",
- __mp_util_popup_back_cb,
- (void *) pUserData);
+ __mp_util_popup_back_cb,
+ (void *) pUserData);
evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
elm_object_text_set(pPopUpHandle, szContents);
if (szTitle && (szTitle == VIDEOS_COMMON_HEADER_ERROR)) {
elm_object_domain_translatable_part_text_set(pPopUpHandle,
- "title,text",
- MP_SYS_STRING,
- szTitle);
+ "title,text",
+ MP_SYS_STRING,
+ szTitle);
}
elm_popup_timeout_set(pPopUpHandle, 3.0);
if (PopupButtonCallbackFunc) {
evas_object_smart_callback_add(pPopUpHandle, "timeout",
- PopupButtonCallbackFunc,
- pUserData);
+ PopupButtonCallbackFunc, pUserData);
} else {
evas_object_smart_callback_add(pPopUpHandle, "timeout",
- __mp_util_popup_back_cb,
- pUserData);
+ __mp_util_popup_back_cb, pUserData);
}
evas_object_show(pPopUpHandle);
}
bool mp_util_info_popup(char *szLabel, Evas_Smart_Cb response_cb,
- Evas_Event_Cb focus_cb, void *pUserData,
- const char *szDomain)
+ Evas_Event_Cb focus_cb, void *pUserData,
+ const char *szDomain)
{
VideoLogInfo("");
pPopUpHandle = elm_popup_add(mp_util_get_main_window_handle());
eext_object_event_callback_add(pPopUpHandle, EEXT_CALLBACK_BACK,
- response_cb, pUserData);
+ response_cb, pUserData);
Evas_Object *obj_ok = elm_button_add(pPopUpHandle);
elm_object_style_set(obj_ok, "popup");
elm_object_domain_translatable_text_set(obj_ok, MP_SYS_STRING,
- VIDEOS_COMMON_BUTTON_OK_IDS);
+ VIDEOS_COMMON_BUTTON_OK_IDS);
elm_object_part_content_set(pPopUpHandle, "button1", obj_ok);
evas_object_smart_callback_add(obj_ok, "clicked", response_cb,
- pPopUpHandle);
+ pPopUpHandle);
if (szLabel) {
- /*elm_object_part_text_set(popup, "title,text", title);*/
-
elm_object_domain_translatable_text_set(pPopUpHandle, szDomain,
- szLabel);
+ szLabel);
}
evas_object_show(pPopUpHandle);
return TRUE;
}
-bool mp_util_info_second_popup(Evas_Object *pParent, char *szLabel,
- Evas_Smart_Cb response_cb,
- Evas_Event_Cb focus_cb, void *pUserData,
- const char *szDomain)
+bool mp_util_info_second_popup(Evas_Object * pParent, char *szLabel,
+ Evas_Smart_Cb response_cb,
+ Evas_Event_Cb focus_cb, void *pUserData,
+ const char *szDomain)
{
VideoLogInfo("");
pPopUpHandle = elm_popup_add(pParent);
eext_object_event_callback_add(pPopUpHandle, EEXT_CALLBACK_BACK,
- response_cb, pUserData);
+ response_cb, pUserData);
Evas_Object *obj_ok = elm_button_add(pPopUpHandle);
elm_object_style_set(obj_ok, "popup");
elm_object_domain_translatable_text_set(obj_ok, MP_SYS_STRING,
- VIDEOS_COMMON_BUTTON_OK_IDS);
+ VIDEOS_COMMON_BUTTON_OK_IDS);
elm_object_part_content_set(pPopUpHandle, "button1", obj_ok);
evas_object_smart_callback_add(obj_ok, "clicked", response_cb,
- pPopUpHandle);
+ pPopUpHandle);
if (szLabel) {
elm_object_domain_translatable_text_set(pPopUpHandle, szDomain,
- szLabel);
+ szLabel);
}
evas_object_show(pPopUpHandle);
}
void mp_util_text_and_check_popup(Evas_Smart_Cb response_cb,
- void *cancel_cb, void *ok_cb,
- void *check_changed_cb, char *szLabel,
- void *pUserData)
+ void *cancel_cb, void *ok_cb,
+ void *check_changed_cb, char *szLabel,
+ void *pUserData)
{
if (!szLabel) {
VideoLogError("No have popup message or pUserData is null.");
pPopUpHandle = elm_popup_add(mp_util_get_main_window_handle());
eext_object_event_callback_add(pPopUpHandle, EEXT_CALLBACK_BACK,
- response_cb, pUserData);
+ response_cb, pUserData);
pLabel = elm_label_add(pPopUpHandle);
elm_label_line_wrap_set(pLabel, ELM_WRAP_MIXED);
elm_object_text_set(pLabel, szLabel);
evas_object_size_hint_weight_set(pLabel, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(pLabel, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_show(pLabel);
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_POPUP_PROGRESSBAR_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_POPUP_PROGRESSBAR_EDJ);
free(path);
pLayout = elm_layout_add(pPopUpHandle);
- elm_layout_file_set(pLayout, edj_path,
- "popup_checkview");
+ elm_layout_file_set(pLayout, edj_path, "popup_checkview");
evas_object_size_hint_weight_set(pLayout, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
pCheck = elm_check_add(pPopUpHandle);
elm_object_style_set(pCheck, "multiline");
- /*elm_object_domain_translatable_text_set(pCheck, VIDEOS_STRING, MP_PERSONAL_DONT_ASK_AGAIN);*/
evas_object_smart_callback_add(pCheck, "changed", check_changed_cb,
- pUserData);
+ pUserData);
elm_check_state_set(pCheck, FALSE);
elm_object_text_set(pCheck, MP_PERSONAL_DONT_ASK_AGAIN);
evas_object_size_hint_align_set(pCheck, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pCheck, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_show(pCheck);
elm_object_part_content_set(pLayout, "elm.swallow.content", pLabel);
elm_object_text_set(pBtn1, VIDEOS_COMMON_BUTTON_CANCEL);
elm_object_part_content_set(pPopUpHandle, "button1", pBtn1);
evas_object_smart_callback_add(pBtn1, "clicked", cancel_cb,
- pPopUpHandle);
+ pPopUpHandle);
pBtn2 = elm_button_add(pPopUpHandle);
elm_object_style_set(pBtn2, "popup");
}
bool mp_util_loading_popup(MpLoadingPopUpType style, char *szLabel,
- Evas_Smart_Cb response_cb, void *pUserData)
+ Evas_Smart_Cb response_cb, void *pUserData)
{
VideoLogInfo("");
Evas_Object *pLayout = NULL;
pPopUpHandle = elm_popup_add(mp_util_get_main_window_handle());
eext_object_event_callback_add(pPopUpHandle, EEXT_CALLBACK_BACK,
- response_cb, pUserData);
+ response_cb, pUserData);
evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
Evas_Object *progressbar = NULL;
elm_progressbar_pulse(progressbar, EINA_TRUE);
evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, 0.5);
evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
elm_progressbar_pulse(progressbar, EINA_TRUE);
evas_object_show(progressbar);
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_POPUP_PROGRESSBAR_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_POPUP_PROGRESSBAR_EDJ);
free(path);
pLayout = elm_layout_add(pPopUpHandle);
- elm_layout_file_set(pLayout, edj_path,
- "popup_processing_1button");
+ elm_layout_file_set(pLayout, edj_path, "popup_processing_1button");
evas_object_size_hint_weight_set(pLayout, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
elm_object_part_content_set(pLayout, "elm.swallow.content",
- progressbar);
+ progressbar);
elm_object_part_text_set(pLayout, "elm.text", szLabel);
elm_object_content_set(pPopUpHandle, pLayout);
pCancelButton = elm_button_add(pPopUpHandle);
elm_object_style_set(pCancelButton, "popup");
elm_object_domain_translatable_text_set(pCancelButton,
- VIDEOS_STRING,
- VIDEOS_COMMON_BUTTON_CANCEL_IDS);
+ VIDEOS_STRING,
+ VIDEOS_COMMON_BUTTON_CANCEL_IDS);
elm_object_part_content_set(pPopUpHandle, "button1",
- pCancelButton);
+ pCancelButton);
evas_object_smart_callback_add(pCancelButton, "clicked",
- response_cb, pPopUpHandle);
+ response_cb, pPopUpHandle);
evas_object_show(pCancelButton);
}
}
bool mp_util_loading_left_text_popup(MpLoadingPopUpType style,
- char *szLabel,
- Evas_Smart_Cb response_cb,
- void *pUserData)
+ char *szLabel,
+ Evas_Smart_Cb response_cb,
+ void *pUserData)
{
VideoLogInfo("");
Evas_Object *pLayout = NULL;
pPopUpHandle = elm_popup_add(mp_util_get_main_window_handle());
eext_object_event_callback_add(pPopUpHandle, EEXT_CALLBACK_BACK,
- response_cb, pUserData);
+ response_cb, pUserData);
evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
Evas_Object *progressbar = NULL;
elm_progressbar_pulse(progressbar, EINA_TRUE);
evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, 0.5);
evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
elm_progressbar_pulse(progressbar, EINA_TRUE);
evas_object_show(progressbar);
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_POPUP_PROGRESSBAR_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_POPUP_PROGRESSBAR_EDJ);
free(path);
pLayout = elm_layout_add(pPopUpHandle);
- elm_layout_file_set(pLayout, edj_path,
- "popup_processingview_1button");
+ elm_layout_file_set(pLayout, edj_path, "popup_processingview_1button");
evas_object_size_hint_weight_set(pLayout, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
elm_object_part_content_set(pLayout, "elm.swallow.content",
- progressbar);
+ progressbar);
elm_object_part_text_set(pLayout, "elm.text", szLabel);
elm_object_content_set(pPopUpHandle, pLayout);
pCancelButton = elm_button_add(pPopUpHandle);
elm_object_style_set(pCancelButton, "popup");
elm_object_domain_translatable_text_set(pCancelButton,
- VIDEOS_STRING,
- VIDEOS_COMMON_BUTTON_CANCEL_IDS);
+ VIDEOS_STRING,
+ VIDEOS_COMMON_BUTTON_CANCEL_IDS);
elm_object_part_content_set(pPopUpHandle, "button1",
- pCancelButton);
+ pCancelButton);
evas_object_smart_callback_add(pCancelButton, "clicked",
- response_cb, pPopUpHandle);
+ response_cb, pPopUpHandle);
evas_object_show(pCancelButton);
}
}
bool mp_util_yes_no_popup(void *pUserData, char *szTitle,
- char *szContents,
- void *PopupYesButtonCallbackFunc,
- void *PopupNoButtonCallbackFunc)
+ char *szContents,
+ void *PopupYesButtonCallbackFunc,
+ void *PopupNoButtonCallbackFunc)
{
if (!szTitle || !szContents) {
pPopUpHandle = elm_popup_add(mp_util_get_main_window_handle());
eext_object_event_callback_add(pPopUpHandle, EEXT_CALLBACK_BACK,
- PopupNoButtonCallbackFunc, NULL);
+ PopupNoButtonCallbackFunc, NULL);
evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
elm_object_text_set(pPopUpHandle, szContents);
elm_object_part_text_set(pPopUpHandle, "title,text", szTitle);
pButton = elm_button_add(pPopUpHandle);
elm_object_style_set(pButton, "popup");
elm_object_domain_translatable_text_set(pButton, MP_SYS_STRING,
- VIDEOS_COMMON_BUTTON_YES_IDS);
+ VIDEOS_COMMON_BUTTON_YES_IDS);
elm_object_part_content_set(pPopUpHandle, "button1", pButton);
if (PopupYesButtonCallbackFunc) {
evas_object_smart_callback_add(pButton, "clicked",
- PopupYesButtonCallbackFunc,
- pUserData);
+ PopupYesButtonCallbackFunc,
+ pUserData);
}
pButton = elm_button_add(pPopUpHandle);
elm_object_domain_translatable_text_set(pButton, MP_SYS_STRING,
- VIDEOS_COMMON_BUTTON_NO_IDS);
+ VIDEOS_COMMON_BUTTON_NO_IDS);
elm_object_style_set(pButton, "popup");
elm_object_part_content_set(pPopUpHandle, "button2", pButton);
if (PopupNoButtonCallbackFunc) {
evas_object_smart_callback_add(pButton, "clicked",
- PopupNoButtonCallbackFunc,
- pUserData);
+ PopupNoButtonCallbackFunc,
+ pUserData);
}
- /*elm_popup_timeout_set(pPopUpHandle, 3.0);*/
evas_object_show(pPopUpHandle);
}
bool mp_util_remove_all_videos_question_popup(void *pUserData,
- MpListViewAsType viewType,
- void
- *PopupDeleteButtonCallbackFunc,
- void
- *PopupCancelButtonCallbackFunc,
- void
- *PopupHWMouseBackUpCbFunc,
- void *PopupHWKeyBackCbFunc)
+ MpListViewAsType viewType,
+ void
+ *PopupDeleteButtonCallbackFunc,
+ void
+ *PopupCancelButtonCallbackFunc,
+ void
+ *PopupHWMouseBackUpCbFunc,
+ void *PopupHWKeyBackCbFunc)
{
Evas_Object *pButton = NULL;
pPopUpHandle = elm_popup_add(mp_util_get_main_window_handle());
eext_object_event_callback_add(pPopUpHandle, EEXT_CALLBACK_BACK,
- PopupCancelButtonCallbackFunc, NULL);
+ PopupCancelButtonCallbackFunc, NULL);
evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
tmpTitle = g_strdup_printf(VIDEOS_DELETEPOP_HEADER_DELETE);
elm_object_part_text_set(pPopUpHandle, "title,text", tmpTitle);
pButton = elm_button_add(pPopUpHandle);
elm_object_domain_translatable_text_set(pButton, VIDEOS_STRING,
- VIDEOS_COMMON_BUTTON_CANCEL);
+ VIDEOS_COMMON_BUTTON_CANCEL);
elm_object_style_set(pButton, "popup");
elm_object_part_content_set(pPopUpHandle, "button1", pButton);
if (PopupCancelButtonCallbackFunc) {
evas_object_smart_callback_add(pButton, "clicked",
- PopupCancelButtonCallbackFunc,
- pUserData);
+ PopupCancelButtonCallbackFunc,
+ pUserData);
}
pButton = elm_button_add(pPopUpHandle);
elm_object_domain_translatable_text_set(pButton, VIDEOS_STRING,
- VIDEOS_DELETEPOP_BUTTON_DELETE_ALL);
+ VIDEOS_DELETEPOP_BUTTON_DELETE_ALL);
elm_object_style_set(pButton, "popup");
elm_object_part_content_set(pPopUpHandle, "button2", pButton);
if (PopupDeleteButtonCallbackFunc) {
evas_object_smart_callback_add(pButton, "clicked",
- PopupDeleteButtonCallbackFunc,
- pUserData);
+ PopupDeleteButtonCallbackFunc,
+ pUserData);
}
if (PopupHWMouseBackUpCbFunc) {
evas_object_event_callback_add(pPopUpHandle,
- EVAS_CALLBACK_MOUSE_UP,
- PopupHWMouseBackUpCbFunc,
- pUserData);
+ EVAS_CALLBACK_MOUSE_UP,
+ PopupHWMouseBackUpCbFunc,
+ pUserData);
}
if (PopupHWKeyBackCbFunc) {
- /*evas_object_event_callback_add(pPopUpHandle, EVAS_CALLBACK_KEY_DOWN, PopupHWKeyBackCbFunc, pUserData);*/
}
- /*elm_popup_timeout_set(pPopUpHandle, 3.0);*/
evas_object_show(pPopUpHandle);
bool mp_util_remove_question_popup(int pUserData,
- MpListViewAsType viewType,
- void *PopupDeleteButtonCallbackFunc,
- void *PopupCancelButtonCallbackFunc,
- void *PopupHWMouseBackUpCbFunc,
- void *PopupHWKeyBackCbFunc)
+ MpListViewAsType viewType,
+ void *PopupDeleteButtonCallbackFunc,
+ void *PopupCancelButtonCallbackFunc,
+ void *PopupHWMouseBackUpCbFunc,
+ void *PopupHWKeyBackCbFunc)
{
Evas_Object *pButton = NULL;
pPopUpHandle = elm_popup_add(mp_util_get_main_window_handle());
eext_object_event_callback_add(pPopUpHandle, EEXT_CALLBACK_BACK,
- PopupCancelButtonCallbackFunc, NULL);
+ PopupCancelButtonCallbackFunc, NULL);
evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
tmpTitle = g_strdup_printf(VIDEOS_DELETEPOP_HEADER_DELETE);
elm_object_part_text_set(pPopUpHandle, "title,text", tmpTitle);
- if (nSelected < -1) { /* select videos*/
+ if (nSelected < -1) { /* select videos */
if (viewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
VideoLogInfo("%d folders are selected to delete", -nSelected);
tmpStr =
-nSelected);
}
} else {
- /* select a video*/
+ /* select a video */
if (viewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
VideoLogInfo("The folder is selected to delete. Index: %d.",
- nSelected);
+ nSelected);
tmpStr =
g_strdup_printf
(VIDEOS_DELETEPOP_MSG_THIS_FOLDER_WILL_BE_DELETED_IDS);
} else {
VideoLogInfo("The video is selected to delete. Index: %d.",
- nSelected);
+ nSelected);
tmpStr =
g_strdup_printf
(VIDEOS_DELETEPOP_MSG_ONE_VIDEO_WILL_BE_DELETED);
pButton = elm_button_add(pPopUpHandle);
elm_object_domain_translatable_text_set(pButton, VIDEOS_STRING,
- VIDEOS_COMMON_BUTTON_CANCEL);
+ VIDEOS_COMMON_BUTTON_CANCEL);
elm_object_style_set(pButton, "popup");
elm_object_part_content_set(pPopUpHandle, "button1", pButton);
if (PopupCancelButtonCallbackFunc) {
evas_object_smart_callback_add(pButton, "clicked",
- PopupCancelButtonCallbackFunc,
- (void *)pUserData);
+ PopupCancelButtonCallbackFunc,
+ (void *) pUserData);
}
pButton = elm_button_add(pPopUpHandle);
elm_object_domain_translatable_text_set(pButton, VIDEOS_STRING,
- VIDEOS_DELETEPOP_BUTTON_DELETE);
+ VIDEOS_DELETEPOP_BUTTON_DELETE);
elm_object_style_set(pButton, "popup");
elm_object_part_content_set(pPopUpHandle, "button2", pButton);
if (PopupDeleteButtonCallbackFunc) {
evas_object_smart_callback_add(pButton, "clicked",
- PopupDeleteButtonCallbackFunc,
- (void *)pUserData);
+ PopupDeleteButtonCallbackFunc,
+ (void *) pUserData);
}
if (PopupHWMouseBackUpCbFunc) {
evas_object_event_callback_add(pPopUpHandle,
- EVAS_CALLBACK_MOUSE_UP,
- PopupHWMouseBackUpCbFunc,
- (void *)pUserData);
+ EVAS_CALLBACK_MOUSE_UP,
+ PopupHWMouseBackUpCbFunc,
+ (void *) pUserData);
}
if (PopupHWKeyBackCbFunc) {
- /*evas_object_event_callback_add(pPopUpHandle, EVAS_CALLBACK_KEY_DOWN, PopupHWKeyBackCbFunc, (void *)pUserData);*/
}
- /*elm_popup_timeout_set(pPopUpHandle, 3.0);*/
evas_object_show(pPopUpHandle);
}
bool mp_util_remove_folder_question_popup(void *pUserData,
- void *PopupDeleteButtonCallbackFunc,
- void *PopupCancelButtonCallbackFunc,
- void *PopupHWMouseBackUpCbFunc,
- void *PopupHWKeyBackCbFunc)
+ void
+ *PopupDeleteButtonCallbackFunc,
+ void
+ *PopupCancelButtonCallbackFunc,
+ void *PopupHWMouseBackUpCbFunc,
+ void *PopupHWKeyBackCbFunc)
{
Evas_Object *pButton = NULL;
pPopUpHandle = elm_popup_add(mp_util_get_main_window_handle());
eext_object_event_callback_add(pPopUpHandle, EEXT_CALLBACK_BACK,
- PopupCancelButtonCallbackFunc, NULL);
+ PopupCancelButtonCallbackFunc, NULL);
evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
- elm_object_part_text_set(pPopUpHandle, "title,text", VIDEOS_DELETEPOP_HEADER_DELETE);
- elm_object_domain_translatable_text_set(pPopUpHandle, VIDEOS_STRING, VIDEOS_DELETEPOP_MSG_THIS_FOLDER_WILL_BE_DELETED_IDS);
+ elm_object_part_text_set(pPopUpHandle, "title,text",
+ VIDEOS_DELETEPOP_HEADER_DELETE);
+ elm_object_domain_translatable_text_set(pPopUpHandle, VIDEOS_STRING,
+ VIDEOS_DELETEPOP_MSG_THIS_FOLDER_WILL_BE_DELETED_IDS);
pButton = elm_button_add(pPopUpHandle);
elm_object_domain_translatable_text_set(pButton, VIDEOS_STRING,
- VIDEOS_COMMON_BUTTON_CANCEL_IDS);
+ VIDEOS_COMMON_BUTTON_CANCEL_IDS);
elm_object_style_set(pButton, "popup_button/default");
elm_object_part_content_set(pPopUpHandle, "button1", pButton);
if (PopupCancelButtonCallbackFunc) {
evas_object_smart_callback_add(pButton, "clicked",
- PopupCancelButtonCallbackFunc,
- pUserData);
+ PopupCancelButtonCallbackFunc,
+ pUserData);
}
pButton = elm_button_add(pPopUpHandle);
elm_object_domain_translatable_text_set(pButton, VIDEOS_STRING,
- VIDEOS_DELETEPOP_BUTTON_DELETE);
+ VIDEOS_DELETEPOP_BUTTON_DELETE);
elm_object_style_set(pButton, "popup_button/default");
elm_object_part_content_set(pPopUpHandle, "button2", pButton);
if (PopupDeleteButtonCallbackFunc) {
evas_object_smart_callback_add(pButton, "clicked",
- PopupDeleteButtonCallbackFunc,
- pUserData);
+ PopupDeleteButtonCallbackFunc,
+ pUserData);
}
if (PopupHWMouseBackUpCbFunc) {
evas_object_event_callback_add(pPopUpHandle,
- EVAS_CALLBACK_MOUSE_UP,
- PopupHWMouseBackUpCbFunc,
- pUserData);
- }
-
- if (PopupHWKeyBackCbFunc) {
- /*evas_object_event_callback_add(pPopUpHandle, EVAS_CALLBACK_KEY_DOWN, PopupHWKeyBackCbFunc, pUserData);*/
+ EVAS_CALLBACK_MOUSE_UP,
+ PopupHWMouseBackUpCbFunc,
+ pUserData);
}
evas_object_show(pPopUpHandle);
bool mp_util_download_question_popup(void *pUserData, char *szTitle,
- char *szContents,
- void *PopupCancelBtnCallbackFunc,
- void *PopupDownloadBtnCallbackFunc)
+ char *szContents,
+ void *PopupCancelBtnCallbackFunc,
+ void *PopupDownloadBtnCallbackFunc)
{
Evas_Object *pButton = NULL;
pPopUpHandle = elm_popup_add(mp_util_get_main_window_handle());
evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
if (szContents)
elm_object_text_set(pPopUpHandle, szContents);
pButton = elm_button_add(pPopUpHandle);
elm_object_domain_translatable_text_set(pButton, VIDEOS_STRING,
- VIDEOS_COMMON_BUTTON_CANCEL_IDS);
+ VIDEOS_COMMON_BUTTON_CANCEL_IDS);
elm_object_style_set(pButton, "popup");
elm_object_part_content_set(pPopUpHandle, "button1", pButton);
if (PopupCancelBtnCallbackFunc) {
evas_object_smart_callback_add(pButton, "clicked",
- PopupCancelBtnCallbackFunc,
- pUserData);
+ PopupCancelBtnCallbackFunc,
+ pUserData);
eext_object_event_callback_add(pPopUpHandle, EEXT_CALLBACK_BACK,
- PopupCancelBtnCallbackFunc, NULL);
+ PopupCancelBtnCallbackFunc, NULL);
}
pButton = elm_button_add(pPopUpHandle);
elm_object_domain_translatable_text_set(pButton, VIDEOS_STRING,
- VIDEOS_DELETEPOP_BUTTON_DELETE);
+ VIDEOS_DELETEPOP_BUTTON_DELETE);
elm_object_style_set(pButton, "popup");
elm_object_part_content_set(pPopUpHandle, "button2", pButton);
if (PopupDownloadBtnCallbackFunc) {
evas_object_smart_callback_add(pButton, "clicked",
- PopupDownloadBtnCallbackFunc,
- pUserData);
+ PopupDownloadBtnCallbackFunc,
+ pUserData);
}
evas_object_show(pPopUpHandle);
return TRUE;
}
-void mp_util_set_label_for_detail(Evas_Object *pBox, char *szString)
+void mp_util_set_label_for_detail(Evas_Object * pBox, char *szString)
{
Evas_Object *pLabel = NULL;
pLabel = elm_label_add(pBox);
elm_object_style_set(pLabel, "popup/default");
elm_object_text_set(pLabel, szString);
- /*elm_label_ellipsis_set(pLabel, EINA_TRUE);*/
elm_label_line_wrap_set(pLabel, EINA_TRUE);
elm_label_wrap_width_set(pLabel,
- VIDEO_POPUP_DETAIL_ITEM_W *
- elm_config_scale_get());
+ VIDEO_POPUP_DETAIL_ITEM_W *
+ elm_config_scale_get());
evas_object_size_hint_weight_set(pLabel, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_min_set(pLabel, VIDEO_POPUP_DETAIL_ITEM_W,
- 35 * elm_config_scale_get());
+ 35 * elm_config_scale_get());
elm_box_pack_end(pBox, pLabel);
evas_object_show(pLabel);
-/*
- pLabel = elm_entry_add(pPopUpHandle);
- elm_entry_editable_set(pLabel, EINA_FALSE);
- elm_object_focus_set(pLabel, EINA_FALSE);
- elm_object_disabled_set(pLabel, EINA_TRUE);
-
- elm_object_text_set(pLabel, szString);
- evas_object_size_hint_weight_set(pLabel, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(pLabel, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_box_pack_end(pBox, pLabel);
- evas_object_show(pLabel);
-*/
}
bool mp_util_progress_popup(char *szLabel)
pPopUpHandle = elm_popup_add(mp_util_get_main_window_handle());
eext_object_event_callback_add(pPopUpHandle, EEXT_CALLBACK_BACK,
- __mp_util_popup_back_cb, NULL);
+ __mp_util_popup_back_cb, NULL);
evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
Evas_Object *progressbar, *box, *label;
label = elm_label_add(pPopUpHandle);
elm_progressbar_pulse(progressbar, EINA_TRUE);
evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, 0.5);
evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
elm_progressbar_pulse(progressbar, EINA_TRUE);
evas_object_show(progressbar);
}
void *mp_util_create_button_icon(void *pParent, const char *szIconPath,
- bool bSizeUp, bool bSizeDown,
- int nAspectWidth, int nAspectHeight,
- void *pUserData, char *szButtonStyle,
- void *func)
+ bool bSizeUp, bool bSizeDown,
+ int nAspectWidth, int nAspectHeight,
+ void *pUserData, char *szButtonStyle,
+ void *func)
{
Evas_Object *pButton = NULL;
Evas_Object *pIcon = NULL;
pButton = elm_button_add(pParent);
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_IMAGE_NAME_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_IMAGE_NAME_EDJ);
free(path);
if (szIconPath) {
pIcon = elm_icon_add(pParent);
- elm_image_file_set(pIcon, edj_path,
- szIconPath);
+ elm_image_file_set(pIcon, edj_path, szIconPath);
evas_object_size_hint_aspect_set(pIcon,
- EVAS_ASPECT_CONTROL_NEITHER,
- nAspectWidth, nAspectHeight);
+ EVAS_ASPECT_CONTROL_NEITHER,
+ nAspectWidth, nAspectHeight);
}
if (szButtonStyle) {
if (func) {
evas_object_smart_callback_add(pButton, "clicked", func,
- (void *) pUserData);
+ (void *) pUserData);
}
elm_object_focus_allow_set(pButton, EINA_FALSE);
evas_object_size_hint_weight_set(pButton, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_show(pButton);
return (void *) pButton;
}
void *mp_util_create_style_button(void *pParent, const char *szButtonText,
- const void *pUserData,
- char *szButtonStyle, void *func)
+ const void *pUserData,
+ char *szButtonStyle, void *func)
{
Evas_Object *pButton = NULL;
if (func) {
evas_object_smart_callback_add(pButton, "clicked", func,
- pUserData);
+ pUserData);
}
elm_object_focus_allow_set(pButton, EINA_FALSE);
evas_object_size_hint_weight_set(pButton, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_show(pButton);
return (void *) pButton;
telephony_handle_list_s tel_list;
int tel_valid = telephony_init(&tel_list);
if (tel_valid != TELEPHONY_ERROR_NONE) {
- VideoLogError("telephony is not initialized. ERROR Code is %d",tel_valid);
+ VideoLogError("telephony is not initialized. ERROR Code is %d",
+ tel_valid);
return TRUE;
}
telephony_h *newhandle = tel_list.handle;
- int s = telephony_call_get_voice_call_state(*newhandle , &state );
+ int s = telephony_call_get_voice_call_state(*newhandle, &state);
telephony_deinit(&tel_list);
if (s == TELEPHONY_ERROR_NONE) {
return FALSE;
}
} else {
- VideoLogError("ERROR: state error is %d",s);
+ VideoLogError("ERROR: state error is %d", s);
}
return TRUE;
}
if (strstr(uri, MP_UTIL_FILE_PREFIX)) {
if (!g_file_test
- (uri + strlen(MP_UTIL_FILE_PREFIX),
- G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) {
+ (uri + strlen(MP_UTIL_FILE_PREFIX),
+ G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) {
return FALSE;
}
return TRUE;
} else {
- if (!g_file_test
- (uri, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) {
+ if (!g_file_test(uri, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) {
return FALSE;
}
return TRUE;
{
int nCount = 0;
- char *pTmp = (char *)calloc(1, sizeof(char) * FILE_SIZE_LEN_MAX + 1);
+ char *pTmp = (char *) calloc(1, sizeof(char) * FILE_SIZE_LEN_MAX + 1);
if (!pTmp) {
return NULL;
}
if (nCount == SIZE_BYTE) {
snprintf(pTmp, FILE_SIZE_LEN_MAX, "%0.1lf%s", nSize_t,
- VIDEOS_DETAILVIEW_BODY_B);
+ VIDEOS_DETAILVIEW_BODY_B);
} else if (nCount == SIZE_KB) {
snprintf(pTmp, FILE_SIZE_LEN_MAX, "%0.1lf%s", nSize_t,
- VIDEOS_DETAILVIEW_BODY_KB);
+ VIDEOS_DETAILVIEW_BODY_KB);
} else if (nCount == SIZE_MB) {
snprintf(pTmp, FILE_SIZE_LEN_MAX, "%0.1lf%s", nSize_t,
- VIDEOS_DETAILVIEW_BODY_MB);
+ VIDEOS_DETAILVIEW_BODY_MB);
} else if (nCount == SIZE_GB) {
snprintf(pTmp, FILE_SIZE_LEN_MAX, "%0.1lf%s", nSize_t,
- VIDEOS_DETAILVIEW_BODY_GB);
+ VIDEOS_DETAILVIEW_BODY_GB);
} else {
- snprintf(pTmp, FILE_SIZE_LEN_MAX, "%zu%s", (size_t)0,
- VIDEOS_DETAILVIEW_BODY_MB);
+ snprintf(pTmp, FILE_SIZE_LEN_MAX, "%zu%s", (size_t) 0,
+ VIDEOS_DETAILVIEW_BODY_MB);
}
return pTmp;
}
bool mp_util_get_file_title_from_file_path(char *szFilepath,
- char *szTitle,
- int nLengthTitle)
+ char *szTitle, int nLengthTitle)
{
if (!szFilepath || !szTitle) {
VideoLogError("[ERR]");
} else {
szTitleName = (char *) szFilePath;
}
- if (!szTitleName) {
- VideoLogError("Invalid buffer");
- return NULL;
- }
szFile = calloc(1, strlen(szTitleName) + 1);
if (szFile) {
strncpy(szFile, szTitleName, strlen(szTitleName));
}
char *mp_util_get_display_name_from_path_and_title(const char *szFilePath,
- const char *szTitle)
+ const char *szTitle)
{
if (!szFilePath || !szTitle) {
VideoLogError("File Path is NULL");
szDisplayName = calloc(1, nLength);
if (szDisplayName) {
if (szExt) {
- snprintf(szDisplayName, nLength, "%s%s", szTitle,
- szExt);
+ snprintf(szDisplayName, nLength, "%s%s", szTitle, szExt);
} else {
snprintf(szDisplayName, nLength, "%s", szTitle);
}
}
bool mp_util_get_icon_path_from_thumbnail(const char *szMediaURL,
- char **szIconURL)
+ char **szIconURL)
{
if (!szMediaURL) {
VideoLogError("szMediaURL is NULL");
if (nLen == 4) {
if (vp_file_exists(szMediaURL)) {
- VideoLogWarning("Success finding icon file. - %s",
- szMediaURL);
+ VideoLogWarning("Success finding icon file. - %s", szMediaURL);
*szIconURL = strdup(szMediaURL);
}
return TRUE;
char *szCheckFilePath = NULL;
nOutputLen = strlen(szMediaURL) + 5;
- szCheckFilePath = calloc(1, sizeof(char)*nOutputLen);
+ szCheckFilePath = calloc(1, sizeof(char) * nOutputLen);
if (szCheckFilePath) {
nStrLength = strlen(szMediaURL);
VideoLogWarning("%s", szCheckFilePath);
if (vp_file_exists(szCheckFilePath)) {
- VideoLogWarning("Success finding icon file. - %d, %s", nCount,
- szCheckFilePath);
+ VideoLogWarning("Success finding icon file. - %d, %s",
+ nCount, szCheckFilePath);
*szIconURL = strdup(szCheckFilePath);
break;
}
}
void mp_util_convert_time(int nVideoTime, char *szRetTime,
- bool bIsHideHour)
+ bool bIsHideHour)
{
if (!szRetTime) {
VideoLogError("[ERR] No exist szRetTime pointer.");
if (bIsHideHour) {
if (nHour) {
snprintf(szRetTime, STR_LEN_MAX - 1, "%02d:%02d:%02d", nHour,
- nMin, nSec);
+ nMin, nSec);
} else {
snprintf(szRetTime, STR_LEN_MAX - 1, "00:%02d:%02d", nMin,
- nSec);
+ nSec);
}
} else {
snprintf(szRetTime, STR_LEN_MAX - 1, "%02d:%02d:%02d", nHour,
- nMin, nSec);
+ nMin, nSec);
}
szRetTime[strlen(szRetTime)] = '\0';
}
void mp_util_convert_sec_time(int nVideoTime, char *szRetTime,
- bool bIsHideHour)
+ bool bIsHideHour)
{
if (!szRetTime) {
VideoLogError("[ERR] No exist szRetTime pointer.");
if (bIsHideHour) {
if (nHour) {
snprintf(szRetTime, STR_LEN_MAX - 1, "%02d:%02d:%02d", nHour,
- nMin, nSec);
+ nMin, nSec);
} else {
snprintf(szRetTime, STR_LEN_MAX - 1, "%02d:%02d", nMin, nSec);
}
} else {
snprintf(szRetTime, STR_LEN_MAX - 1, "%02d:%02d:%02d", nHour,
- nMin, nSec);
+ nMin, nSec);
}
szRetTime[strlen(szRetTime)] = '\0';
}
void mp_util_toast_popup_clicked_cb(void *pUserData,
- Evas_Object *pObject,
- void *event_info)
+ Evas_Object * pObject,
+ void *event_info)
{
evas_object_del(pObject);
}
void mp_util_toast_popup_timeout_cb(void *pUserData,
- Evas_Object *pObject,
- void *event_info)
+ Evas_Object * pObject,
+ void *event_info)
{
evas_object_del(pObject);
}
bool mp_util_ticker_toast_popup(const char *text, bool info_style,
- bool bottom)
+ bool bottom)
{
if (!text) {
return false;
/*************************************************************************************
* app control infomaiton
* Key Value Description
- * 0 "default", "info" Tickernoti style, (default: "default")
+ * 0 "default", "info" Tickernoti style, (default: "default")
* 1 "text" Text to use for the tickernoti description
* 2 "0", "1" Orientation of tickernoti. (0: top, 1:bottom, default: top)
* 3 "1", "2", �� ,"999" Timeout (1: 1 second, default: -1 means infinite)
*************************************************************************************/
- /*
- int nRet = 0;
-
- nRet = notification_status_message_post(text);
- if (nRet != NOTIFICATION_ERROR_NONE) {
- VideoLogError("# tickernoti [%s] error : [%d]#", text, nRet);
- return false;
- }
- */
Evas_Object *pToastPopup = NULL;
Evas_Object *pWindow = mp_util_get_main_window_handle();
pToastPopup = elm_popup_add(pWindow);
elm_popup_align_set(pToastPopup, ELM_NOTIFY_ALIGN_FILL, 1.0);
evas_object_size_hint_weight_set(pToastPopup, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
eext_object_event_callback_add(pToastPopup, EEXT_CALLBACK_BACK,
- eext_popup_back_cb, NULL);
+ eext_popup_back_cb, NULL);
elm_object_text_set(pToastPopup, text);
evas_object_smart_callback_add(pToastPopup, "block,clicked",
- mp_util_toast_popup_clicked_cb,
- pWindow);
+ mp_util_toast_popup_clicked_cb,
+ pWindow);
elm_popup_timeout_set(pToastPopup, 2.0);
evas_object_smart_callback_add(pToastPopup, "timeout",
- mp_util_toast_popup_timeout_cb, NULL);
+ mp_util_toast_popup_timeout_cb, NULL);
evas_object_show(pToastPopup);
}
bool mp_util_ticker_toast_with_timeout_cb_popup(const char *text,
- Evas_Smart_Cb
- timeout_func)
+ Evas_Smart_Cb timeout_func)
{
if (!text) {
return false;
pToastPopup = elm_popup_add(pWindow);
elm_popup_align_set(pToastPopup, ELM_NOTIFY_ALIGN_FILL, 1.0);
evas_object_size_hint_weight_set(pToastPopup, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
eext_object_event_callback_add(pToastPopup, EEXT_CALLBACK_BACK,
- eext_popup_back_cb, NULL);
+ eext_popup_back_cb, NULL);
elm_object_text_set(pToastPopup, text);
evas_object_smart_callback_add(pToastPopup, "block,clicked",
- mp_util_toast_popup_clicked_cb,
- pWindow);
+ mp_util_toast_popup_clicked_cb,
+ pWindow);
elm_popup_timeout_set(pToastPopup, 2.0);
evas_object_smart_callback_add(pToastPopup, "timeout", timeout_func,
- NULL);
+ NULL);
evas_object_show(pToastPopup);
connection_destroy(connection);
if (err != CONNECTION_ERROR_NONE) {
- VideoLogWarning("connection_get_type error. err is [%d]",
- err);
+ VideoLogWarning("connection_get_type error. err is [%d]", err);
bSuccessful = false;
}
VideoLogInfo("net_state is [%d]", net_state);
if (!strncmp(dir_path, MP_UTIL_PHONE_PATH, strlen(MP_UTIL_PHONE_PATH))) {
head_dir = MP_UTIL_PHONE_PATH;
location = VIDEOS_FOLDERVIEW_BODY_DEVICE_MEMORY;
- } else if (!strncmp(dir_path, MP_UTIL_SD_PATH, strlen(MP_UTIL_SD_PATH))) {
+ } else
+ if (!strncmp(dir_path, MP_UTIL_SD_PATH, strlen(MP_UTIL_SD_PATH))) {
head_dir = MP_UTIL_SD_PATH;
location = VIDEOS_FOLDERVIEW_BODY_SD_CARD;
} else if (!strncmp
- (dir_path, MP_UTIL_USB_PATH, strlen(MP_UTIL_USB_PATH))) {
+ (dir_path, MP_UTIL_USB_PATH, strlen(MP_UTIL_USB_PATH))) {
head_dir = MP_UTIL_USB_PATH;
location = VIDEOS_FOLDERVIEW_BODY_USB_MEMORY;
} else {
MP_FREE_STRING(result);
result =
g_strdup_printf("/%s/%s", location,
- (file_path + location_index));
+ (file_path + location_index));
}
VideoLogInfo("dir_path=%s, resul=%s", dir_path, result);
result = strdup(VIDEO_LIST_VIEW_ICON_FOLDER_SDCARD);
} else if (!strncmp
- (dir_path, MP_UTIL_USB_PATH, strlen(MP_UTIL_USB_PATH))) {
+ (dir_path, MP_UTIL_USB_PATH,
+ strlen(MP_UTIL_USB_PATH))) {
if (result) {
free(result);
result = NULL;
}
int mp_util_rename_file(const char *old_path, const char *new_path,
- char **szNewestPath)
+ char **szNewestPath)
{
int nCount = 0;
char *szNewPath = NULL;
szNewPathTmp = g_strdup(new_path);
}
- /*rename new file when name is existed*/
+ /*rename new file when name is existed */
while (__mp_util_is_file_exist(szNewPath) == 0) {
nCount++;
MP_FREE_STRING(szNewPath);
#ifdef ENABLE_DRM_FEATURE
-bool mp_util_check_drm_lock(const char *szMediaURL, bool *bLock)
+bool mp_util_check_drm_lock(const char *szMediaURL, bool * bLock)
{
if (!szMediaURL) {
VideoLogError("szMediaURL is NULL");
}
}
- if (vp_drm_is_playready_drm_file
- (szMediaURL, &bIsPlayReadyDRM)) {
+ if (vp_drm_is_playready_drm_file(szMediaURL, &bIsPlayReadyDRM)) {
if (bIsPlayReadyDRM) {
*bLock = TRUE;
}
return szTitle;
}
-int mp_util_rename_the_same_file(const char *old_path,
- char **szNewestPath)
+int mp_util_rename_the_same_file(const char *old_path, char **szNewestPath)
{
int nCount = 0;
char *szNewPath = NULL;
szNewPathTmp = g_strdup(old_path);
}
- /*rename new file when name is existed*/
+ /*rename new file when name is existed */
while (__mp_util_is_file_exist(szNewPath) == 0) {
nCount++;
MP_FREE_STRING(szNewPath);
int nOutputLen = 0;
char *szExt = NULL;
- char szExtWildkey[6][5] = {".srt", ".sub", ".smi", ".SRT", ".SUB",
- ".SMI" };
+ char szExtWildkey[6][5] = { ".srt", ".sub", ".smi", ".SRT", ".SUB",
+ ".SMI"
+ };
char *szCheckFilePath = NULL;
*szSubtitle = NULL;
nOutputLen = strlen(szMediaURL) + 5;
- szCheckFilePath = calloc(1, sizeof(char)*nOutputLen);
+ szCheckFilePath = calloc(1, sizeof(char) * nOutputLen);
if (!szCheckFilePath) {
VideoLogError("faile dto allocate memory");
return FALSE;
strncat(szCheckFilePath, szExtWildkey[nCount], 5);
if (!stat(szCheckFilePath, &buf)) {
VideoLogWarning("Success finding subtitle file. - %d, %s",
- nCount, szCheckFilePath);
+ nCount, szCheckFilePath);
*szSubtitle = g_strdup(szCheckFilePath);
break;
}
}
bool mp_util_get_file_size_by_path(const char *szMediaURL,
- unsigned long long *nSize)
+ unsigned long long *nSize)
{
if (!szMediaURL) {
VideoLogError("szMediaURL is NULL");
return TRUE;
}
-Evas_Object *mp_util_create_preload_image(Evas_Object *parent,
- const char *path,
- int nIconWidth)
+Evas_Object *mp_util_create_preload_image(Evas_Object * parent,
+ const char *path, int nIconWidth)
{
if (!parent || !path) {
VideoLogError("Invalid parent");
return thumb;
}
-Evas_Object *mp_util_create_wall_preload_image(Evas_Object *parent,
- int nIconWidth)
+Evas_Object *mp_util_create_wall_preload_image(Evas_Object * parent,
+ int nIconWidth)
{
if (!parent) {
VideoLogError("Invalid parent");
return thumb;
}
-bool mp_util_get_image_size(Evas_Object *pParent, const char *szMediaURL,
- int *nWidth, int *nHeight)
+bool mp_util_get_image_size(Evas_Object * pParent, const char *szMediaURL,
+ int *nWidth, int *nHeight)
{
if (!szMediaURL || !pParent) {
VideoLogError("szMediaURL or pParent is NULL");
unsigned int nDuration = 0;
char *szTitle = NULL;
mp_util_svc_get_video_detail_by_video_url(szFilePath, &nWidth,
- &nHeight, &szTitle,
- &nDuration, &nPosition);
+ &nHeight, &szTitle,
+ &nDuration, &nPosition);
MP_FREE_STRING(szTitle);
if (nPosition == 0) {
g_strdup_printf("%s/%s.jpg", VIDEO_THUMB_DATA_DIR, szVideoID);
mp_util_svc_get_frame_by_position(szFilePath, szFileName, nPosition,
- nWidth, nHeight);
+ nWidth, nHeight);
VideoLogInfo("szFileName %s", szFileName);
MP_FREE_STRING(szVideoID);
}
static void
-__mp_util_progress_resize_cb(void *data, Evas *e, Evas_Object *obj,
- void *event_info)
+__mp_util_progress_resize_cb(void *data, Evas * e, Evas_Object * obj,
+ void *event_info)
{
int w = 0;
int h = 0;
}
evas_object_geometry_get(mp_util_get_main_window_handle(), NULL, NULL,
- &w, &h);
+ &w, &h);
evas_object_resize((Evas_Object *) data, w, h);
}
static void
-__mp_util_progress_del_cb(void *data, Evas *e, Evas_Object *obj,
- void *event_info)
+__mp_util_progress_del_cb(void *data, Evas * e, Evas_Object * obj,
+ void *event_info)
{
if (!obj) {
VideoLogError("obj = NULL !!!");
}
evas_object_event_callback_del(mp_util_get_main_window_handle(),
- EVAS_CALLBACK_RESIZE,
- __mp_util_progress_resize_cb);
+ EVAS_CALLBACK_RESIZE,
+ __mp_util_progress_resize_cb);
evas_object_event_callback_del(obj, EVAS_CALLBACK_RESIZE,
- __mp_util_progress_del_cb);
+ __mp_util_progress_del_cb);
}
int w = 0;
int h = 0;
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_POPUP_PROGRESSBAR_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_POPUP_PROGRESSBAR_EDJ);
free(path);
layout = elm_layout_add(mp_util_get_main_window_handle());
Eina_Bool r = FALSE;
- r = elm_layout_file_set(layout, edj_path,
- "popup_embeded_processing");
+ r = elm_layout_file_set(layout, edj_path, "popup_embeded_processing");
if (!r) {
evas_object_del(layout);
VideoLogError("layout = NULL !!!");
return NULL;
}
evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(layout, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_geometry_get(mp_util_get_main_window_handle(), NULL, NULL,
- &w, &h);
+ &w, &h);
evas_object_resize(layout, w, h);
evas_object_event_callback_add(mp_util_get_main_window_handle(),
- EVAS_CALLBACK_RESIZE,
- __mp_util_progress_resize_cb,
- (const void *) layout);
+ EVAS_CALLBACK_RESIZE,
+ __mp_util_progress_resize_cb,
+ (const void *) layout);
evas_object_event_callback_add(layout, EVAS_CALLBACK_DEL,
- __mp_util_progress_del_cb,
- (const void *) layout);
+ __mp_util_progress_del_cb,
+ (const void *) layout);
evas_object_show(layout);
elm_progressbar_pulse(progressbar, EINA_TRUE);
evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, 0.5);
evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_show(progressbar);
elm_object_part_content_set(layout, "elm.swallow.content",
- progressbar);
+ progressbar);
evas_object_propagate_events_set(layout, EINA_FALSE);
return layout;
}
-void mp_util_destroy_embedded_progress(Evas_Object *pProgress)
+void mp_util_destroy_embedded_progress(Evas_Object * pProgress)
{
if (!pProgress) {
VideoLogError("pProgress == NULL");
}
bool mp_util_meta_get_width_and_height(const char *szFilePath,
- int *nWidth, int *nHeight)
+ int *nWidth, int *nHeight)
{
if (!szFilePath) {
VideoLogError("szFilePath is NULL");
nRet =
metadata_extractor_get_metadata(pMetadata, METADATA_VIDEO_WIDTH,
- &szWidth);
+ &szWidth);
if (nRet != METADATA_EXTRACTOR_ERROR_NONE) {
VideoLogError("metadata_extractor_get_metadata is fail : 0x%x",
- nRet);
+ nRet);
goto Exception;
}
nRet =
metadata_extractor_get_metadata(pMetadata, METADATA_VIDEO_HEIGHT,
- &szHeight);
+ &szHeight);
if (nRet != METADATA_EXTRACTOR_ERROR_NONE) {
VideoLogError("metadata_extractor_get_metadata is fail : 0x%x",
- nRet);
+ nRet);
goto Exception;
}
if (szWidth) {
}
return TRUE;
-Exception:
+ Exception:
MP_FREE_STRING(szWidth);
MP_FREE_STRING(szHeight);
return TRUE;
}
-Evas_Object *mp_util_create_gengrid(Evas_Object *parent, int nWidth,
- int nHeight, bool bHorizontal)
+Evas_Object *mp_util_create_gengrid(Evas_Object * parent, int nWidth,
+ int nHeight, bool bHorizontal)
{
Evas_Object *pGengrid = elm_gengrid_add(parent);
if (!pGengrid) {
return NULL;
}
evas_object_size_hint_weight_set(pGengrid, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pGengrid, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
elm_gengrid_item_size_set(pGengrid, nWidth, nHeight);
elm_gengrid_align_set(pGengrid, 0.0, 0.0);
elm_gengrid_horizontal_set(pGengrid, bHorizontal);
}
Evas_Object *mp_util_create_folder_icon(void *pParent,
- const char *icon_path)
+ const char *icon_path)
{
if (!pParent || !icon_path) {
VideoLogError("invalid parent and icon path");
return NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_IMAGE_NAME_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_IMAGE_NAME_EDJ);
free(path);
Evas_Object *pIcon = elm_image_add(pParent);
- elm_image_file_set(pIcon, edj_path,
- (const char *) icon_path);
- evas_object_size_hint_align_set(pIcon, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ elm_image_file_set(pIcon, edj_path, (const char *) icon_path);
+ evas_object_size_hint_align_set(pIcon, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pIcon, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
if (!g_strcmp0(VIDEO_LIST_VIEW_ICON_FOLDER_DROPBOX, icon_path)) {
evas_object_color_set(pIcon, 50, 129, 194, 255);
} else {
MpMediaStorageType storageType =
mp_util_svc_get_folder_storage(nVideoFolderIndex);
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_IMAGE_NAME_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_IMAGE_NAME_EDJ);
free(path);
if (storageType == MP_MEDIA_TYPE_STORAGE_INTERNAL) {
elm_image_file_set(pIcon, edj_path,
- VIDEO_LIST_VIEW_ICON_FOLDER_PHONE);
+ VIDEO_LIST_VIEW_ICON_FOLDER_PHONE);
elm_image_file_set(pSubIcon, edj_path,
- VIDEO_LIST_VIEW_ICON_FOLDER_PHONE_EF);
+ VIDEO_LIST_VIEW_ICON_FOLDER_PHONE_EF);
} else if (storageType == MP_MEDIA_TYPE_STORAGE_DROPBOX) {
elm_image_file_set(pIcon, edj_path,
- VIDEO_LIST_VIEW_ICON_FOLDER_DROPBOX);
+ VIDEO_LIST_VIEW_ICON_FOLDER_DROPBOX);
elm_image_file_set(pSubIcon, edj_path,
- VIDEO_LIST_VIEW_ICON_FOLDER_DROPBOX_EF);
+ VIDEO_LIST_VIEW_ICON_FOLDER_DROPBOX_EF);
} else if (storageType == MP_MEDIA_TYPE_STORAGE_EXTERNAL) {
} else {
VideoLogInfo("Unknown Storage type or not folder item.");
return FALSE;
}
- evas_object_size_hint_align_set(pIcon, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ evas_object_size_hint_align_set(pIcon, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pIcon, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pSubIcon, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pSubIcon, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
elm_layout_content_set(pTempLayout, "elm.folder.icon", pIcon);
elm_layout_content_set(pTempLayout, "elm.folder.icon.ef", pSubIcon);
evas_object_show(pIcon);
evas_object_show(pSubIcon);
- /* if (!pLayout)*/
- /* return FALSE;*/
-
return TRUE;
}
MpMediaStorageType storageType =
mp_util_svc_get_video_storage(nVideoItemIndex);
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_IMAGE_NAME_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_IMAGE_NAME_EDJ);
free(path);
if (storageType == MP_MEDIA_TYPE_STORAGE_DROPBOX) {
elm_image_file_set(pIcon, edj_path,
- VIDEO_LIST_VIEW_ICON_FOLDER_DROPBOX);
+ VIDEO_LIST_VIEW_ICON_FOLDER_DROPBOX);
elm_image_file_set(pSubIcon, edj_path,
- VIDEO_LIST_VIEW_ICON_FOLDER_DROPBOX_EF);
+ VIDEO_LIST_VIEW_ICON_FOLDER_DROPBOX_EF);
} else if (storageType == MP_MEDIA_TYPE_STORAGE_EXTERNAL) {
} else {
VideoLogInfo
- ("Unknown storage or internal storage item. nVideoItemIndex: %d.",
- nVideoItemIndex);
+ ("Unknown storage or internal storage item. nVideoItemIndex: %d.",
+ nVideoItemIndex);
return FALSE;
}
- evas_object_size_hint_align_set(pIcon, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ evas_object_size_hint_align_set(pIcon, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pIcon, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pSubIcon, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pSubIcon, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
elm_layout_content_set(pTempLayout, "elm.folder.icon", pIcon);
elm_layout_content_set(pTempLayout, "elm.folder.icon.ef", pSubIcon);
evas_object_show(pIcon);
evas_object_show(pSubIcon);
- /*Prevent fix*/
- /*if (!pLayout)
- return FALSE;
- */
+
return TRUE;
}
unsigned long long mp_util_get_disk_available_space(const char
- *szFilePath)
+ *szFilePath)
{
if (!szFilePath) {
VideoLogError("szFilePath is NULL");
int nRet = 0;
struct statvfs info;
if (szFilePath
- && 0 == strncmp(szFilePath, MP_UTIL_SD_PATH,
- strlen(MP_UTIL_SD_PATH))) {
+ && 0 == strncmp(szFilePath, MP_UTIL_SD_PATH,
+ strlen(MP_UTIL_SD_PATH))) {
if (-1 == statvfs(MP_UTIL_SD_PATH, &info)) {
return 0;
}
}
}
- return (info.f_bsize) * ((unsigned long long)info.f_bavail);
+ return (info.f_bsize) * ((unsigned long long) info.f_bavail);
}
void mp_util_virtual_keypad_disabled_set(Eina_Bool bDisabled)
if (bDisabled) {
VideoLogInfo("Virtual keypad will not compress the layout.");
elm_object_signal_emit(pMainConformant,
- "elm,state,clipboard,disable", "");
+ "elm,state,clipboard,disable", "");
elm_object_signal_emit(pMainConformant,
- "elm,state,virtualkeypad,disable", "");
+ "elm,state,virtualkeypad,disable", "");
} else {
VideoLogInfo("Virtual keypad will compress the layout.");
elm_object_signal_emit(pMainConformant,
- "elm,state,clipboard,enable", "");
+ "elm,state,clipboard,enable", "");
elm_object_signal_emit(pMainConformant,
- "elm,state,virtualkeypad,enable", "");
+ "elm,state,virtualkeypad,enable", "");
}
}
-int mp_util_set_translate_str(Evas_Object *obj, const char *str)
+int mp_util_set_translate_str(Evas_Object * obj, const char *str)
{
if (!obj || !str) {
VideoLogError("[ERR] Invalid input data.");
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <metadata_extractor.h>
#include "mp-video-string-define.h"
#include "utils_i18n.h"
-enum VIDEO_PLAYER_FILE_SIZE_TYPE
-{
+enum VIDEO_PLAYER_FILE_SIZE_TYPE {
SIZE_BYTE = 0,
SIZE_KB,
SIZE_MB,
SIZE_GB
};
-bool mp_info_ctrl_get_gps(char *szUriPath, double *dLongitude, double *dLatitude)
+bool mp_info_ctrl_get_gps(char *szUriPath, double *dLongitude,
+ double *dLatitude)
{
if (!szUriPath) {
VideoLogInfo("[ERR] No exist szUriPath.");
*dLatitude = 0.0;
*dLongitude = 0.0;
- if (metadata_extractor_create(&pMetadata) != METADATA_EXTRACTOR_ERROR_NONE)
- {
+ if (metadata_extractor_create(&pMetadata) !=
+ METADATA_EXTRACTOR_ERROR_NONE) {
VideoLogInfo("[ERR] - metadata_extractor_create()");
goto Execption;
}
- if (metadata_extractor_set_path(pMetadata, szUriPath) != METADATA_EXTRACTOR_ERROR_NONE)
- {
+ if (metadata_extractor_set_path(pMetadata, szUriPath) !=
+ METADATA_EXTRACTOR_ERROR_NONE) {
VideoLogInfo("[ERR] - metadata_extractor_set_path()");
goto Execption;
}
- if (metadata_extractor_get_metadata(pMetadata, METADATA_LATITUDE, &szTmp) != METADATA_EXTRACTOR_ERROR_NONE)
- {
- VideoLogInfo("[ERR] - metadata_extractor_get_metadata() - METADATA_LATITUDE");
+ if (metadata_extractor_get_metadata
+ (pMetadata, METADATA_LATITUDE,
+ &szTmp) != METADATA_EXTRACTOR_ERROR_NONE) {
+ VideoLogInfo
+ ("[ERR] - metadata_extractor_get_metadata() - METADATA_LATITUDE");
goto Execption;
- }
- else
- {
- if (szTmp)
- {
+ } else {
+ if (szTmp) {
VideoLogInfo("METADATA_LATITUDE : %s", szTmp);
*dLatitude = atof(szTmp);
free(szTmp);
szTmp = NULL;
- }
- else
- {
+ } else {
*dLatitude = 0.0;
}
}
- if (metadata_extractor_get_metadata(pMetadata, METADATA_LONGITUDE, &szTmp) != METADATA_EXTRACTOR_ERROR_NONE)
- {
- VideoLogInfo("[ERR] - metadata_extractor_get_metadata() - METADATA_LONGITUDE");
- if (szTmp)
- {
+ if (metadata_extractor_get_metadata
+ (pMetadata, METADATA_LONGITUDE,
+ &szTmp) != METADATA_EXTRACTOR_ERROR_NONE) {
+ VideoLogInfo
+ ("[ERR] - metadata_extractor_get_metadata() - METADATA_LONGITUDE");
+ if (szTmp) {
free(szTmp);
szTmp = NULL;
}
*dLongitude = 0.0;
goto Execption;
- }
- else
- {
- if (szTmp)
- {
+ } else {
+ if (szTmp) {
VideoLogInfo("METADATA_LONGITUDE : %s", szTmp);
*dLongitude = atof(szTmp);
free(szTmp);
szTmp = NULL;
- }
- else
- {
+ } else {
*dLongitude = 0.0;
}
}
- if (pMetadata)
- {
+ if (pMetadata) {
metadata_extractor_destroy(pMetadata);
pMetadata = NULL;
}
return TRUE;
-Execption:
- if (pMetadata)
- {
+ Execption:
+ if (pMetadata) {
metadata_extractor_destroy(pMetadata);
pMetadata = NULL;
}
return FALSE;
}
-bool mp_info_ctrl_get_resolution(char *szWidthResolution, char *szHeightResolution, void *pUserData)
+bool mp_info_ctrl_get_resolution(char *szWidthResolution,
+ char *szHeightResolution, void *pUserData)
{
- if (!pUserData)
- {
+ if (!pUserData) {
VideoLogError("[ERR] No exist pUserData.");
return FALSE;
}
-
// TO-DO : It is possible to get resolution size from media service.
return TRUE;
}
-static char *mp_info_ctrl_converting_string(const char *szLocale, const char *szCustomSkeleton, const char *szTimezone, UDate st_Date)
+static char *mp_info_ctrl_converting_string(const char *szLocale,
+ const char *szCustomSkeleton,
+ const char *szTimezone,
+ UDate st_Date)
{
-#define UG_ICU_ARR_LENGTH 256
+#define UG_ICU_ARR_LENGTH 256
// Copy a byte string encoded in the default codepage to a ustring.
// Copies at most n characters. The result will be null terminated if the length of src is less than n.
// Performs a host byte to UChar conversion.
- i18n_uchar ucustomSkeleton[UG_ICU_ARR_LENGTH] = {0,};
+ i18n_uchar ucustomSkeleton[UG_ICU_ARR_LENGTH] = { 0, };
- if (i18n_ustring_copy_ua_n(ucustomSkeleton, szCustomSkeleton, UG_ICU_ARR_LENGTH) == NULL) {
+ if (i18n_ustring_copy_ua_n
+ (ucustomSkeleton, szCustomSkeleton, UG_ICU_ARR_LENGTH) == NULL) {
VideoLogError("i18n_ustring_copy_au_n() error.");
return NULL;
}
- i18n_uchar utimezone[UG_ICU_ARR_LENGTH] = {0,};
+ i18n_uchar utimezone[UG_ICU_ARR_LENGTH] = { 0, };
- if (i18n_ustring_copy_ua_n(utimezone, szTimezone, UG_ICU_ARR_LENGTH) == NULL) {
+ if (i18n_ustring_copy_ua_n(utimezone, szTimezone, UG_ICU_ARR_LENGTH) ==
+ NULL) {
VideoLogError("i18n_ustring_copy_au_n() error.");
return NULL;
}
i18n_udatepg_h generator;
i18n_udate_format_h formatter;
- i18n_uchar bestPattern[UG_ICU_ARR_LENGTH] = {0,};
- i18n_uchar formatted[UG_ICU_ARR_LENGTH] = {0,};
- char formattedString[UG_ICU_ARR_LENGTH] = {0,};
+ i18n_uchar bestPattern[UG_ICU_ARR_LENGTH] = { 0, };
+ i18n_uchar formatted[UG_ICU_ARR_LENGTH] = { 0, };
+ char formattedString[UG_ICU_ARR_LENGTH] = { 0, };
int32_t bestPatternLength, formattedLength;
status = i18n_ucalendar_set_default_timezone(utimezone);
return NULL;
}
- status = i18n_udatepg_get_best_pattern(generator, ucustomSkeleton, i18n_ustring_get_length(ucustomSkeleton), bestPattern, UG_ICU_ARR_LENGTH, &bestPatternLength);
+ status =
+ i18n_udatepg_get_best_pattern(generator, ucustomSkeleton,
+ i18n_ustring_get_length
+ (ucustomSkeleton), bestPattern,
+ UG_ICU_ARR_LENGTH,
+ &bestPatternLength);
if (bestPatternLength <= 0 || status != I18N_ERROR_NONE) {
i18n_udatepg_destroy(generator);
return NULL;
}
- char buffer[UG_ICU_ARR_LENGTH] = {0,};
+ char buffer[UG_ICU_ARR_LENGTH] = { 0, };
i18n_ustring_copy_au(buffer, bestPattern);
VideoLogInfo("bestPattern = %s", buffer);
int i = 0;
int len = strlen(buffer);
for (i = 0; i < len; i++) {
- if (buffer[i] == 'K')// K is 0~11, it is used at japan icu
- {
- buffer[i] = 'h';// h is 1~12
+ if (buffer[i] == 'K') {// K is 0~11, it is used at japan icu
+ buffer[i] = 'h'; // h is 1~12
}
}
VideoLogInfo("buffer = %s", buffer);
- i18n_uchar ubestpattern[UG_ICU_ARR_LENGTH] = {0,};
- if (i18n_ustring_copy_ua_n(ubestpattern, buffer, UG_ICU_ARR_LENGTH) == NULL) {
+ i18n_uchar ubestpattern[UG_ICU_ARR_LENGTH] = { 0, };
+ if (i18n_ustring_copy_ua_n(ubestpattern, buffer, UG_ICU_ARR_LENGTH) ==
+ NULL) {
i18n_udatepg_destroy(generator);
VideoLogError("i18n_ustring_copy_au_n() error.");
return NULL;
}
- status = i18n_udate_create(I18N_UDATE_MEDIUM, I18N_UDATE_MEDIUM, szLocale, NULL, -1, ubestpattern, -1, &formatter);
+ status =
+ i18n_udate_create(I18N_UDATE_MEDIUM, I18N_UDATE_MEDIUM, szLocale,
+ NULL, -1, ubestpattern, -1, &formatter);
if (formatter == NULL || status != I18N_ERROR_NONE) {
i18n_udatepg_destroy(generator);
return NULL;
}
- status = i18n_udate_format_date(formatter, st_Date, formatted, UG_ICU_ARR_LENGTH, NULL, &formattedLength);
+ status =
+ i18n_udate_format_date(formatter, st_Date, formatted,
+ UG_ICU_ARR_LENGTH, NULL, &formattedLength);
if (formattedLength <= 0 || status != I18N_ERROR_NONE) {
i18n_udatepg_destroy(generator);
i18n_udate_destroy(formatter);
bool hours_24 = false;
int ret = -1;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, &hours_24);
- if (ret != SYSTEM_SETTINGS_ERROR_NONE)
- {
+ ret =
+ system_settings_get_value_bool
+ (SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, &hours_24);
+ if (ret != SYSTEM_SETTINGS_ERROR_NONE) {
VideoLogError("Cannot get 24 hours format");
return NULL;
}
- if (hours_24 == true)
- {
+ if (hours_24 == true) {
szSkeleton = UG_DATE_FORMAT_24;
- }
- else
- {
+ } else {
szSkeleton = UG_DATE_FORMAT_12;
}
char *szLocale = NULL; // eg en_US.UTF-8
- int retcode = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, &szLocale);
- if ((retcode != SYSTEM_SETTINGS_ERROR_NONE) || (szLocale == NULL))
- {
+ int retcode =
+ system_settings_get_value_string
+ (SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, &szLocale);
+ if ((retcode != SYSTEM_SETTINGS_ERROR_NONE) || (szLocale == NULL)) {
VideoLogInfo("Cannot get region format.");
- szLocale = strdup("en_US"); // Default value.
- }
- else
- {
+ szLocale = strdup("en_US"); // Default value.
+ } else {
char *find = strstr(szLocale, "UTF-8");
- if (find)
- {
+ if (find) {
int diff = find - szLocale;
- if (diff > 0)
- {
- szLocale[diff-1] = '\0';
+ if (diff > 0) {
+ szLocale[diff - 1] = '\0';
}
}
}
char *szTimezone = NULL;
- retcode = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE, &szTimezone);
- if ((retcode != SYSTEM_SETTINGS_ERROR_NONE) || (szTimezone == NULL))
- {
+ retcode =
+ system_settings_get_value_string
+ (SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE, &szTimezone);
+ if ((retcode != SYSTEM_SETTINGS_ERROR_NONE) || (szTimezone == NULL)) {
VideoLogError("Cannot get time zone.");
MP_FREE_STRING(szLocale);
return strdup("N/A");
}
- VideoLogInfo("Locale : %s TimeZone : %s TimeFormat : %s", szLocale, szSkeleton, szTimezone);
+ VideoLogInfo("Locale : %s TimeZone : %s TimeFormat : %s", szLocale,
+ szSkeleton, szTimezone);
char *szDatestr = NULL;
- szDatestr = mp_info_ctrl_converting_string(szLocale, szSkeleton, szTimezone, (UDate)mtime * 1000);
- if (!szDatestr)
- {
+ szDatestr =
+ mp_info_ctrl_converting_string(szLocale, szSkeleton, szTimezone,
+ (UDate) mtime * 1000);
+ if (!szDatestr) {
VideoLogError("Cannot get time string.");
MP_FREE_STRING(szLocale);
MP_FREE_STRING(szTimezone);
#ifdef ENABLE_DRM_FEATURE
static char *mp_info_ctrl_get_drm_file_extension(char *szPath)
{
-#define EXT_SIZE 128
+#define EXT_SIZE 128
#define EXT_SPLITTER '.'
if (!szPath) {
return NULL;
}
- char szDrmContentType[STR_LEN_MAX] = {0,};
+ char szDrmContentType[STR_LEN_MAX] = { 0, };
mp_drm_get_file_extension(szPath, szDrmContentType, STR_LEN_MAX);
VideoLogInfo("szDrmContentType : %s", szDrmContentType);
- char **dTempExt = NULL;
- char *szExt = NULL;
- char *pFileExtention = NULL;
+ char **dTempExt = NULL;
+ char *szExt = NULL;
+ char *pFileExtention = NULL;
- int nArrayLen = 0;
- int nErr = -1;
+ int nArrayLen = 0;
+ int nErr = -1;
- nErr = mime_type_get_file_extension(szDrmContentType, &dTempExt, &nArrayLen);
+ nErr =
+ mime_type_get_file_extension(szDrmContentType, &dTempExt,
+ &nArrayLen);
if (nErr == MIME_TYPE_ERROR_NONE && nArrayLen > 0) {
- if (dTempExt[0] != NULL)
- {
+ if (dTempExt[0] != NULL) {
szExt = strrchr(dTempExt[0], EXT_SPLITTER);
}
- if (szExt != NULL && szExt + 1 != NULL)
- {
- pFileExtention = strdup(szExt + 1);
+ if (szExt != NULL && szExt + 1 != NULL) {
+ pFileExtention = strdup(szExt + 1);
}
}
int i = 0;
- for (; i < nArrayLen; i++)
- {
+ for (; i < nArrayLen; i++) {
MP_FREE_STRING(dTempExt[i]);
}
#ifdef ENABLE_DRM_FEATURE
if (mp_drm_is_drm_file(szPath)) {
- char *szFileExtension = mp_info_ctrl_get_drm_file_extension(szPath);
+ char *szFileExtension =
+ mp_info_ctrl_get_drm_file_extension(szPath);
if (szFileExtension) {
VideoLogInfo("Drm file extension. - %s", szFileExtension);
return szFileExtension;
char *szExt = NULL;
szExt = strrchr(szPath, '.');
- if ((szExt != NULL) && ((szExt+1) != NULL)) {
+ if ((szExt != NULL) && ((szExt + 1) != NULL)) {
return strdup(szExt + 1);
}
}
return strdup("Unknown");
}
-bool mp_info_ctrl_get_file_info(char *szUriPath, char *szFileDate, int nFileDateSize, char *szFileExtension, int nFileExtensionSize, char *szFileSize, int nFilesizeSize)
+bool mp_info_ctrl_get_file_info(char *szUriPath, char *szFileDate,
+ int nFileDateSize, char *szFileExtension,
+ int nFileExtensionSize, char *szFileSize,
+ int nFilesizeSize)
{
if (!szUriPath) {
VideoLogInfo("[ERR] No exist szUriPath.");
memset(szFileExtension, 0, nFileExtensionSize);
memset(szFileSize, 0, nFilesizeSize);
- char *szTmpDateOfFile = mp_info_ctrl_get_data_of_file(statbuf.st_mtime);
+ char *szTmpDateOfFile =
+ mp_info_ctrl_get_data_of_file(statbuf.st_mtime);
char *szTmpFileExtension = mp_info_ctrl_get_file_extension(szUriPath);
- char *szTmpFileSize = mp_util_get_file_size((unsigned long long)statbuf.st_size);
+ char *szTmpFileSize =
+ mp_util_get_file_size((unsigned long long) statbuf.st_size);
if (szTmpDateOfFile) {
VideoLogInfo("szTmpDateOfFile : %s", szTmpDateOfFile);
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <sound_manager.h>
#include "mp-video-log.h"
-static void
-__mp_sound_mgr_error_print(int nError)
+static void __mp_sound_mgr_error_print(int nError)
{
- switch (nError)
- {
+ switch (nError) {
case SOUND_MANAGER_ERROR_NONE: /**< Successful */
{
VideoLogWarning("SOUND_MANAGER_ERROR_NONE");
}
break;
- case SOUND_MANAGER_ERROR_OUT_OF_MEMORY: /**< Out of memory */
+ case SOUND_MANAGER_ERROR_OUT_OF_MEMORY: /**< Out of memory */
{
VideoLogWarning("SOUND_MANAGER_ERROR_OUT_OF_MEMORY");
}
break;
- case SOUND_MANAGER_ERROR_INVALID_PARAMETER: /**< Invalid parameter */
+ case SOUND_MANAGER_ERROR_INVALID_PARAMETER:/**< Invalid parameter */
{
VideoLogWarning("SOUND_MANAGER_ERROR_INVALID_PARAMETER");
}
break;
- case SOUND_MANAGER_ERROR_INVALID_OPERATION: /**< Invalid operation */
+ case SOUND_MANAGER_ERROR_INVALID_OPERATION:/**< Invalid operation */
{
VideoLogWarning("SOUND_MANAGER_ERROR_INVALID_OPERATION");
}
}
break;
-// case SOUND_MANAGER_ERROR_NO_OPERATION: /**< No operation */
-// {
-// VideoLogWarning("SOUND_MANAGER_ERROR_NO_OPERATION");
-// }
-// break;
-
case SOUND_MANAGER_ERROR_INTERNAL: /**< Internal error*/
{
VideoLogWarning("SOUND_MANAGER_ERROR_NO_OPERATION");
}
-void
-mp_sound_mgr_init()
+void mp_sound_mgr_init()
{
- int nResult = 0;
-// nResult = sound_manager_set_safety_volume(SOUND_SAFETY_VOL_TYPE_APP_VIDEO);
- if (nResult != SOUND_MANAGER_ERROR_NONE)
- {
- VideoLogError("sound_manager_set_safety_volume failed!!!");
- __mp_sound_mgr_error_print(nResult);
-
- return;
- }
+ int nResult = 0;
- nResult = sound_manager_set_current_sound_type(SOUND_TYPE_MEDIA);
- if (nResult != SOUND_MANAGER_ERROR_NONE)
- {
+ nResult = sound_manager_set_current_sound_type(SOUND_TYPE_MEDIA);
+ if (nResult != SOUND_MANAGER_ERROR_NONE) {
VideoLogError("sound_manager_set_current_sound_type failed!!!");
__mp_sound_mgr_error_print(nResult);
}
-void
-mp_sound_mgr_deinit()
+void mp_sound_mgr_deinit()
{
- int nResult = 0;
- //nResult = sound_manager_unset_safety_volume();
- if (nResult != SOUND_MANAGER_ERROR_NONE)
- {
- VideoLogError("sound_manager_unset_safety_volume failed!!!");
- __mp_sound_mgr_error_print(nResult);
-
- return;
- }
-
- nResult = sound_manager_unset_current_sound_type();
- if (nResult != SOUND_MANAGER_ERROR_NONE)
- {
+ int nResult = 0;
+ nResult = sound_manager_unset_current_sound_type();
+ if (nResult != SOUND_MANAGER_ERROR_NONE) {
VideoLogError("sound_manager_unset_current_sound_type failed!!!");
__mp_sound_mgr_error_print(nResult);
return;
}
}
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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-util.h"
#ifdef ENABLE_DRM_FEATURE
#include "mp-video-util-db-controller.h"
/*used after mediadb update*/
-static MpDbUpdateCbFunc g_pDbUpdateFun[MP_DB_UPDATE_LEV_MAX] = {NULL, NULL,
- NULL, NULL,
- NULL };
+static MpDbUpdateCbFunc g_pDbUpdateFun[MP_DB_UPDATE_LEV_MAX] = {
+ NULL, NULL,
+ NULL, NULL,
+ NULL
+};
+
/*used before mediadb update*/
-static MpDbUpdateCbFunc g_pDbBackupFun[MP_DB_UPDATE_LEV_MAX] = {NULL, NULL,
- NULL, NULL,
- NULL };
+static MpDbUpdateCbFunc g_pDbBackupFun[MP_DB_UPDATE_LEV_MAX] = {
+ NULL, NULL,
+ NULL, NULL,
+ NULL
+};
bool mp_util_db_set_update_fun(MpDbUpdateViewLev nLev,
- MpDbUpdateCbFunc pUpdateFun)
+ MpDbUpdateCbFunc pUpdateFun)
{
if ((nLev < MP_DB_UPDATE_LEV_0) || (nLev >= MP_DB_UPDATE_LEV_MAX)) {
VideoLogError("invalid lev = %d", nLev);
VideoLogInfo("update lev = %d", nLev);
if (g_pDbUpdateFun[nLev]) {
- g_pDbUpdateFun[nLev](pUserData);
+ g_pDbUpdateFun[nLev] (pUserData);
}
return FALSE;
}
bool mp_util_db_run_all_update_fun(void *pUserData0, void *pUserData1,
- void *pUserData2, void *pUserData3,
- void *pUserData4)
+ void *pUserData2, void *pUserData3,
+ void *pUserData4)
{
if (g_pDbUpdateFun[MP_DB_UPDATE_LEV_0]) {
- g_pDbUpdateFun[MP_DB_UPDATE_LEV_0](pUserData0);
+ g_pDbUpdateFun[MP_DB_UPDATE_LEV_0] (pUserData0);
}
if (g_pDbUpdateFun[MP_DB_UPDATE_LEV_1]) {
- g_pDbUpdateFun[MP_DB_UPDATE_LEV_1](pUserData1);
+ g_pDbUpdateFun[MP_DB_UPDATE_LEV_1] (pUserData1);
}
if (g_pDbUpdateFun[MP_DB_UPDATE_LEV_2]) {
- g_pDbUpdateFun[MP_DB_UPDATE_LEV_2](pUserData2);
+ g_pDbUpdateFun[MP_DB_UPDATE_LEV_2] (pUserData2);
}
if (g_pDbUpdateFun[MP_DB_UPDATE_LEV_3]) {
- g_pDbUpdateFun[MP_DB_UPDATE_LEV_3](pUserData3);
+ g_pDbUpdateFun[MP_DB_UPDATE_LEV_3] (pUserData3);
}
if (g_pDbUpdateFun[MP_DB_UPDATE_LEV_4]) {
- g_pDbUpdateFun[MP_DB_UPDATE_LEV_4](pUserData4);
+ g_pDbUpdateFun[MP_DB_UPDATE_LEV_4] (pUserData4);
}
VideoLogInfo("update successfully");
}
bool mp_util_db_run_update_fun_except_lev0(void *pUserData1,
- void *pUserData2,
- void *pUserData3,
- void *pUserData4)
+ void *pUserData2,
+ void *pUserData3,
+ void *pUserData4)
{
if (g_pDbUpdateFun[MP_DB_UPDATE_LEV_1]) {
- g_pDbUpdateFun[MP_DB_UPDATE_LEV_1](pUserData1);
+ g_pDbUpdateFun[MP_DB_UPDATE_LEV_1] (pUserData1);
}
if (g_pDbUpdateFun[MP_DB_UPDATE_LEV_2]) {
- g_pDbUpdateFun[MP_DB_UPDATE_LEV_2](pUserData2);
+ g_pDbUpdateFun[MP_DB_UPDATE_LEV_2] (pUserData2);
}
if (g_pDbUpdateFun[MP_DB_UPDATE_LEV_3]) {
- g_pDbUpdateFun[MP_DB_UPDATE_LEV_3](pUserData3);
+ g_pDbUpdateFun[MP_DB_UPDATE_LEV_3] (pUserData3);
}
if (g_pDbUpdateFun[MP_DB_UPDATE_LEV_4]) {
- g_pDbUpdateFun[MP_DB_UPDATE_LEV_4](pUserData4);
+ g_pDbUpdateFun[MP_DB_UPDATE_LEV_4] (pUserData4);
}
VideoLogInfo("update successfully");
bool mp_util_db_set_backup_fun(MpDbUpdateViewLev nLev,
- MpDbUpdateCbFunc pUpdateFun)
+ MpDbUpdateCbFunc pUpdateFun)
{
if ((nLev < MP_DB_UPDATE_LEV_0) || (nLev >= MP_DB_UPDATE_LEV_MAX)) {
VideoLogError("invalid lev = %d", nLev);
}
bool mp_util_db_run_backup_fun_except_lev0(void *pUserData1,
- void *pUserData2,
- void *pUserData3,
- void *pUserData4)
+ void *pUserData2,
+ void *pUserData3,
+ void *pUserData4)
{
if (g_pDbBackupFun[MP_DB_UPDATE_LEV_1]) {
- g_pDbBackupFun[MP_DB_UPDATE_LEV_1](pUserData1);
+ g_pDbBackupFun[MP_DB_UPDATE_LEV_1] (pUserData1);
}
if (g_pDbBackupFun[MP_DB_UPDATE_LEV_2]) {
- g_pDbBackupFun[MP_DB_UPDATE_LEV_2](pUserData2);
+ g_pDbBackupFun[MP_DB_UPDATE_LEV_2] (pUserData2);
}
if (g_pDbBackupFun[MP_DB_UPDATE_LEV_3]) {
- g_pDbBackupFun[MP_DB_UPDATE_LEV_3](pUserData3);
+ g_pDbBackupFun[MP_DB_UPDATE_LEV_3] (pUserData3);
}
if (g_pDbBackupFun[MP_DB_UPDATE_LEV_4]) {
- g_pDbBackupFun[MP_DB_UPDATE_LEV_4](pUserData4);
+ g_pDbBackupFun[MP_DB_UPDATE_LEV_4] (pUserData4);
}
VideoLogInfo("backup successfully");
}
bool mp_util_db_run_all_backup_fun(void *pUserData0, void *pUserData1,
- void *pUserData2, void *pUserData3,
- void *pUserData4)
+ void *pUserData2, void *pUserData3,
+ void *pUserData4)
{
if (g_pDbBackupFun[MP_DB_UPDATE_LEV_0]) {
- g_pDbBackupFun[MP_DB_UPDATE_LEV_0](pUserData0);
+ g_pDbBackupFun[MP_DB_UPDATE_LEV_0] (pUserData0);
}
if (g_pDbBackupFun[MP_DB_UPDATE_LEV_1]) {
- g_pDbBackupFun[MP_DB_UPDATE_LEV_1](pUserData1);
+ g_pDbBackupFun[MP_DB_UPDATE_LEV_1] (pUserData1);
}
if (g_pDbBackupFun[MP_DB_UPDATE_LEV_2]) {
- g_pDbBackupFun[MP_DB_UPDATE_LEV_2](pUserData2);
+ g_pDbBackupFun[MP_DB_UPDATE_LEV_2] (pUserData2);
}
if (g_pDbBackupFun[MP_DB_UPDATE_LEV_3]) {
- g_pDbBackupFun[MP_DB_UPDATE_LEV_3](pUserData3);
+ g_pDbBackupFun[MP_DB_UPDATE_LEV_3] (pUserData3);
}
if (g_pDbBackupFun[MP_DB_UPDATE_LEV_4]) {
- g_pDbBackupFun[MP_DB_UPDATE_LEV_4](pUserData4);
+ g_pDbBackupFun[MP_DB_UPDATE_LEV_4] (pUserData4);
}
VideoLogInfo("backup successfully");
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
#include <unistd.h>
static Ecore_Timer *g_pLaunchTimer = NULL;
static void __mp_launch_video_reply_cb(app_control_h pRequest,
- app_control_h pReply,
- app_control_result_e nResult,
- void *pUserData)
+ app_control_h pReply,
+ app_control_result_e nResult,
+ void *pUserData)
{
if (pRequest) {
}
void mp_launch_video_play(char *szMediaUrl, MpPlayerType nPlayerType,
- char *szDeviceID)
+ char *szDeviceID)
{
if (!szMediaUrl) {
if (!bMultiPlay) {
if (!g_pLaunchTimer) {
g_pLaunchTimer =
- ecore_timer_add(1.0, __mp_launch_video_timer_cb,
- NULL);
+ ecore_timer_add(1.0, __mp_launch_video_timer_cb, NULL);
} else {
VideoLogWarning("need more than 1.0 sec between twice click");
return;
app_control_h pService = NULL;
bool bAutoPlay = vp_is_auto_play_on();
- VideoLogError("vp_is_auto_play_on= %d",bAutoPlay);
+ VideoLogError("vp_is_auto_play_on= %d", bAutoPlay);
VideoSecureLogInfo("start play:%s,%d,%s,%d", szMediaUrl, nPlayerType,
- szDeviceID, bMultiPlay);
+ szDeviceID, bMultiPlay);
int nRet = 0;
nRet = app_control_create(&pService);
VideoLogError("app_control_create is fail [0x%x]", nRet);
}
- nRet =
- app_control_set_operation(pService, APP_CONTROL_OPERATION_VIEW);
+ nRet = app_control_set_operation(pService, APP_CONTROL_OPERATION_VIEW);
if (nRet != APP_CONTROL_ERROR_NONE) {
VideoLogError("app_control_set_operation is fail [0x%x]", nRet);
}
if (bAutoPlay == TRUE) {
nRet = app_control_add_extra_data(pService, "auto_play_setting",
- "TRUE");
+ "TRUE");
if (nRet != APP_CONTROL_ERROR_NONE) {
VideoLogError("app_control_add_extra_data is fail [0x%x]",
- nRet);
+ nRet);
}
- }
- else{
+ } else {
nRet = app_control_add_extra_data(pService, "auto_play_setting",
- "FALSE");
+ "FALSE");
if (nRet != APP_CONTROL_ERROR_NONE) {
VideoLogError("app_control_add_extra_data is fail [0x%x]",
- nRet);
+ nRet);
}
}
if (nPlayerType == MP_PLAYER_TYPE_VIDEO) {
nRet =
app_control_add_extra_data(pService, "launching_application",
- "list");
+ "list");
if (nRet != APP_CONTROL_ERROR_NONE) {
VideoLogError("app_control_add_extra_data is fail [0x%x]",
- nRet);
+ nRet);
}
}
app_control_add_extra_data(pService, "Device id", szDeviceID);
if (nRet != APP_CONTROL_ERROR_NONE) {
VideoLogError("app_control_add_extra_data is fail [0x%x]",
- nRet);
+ nRet);
}
}
-#ifdef VS_FEATURE_FOLDER_VIEW /**/
+#ifdef VS_FEATURE_FOLDER_VIEW /**/
int nViewType = mp_view_as_ctrl_get_type();
if (nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
VideoLogInfo("folder view");
nRet =
app_control_add_extra_data(pService, "video_list_type",
- "folder");
+ "folder");
if (nRet != APP_CONTROL_ERROR_NONE) {
VideoLogError("app_control_add_extra_data is fail [0x%x]",
- nRet);
+ nRet);
}
}
-#endif /**/
- nRet = app_control_add_extra_data(pService, "path", szMediaUrl);
+#endif /**/
+ nRet = app_control_add_extra_data(pService, "path", szMediaUrl);
if (nRet != APP_CONTROL_ERROR_NONE) {
VideoLogError("app_control_add_extra_data is fail [0x%x]", nRet);
}
nRet =
app_control_send_launch_request(pService,
- __mp_launch_video_reply_cb, NULL);
+ __mp_launch_video_reply_cb, NULL);
if (nRet != APP_CONTROL_ERROR_NONE) {
if (nRet == APP_CONTROL_ERROR_INVALID_PARAMETER) {
VideoLogError
- ("app_control_send_launch_request is fail APP_CONTROL_ERROR_INVALID_PARAMETER [0x%x]",
- nRet);
+ ("app_control_send_launch_request is fail APP_CONTROL_ERROR_INVALID_PARAMETER [0x%x]",
+ nRet);
} else if (nRet == APP_CONTROL_ERROR_OUT_OF_MEMORY) {
VideoLogError
- ("app_control_send_launch_request is fail APP_CONTROL_ERROR_OUT_OF_MEMORY [0x%x]",
- nRet);
+ ("app_control_send_launch_request is fail APP_CONTROL_ERROR_OUT_OF_MEMORY [0x%x]",
+ nRet);
} else if (nRet == APP_CONTROL_ERROR_APP_NOT_FOUND) {
VideoLogError
- ("app_control_send_launch_request is fail APP_CONTROL_ERROR_APP_NOT_FOUND [0x%x]",
- nRet);
+ ("app_control_send_launch_request is fail APP_CONTROL_ERROR_APP_NOT_FOUND [0x%x]",
+ nRet);
} else if (nRet == APP_CONTROL_ERROR_KEY_NOT_FOUND) {
VideoLogError
- ("app_control_send_launch_request is fail APP_CONTROL_ERROR_KEY_NOT_FOUND [0x%x]",
- nRet);
+ ("app_control_send_launch_request is fail APP_CONTROL_ERROR_KEY_NOT_FOUND [0x%x]",
+ nRet);
} else if (nRet == APP_CONTROL_ERROR_KEY_REJECTED) {
VideoLogError
- ("app_control_send_launch_request is fail APP_CONTROL_ERROR_KEY_REJECTED [0x%x]",
- nRet);
+ ("app_control_send_launch_request is fail APP_CONTROL_ERROR_KEY_REJECTED [0x%x]",
+ nRet);
} else if (nRet == APP_CONTROL_ERROR_INVALID_DATA_TYPE) {
VideoLogError
- ("app_control_send_launch_request is fail APP_CONTROL_ERROR_INVALID_DATA_TYPE [0x%x]",
- nRet);
+ ("app_control_send_launch_request is fail APP_CONTROL_ERROR_INVALID_DATA_TYPE [0x%x]",
+ nRet);
} else if (nRet == APP_CONTROL_ERROR_LAUNCH_REJECTED) {
VideoLogError
- ("app_control_send_launch_request is fail APP_CONTROL_ERROR_LAUNCH_REJECTED [0x%x]",
- nRet);
+ ("app_control_send_launch_request is fail APP_CONTROL_ERROR_LAUNCH_REJECTED [0x%x]",
+ nRet);
}
}
void mp_launch_video_stop(void)
{
VideoLogInfo("");
- /*if needed, to do*/
+ /*if needed, to do */
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <stdio.h>
#include <glib.h>
#include "vp-file-util.h"
#define MSG_REPORT_PERIOD (1)
-#define DEF_ALLLOC_SIZE 16384 /*((4)*(1024))*/
+#define DEF_ALLLOC_SIZE 16384 /*((4)*(1024)) */
#define DIR_MODE_BIT (01777)
#define FILE_MODE_BIT (S_IRWXU | S_IRWXG | S_IRWXO)
#define PER_HANDLE_MAX_SIZE (10*1024*1204)
bool g_do_cancel = FALSE;
unsigned long long g_total_size = 0;
-static char *__mp_util_move_change_root_name(const char *name, const char *old_root, const char *new_root)
+static char *__mp_util_move_change_root_name(const char *name,
+ const char *old_root,
+ const char *new_root)
{
char *new_name = NULL;
char *name_tmp = NULL;
if ((strstr(name, old_root) == NULL)
- || (name_len <= old_len)
- || ((name[old_len] == '/' && name[old_len + 1] == '\0'))
- || FALSE) {
+ || (name_len <= old_len)
+ || ((name[old_len] == '/' && name[old_len + 1] == '\0'))
+ || FALSE) {
return NULL;
}
{
g_do_cancel = bCancel;
}
-static int __mp_util_move_get_remain_space(const char *path, unsigned long long *size)
+
+static int __mp_util_move_get_remain_space(const char *path,
+ unsigned long long *size)
{
struct statfs dst_fs;
}
if (statfs(path, &dst_fs) == 0) {
- *size = ((unsigned long long)(dst_fs.f_bsize) * (unsigned long long)(dst_fs.f_bavail));
+ *size =
+ ((unsigned long long) (dst_fs.f_bsize) *
+ (unsigned long long) (dst_fs.f_bavail));
} else {
return -errno;
}
return false;
}
-static int __mp_util_move_directory_hierarchies(const char *pathname, const struct stat *statptr, int type)
+static int __mp_util_move_directory_hierarchies(const char *pathname,
+ const struct stat *statptr,
+ int type)
{
MpUtilDirListInfo *info = NULL;
MpUtilDirListInfo *info_title = NULL;
- VideoSecureLogInfo("pathname is [%s]\t type is [%d]\t", pathname, type);
+ VideoSecureLogInfo("pathname is [%s]\t type is [%d]\t", pathname,
+ type);
switch (type) {
case FTW_F:
if (mp_util_check_video_file(pathname)) {
info->ftw_path = g_strdup(pathname);
info->type = type;
- info->size = (unsigned long long)src_info.st_size;
+ info->size = (unsigned long long) src_info.st_size;
g_copy_list = g_slist_append(g_copy_list, info);
//append subtitle
char *szSubTitle = NULL;
if (info_title) {
info_title->ftw_path = g_strdup(szSubTitle);
info_title->type = type;
- info_title->size = (unsigned long long)src_info.st_size;
- g_copy_list = g_slist_append(g_copy_list, info_title);
+ info_title->size =
+ (unsigned long long) src_info.st_size;
+ g_copy_list =
+ g_slist_append(g_copy_list, info_title);
}
}
MP_FREE_STRING(szSubTitle);
return 0;
}
-static void __mp_util_move_free_directory_hierarchies(GSList **glist)
+static void __mp_util_move_free_directory_hierarchies(GSList ** glist)
{
if (*glist == NULL)
return;
GSList *list = *glist;
while (list) {
MpUtilDirListInfo *info = NULL;
- info = (MpUtilDirListInfo *)list->data;
+ info = (MpUtilDirListInfo *) list->data;
g_free(info->ftw_path);
g_free(info);
list = g_slist_next(list);
*glist = NULL;
}
-static int __mp_util_move_copy_reg_file(const char *szSrcPath, struct stat *src_statp, const char *szDstPath, unsigned long buf_size, mp_util_copy_cb msg_cb,
- void *msg_data)
+static int __mp_util_move_copy_reg_file(const char *szSrcPath,
+ struct stat *src_statp,
+ const char *szDstPath,
+ unsigned long buf_size,
+ mp_util_copy_cb msg_cb,
+ void *msg_data)
{
FILE *src_f = NULL;
FILE *dst_f = NULL;
goto ERROR_CLOSE_FD;
}
}
- /* if (dst_info.st_blksize > 0) {
- alloc_size = dst_info.st_blksize;
- }
- } else {
- alloc_size = buf_size;
- }*/
+
alloc_size = DEF_ALLLOC_SIZE;
buf = malloc(alloc_size);
int dynamic_size = 0;
if (g_total_size > PER_HANDLE_MAX_SIZE) {
dynamic_size = 64;
- } else if (g_total_size <= PER_HANDLE_MAX_SIZE && g_total_size > PER_HANDLE_MIN_SIZE) {
+ } else if (g_total_size <= PER_HANDLE_MAX_SIZE
+ && g_total_size > PER_HANDLE_MIN_SIZE) {
dynamic_size = 8;
} else {
dynamic_size = 1;
int dst_fd = fileno(dst_f);
ssize_t total = 0;
- while ((r_size = fread(buf, 1, alloc_size, src_f)) > 0)
- {
+ while ((r_size = fread(buf, 1, alloc_size, src_f)) > 0) {
total = r_size;
void *buf_p = buf;
return 0;
-ERROR_CLOSE_FD:
+ ERROR_CLOSE_FD:
if (src_f) {
fclose(src_f);
return -1;
-CANCEL_CLOSE_FD:
+ CANCEL_CLOSE_FD:
if (buf) {
free(buf);
buf = NULL;
return 1;
}
-static int __mp_util_move_copy_directory(const char *szSrcPath, struct stat *src_statp, const char *szDstPath, mp_util_copy_cb msg_cb, void *msg_data)
+static int __mp_util_move_copy_directory(const char *szSrcPath,
+ struct stat *src_statp,
+ const char *szDstPath,
+ mp_util_copy_cb msg_cb,
+ void *msg_data)
{
int ret = -1;
mode_t src_mode = 0;
return -1;
} else {
if (msg_cb) {
- msg_cb(MP_VIDEO_UPDATE, MP_VISUAL_FOLDER_SIZE, 0, msg_data);
+ msg_cb(MP_VIDEO_UPDATE, MP_VISUAL_FOLDER_SIZE, 0,
+ msg_data);
}
}
} else {
if (mp_util_move_cancel_check()) {
goto DO_CANCEL;
}
- ent = (MpUtilDirListInfo *)list->data;
- VideoSecureLogInfo("name is [%s] type is [%d]", ent->ftw_path, ent->type);
+ ent = (MpUtilDirListInfo *) list->data;
+ VideoSecureLogInfo("name is [%s] type is [%d]", ent->ftw_path,
+ ent->type);
if (ent->type == FTW_D) {
if (ent->ftw_path == NULL || strlen(ent->ftw_path) == 0) {
list = g_slist_next(list);
continue;
}
MP_FREE_STRING(new_dir);
- new_dir = __mp_util_move_change_root_name(ent->ftw_path, szSrcPath, szDstPath);
- VideoSecureLogInfo("copy dir %s to %s", ent->ftw_path, new_dir);
+ new_dir =
+ __mp_util_move_change_root_name(ent->ftw_path,
+ szSrcPath, szDstPath);
+ VideoSecureLogInfo("copy dir %s to %s", ent->ftw_path,
+ new_dir);
if (new_dir) {
if (!__mp_util_move_check_exist(new_dir)) {
struct stat info;
if (stat(ent->ftw_path, &info) == 0) {
- if (mkdir(new_dir, (info.st_mode & DIR_MODE_BIT))) {
- /* fts_set(fts, ent, FTS_SKIP); */
- VideoSecureLogError("Fail to make directory");
+ if (mkdir
+ (new_dir, (info.st_mode & DIR_MODE_BIT))) {
+ VideoSecureLogError
+ ("Fail to make directory");
MP_FREE_STRING(new_dir);
goto ERROR_CLOSE_FD;
} else {
if (msg_cb) {
- msg_cb(MP_VIDEO_UPDATE, 0, 0, msg_data);
+ msg_cb(MP_VIDEO_UPDATE, 0, 0,
+ msg_data);
}
}
} else {
VideoSecureLogError("Fail to stat ");
- /* fts_set(fts, ent, FTS_SKIP); */
MP_FREE_STRING(new_dir);
goto ERROR_CLOSE_FD;
}
if (stat(new_dir, &new_dst_info) == 0) {
if (S_ISDIR(new_dst_info.st_mode)) {
if (msg_cb) {
- msg_cb(MP_VIDEO_UPDATE, 0, 0, msg_data);
+ msg_cb(MP_VIDEO_UPDATE, 0, 0,
+ msg_data);
}
} else {
- VideoSecureLogInfo("[%s] is already existed, and this one is not directory", new_dir);
- /*set FTS_SKIP to skip children of current*/
- /*fts_set(fts, ent, FTS_SKIP);*/
+ VideoSecureLogInfo
+ ("[%s] is already existed, and this one is not directory",
+ new_dir);
MP_FREE_STRING(new_dir);
goto ERROR_CLOSE_FD;
}
} else {
VideoLogError("Fail to stat %d", errno);
- /*fts_set(fts, ent, FTS_SKIP);*/
MP_FREE_STRING(new_dir);
goto ERROR_CLOSE_FD;
}
list = g_slist_next(list);
continue;
}
- char *new_file = __mp_util_move_change_root_name(ent->ftw_path, szSrcPath, szDstPath);
+ char *new_file =
+ __mp_util_move_change_root_name(ent->ftw_path,
+ szSrcPath, szDstPath);
if (new_file) {
- err = __mp_util_move_copy_reg_file(ent->ftw_path, NULL, new_file, 0, msg_cb, msg_data);
+ err =
+ __mp_util_move_copy_reg_file(ent->ftw_path, NULL,
+ new_file, 0, msg_cb,
+ msg_data);
if (err == 0) {
mp_util_svc_scan_file(new_file);
mp_util_svc_scan_file(ent->ftw_path);
MP_FREE_STRING(new_dir);
__mp_util_move_free_directory_hierarchies(&g_copy_list);
g_copy_list = NULL;
- if (mp_util_check_empty_dir(szSrcPath))
- {
+ if (mp_util_check_empty_dir(szSrcPath)) {
rmdir(szSrcPath);
}
return 0;
-ERROR_CLOSE_FD:
+ ERROR_CLOSE_FD:
MP_FREE_STRING(new_dir);
__mp_util_move_free_directory_hierarchies(&g_copy_list);
g_copy_list = NULL;
return -1;
-DO_CANCEL:
+ DO_CANCEL:
MP_FREE_STRING(new_dir);
__mp_util_move_free_directory_hierarchies(&g_copy_list);
g_copy_list = NULL;
}
-int __mp_util_move_copy_internal(const char *szSrcPath, const char *szDstPath, mp_util_copy_cb msg_func, void *msg_data)
+int __mp_util_move_copy_internal(const char *szSrcPath,
+ const char *szDstPath,
+ mp_util_copy_cb msg_func, void *msg_data)
{
int err = 0;
char *src_basename = NULL;
int base_size = 0;
int root_size = 0;
int with_slash = 1;
- int alloc_size = 1; /*for null*/
+ int alloc_size = 1; /*for null */
struct stat src_info;
char *szNewestPath = NULL;
if (access(szNewestPath, F_OK)) {
if (S_ISDIR(src_info.st_mode)) {
- err = __mp_util_move_copy_directory(szSrcPath, &src_info, szNewestPath, msg_func, msg_data);
+ err =
+ __mp_util_move_copy_directory(szSrcPath, &src_info,
+ szNewestPath, msg_func,
+ msg_data);
if (err == 0) {
mp_util_svc_scan_file(szSrcPath);
mp_util_svc_scan_file(szNewestPath);
}
} else if (S_ISREG(src_info.st_mode)) {
- /*just copy*/
- err = __mp_util_move_copy_reg_file(szSrcPath, &src_info, szNewestPath, 0, msg_func, msg_data);
+ /*just copy */
+ err =
+ __mp_util_move_copy_reg_file(szSrcPath, &src_info,
+ szNewestPath, 0, msg_func,
+ msg_data);
if (err == 0) {
mp_util_svc_scan_file(szSrcPath);
mp_util_svc_scan_file(szNewestPath);
}
} else {
- VideoSecureLogInfo("item[%s] is not file or directory", szSrcPath);
+ VideoSecureLogInfo("item[%s] is not file or directory",
+ szSrcPath);
goto ERROR_FREE_MEM;
}
} else {
return 0;
-ERROR_FREE_MEM:
+ ERROR_FREE_MEM:
VideoLogError("Copy error");
MP_FREE_STRING(src_basename);
MP_FREE_STRING(szNewestPath);
return -1;
-CANCEL_FREE_MEM:
+ CANCEL_FREE_MEM:
VideoLogError("Copy cancelled");
MP_FREE_STRING(src_basename);
return 1;
}
-bool mp_util_move_get_total_dir_size(const char *szDir, unsigned long long *size)
+bool mp_util_move_get_total_dir_size(const char *szDir,
+ unsigned long long *size)
{
int ret = -1;
if (!szDir) {
GSList *list = NULL;
list = g_copy_list;
while (list) {
- ent = (MpUtilDirListInfo *)list->data;
+ ent = (MpUtilDirListInfo *) list->data;
if (ent->type == FTW_D) {
nSizeTmp += MP_VISUAL_FOLDER_SIZE;
} else if (ent->type == FTW_F) {
return TRUE;
}
-int mp_util_move_push(const char *szSrcPath, const char *szDstPath, mp_util_copy_cb cbFun, void *userData, unsigned long long nTotalSize)
+int mp_util_move_push(const char *szSrcPath, const char *szDstPath,
+ mp_util_copy_cb cbFun, void *userData,
+ unsigned long long nTotalSize)
{
VideoLogInfo("start");
- //double s_start = 0.0;
- //double s_stop = 0.0;
int nRet = 0;
unsigned long long r_size = 0;
int errcode = 0;
- //init static data
g_do_cancel = FALSE;
- if (g_copy_list)
- {
+ if (g_copy_list) {
__mp_util_move_free_directory_hierarchies(&g_copy_list);
g_copy_list = NULL;
}
- //s_start = _MpUtilCopyGetTime();
errcode = __mp_util_move_get_remain_space(szDstPath, &r_size);
if (errcode < 0) {
g_total_size = nTotalSize;
- //s_stop = _MpUtilCopyGetTime();
-
/* copy items */
- nRet = __mp_util_move_copy_internal(szSrcPath, szDstPath, cbFun, userData);
+ nRet =
+ __mp_util_move_copy_internal(szSrcPath, szDstPath, cbFun,
+ userData);
return nRet;
-ERROR_END_THREAD:
+ ERROR_END_THREAD:
VideoLogInfo("The end of MpUtilCopyFunc");
return nRet;
}
-static int __mp_util_move_delete_internal(const char *szSrcPath, void *msg_data)
+static bool __mp_util_check_if_in_same_folder(char *sourcePath,
+ char *filePath)
+{
+
+ char *filePath_temp = strdup(filePath);
+
+ if (!strcmp(sourcePath, filePath_temp)) {
+ free(filePath_temp);
+ return true;
+ } else {
+ free(filePath_temp);
+ return false;
+ }
+}
+
+static int __mp_util_move_delete_internal(const char *szSrcPath,
+ void *msg_data)
{
- if (!szSrcPath)
- {
+ if (!szSrcPath) {
VideoLogError("szSrcPath is NULL");
return -1;
}
int ret = 0;
- if (g_copy_list)
- {
+ if (g_copy_list) {
__mp_util_move_free_directory_hierarchies(&g_copy_list);
g_copy_list = NULL;
}
if (mp_util_move_cancel_check()) {
goto DO_CANCEL;
}
- ent = (MpUtilDirListInfo *)list->data;
- VideoSecureLogInfo("name is [%s] type is [%d]", ent->ftw_path, ent->type);
+ ent = (MpUtilDirListInfo *) list->data;
+ VideoSecureLogInfo("name is [%s] type is [%d]", ent->ftw_path,
+ ent->type);
if (ent->type == FTW_D) {
list = g_slist_next(list);
continue;
list = g_slist_next(list);
continue;
}
+ if (!__mp_util_check_if_in_same_folder
+ (szSrcPath, ent->ftw_path)) {
+ list = g_slist_next(list);
+ continue;
+ }
if (!vp_file_unlink(ent->ftw_path)) {
VideoLogInfo("remove failed.");
goto ERROR_CLOSE_FD;
return 0;
-ERROR_CLOSE_FD:
+ ERROR_CLOSE_FD:
__mp_util_move_free_directory_hierarchies(&g_copy_list);
g_copy_list = NULL;
return -1;
-DO_CANCEL:
+ DO_CANCEL:
__mp_util_move_free_directory_hierarchies(&g_copy_list);
g_copy_list = NULL;
return 1;
}
-int mp_util_move_delete_video_folder(const char *szFolderPath, void *userData)
+int mp_util_move_delete_video_folder(const char *szFolderPath,
+ void *userData)
{
VideoLogInfo("start");
- if (!szFolderPath)
- {
+ if (!szFolderPath) {
VideoLogError("szSrcPath is NULL");
return -1;
}
int nRet = 0;
g_do_cancel = FALSE;
- if (g_copy_list)
- {
+ if (g_copy_list) {
__mp_util_move_free_directory_hierarchies(&g_copy_list);
g_copy_list = NULL;
}
return nRet;
}
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
#include <glib.h>
-//#include <appcore-common.h>
#include <system_settings.h>
#include "video-player.h"
#include "videos-view-mgr.h"
{
VideoLogWarning("== APP CREATE INTERNAL ==");
- /* Instead specify h/w acceleration in the application xml. */
-#ifdef _USE_OPENGL_BACKEND
- /* elm_config_preferred_engine_set("opengl_x11"); */
-#else
- /* elm_config_preferred_engine_set("software_x11"); */
-#endif
-
mp_util_create_main_theme();
mp_util_set_color_theme_changed_cb(__app_color_theme_changed);
mp_mgr_create_main_window(VIDEOS_WIN_NAME);
#ifdef _MULTI_WINDOW
- elm_win_wm_desktop_layout_support_set(
- (Evas_Object *)mp_mgr_get_main_window(), EINA_TRUE);
-
- evas_object_data_set((Evas_Object *)mp_mgr_get_main_window(),
- "id_startup_by", (void *) - 1);
- evas_object_data_set((Evas_Object *)mp_mgr_get_main_window(),
- "id_layout_pos", (void *) - 1);
+ elm_win_wm_desktop_layout_support_set((Evas_Object *)
+ mp_mgr_get_main_window(),
+ EINA_TRUE);
+
+ evas_object_data_set((Evas_Object *) mp_mgr_get_main_window(),
+ "id_startup_by", (void *) -1);
+ evas_object_data_set((Evas_Object *) mp_mgr_get_main_window(),
+ "id_layout_pos", (void *) -1);
#endif
- evas_object_show((Evas_Object *)mp_mgr_get_main_window());
- elm_win_activate((Evas_Object *)mp_mgr_get_main_window());
+ evas_object_show((Evas_Object *) mp_mgr_get_main_window());
+ elm_win_activate((Evas_Object *) mp_mgr_get_main_window());
return;
}
mp_mgr_restart_main_window();
} else {
VideoLogInfo("appControlPost");
- /* mp_library_mgr_resume_wall_render(); */
}
return TRUE;
}
}
/*
- * for split window
- */
+ * for split window
+ */
#ifdef _MULTI_WINDOW
if (!pAppSvcHandle) {
VideoLogInfo("[ERR] No exist pAppSveHandle.");
return;
}
- static int is_first_run = 0;
+ static int is_first_run = 0;
char *val_startup = NULL;
char *val_layout = NULL;
int id = -1;
- int id_startup_by = (int)evas_object_data_get(
- (Evas_Object *)mp_mgr_get_main_window(),
- "id_startup_by");
- int id_layout_pos = (int)evas_object_data_get(
- (Evas_Object *)mp_mgr_get_main_window(),
- "id_layout_pos");
+ int id_startup_by = (int) evas_object_data_get((Evas_Object *)
+ mp_mgr_get_main_window
+ (),
+ "id_startup_by");
+ int id_layout_pos = (int) evas_object_data_get((Evas_Object *)
+ mp_mgr_get_main_window
+ (),
+ "id_layout_pos");
if (app_control_get_extra_data(pAppSvcHandle, "window_startup_type",
- &val_startup) != APP_CONTROL_ERROR_NONE) {
+ &val_startup) !=
+ APP_CONTROL_ERROR_NONE) {
val_startup = strdup("0");
}
if (app_control_get_extra_data(pAppSvcHandle, "window_layout_id",
- &val_layout) != APP_CONTROL_ERROR_NONE) {
+ &val_layout) !=
+ APP_CONTROL_ERROR_NONE) {
val_layout = strdup("-1");
}
if (id_startup_by == -1) {
- id = elm_win_aux_hint_add(
- (Evas_Object *)mp_mgr_get_main_window(),
- "wm.policy.win.startup.by", val_startup);
- evas_object_data_set((Evas_Object *)mp_mgr_get_main_window(),
- "id_startup_by", (void *)id);
+ id = elm_win_aux_hint_add((Evas_Object *) mp_mgr_get_main_window(),
+ "wm.policy.win.startup.by", val_startup);
+ evas_object_data_set((Evas_Object *) mp_mgr_get_main_window(),
+ "id_startup_by", (void *) id);
} else {
- elm_win_aux_hint_val_set(
- (Evas_Object *)mp_mgr_get_main_window(), id_startup_by,
- val_startup);
+ elm_win_aux_hint_val_set((Evas_Object *) mp_mgr_get_main_window(),
+ id_startup_by, val_startup);
}
if (id_layout_pos == -1) {
- id = elm_win_aux_hint_add(
- (Evas_Object *)mp_mgr_get_main_window(),
- "wm.policy.win.zone.desk.layout.pos", val_layout);
- evas_object_data_set((Evas_Object *)mp_mgr_get_main_window(),
- "id_layout_pos", (void *)id);
+ id = elm_win_aux_hint_add((Evas_Object *) mp_mgr_get_main_window(),
+ "wm.policy.win.zone.desk.layout.pos",
+ val_layout);
+ evas_object_data_set((Evas_Object *) mp_mgr_get_main_window(),
+ "id_layout_pos", (void *) id);
} else {
- elm_win_aux_hint_val_set(
- (Evas_Object *)mp_mgr_get_main_window(), id_layout_pos,
- val_layout);
+ elm_win_aux_hint_val_set((Evas_Object *) mp_mgr_get_main_window(),
+ id_layout_pos, val_layout);
}
VideoLogInfo("val_startup : [%s]", val_startup);
char *operation = NULL;
int nRet = app_control_get_operation(pAppSvcHandle, &operation);
if (nRet == APP_CONTROL_ERROR_NONE &&
- strcmp(operation,
- "http://tizen.org/appcontrol/operation/main") == 0) {
+ strcmp(operation,
+ "http://tizen.org/appcontrol/operation/main") == 0) {
if (is_first_run == 1) {
- elm_win_activate(
- (Evas_Object *)mp_mgr_get_main_window());
+ elm_win_activate((Evas_Object *) mp_mgr_get_main_window());
VideoLogInfo("is_first_run is true");
- /* mp_library_mgr_resume_wall_render(); */
MP_FREE_STRING(operation);
#endif
if (bActiveMainwindow) {
- evas_object_show((Evas_Object *)mp_mgr_get_main_window());
- elm_win_activate((Evas_Object *)mp_mgr_get_main_window());
+ evas_object_show((Evas_Object *) mp_mgr_get_main_window());
+ elm_win_activate((Evas_Object *) mp_mgr_get_main_window());
}
- /* ecore_idler_add(appControlPost, NULL); */
appControlPost(NULL);
return;
VideoLogWarning("== APP PAUSE ==");
mp_sound_mgr_deinit();
- /* mp_library_mgr_pause_wall_render(); */
return;
}
{
VideoLogWarning("== APP RESUME ==");
- /* mp_library_mgr_resume_wall_render(); */
mp_list_view_update_widget_resume();
return;
mp_library_mgr_change_language();
char *locale = NULL;
- int retcode = system_settings_get_value_string(
- SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &locale);
+ int retcode =
+ system_settings_get_value_string
+ (SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &locale);
if (retcode != SYSTEM_SETTINGS_ERROR_NONE) {
- VideoLogInfo(
- "[ERR] failed to get updated language[retcode = %d]",
- retcode);
+ VideoLogInfo("[ERR] failed to get updated language[retcode = %d]",
+ retcode);
} else {
if (locale) {
elm_language_set(locale);
VideoLogInfo("======================================================");
VideoLogInfo(" Measuring exec() launching time - %ld:%ldus",
- startTimeVal.tv_sec, startTimeVal.tv_usec);
+ startTimeVal.tv_sec, startTimeVal.tv_usec);
VideoLogInfo("======================================================");
ui_app_lifecycle_callback_s st_appEventService;
app_event_handler_h hLanguageChangedHandle = NULL;
nRet = ui_app_add_event_handler(&hLanguageChangedHandle,
- APP_EVENT_LANGUAGE_CHANGED, appUpdateLanguage, NULL);
+ APP_EVENT_LANGUAGE_CHANGED,
+ appUpdateLanguage, NULL);
if (nRet != APP_ERROR_NONE) {
VideoLogError("Fail to add handler for LANGUAGE_CHANGED [%d]",
- nRet);
+ nRet);
return -1;
}
st_appEventService.pause = appPause;
st_appEventService.resume = appResume;
st_appEventService.app_control = appControl;
- /*
- st_appEventService.low_memory = appBattery;
- st_appEventService.low_battery = NULL;
- st_appEventService.device_orientation = NULL; //appRotate;
- st_appEventService.language_changed = appUpdateLanguage;
- st_appEventService.region_format_changed = NULL;
- */
+
nRet = ui_app_main(argc, argv, &st_appEventService, NULL);
if (nRet != APP_ERROR_NONE) {
VideoLogInfo("[ERR] app_efl_main().");
return 0;
}
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <fcntl.h>
MP_MAX_VIEW,
} MpLibraryViewType;
-/*static void *pMainLayout = NULL;*/
-/*static void *pNaviFrame = NULL;*/
-/*static void *pConformant = NULL;*/
-
void mp_library_mgr_exit_cb(void)
{
VideoLogInfo("");
- /*///////////////////////////////////////////////////////*/
- /* TO-DO : It needs to include exit call sequence.*/
+ /*/////////////////////////////////////////////////////// */
+ /* TO-DO : It needs to include exit call sequence. */
}
/*//////////////////////////////////////////////////////////////////////////*/
void *mp_library_mgr_init(void)
{
- /*Evas_Object *pConformant = (Evas_Object*)mp_mgr_get_conformant();*/
-
- /*pMainLayout = MpLibraryViewMgrCreateMainLayout(pConformant);*/
-
mp_library_mgr_set_value();
Evas_Object *pParent = (Evas_Object *) mp_mgr_get_library_parent();
Evas_Object *pNaviFrame = elm_naviframe_add(pParent);
evas_object_size_hint_align_set(pNaviFrame, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pNaviFrame, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
- /*elm_object_part_content_set(pParent, "elm.swallow.content", pNaviFrame);*/
+ EVAS_HINT_EXPAND);
elm_naviframe_prev_btn_auto_pushed_set(pNaviFrame, EINA_FALSE);
evas_object_show(pNaviFrame);
if (pNaviFrame) {
evas_object_del(pNaviFrame);
- /*pNaviFrame = NULL;*/
}
}
if (retcode != SYSTEM_SETTINGS_ERROR_NONE) {
VideoLogInfo
- ("[ERR] failed to get updated language!!! [retcode = retcode]",
- retcode);
+ ("[ERR] failed to get updated language!!! [retcode = retcode]",
+ retcode);
} else {
if (locale) {
elm_language_set(locale);
void mp_library_mgr_pause_wall_render(void)
{
VideoLogInfo("");
-#ifdef VS_FEATURE_THUMBNAIL_VIEW /**/
+#ifdef VS_FEATURE_THUMBNAIL_VIEW /**/
int nViewType = mp_view_as_ctrl_get_type();
if (nViewType == MP_LIST_VIEW_AS_THUMBNAIL_LIST) {
}
-#endif /**/
+#endif /**/
}
void mp_library_mgr_resume_wall_render(void)
{
VideoLogInfo("");
-#ifdef VS_FEATURE_THUMBNAIL_VIEW /**/
+#ifdef VS_FEATURE_THUMBNAIL_VIEW /**/
int nViewType = mp_view_as_ctrl_get_type();
if (nViewType == MP_LIST_VIEW_AS_THUMBNAIL_LIST) {
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
#include <glib.h>
#include "vp-util.h"
typedef struct _VideoDetailView {
- /*obj*/
+ /*obj */
void *pNaviFrameHandle;
void *pNaviFrameItem;
Evas_Object *pGenList;
Evas_Object *pBox;
- /*data*/
+ /*data */
Elm_Genlist_Item_Class *stDetailItc;
mpDetailViewCbFunc DetailViewUserCbFunc;
stDetailInfo *pDetailInfo;
/*//////////////////////////////////////////////////////////*/
/* Internal function*/
/*//////////////////////////////////////////////////////////*/
-static void __mp_detail_view_rotate_cb(void *data, Evas_Object *obj,
- void *event_info);
+static void __mp_detail_view_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info);
static Eina_Bool __mp_detail_view_cancel_btn_cb(void *pUserData,
- Elm_Object_Item *pItem);
-/*static void __mp_detail_view_mouse_up_cb(void *pUserData, Evas *pEvas, Evas_Object *pObject, void *pEventInfo);*/
+ Elm_Object_Item * pItem);
void mp_detail_view_delete_handle(void)
{
}
evas_object_smart_callback_del((Evas_Object *)
- mp_util_get_main_window_handle(),
- "rotation,changed",
- __mp_detail_view_rotate_cb);
+ mp_util_get_main_window_handle(),
+ "rotation,changed",
+ __mp_detail_view_rotate_cb);
if (g_pDetailViewHandle->pDetailInfo) {
mp_detail_view_free_detail_info(g_pDetailViewHandle->pDetailInfo);
}
evas_object_smart_callback_del((Evas_Object *)
- mp_util_get_main_window_handle(),
- "rotation,changed",
- __mp_detail_view_rotate_cb);
+ mp_util_get_main_window_handle(),
+ "rotation,changed",
+ __mp_detail_view_rotate_cb);
if (g_pDetailViewHandle->pDetailInfo) {
mp_detail_view_free_detail_info(g_pDetailViewHandle->pDetailInfo);
}
static char *__mp_detail_view_genlist_text_get_cb(const void *pUserData,
- Evas_Object *pObj,
- const char *pPart)
+ Evas_Object * pObj,
+ const char *pPart)
{
if (!pUserData || !g_pDetailViewHandle) {
VideoLogError("pUserData is NULL");
} else if (!g_strcmp0(szTxt, VIDEOS_DETAILVIEW_BODY_FORMAT)) {
if (pDetailInfo->szFormat)
return elm_entry_utf8_to_markup(pDetailInfo->szFormat);
- }
- /*else if (!g_strcmp0(szTxt, VIDEOS_DETAILVIEW_BODY_DATE)) {
- if (pDetailInfo->szDate)
- return elm_entry_utf8_to_markup(pDetailInfo->szDate);
- } */
- else if (!g_strcmp0(szTxt, VIDEOS_DETAILVIEW_BODY_SIZE)) {
+ } else if (!g_strcmp0(szTxt, VIDEOS_DETAILVIEW_BODY_SIZE)) {
if (pDetailInfo->szSize)
return elm_entry_utf8_to_markup(pDetailInfo->szSize);
} else if (!g_strcmp0(szTxt, VIDEOS_DETAILVIEW_BODY_RESOLUTION)) {
if (pDetailInfo->szResolution)
- return elm_entry_utf8_to_markup(pDetailInfo->
- szResolution);
+ return elm_entry_utf8_to_markup(pDetailInfo->szResolution);
} else if (!g_strcmp0(szTxt, VIDEOS_DETAILVIEW_BODY_LAST_MODIFIED)) {
if (pDetailInfo->szLastModifiedTime)
- return elm_entry_utf8_to_markup(pDetailInfo->
- szLastModifiedTime);
+ return
+ elm_entry_utf8_to_markup
+ (pDetailInfo->szLastModifiedTime);
} else if (!g_strcmp0(szTxt, VIDEOS_DETAILVIEW_BODY_LOCATION)) {
if (pDetailInfo->szLocation)
return elm_entry_utf8_to_markup(pDetailInfo->szLocation);
}
- /*else if (!g_strcmp0(szTxt, VIDEOS_DETAILVIEW_BODY_LATITUDE)) {
- if (pDetailInfo->szLatitude) {
- if (atof(pDetailInfo->szLatitude) != VIDEO_DETAIL_VALUE_GPS_DEFAULT)
- return elm_entry_utf8_to_markup(pDetailInfo->szLatitude);
- else
- return g_strdup(VIDEOS_DETAILVIEW_BODY_UNKNOWN);
- }
- }
- else if (!g_strcmp0(szTxt, VIDEOS_DETAILVIEW_BODY_LONGITUDE)) {
- if (pDetailInfo->szLongitude) {
- if (atof(pDetailInfo->szLongitude) != VIDEO_DETAIL_VALUE_GPS_DEFAULT)
- return elm_entry_utf8_to_markup(pDetailInfo->szLongitude);
- else
- return g_strdup(VIDEOS_DETAILVIEW_BODY_UNKNOWN);
- }
- } */
}
return NULL;
}
static Eina_Bool __mp_detail_view_cancel_btn_cb(void *pUserData,
- Elm_Object_Item *pItem)
+ Elm_Object_Item * pItem)
{
if (g_pDetailViewHandle && g_pDetailViewHandle->DetailViewUserCbFunc) {
g_pDetailViewHandle->DetailViewUserCbFunc();
}
static void __mp_detail_view_genlist_realized(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
if (!event_info || !obj) {
VideoLogError("event info is invalid");
if (pItem) {
elm_object_item_signal_emit(pItem, "elm,state,bottomline,hide",
- "");
+ "");
}
}
-static bool __mp_detail_view_add_genlist_item(Evas_Object *pObj,
- MpListViewAsType nViewType)
+static bool __mp_detail_view_add_genlist_item(Evas_Object * pObj,
+ MpListViewAsType nViewType)
{
- if (!pObj || !g_pDetailViewHandle
- || !g_pDetailViewHandle->pDetailInfo) {
+ if (!pObj || !g_pDetailViewHandle || !g_pDetailViewHandle->pDetailInfo) {
VideoLogError("g_pDetailViewHandle is NULL");
return FALSE;
}
if (!g_pDetailViewHandle->isFolder) {
pItem =
elm_genlist_item_append(pObj,
- g_pDetailViewHandle->stDetailItc,
- (void *) VIDEOS_DETAILVIEW_BODY_TITLE,
- NULL, ELM_GENLIST_ITEM_NONE, NULL,
- NULL);
+ g_pDetailViewHandle->stDetailItc,
+ (void *) VIDEOS_DETAILVIEW_BODY_TITLE,
+ NULL, ELM_GENLIST_ITEM_NONE, NULL,
+ NULL);
elm_genlist_item_select_mode_set(pItem,
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
nListCount++;
pItem =
elm_genlist_item_append(pObj,
- g_pDetailViewHandle->stDetailItc,
- (void *) VIDEOS_DETAILVIEW_BODY_SIZE,
- NULL, ELM_GENLIST_ITEM_NONE, NULL,
- NULL);
+ g_pDetailViewHandle->stDetailItc,
+ (void *) VIDEOS_DETAILVIEW_BODY_SIZE,
+ NULL, ELM_GENLIST_ITEM_NONE, NULL,
+ NULL);
elm_genlist_item_select_mode_set(pItem,
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
nListCount++;
pItem =
elm_genlist_item_append(pObj,
- g_pDetailViewHandle->stDetailItc,
- (void *)
- VIDEOS_DETAILVIEW_BODY_FORMAT, NULL,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ g_pDetailViewHandle->stDetailItc,
+ (void *)
+ VIDEOS_DETAILVIEW_BODY_FORMAT, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
elm_genlist_item_select_mode_set(pItem,
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
nListCount++;
pItem =
elm_genlist_item_append(pObj,
- g_pDetailViewHandle->stDetailItc,
- (void *)
- VIDEOS_DETAILVIEW_BODY_RESOLUTION,
- NULL, ELM_GENLIST_ITEM_NONE, NULL,
- NULL);
+ g_pDetailViewHandle->stDetailItc,
+ (void *)
+ VIDEOS_DETAILVIEW_BODY_RESOLUTION,
+ NULL, ELM_GENLIST_ITEM_NONE, NULL,
+ NULL);
elm_genlist_item_select_mode_set(pItem,
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
nListCount++;
- /*pItem = elm_genlist_item_append(pObj, g_pDetailViewHandle->stDetailItc, (void *)VIDEOS_DETAILVIEW_BODY_DATE, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- elm_genlist_item_select_mode_set(pItem, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
- nListCount++; */
-
pItem =
elm_genlist_item_append(pObj,
- g_pDetailViewHandle->stDetailItc,
- (void *)
- VIDEOS_DETAILVIEW_BODY_LAST_MODIFIED,
- NULL, ELM_GENLIST_ITEM_NONE, NULL,
- NULL);
+ g_pDetailViewHandle->stDetailItc,
+ (void *)
+ VIDEOS_DETAILVIEW_BODY_LAST_MODIFIED,
+ NULL, ELM_GENLIST_ITEM_NONE, NULL,
+ NULL);
elm_genlist_item_select_mode_set(pItem,
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
nListCount++;
pItem =
elm_genlist_item_append(pObj,
- g_pDetailViewHandle->stDetailItc,
- (void *)
- VIDEOS_DETAILVIEW_BODY_LOCATION, NULL,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ g_pDetailViewHandle->stDetailItc,
+ (void *)
+ VIDEOS_DETAILVIEW_BODY_LOCATION, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
elm_genlist_item_select_mode_set(pItem,
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
nListCount++;
- /*pItem = elm_genlist_item_append(pObj, g_pDetailViewHandle->stDetailItc, (void *)_(VIDEOS_DETAILVIEW_BODY_LATITUDE), NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- elm_genlist_item_select_mode_set(pItem, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
- nListCount++;
-
- pItem = elm_genlist_item_append(pObj, g_pDetailViewHandle->stDetailItc, (void *)_(VIDEOS_DETAILVIEW_BODY_LONGITUDE), NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- elm_genlist_item_select_mode_set(pItem, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
- nListCount++; */
} else {
pItem =
elm_genlist_item_append(pObj,
- g_pDetailViewHandle->stDetailItc,
- (void *) VIDEOS_DETAILVIEW_BODY_TITLE,
- NULL, ELM_GENLIST_ITEM_NONE, NULL,
- NULL);
+ g_pDetailViewHandle->stDetailItc,
+ (void *) VIDEOS_DETAILVIEW_BODY_TITLE,
+ NULL, ELM_GENLIST_ITEM_NONE, NULL,
+ NULL);
elm_genlist_item_select_mode_set(pItem,
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
nListCount++;
if (pDetailInfo->szSize) {
pItem =
elm_genlist_item_append(pObj,
- g_pDetailViewHandle->stDetailItc,
- (void *)
- VIDEOS_DETAILVIEW_BODY_SIZE, NULL,
- ELM_GENLIST_ITEM_NONE, NULL,
- NULL);
+ g_pDetailViewHandle->stDetailItc,
+ (void *)
+ VIDEOS_DETAILVIEW_BODY_SIZE, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
elm_genlist_item_select_mode_set(pItem,
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
nListCount++;
}
pItem =
elm_genlist_item_append(pObj,
- g_pDetailViewHandle->stDetailItc,
- (void *)
- VIDEOS_DETAILVIEW_BODY_LOCATION, NULL,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ g_pDetailViewHandle->stDetailItc,
+ (void *)
+ VIDEOS_DETAILVIEW_BODY_LOCATION, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
elm_genlist_item_select_mode_set(pItem,
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
nListCount++;
}
return TRUE;
}
-static void __mp_detail_view_rotate_cb(void *data, Evas_Object *obj,
- void *event_info)
+static void __mp_detail_view_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
if (!g_pDetailViewHandle) {
VideoLogError("__mp_detail_view_rotate_cb IS null");
return;
}
mp_widget_ctrl_set_popup_min_size(g_pDetailViewHandle->pBox,
- g_pDetailViewHandle->nListCount,
- VIDEOS_POPUP_114);
+ g_pDetailViewHandle->nListCount,
+ VIDEOS_POPUP_114);
}
/* External function*/
/*//////////////////////////////////////////////////////////*/
-void mp_detail_view_free_detail_info(stDetailInfo *pDetailInfo)
+void mp_detail_view_free_detail_info(stDetailInfo * pDetailInfo)
{
if (pDetailInfo) {
MP_FREE_STRING(pDetailInfo->szTitle);
- /*MP_FREE_STRING(pDetailInfo->szDate);*/
MP_FREE_STRING(pDetailInfo->szFormat);
MP_FREE_STRING(pDetailInfo->szSize);
MP_FREE_STRING(pDetailInfo->szResolution);
- /*MP_FREE_STRING(pDetailInfo->szLatitude);*/
- /*MP_FREE_STRING(pDetailInfo->szLongitude);*/
MP_FREE_STRING(pDetailInfo->szLocation);
MP_FREE_STRING(pDetailInfo);
}
}
-static void __mp_detail_view_base_layout_del_cb(void *pUserData, Evas *e,
- Evas_Object *pObject,
- void *pEventInfo)
+static void __mp_detail_view_base_layout_del_cb(void *pUserData, Evas * e,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
__mp_detail_view_reset();
}
-void __mp_details_soft_back_button_cb(void *data, Evas_Object *obj,
- const char *emission,
- const char *source)
+void __mp_details_soft_back_button_cb(void *data, Evas_Object * obj,
+ const char *emission,
+ const char *source)
{
Evas_Object *pTopNaviFrame = NULL;
pTopNaviFrame =
}
void mp_detail_view_push(void *pNaviFrame, bool IsFolder,
- const char *pMediaId, stDetailInfo *pDetailInfo)
+ const char *pMediaId, stDetailInfo * pDetailInfo)
{
VideoLogInfo("");
return;
}
mp_detail_view_delete_handle();
- g_pDetailViewHandle =
- (stDetailView *) calloc(1, sizeof(stDetailView));
+ g_pDetailViewHandle = (stDetailView *) calloc(1, sizeof(stDetailView));
if (!g_pDetailViewHandle) {
VideoLogError("g_pDetailViewHandle is NULL");
return;
if (IsFolder) {
VideoSecureLogInfo("%s,%s %s", pDetailInfo->szTitle,
- pDetailInfo->szSize, pDetailInfo->szLocation);
+ pDetailInfo->szSize, pDetailInfo->szLocation);
g_pDetailViewHandle->pDetailInfo->szTitle =
g_strdup(pDetailInfo->szTitle);
g_pDetailViewHandle->pDetailInfo->szSize =
g_strdup(pDetailInfo->szLocation);
} else {
VideoSecureLogInfo("%s,%s,%s,%s,%s", pDetailInfo->szTitle,
- pDetailInfo->szFormat,
- pDetailInfo->szResolution,
- pDetailInfo->szLocation);
+ pDetailInfo->szFormat,
+ pDetailInfo->szResolution,
+ pDetailInfo->szLocation);
g_pDetailViewHandle->pDetailInfo->szTitle =
g_strdup(pDetailInfo->szTitle);
- /*g_pDetailViewHandle->pDetailInfo->szDate = g_strdup(pDetailInfo->szDate);*/
g_pDetailViewHandle->pDetailInfo->szFormat =
g_strdup(pDetailInfo->szFormat);
g_pDetailViewHandle->pDetailInfo->szSize =
g_strdup(pDetailInfo->szLastModifiedTime);
g_pDetailViewHandle->pDetailInfo->szResolution =
g_strdup(pDetailInfo->szResolution);
- /*g_pDetailViewHandle->pDetailInfo->szLatitude = g_strdup(pDetailInfo->szLatitude);*/
- /*g_pDetailViewHandle->pDetailInfo->szLongitude = g_strdup(pDetailInfo->szLongitude);*/
g_pDetailViewHandle->pDetailInfo->szLocation =
g_strdup(pDetailInfo->szLocation);
}
g_pDetailViewHandle->isFolder = IsFolder;
evas_object_smart_callback_add((Evas_Object *)
- mp_util_get_main_window_handle(),
- "rotation,changed",
- __mp_detail_view_rotate_cb, NULL);
+ mp_util_get_main_window_handle(),
+ "rotation,changed",
+ __mp_detail_view_rotate_cb, NULL);
- /* Create genlist handle*/
+ /* Create genlist handle */
g_pDetailViewHandle->pGenList =
elm_genlist_add(g_pDetailViewHandle->pNaviFrameHandle);
evas_object_size_hint_weight_set(g_pDetailViewHandle->pGenList,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(g_pDetailViewHandle->pGenList,
- EVAS_HINT_FILL, EVAS_HINT_FILL);
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_smart_callback_add(g_pDetailViewHandle->pGenList,
- "realized",
- __mp_detail_view_genlist_realized,
- NULL);
+ "realized",
+ __mp_detail_view_genlist_realized,
+ NULL);
- elm_genlist_mode_set(g_pDetailViewHandle->pGenList,
- ELM_LIST_COMPRESS);
+ elm_genlist_mode_set(g_pDetailViewHandle->pGenList, ELM_LIST_COMPRESS);
__mp_detail_view_add_genlist_item(g_pDetailViewHandle->pGenList,
- nViewType);
+ nViewType);
evas_object_event_callback_add(g_pDetailViewHandle->pGenList,
- EVAS_CALLBACK_DEL,
- __mp_detail_view_base_layout_del_cb,
- NULL);
+ EVAS_CALLBACK_DEL,
+ __mp_detail_view_base_layout_del_cb,
+ NULL);
g_pDetailViewHandle->pNaviFrameItem =
elm_naviframe_item_push(g_pDetailViewHandle->pNaviFrameHandle,
- VIDEOS_DETAILVIEW_HEADER_DETAILS, NULL,
- NULL, g_pDetailViewHandle->pGenList,
- NULL);
+ VIDEOS_DETAILVIEW_HEADER_DETAILS, NULL,
+ NULL, g_pDetailViewHandle->pGenList, NULL);
elm_naviframe_item_pop_cb_set(g_pDetailViewHandle->pNaviFrameItem,
- __mp_detail_view_cancel_btn_cb, NULL);
+ __mp_detail_view_cancel_btn_cb, NULL);
Evas_Object *back_btn =
elm_button_add(g_pDetailViewHandle->pNaviFrameHandle);
elm_object_style_set(back_btn, "back");
elm_object_signal_callback_add(back_btn, "elm,action,click", "",
- __mp_details_soft_back_button_cb,
- (void *) g_pDetailViewHandle);
+ __mp_details_soft_back_button_cb,
+ (void *) g_pDetailViewHandle);
elm_object_item_part_content_set(g_pDetailViewHandle->pNaviFrameItem,
- "title_left_btn", back_btn);
+ "title_left_btn", back_btn);
evas_object_show(back_btn);
}
bool mp_detail_view_get_video_detail_info(int nVideoItemIndex,
- stDetailInfo **pDetailInfo)
+ stDetailInfo ** pDetailInfo)
{
char *szFilePath = NULL;
char *szVideoTitle = NULL;
char szTmpFileSize[FORMAT_LEN_MAX] = { 0, };
char *szTmpModifiedTime = NULL;
- /*double dLongitude = 0.0;*/
- /*double dLatitude = 0.0;*/
-
int nWidth = 0;
int nHeight = 0;
stDetailInfo *pDetail = NULL;
szVideoTitle = mp_util_svc_get_video_title(nVideoItemIndex);
mp_info_ctrl_get_file_info(szFilePath, szTmpFileDate,
- FORMAT_LEN_MAX - 1, szTmpFileExtension,
- FORMAT_LEN_MAX - 1, szTmpFileSize,
- FORMAT_LEN_MAX - 1);
+ FORMAT_LEN_MAX - 1, szTmpFileExtension,
+ FORMAT_LEN_MAX - 1, szTmpFileSize,
+ FORMAT_LEN_MAX - 1);
nWidth = mp_util_svc_get_video_item_width(nVideoItemIndex);
nHeight = mp_util_svc_get_video_item_height(nVideoItemIndex);
- /*dLongitude = mp_util_svc_get_video_item_longitude(nVideoItemIndex);*/
- /*dLatitude = mp_util_svc_get_video_item_latitude(nVideoItemIndex);*/
szTmpModifiedTime =
mp_util_svc_get_video_item_modified_time(nVideoItemIndex);
MP_FREE_STRING(szFilePath);
MP_FREE_STRING(szVideoTitle);
VideoLogError("pDetailPopup alloc fail");
+ MP_FREE_STRING(szTmpModifiedTime);
return FALSE;
}
pDetail->szFormat = g_strdup(szTmpStr);
memset(szTmpStr, 0, FORMAT_LEN_MAX);
- /*snprintf(szTmpStr, FORMAT_LEN_MAX-1, "%s", szTmpFileDate);
- pDetail->szDate = g_strdup(szTmpStr);
- memset(szTmpStr, 0, FORMAT_LEN_MAX); */
-
snprintf(szTmpStr, FORMAT_LEN_MAX - 1, "%s", szTmpFileSize);
pDetail->szSize = g_strdup(szTmpStr);
memset(szTmpStr, 0, FORMAT_LEN_MAX);
pDetail->szResolution = g_strdup(szTmpStr);
memset(szTmpStr, 0, FORMAT_LEN_MAX);
- /*snprintf(szTmpStr, FORMAT_LEN_MAX-1, "%f", dLatitude);
- pDetail->szLatitude = g_strdup(szTmpStr);
- memset(szTmpStr, 0, FORMAT_LEN_MAX);
-
- snprintf(szTmpStr, FORMAT_LEN_MAX-1, "%f", dLongitude);
- pDetail->szLongitude = g_strdup(szTmpStr);
- memset(szTmpStr, 0, FORMAT_LEN_MAX); */
*pDetailInfo = pDetail;
return TRUE;
}
bool mp_detail_view_get_folder_detail_info(int nFolderItemIndex,
- stDetailInfo **pDetailInfo)
+ stDetailInfo ** pDetailInfo)
{
int nIndex = 0;
- char *szFolderUrl =
- mp_util_svc_get_video_folder_url(nFolderItemIndex);
+ char *szFolderUrl = mp_util_svc_get_video_folder_url(nFolderItemIndex);
mp_util_svc_destory_video_item_list();
if (szFolderUrl) {
mp_util_svc_extract_video_list_from_folder(szFolderUrl,
- mp_sort_ctrl_get_sort_state
- (), MP_LIST_VIEW_ALL);
+ mp_sort_ctrl_get_sort_state
+ (), MP_LIST_VIEW_ALL);
}
int nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
int nIndex = 0;
bValidMedia =
mp_util_svc_check_valid_media_id(g_pDetailViewHandle->pMediaId,
- eMediaType, &nIndex);
+ eMediaType, &nIndex);
if (!bValidMedia) {
elm_naviframe_item_pop(g_pDetailViewHandle->pNaviFrameHandle);
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <Eina.h>
#include <Ecore_Evas.h>
/* Pre define function*/
int mp_folder_share_view_get_sort_type(void);
bool __mp_folder_share_view_arrange_video_list(void *pGenlist,
- bool bNeedSvc);
+ bool bNeedSvc);
void mp_folder_share_view_naviframe_transition_effect_cb(void *pUserData,
- Evas_Object *
- pObject,
- void
- *pEventInfo);
+ Evas_Object *
+ pObject, void
+ *pEventInfo);
static void __mp_folder_share_view_base_layout_del_cb(void *pUserData,
- Evas *e,
- Evas_Object *
- pObject,
- void *pEventInfo);
+ Evas * e,
+ Evas_Object *
+ pObject,
+ void *pEventInfo);
void mp_folder_share_view_destroy(void)
{
VideoLogInfo("");
if (g_pFolderShareHandle) {
- evas_object_smart_callback_del(g_pFolderShareHandle->
- pNaviFrameHandle,
- "transition,finished",
- mp_folder_share_view_naviframe_transition_effect_cb);
+ evas_object_smart_callback_del
+ (g_pFolderShareHandle->pNaviFrameHandle, "transition,finished",
+ mp_folder_share_view_naviframe_transition_effect_cb);
MP_DEL_OBJ(g_pFolderShareHandle->pGenlist);
MP_DEL_ITC(g_pFolderShareHandle->pGenListItc);
MP_DEL_OBJ(g_pFolderShareWidget->pBox);
if (g_pFolderShareWidget->pBaselayout != NULL) {
- evas_object_event_callback_del(g_pFolderShareWidget->
- pBaselayout, EVAS_CALLBACK_DEL,
- __mp_folder_share_view_base_layout_del_cb);
+ evas_object_event_callback_del
+ (g_pFolderShareWidget->pBaselayout, EVAS_CALLBACK_DEL,
+ __mp_folder_share_view_base_layout_del_cb);
MP_DEL_OBJ(g_pFolderShareWidget->pBaselayout);
}
MP_FREE_STRING(g_pFolderShareWidget);
if (g_pFolderShareHandle) {
mp_util_db_set_update_fun(g_pFolderShareHandle->euLev, NULL);
mp_util_db_set_backup_fun(g_pFolderShareHandle->euLev, NULL);
- evas_object_smart_callback_del(g_pFolderShareHandle->
- pNaviFrameHandle,
- "transition,finished",
- mp_folder_share_view_naviframe_transition_effect_cb);
+ evas_object_smart_callback_del
+ (g_pFolderShareHandle->pNaviFrameHandle, "transition,finished",
+ mp_folder_share_view_naviframe_transition_effect_cb);
g_pFolderShareHandle->pGenlist = NULL;
MP_FREE_STRING(g_pFolderShareHandle);
}
}
static void __mp_folder_share_view_trans_finished_cb(void *pUserData,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
if (!obj) {
VideoLogError("[ERR] g_pFolderShareHandle is NULL.");
mp_widget_ctrl_enable_navi_handle_focus(obj);
evas_object_smart_callback_del(obj, "transition,finished",
- __mp_folder_share_view_trans_finished_cb);
+ __mp_folder_share_view_trans_finished_cb);
}
static Eina_Bool mp_folder_share_view_back_btn_cb(void *pUserData,
- Elm_Object_Item *pItem)
+ Elm_Object_Item * pItem)
{
if (!g_pFolderShareHandle) {
VideoLogInfo("[ERR] g_pFolderShareHandle is NULL.");
return EINA_TRUE;
}
- /* Register transition finished callback.*/
+ /* Register transition finished callback. */
mp_widget_ctrl_disable_navi_handle_focus_except_item
- (g_pFolderShareHandle->pNaviFrameHandle,
- g_pFolderShareHandle->pNaviFrameItem);
+ (g_pFolderShareHandle->pNaviFrameHandle,
+ g_pFolderShareHandle->pNaviFrameItem);
evas_object_smart_callback_add(g_pFolderShareHandle->pNaviFrameHandle,
- "transition,finished",
- __mp_folder_share_view_trans_finished_cb,
- NULL);
+ "transition,finished",
+ __mp_folder_share_view_trans_finished_cb,
+ NULL);
mp_folder_share_view_pop();
}
void mp_folder_share_view_naviframe_transition_effect_cb(void *pUserData,
- Evas_Object *
- pObject,
- void *pEventInfo)
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
if (!g_pFolderShareHandle) {
VideoLogError("[ERR] No exist g_pFolderShareHandle.");
}
pTmpItem =
- elm_naviframe_top_item_get(g_pFolderShareHandle->
- pNaviFrameHandle);
+ elm_naviframe_top_item_get(g_pFolderShareHandle->pNaviFrameHandle);
pTmpContents = elm_object_item_content_get(pTmpItem);
if (pTmpContents) {
if (pTmpContents == g_pFolderShareWidget->pBox) {
} else {
VideoLogInfo
- ("It's not pListShareViaViewTabbarLayout in top screen.");
+ ("It's not pListShareViaViewTabbarLayout in top screen.");
}
} else {
VideoLogError("[ERR] No exist naviframe top item.");
mp_util_svc_destory_video_list();
mp_util_svc_extract_video_list_by_item_type
- (mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
+ (mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
/*refresh folder view */
mp_util_svc_extract_video_folder_list_by_type
- (mp_sort_ctrl_get_sort_state(), MP_LIST_VIEW_ALL);
- __mp_folder_share_view_arrange_video_list(g_pFolderShareHandle->
- pGenlist, FALSE);
+ (mp_sort_ctrl_get_sort_state(), MP_LIST_VIEW_ALL);
+ __mp_folder_share_view_arrange_video_list
+ (g_pFolderShareHandle->pGenlist, FALSE);
VideoLogInfo("");
}
void mp_folder_share_view_select_item_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!g_pFolderShareHandle->pGenlist) {
VideoLogError("No exist genlist object.");
char *szFolderPath = NULL;
szFolderPath = mp_util_svc_get_video_folder_url(nFolderItemIndex);
VideoSecureLogInfo("nFolderItemIndex=%d, szFolderPath=%s",
- nFolderItemIndex, szFolderPath);
+ nFolderItemIndex, szFolderPath);
mp_share_view_push(g_pFolderShareHandle->pNaviFrameHandle,
- __mp_folder_share_view_result_view_update_cb,
- szFolderPath, LIST_TAB_TYPE_PERSONAL);
+ __mp_folder_share_view_result_view_update_cb,
+ szFolderPath, LIST_TAB_TYPE_PERSONAL);
Elm_Object_Item *pSelectedItem =
elm_genlist_selected_item_get(pObject);
}
static char *__mp_folder_share_view_get_label_cb(const void *pUserData,
- Evas_Object *pObject,
- const char *pPart)
+ Evas_Object * pObject,
+ const char *pPart)
{
int nFolderItemIndex = (int) pUserData;
}
static Evas_Object *__mp_folder_share_view_get_icon_cb(const void
- *pUserData,
- Evas_Object *
- pObject,
- const char *pPart)
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char *pPart)
{
int nFolderItemIndex = (int) pUserData;
if (!g_strcmp0(pPart, "elm.icon.1")) {
Evas_Object *pBg = NULL;
char *pThumbIconUri =
mp_util_get_folder_thumbnail(nFolderItemIndex,
- mp_sort_ctrl_get_sort_state());
- char edj_path[1024] = {0};
+ mp_sort_ctrl_get_sort_state());
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_CUSTOM_THEME);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_CUSTOM_THEME);
free(path);
pLayout = elm_layout_add(pObject);
elm_layout_file_set(pLayout, edj_path,
- "listview.thumbnail.layout");
+ "listview.thumbnail.layout");
if (!pThumbIconUri || !vp_file_exists(pThumbIconUri)) {
MP_FREE_STRING(pThumbIconUri);
pBg =
mp_util_create_preload_image(pObject, pThumbIconUri,
- VIDEO_ICON_WIDTH);
+ VIDEO_ICON_WIDTH);
elm_layout_content_set(pLayout, "elm.thumbnail.icon", pBg);
if (pBg)
evas_object_show(pBg);
if (!mp_util_create_folder_sub_icon(pLayout, nFolderItemIndex)) {
VideoLogWarning
- ("Create sub icon is failed. nFolderItemIndex: %d",
- nFolderItemIndex);
+ ("Create sub icon is failed. nFolderItemIndex: %d",
+ nFolderItemIndex);
}
MP_FREE_STRING(pThumbIconUri);
{
switch (mp_sort_ctrl_get_sort_state()) {
- /*case MP_LIST_SORT_BY_RECENTLY_VIEWED:
- g_pFolderShareHandle->nSortType = MP_MEDIA_SORT_BY_RECENTLY_VIEWED;
- break; */
case MP_LIST_SORT_BY_RECENTLY_ADDED:
g_pFolderShareHandle->nSortType = MP_MEDIA_SORT_BY_RECENTLY_ADDED;
g_pFolderShareHandle->nSortType = MP_MEDIA_SORT_BY_NAME;
break;
- /*case MP_LIST_SORT_BY_SIZE:
- g_pFolderShareHandle->nSortType = MP_MEDIA_SORT_BY_SIZE;
- break;
-
- case MP_LIST_SORT_BY_TYPE:
- g_pFolderShareHandle->nSortType = MP_MEDIA_SORT_BY_TYPE;
- break; */
}
return g_pFolderShareHandle->nSortType;
for (nIndex = 0; nIndex < nFolderListSize; nIndex++) {
if (mp_util_svc_get_folder_storage(nIndex) !=
- MP_MEDIA_TYPE_STORAGE_DROPBOX) {
+ MP_MEDIA_TYPE_STORAGE_DROPBOX) {
elm_genlist_item_append(pGenlist,
- g_pFolderShareHandle->pGenListItc,
- (void *) nIndex, NULL,
- ELM_GENLIST_ITEM_NONE,
- mp_folder_share_view_select_item_cb,
- (void *) nIndex);
+ g_pFolderShareHandle->pGenListItc,
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ mp_folder_share_view_select_item_cb,
+ (void *) nIndex);
}
}
}
bool __mp_folder_share_view_arrange_video_list(void *pGenlist,
- bool bNeedSvc)
+ bool bNeedSvc)
{
if (!g_pFolderShareWidget || !g_pFolderShareHandle) {
VideoLogError("No exist g_pShareViaListViewWidget.");
int nVideoListSize = mp_util_svc_get_video_folder_size();
mp_util_svc_destory_video_item_list();
mp_util_svc_extract_video_list_by_item_type
- (mp_folder_share_view_get_sort_type(), MP_LIST_VIEW_PHONE);
+ (mp_folder_share_view_get_sort_type(), MP_LIST_VIEW_PHONE);
#ifdef ENABLE_DRM_FEATURE
mp_util_svc_filter_drm_video_item_list();
#endif
evas_object_del(g_pFolderShareWidget->pBaselayout);
g_pFolderShareWidget->pBaselayout = NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_REMOVE_LIST_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_REMOVE_LIST_EDJ);
free(path);
g_pFolderShareWidget->pBaselayout = elm_layout_add(pParent);
elm_layout_file_set(g_pFolderShareWidget->pBaselayout,
- edj_path,
- REMOVE_LIST_EDJ_GROUP);
+ edj_path, REMOVE_LIST_EDJ_GROUP);
evas_object_size_hint_weight_set(g_pFolderShareWidget->pBaselayout,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(g_pFolderShareWidget->pBaselayout,
- EVAS_HINT_FILL, EVAS_HINT_FILL);
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
return g_pFolderShareWidget->pBaselayout;
}
bool bNormalShow = TRUE;
bNormalShow =
- __mp_folder_share_view_arrange_video_list(g_pFolderShareHandle->
- pGenlist, TRUE);
+ __mp_folder_share_view_arrange_video_list
+ (g_pFolderShareHandle->pGenlist, TRUE);
if (!bNormalShow) {
VideoLogError("invalid view");
return;
return;
}
evas_object_event_callback_add(g_pFolderShareWidget->pBaselayout,
- EVAS_CALLBACK_DEL,
- __mp_folder_share_view_base_layout_del_cb,
- NULL);
+ EVAS_CALLBACK_DEL,
+ __mp_folder_share_view_base_layout_del_cb,
+ NULL);
g_pFolderShareWidget->pBox =
elm_box_add(g_pFolderShareWidget->pBaselayout);
return;
}
evas_object_size_hint_weight_set(g_pFolderShareHandle->pGenlist,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(g_pFolderShareHandle->pGenlist,
- EVAS_HINT_FILL, EVAS_HINT_FILL);
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_genlist_block_count_set(g_pFolderShareHandle->pGenlist,
- VIDEO_GENLIST_BLOCK_COUNT);
+ VIDEO_GENLIST_BLOCK_COUNT);
elm_genlist_mode_set(g_pFolderShareHandle->pGenlist,
- ELM_LIST_COMPRESS);
- elm_genlist_homogeneous_set(g_pFolderShareHandle->pGenlist,
- EINA_TRUE);
+ ELM_LIST_COMPRESS);
+ elm_genlist_homogeneous_set(g_pFolderShareHandle->pGenlist, EINA_TRUE);
elm_box_pack_end(g_pFolderShareWidget->pBox,
- g_pFolderShareHandle->pGenlist);
+ g_pFolderShareHandle->pGenlist);
elm_object_part_content_set(g_pFolderShareWidget->pBaselayout,
- SWALLOW_LISTVIEW_CONTENT,
- g_pFolderShareWidget->pBox);
+ SWALLOW_LISTVIEW_CONTENT,
+ g_pFolderShareWidget->pBox);
bool bNormalShow = TRUE;
bNormalShow =
- __mp_folder_share_view_arrange_video_list(g_pFolderShareHandle->
- pGenlist, FALSE);
+ __mp_folder_share_view_arrange_video_list
+ (g_pFolderShareHandle->pGenlist, FALSE);
if (!bNormalShow) {
VideoLogError("invalid view");
return;
evas_object_show(back_btn);
g_pFolderShareHandle->pNaviFrameItem =
elm_naviframe_item_push(g_pFolderShareHandle->pNaviFrameHandle,
- VIDEOS_SELECTVIEW_HEADER_SELECT, back_btn,
- NULL, g_pFolderShareWidget->pBaselayout,
- NULL);
- elm_object_item_domain_text_translatable_set(g_pFolderShareHandle->
- pNaviFrameItem,
- VIDEOS_STRING,
- EINA_TRUE);
+ VIDEOS_SELECTVIEW_HEADER_SELECT, back_btn,
+ NULL, g_pFolderShareWidget->pBaselayout,
+ NULL);
+ elm_object_item_domain_text_translatable_set
+ (g_pFolderShareHandle->pNaviFrameItem, VIDEOS_STRING, EINA_TRUE);
elm_naviframe_item_pop_cb_set(g_pFolderShareHandle->pNaviFrameItem,
- mp_folder_share_view_back_btn_cb,
- g_pFolderShareHandle);
+ mp_folder_share_view_back_btn_cb,
+ g_pFolderShareHandle);
- elm_naviframe_item_title_enabled_set(g_pFolderShareHandle->
- pNaviFrameItem, EINA_TRUE,
- EINA_FALSE);
+ elm_naviframe_item_title_enabled_set
+ (g_pFolderShareHandle->pNaviFrameItem, EINA_TRUE, EINA_FALSE);
evas_object_smart_callback_add(g_pFolderShareHandle->pNaviFrameHandle,
- "transition,finished",
- mp_folder_share_view_naviframe_transition_effect_cb,
- NULL);
+ "transition,finished",
+ mp_folder_share_view_naviframe_transition_effect_cb,
+ NULL);
evas_object_show(g_pFolderShareHandle->pGenlist);
evas_object_show(g_pFolderShareWidget->pBaselayout);
mp_util_db_set_update_fun(g_pFolderShareHandle->euLev,
- __mp_folder_share_view_db_changed_cb);
+ __mp_folder_share_view_db_changed_cb);
mp_util_hide_indicator();
}
void mp_folder_share_view_push(void *pNaviFrame,
- ChangeListFolderShareViewCbFunc
- pChangeViewCb, MpVideoListTabType eTabType)
+ ChangeListFolderShareViewCbFunc
+ pChangeViewCb, MpVideoListTabType eTabType)
{
VideoLogInfo("");
if (g_pFolderShareHandle || g_pFolderShareWidget) {
g_pFolderShareHandle =
(st_FolderListShareViaViewHandle *) calloc(1,
- sizeof
- (st_FolderListShareViaViewHandle));
+ sizeof
+ (st_FolderListShareViaViewHandle));
g_pFolderShareWidget =
(st_FolderListShareViaViewWidget *) calloc(1,
- sizeof
- (st_FolderListShareViaViewWidget));
+ sizeof
+ (st_FolderListShareViaViewWidget));
memset(g_pFolderShareHandle, 0,
- sizeof(st_FolderListShareViaViewHandle));
+ sizeof(st_FolderListShareViaViewHandle));
memset(g_pFolderShareWidget, 0,
- sizeof(st_FolderListShareViaViewWidget));
+ sizeof(st_FolderListShareViaViewWidget));
mp_folder_share_view_reset_value();
g_pFolderShareHandle->pNaviFrameHandle = pNaviFrame;
VideoLogInfo("");
elm_object_item_domain_translatable_part_text_set
- (g_pFolderShareHandle->pNaviFrameItem, "elm.text.title",
- VIDEOS_STRING, VIDEOS_SELECTVIEW_HEADER_SELECT_IDS);
+ (g_pFolderShareHandle->pNaviFrameItem, "elm.text.title",
+ VIDEOS_STRING, VIDEOS_SELECTVIEW_HEADER_SELECT_IDS);
}
static void __mp_folder_share_view_base_layout_del_cb(void *pUserData,
- Evas *e,
- Evas_Object *
- pObject,
- void *pEventInfo)
+ Evas * e,
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
__mp_folder_share_view_reset();
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
#include <Ecore_Evas.h>
typedef struct _PersonalPage {
- /*obj*/
+ /*obj */
Evas_Object *pProgressbar;
Evas_Object *pPopUpHandle;
Evas_Object *pPopupLayout;
- /*data*/
+ /*data */
Ecore_Idler *pMoveItemIdlerHandle;
Ecore_Timer *pStartMoveTimer;
Ecore_Idler *pFinishMoveIdler;
/* Internal function*/
/*//////////////////////////////////////////////////////////*/
static void mp_personal_ctrl_button_popup_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo);
+ Evas_Object * pObject,
+ void *pEventInfo);
void mp_personal_ctrl_move_popup_handle(void)
{
if (g_mpPersonalPage->pPopUpHandle) {
eext_object_event_callback_del(g_mpPersonalPage->pPopUpHandle,
- EEXT_CALLBACK_BACK,
- mp_personal_ctrl_button_popup_cb);
+ EEXT_CALLBACK_BACK,
+ mp_personal_ctrl_button_popup_cb);
}
MP_DEL_IDLER(g_mpPersonalPage->pMoveItemIdlerHandle);
MP_DEL_TIMER(g_mpPersonalPage->pStartMoveTimer);
MP_DEL_IDLER(g_mpPersonalPage->pFinishMoveIdler);
MP_DEL_IDLER(g_mpPersonalPage->pMoveFailedIdler);
- /*MP_DEL_TIMER(pProgressbarTimer);*/
MP_DEL_OBJ(g_mpPersonalPage->pPopUpHandle);
if (g_mpPersonalPage->PersonalCtrlUserCbFunc) {
g_mpPersonalPage->PersonalCtrlUserCbFunc();
}
static void mp_personal_ctrl_button_popup_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!g_mpPersonalPage) {
VideoLogError("");
g_mpPersonalPage->bCancelMove = TRUE;
mp_util_move_set_cancel_state(g_mpPersonalPage->bCancelMove);
- /*if (g_mpPersonalPage->pMoveItemThreadHandle)
- {
- ecore_thread_cancel(g_mpPersonalPage->pMoveItemThreadHandle);
- } */
}
static void __mp_personal_ctrl_update_percent(bool bUpdateFile,
- bool bUpdateSize)
+ bool bUpdateSize)
{
if (!g_mpPersonalPage || !g_mpPersonalPage->pPopupLayout) {
VideoLogError("");
}
szSisePercent = g_strdup_printf("%d%s", (int) nPercent, "%");
elm_object_part_text_set(g_mpPersonalPage->pPopupLayout,
- "elm.text.left", szSisePercent);
+ "elm.text.left", szSisePercent);
}
if (bUpdateFile) {
if (g_mpPersonalPage->nCompltedMoveItem + 1 >
- g_mpPersonalPage->nTotalMoveItem) {
+ g_mpPersonalPage->nTotalMoveItem) {
g_mpPersonalPage->nCompltedMoveItem =
g_mpPersonalPage->nTotalMoveItem - 1;
}
szFilePercent =
g_strdup_printf("%d/%d",
- (g_mpPersonalPage->nCompltedMoveItem + 1),
- g_mpPersonalPage->nTotalMoveItem);
+ (g_mpPersonalPage->nCompltedMoveItem + 1),
+ g_mpPersonalPage->nTotalMoveItem);
elm_object_part_text_set(g_mpPersonalPage->pPopupLayout,
- "elm.text.right", szFilePercent);
+ "elm.text.right", szFilePercent);
}
MP_FREE_STRING(szSisePercent);
MP_FREE_STRING(szFilePercent);
}
static void __mp_personal_ctrl_warning_popup_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
mp_util_delete_popup_handle();
g_mpPersonalPage->pMoveFailedIdler = NULL;
if (g_mpPersonalPage->nPersonalViewStyle == 1) {
mp_util_notify_popup(NULL, VIDEOS_COMMON_HEADER_ERROR,
- VIDEOS_NOTIPOP_MSG_MOVE_TO_NORMAL_STORAGE_FAILED,
- __mp_personal_ctrl_warning_popup_cb);
+ VIDEOS_NOTIPOP_MSG_MOVE_TO_NORMAL_STORAGE_FAILED,
+ __mp_personal_ctrl_warning_popup_cb);
} else {
mp_util_notify_popup(NULL, VIDEOS_COMMON_HEADER_ERROR,
- VIDEOS_NOTIPOP_MSG_MOVE_TO_PERSONAL_STORAGE_FAILED,
- __mp_personal_ctrl_warning_popup_cb);
+ VIDEOS_NOTIPOP_MSG_MOVE_TO_PERSONAL_STORAGE_FAILED,
+ __mp_personal_ctrl_warning_popup_cb);
}
return FALSE;
}
static void __mp_personal_ctrl_move_cb(euThreadFeedback msg_type,
- unsigned long long size,
- int nErrorCode, void *userData)
+ unsigned long long size,
+ int nErrorCode, void *userData)
{
if (!g_mpPersonalPage) {
VideoLogError("");
if (nErrorCode == -1 || msg_type == MP_VIDEO_UPDATE_FAILED) {
ecore_thread_feedback(g_mpPersonalPage->pMoveItemThreadHandle,
- (void *) MP_VIDEO_UPDATE_FAILED);
+ (void *) MP_VIDEO_UPDATE_FAILED);
} else if (nErrorCode == 1 || msg_type == MP_VIDEO_UPDATE_CANCEL) {
ecore_thread_cancel(g_mpPersonalPage->pMoveItemThreadHandle);
} else if (nErrorCode == 0 || msg_type == MP_VIDEO_UPDATE) {
ecore_thread_feedback(g_mpPersonalPage->pMoveItemThreadHandle,
- (void *) MP_VIDEO_UPDATE);
+ (void *) MP_VIDEO_UPDATE);
}
}
static bool __mp_personal_ctrl_move_get_total_size(unsigned long long
- *nTotalSize)
+ *nTotalSize)
{
if (!g_mpPersonalPage) {
char *szFileUrl = NULL;
if (g_mpPersonalPage->bFolderMove) {
for (nCounter = 0;
- nCounter < g_mpPersonalPage->nCheckedEditListSize;
- nCounter++) {
+ nCounter < g_mpPersonalPage->nCheckedEditListSize;
+ nCounter++) {
if (g_mpPersonalPage->pCheckedItemsEditList[nCounter]) {
szTmpFolderUrl =
mp_util_svc_get_video_folder_url(nCounter);
- mp_util_move_get_total_dir_size(szTmpFolderUrl,
- &nSizeTmp);
+ mp_util_move_get_total_dir_size(szTmpFolderUrl, &nSizeTmp);
MP_FREE_STRING(szTmpFolderUrl);
nSize += nSizeTmp;
}
}
} else {
for (nCounter = 0;
- nCounter < g_mpPersonalPage->nCheckedEditListSize;
- nCounter++) {
+ nCounter < g_mpPersonalPage->nCheckedEditListSize;
+ nCounter++) {
if (g_mpPersonalPage->pCheckedItemsEditList[nCounter]) {
nSizeTmp = mp_util_svc_get_video_item_size(nCounter);
nSize += nSizeTmp;
- /*Support subtitle size.*/
+ /*Support subtitle size. */
nSizeTmp = 0;
szFileUrl = mp_util_svc_get_video_url(nCounter);
mp_util_get_subtitle_path(szFileUrl, &szSubTitle);
}
static void __mp_personal_ctrl_move_item_thread_main_cb(void *pUserData,
- Ecore_Thread *
- thread)
+ Ecore_Thread *
+ thread)
{
if (!g_mpPersonalPage) {
VideoLogError("");
VideoLogError("The userdata and pCheckedItemsEditList is null.");
ecore_thread_feedback(g_mpPersonalPage->pMoveItemThreadHandle,
- (void *) MP_VIDEO_UPDATE_ERROR);
+ (void *) MP_VIDEO_UPDATE_ERROR);
return;
}
unsigned long long nSize = 0;
g_mpPersonalPage->nMovingSize = 0;
VideoLogInfo("nMovefolderTotal:%lld", g_mpPersonalPage->nTotalSize);
- /*mp_util_svc_print_list_info();*/
+ /*mp_util_svc_print_list_info(); */
int nCounter = 0;
char *pDestFile = NULL;
char *szFileUrl = NULL;
int nRet = FALSE;
while ((g_mpPersonalPage->nCompltedMoveItem <
g_mpPersonalPage->nTotalMoveItem)
- && (!g_mpPersonalPage->bCancelMove)) {
+ && (!g_mpPersonalPage->bCancelMove)) {
nCounter = 0;
for (nCounter = 0;
- nCounter < g_mpPersonalPage->nCheckedEditListSize;
- nCounter++) {
+ nCounter < g_mpPersonalPage->nCheckedEditListSize;
+ nCounter++) {
if (g_mpPersonalPage->pCheckedItemsEditList[nCounter]) {
__mp_personal_ctrl_update_percent(TRUE, FALSE);
if (g_mpPersonalPage->bFolderMove) {
szTmpFolderUrl =
mp_util_svc_get_video_folder_url(nCounter);
VideoSecureLogInfo
- ("pRemoveCheckedItemsEditListmove=%s,%d",
- szTmpFolderUrl, nCounter);
+ ("pRemoveCheckedItemsEditListmove=%s,%d",
+ szTmpFolderUrl, nCounter);
bPersonal =
mp_util_check_video_personal_status
if (bPersonal) {
pDestFile = g_strdup(VIDEO_DOWNLOAD_FILE_DIR);
} else {
- pDestFile =
- g_strdup(VIDEO_UTIL_PERSONAL_HEAD_STR);
+ pDestFile = g_strdup(VIDEO_UTIL_PERSONAL_HEAD_STR);
}
nRet =
mp_util_move_push(szTmpFolderUrl, pDestFile,
- __mp_personal_ctrl_move_cb,
- pUserData,
- g_mpPersonalPage->nTotalSize);
+ __mp_personal_ctrl_move_cb,
+ pUserData,
+ g_mpPersonalPage->nTotalSize);
if (nRet == -1) {
VideoLogInfo("move failed");
MP_FREE_STRING(pDestFile);
MP_FREE_STRING(szTmpFolderUrl);
- ecore_thread_feedback(g_mpPersonalPage->
- pMoveItemThreadHandle,
- (void *)
- MP_VIDEO_UPDATE_FAILED);
+ ecore_thread_feedback
+ (g_mpPersonalPage->pMoveItemThreadHandle,
+ (void *)
+ MP_VIDEO_UPDATE_FAILED);
return;
- /*usleep(100000);*/
} else if (nRet == 0) {
mp_util_svc_remove_folder_list_item_from_list
- (nCounter);
+ (nCounter);
vp_file_recursive_rm(szTmpFolderUrl);
} else if (nRet == 1) {
VideoLogInfo("move cancel");
MP_FREE_STRING(pDestFile);
MP_FREE_STRING(szTmpFolderUrl);
- ecore_thread_cancel(g_mpPersonalPage->
- pMoveItemThreadHandle);
+ ecore_thread_cancel
+ (g_mpPersonalPage->pMoveItemThreadHandle);
return;
}
MP_FREE_STRING(pDestFile);
} else {
szFileUrl = mp_util_svc_get_video_url(nCounter);
VideoSecureLogInfo
- ("pRemoveCheckedItemsEditListmove=%s,%d",
- szFileUrl, nCounter);
+ ("pRemoveCheckedItemsEditListmove=%s,%d",
+ szFileUrl, nCounter);
if (szFileUrl) {
szMediaUrlForPreview =
mp_util_config_get_preview();
if (szMediaUrlForPreview) {
if (!strcmp(szMediaUrlForPreview, szFileUrl)
- && !bPersonal) {
+ && !bPersonal) {
VideoLogInfo("Erase preview url.");
mp_util_config_set_preview(NULL);
}
MP_FREE_STRING(szMediaUrlForPreview);
bPersonal =
- mp_util_check_video_personal_status
- (szFileUrl);
+ mp_util_check_video_personal_status(szFileUrl);
if (bPersonal) {
pDestFile = g_strdup(VIDEO_DOWNLOAD_FILE_DIR);
nRet =
mp_util_move_push(szFileUrl, pDestFile,
- __mp_personal_ctrl_move_cb,
- pUserData,
- g_mpPersonalPage->
- nTotalSize);
+ __mp_personal_ctrl_move_cb,
+ pUserData,
+ g_mpPersonalPage->nTotalSize);
if (nRet == -1) {
VideoLogInfo("move failed");
MP_FREE_STRING(pDestFile);
MP_FREE_STRING(szFileUrl);
- ecore_thread_feedback(g_mpPersonalPage->
- pMoveItemThreadHandle,
- (void *)
- MP_VIDEO_UPDATE_FAILED);
+ ecore_thread_feedback
+ (g_mpPersonalPage->pMoveItemThreadHandle,
+ (void *)
+ MP_VIDEO_UPDATE_FAILED);
return;
- /*usleep(100000);*/
} else if (nRet == 0) {
mp_util_svc_remove_list_item_from_list
- (nCounter);
+ (nCounter);
unlink(szFileUrl);
} else if (nRet == 1) {
VideoLogInfo("move cancel");
MP_FREE_STRING(pDestFile);
MP_FREE_STRING(szFileUrl);
- ecore_thread_cancel(g_mpPersonalPage->
- pMoveItemThreadHandle);
+ ecore_thread_cancel
+ (g_mpPersonalPage->pMoveItemThreadHandle);
return;
}
VideoSecureLogInfo("Move file url : %s:%s",
- szFileUrl, pDestFile);
- /*Support subtitle moving, But only for file, folder has been implemented in move.c.*/
- /*begin*/
+ szFileUrl, pDestFile);
+ /*Support subtitle moving, But only for file, folder has been implemented in move.c. */
+ /*begin */
mp_util_get_subtitle_path(szFileUrl, &szSubTitle);
if (szSubTitle) {
nRet =
mp_util_move_push(szSubTitle, pDestFile,
- __mp_personal_ctrl_move_cb,
- pUserData,
- g_mpPersonalPage->
- nTotalSize);
+ __mp_personal_ctrl_move_cb,
+ pUserData,
+ g_mpPersonalPage->nTotalSize);
VideoLogInfo("szSubTitle move result = %d",
- nRet);
+ nRet);
}
MP_FREE_STRING(szSubTitle);
- /*end*/
+ /*end */
MP_FREE_STRING(pDestFile);
MP_FREE_STRING(szFileUrl);
}
int nMoveItemCounter = 0;
for (nMoveItemCounter = nCounter;
- nMoveItemCounter <
- g_mpPersonalPage->nCheckedEditListSize - 1;
- nMoveItemCounter++) {
- g_mpPersonalPage->
- pCheckedItemsEditList[nMoveItemCounter] =
- g_mpPersonalPage->
- pCheckedItemsEditList[nMoveItemCounter + 1];
+ nMoveItemCounter <
+ g_mpPersonalPage->nCheckedEditListSize - 1;
+ nMoveItemCounter++) {
+ g_mpPersonalPage->pCheckedItemsEditList
+ [nMoveItemCounter] =
+ g_mpPersonalPage->pCheckedItemsEditList
+ [nMoveItemCounter + 1];
}
g_mpPersonalPage->nCheckedEditListSize--;
++g_mpPersonalPage->nCompltedMoveItem;
}
if (g_mpPersonalPage->nCompltedMoveItem >=
- g_mpPersonalPage->nTotalMoveItem) {
+ g_mpPersonalPage->nTotalMoveItem) {
VideoLogInfo("nCompltedMoveItem == nTotalMoveItem");
ecore_thread_feedback(g_mpPersonalPage->pMoveItemThreadHandle,
- (void *) MP_VIDEO_UPDATE_FINISH);
+ (void *) MP_VIDEO_UPDATE_FINISH);
return;
}
}
}
static void __mp_personal_ctrl_move_thread_cancel(void *data,
- Ecore_Thread *thread)
+ Ecore_Thread * thread)
{
if (!g_mpPersonalPage) {
VideoLogError("");
return;
}
VideoLogInfo("");
- /*ecore_thread_feedback(g_mpPersonalPage->pMoveItemThreadHandle, (void *)MP_VIDEO_PERSONAL_UPDATE_CANCEL);*/
- /*g_mpPersonalPage->bCancelMove = TRUE;*/
mp_personal_ctrl_move_popup_handle();
}
static void __mp_personal_ctrl_move_thread_finish(void *pUserData,
- Ecore_Thread *thread)
+ Ecore_Thread * thread)
{
if (!g_mpPersonalPage) {
VideoLogError("");
return;
}
VideoLogInfo("");
- /*sleep 0.2s to wait for cancel and failed signal.*/
- /*MP_DEL_IDLER(g_mpPersonalPage->pFinishMoveIdler);*/
- /*g_mpPersonalPage->pFinishMoveIdler = ecore_idler_add(__mp_personal_ctrl_finish_move_idler_cb, pUserData);*/
-
}
static void __mp_personal_ctrl_thread_notify_cb(void *pUserData,
- Ecore_Thread *thread,
- void *msg_data)
+ Ecore_Thread * thread,
+ void *msg_data)
{
if (!g_mpPersonalPage) {
VideoLogError("");
((double) g_mpPersonalPage->nMovingSize) /
((double) g_mpPersonalPage->nTotalSize);
__mp_personal_ctrl_update_percent(FALSE, TRUE);
- /*VideoLogInfo("nMoveRate:%f:%lld:%lld", nMoveRate, g_mpPersonalPage->nMovingSize, g_mpPersonalPage->nTotalSize);*/
+ /*VideoLogInfo("nMoveRate:%f:%lld:%lld", nMoveRate, g_mpPersonalPage->nMovingSize, g_mpPersonalPage->nTotalSize); */
if (g_mpPersonalPage->pProgressbar) {
elm_progressbar_value_set(g_mpPersonalPage->pProgressbar,
- nMoveRate);
+ nMoveRate);
}
}
MP_DEL_IDLER(g_mpPersonalPage->pFinishMoveIdler);
g_mpPersonalPage->pFinishMoveIdler =
ecore_idler_add(__mp_personal_ctrl_finish_move_idler_cb,
- pUserData);
+ pUserData);
break;
MP_DEL_OBJ(g_mpPersonalPage->pPopUpHandle);
g_mpPersonalPage->pMoveFailedIdler =
ecore_idler_add(__mp_personal_ctrl_move_failed_idler_cb,
- pUserData);
+ pUserData);
break;
case MP_VIDEO_UPDATE_ERROR:
mp_personal_ctrl_move_popup_handle();
break;
-
- default:
- VideoLogInfo("invalid feedback");
- break;
}
}
g_mpPersonalPage->pStartMoveTimer = NULL;
- /*pProgressbarTimer = ecore_timer_add(0.05, MpVideoPersonalProgressbarTimerCb, pUserData);*/
- /*pMoveItemIdlerHandle = ecore_idler_add(MpVideoPersonalMoveItemIdlerCb, pUserData);*/
g_mpPersonalPage->pMoveItemThreadHandle =
ecore_thread_feedback_run
}
static bool __mp_personal_ctrl_create_progress_popup(Evas_Object *
- pHandle,
- void *pUserData)
+ pHandle,
+ void *pUserData)
{
if (!g_mpPersonalPage || !g_mpPersonalPage->pPopUpHandle) {
VideoLogError("g_mpPersonalPage is null.");
return FALSE;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_POPUP_PROGRESSBAR_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_POPUP_PROGRESSBAR_EDJ);
free(path);
Evas_Object *pPopupLayout =
elm_layout_add(g_mpPersonalPage->pPopUpHandle);
elm_layout_file_set(pPopupLayout, edj_path,
- "popup_center_progress_move_copy");
+ "popup_center_progress_move_copy");
evas_object_size_hint_weight_set(pPopupLayout, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
if (!pPopupLayout) {
VideoLogError("g_mpPersonalPage is null.");
return FALSE;
elm_object_style_set(pProgressbar, "list_progress");
elm_progressbar_horizontal_set(pProgressbar, EINA_TRUE);
evas_object_size_hint_align_set(pProgressbar, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pProgressbar, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
elm_progressbar_value_set(pProgressbar, 0.0);
evas_object_show(pProgressbar);
g_mpPersonalPage->pProgressbar = pProgressbar;
if (g_mpPersonalPage->nPersonalViewStyle == 1) {
elm_object_domain_translatable_part_text_set(pPopupLayout,
- "elm.title",
- VIDEOS_STRING,
- MP_TEXT_MOVING);
+ "elm.title",
+ VIDEOS_STRING,
+ MP_TEXT_MOVING);
elm_object_domain_part_text_translatable_set(pPopupLayout,
- "elm.title",
- VIDEOS_STRING,
- EINA_TRUE);
+ "elm.title",
+ VIDEOS_STRING,
+ EINA_TRUE);
} else {
elm_object_domain_translatable_part_text_set(pPopupLayout,
- "elm.title",
- VIDEOS_STRING,
- MP_TEXT_MOVING);
+ "elm.title",
+ VIDEOS_STRING,
+ MP_TEXT_MOVING);
elm_object_domain_part_text_translatable_set(pPopupLayout,
- "elm.title",
- VIDEOS_STRING,
- EINA_TRUE);
+ "elm.title",
+ VIDEOS_STRING,
+ EINA_TRUE);
}
elm_object_part_content_set(pPopupLayout, "elm.swallow.content",
- pProgressbar);
+ pProgressbar);
__mp_personal_ctrl_update_percent(TRUE, TRUE);
Evas_Object *pButton = elm_button_add(g_mpPersonalPage->pPopUpHandle);
elm_object_style_set(pButton, "popup_button/default");
elm_object_domain_translatable_text_set(pButton, VIDEOS_STRING,
- VIDEOS_COMMON_BUTTON_CANCEL_IDS);
+ VIDEOS_COMMON_BUTTON_CANCEL_IDS);
elm_object_part_content_set(g_mpPersonalPage->pPopUpHandle, "button1",
- pButton);
+ pButton);
evas_object_smart_callback_add(pButton, "clicked",
- mp_personal_ctrl_button_popup_cb,
- pUserData);
+ mp_personal_ctrl_button_popup_cb,
+ pUserData);
evas_object_show(g_mpPersonalPage->pPopUpHandle);
return TRUE;
/*//////////////////////////////////////////////////////////*/
/* External function*/
/*//////////////////////////////////////////////////////////*/
-bool mp_personal_ctrl_show(bool *pCheckedItemsEditList,
- int pCheckedItemsEditListSize, int nViewStyle,
- bool bFolderMove,
- PersonalCtrlCbFunc pPersonalCtrlCb,
- void *pUserData)
+bool mp_personal_ctrl_show(bool * pCheckedItemsEditList,
+ int pCheckedItemsEditListSize, int nViewStyle,
+ bool bFolderMove,
+ PersonalCtrlCbFunc pPersonalCtrlCb,
+ void *pUserData)
{
if (!pCheckedItemsEditList) {
VideoLogError("No have popup message is null.");
}
VideoLogInfo("pCheckedItemsEditListSize : %d",
- pCheckedItemsEditListSize);
+ pCheckedItemsEditListSize);
g_mpPersonalPage->PersonalCtrlUserCbFunc = pPersonalCtrlCb;
int nCounter = 0;
for (nCounter = 0; nCounter < g_mpPersonalPage->nCheckedEditListSize;
- nCounter++) {
+ nCounter++) {
if (g_mpPersonalPage->pCheckedItemsEditList[nCounter]) {
++g_mpPersonalPage->nTotalMoveItem;
}
elm_popup_add(mp_util_get_main_window_handle());
eext_object_event_callback_add(g_mpPersonalPage->pPopUpHandle,
- EEXT_CALLBACK_BACK,
- mp_personal_ctrl_button_popup_cb,
- NULL);
+ EEXT_CALLBACK_BACK,
+ mp_personal_ctrl_button_popup_cb, NULL);
bool bRet =
- __mp_personal_ctrl_create_progress_popup(g_mpPersonalPage->
- pPopUpHandle, pUserData);
+ __mp_personal_ctrl_create_progress_popup
+ (g_mpPersonalPage->pPopUpHandle, pUserData);
if (!bRet) {
VideoLogError("popup is failed");
mp_personal_ctrl_move_popup_handle();
MP_DEL_TIMER(g_mpPersonalPage->pStartMoveTimer);
g_mpPersonalPage->pStartMoveTimer =
ecore_timer_add(0.3, __mp_personal_ctrl_start_move_timer_cb,
- pUserData);
+ pUserData);
return TRUE;
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <Eina.h>
#include <Ecore_Evas.h>
void *pVideosGenlist;
bool *pCheckedItemsEditListForRemoved;
- char **pSelectedList; /*save selected video id*/
+ char **pSelectedList; /*save selected video id */
bool bSelectallCheckBoxState;
int nSelectCounterForEditList;
MpMediaSvcSortType nSortType;
ChangePersonalViewCbFunc pChangeViewUserCbFunc;
char *pFolderPath;
- int nViewStyle; /*0:add to personal. //1,remove from personal*/
+ int nViewStyle; /*0:add to personal. //1,remove from personal */
bool bFolderMove;
bool bCheckBoxState;
MpDbUpdateViewLev euLev;
} st_VideoListPersonalViewHandle;
typedef struct {
- /*Evas_Object *pSelectionInfoLayout;*/
Evas_Object *pVideoListBox;
Evas_Object *pPersonalViewBaselayout;
Evas_Object *pSelectallbtn;
/* Pre define function*/
int mp_personal_view_get_sort_type(void);
void mp_personal_view_arrange_video_list(int nItemSortType,
- void *pVideosGenlist,
- bool bNeedSvc);
+ void *pVideosGenlist,
+ bool bNeedSvc);
void mp_personal_view_naviframe_transition_effect_cb(void *pUserData,
- Evas_Object *
- pObject,
- void *pEventInfo);
+ Evas_Object *
+ pObject,
+ void *pEventInfo);
void mp_personal_view_change_title_info(void);
static void __mp_personal_view_base_layout_del_cb(void *pUserData,
- Evas *e,
- Evas_Object *pObject,
- void *pEventInfo);
+ Evas * e,
+ Evas_Object * pObject,
+ void *pEventInfo);
static void __mp_personal_view_ignore_personal_vconf();
static bool __mp_personal_view_get_selected_video_list(int nSelectedSize);
static void __mp_personal_view_free_selected_list(void)
{
if (!g_pListPersonalViewHandle
- || !g_pListPersonalViewHandle->pSelectedList) {
+ || !g_pListPersonalViewHandle->pSelectedList) {
return;
}
int nIndex = 0;
}
Elm_Object_Item *currentItem = NULL;
currentItem =
- elm_genlist_first_item_get(g_pListPersonalViewHandle->
- pVideosGenlist);
+ elm_genlist_first_item_get
+ (g_pListPersonalViewHandle->pVideosGenlist);
int nVideoItemIndex = 0;
Evas_Object *check_box = NULL;
while (currentItem && (nVideoItemIndex < nPersonalSize)) {
check_box =
elm_object_item_part_content_get(currentItem,
- "elm.edit.icon.1");
+ "elm.edit.icon.1");
if (check_box) {
elm_check_state_set(check_box,
- g_pListPersonalViewHandle->
- pCheckedItemsEditListForRemoved
- [nVideoItemIndex]);
+ g_pListPersonalViewHandle->pCheckedItemsEditListForRemoved
+ [nVideoItemIndex]);
}
currentItem = elm_genlist_item_next_get(currentItem);
nVideoItemIndex++;
if (g_pListPersonalViewHandle) {
mp_util_db_set_update_fun(g_pListPersonalViewHandle->euLev, NULL);
mp_util_db_set_backup_fun(g_pListPersonalViewHandle->euLev, NULL);
- evas_object_smart_callback_del(g_pListPersonalViewHandle->
- pNaviFrameHandle,
- "transition,finished",
- mp_personal_view_naviframe_transition_effect_cb);
+ evas_object_smart_callback_del
+ (g_pListPersonalViewHandle->pNaviFrameHandle,
+ "transition,finished",
+ mp_personal_view_naviframe_transition_effect_cb);
__mp_personal_view_free_selected_list();
g_pListPersonalViewHandle->pVideosGenlist = NULL;
- MP_FREE_STRING(g_pListPersonalViewHandle->
- pCheckedItemsEditListForRemoved);
+ MP_FREE_STRING
+ (g_pListPersonalViewHandle->pCheckedItemsEditListForRemoved);
MP_FREE_STRING(g_pListPersonalViewHandle->pFolderPath);
free(g_pListPersonalViewHandle);
__mp_personal_view_ignore_personal_vconf();
if (g_pListPersonalViewHandle) {
- evas_object_smart_callback_del(g_pListPersonalViewHandle->
- pNaviFrameHandle,
- "transition,finished",
- mp_personal_view_naviframe_transition_effect_cb);
+ evas_object_smart_callback_del
+ (g_pListPersonalViewHandle->pNaviFrameHandle,
+ "transition,finished",
+ mp_personal_view_naviframe_transition_effect_cb);
__mp_personal_view_free_selected_list();
MP_DEL_OBJ(g_pListPersonalViewHandle->pVideosGenlist);
- MP_FREE_STRING(g_pListPersonalViewHandle->
- pCheckedItemsEditListForRemoved);
+ MP_FREE_STRING
+ (g_pListPersonalViewHandle->pCheckedItemsEditListForRemoved);
MP_FREE_STRING(g_pListPersonalViewHandle->pFolderPath);
free(g_pListPersonalViewHandle);
MP_MEDIA_SORT_BY_RECENTLY_VIEWED;
if (g_pListPersonalViewHandle->pNaviFrameItem) {
- elm_object_item_part_content_unset(g_pListPersonalViewHandle->
- pNaviFrameItem,
- "toolbar_more_btn");
- elm_object_item_part_content_unset(g_pListPersonalViewHandle->
- pNaviFrameItem, "toolbar");
- elm_object_item_part_content_unset(g_pListPersonalViewHandle->
- pNaviFrameItem,
- "toolbar_button2");
+ elm_object_item_part_content_unset
+ (g_pListPersonalViewHandle->pNaviFrameItem,
+ "toolbar_more_btn");
+ elm_object_item_part_content_unset
+ (g_pListPersonalViewHandle->pNaviFrameItem, "toolbar");
+ elm_object_item_part_content_unset
+ (g_pListPersonalViewHandle->pNaviFrameItem, "toolbar_button2");
}
}
VideoLogInfo("");
if (g_pListPersonalViewHandle->pNaviFrameHandle) {
- elm_naviframe_item_pop(g_pListPersonalViewHandle->
- pNaviFrameHandle);
+ elm_naviframe_item_pop
+ (g_pListPersonalViewHandle->pNaviFrameHandle);
}
}
static void __mp_personal_view_run_cancel_items_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!g_pListPersonalViewHandle->pNaviFrameHandle) {
VideoLogError
- ("g_pListPersonalViewHandle->pNaviFrameHandle is NULL");
+ ("g_pListPersonalViewHandle->pNaviFrameHandle is NULL");
return;
}
{
int nErr = 0;
- nErr = preference_set_boolean(PREF_MP_UTIL_PERSONAL_NO_ASK_AGAIN, bAsked);
+ nErr =
+ preference_set_boolean(PREF_MP_UTIL_PERSONAL_NO_ASK_AGAIN, bAsked);
if (nErr != 0) {
VideoLogError
- ("SET PREF_MP_UTIL_PERSONAL_NO_ASK_AGAIN is fail [0x%x]",
- nErr);
+ ("SET PREF_MP_UTIL_PERSONAL_NO_ASK_AGAIN is fail [0x%x]",
+ nErr);
return FALSE;
}
return TRUE;
}
-bool mp_personal_view_get_vconf_asked_state(bool *bAsked)
+bool mp_personal_view_get_vconf_asked_state(bool * bAsked)
{
int nErr = 0;
bool nVal = 0;
- nErr = preference_get_boolean(PREF_MP_UTIL_PERSONAL_NO_ASK_AGAIN, &nVal);
+ nErr =
+ preference_get_boolean(PREF_MP_UTIL_PERSONAL_NO_ASK_AGAIN, &nVal);
if (nErr != 0) {
VideoLogError
- ("GET PREF_MP_UTIL_PERSONAL_NO_ASK_AGAIN is fail [0x%x]",
- nErr);
+ ("GET PREF_MP_UTIL_PERSONAL_NO_ASK_AGAIN is fail [0x%x]",
+ nErr);
return FALSE;
}
}
static void __mp_personal_view_ask_remove_back_cb(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
mp_util_delete_popup_handle();
}
static void __mp_personal_view_ask_remove_ok_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!g_pListPersonalViewHandle) {
VideoLogError("[ERR] g_pListPersonalViewHandle is NULL.");
VideoLogInfo("");
mp_util_delete_popup_handle();
- mp_personal_view_set_vconf_asked_state(g_pListPersonalViewHandle->
- bCheckBoxState);
+ mp_personal_view_set_vconf_asked_state
+ (g_pListPersonalViewHandle->bCheckBoxState);
int nPersonalListSize = 0;
if (g_pListPersonalViewHandle->bFolderMove) {
nPersonalListSize = mp_util_svc_get_video_folder_size();
} else {
- nPersonalListSize =
- mp_util_svc_get_number_of_video_item_by_type();
+ nPersonalListSize = mp_util_svc_get_number_of_video_item_by_type();
}
- mp_personal_ctrl_show(g_pListPersonalViewHandle->
- pCheckedItemsEditListForRemoved,
- nPersonalListSize,
- g_pListPersonalViewHandle->nViewStyle,
- g_pListPersonalViewHandle->bFolderMove,
- mp_personal_view_done_delete_complete, NULL);
+ mp_personal_ctrl_show
+ (g_pListPersonalViewHandle->pCheckedItemsEditListForRemoved,
+ nPersonalListSize, g_pListPersonalViewHandle->nViewStyle,
+ g_pListPersonalViewHandle->bFolderMove,
+ mp_personal_view_done_delete_complete, NULL);
}
static void __mp_personal_view_check_box_changed_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!pObject) {
VideoLogError("[ERR] pObject is NULL.");
}
static void __mp_personal_view_run_delete_items_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!g_pListPersonalViewHandle) {
VideoLogError("[ERR] g_pMainViewHandle is NULL.");
if (nPersonalListSize > 1) {
szCheckLable =
g_strdup_printf(MP_PERSONAL_ITEMS_MOVE_TO,
- VIDEO_DOWNLOAD_FILE_DIR);
+ VIDEO_DOWNLOAD_FILE_DIR);
} else {
szCheckLable =
g_strdup_printf(MP_PERSONAL_ITEM_MOVE_TO,
- VIDEO_DOWNLOAD_FILE_DIR);
+ VIDEO_DOWNLOAD_FILE_DIR);
}
mp_util_text_and_check_popup
- (__mp_personal_view_ask_remove_back_cb,
- __mp_personal_view_ask_remove_back_cb,
- __mp_personal_view_ask_remove_ok_cb,
- __mp_personal_view_check_box_changed_cb, szCheckLable,
- NULL);
+ (__mp_personal_view_ask_remove_back_cb,
+ __mp_personal_view_ask_remove_back_cb,
+ __mp_personal_view_ask_remove_ok_cb,
+ __mp_personal_view_check_box_changed_cb, szCheckLable,
+ NULL);
MP_FREE_STRING(szCheckLable);
} else {
- mp_personal_ctrl_show(g_pListPersonalViewHandle->
- pCheckedItemsEditListForRemoved,
- nPersonalListSize,
- g_pListPersonalViewHandle->nViewStyle,
- g_pListPersonalViewHandle->bFolderMove,
- mp_personal_view_done_delete_complete,
- NULL);
+ mp_personal_ctrl_show
+ (g_pListPersonalViewHandle->pCheckedItemsEditListForRemoved,
+ nPersonalListSize, g_pListPersonalViewHandle->nViewStyle,
+ g_pListPersonalViewHandle->bFolderMove,
+ mp_personal_view_done_delete_complete, NULL);
}
}
}
-/**/
+ /**/
/*//////////////////////////////////////////////*/
-
/*//////////////////////////////////////////////*/
/* Back button*/
-
static void __mp_personal_view_trans_finished_cb(void *pUserData,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
if (!obj) {
VideoLogError("[ERR] g_pListPersonalViewHandle is NULL.");
mp_widget_ctrl_enable_navi_handle_focus(obj);
evas_object_smart_callback_del(obj, "transition,finished",
- __mp_personal_view_trans_finished_cb);
+ __mp_personal_view_trans_finished_cb);
}
static Eina_Bool mp_personal_view_back_btn_cb(void *pUserData,
- Elm_Object_Item *pItem)
+ Elm_Object_Item * pItem)
{
if (!g_pListPersonalViewHandle) {
VideoLogInfo("[ERR] g_pListPersonalViewHandle is NULL.");
return EINA_TRUE;
}
- /* Register transition finished callback.*/
+ /* Register transition finished callback. */
mp_widget_ctrl_disable_navi_handle_focus_except_item
- (g_pListPersonalViewHandle->pNaviFrameHandle,
- g_pListPersonalViewHandle->pNaviFrameItem);
- evas_object_smart_callback_add(g_pListPersonalViewHandle->
- pNaviFrameHandle,
- "transition,finished",
- __mp_personal_view_trans_finished_cb,
- NULL);
+ (g_pListPersonalViewHandle->pNaviFrameHandle,
+ g_pListPersonalViewHandle->pNaviFrameItem);
+ evas_object_smart_callback_add
+ (g_pListPersonalViewHandle->pNaviFrameHandle,
+ "transition,finished", __mp_personal_view_trans_finished_cb,
+ NULL);
mp_personal_view_pop();
void mp_personal_view_change_title_info(void)
{
VideoLogInfo("nNumOfSelectdCount : %d",
- g_pListPersonalViewHandle->nSelectCounterForEditList);
+ g_pListPersonalViewHandle->nSelectCounterForEditList);
if (g_pListPersonalViewHandle->nSelectCounterForEditList > 0) {
elm_object_disabled_set(g_pListPersonalViewWidget->pSavebtn,
- EINA_FALSE);
+ EINA_FALSE);
} else {
VideoLogInfo("Unactivate delete tab.");
elm_object_disabled_set(g_pListPersonalViewWidget->pSavebtn,
- EINA_TRUE);
+ EINA_TRUE);
}
char *szCheckingTotalItem =
g_strdup_printf(VIDEOS_SELECTVIEW_HEADER_PD_SELECTED,
- g_pListPersonalViewHandle->
- nSelectCounterForEditList);
+ g_pListPersonalViewHandle->nSelectCounterForEditList);
elm_object_item_domain_translatable_part_text_set
- (g_pListPersonalViewHandle->pNaviFrameItem, "elm.text.title",
- PACKAGE, szCheckingTotalItem);
+ (g_pListPersonalViewHandle->pNaviFrameItem, "elm.text.title",
+ PACKAGE, szCheckingTotalItem);
MP_FREE_STRING(szCheckingTotalItem);
}
static void __mp_personal_view_select_all_change_check_box_cb(void
- *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ *pUserData,
+ Evas_Object *
+ pObject,
+ void
+ *pEventInfo)
{
if (!pObject) {
VideoLogError("[ERR]");
int nCounter = 0;
int nPersonalListSize = 0;
- /*bool bState = elm_check_state_get(pObject);*/
if (g_pListPersonalViewHandle->bFolderMove) {
nPersonalListSize = mp_util_svc_get_video_folder_size();
} else {
- nPersonalListSize =
- mp_util_svc_get_number_of_video_item_by_type();
+ nPersonalListSize = mp_util_svc_get_number_of_video_item_by_type();
}
VideoLogInfo("nPersonalListSize : %d", nPersonalListSize);
VideoLogInfo("Unactivate delete tab.");
elm_object_disabled_set(g_pListPersonalViewWidget->pSavebtn,
- EINA_TRUE);
+ EINA_TRUE);
}
mp_personal_view_change_title_info();
for (nCounter = 0; nCounter < nPersonalListSize; nCounter++) {
- g_pListPersonalViewHandle->
- pCheckedItemsEditListForRemoved[nCounter] =
+ g_pListPersonalViewHandle->pCheckedItemsEditListForRemoved
+ [nCounter] =
g_pListPersonalViewHandle->bSelectallCheckBoxState;
}
mp_personal_view_update_all_check_box();
-
- /*elm_genlist_realized_items_update(g_pListPersonalViewHandle->pVideosGenlist);*/
}
void mp_personal_view_delete_select_all(void)
g_pListPersonalViewHandle->bSelectallCheckBoxState = FALSE;
g_pListPersonalViewHandle->nSelectCounterForEditList = 0;
- /*MpVideoPersonalViewHideSelectedInfo();*/
mp_personal_view_change_title_info();
}
/*//////////////////////////////////////////////////*/
/* Check box callback*/
void mp_personal_view_change_check_box_state_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!pObject) {
VideoLogInfo("[ERR]");
if (g_pListPersonalViewHandle->bFolderMove) {
nPersonalListSize = mp_util_svc_get_video_folder_size();
} else {
- nPersonalListSize =
- mp_util_svc_get_number_of_video_item_by_type();
+ nPersonalListSize = mp_util_svc_get_number_of_video_item_by_type();
}
bool bState = elm_check_state_get(pObject);
VideoLogInfo("Check box - Index : %d, List Size : %d",
- nVideoItemIndex, nPersonalListSize);
+ nVideoItemIndex, nPersonalListSize);
VideoLogInfo("BEFORE : nSelectCounterForEditList : %d",
- g_pListPersonalViewHandle->nSelectCounterForEditList);
+ g_pListPersonalViewHandle->nSelectCounterForEditList);
if (bState) {
- g_pListPersonalViewHandle->
- pCheckedItemsEditListForRemoved[nVideoItemIndex] = TRUE;
+ g_pListPersonalViewHandle->pCheckedItemsEditListForRemoved
+ [nVideoItemIndex] = TRUE;
g_pListPersonalViewHandle->nSelectCounterForEditList++;
if (nPersonalListSize ==
- g_pListPersonalViewHandle->nSelectCounterForEditList) {
+ g_pListPersonalViewHandle->nSelectCounterForEditList) {
VideoLogInfo("All check box of edit list state are true.");
g_pListPersonalViewHandle->bSelectallCheckBoxState = TRUE;
}
} else {
- g_pListPersonalViewHandle->
- pCheckedItemsEditListForRemoved[nVideoItemIndex] = FALSE;
+ g_pListPersonalViewHandle->pCheckedItemsEditListForRemoved
+ [nVideoItemIndex] = FALSE;
if (nPersonalListSize ==
- g_pListPersonalViewHandle->nSelectCounterForEditList) {
- VideoLogInfo
- ("All check box of edit list state are not true.");
+ g_pListPersonalViewHandle->nSelectCounterForEditList) {
+ VideoLogInfo("All check box of edit list state are not true.");
g_pListPersonalViewHandle->bSelectallCheckBoxState = FALSE;
}
if (g_pListPersonalViewHandle->nSelectCounterForEditList < 1) {
VideoLogInfo("Unactivate delete button.");
elm_object_disabled_set(g_pListPersonalViewWidget->pSavebtn,
- EINA_TRUE);
+ EINA_TRUE);
}
}
elm_check_state_set(g_pListPersonalViewWidget->pSelectallbtn,
- g_pListPersonalViewHandle->
- bSelectallCheckBoxState);
+ g_pListPersonalViewHandle->bSelectallCheckBoxState);
mp_personal_view_change_title_info();
- /*if (pSelectedItem)
- {
- elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
- } */
-
}
-/**/
+ /**/
/*//////////////////////////////////////////////////*/
-
/*//////////////////////////////////////////////*/
/* Genlist callback*/
void mp_personal_view_naviframe_transition_effect_cb(void *pUserData,
- Evas_Object *
- pObject,
- void *pEventInfo)
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
if (!g_pListPersonalViewHandle) {
VideoLogError("[ERR] No exist g_pListPersonalViewHandle.");
}
pTmpItem =
- elm_naviframe_top_item_get(g_pListPersonalViewHandle->
- pNaviFrameHandle);
+ elm_naviframe_top_item_get
+ (g_pListPersonalViewHandle->pNaviFrameHandle);
pTmpContents = elm_object_item_content_get(pTmpItem);
if (pTmpContents) {
if (pTmpContents == g_pListPersonalViewWidget->pVideoListBox) {
} else {
VideoLogInfo
- ("It's not pPersonalViewTabbarLayout in top screen.");
+ ("It's not pPersonalViewTabbarLayout in top screen.");
}
} else {
VideoLogError("[ERR] No exist naviframe top item.");
VideoLogInfo("");
elm_genlist_item_bring_in(elm_genlist_first_item_get
- (g_pListPersonalViewHandle->pVideosGenlist),
- ELM_GENLIST_ITEM_SCROLLTO_TOP);
+ (g_pListPersonalViewHandle->pVideosGenlist),
+ ELM_GENLIST_ITEM_SCROLLTO_TOP);
}
char *mp_personal_view_get_duration_time(int nVideoItemIndex)
mp_util_convert_time(nVideoInfoLastTime, szTmpStrLastPlayedPos, TRUE);
snprintf(szTmpStr, STR_LEN_MAX, "%s/%s", szTmpStrLastPlayedPos,
- szTmpStrDurationTime);
+ szTmpStrDurationTime);
return strdup(szTmpStr);
}
void mp_personal_view_select_video_item_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!g_pListPersonalViewHandle->pVideosGenlist) {
VideoLogInfo("No exist genlist object.");
mp_util_svc_get_number_of_video_item_by_type();
}
- if (g_pListPersonalViewHandle->
- pCheckedItemsEditListForRemoved[nVideoItemIndex]) {
- g_pListPersonalViewHandle->
- pCheckedItemsEditListForRemoved[nVideoItemIndex] = FALSE;
+ if (g_pListPersonalViewHandle->pCheckedItemsEditListForRemoved
+ [nVideoItemIndex]) {
+ g_pListPersonalViewHandle->pCheckedItemsEditListForRemoved
+ [nVideoItemIndex] = FALSE;
if (nPersonalListSize ==
- g_pListPersonalViewHandle->nSelectCounterForEditList) {
+ g_pListPersonalViewHandle->nSelectCounterForEditList) {
VideoLogInfo
- ("All check box of edit list state are not true.");
- g_pListPersonalViewHandle->bSelectallCheckBoxState =
- FALSE;
+ ("All check box of edit list state are not true.");
+ g_pListPersonalViewHandle->bSelectallCheckBoxState = FALSE;
}
g_pListPersonalViewHandle->nSelectCounterForEditList--;
if (g_pListPersonalViewHandle->nSelectCounterForEditList < 1) {
VideoLogInfo("Unactivate delete button.");
- elm_object_disabled_set(g_pListPersonalViewWidget->
- pSavebtn, EINA_TRUE);
+ elm_object_disabled_set
+ (g_pListPersonalViewWidget->pSavebtn, EINA_TRUE);
}
} else {
- g_pListPersonalViewHandle->
- pCheckedItemsEditListForRemoved[nVideoItemIndex] = TRUE;
+ g_pListPersonalViewHandle->pCheckedItemsEditListForRemoved
+ [nVideoItemIndex] = TRUE;
g_pListPersonalViewHandle->nSelectCounterForEditList++;
if (nPersonalListSize ==
- g_pListPersonalViewHandle->nSelectCounterForEditList) {
- VideoLogInfo
- ("All check box of edit list state are true.");
+ g_pListPersonalViewHandle->nSelectCounterForEditList) {
+ VideoLogInfo("All check box of edit list state are true.");
g_pListPersonalViewHandle->bSelectallCheckBoxState = TRUE;
}
}
elm_check_state_set(g_pListPersonalViewWidget->pSelectallbtn,
- g_pListPersonalViewHandle->
- bSelectallCheckBoxState);
+ g_pListPersonalViewHandle->bSelectallCheckBoxState);
mp_personal_view_change_title_info();
Evas_Object *check_box =
elm_object_item_part_content_get(pItem, "elm.edit.icon.1");
if (check_box) {
elm_check_state_set(check_box,
- g_pListPersonalViewHandle->
- pCheckedItemsEditListForRemoved
- [nVideoItemIndex]);
+ g_pListPersonalViewHandle->pCheckedItemsEditListForRemoved
+ [nVideoItemIndex]);
}
- /*elm_genlist_item_fields_update(pSelectedItem, "elm.edit.icon.1", ELM_GENLIST_ITEM_FIELD_CONTENT);*/
} else {
VideoLogError("[ERR]Error item number.");
}
}
char *mp_personal_view_get_label_of_video_item_cb(const void *pUserData,
- Evas_Object *pObject,
- const char *pPart)
+ Evas_Object * pObject,
+ const char *pPart)
{
int nVideoItemIndex = (int) pUserData;
} else if (!strcmp(pPart, "elm.text.2")) {
return mp_util_svc_get_duration_str_time(nVideoItemIndex);
}
- /*else if (!strcmp(pPart, "elm.text.3"))
- {
- unsigned long long nFilesize = 0;
-
- nFilesize = mp_util_svc_get_video_item_size(nVideoItemIndex);
- char *szFileSize = mp_util_get_file_size(nFilesize);
- char *szTitleUtf8 = NULL;
- if (szFileSize)
- {
- szTitleUtf8 = elm_entry_utf8_to_markup(szFileSize);
- free(szFileSize);
- szFileSize = NULL;
- }
-
- return szTitleUtf8;
- } */
-
return NULL;
}
char *mp_personal_view_get_label_of_folder_cb(const void *pUserData,
- Evas_Object *pObject,
- const char *pPart)
+ Evas_Object * pObject,
+ const char *pPart)
{
int nFolderItemIndex = (int) pUserData;
Evas_Object *mp_personal_view_get_icon_of_video_item_cb(const void
- *pUserData,
- Evas_Object *
- pObject,
- const char *pPart)
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char *pPart)
{
int nVideoItemIndex = (int) pUserData;
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_IMAGE_NAME_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_IMAGE_NAME_EDJ);
free(path);
if (!strcmp(pPart, "elm.thumbnail.icon")) {
char *pThumbIconUri =
pBg =
mp_util_create_preload_image(pObject, pThumbIconUri,
- VIDEO_ICON_WIDTH);
+ VIDEO_ICON_WIDTH);
if (pBg)
evas_object_show(pBg);
if (nLastPlayedTime <= 0) {
return NULL;
}
-
+
double nRatio = 0.0;
if (nDurationTime > 0) {
- nRatio = ((double)nLastPlayedTime) /
- ((double)nDurationTime);
+ nRatio = ((double) nLastPlayedTime) / ((double) nDurationTime);
}
if (nRatio < 0.05) {
elm_object_style_set(pProgressBar, "video/list_progress");
elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pProgressBar, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
elm_progressbar_value_set(pProgressBar, nRatio);
evas_object_show(pProgressBar);
return pProgressBar;
} else if (!strcmp(pPart, "elm.lock.icon")) {
char *pVideoFile = mp_util_svc_get_video_url(nVideoItemIndex);
- bool bRet =
- mp_util_check_video_personal_status((const char *)
- pVideoFile);
+ bool bRet = mp_util_check_video_personal_status((const char *)
+ pVideoFile);
MP_FREE_STRING(pVideoFile);
if (bRet) {
Evas_Object *pLockIcon = elm_image_add(pObject);
elm_image_file_set(pLockIcon, edj_path,
- VIDEO_LIST_VIEW_ICON_PERSONAL_LOCK);
+ VIDEO_LIST_VIEW_ICON_PERSONAL_LOCK);
evas_object_size_hint_align_set(pLockIcon, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pLockIcon, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_show(pLockIcon);
return pLockIcon;
} else {
Evas_Object *pCheckBox = elm_check_add(pObject);
evas_object_propagate_events_set(pCheckBox, EINA_FALSE);
evas_object_smart_callback_add(pCheckBox, "changed",
- mp_personal_view_change_check_box_state_cb,
- pUserData);
- /*evas_object_smart_callback_add(pCheckBox, "changed", NULL, pUserData);*/
+ mp_personal_view_change_check_box_state_cb,
+ pUserData);
elm_check_state_set(pCheckBox,
- g_pListPersonalViewHandle->
- pCheckedItemsEditListForRemoved
- [nVideoItemIndex]);
+ g_pListPersonalViewHandle->pCheckedItemsEditListForRemoved
+ [nVideoItemIndex]);
elm_check_state_pointer_set(pCheckBox,
- (Eina_Bool *) &
- (g_pListPersonalViewHandle->
- pCheckedItemsEditListForRemoved
- [nVideoItemIndex]));
+ (Eina_Bool *) &
+ (g_pListPersonalViewHandle->pCheckedItemsEditListForRemoved
+ [nVideoItemIndex]));
evas_object_show(pCheckBox);
}
Evas_Object *mp_personal_view_get_icon_of_folder_cb(const void *pUserData,
- Evas_Object *pObject,
- const char *pPart)
+ Evas_Object * pObject,
+ const char *pPart)
{
int nFolderItemIndex = (int) pUserData;
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_IMAGE_NAME_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_IMAGE_NAME_EDJ);
free(path);
if (!strcmp(pPart, "elm.thumbnail.icon")) {
Evas_Object *pBg = elm_bg_add(pObject);
if (pBg) {
- elm_bg_load_size_set(pBg, VIDEO_ICON_WIDTH,
- VIDEO_ICON_HEIGHT);
+ elm_bg_load_size_set(pBg, VIDEO_ICON_WIDTH, VIDEO_ICON_HEIGHT);
evas_object_size_hint_max_set(pBg, VIDEO_ICON_WIDTH,
- VIDEO_ICON_HEIGHT);
+ VIDEO_ICON_HEIGHT);
evas_object_size_hint_weight_set(pBg, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pBg, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
char *pFolderIconUri =
mp_util_get_folder_icon_path(nFolderItemIndex);
elm_bg_file_set(pBg, (const char *) pFolderIconUri, NULL);
} else if (!strcmp(pPart, "elm.lock.icon")) {
char *pFolderoFile =
mp_util_svc_get_video_folder_url(nFolderItemIndex);
- bool bRet =
- mp_util_check_video_personal_status((const char *)
- pFolderoFile);
+ bool bRet = mp_util_check_video_personal_status((const char *)
+ pFolderoFile);
MP_FREE_STRING(pFolderoFile);
if (bRet) {
Evas_Object *pLockIcon = elm_image_add(pObject);
elm_image_file_set(pLockIcon, edj_path,
- VIDEO_LIST_VIEW_ICON_PERSONAL_LOCK);
+ VIDEO_LIST_VIEW_ICON_PERSONAL_LOCK);
evas_object_size_hint_align_set(pLockIcon, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pLockIcon, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_show(pLockIcon);
return pLockIcon;
} else {
Evas_Object *pCheckBox = elm_check_add(pObject);
evas_object_propagate_events_set(pCheckBox, EINA_FALSE);
evas_object_smart_callback_add(pCheckBox, "changed",
- mp_personal_view_change_check_box_state_cb,
- pUserData);
- /*evas_object_smart_callback_add(pCheckBox, "changed", NULL, pUserData);*/
+ mp_personal_view_change_check_box_state_cb,
+ pUserData);
elm_check_state_set(pCheckBox,
- g_pListPersonalViewHandle->
- pCheckedItemsEditListForRemoved
- [nFolderItemIndex]);
+ g_pListPersonalViewHandle->pCheckedItemsEditListForRemoved
+ [nFolderItemIndex]);
elm_check_state_pointer_set(pCheckBox,
- (Eina_Bool *) &
- (g_pListPersonalViewHandle->
- pCheckedItemsEditListForRemoved
- [nFolderItemIndex]));
+ (Eina_Bool *) &
+ (g_pListPersonalViewHandle->pCheckedItemsEditListForRemoved
+ [nFolderItemIndex]));
evas_object_show(pCheckBox);
return NULL;
}
-/**/
+ /**/
/*//////////////////////////////////////////////*/
-
int mp_personal_view_get_sort_type(void)
{
switch (mp_sort_ctrl_get_sort_state()) {
- /*case MP_LIST_SORT_BY_RECENTLY_VIEWED:
- g_pListPersonalViewHandle->nSortType = MP_MEDIA_SORT_BY_RECENTLY_VIEWED;
- break; */
case MP_LIST_SORT_BY_RECENTLY_ADDED:
g_pListPersonalViewHandle->nSortType =
case MP_LIST_SORT_BY_NAME:
g_pListPersonalViewHandle->nSortType = MP_MEDIA_SORT_BY_NAME;
break;
-
- /*case MP_LIST_SORT_BY_SIZE:
- g_pListPersonalViewHandle->nSortType = MP_MEDIA_SORT_BY_SIZE;
- break;
-
- case MP_LIST_SORT_BY_TYPE:
- g_pListPersonalViewHandle->nSortType = MP_MEDIA_SORT_BY_TYPE;
- break; */
}
return g_pListPersonalViewHandle->nSortType;
(void *) mp_personal_view_get_icon_of_video_item_cb;
VideoPersonal_Itc.func.state_get = NULL;
VideoPersonal_Itc.func.del = NULL;
- /*VideoPersonal_Itc.decorate_item_style = "mode/slide4";*/
- /*VideoPersonal_Itc.decorate_all_item_style = "edit_default";*/
for (nIndex = 0; nIndex < nVideoListSize; nIndex++) {
elm_genlist_item_append(pVideosGenlist, &VideoPersonal_Itc,
- (void *) nIndex, NULL,
- ELM_GENLIST_ITEM_NONE,
- mp_personal_view_select_video_item_cb,
- NULL);
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ mp_personal_view_select_video_item_cb,
+ NULL);
}
}
for (nIndex = 0; nIndex < nFolderListSize; nIndex++) {
elm_genlist_item_append(pVideosGenlist, &FolderPersonal_Itc,
- (void *) nIndex, NULL,
- ELM_GENLIST_ITEM_NONE,
- mp_personal_view_select_video_item_cb,
- NULL);
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ mp_personal_view_select_video_item_cb,
+ NULL);
}
}
}
if (nTotalSize > 0) {
g_pListPersonalViewHandle->pCheckedItemsEditListForRemoved =
- (bool *) malloc(sizeof(bool)*nTotalSize);
+ (bool *) malloc(sizeof(bool) * nTotalSize);
memset(g_pListPersonalViewHandle->pCheckedItemsEditListForRemoved,
- 0, sizeof(bool)*nTotalSize);
+ 0, sizeof(bool) * nTotalSize);
}
g_pListPersonalViewHandle->bSelectallCheckBoxState = FALSE;
VideoLogError("Main handles of list view are not existed.");
return;
}
- /* int nViewType = mp_view_as_ctrl_get_type();*/
+ /* int nViewType = mp_view_as_ctrl_get_type(); */
int nSortType = mp_personal_view_get_sort_type();
mp_util_svc_destory_video_folder_list();
int nSortType = mp_personal_view_get_sort_type();
int nViewType = mp_view_as_ctrl_get_type();
if ((nViewType == MP_LIST_VIEW_AS_FOLDER_LIST)
- && (g_pListPersonalViewHandle->pFolderPath)) {
+ && (g_pListPersonalViewHandle->pFolderPath)) {
VideoSecureLogInfo("szFolderPath : %s",
- g_pListPersonalViewHandle->pFolderPath);
+ g_pListPersonalViewHandle->pFolderPath);
if (g_pListPersonalViewHandle->pFolderPath) {
if (vp_file_exists(g_pListPersonalViewHandle->pFolderPath)) {
- /*update video-list*/
+ /*update video-list */
mp_util_svc_destory_video_item_list();
if (g_pListPersonalViewHandle->nViewStyle == 0) {
mp_util_svc_extract_video_list_from_folder_by_personal
- (g_pListPersonalViewHandle->pFolderPath,
- nSortType, MP_LIST_VIEW_ALL, 0);
+ (g_pListPersonalViewHandle->pFolderPath,
+ nSortType, MP_LIST_VIEW_ALL, 0);
} else {
mp_util_svc_extract_video_list_from_folder_by_personal
- (g_pListPersonalViewHandle->pFolderPath,
- nSortType, MP_LIST_VIEW_ALL, 1);
+ (g_pListPersonalViewHandle->pFolderPath,
+ nSortType, MP_LIST_VIEW_ALL, 1);
}
} else {
VideoLogError("invalid path");
mp_util_svc_destory_video_list();
if (g_pListPersonalViewHandle->nViewStyle == 0) {
mp_util_svc_extract_video_list_by_personal(nSortType,
- mp_view_ctrl_get_list_type
- (), 0);
+ mp_view_ctrl_get_list_type
+ (), 0);
} else {
mp_util_svc_extract_video_list_by_personal(nSortType,
- mp_view_ctrl_get_list_type
- (), 1);
+ mp_view_ctrl_get_list_type
+ (), 1);
}
}
}
Evas_Object *mp_personal_view_get_icon_of_no_folder_item_cb(const void
- *pUserData,
- Evas_Object *
- pObject,
- const char
- *pPart)
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char
+ *pPart)
{
VideoLogInfo("");
int height = 1100 * elm_config_scale_get();
Evas_Object *pNocontentsLayout = elm_layout_add(pObject);
elm_layout_theme_set(pNocontentsLayout, "layout", "nocontents",
- "video");
+ "video");
evas_object_size_hint_min_set(pNocontentsLayout, width, height);
elm_object_part_text_set(pNocontentsLayout, "elm.text",
- "No Folders");
+ "No Folders");
evas_object_show(pNocontentsLayout);
return pNocontentsLayout;
}
void mp_personal_view_append_no_personal_folder_items(void
- *pVideosGenlist)
+ *pVideosGenlist)
{
VideoLogInfo("");
FolderPersonalNoItem_Itc.decorate_item_style = NULL;
elm_genlist_item_append(pVideosGenlist, &FolderPersonalNoItem_Itc,
- NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL,
- NULL);
+ NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
}
void mp_personal_view_arrange_folder_list(int nItemSortType,
- void *pVideosGenlist,
- bool bNeedSvc)
+ void *pVideosGenlist,
+ bool bNeedSvc)
{
if (!g_pListPersonalViewWidget || !g_pListPersonalViewHandle) {
VideoLogError("No exist g_pRemoveListViewWidget.");
void mp_personal_view_arrange_video_list(int nItemSortType,
- void *pVideosGenlist,
- bool bNeedSvc)
+ void *pVideosGenlist,
+ bool bNeedSvc)
{
if (!g_pListPersonalViewWidget || !g_pListPersonalViewHandle) {
VideoLogError("No exist g_pRemoveListViewWidget.");
VideoLogInfo("");
if (g_pListPersonalViewWidget->pPersonalViewBaselayout) {
- evas_object_del(g_pListPersonalViewWidget->
- pPersonalViewBaselayout);
+ evas_object_del
+ (g_pListPersonalViewWidget->pPersonalViewBaselayout);
g_pListPersonalViewWidget->pPersonalViewBaselayout = NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_REMOVE_LIST_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_REMOVE_LIST_EDJ);
free(path);
g_pListPersonalViewWidget->pPersonalViewBaselayout =
elm_layout_add(pParent);
- elm_layout_file_set(g_pListPersonalViewWidget->
- pPersonalViewBaselayout,
- edj_path,
- REMOVE_LIST_EDJ_GROUP);
- evas_object_size_hint_weight_set(g_pListPersonalViewWidget->
- pPersonalViewBaselayout,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(g_pListPersonalViewWidget->
- pPersonalViewBaselayout,
- EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_layout_file_set(g_pListPersonalViewWidget->pPersonalViewBaselayout,
+ edj_path, REMOVE_LIST_EDJ_GROUP);
+ evas_object_size_hint_weight_set
+ (g_pListPersonalViewWidget->pPersonalViewBaselayout,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set
+ (g_pListPersonalViewWidget->pPersonalViewBaselayout,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
return g_pListPersonalViewWidget->pPersonalViewBaselayout;
}
int nVideoListSize = 0;
if (!g_pListPersonalViewHandle->nSelectCounterForEditList
- || nSelectedSize < 1) {
+ || nSelectedSize < 1) {
return FALSE;
}
VideoLogInfo("current edit size===%d", nSelectedSize);
for (nCounter = 0; nCounter < nVideoListSize; nCounter++) {
- if (g_pListPersonalViewHandle->
- pCheckedItemsEditListForRemoved[nCounter]) {
+ if (g_pListPersonalViewHandle->pCheckedItemsEditListForRemoved
+ [nCounter]) {
if (g_pListPersonalViewHandle->bFolderMove) {
pMediaId = mp_util_svc_get_video_folder_id(nCounter);
} else {
}
while ((nIndex < nTotal)
- && g_pListPersonalViewHandle->pSelectedList[nIndex]) {
+ && g_pListPersonalViewHandle->pSelectedList[nIndex]) {
bValidMedia =
- mp_util_svc_check_valid_media_id(g_pListPersonalViewHandle->
- pSelectedList[nIndex],
- eMediaType, &nCounter);
+ mp_util_svc_check_valid_media_id
+ (g_pListPersonalViewHandle->pSelectedList[nIndex], eMediaType,
+ &nCounter);
if (bValidMedia) {
- g_pListPersonalViewHandle->
- pCheckedItemsEditListForRemoved[nCounter] = TRUE;
+ g_pListPersonalViewHandle->pCheckedItemsEditListForRemoved
+ [nCounter] = TRUE;
g_pListPersonalViewHandle->nSelectCounterForEditList++;
}
nIndex++;
if (g_pListPersonalViewHandle->nSelectCounterForEditList > 0)
elm_object_disabled_set(g_pListPersonalViewWidget->pSavebtn,
- EINA_FALSE);
+ EINA_FALSE);
else
elm_object_disabled_set(g_pListPersonalViewWidget->pSavebtn,
- EINA_TRUE);
+ EINA_TRUE);
}
VideoLogError("Main handles of list view are not existed.");
return;
}
- __mp_personal_view_get_selected_video_list(g_pListPersonalViewHandle->
- nSelectCounterForEditList);
+ __mp_personal_view_get_selected_video_list
+ (g_pListPersonalViewHandle->nSelectCounterForEditList);
}
int nSortType = mp_personal_view_get_sort_type();
int nViewType = mp_view_as_ctrl_get_type();
if ((nViewType == MP_LIST_VIEW_AS_FOLDER_LIST)
- && g_pListPersonalViewHandle->pFolderPath) {
+ && g_pListPersonalViewHandle->pFolderPath) {
if (g_pListPersonalViewHandle->pFolderPath) {
VideoSecureLogInfo("szFolderPath : %s",
- g_pListPersonalViewHandle->pFolderPath);
+ g_pListPersonalViewHandle->pFolderPath);
if (vp_file_exists(g_pListPersonalViewHandle->pFolderPath)) {
- /*update video-list*/
+ /*update video-list */
mp_util_svc_destory_video_item_list();
if (g_pListPersonalViewHandle->nViewStyle == 0) {
mp_util_svc_extract_video_list_from_folder_by_personal
- (g_pListPersonalViewHandle->pFolderPath,
- nSortType, MP_LIST_VIEW_ALL, 0);
+ (g_pListPersonalViewHandle->pFolderPath,
+ nSortType, MP_LIST_VIEW_ALL, 0);
} else {
mp_util_svc_extract_video_list_from_folder_by_personal
- (g_pListPersonalViewHandle->pFolderPath,
- nSortType, MP_LIST_VIEW_ALL, 1);
+ (g_pListPersonalViewHandle->pFolderPath,
+ nSortType, MP_LIST_VIEW_ALL, 1);
}
mp_personal_view_arrange_video_list(nSortType,
- g_pListPersonalViewHandle->
- pVideosGenlist, TRUE);
+ g_pListPersonalViewHandle->pVideosGenlist,
+ TRUE);
} else {
- elm_naviframe_item_pop(g_pListPersonalViewHandle->
- pNaviFrameHandle);
+ elm_naviframe_item_pop
+ (g_pListPersonalViewHandle->pNaviFrameHandle);
}
}
} else if (g_pListPersonalViewHandle->bFolderMove) {
if (nFolderListSize > 0) {
mp_personal_view_arrange_folder_list(nSortType,
- g_pListPersonalViewHandle->
- pVideosGenlist, TRUE);
+ g_pListPersonalViewHandle->pVideosGenlist,
+ TRUE);
} else {
- elm_naviframe_item_pop(g_pListPersonalViewHandle->
- pNaviFrameHandle);
+ elm_naviframe_item_pop
+ (g_pListPersonalViewHandle->pNaviFrameHandle);
}
} else {
mp_util_svc_destory_video_list();
if (g_pListPersonalViewHandle->nViewStyle == 0) {
mp_util_svc_extract_video_list_by_personal(nSortType,
- mp_view_ctrl_get_list_type
- (), 0);
+ mp_view_ctrl_get_list_type
+ (), 0);
} else {
mp_util_svc_extract_video_list_by_personal(nSortType,
- mp_view_ctrl_get_list_type
- (), 1);
+ mp_view_ctrl_get_list_type
+ (), 1);
}
int nVideoListSize =
VideoLogInfo("nVideoListSize : %d", nVideoListSize);
if (nVideoListSize > 0) {
mp_personal_view_arrange_video_list(nSortType,
- g_pListPersonalViewHandle->
- pVideosGenlist, TRUE);
+ g_pListPersonalViewHandle->pVideosGenlist,
+ TRUE);
} else {
- elm_naviframe_item_pop(g_pListPersonalViewHandle->
- pNaviFrameHandle);
+ elm_naviframe_item_pop
+ (g_pListPersonalViewHandle->pNaviFrameHandle);
}
}
Elm_Object_Item *pItem =
- elm_genlist_first_item_get(g_pListPersonalViewHandle->
- pVideosGenlist);
+ elm_genlist_first_item_get
+ (g_pListPersonalViewHandle->pVideosGenlist);
if (pItem) {
elm_genlist_item_bring_in(pItem, ELM_GENLIST_ITEM_SCROLLTO_IN);
}
}
-/*static void __mp_personal_view_personal_vconf_cb(keynode_t *pKeyNode,
- void *pUserData)
-{
- if (g_pListPersonalViewHandle) {
- elm_naviframe_item_pop(g_pListPersonalViewHandle->
- pNaviFrameHandle);
- }
-}*/
static void __mp_personal_view_register_personal_vconf()
{
#ifndef ENABLE_PERSONAL
return;
#endif
-// if (vconf_notify_key_changed
-// (MP_UTIL_VCONF_KEY_PERSONAL_TAG,
-// __mp_personal_view_personal_vconf_cb, NULL) < 0) {
-// VideoLogInfo
-// ("Fail to register MP_UTIL_VCONF_KEY_PERSONAL_TAG key callback");
-// }
}
static void __mp_personal_view_ignore_personal_vconf()
#ifndef ENABLE_PERSONAL
return;
#endif
-// if (vconf_ignore_key_changed
-// (MP_UTIL_VCONF_KEY_PERSONAL_TAG,
-// __mp_personal_view_personal_vconf_cb) < 0) {
-// VideoLogInfo("Fail to vconf_ignore_key_changed callback");
-// }
}
static void __mp_personal_select_all_layout_down_cb(void *data,
- Evas *evas,
- Evas_Object *obj,
- void *event_info)
+ Evas * evas,
+ Evas_Object * obj,
+ void *event_info)
{
if (!g_pListPersonalViewHandle || !g_pListPersonalViewWidget) {
VideoLogError("Main handles of list view are not existed.");
}
Evas_Object *check =
- elm_object_part_content_get(g_pListPersonalViewWidget->
- pSelAllLayout, "elm.icon");
+ elm_object_part_content_get
+ (g_pListPersonalViewWidget->pSelAllLayout, "elm.icon");
Eina_Bool state = elm_check_state_get(check);
elm_check_state_set(check, !state);
__mp_personal_view_select_all_change_check_box_cb(data, check, NULL);
VideoLogError("pPersonalViewBaselayout is not existed.");
return;
}
- evas_object_event_callback_add(g_pListPersonalViewWidget->
- pPersonalViewBaselayout,
- EVAS_CALLBACK_DEL,
- __mp_personal_view_base_layout_del_cb,
- NULL);
+ evas_object_event_callback_add
+ (g_pListPersonalViewWidget->pPersonalViewBaselayout,
+ EVAS_CALLBACK_DEL, __mp_personal_view_base_layout_del_cb, NULL);
g_pListPersonalViewWidget->pVideoListBox =
elm_box_add(g_pListPersonalViewWidget->pPersonalViewBaselayout);
return;
}
- evas_object_size_hint_weight_set(g_pListPersonalViewWidget->
- pVideoListBox, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(g_pListPersonalViewWidget->
- pVideoListBox, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
-
- mp_widget_ctrl_create_select_all_layout(g_pListPersonalViewWidget->
- pVideoListBox,
- __mp_personal_view_select_all_change_check_box_cb,
- __mp_personal_select_all_layout_down_cb,
- (void *)
- g_pListPersonalViewWidget,
- &g_pListPersonalViewWidget->
- pSelectallbtn,
- &g_pListPersonalViewWidget->
- pSelAllLayout);
+ evas_object_size_hint_weight_set
+ (g_pListPersonalViewWidget->pVideoListBox, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set
+ (g_pListPersonalViewWidget->pVideoListBox, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+
+ mp_widget_ctrl_create_select_all_layout
+ (g_pListPersonalViewWidget->pVideoListBox,
+ __mp_personal_view_select_all_change_check_box_cb,
+ __mp_personal_select_all_layout_down_cb, (void *)
+ g_pListPersonalViewWidget,
+ &g_pListPersonalViewWidget->pSelectallbtn,
+ &g_pListPersonalViewWidget->pSelAllLayout);
if (!g_pListPersonalViewWidget->pSelAllLayout) {
VideoLogError("pSelAllLayout is not existed.");
}
elm_box_pack_start(g_pListPersonalViewWidget->pVideoListBox,
- g_pListPersonalViewWidget->pSelAllLayout);
+ g_pListPersonalViewWidget->pSelAllLayout);
g_pListPersonalViewHandle->pVideosGenlist =
elm_genlist_add(g_pListPersonalViewWidget->pVideoListBox);
}
elm_genlist_homogeneous_set(g_pListPersonalViewHandle->pVideosGenlist,
- EINA_TRUE);
- evas_object_size_hint_weight_set(g_pListPersonalViewHandle->
- pVideosGenlist, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(g_pListPersonalViewHandle->
- pVideosGenlist, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EINA_TRUE);
+ evas_object_size_hint_weight_set
+ (g_pListPersonalViewHandle->pVideosGenlist, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set
+ (g_pListPersonalViewHandle->pVideosGenlist, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
elm_genlist_block_count_set(g_pListPersonalViewHandle->pVideosGenlist,
- VIDEO_GENLIST_BLOCK_COUNT);
+ VIDEO_GENLIST_BLOCK_COUNT);
elm_genlist_mode_set(g_pListPersonalViewHandle->pVideosGenlist,
- ELM_LIST_COMPRESS);
+ ELM_LIST_COMPRESS);
elm_box_pack_end(g_pListPersonalViewWidget->pVideoListBox,
- g_pListPersonalViewHandle->pVideosGenlist);
- elm_object_part_content_set(g_pListPersonalViewWidget->
- pPersonalViewBaselayout,
- SWALLOW_LISTVIEW_CONTENT,
- g_pListPersonalViewWidget->pVideoListBox);
-
- /*MpVideoPersonalViewCreateSelectionInfo(pParent);*/
-
- /*register db callback*/
- /*mp_util_svc_set_update_db_cb_func(__mp_personal_view_db_changed_cb);*/
+ g_pListPersonalViewHandle->pVideosGenlist);
+ elm_object_part_content_set
+ (g_pListPersonalViewWidget->pPersonalViewBaselayout,
+ SWALLOW_LISTVIEW_CONTENT,
+ g_pListPersonalViewWidget->pVideoListBox);
if (g_pListPersonalViewHandle->bFolderMove) {
VideoLogInfo("ArrangePersonalFolderList");
mp_personal_view_arrange_folder_list
- (mp_personal_view_get_sort_type(),
- g_pListPersonalViewHandle->pVideosGenlist, FALSE);
+ (mp_personal_view_get_sort_type(),
+ g_pListPersonalViewHandle->pVideosGenlist, FALSE);
} else {
mp_personal_view_arrange_video_list(mp_personal_view_get_sort_type
- (),
- g_pListPersonalViewHandle->
- pVideosGenlist, FALSE);
+ (),
+ g_pListPersonalViewHandle->pVideosGenlist,
+ FALSE);
}
- char *szTitle =
- g_strdup_printf(VIDEOS_SELECTVIEW_HEADER_PD_SELECTED,
- g_pListPersonalViewHandle->
- nSelectCounterForEditList);
+ char *szTitle = g_strdup_printf(VIDEOS_SELECTVIEW_HEADER_PD_SELECTED,
+ g_pListPersonalViewHandle->nSelectCounterForEditList);
g_pListPersonalViewHandle->pNaviFrameItem =
- elm_naviframe_item_push(g_pListPersonalViewHandle->
- pNaviFrameHandle, szTitle, NULL, NULL,
- g_pListPersonalViewWidget->
- pPersonalViewBaselayout, NULL);
+ elm_naviframe_item_push
+ (g_pListPersonalViewHandle->pNaviFrameHandle, szTitle, NULL, NULL,
+ g_pListPersonalViewWidget->pPersonalViewBaselayout, NULL);
elm_object_item_domain_text_translatable_set
- (g_pListPersonalViewHandle->pNaviFrameItem, VIDEOS_STRING,
- EINA_TRUE);
- elm_naviframe_item_pop_cb_set(g_pListPersonalViewHandle->
- pNaviFrameItem,
- mp_personal_view_back_btn_cb,
- g_pListPersonalViewHandle);
-
- elm_naviframe_item_title_enabled_set(g_pListPersonalViewHandle->
- pNaviFrameItem, EINA_TRUE,
- EINA_FALSE);
- evas_object_smart_callback_add(g_pListPersonalViewHandle->
- pNaviFrameHandle,
- "transition,finished",
- mp_personal_view_naviframe_transition_effect_cb,
- NULL);
+ (g_pListPersonalViewHandle->pNaviFrameItem, VIDEOS_STRING,
+ EINA_TRUE);
+ elm_naviframe_item_pop_cb_set
+ (g_pListPersonalViewHandle->pNaviFrameItem,
+ mp_personal_view_back_btn_cb, g_pListPersonalViewHandle);
+
+ elm_naviframe_item_title_enabled_set
+ (g_pListPersonalViewHandle->pNaviFrameItem, EINA_TRUE, EINA_FALSE);
+ evas_object_smart_callback_add
+ (g_pListPersonalViewHandle->pNaviFrameHandle,
+ "transition,finished",
+ mp_personal_view_naviframe_transition_effect_cb, NULL);
g_pListPersonalViewWidget->pCancelbtn =
- mp_widget_ctrl_create_navi_left_btn(g_pListPersonalViewHandle->
- pNaviFrameHandle,
- g_pListPersonalViewHandle->
- pNaviFrameItem, NULL,
- __mp_personal_view_run_cancel_items_cb,
- (void *)
- g_pListPersonalViewHandle);
+ mp_widget_ctrl_create_navi_left_btn
+ (g_pListPersonalViewHandle->pNaviFrameHandle,
+ g_pListPersonalViewHandle->pNaviFrameItem, NULL,
+ __mp_personal_view_run_cancel_items_cb, (void *)
+ g_pListPersonalViewHandle);
g_pListPersonalViewWidget->pSavebtn =
- mp_widget_ctrl_create_navi_right_btn(g_pListPersonalViewHandle->
- pNaviFrameHandle,
- g_pListPersonalViewHandle->
- pNaviFrameItem, NULL,
- __mp_personal_view_run_delete_items_cb,
- (void *)
- g_pListPersonalViewHandle);
+ mp_widget_ctrl_create_navi_right_btn
+ (g_pListPersonalViewHandle->pNaviFrameHandle,
+ g_pListPersonalViewHandle->pNaviFrameItem, NULL,
+ __mp_personal_view_run_delete_items_cb, (void *)
+ g_pListPersonalViewHandle);
elm_object_disabled_set(g_pListPersonalViewWidget->pSavebtn,
- EINA_TRUE);
+ EINA_TRUE);
evas_object_show(g_pListPersonalViewHandle->pVideosGenlist);
evas_object_show(g_pListPersonalViewWidget->pPersonalViewBaselayout);
__mp_personal_view_register_personal_vconf();
mp_util_db_set_update_fun(g_pListPersonalViewHandle->euLev,
- __mp_personal_view_db_changed_cb);
+ __mp_personal_view_db_changed_cb);
mp_util_db_set_backup_fun(g_pListPersonalViewHandle->euLev,
- __mp_personal_view_db_backup_cb);
+ __mp_personal_view_db_backup_cb);
MP_FREE_STRING(szTitle);
mp_util_hide_indicator();
}
void mp_personal_view_push(void *pNaviFrame,
- ChangePersonalViewCbFunc pChangeViewCb,
- char *pFolderPath, int nViewStyle)
+ ChangePersonalViewCbFunc pChangeViewCb,
+ char *pFolderPath, int nViewStyle)
{
VideoLogInfo("");
mp_personal_view_destroy();
g_pListPersonalViewHandle =
(st_VideoListPersonalViewHandle *) calloc(1,
- sizeof
- (st_VideoListPersonalViewHandle));
+ sizeof
+ (st_VideoListPersonalViewHandle));
g_pListPersonalViewWidget =
(st_VideoListPersonalViewWidget *) calloc(1,
- sizeof
- (st_VideoListPersonalViewWidget));
+ sizeof
+ (st_VideoListPersonalViewWidget));
memset(g_pListPersonalViewHandle, 0,
- sizeof(st_VideoListPersonalViewHandle));
+ sizeof(st_VideoListPersonalViewHandle));
memset(g_pListPersonalViewWidget, 0,
- sizeof(st_VideoListPersonalViewWidget));
+ sizeof(st_VideoListPersonalViewWidget));
mp_personal_view_reset_value();
g_pListPersonalViewHandle->pNaviFrameHandle = pNaviFrame;
int nViewType = mp_view_as_ctrl_get_type();
if (nViewType == MP_LIST_VIEW_AS_FOLDER_LIST
- && g_pListPersonalViewHandle->pFolderPath) {
+ && g_pListPersonalViewHandle->pFolderPath) {
g_pListPersonalViewHandle->euLev = MP_DB_UPDATE_LEV_2;
}
if (nViewType == MP_LIST_VIEW_AS_FOLDER_LIST
- && !g_pListPersonalViewHandle->pFolderPath) {
+ && !g_pListPersonalViewHandle->pFolderPath) {
g_pListPersonalViewHandle->bFolderMove = TRUE;
} else {
g_pListPersonalViewHandle->bFolderMove = FALSE;
int nSortType = mp_personal_view_get_sort_type();
int nViewType = mp_view_as_ctrl_get_type();
if ((nViewType == MP_LIST_VIEW_AS_FOLDER_LIST)
- && g_pListPersonalViewHandle->pFolderPath) {
+ && g_pListPersonalViewHandle->pFolderPath) {
if (g_pListPersonalViewHandle->pFolderPath) {
VideoSecureLogInfo("szFolderPath : %s",
- g_pListPersonalViewHandle->pFolderPath);
+ g_pListPersonalViewHandle->pFolderPath);
if (vp_file_exists(g_pListPersonalViewHandle->pFolderPath)) {
- /*update video-list*/
+ /*update video-list */
mp_util_svc_destory_video_item_list();
if (g_pListPersonalViewHandle->nViewStyle == 0) {
mp_util_svc_extract_video_list_from_folder_by_personal
- (g_pListPersonalViewHandle->pFolderPath,
- nSortType, MP_LIST_VIEW_ALL, 0);
+ (g_pListPersonalViewHandle->pFolderPath,
+ nSortType, MP_LIST_VIEW_ALL, 0);
} else {
mp_util_svc_extract_video_list_from_folder_by_personal
- (g_pListPersonalViewHandle->pFolderPath,
- nSortType, MP_LIST_VIEW_ALL, 1);
+ (g_pListPersonalViewHandle->pFolderPath,
+ nSortType, MP_LIST_VIEW_ALL, 1);
}
- elm_genlist_clear(g_pListPersonalViewHandle->
- pVideosGenlist);
+ elm_genlist_clear
+ (g_pListPersonalViewHandle->pVideosGenlist);
mp_personal_view_append_video_items
- (g_pListPersonalViewHandle->pVideosGenlist);
+ (g_pListPersonalViewHandle->pVideosGenlist);
} else {
- elm_naviframe_item_pop(g_pListPersonalViewHandle->
- pNaviFrameHandle);
+ elm_naviframe_item_pop
+ (g_pListPersonalViewHandle->pNaviFrameHandle);
}
}
} else if (g_pListPersonalViewHandle->bFolderMove) {
if (nFolderListSize > 0) {
mp_personal_view_append_folder_items
- (g_pListPersonalViewHandle->pVideosGenlist);
+ (g_pListPersonalViewHandle->pVideosGenlist);
} else {
- elm_naviframe_item_pop(g_pListPersonalViewHandle->
- pNaviFrameHandle);
+ elm_naviframe_item_pop
+ (g_pListPersonalViewHandle->pNaviFrameHandle);
}
} else {
mp_util_svc_destory_video_list();
if (g_pListPersonalViewHandle->nViewStyle == 0) {
mp_util_svc_extract_video_list_by_personal(nSortType,
- mp_view_ctrl_get_list_type
- (), 0);
+ mp_view_ctrl_get_list_type
+ (), 0);
} else {
mp_util_svc_extract_video_list_by_personal(nSortType,
- mp_view_ctrl_get_list_type
- (), 1);
+ mp_view_ctrl_get_list_type
+ (), 1);
}
int nVideoListSize =
if (nVideoListSize > 0) {
mp_personal_view_append_video_items
- (g_pListPersonalViewHandle->pVideosGenlist);
+ (g_pListPersonalViewHandle->pVideosGenlist);
} else {
- elm_naviframe_item_pop(g_pListPersonalViewHandle->
- pNaviFrameHandle);
+ elm_naviframe_item_pop
+ (g_pListPersonalViewHandle->pNaviFrameHandle);
}
}
mp_util_db_reset_backup_fun_up_self(g_pListPersonalViewHandle->euLev);
if (g_pListPersonalViewHandle->pChangeViewUserCbFunc) {
- g_pListPersonalViewHandle->
- pChangeViewUserCbFunc(LIST_UPDATE_TYPE_ALL);
+ g_pListPersonalViewHandle->pChangeViewUserCbFunc
+ (LIST_UPDATE_TYPE_ALL);
}
}
static void
-__mp_personal_view_base_layout_del_cb(void *pUserData, Evas *e,
- Evas_Object *pObject,
- void *pEventInfo)
+__mp_personal_view_base_layout_del_cb(void *pUserData, Evas * e,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
- /*evas_object_event_callback_del(g_pListPersonalViewWidget->pPersonalViewBaselayout, EVAS_CALLBACK_DEL, __mp_personal_view_base_layout_del_cb);*/
-
__mp_personal_view_reset();
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
#include <Ecore_Evas.h>
#include "mp-util-config.h"
typedef struct _MpRemoveVideoCtrl {
- /*obj*/
+ /*obj */
Evas_Object *pPopUpHandle;
Evas_Object *pProgressbar;
- /*data*/
+ /*data */
Ecore_Idler *pDelIdler;
Ecore_Timer *pStartDelTimer;
Ecore_Timer *pFinishDelTimer;
/* Internal function*/
/*//////////////////////////////////////////////////////////*/
static void mp_remove_ctrl_button_popup_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo);
+ Evas_Object * pObject,
+ void *pEventInfo);
void mp_remove_ctrl_delete_popup_handle(void)
{
if (g_pRemoveCtrl->pPopUpHandle) {
eext_object_event_callback_del(g_pRemoveCtrl->pPopUpHandle,
- EEXT_CALLBACK_BACK,
- mp_remove_ctrl_button_popup_cb);
+ EEXT_CALLBACK_BACK,
+ mp_remove_ctrl_button_popup_cb);
MP_DEL_OBJ(g_pRemoveCtrl->pPopUpHandle);
}
MP_FREE_STRING(g_pRemoveCtrl);
}
static void mp_remove_ctrl_button_popup_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
if (!g_pRemoveCtrl) {
if (!g_pRemoveCtrl->pDelEditList) {
VideoLogError
- ("The userdata and g_pRemoveCtrl->pDelEditList is null.");
+ ("The userdata and g_pRemoveCtrl->pDelEditList is null.");
g_pRemoveCtrl->pDelIdler = NULL;
return FALSE;
}
int nResult = 0;
for (nCounter = 0; nCounter < g_pRemoveCtrl->nDelEditListSize;
- nCounter++) {
+ nCounter++) {
if (g_pRemoveCtrl->pDelEditList[nCounter]) {
if (g_pRemoveCtrl->bFolderDel) {
char *szFolderUrl =
nResult =
mp_util_move_delete_video_folder(szFolderUrl,
- NULL);
- /*if (mp_util_check_empty_dir(szFolderUrl))
- {
- vp_file_unlink(szFolderUrl)
- } */
+ NULL);
+
if (szMediaUrlForPreview
- &&
- !mp_util_check_local_file_exist
- (szMediaUrlForPreview)) {
+ &&
+ !mp_util_check_local_file_exist
+ (szMediaUrlForPreview)) {
mp_util_config_set_preview(NULL);
MP_FREE_STRING(szMediaUrlForPreview);
}
mp_util_svc_remove_folder_list_item_from_list
- (nCounter);
+ (nCounter);
MP_FREE_STRING(szFolderUrl);
if (nResult == 1) {
VideoLogInfo("cancel delete");
MP_FREE_STRING(szFileUrl);
mp_util_svc_remove_item_by_list_index(nCounter);
- /*mp_util_svc_move_from_db(szFileUrl);*/
}
}
int nMoveItemCounter = 0;
for (nMoveItemCounter = nCounter;
- nMoveItemCounter < g_pRemoveCtrl->nDelEditListSize - 1;
- nMoveItemCounter++) {
+ nMoveItemCounter < g_pRemoveCtrl->nDelEditListSize - 1;
+ nMoveItemCounter++) {
g_pRemoveCtrl->pDelEditList[nMoveItemCounter] =
g_pRemoveCtrl->pDelEditList[nMoveItemCounter + 1];
}
g_pRemoveCtrl->nDelEditListSize--;
- /* pRemoveCheckedItemsEditList[nCounter] = FALSE;*/
++g_pRemoveCtrl->nDelCompltedItem;
break;
}
MP_FREE_STRING(szMediaUrlForPreview);
VideoLogInfo("nCompltedDeleteItem : %d",
- g_pRemoveCtrl->nDelCompltedItem);
+ g_pRemoveCtrl->nDelCompltedItem);
double nDeleteRate =
((double) g_pRemoveCtrl->nDelCompltedItem) /
((double) g_pRemoveCtrl->nDelTotalItem);
VideoLogInfo
- ("nDeleteRate:%f, nCompltedDeleteItem:%d, nTotalDeleteItem:%d",
- nDeleteRate, g_pRemoveCtrl->nDelCompltedItem,
- g_pRemoveCtrl->nDelTotalItem);
+ ("nDeleteRate:%f, nCompltedDeleteItem:%d, nTotalDeleteItem:%d",
+ nDeleteRate, g_pRemoveCtrl->nDelCompltedItem,
+ g_pRemoveCtrl->nDelTotalItem);
if (g_pRemoveCtrl->pProgressbar) {
elm_progressbar_value_set(g_pRemoveCtrl->pProgressbar,
- nDeleteRate);
+ nDeleteRate);
} else {
VideoLogInfo("No exist progress bar handle.");
}
g_pRemoveCtrl->pDelIdler = NULL;
g_pRemoveCtrl->pFinishDelTimer =
ecore_timer_add(0.1, __mp_remove_ctrl_finish_delete_timer_cb,
- pUserData);
+ pUserData);
return FALSE;
}
/*//////////////////////////////////////////////////////////*/
/* External function*/
/*//////////////////////////////////////////////////////////*/
-bool mp_remove_ctrl_show(bool *pCheckedItemsEditList,
- int pCheckedItemsEditListSize,
- ListRemoveCtrlCbFunc pListRemoveCtrlCb,
- bool bFolderDel, void *pUserData)
+bool mp_remove_ctrl_show(bool * pCheckedItemsEditList,
+ int pCheckedItemsEditListSize,
+ ListRemoveCtrlCbFunc pListRemoveCtrlCb,
+ bool bFolderDel, void *pUserData)
{
if (!pCheckedItemsEditList) {
}
VideoLogInfo("pCheckedItemsEditListSize : %d",
- pCheckedItemsEditListSize);
+ pCheckedItemsEditListSize);
mp_remove_ctrl_delete_popup_handle();
g_pRemoveCtrl = (stMpRemoveCtrl *) calloc(1, sizeof(stMpRemoveCtrl));
int nCounter = 0;
for (nCounter = 0; nCounter < g_pRemoveCtrl->nDelEditListSize;
- nCounter++) {
+ nCounter++) {
if (g_pRemoveCtrl->pDelEditList[nCounter]) {
char *szTitle = mp_util_svc_get_video_title(nCounter);
VideoLogInfo(" Delete index - %d ; %s", nCounter, szTitle);
g_pRemoveCtrl->pPopUpHandle =
elm_popup_add(mp_util_get_main_window_handle());
- /*elm_object_part_text_set(g_pRemoveCtrl->pPopUpHandle, "title,text", VIDEOS_DELETEPOP_MSG_DELETING);*/
evas_object_size_hint_weight_set(g_pRemoveCtrl->pPopUpHandle,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
eext_object_event_callback_add(g_pRemoveCtrl->pPopUpHandle,
- EEXT_CALLBACK_BACK,
- mp_remove_ctrl_button_popup_cb, NULL);
+ EEXT_CALLBACK_BACK,
+ mp_remove_ctrl_button_popup_cb, NULL);
- /*Evas_Object *pButton = elm_button_add(g_pRemoveCtrl->pPopUpHandle);
- elm_object_style_set (pButton, "popup");
- elm_object_text_set(pButton, VIDEOS_COMMON_BUTTON_CANCEL);
- elm_object_part_content_set(g_pRemoveCtrl->pPopUpHandle, "button1", pButton);
- evas_object_smart_callback_add(pButton, "clicked", mp_remove_ctrl_button_popup_cb, pUserData);
- evas_object_show(pButton); */
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_POPUP_PROGRESSBAR_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_POPUP_PROGRESSBAR_EDJ);
free(path);
Evas_Object *pPopupLayout =
elm_layout_add(g_pRemoveCtrl->pPopUpHandle);
elm_layout_file_set(pPopupLayout, edj_path,
- "popup_text_progressbar_view_layout");
+ "popup_text_progressbar_view_layout");
elm_object_part_text_set(pPopupLayout, "elm.text.description",
- VIDEOS_DELETEPOP_MSG_DELETING);
+ VIDEOS_DELETEPOP_MSG_DELETING);
elm_object_part_text_set(pPopupLayout, "progress_text", "00/00");
evas_object_size_hint_weight_set(pPopupLayout, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_show(pPopupLayout);
Evas_Object *pProgressbar =
elm_progressbar_add(g_pRemoveCtrl->pPopUpHandle);
elm_object_style_set(pProgressbar, "wheel");
evas_object_size_hint_align_set(pProgressbar, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pProgressbar, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
elm_progressbar_pulse(pProgressbar, EINA_TRUE);
elm_object_signal_emit(pProgressbar, "elm,units,show", "elm");
evas_object_show(pProgressbar);
- elm_object_part_content_set(pPopupLayout, "progressbar",
- pProgressbar);
+ elm_object_part_content_set(pPopupLayout, "progressbar", pProgressbar);
g_pRemoveCtrl->pProgressbar = pProgressbar;
elm_object_content_set(g_pRemoveCtrl->pPopUpHandle, pPopupLayout);
evas_object_data_set(g_pRemoveCtrl->pPopUpHandle, "progressbar",
- pProgressbar);
+ pProgressbar);
evas_object_show(g_pRemoveCtrl->pPopUpHandle);
MP_DEL_TIMER(g_pRemoveCtrl->pStartDelTimer);
g_pRemoveCtrl->pStartDelTimer =
ecore_timer_add(0.3, __mp_remove_ctrl_start_delete_timer_cb,
- pUserData);
+ pUserData);
return TRUE;
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <Eina.h>
#include <Ecore_Evas.h>
#define VIDEO_SELECTED_INFO_TIMER 4.0
-typedef struct
-{
+typedef struct {
void *pNaviFrameHandle;
void *pNaviFrameItem;
void *pObjVideosList; //used for list view ,folder view,thumbnail view
Elm_Gengrid_Item_Class *pGenGridItc_1;
Elm_Gengrid_Item_Class *pGenGridItc_2;
bool *pCheckedItemsEditListForRemoved;
- char **pSelectedList; //save selected video id
+ char **pSelectedList; //save selected video id
bool bSelectallCheckBoxState;
int nSelectCounterForEditList;
MpMediaSvcSortType nSortType;
- ChangeListRemoveViewCbFunc pChangeViewUserCbFunc; //view pop
- ListRemoveViewCbFunc pChangeViewUpdateFunc; //update main list
+ ChangeListRemoveViewCbFunc pChangeViewUserCbFunc; //view pop
+ ListRemoveViewCbFunc pChangeViewUpdateFunc; //update main list
char *pFolderPath;
MpVideoListTabType eTabType;
MpDbUpdateViewLev euLev;
#ifdef VS_FEATURE_THUMBNAIL_VIEW //
bool bLandscape;
bool bThumbnailView;
+ bool update_view_data;
#endif
-}st_VideoListRemoveViewHandle;
+} st_VideoListRemoveViewHandle;
-typedef struct
-{
- //Evas_Object *pSelectionInfoLayout;
+typedef struct {
Evas_Object *pVideoListBox;
Evas_Object *pRemoveViewBaselayout;
Evas_Object *pSelectallbtn;
Evas_Object *pCancelbtn;
Ecore_Timer *pSelectedInfoLayoutTimer;
-}st_VideoListRemoveViewWidget;
+} st_VideoListRemoveViewWidget;
static st_VideoListRemoveViewHandle *g_pListRemoveViewHandle = NULL;
static st_VideoListRemoveViewWidget *g_pListRemoveViewWidget = NULL;
+int getFolderCount = 0;
+bool folderStatus[1024] = { 0, };
+
+Eina_List *g_pSelectedList = NULL;
+
// Pre define function
int mp_remove_view_get_sort_type(void);
-static bool __mp_remove_view_arrange_video_list(void *pObjVideosList, MpVideoListTabType eTabType, bool bNeedSvc);
-static bool __mp_remove_view_arrange_folder_list(void *pObjVideosList, MpVideoListTabType eTabType, bool bNeedSvc);
-void mp_remove_view_naviframe_transition_effect_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo);
+static bool __mp_remove_view_arrange_video_list(void *pObjVideosList,
+ MpVideoListTabType
+ eTabType, bool bNeedSvc);
+static bool __mp_remove_view_arrange_folder_list(void *pObjVideosList,
+ MpVideoListTabType
+ eTabType, bool bNeedSvc);
+void mp_remove_view_naviframe_transition_effect_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo);
void mp_remove_view_change_title_info(void);
-static void __mp_remove_view_base_layout_del_cb(void *pUserData, Evas *e, Evas_Object *pObject, void *pEventInfo);
-static void __mp_remove_view_rotate_cb(void *data, Evas_Object *obj, void *event_info);
+static void __mp_remove_view_base_layout_del_cb(void *pUserData, Evas * e,
+ Evas_Object * pObject,
+ void *pEventInfo);
+static void __mp_remove_view_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info);
static bool __mp_remove_view_get_selected_video_list(int nSelectedSize);
-//static void __mp_remove_view_update_selected_video_list(void);
+static void __mp_remove_view_update_selected_video_list(void);
+static void __mp_remove_view_update_remove_selected_file(char *path,
+ Eina_Bool add);
+static void __mp_remove_view_release_selected_list(void);
+static bool __mp_remove_view_is_selected_file(const char *path);
+
+static bool __mp_remove_view_is_selected_file(const char *path)
+{
+ bool bSelected = FALSE;
+
+ Eina_List *l = NULL;
+ char *data;
+ EINA_LIST_FOREACH(g_pSelectedList, l, data) {
+ if (data && path && !strcmp(data, path)) {
+ bSelected = TRUE;
+ break;
+ }
+ }
+
+ return bSelected;
+}
static void __mp_remove_view_free_selected_list(void)
{
- if (!g_pListRemoveViewHandle || !g_pListRemoveViewHandle->pSelectedList)
- {
+ if (!g_pListRemoveViewHandle
+ || !g_pListRemoveViewHandle->pSelectedList) {
VideoLogInfo("Selected_list is already freed.");
return;
}
int nIndex = 0;
- while (g_pListRemoveViewHandle->pSelectedList[nIndex])
- {
+ while (g_pListRemoveViewHandle->pSelectedList[nIndex]) {
nIndex++;
MP_FREE_STRING(g_pListRemoveViewHandle->pSelectedList[nIndex]);
}
MP_FREE_STRING(g_pListRemoveViewHandle->pSelectedList);
+
+// __mp_remove_view_release_selected_list();
}
void mp_remove_view_update_all_check_box(void)
VideoLogInfo("");
int nVideoListSize = 0;
- if (LIST_TAB_TYPE_PERSONAL == g_pListRemoveViewHandle->eTabType)
- {
- if (g_pListRemoveViewHandle->bFolderDel)
- {
+ if (LIST_TAB_TYPE_PERSONAL == g_pListRemoveViewHandle->eTabType) {
+ if (g_pListRemoveViewHandle->bFolderDel) {
nVideoListSize = mp_util_svc_get_video_folder_size();
+ } else {
+ nVideoListSize =
+ mp_util_svc_get_number_of_video_item_by_type();
}
- else
- {
- nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
- }
- }
- else
- {
+ } else {
VideoLogError("Can't handle this eTabType!");
}
Elm_Object_Item *currentItemGengrid = NULL;
int nVideoItemIndex = 0;
#ifdef VS_FEATURE_THUMBNAIL_VIEW //
- if (g_pListRemoveViewHandle->bThumbnailView)
- {
- currentItem = elm_genlist_first_item_get(g_pListRemoveViewHandle->pObjVideosList);
+ if (g_pListRemoveViewHandle->bThumbnailView) {
+ currentItem =
+ elm_genlist_first_item_get(g_pListRemoveViewHandle->
+ pObjVideosList);
nVideoItemIndex = 0;
while (currentItem && (nVideoItemIndex < nVideoListSize)) {
- Evas_Object *gengrid= elm_object_item_part_content_get(currentItem, "elm.icon");
+ Evas_Object *gengrid =
+ elm_object_item_part_content_get(currentItem, "elm.icon");
currentItemGengrid = elm_gengrid_first_item_get(gengrid);
- while (currentItemGengrid && (nVideoItemIndex < nVideoListSize)) {
- Evas_Object *check_box= elm_object_item_part_content_get(currentItemGengrid, "elm.swallow.end");
+ while (currentItemGengrid
+ && (nVideoItemIndex < nVideoListSize)) {
+ Evas_Object *check_box =
+ elm_object_item_part_content_get(currentItemGengrid,
+ "elm.swallow.end");
if (check_box) {
- elm_check_state_set(check_box, g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved[nVideoItemIndex]);
+ elm_check_state_set(check_box,
+ g_pListRemoveViewHandle->
+ pCheckedItemsEditListForRemoved
+ [nVideoItemIndex]);
}
- currentItemGengrid = elm_gengrid_item_next_get(currentItemGengrid);
- nVideoItemIndex ++;
+ currentItemGengrid =
+ elm_gengrid_item_next_get(currentItemGengrid);
+ nVideoItemIndex++;
}
currentItem = elm_genlist_item_next_get(currentItem);
}
- }
- else
+ } else
#endif
{
- currentItem = elm_genlist_first_item_get(g_pListRemoveViewHandle->pObjVideosList);
+ currentItem =
+ elm_genlist_first_item_get(g_pListRemoveViewHandle->
+ pObjVideosList);
nVideoItemIndex = 0;
while (currentItem && (nVideoItemIndex < nVideoListSize)) {
- check_box_layout = elm_object_item_part_content_get(currentItem, "elm.icon.2");
- check_box = elm_object_part_content_get(check_box_layout, "elm.swallow.content");
+ check_box_layout =
+ elm_object_item_part_content_get(currentItem,
+ "elm.icon.2");
+ check_box =
+ elm_object_part_content_get(check_box_layout,
+ "elm.swallow.content");
if (check_box) {
- elm_check_state_set(check_box, g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved[nVideoItemIndex]);
+ elm_check_state_set(check_box,
+ g_pListRemoveViewHandle->
+ pCheckedItemsEditListForRemoved
+ [nVideoItemIndex]);
}
currentItem = elm_genlist_item_next_get(currentItem);
- nVideoItemIndex ++;
+ nVideoItemIndex++;
}
}
{
VideoLogInfo("");
- if (g_pListRemoveViewHandle)
- {
- evas_object_smart_callback_del(g_pListRemoveViewHandle->pNaviFrameHandle, "transition,finished", mp_remove_view_naviframe_transition_effect_cb);
- evas_object_smart_callback_del((Evas_Object*)mp_util_get_main_window_handle(), "wm,rotation,changed", __mp_remove_view_rotate_cb);
+ if (g_pListRemoveViewHandle) {
+ evas_object_smart_callback_del(g_pListRemoveViewHandle->
+ pNaviFrameHandle,
+ "transition,finished",
+ mp_remove_view_naviframe_transition_effect_cb);
+ evas_object_smart_callback_del((Evas_Object *)
+ mp_util_get_main_window_handle(),
+ "wm,rotation,changed",
+ __mp_remove_view_rotate_cb);
__mp_remove_view_free_selected_list();
MP_DEL_ITC(g_pListRemoveViewHandle->pGenListItc);
MP_DEL_GRID_ITC(g_pListRemoveViewHandle->pGenGridItc_1);
MP_DEL_GRID_ITC(g_pListRemoveViewHandle->pGenGridItc_2);
MP_DEL_OBJ(g_pListRemoveViewHandle->pObjVideosList);
- MP_FREE_STRING(g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved);
+ MP_FREE_STRING(g_pListRemoveViewHandle->
+ pCheckedItemsEditListForRemoved);
g_pListRemoveViewHandle->pChangeViewUserCbFunc = NULL;
g_pListRemoveViewHandle->pChangeViewUpdateFunc = NULL;
MP_FREE_STRING(g_pListRemoveViewHandle->pFolderPath);
g_pListRemoveViewHandle = NULL;
}
- if (g_pListRemoveViewWidget)
- {
+ if (g_pListRemoveViewWidget) {
MP_DEL_OBJ(g_pListRemoveViewWidget->pSelectallbtn);
MP_DEL_OBJ(g_pListRemoveViewWidget->pSavebtn);
MP_DEL_OBJ(g_pListRemoveViewWidget->pCancelbtn);
{
VideoLogInfo("");
- if (g_pListRemoveViewHandle)
- {
+ if (g_pListRemoveViewHandle) {
mp_util_db_set_update_fun(g_pListRemoveViewHandle->euLev, NULL);
mp_util_db_set_backup_fun(g_pListRemoveViewHandle->euLev, NULL);
- evas_object_smart_callback_del(g_pListRemoveViewHandle->pNaviFrameHandle, "transition,finished", mp_remove_view_naviframe_transition_effect_cb);
- evas_object_smart_callback_del((Evas_Object*)mp_util_get_main_window_handle(), "wm,rotation,changed", __mp_remove_view_rotate_cb);
+ evas_object_smart_callback_del(g_pListRemoveViewHandle->
+ pNaviFrameHandle,
+ "transition,finished",
+ mp_remove_view_naviframe_transition_effect_cb);
+ evas_object_smart_callback_del((Evas_Object *)
+ mp_util_get_main_window_handle(),
+ "wm,rotation,changed",
+ __mp_remove_view_rotate_cb);
__mp_remove_view_free_selected_list();
g_pListRemoveViewHandle->pObjVideosList = NULL;
MP_DEL_ITC(g_pListRemoveViewHandle->pGenListItc);
MP_DEL_GRID_ITC(g_pListRemoveViewHandle->pGenGridItc_1);
MP_DEL_GRID_ITC(g_pListRemoveViewHandle->pGenGridItc_2);
- MP_FREE_STRING(g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved);
+ MP_FREE_STRING(g_pListRemoveViewHandle->
+ pCheckedItemsEditListForRemoved);
g_pListRemoveViewHandle->pChangeViewUserCbFunc = NULL;
g_pListRemoveViewHandle->pChangeViewUpdateFunc = NULL;
MP_FREE_STRING(g_pListRemoveViewHandle->pFolderPath);
g_pListRemoveViewHandle = NULL;
}
- if (g_pListRemoveViewWidget)
- {
+ if (g_pListRemoveViewWidget) {
MP_DEL_OBJ(g_pListRemoveViewWidget->pSelectallbtn);
MP_DEL_OBJ(g_pListRemoveViewWidget->pCancelbtn);
MP_DEL_OBJ(g_pListRemoveViewWidget->pSavebtn);
g_pListRemoveViewWidget->pSelAllLayout = NULL;
- if (g_pListRemoveViewWidget->pVideoListBox)
- {
+ if (g_pListRemoveViewWidget->pVideoListBox) {
g_pListRemoveViewWidget->pVideoListBox = NULL;
}
- if (g_pListRemoveViewWidget->pRemoveViewBaselayout)
- {
+ if (g_pListRemoveViewWidget->pRemoveViewBaselayout) {
g_pListRemoveViewWidget->pRemoveViewBaselayout = NULL;
}
{
VideoLogInfo("");
- if (!g_pListRemoveViewHandle)
- {
+ if (!g_pListRemoveViewHandle) {
VideoLogError("[ERR] g_pListRemoveViewHandle is not existed.");
return;
}
g_pListRemoveViewHandle->nSelectCounterForEditList = 0;
g_pListRemoveViewHandle->nSortType = MP_MEDIA_SORT_BY_RECENTLY_VIEWED;
- if (g_pListRemoveViewHandle->pNaviFrameItem)
- {
- elm_object_item_part_content_unset(g_pListRemoveViewHandle->pNaviFrameItem, "toolbar_more_btn");
- elm_object_item_part_content_unset(g_pListRemoveViewHandle->pNaviFrameItem, "toolbar");
- elm_object_item_part_content_unset(g_pListRemoveViewHandle->pNaviFrameItem, "toolbar_button2");
+ if (g_pListRemoveViewHandle->pNaviFrameItem) {
+ elm_object_item_part_content_unset(g_pListRemoveViewHandle->
+ pNaviFrameItem,
+ "toolbar_more_btn");
+ elm_object_item_part_content_unset(g_pListRemoveViewHandle->
+ pNaviFrameItem, "toolbar");
+ elm_object_item_part_content_unset(g_pListRemoveViewHandle->
+ pNaviFrameItem,
+ "toolbar_button2");
}
}
// Remove items. (Below functions are about the item deletion to call by button of toolbar.)
void mp_remove_view_done_delete_complete(void)
{
+ __mp_remove_view_release_selected_list();
if (!g_pListRemoveViewHandle) {
VideoLogError("[ERR] g_pListRemoveViewHandle is NULL.");
return;
}
}
-void mp_remove_view_response_done_delete_items_popup_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+void mp_remove_view_response_done_delete_items_popup_cb(void *pUserData,
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
- if (!g_pListRemoveViewHandle)
- {
+ if (!g_pListRemoveViewHandle) {
VideoLogError("[ERR] g_pListRemoveViewHandle is NULL.");
return;
}
+ __mp_remove_view_release_selected_list();
mp_util_delete_popup_handle();
g_pListRemoveViewHandle->bUpdateList = TRUE;
int nVideoListSize = 0;
- if (LIST_TAB_TYPE_PERSONAL == g_pListRemoveViewHandle->eTabType)
- {
- if (g_pListRemoveViewHandle->bFolderDel)
- {
+ if (LIST_TAB_TYPE_PERSONAL == g_pListRemoveViewHandle->eTabType) {
+ if (g_pListRemoveViewHandle->bFolderDel) {
nVideoListSize = mp_util_svc_get_video_folder_size();
- }
- else
- {
- nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
- }
- mp_remove_ctrl_show(g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved,
- nVideoListSize,
- mp_remove_view_done_delete_complete,
- g_pListRemoveViewHandle->bFolderDel,
- NULL);
- }
- else
- {
+ } else {
+ nVideoListSize =
+ mp_util_svc_get_number_of_video_item_by_type();
+ }
+ mp_remove_ctrl_show(g_pListRemoveViewHandle->
+ pCheckedItemsEditListForRemoved,
+ nVideoListSize,
+ mp_remove_view_done_delete_complete,
+ g_pListRemoveViewHandle->bFolderDel, NULL);
+ } else {
VideoLogError("Can't handle this eTabType!");
}
}
-void mp_remove_view_response_cancel_delete_items_popup_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+void mp_remove_view_response_cancel_delete_items_popup_cb(void *pUserData,
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
mp_util_delete_popup_handle();
}
-void mp_remove_view_HW_mouse_back_popup_cb(void *pUserData, Evas *pEvas, Evas_Object *pObject, void *pEventInfo)
+void mp_remove_view_HW_mouse_back_popup_cb(void *pUserData, Evas * pEvas,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
Evas_Event_Mouse_Up *pEvent = pEventInfo;
if (!pEvent) {
VideoLogWarning("[ERR] pEvent is NULL.");
- return ;
+ return;
}
- if (pEvent->button == 3)
- {
+ if (pEvent->button == 3) {
mp_util_delete_popup_handle();
}
}
-void mp_remove_view_HW_key_back_popup_cb(void *pUserData, Evas *pEvas, Evas_Object *pObject, void *pEventInfo)
+void mp_remove_view_HW_key_back_popup_cb(void *pUserData, Evas * pEvas,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
Evas_Event_Key_Down *pEvent = pEventInfo;
if (!pEvent) {
VideoLogWarning("[ERR] pEvent is NULL.");
- return ;
+ return;
}
- if (!g_strcmp0(pEvent->keyname, "XF86Back"))
- {
+ if (!g_strcmp0(pEvent->keyname, "XF86Back")) {
mp_util_delete_popup_handle();
}
}
-static void __mp_remove_view_run_cancel_items_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+static void __mp_remove_view_run_cancel_items_cb(void *data,
+ Evas_Object * obj,
+ const char *emission,
+ const char *source)
{
if (!g_pListRemoveViewHandle->pNaviFrameHandle) {
VideoLogError("g_pListRemoveViewHandle->pNaviFrameHandle is NULL");
}
-static void __mp_remove_view_run_delete_items_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+static void __mp_remove_view_run_delete_items_cb(void *data,
+ Evas_Object * obj,
+ const char *emission,
+ const char *source)
{
if (!g_pListRemoveViewHandle) {
VideoLogError("[ERR] g_pMainViewHandle is NULL.");
return;
}
- int nSelectCounter = g_pListRemoveViewHandle->nSelectCounterForEditList;
+ int nSelectCounter =
+ g_pListRemoveViewHandle->nSelectCounterForEditList;
if (nSelectCounter > 0) {
MpListViewAsType type = mp_view_as_ctrl_get_type();
bool bItemFolderView = mp_folder_item_view_is_current_view();
- if (type == MP_LIST_VIEW_AS_FOLDER_LIST && bItemFolderView) {
+ if (type == MP_LIST_VIEW_AS_FOLDER_LIST && bItemFolderView) {
type = MP_LIST_VIEW_AS_THUMBNAIL_LIST;
}
if (g_pListRemoveViewHandle->bSelectallCheckBoxState)
- mp_util_remove_all_videos_question_popup((void *) NULL, type, mp_remove_view_response_done_delete_items_popup_cb, mp_remove_view_response_cancel_delete_items_popup_cb, mp_remove_view_HW_mouse_back_popup_cb, mp_remove_view_HW_key_back_popup_cb);
+ mp_util_remove_all_videos_question_popup((void *) NULL, type,
+ mp_remove_view_response_done_delete_items_popup_cb,
+ mp_remove_view_response_cancel_delete_items_popup_cb,
+ mp_remove_view_HW_mouse_back_popup_cb,
+ mp_remove_view_HW_key_back_popup_cb);
else
- mp_util_remove_question_popup((-nSelectCounter), type, mp_remove_view_response_done_delete_items_popup_cb, mp_remove_view_response_cancel_delete_items_popup_cb, mp_remove_view_HW_mouse_back_popup_cb, mp_remove_view_HW_key_back_popup_cb);
- //g_pListRemoveViewHandle->nSelectCounterForEditList = 0;
+ mp_util_remove_question_popup((-nSelectCounter), type,
+ mp_remove_view_response_done_delete_items_popup_cb,
+ mp_remove_view_response_cancel_delete_items_popup_cb,
+ mp_remove_view_HW_mouse_back_popup_cb,
+ mp_remove_view_HW_key_back_popup_cb);
}
}
-static void __mp_remove_view_trans_finished_cb(void *pUserData, Evas_Object *obj, void *event_info)
+static void __mp_remove_view_trans_finished_cb(void *pUserData,
+ Evas_Object * obj,
+ void *event_info)
{
- if (!obj)
- {
+ if (!obj) {
VideoLogError("[ERR] g_pListRemoveViewHandle is NULL.");
return;
}
mp_widget_ctrl_enable_navi_handle_focus(obj);
- evas_object_smart_callback_del(obj, "transition,finished", __mp_remove_view_trans_finished_cb);
+ evas_object_smart_callback_del(obj, "transition,finished",
+ __mp_remove_view_trans_finished_cb);
}
-static Eina_Bool __mp_remove_view_back_btn_cb(void *pUserData, Elm_Object_Item *pItem)
+static Eina_Bool __mp_remove_view_back_btn_cb(void *pUserData,
+ Elm_Object_Item * pItem)
{
- if (!g_pListRemoveViewHandle)
- {
+ if (!g_pListRemoveViewHandle) {
VideoLogInfo("[ERR] g_pListRemoveViewHandle is NULL.");
return EINA_TRUE;
}
-
// Register transition finished callback.
- mp_widget_ctrl_disable_navi_handle_focus_except_item(g_pListRemoveViewHandle->pNaviFrameHandle, g_pListRemoveViewHandle->pNaviFrameItem);
- evas_object_smart_callback_add(g_pListRemoveViewHandle->pNaviFrameHandle, "transition,finished", __mp_remove_view_trans_finished_cb, NULL);
+ mp_widget_ctrl_disable_navi_handle_focus_except_item
+ (g_pListRemoveViewHandle->pNaviFrameHandle,
+ g_pListRemoveViewHandle->pNaviFrameItem);
+ evas_object_smart_callback_add(g_pListRemoveViewHandle->
+ pNaviFrameHandle, "transition,finished",
+ __mp_remove_view_trans_finished_cb,
+ NULL);
mp_remove_view_pop();
void mp_remove_view_change_title_info(void)
{
- VideoLogInfo("nNumOfSelectdCount : %d", g_pListRemoveViewHandle->nSelectCounterForEditList);
+ VideoLogInfo("nNumOfSelectdCount : %d",
+ g_pListRemoveViewHandle->nSelectCounterForEditList);
- if (g_pListRemoveViewHandle->nSelectCounterForEditList > 0)
- {
- elm_object_disabled_set(g_pListRemoveViewWidget->pSavebtn, EINA_FALSE);
- }
- else
- {
+ if (eina_list_count(g_pSelectedList) > 0) {
+ elm_object_disabled_set(g_pListRemoveViewWidget->pSavebtn,
+ EINA_FALSE);
+ } else {
VideoLogInfo("Unactivate delete tab.");
- elm_object_disabled_set(g_pListRemoveViewWidget->pSavebtn, EINA_TRUE);
+ elm_object_disabled_set(g_pListRemoveViewWidget->pSavebtn,
+ EINA_TRUE);
}
- char *szCheckingTotalItem = g_strdup_printf(VIDEOS_SELECTVIEW_HEADER_PD_SELECTED, g_pListRemoveViewHandle->nSelectCounterForEditList);
- elm_object_item_domain_translatable_part_text_set(g_pListRemoveViewHandle->pNaviFrameItem, "elm.text.title", PACKAGE, szCheckingTotalItem);
+ char *szCheckingTotalItem =
+ g_strdup_printf(VIDEOS_SELECTVIEW_HEADER_PD_SELECTED,
+ eina_list_count(g_pSelectedList));
+ elm_object_item_domain_translatable_part_text_set
+ (g_pListRemoveViewHandle->pNaviFrameItem, "elm.text.title",
+ PACKAGE, szCheckingTotalItem);
MP_FREE_STRING(szCheckingTotalItem);
}
-static void __mp_remove_view_select_all_change_check_box_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_remove_view_select_all_change_check_box_cb(void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ void
+ *pEventInfo)
{
- if (!pObject)
- {
+ if (!pObject) {
VideoLogError("[ERR]");
return;
}
- if (!g_pListRemoveViewHandle->pObjVideosList)
- {
+ if (!g_pListRemoveViewHandle->pObjVideosList) {
VideoLogError("No exist pVideoGenlist");
return;
}
int nCounter = 0;
int nVideoListSize = 0;
- //bool bState = elm_check_state_get(pObject);
- if (LIST_TAB_TYPE_PERSONAL == g_pListRemoveViewHandle->eTabType)
- {
- if (g_pListRemoveViewHandle->bFolderDel)
- {
+ if (LIST_TAB_TYPE_PERSONAL == g_pListRemoveViewHandle->eTabType) {
+ if (g_pListRemoveViewHandle->bFolderDel) {
nVideoListSize = mp_util_svc_get_video_folder_size();
- }
- else
- {
- nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
+ } else {
+ nVideoListSize =
+ mp_util_svc_get_number_of_video_item_by_type();
}
- }
- else
- {
+ } else {
VideoLogError("Can't handle this eTabType!");
}
VideoLogInfo("nVideoListSize : %d", nVideoListSize);
- if (!g_pListRemoveViewHandle->bSelectallCheckBoxState)
- {
+ if (!g_pListRemoveViewHandle->bSelectallCheckBoxState) {
g_pListRemoveViewHandle->bSelectallCheckBoxState = TRUE;
- g_pListRemoveViewHandle->nSelectCounterForEditList = nVideoListSize;
- }
- else
- {
+ g_pListRemoveViewHandle->nSelectCounterForEditList =
+ nVideoListSize;
+ } else {
g_pListRemoveViewHandle->bSelectallCheckBoxState = FALSE;
g_pListRemoveViewHandle->nSelectCounterForEditList = 0;
VideoLogInfo("Unactivate delete tab.");
- elm_object_disabled_set(g_pListRemoveViewWidget->pSavebtn, EINA_TRUE);
+ elm_object_disabled_set(g_pListRemoveViewWidget->pSavebtn,
+ EINA_TRUE);
}
- mp_remove_view_change_title_info();
- for (nCounter = 0; nCounter < nVideoListSize; nCounter++)
- {
- g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved[nCounter] = g_pListRemoveViewHandle->bSelectallCheckBoxState;
+ for (nCounter = 0; nCounter < nVideoListSize; nCounter++) {
+ g_pListRemoveViewHandle->
+ pCheckedItemsEditListForRemoved[nCounter] =
+ g_pListRemoveViewHandle->bSelectallCheckBoxState;
+
+ char *pMediaID = NULL;
+ if (g_pListRemoveViewHandle->bFolderDel) {
+ pMediaID = mp_util_svc_get_video_folder_id(nCounter);
+ } else {
+ pMediaID = mp_util_svc_get_video_id_by_index(nCounter);
+ }
+
+
+ __mp_remove_view_update_remove_selected_file(pMediaID,
+ g_pListRemoveViewHandle->
+ bSelectallCheckBoxState);
}
+ mp_remove_view_change_title_info();
mp_remove_view_update_all_check_box();
- //elm_genlist_realized_items_update(g_pListRemoveViewHandle->pObjVideosList);
}
void mp_remove_view_delete_select_all(void)
g_pListRemoveViewHandle->bSelectallCheckBoxState = FALSE;
g_pListRemoveViewHandle->nSelectCounterForEditList = 0;
- //MpVideoListRemoveViewHideSelectedInfo();
mp_remove_view_change_title_info();
}
////////////////////////////////////////////////////
// Check box callback
-void mp_remove_view_change_check_box_state_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+void mp_remove_view_change_check_box_state_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
- if (!pObject)
- {
+ if (!pObject) {
VideoLogInfo("[ERR]");
return;
- }
- else
- {
+ } else {
VideoLogInfo("pObject : %x", pObject);
}
int nVideoListSize = 0;
int nVideoItemIndex = 0;
- if (LIST_TAB_TYPE_PERSONAL == g_pListRemoveViewHandle->eTabType)
- {
- nVideoItemIndex = (int)pUserData;
+ if (LIST_TAB_TYPE_PERSONAL == g_pListRemoveViewHandle->eTabType) {
+ nVideoItemIndex = (int) pUserData;
- if (g_pListRemoveViewHandle->bFolderDel)
- {
+ if (g_pListRemoveViewHandle->bFolderDel) {
nVideoListSize = mp_util_svc_get_video_folder_size();
- }
- else
- {
- nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
+ } else {
+ nVideoListSize =
+ mp_util_svc_get_number_of_video_item_by_type();
}
- VideoLogInfo("Check box - Index : %d, List Size : %d", nVideoItemIndex, nVideoListSize);
- }
- else
- {
+ VideoLogInfo("Check box - Index : %d, List Size : %d",
+ nVideoItemIndex, nVideoListSize);
+ } else {
VideoLogError("Can't handle this eTabType!");
}
-
bool bState = elm_check_state_get(pObject);
- VideoLogInfo("BEFORE : nSelectCounterForEditList : %d", g_pListRemoveViewHandle->nSelectCounterForEditList);
+ VideoLogInfo("BEFORE : nSelectCounterForEditList : %d",
+ g_pListRemoveViewHandle->nSelectCounterForEditList);
- if (bState)
- {
- g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved[nVideoItemIndex] = TRUE;
+ if (bState) {
+ g_pListRemoveViewHandle->
+ pCheckedItemsEditListForRemoved[nVideoItemIndex] = TRUE;
g_pListRemoveViewHandle->nSelectCounterForEditList++;
- if (nVideoListSize == g_pListRemoveViewHandle->nSelectCounterForEditList)
- {
+ if (nVideoListSize ==
+ g_pListRemoveViewHandle->nSelectCounterForEditList) {
VideoLogInfo("All check box of edit list state are true.");
g_pListRemoveViewHandle->bSelectallCheckBoxState = TRUE;
}
- }
- else
- {
- g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved[nVideoItemIndex] = FALSE;
- if (nVideoListSize == g_pListRemoveViewHandle->nSelectCounterForEditList)
- {
+ } else {
+ g_pListRemoveViewHandle->
+ pCheckedItemsEditListForRemoved[nVideoItemIndex] = FALSE;
+ if (nVideoListSize ==
+ g_pListRemoveViewHandle->nSelectCounterForEditList) {
VideoLogInfo("All check box of edit list state are not true.");
g_pListRemoveViewHandle->bSelectallCheckBoxState = FALSE;
}
g_pListRemoveViewHandle->nSelectCounterForEditList--;
- if (g_pListRemoveViewHandle->nSelectCounterForEditList < 1)
- {
+ if (g_pListRemoveViewHandle->nSelectCounterForEditList < 1) {
VideoLogInfo("Unactivate delete button.");
- elm_object_disabled_set(g_pListRemoveViewWidget->pSavebtn, EINA_TRUE);
+ elm_object_disabled_set(g_pListRemoveViewWidget->pSavebtn,
+ EINA_TRUE);
}
}
- elm_check_state_set(g_pListRemoveViewWidget->pSelectallbtn, g_pListRemoveViewHandle->bSelectallCheckBoxState);
+ elm_check_state_set(g_pListRemoveViewWidget->pSelectallbtn,
+ g_pListRemoveViewHandle->bSelectallCheckBoxState);
mp_remove_view_change_title_info();
- /*if (pSelectedItem)
- {
- elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
- }*/
-
}
+
//
////////////////////////////////////////////////////
////////////////////////////////////////////////
// Genlist callback
-void mp_remove_view_naviframe_transition_effect_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+void mp_remove_view_naviframe_transition_effect_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
- if (!g_pListRemoveViewHandle)
- {
+ if (!g_pListRemoveViewHandle) {
VideoLogError("[ERR] No exist g_pListRemoveViewHandle.");
return;
}
Evas_Object *pTmpContents = NULL;
Elm_Object_Item *pTmpItem = NULL;
- if (!g_pListRemoveViewHandle->pNaviFrameHandle)
- {
+ if (!g_pListRemoveViewHandle->pNaviFrameHandle) {
VideoLogError("[ERR] No exist naviframe handle.");
return;
}
- pTmpItem = elm_naviframe_top_item_get(g_pListRemoveViewHandle->pNaviFrameHandle);
+ pTmpItem =
+ elm_naviframe_top_item_get(g_pListRemoveViewHandle->
+ pNaviFrameHandle);
pTmpContents = elm_object_item_content_get(pTmpItem);
- if (pTmpContents)
- {
- if (pTmpContents == g_pListRemoveViewWidget->pVideoListBox)
- {
- }
- else
- {
- VideoLogInfo("It's not pListRemoveViewTabbarLayout in top screen.");
+ if (pTmpContents) {
+ if (pTmpContents == g_pListRemoveViewWidget->pVideoListBox) {
+ } else {
+ VideoLogInfo
+ ("It's not pListRemoveViewTabbarLayout in top screen.");
}
- }
- else
- {
+ } else {
VideoLogError("[ERR] No exist naviframe top item.");
}
}
void mp_remove_view_double_tap_cb(void)
{
- if (!g_pListRemoveViewHandle->pObjVideosList)
- {
+ if (!g_pListRemoveViewHandle->pObjVideosList) {
VideoLogError("pObjVideosList is not exist.");
return;
}
VideoLogInfo("");
- elm_genlist_item_bring_in(elm_genlist_first_item_get(g_pListRemoveViewHandle->pObjVideosList), ELM_GENLIST_ITEM_SCROLLTO_TOP);
+ elm_genlist_item_bring_in(elm_genlist_first_item_get
+ (g_pListRemoveViewHandle->pObjVideosList),
+ ELM_GENLIST_ITEM_SCROLLTO_TOP);
}
char *mp_remove_view_get_duration_time(int nVideoItemIndex)
{
VideoLogInfo("");
- char szTmpStr[STR_LEN_MAX] = {0, };
- char szTmpStrDurationTime[STR_LEN_MAX] = {0, };
- char szTmpStrLastPlayedPos[STR_LEN_MAX] = {0, };
+ char szTmpStr[STR_LEN_MAX] = { 0, };
+ char szTmpStrDurationTime[STR_LEN_MAX] = { 0, };
+ char szTmpStrLastPlayedPos[STR_LEN_MAX] = { 0, };
- unsigned int nVideoInfoDuration = mp_util_svc_get_video_duration_time(nVideoItemIndex);
- unsigned int nVideoInfoLastTime = mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
+ unsigned int nVideoInfoDuration =
+ mp_util_svc_get_video_duration_time(nVideoItemIndex);
+ unsigned int nVideoInfoLastTime =
+ mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
mp_util_convert_time(nVideoInfoDuration, szTmpStrDurationTime, FALSE);
mp_util_convert_time(nVideoInfoLastTime, szTmpStrLastPlayedPos, TRUE);
- snprintf(szTmpStr, STR_LEN_MAX, "%s/%s", szTmpStrLastPlayedPos, szTmpStrDurationTime);
+ snprintf(szTmpStr, STR_LEN_MAX, "%s/%s", szTmpStrLastPlayedPos,
+ szTmpStrDurationTime);
return strdup(szTmpStr);
}
+
#ifdef VS_FEATURE_LIST_VIEW
-static void __mp_remove_folder_view_select_video_item_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_remove_folder_view_select_video_item_cb(void *pUserData,
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
- if (!g_pListRemoveViewHandle->pObjVideosList)
- {
+ if (!g_pListRemoveViewHandle->pObjVideosList) {
VideoLogInfo("No exist genlist object.");
return;
}
int nVideoItemIndex = 0;
- Elm_Object_Item *pItem = (Elm_Object_Item *)pEventInfo;
- Elm_Object_Item *pSelectedItem = elm_genlist_selected_item_get(pObject);
+ Elm_Object_Item *pItem = (Elm_Object_Item *) pEventInfo;
+ Elm_Object_Item *pSelectedItem =
+ elm_genlist_selected_item_get(pObject);
- if (pItem)
- {
+ if (pItem) {
int nVideoListSize = 0;
- if (LIST_TAB_TYPE_PERSONAL == g_pListRemoveViewHandle->eTabType)
- {
- nVideoItemIndex = (int)elm_object_item_data_get(pItem);
+ if (LIST_TAB_TYPE_PERSONAL == g_pListRemoveViewHandle->eTabType) {
+ nVideoItemIndex = (int) elm_object_item_data_get(pItem);
VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
- if (g_pListRemoveViewHandle->bFolderDel)
- {
+ if (g_pListRemoveViewHandle->bFolderDel) {
nVideoListSize = mp_util_svc_get_video_folder_size();
+ } else {
+ nVideoListSize =
+ mp_util_svc_get_number_of_video_item_by_type();
}
- else
- {
- nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
- }
- }
- else
- {
+ } else {
VideoLogError("Can't handle this eTabType!");
}
- if (g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved[nVideoItemIndex])
- {
- g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved[nVideoItemIndex] = FALSE;
- if (nVideoListSize == g_pListRemoveViewHandle->nSelectCounterForEditList)
- {
- VideoLogInfo("All check box of edit list state are not true.");
+ if (g_pListRemoveViewHandle->
+ pCheckedItemsEditListForRemoved[nVideoItemIndex]) {
+ g_pListRemoveViewHandle->
+ pCheckedItemsEditListForRemoved[nVideoItemIndex] = FALSE;
+ if (nVideoListSize ==
+ g_pListRemoveViewHandle->nSelectCounterForEditList) {
+ VideoLogInfo
+ ("All check box of edit list state are not true.");
g_pListRemoveViewHandle->bSelectallCheckBoxState = FALSE;
}
g_pListRemoveViewHandle->nSelectCounterForEditList--;
- if (g_pListRemoveViewHandle->nSelectCounterForEditList < 1)
- {
+ if (g_pListRemoveViewHandle->nSelectCounterForEditList < 1) {
VideoLogInfo("Unactivate delete button.");
- elm_object_disabled_set(g_pListRemoveViewWidget->pSavebtn, EINA_TRUE);
+ elm_object_disabled_set(g_pListRemoveViewWidget->pSavebtn,
+ EINA_TRUE);
}
- }
- else
- {
- g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved[nVideoItemIndex] = TRUE;
+ } else {
+ g_pListRemoveViewHandle->
+ pCheckedItemsEditListForRemoved[nVideoItemIndex] = TRUE;
g_pListRemoveViewHandle->nSelectCounterForEditList++;
- if (nVideoListSize == g_pListRemoveViewHandle->nSelectCounterForEditList)
- {
+ if (nVideoListSize ==
+ g_pListRemoveViewHandle->nSelectCounterForEditList) {
VideoLogInfo("All check box of edit list state are true.");
g_pListRemoveViewHandle->bSelectallCheckBoxState = TRUE;
}
}
- elm_check_state_set(g_pListRemoveViewWidget->pSelectallbtn, g_pListRemoveViewHandle->bSelectallCheckBoxState);
+ elm_check_state_set(g_pListRemoveViewWidget->pSelectallbtn,
+ g_pListRemoveViewHandle->
+ bSelectallCheckBoxState);
mp_remove_view_change_title_info();
- Evas_Object *check_box_layout = elm_object_item_part_content_get(pItem, "elm.icon.2");
- Evas_Object *check_box = elm_object_part_content_get(check_box_layout, "elm.swallow.content");
+ Evas_Object *check_box_layout =
+ elm_object_item_part_content_get(pItem, "elm.icon.2");
+ Evas_Object *check_box =
+ elm_object_part_content_get(check_box_layout,
+ "elm.swallow.content");
if (check_box) {
- elm_check_state_set(check_box, g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved[nVideoItemIndex]);
+ elm_check_state_set(check_box,
+ g_pListRemoveViewHandle->
+ pCheckedItemsEditListForRemoved
+ [nVideoItemIndex]);
}
- //elm_genlist_item_fields_update(pSelectedItem, "elm.edit.icon.1", ELM_GENLIST_ITEM_FIELD_CONTENT);
- }
- else
- {
+ } else {
VideoLogError("[ERR]Error item number.");
}
}
#endif
-static void __mp_remove_view_select_grid_item_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+
+static void __mp_remove_view_release_selected_list(void)
{
- if (!g_pListRemoveViewHandle->pObjVideosList)
- {
+ char *data;
+ EINA_LIST_FREE(g_pSelectedList, data);
+ g_pSelectedList = NULL;
+}
+
+static void __mp_remove_view_validate_selected_list()
+{
+ Eina_List *l = NULL;
+ char *data;
+ int nIndex;
+
+ EINA_LIST_FOREACH(g_pSelectedList, l, data) {
+ if (!mp_util_svc_check_valid_media_id
+ (data,
+ g_pListRemoveViewHandle->
+ bFolderDel ? MEDIA_TYPE_DIRECTORY : MEDIA_TYPE_FILE,
+ &nIndex)) {
+ VideoLogInfo("removing media as got deleted : %s", data);
+ g_pSelectedList = eina_list_remove(g_pSelectedList, data);
+ free(data);
+ }
+ }
+
+}
+
+static void __mp_remove_view_update_remove_selected_file(char *path,
+ Eina_Bool add)
+{
+ Eina_List *l = NULL;
+ char *data;
+ if (!add) {
+ EINA_LIST_FOREACH(g_pSelectedList, l, data) {
+ if (data && path && !strcmp(data, path)) {
+ g_pSelectedList = eina_list_remove(g_pSelectedList, data);
+ free(data);
+ }
+ }
+ } else {
+ bool exists = EINA_FALSE;
+ EINA_LIST_FOREACH(g_pSelectedList, l, data) {
+ if (data && path && !strcmp(data, path)) {
+ exists = EINA_TRUE;
+ break;
+ }
+ }
+
+ if (!exists) {
+ g_pSelectedList = eina_list_append(g_pSelectedList, path);
+ }
+ }
+}
+
+static void __mp_remove_view_select_grid_item_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
+{
+ if (!g_pListRemoveViewHandle->pObjVideosList) {
VideoLogInfo("No exist genlist object.");
return;
}
int nVideoItemIndex = 0;
- Elm_Object_Item *pItem = (Elm_Object_Item *)pEventInfo;
+ Elm_Object_Item *pItem = (Elm_Object_Item *) pEventInfo;
if (pItem) {
int nVideoListSize = 0;
if (LIST_TAB_TYPE_PERSONAL == g_pListRemoveViewHandle->eTabType) {
- nVideoItemIndex = (int)elm_object_item_data_get(pItem);
+ nVideoItemIndex = (int) elm_object_item_data_get(pItem);
VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
- if (g_pListRemoveViewHandle->bFolderDel)
- {
+ if (g_pListRemoveViewHandle->bFolderDel) {
nVideoListSize = mp_util_svc_get_video_folder_size();
} else {
- nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
+ nVideoListSize =
+ mp_util_svc_get_number_of_video_item_by_type();
}
} else {
VideoLogError("Can't handle this eTabType!");
}
- if (g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved[nVideoItemIndex]) {
- g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved[nVideoItemIndex] = FALSE;
+ char *pMediaID = NULL;
+ if (g_pListRemoveViewHandle->bFolderDel) {
+ pMediaID = mp_util_svc_get_video_folder_id(nVideoItemIndex);
+ } else {
+ pMediaID = mp_util_svc_get_video_id_by_index(nVideoItemIndex);
+ }
+
+
+ if (g_pListRemoveViewHandle->
+ pCheckedItemsEditListForRemoved[nVideoItemIndex]) {
+ g_pListRemoveViewHandle->
+ pCheckedItemsEditListForRemoved[nVideoItemIndex] = FALSE;
- if (nVideoListSize == g_pListRemoveViewHandle->nSelectCounterForEditList) {
- VideoLogInfo("All check box of edit list state are not true.");
+ if (nVideoListSize ==
+ g_pListRemoveViewHandle->nSelectCounterForEditList) {
+ VideoLogInfo
+ ("All check box of edit list state are not true.");
g_pListRemoveViewHandle->bSelectallCheckBoxState = FALSE;
}
g_pListRemoveViewHandle->nSelectCounterForEditList--;
if (g_pListRemoveViewHandle->nSelectCounterForEditList < 1) {
VideoLogInfo("Unactivate delete button.");
- elm_object_disabled_set(g_pListRemoveViewWidget->pSavebtn, EINA_TRUE);
+ elm_object_disabled_set(g_pListRemoveViewWidget->pSavebtn,
+ EINA_TRUE);
}
+
+ __mp_remove_view_update_remove_selected_file(pMediaID,
+ EINA_FALSE);
+
} else {
- g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved[nVideoItemIndex] = TRUE;
+ g_pListRemoveViewHandle->
+ pCheckedItemsEditListForRemoved[nVideoItemIndex] = TRUE;
g_pListRemoveViewHandle->nSelectCounterForEditList++;
- if (nVideoListSize == g_pListRemoveViewHandle->nSelectCounterForEditList) {
+ if (nVideoListSize ==
+ g_pListRemoveViewHandle->nSelectCounterForEditList) {
VideoLogInfo("All check box of edit list state are true.");
g_pListRemoveViewHandle->bSelectallCheckBoxState = TRUE;
}
+ __mp_remove_view_update_remove_selected_file(pMediaID,
+ EINA_TRUE);
}
- elm_check_state_set(g_pListRemoveViewWidget->pSelectallbtn, g_pListRemoveViewHandle->bSelectallCheckBoxState);
+ elm_check_state_set(g_pListRemoveViewWidget->pSelectallbtn,
+ g_pListRemoveViewHandle->
+ bSelectallCheckBoxState);
mp_remove_view_change_title_info();
}
}
-char *mp_remove_view_get_label_of_video_item_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+char *mp_remove_view_get_label_of_video_item_cb(const void *pUserData,
+ Evas_Object * pObject,
+ const char *pPart)
{
- int nVideoItemIndex = (int)pUserData;
+ int nVideoItemIndex = (int) pUserData;
- if (!strcmp(pPart, "elm.text.main.left.top"))
- {
+ if (!strcmp(pPart, "elm.text.main.left.top")) {
char *szTitle;
szTitle = mp_util_svc_get_video_title(nVideoItemIndex);
char *szTitleUtf8 = elm_entry_utf8_to_markup(szTitle);
- if (szTitle)
- {
+ if (szTitle) {
free(szTitle);
szTitle = NULL;
}
return szTitleUtf8;
- }
- else if (!strcmp(pPart, "elm.text.sub.left.bottom"))
- {
+ } else if (!strcmp(pPart, "elm.text.sub.left.bottom")) {
return mp_util_svc_get_duration_str_time(nVideoItemIndex);
}
- /*else if (!strcmp(pPart, "elm.text.sub.right.bottom"))
- {
- unsigned long long nFilesize = 0;
-
- nFilesize = mp_util_svc_get_video_item_size(nVideoItemIndex);
- char *szFileSize = mp_util_get_file_size(nFilesize);
- char *szTitleUtf8 = NULL;
- if (szFileSize)
- {
- szTitleUtf8 = elm_entry_utf8_to_markup(szFileSize);
- free(szFileSize);
- szFileSize = NULL;
- }
-
- return szTitleUtf8;
- }*/
return NULL;
}
#ifdef VS_FEATURE_THUMBNAIL_VIEW //
-static char *__mp_remove_view_get_label_of_grid_item_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static char *__mp_remove_view_get_label_of_grid_item_cb(const void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char *pPart)
{
- int nVideoItemIndex = (int)pUserData;
+ int nVideoItemIndex = (int) pUserData;
if (!strcmp(pPart, "elm.text")) {
char *szTitle = NULL;
{
mp_util_svc_destory_video_item_list();
char *szPath = mp_util_svc_get_video_folder_url(nFolderItemIndex);
- mp_util_svc_extract_video_list_from_folder(szPath, mp_sort_ctrl_get_sort_state(), MP_LIST_VIEW_ALL);
+ mp_util_svc_extract_video_list_from_folder(szPath,
+ mp_sort_ctrl_get_sort_state
+ (), MP_LIST_VIEW_ALL);
int nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
MP_FREE_STRING(szPath);
return nVideoListSize;
}
-static char *__mp_remove_view_get_label_of_folder_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static char *__mp_remove_view_get_label_of_folder_cb(const void *pUserData,
+ Evas_Object * pObject,
+ const char *pPart)
{
- int nFolderItemIndex = (int)pUserData;
+ int nFolderItemIndex = (int) pUserData;
- if (!strcmp(pPart, "elm.text.main.left.top") || !strcmp(pPart, "elm.text")) {
+ if (!strcmp(pPart, "elm.text.main.left.top")
+ || !strcmp(pPart, "elm.text")) {
char *szTitle = NULL;
char *title = NULL;
- char buffer[10] = {0,};
+ char buffer[10] = { 0, };
szTitle = mp_util_svc_get_video_folder_name(nFolderItemIndex);
- int nVideoListSize = mp_remove_view_get_respective_video_no(nFolderItemIndex);
+ int nVideoListSize =
+ mp_remove_view_get_respective_video_no(nFolderItemIndex);
snprintf(buffer, 10, "%d", nVideoListSize);
title = g_strconcat(szTitle, "(", buffer, ")", NULL);
char *szTitleUtf8 = elm_entry_utf8_to_markup(title);
MP_FREE_STRING(title);
return szTitleUtf8;
}
- /*else if (!strcmp(pPart, "elm.text.sub.left.bottom") || !strcmp(pPart, "elm.text.2")) {
- char *szFolderPath = NULL;
- szFolderPath = mp_util_svc_get_video_folder_url(nFolderItemIndex);
- char *pDes_path = mp_util_get_dir_by_path(szFolderPath);
- MP_FREE_STRING(szFolderPath);
- char *szFolderUtf8 = elm_entry_utf8_to_markup(pDes_path);
- MP_FREE_STRING(pDes_path);
- return szFolderUtf8;
- }*/
return NULL;
}
#ifdef VS_FEATURE_THUMBNAIL_VIEW
-static Evas_Object *__mp_remove_folder_view_get_grid_icon_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static Evas_Object *__mp_remove_folder_view_get_grid_icon_cb(const void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char
+ *pPart)
{
- int nFolderItemIndex = (int)pUserData;
+ int nFolderItemIndex = (int) pUserData;
if (!strcmp(pPart, "elm.swallow.icon")) {
- char *pThumbIconUri = mp_util_get_folder_thumbnail(nFolderItemIndex, mp_sort_ctrl_get_sort_state());
+ char *pThumbIconUri =
+ mp_util_get_folder_thumbnail(nFolderItemIndex,
+ mp_sort_ctrl_get_sort_state());
Evas_Object *pBg = NULL;
if (!pThumbIconUri || !vp_file_exists(pThumbIconUri)) {
pBg = elm_image_add(pObject);
MP_FREE_STRING(pThumbIconUri);
- evas_object_size_hint_aspect_set(pBg, EVAS_ASPECT_CONTROL_BOTH, 1, 1);
+ evas_object_size_hint_aspect_set(pBg, EVAS_ASPECT_CONTROL_BOTH,
+ 1, 1);
elm_image_file_set(pBg, pThumbIconUri, NULL);
} else {
- pBg = mp_util_create_preload_image(pObject, pThumbIconUri, GRID_VIDEO_ICON_WIDTH);
+ pBg =
+ mp_util_create_preload_image(pObject, pThumbIconUri,
+ GRID_VIDEO_ICON_WIDTH);
}
MP_FREE_STRING(pThumbIconUri);
Evas_Object *pCheckBox = elm_check_add(pObject);
elm_object_style_set(pCheckBox, "default");
evas_object_propagate_events_set(pCheckBox, EINA_TRUE);
- elm_check_state_pointer_set(pCheckBox, (Eina_Bool *)&(g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved[nFolderItemIndex]));
+ elm_check_state_pointer_set(pCheckBox,
+ (Eina_Bool *) &
+ (g_pListRemoveViewHandle->
+ pCheckedItemsEditListForRemoved
+ [nFolderItemIndex]));
evas_object_show(pCheckBox);
return NULL;
}
-static Evas_Object *__mp_remove_view_get_grid_icon_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static Evas_Object *__mp_remove_view_get_grid_icon_cb(const void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char *pPart)
{
- int nVideoItemIndex = (int)pUserData;
- char edj_path[1024] = {0};
+ int nVideoItemIndex = (int) pUserData;
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_IMAGE_NAME_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_IMAGE_NAME_EDJ);
free(path);
if (!strcmp(pPart, "elm.swallow.icon")) {
- char *pThumbIconUri = mp_util_svc_get_video_thumbnail(nVideoItemIndex);
+ char *pThumbIconUri =
+ mp_util_svc_get_video_thumbnail(nVideoItemIndex);
Evas_Object *pBg = NULL;
if (!pThumbIconUri || !vp_file_exists(pThumbIconUri)) {
pBg = elm_image_add(pObject);
MP_FREE_STRING(pThumbIconUri);
- evas_object_size_hint_aspect_set(pBg, EVAS_ASPECT_CONTROL_BOTH, 1, 1);
+ evas_object_size_hint_aspect_set(pBg, EVAS_ASPECT_CONTROL_BOTH,
+ 1, 1);
elm_image_file_set(pBg, pThumbIconUri, NULL);
} else {
- pBg = mp_util_create_preload_image(pObject, pThumbIconUri, GRID_VIDEO_ICON_WIDTH);
+ pBg =
+ mp_util_create_preload_image(pObject, pThumbIconUri,
+ GRID_VIDEO_ICON_WIDTH);
}
MP_FREE_STRING(pThumbIconUri);
return pBg;
} else if (!strcmp(pPart, "elm.progressbar.icon")) {
- int nLastPlayedTime = mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
- int nDurationTime = mp_util_svc_get_video_duration_time(nVideoItemIndex);
+ int nLastPlayedTime =
+ mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
+ int nDurationTime =
+ mp_util_svc_get_video_duration_time(nVideoItemIndex);
if (nLastPlayedTime <= 0) {
return NULL;
double nRatio = 0.0;
if (nDurationTime > 0) {
- nRatio =((double)nLastPlayedTime) / ((double)nDurationTime);
+ nRatio = ((double) nLastPlayedTime) / ((double) nDurationTime);
}
if (nRatio < 0.05) {
Evas_Object *pProgressBar = elm_progressbar_add(pObject);
elm_object_style_set(pProgressBar, "video/list_progress");
elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
- evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(pProgressBar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pProgressBar, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
elm_progressbar_value_set(pProgressBar, nRatio);
evas_object_show(pProgressBar);
return pProgressBar;
} else if (!strcmp(pPart, "elm.lock.icon")) {
char *pVideoFile = mp_util_svc_get_video_url(nVideoItemIndex);
- bool bRet = mp_util_check_video_personal_status((const char*)pVideoFile);
+ bool bRet =
+ mp_util_check_video_personal_status((const char *) pVideoFile);
MP_FREE_STRING(pVideoFile);
if (bRet) {
Evas_Object *pLockIcon = elm_image_add(pObject);
- elm_image_file_set(pLockIcon, edj_path, VIDEO_LIST_VIEW_ICON_PERSONAL_LOCK);
- evas_object_size_hint_align_set(pLockIcon, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(pLockIcon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_image_file_set(pLockIcon, edj_path,
+ VIDEO_LIST_VIEW_ICON_PERSONAL_LOCK);
+ evas_object_size_hint_align_set(pLockIcon, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pLockIcon, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
evas_object_show(pLockIcon);
return pLockIcon;
} else {
bool bRet = mp_util_svc_is_cloud_storage(nVideoItemIndex);
if (bRet) {
Evas_Object *pDropboxIcon = elm_image_add(pObject);
- elm_image_file_set(pDropboxIcon, edj_path, VIDEO_LIST_VIEW_ICON_DROPBOX);
- evas_object_size_hint_align_set(pDropboxIcon, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(pDropboxIcon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_image_file_set(pDropboxIcon, edj_path,
+ VIDEO_LIST_VIEW_ICON_DROPBOX);
+ evas_object_size_hint_align_set(pDropboxIcon, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pDropboxIcon,
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
evas_object_show(pDropboxIcon);
return pDropboxIcon;
} else {
Evas_Object *pCheckBox = elm_check_add(pObject);
elm_object_style_set(pCheckBox, "grid");
evas_object_propagate_events_set(pCheckBox, EINA_TRUE);
- elm_check_state_pointer_set(pCheckBox, (Eina_Bool *)&(g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved[nVideoItemIndex]));
+ elm_check_state_pointer_set(pCheckBox,
+ (Eina_Bool *) &
+ (g_pListRemoveViewHandle->
+ pCheckedItemsEditListForRemoved
+ [nVideoItemIndex]));
evas_object_show(pCheckBox);
}
#endif
-Evas_Object *mp_remove_view_get_icon_of_video_item_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+Evas_Object *mp_remove_view_get_icon_of_video_item_cb(const void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char *pPart)
{
- int nVideoItemIndex = (int)pUserData;
- Evas_Object *pLayout= NULL;
+ int nVideoItemIndex = (int) pUserData;
+ Evas_Object *pLayout = NULL;
if (!pPart || !pObject) {
return NULL;
}
if (!strcmp(pPart, "elm.icon.1")) {
- char *pThumbIconUri = mp_util_svc_get_video_thumbnail(nVideoItemIndex);
+ char *pThumbIconUri =
+ mp_util_svc_get_video_thumbnail(nVideoItemIndex);
Evas_Object *pBg = NULL;
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_CUSTOM_THEME);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_CUSTOM_THEME);
free(path);
pLayout = elm_layout_add(pObject);
- elm_layout_file_set(pLayout, edj_path, "listview.thumbnail.layout");
+ elm_layout_file_set(pLayout, edj_path,
+ "listview.thumbnail.layout");
if (!pThumbIconUri || !vp_file_exists(pThumbIconUri)) {
MP_FREE_STRING(pThumbIconUri);
}
- pBg = mp_util_create_preload_image(pLayout, pThumbIconUri, VIDEO_ICON_WIDTH);
+ pBg =
+ mp_util_create_preload_image(pLayout, pThumbIconUri,
+ VIDEO_ICON_WIDTH);
elm_layout_content_set(pLayout, "elm.thumbnail.icon", pBg);
if (pBg)
MP_FREE_STRING(pThumbIconUri);
- int nLastPlayedTime = mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
- int nDurationTime = mp_util_svc_get_video_duration_time(nVideoItemIndex);
+ int nLastPlayedTime =
+ mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
+ int nDurationTime =
+ mp_util_svc_get_video_duration_time(nVideoItemIndex);
- if (nLastPlayedTime > 0)
- {
+ if (nLastPlayedTime > 0) {
double nRatio = 0.0;
if (nDurationTime > 0) {
- nRatio = ((double)nLastPlayedTime) /
- ((double)nDurationTime);
+ nRatio = ((double) nLastPlayedTime) /
+ ((double) nDurationTime);
}
if (nRatio < 0.05) {
}
Evas_Object *pProgressBar = elm_progressbar_add(pLayout);
- elm_object_style_set(pProgressBar, "elm/progressbar/horizontal/default");
+ elm_object_style_set(pProgressBar,
+ "elm/progressbar/horizontal/default");
elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
- elm_progressbar_span_size_set(pProgressBar, VIDEO_LIST_PROGRESSBAR_LENGTH);
- evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(pProgressBar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_progressbar_span_size_set(pProgressBar,
+ VIDEO_LIST_PROGRESSBAR_LENGTH);
+ evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pProgressBar,
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
elm_progressbar_value_set(pProgressBar, nRatio);
- elm_layout_content_set(pLayout, "elm.progressbar.icon", pProgressBar);
+ elm_layout_content_set(pLayout, "elm.progressbar.icon",
+ pProgressBar);
if (pProgressBar)
evas_object_show(pProgressBar);
}
- if (!mp_util_create_video_sub_icon(pLayout, nVideoItemIndex)) {
- VideoLogWarning("Local File or Create sub icon is failed.", nVideoItemIndex);
+ if (!mp_util_create_video_sub_icon(pLayout, nVideoItemIndex)) {
+ VideoLogWarning("Local File or Create sub icon is failed.",
+ nVideoItemIndex);
}
return pLayout;
- }
- else if (!strcmp(pPart, "elm.icon.2"))
- {
+ } else if (!strcmp(pPart, "elm.icon.2")) {
pLayout = elm_layout_add(pObject);
Evas_Object *pCheckBox = elm_check_add(pLayout);
- elm_layout_theme_set(pLayout, "layout", "list/C/type.2", "default");
+ elm_layout_theme_set(pLayout, "layout", "list/C/type.2",
+ "default");
elm_object_style_set(pCheckBox, "default");
evas_object_propagate_events_set(pCheckBox, EINA_FALSE);
- evas_object_smart_callback_add(pCheckBox, "changed", mp_remove_view_change_check_box_state_cb, pUserData);
-
- elm_check_state_pointer_set(pCheckBox, (Eina_Bool *)&(g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved[nVideoItemIndex]));
+ evas_object_smart_callback_add(pCheckBox, "changed",
+ mp_remove_view_change_check_box_state_cb,
+ pUserData);
+
+ elm_check_state_pointer_set(pCheckBox,
+ (Eina_Bool *) &
+ (g_pListRemoveViewHandle->
+ pCheckedItemsEditListForRemoved
+ [nVideoItemIndex]));
elm_layout_content_set(pLayout, "elm.swallow.content", pCheckBox);
evas_object_show(pCheckBox);
}
return NULL;
-/*
- else if (!strcmp(pPart, "elm.dropbox.icon"))
- {
- bool bRet = mp_util_svc_is_cloud_storage(nVideoItemIndex);
- if (bRet)
- {
- Evas_Object *pDropboxIcon = elm_image_add(pObject);
- elm_image_file_set(pDropboxIcon, VIDEO_PLAYER_IMAGE_NAME_EDJ, VIDEO_LIST_VIEW_ICON_DROPBOX);
- evas_object_size_hint_align_set(pDropboxIcon, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(pDropboxIcon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(pDropboxIcon);
- return pDropboxIcon;
- }
- else
- {
- return NULL;
- }
- }
-
- return NULL;
-*/
}
-/*static Evas_Object *__mp_remove_view_get_icon_of_folder_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
-{
- int nFolderItemIndex = (int)pUserData;
-
- if (!g_strcmp0(pPart, "elm.icon.1"))
- {
- VideoLogInfo("pPart: elm.icon.1 - thumbnail");
-
- Evas_Object *pLayout = NULL;
- Evas_Object *pBg = NULL;
- char *pThumbIconUri = mp_util_get_folder_thumbnail(nFolderItemIndex, mp_sort_ctrl_get_sort_state());
-
- pLayout = elm_layout_add(pObject);
- elm_layout_file_set(pLayout, VIDEO_CUSTOM_THEME, "listview.thumbnail.layout");
-
- if (!pThumbIconUri || !vp_file_exists(pThumbIconUri))
- {
- MP_FREE_STRING(pThumbIconUri);
- }
-
- pBg = mp_util_create_preload_image(pLayout, pThumbIconUri, VIDEO_ICON_WIDTH);
- elm_layout_content_set(pLayout, "elm.thumbnail.icon", pBg);
- if (pBg)
- evas_object_show(pBg);
-
- if (!mp_util_create_folder_sub_icon(pLayout, nFolderItemIndex)) {
- VideoLogWarning("Create sub icon is failed. nFolderItemIndex: %d", nFolderItemIndex);
- }
-
- MP_FREE_STRING(pThumbIconUri);
-
- evas_object_show(pLayout);
-
- return pLayout;
- }
- else if (!strcmp(pPart, "elm.icon.2"))
- {
- Evas_Object *pLayout = elm_layout_add(pObject);
- Evas_Object *pCheckBox = elm_check_add(pLayout);
-
- elm_layout_theme_set(pLayout, "layout", "list/C/type.2", "default");
- evas_object_propagate_events_set(pCheckBox, EINA_FALSE);
- evas_object_smart_callback_add(pCheckBox, "changed", mp_remove_view_change_check_box_state_cb, pUserData);
- elm_check_state_set(pCheckBox, g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved[nFolderItemIndex]);
- elm_check_state_pointer_set(pCheckBox, (Eina_Bool *)&(g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved[nFolderItemIndex]));
-
- evas_object_show(pCheckBox);
-
- elm_layout_content_set(pLayout, "elm.swallow.content", pCheckBox);
-
- return pLayout;
- }
-
- return NULL;
-}*/
int mp_remove_view_get_sort_type(void)
{
- switch (mp_sort_ctrl_get_sort_state())
- {
- /*case MP_LIST_SORT_BY_RECENTLY_VIEWED:
- g_pListRemoveViewHandle->nSortType = MP_MEDIA_SORT_BY_RECENTLY_VIEWED;
- break;*/
+ switch (mp_sort_ctrl_get_sort_state()) {
case MP_LIST_SORT_BY_RECENTLY_ADDED:
- g_pListRemoveViewHandle->nSortType = MP_MEDIA_SORT_BY_RECENTLY_ADDED;
+ g_pListRemoveViewHandle->nSortType =
+ MP_MEDIA_SORT_BY_RECENTLY_ADDED;
break;
case MP_LIST_SORT_BY_NAME:
g_pListRemoveViewHandle->nSortType = MP_MEDIA_SORT_BY_NAME;
break;
- /*case MP_LIST_SORT_BY_SIZE:
- g_pListRemoveViewHandle->nSortType = MP_MEDIA_SORT_BY_SIZE;
- break;
-
- case MP_LIST_SORT_BY_TYPE:
- g_pListRemoveViewHandle->nSortType = MP_MEDIA_SORT_BY_TYPE;
- break;*/
}
return g_pListRemoveViewHandle->nSortType;
void mp_remove_view_append_video_items(void *pObjVideosList)
{
- if (!g_pListRemoveViewHandle)
- {
+ if (!g_pListRemoveViewHandle) {
VideoLogInfo("invalid handle");
return;
}
MP_DEL_ITC(g_pListRemoveViewHandle->pGenListItc);
g_pListRemoveViewHandle->pGenListItc = elm_genlist_item_class_new();
g_pListRemoveViewHandle->pGenListItc->item_style = "2line.top"; //"video/edit_list";
- g_pListRemoveViewHandle->pGenListItc->func.text_get = (void*)mp_remove_view_get_label_of_video_item_cb;
- g_pListRemoveViewHandle->pGenListItc->func.content_get = (void*)mp_remove_view_get_icon_of_video_item_cb;
+ g_pListRemoveViewHandle->pGenListItc->func.text_get =
+ (void *) mp_remove_view_get_label_of_video_item_cb;
+ g_pListRemoveViewHandle->pGenListItc->func.content_get =
+ (void *) mp_remove_view_get_icon_of_video_item_cb;
g_pListRemoveViewHandle->pGenListItc->func.state_get = NULL;
g_pListRemoveViewHandle->pGenListItc->func.del = NULL;
- for (nIndex = 0; nIndex < nVideoListSize; nIndex++)
- {
- elm_genlist_item_append(pObjVideosList, g_pListRemoveViewHandle->pGenListItc, (void *)nIndex, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ for (nIndex = 0; nIndex < nVideoListSize; nIndex++) {
+ elm_genlist_item_append(pObjVideosList,
+ g_pListRemoveViewHandle->pGenListItc,
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
}
}
#ifdef VS_FEATURE_THUMBNAIL_VIEW //
-static void __mp_remove_view_append_grid_items(void *pObjVideosList, int nGenItemIndex)
+static void __mp_remove_view_append_grid_items(void *pObjVideosList,
+ int nGenItemIndex)
{
- if (!g_pListRemoveViewHandle)
- {
+ if (!g_pListRemoveViewHandle) {
VideoLogInfo("invalid handle");
return;
}
MP_DEL_GRID_ITC(g_pListRemoveViewHandle->pGenGridItc_1);
MP_DEL_GRID_ITC(g_pListRemoveViewHandle->pGenGridItc_2);
g_pListRemoveViewHandle->pGenGridItc_1 = elm_gengrid_item_class_new();
- g_pListRemoveViewHandle->pGenGridItc_1->item_style = "video/album_grid";
- g_pListRemoveViewHandle->pGenGridItc_1->func.text_get = (void*)__mp_remove_view_get_label_of_grid_item_cb;
- g_pListRemoveViewHandle->pGenGridItc_1->func.content_get = (void*)__mp_remove_view_get_grid_icon_cb;
+ g_pListRemoveViewHandle->pGenGridItc_1->item_style =
+ "video/album_grid";
+ g_pListRemoveViewHandle->pGenGridItc_1->func.text_get =
+ (void *) __mp_remove_view_get_label_of_grid_item_cb;
+ g_pListRemoveViewHandle->pGenGridItc_1->func.content_get =
+ (void *) __mp_remove_view_get_grid_icon_cb;
g_pListRemoveViewHandle->pGenGridItc_1->func.state_get = NULL;
g_pListRemoveViewHandle->pGenGridItc_1->func.del = NULL;
- int nCount = (mp_rotate_ctrl_check_landspace_by_win((Evas_Object*)mp_util_get_main_window_handle()) ? VP_GENLIST_THUMB_LANDSPACE_COUNT : VP_GENLIST_THUMB_PORTRAIT_COUNT);
+ int nCount =
+ (mp_rotate_ctrl_check_landspace_by_win
+ ((Evas_Object *) mp_util_get_main_window_handle()) ?
+ VP_GENLIST_THUMB_LANDSPACE_COUNT :
+ VP_GENLIST_THUMB_PORTRAIT_COUNT);
int nIndex = nGenItemIndex * nCount;
int nMaxIndex = nIndex + nCount;
int nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
Elm_Object_Item *gridItem = NULL;
for (; (nIndex < nMaxIndex) && (nIndex < nVideoListSize); nIndex++) {
- gridItem = elm_gengrid_item_append(pObjVideosList, g_pListRemoveViewHandle->pGenGridItc_1, (void *)nIndex, __mp_remove_view_select_grid_item_cb, (void *)nIndex);
- elm_gengrid_item_select_mode_set(gridItem, ELM_OBJECT_SELECT_MODE_ALWAYS);
- elm_object_item_data_set(gridItem, (void *)nIndex);
+ gridItem =
+ elm_gengrid_item_append(pObjVideosList,
+ g_pListRemoveViewHandle->pGenGridItc_1,
+ (void *) nIndex,
+ __mp_remove_view_select_grid_item_cb,
+ (void *) nIndex);
+ elm_gengrid_item_select_mode_set(gridItem,
+ ELM_OBJECT_SELECT_MODE_ALWAYS);
+ elm_object_item_data_set(gridItem, (void *) nIndex);
}
}
-static Evas_Object *__mp_remove_view_create_gengrid(Evas_Object *parent, int nWidth, int nHeight)
+static Evas_Object *__mp_remove_view_create_gengrid(Evas_Object * parent,
+ int nWidth,
+ int nHeight)
{
Evas_Object *pGengrid = NULL;
pGengrid = elm_gengrid_add(parent);
VideoLogError("pVideoGrid does not exist.");
return NULL;
}
- evas_object_size_hint_weight_set(pGengrid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(pGengrid, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pGengrid, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pGengrid, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
elm_gengrid_item_size_set(pGengrid, nWidth, nHeight);
elm_gengrid_align_set(pGengrid, 0.0, 0.0);
elm_gengrid_horizontal_set(pGengrid, EINA_TRUE);
int winHeight = 0;
int winWidth = 0;
elm_win_screen_size_get(mp_util_get_main_window_handle(), NULL, NULL,
- &winWidth, &winHeight);
+ &winWidth, &winHeight);
- bool bLandscape = mp_rotate_ctrl_check_landspace_by_win((Evas_Object*)mp_util_get_main_window_handle());
+ bool bLandscape =
+ mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
+ mp_util_get_main_window_handle
+ ());
if (bLandscape) {
*width = winHeight / VP_GENLIST_THUMB_LANDSPACE_COUNT;
} else {
*height = VP_ALBUM_THUMB_ICON_HEIGHT * MP_SCALE;
}
-static Evas_Object *__mp_remove_view_get_icon_of_grid_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static Evas_Object *__mp_remove_view_get_icon_of_grid_cb(const void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char *pPart)
{
if (!g_pListRemoveViewHandle || !pObject) {
VideoLogError("g_pMainViewWidgetOfShareList is NULL");
return NULL;
}
- int nGenItemIndex = (int)pUserData;
+ int nGenItemIndex = (int) pUserData;
int nHeight = 0;
int nWidth = 0;
mp_remove_view_get_icon_dimensions(&nHeight, &nWidth);
- Evas_Object *pGengrid = __mp_remove_view_create_gengrid(pObject, nWidth, nHeight);
+ Evas_Object *pGengrid =
+ __mp_remove_view_create_gengrid(pObject, nWidth, nHeight);
__mp_remove_view_append_grid_items(pGengrid, nGenItemIndex);
return pGengrid;
return 0;
}
int nGenlistIndex = 0;
- int nItemCount = (mp_rotate_ctrl_check_landspace_by_win((Evas_Object*)mp_util_get_main_window_handle()) ? VP_GENLIST_THUMB_LANDSPACE_COUNT : VP_GENLIST_THUMB_PORTRAIT_COUNT);
- nGenlistIndex = nVideoItemIndex/nItemCount;
+ int nItemCount =
+ (mp_rotate_ctrl_check_landspace_by_win
+ ((Evas_Object *) mp_util_get_main_window_handle()) ?
+ VP_GENLIST_THUMB_LANDSPACE_COUNT :
+ VP_GENLIST_THUMB_PORTRAIT_COUNT);
+ nGenlistIndex = nVideoItemIndex / nItemCount;
return nGenlistIndex;
}
if (nVideoListSize <= 0) {
VideoLogWarning("nVideoListSize = %d", nVideoListSize);
return FALSE;
- }
- else
+ } else
VideoLogWarning("nVideoListSize = %d", nVideoListSize);
MP_DEL_ITC(g_pListRemoveViewHandle->pGenListItc);
g_pListRemoveViewHandle->pGenListItc = elm_genlist_item_class_new();
- g_pListRemoveViewHandle->pGenListItc->item_style = "video/1icon.thumbnail";
+ g_pListRemoveViewHandle->pGenListItc->item_style =
+ "video/1icon.thumbnail";
g_pListRemoveViewHandle->pGenListItc->func.text_get = NULL;
- g_pListRemoveViewHandle->pGenListItc->func.content_get = (void *)__mp_remove_view_get_icon_of_grid_cb;
+ g_pListRemoveViewHandle->pGenListItc->func.content_get =
+ (void *) __mp_remove_view_get_icon_of_grid_cb;
g_pListRemoveViewHandle->pGenListItc->func.state_get = NULL;
g_pListRemoveViewHandle->pGenListItc->func.del = NULL;
g_pListRemoveViewHandle->pGenListItc->decorate_item_style = NULL;
MP_DEL_ITC(g_pListRemoveViewHandle->pGenListLandscapeItc);
- g_pListRemoveViewHandle->pGenListLandscapeItc = elm_genlist_item_class_new();
- g_pListRemoveViewHandle->pGenListLandscapeItc->item_style = "video/1icon.thumbnail.landscape";
+ g_pListRemoveViewHandle->pGenListLandscapeItc =
+ elm_genlist_item_class_new();
+ g_pListRemoveViewHandle->pGenListLandscapeItc->item_style =
+ "video/1icon.thumbnail.landscape";
g_pListRemoveViewHandle->pGenListLandscapeItc->func.text_get = NULL;
- g_pListRemoveViewHandle->pGenListLandscapeItc->func.content_get = (void *)__mp_remove_view_get_icon_of_grid_cb;
+ g_pListRemoveViewHandle->pGenListLandscapeItc->func.content_get =
+ (void *) __mp_remove_view_get_icon_of_grid_cb;
g_pListRemoveViewHandle->pGenListLandscapeItc->func.state_get = NULL;
g_pListRemoveViewHandle->pGenListLandscapeItc->func.del = NULL;
- g_pListRemoveViewHandle->pGenListLandscapeItc->decorate_item_style = NULL;
+ g_pListRemoveViewHandle->pGenListLandscapeItc->decorate_item_style =
+ NULL;
int nGenlistRow = 0;
- nGenlistRow = mp_remove_view_thumbnail_to_genlist_index(nVideoListSize - 1);
+ nGenlistRow =
+ mp_remove_view_thumbnail_to_genlist_index(nVideoListSize - 1);
- if (mp_rotate_ctrl_check_landspace_by_win((Evas_Object*)mp_util_get_main_window_handle()))
- {
+ if (mp_rotate_ctrl_check_landspace_by_win
+ ((Evas_Object *) mp_util_get_main_window_handle())) {
for (nIndex = 0; nIndex <= nGenlistRow; nIndex++) {
- elm_genlist_item_append(pGenlist, g_pListRemoveViewHandle->pGenListLandscapeItc, (void *)nIndex, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ elm_genlist_item_append(pGenlist,
+ g_pListRemoveViewHandle->
+ pGenListLandscapeItc, (void *) nIndex,
+ NULL, ELM_GENLIST_ITEM_NONE, NULL,
+ NULL);
}
} else {
for (nIndex = 0; nIndex <= nGenlistRow; nIndex++) {
- elm_genlist_item_append(pGenlist, g_pListRemoveViewHandle->pGenListItc, (void *)nIndex, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ elm_genlist_item_append(pGenlist,
+ g_pListRemoveViewHandle->pGenListItc,
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
}
}
return TRUE;
}
-static void __mp_remove_view_rotate_cb(void *data, Evas_Object *obj, void *event_info)
+static void __mp_remove_view_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
if (!g_pListRemoveViewHandle) {
VideoLogError("__mp_remove_view_rotate_cb IS null");
return;
}
- bool bLandscape = mp_rotate_ctrl_check_landspace_by_win((Evas_Object*)mp_util_get_main_window_handle());
+ bool bLandscape =
+ mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
+ mp_util_get_main_window_handle
+ ());
if (bLandscape) {
VideoLogInfo("Landscape mode");
g_pListRemoveViewHandle->bLandscape = true;
VideoLogInfo("Portrait mode");
g_pListRemoveViewHandle->bLandscape = false;
}
+ g_pListRemoveViewHandle->update_view_data = true;
if (!g_pListRemoveViewHandle->bFolderDel)
- __mp_remove_view_arrange_video_list(g_pListRemoveViewHandle->pObjVideosList, LIST_TAB_TYPE_PERSONAL, TRUE);
+ __mp_remove_view_arrange_video_list(g_pListRemoveViewHandle->
+ pObjVideosList,
+ LIST_TAB_TYPE_PERSONAL, TRUE);
else
- __mp_remove_view_arrange_folder_list(g_pListRemoveViewHandle->pObjVideosList, LIST_TAB_TYPE_PERSONAL, TRUE);
+ __mp_remove_view_arrange_folder_list(g_pListRemoveViewHandle->
+ pObjVideosList,
+ LIST_TAB_TYPE_PERSONAL, TRUE);
mp_remove_view_change_title_info();
+ g_pListRemoveViewHandle->update_view_data = false;
}
-static void __mp_remove_folder_view_append_grid_items(void *pObjVideosList, int nGenItemIndex)
+static void __mp_remove_folder_view_append_grid_items(void *pObjVideosList,
+ int nGenItemIndex)
{
if (!g_pListRemoveViewHandle) {
VideoLogInfo("invalid handle");
}
MP_DEL_GRID_ITC(g_pListRemoveViewHandle->pGenGridItc_1);
g_pListRemoveViewHandle->pGenGridItc_1 = elm_gengrid_item_class_new();
- g_pListRemoveViewHandle->pGenGridItc_1->item_style = "video/album_grid";
- g_pListRemoveViewHandle->pGenGridItc_1->func.text_get = (void*)__mp_remove_view_get_label_of_folder_cb;
- g_pListRemoveViewHandle->pGenGridItc_1->func.content_get = (void*)__mp_remove_folder_view_get_grid_icon_cb;
+ g_pListRemoveViewHandle->pGenGridItc_1->item_style =
+ "video/album_grid";
+ g_pListRemoveViewHandle->pGenGridItc_1->func.text_get =
+ (void *) __mp_remove_view_get_label_of_folder_cb;
+ g_pListRemoveViewHandle->pGenGridItc_1->func.content_get =
+ (void *) __mp_remove_folder_view_get_grid_icon_cb;
g_pListRemoveViewHandle->pGenGridItc_1->func.state_get = NULL;
g_pListRemoveViewHandle->pGenGridItc_1->func.del = NULL;
- int nCount = (mp_rotate_ctrl_check_landspace_by_win((Evas_Object*)mp_util_get_main_window_handle()) ? VP_GENLIST_THUMB_LANDSPACE_COUNT : VP_GENLIST_THUMB_PORTRAIT_COUNT);
+ int nCount =
+ (mp_rotate_ctrl_check_landspace_by_win
+ ((Evas_Object *) mp_util_get_main_window_handle()) ?
+ VP_GENLIST_THUMB_LANDSPACE_COUNT :
+ VP_GENLIST_THUMB_PORTRAIT_COUNT);
int nIndex = nGenItemIndex * nCount;
int nMaxIndex = nIndex + nCount;
int nFolderListSize = mp_util_svc_get_video_folder_size();
Elm_Object_Item *gridItem = NULL;
for (; (nIndex < nMaxIndex) && (nIndex < nFolderListSize); nIndex++) {
- gridItem = elm_gengrid_item_append(pObjVideosList, g_pListRemoveViewHandle->pGenGridItc_1, (void *)nIndex, __mp_remove_view_select_grid_item_cb, (void *)nIndex);
- elm_gengrid_item_select_mode_set(gridItem, ELM_OBJECT_SELECT_MODE_ALWAYS);
- elm_object_item_data_set(gridItem, (void *)nIndex);
+ gridItem =
+ elm_gengrid_item_append(pObjVideosList,
+ g_pListRemoveViewHandle->pGenGridItc_1,
+ (void *) nIndex,
+ __mp_remove_view_select_grid_item_cb,
+ (void *) nIndex);
+ elm_gengrid_item_select_mode_set(gridItem,
+ ELM_OBJECT_SELECT_MODE_ALWAYS);
+ elm_object_item_data_set(gridItem, (void *) nIndex);
}
}
-static Evas_Object *__mp_remove_folder_view_get_icon_of_grid_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static Evas_Object *__mp_remove_folder_view_get_icon_of_grid_cb(const void
+ *pUserData,
+ Evas_Object
+ *pObject,
+ const char
+ *pPart)
{
if (!g_pListRemoveViewHandle || !pObject) {
VideoLogError("g_pMainViewWidgetOfShareList is NULL");
return NULL;
}
- int nGenItemIndex = (int)pUserData;
+ int nGenItemIndex = (int) pUserData;
int nHeight = 0;
int nWidth = 0;
mp_remove_view_get_icon_dimensions(&nHeight, &nWidth);
- Evas_Object *pGengrid = __mp_remove_view_create_gengrid(pObject, nWidth, nHeight);
+ Evas_Object *pGengrid =
+ __mp_remove_view_create_gengrid(pObject, nWidth, nHeight);
__mp_remove_folder_view_append_grid_items(pGengrid, nGenItemIndex);
return pGengrid;
if (nFolderListSize <= 0) {
VideoLogWarning("nFolderListSize = %d", nFolderListSize);
return FALSE;
- }
- else
+ } else
VideoLogWarning("nFolderListSize = %d", nFolderListSize);
MP_DEL_ITC(g_pListRemoveViewHandle->pGenListItc);
g_pListRemoveViewHandle->pGenListItc = elm_genlist_item_class_new();
- g_pListRemoveViewHandle->pGenListItc->item_style = "video/1icon.thumbnail";
+ g_pListRemoveViewHandle->pGenListItc->item_style =
+ "video/1icon.thumbnail";
g_pListRemoveViewHandle->pGenListItc->func.text_get = NULL;
- g_pListRemoveViewHandle->pGenListItc->func.content_get = (void *)__mp_remove_folder_view_get_icon_of_grid_cb;
+ g_pListRemoveViewHandle->pGenListItc->func.content_get =
+ (void *) __mp_remove_folder_view_get_icon_of_grid_cb;
g_pListRemoveViewHandle->pGenListItc->func.state_get = NULL;
g_pListRemoveViewHandle->pGenListItc->func.del = NULL;
g_pListRemoveViewHandle->pGenListItc->decorate_item_style = NULL;
MP_DEL_ITC(g_pListRemoveViewHandle->pGenListLandscapeItc);
- g_pListRemoveViewHandle->pGenListLandscapeItc = elm_genlist_item_class_new();
- g_pListRemoveViewHandle->pGenListLandscapeItc->item_style = "video/1icon.thumbnail.landscape";
+ g_pListRemoveViewHandle->pGenListLandscapeItc =
+ elm_genlist_item_class_new();
+ g_pListRemoveViewHandle->pGenListLandscapeItc->item_style =
+ "video/1icon.thumbnail.landscape";
g_pListRemoveViewHandle->pGenListLandscapeItc->func.text_get = NULL;
- g_pListRemoveViewHandle->pGenListLandscapeItc->func.content_get = (void *)__mp_remove_folder_view_get_icon_of_grid_cb;
+ g_pListRemoveViewHandle->pGenListLandscapeItc->func.content_get =
+ (void *) __mp_remove_folder_view_get_icon_of_grid_cb;
g_pListRemoveViewHandle->pGenListLandscapeItc->func.state_get = NULL;
g_pListRemoveViewHandle->pGenListLandscapeItc->func.del = NULL;
- g_pListRemoveViewHandle->pGenListLandscapeItc->decorate_item_style = NULL;
+ g_pListRemoveViewHandle->pGenListLandscapeItc->decorate_item_style =
+ NULL;
int nGenlistRow = 0;
- nGenlistRow = mp_remove_view_thumbnail_to_genlist_index(nFolderListSize - 1);
+ nGenlistRow =
+ mp_remove_view_thumbnail_to_genlist_index(nFolderListSize - 1);
- if (mp_rotate_ctrl_check_landspace_by_win((Evas_Object*)mp_util_get_main_window_handle()))
- {
+ if (mp_rotate_ctrl_check_landspace_by_win
+ ((Evas_Object *) mp_util_get_main_window_handle())) {
for (nIndex = 0; nIndex <= nGenlistRow; nIndex++) {
- elm_genlist_item_append(pGenlist, g_pListRemoveViewHandle->pGenListLandscapeItc, (void *)nIndex, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ elm_genlist_item_append(pGenlist,
+ g_pListRemoveViewHandle->
+ pGenListLandscapeItc, (void *) nIndex,
+ NULL, ELM_GENLIST_ITEM_NONE, NULL,
+ NULL);
}
} else {
for (nIndex = 0; nIndex <= nGenlistRow; nIndex++) {
- elm_genlist_item_append(pGenlist, g_pListRemoveViewHandle->pGenListItc, (void *)nIndex, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ elm_genlist_item_append(pGenlist,
+ g_pListRemoveViewHandle->pGenListItc,
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
}
}
}
#endif
-/*static void __mp_remove_view_append_folder_items(void *pObjVideosList)
-{
- if (!g_pListRemoveViewHandle)
- {
- VideoLogInfo("invalid handle");
- return;
- }
-
- int nIndex = 0;
- int nFolderListSize = mp_util_svc_get_video_folder_size();
- MP_DEL_ITC(g_pListRemoveViewHandle->pGenListItc);
- g_pListRemoveViewHandle->pGenListItc = elm_genlist_item_class_new();
-
- g_pListRemoveViewHandle->pGenListItc->item_style = "2line.top"; //"video/edit_folder";
- g_pListRemoveViewHandle->pGenListItc->func.text_get = (void*)__mp_remove_view_get_label_of_folder_cb;
- g_pListRemoveViewHandle->pGenListItc->func.content_get = (void*)__mp_remove_view_get_icon_of_folder_cb;
- g_pListRemoveViewHandle->pGenListItc->func.state_get = NULL;
- g_pListRemoveViewHandle->pGenListItc->func.del = NULL;
-
- for (nIndex = 0; nIndex < nFolderListSize; nIndex++)
- {
- elm_genlist_item_append(pObjVideosList, g_pListRemoveViewHandle->pGenListItc, (void *)nIndex, NULL, ELM_GENLIST_ITEM_NONE, __mp_remove_view_select_video_item_cb, NULL);
- }
-}*/
void mp_remove_view_set_value(int nTotalSize)
{
VideoLogInfo("");
- if (g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved)
- {
+ if (g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved) {
free(g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved);
g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved = NULL;
}
if (nTotalSize > 0) {
- g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved = (bool*)malloc(sizeof(bool) * nTotalSize);
- memset(g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved, 0, sizeof(bool) * nTotalSize);
+ g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved =
+ (bool *) malloc(sizeof(bool) * nTotalSize);
+ memset(g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved, 0,
+ sizeof(bool) * nTotalSize);
}
g_pListRemoveViewHandle->bSelectallCheckBoxState = FALSE;
}
-static bool __mp_remove_view_arrange_folder_list(void *pObjVideosList, MpVideoListTabType eTabType, bool bNeedSvc)
+static bool __mp_remove_view_arrange_folder_list(void *pObjVideosList,
+ MpVideoListTabType
+ eTabType, bool bNeedSvc)
{
- if (!g_pListRemoveViewWidget || !g_pListRemoveViewHandle)
- {
+ if (!g_pListRemoveViewWidget || !g_pListRemoveViewHandle) {
VideoLogError("No exist g_pRemoveListViewWidget.");
return FALSE;
}
- if (!pObjVideosList)
- {
+ if (!pObjVideosList) {
VideoLogError("No exist genlist object.");
return FALSE;
}
int nFolderListSize = 0;
mp_util_svc_destory_video_folder_list();
- mp_util_svc_extract_video_folder_list_by_type(mp_sort_ctrl_get_sort_state(), MP_LIST_VIEW_PHONE);
+ mp_util_svc_extract_video_folder_list_by_type
+ (mp_sort_ctrl_get_sort_state(), MP_LIST_VIEW_PHONE);
nFolderListSize = mp_util_svc_get_video_folder_size();
- if (bNeedSvc)
- {
- //__mp_remove_view_update_selected_video_list();
+ if (elm_check_state_get(g_pListRemoveViewWidget->pSelectallbtn)) {
+ g_pListRemoveViewHandle->nSelectCounterForEditList =
+ nFolderListSize;
}
- else
- {
- mp_remove_view_set_value(nFolderListSize);
+ if (!g_pListRemoveViewHandle->update_view_data) {
+ if (bNeedSvc) {
+ __mp_remove_view_update_selected_video_list();
+ } else {
+ mp_remove_view_set_value(nFolderListSize);
+ }
}
- if (LIST_TAB_TYPE_PERSONAL == eTabType)
- {
+ if (LIST_TAB_TYPE_PERSONAL == eTabType) {
VideoLogInfo("nFolderListSize : %d", nFolderListSize);
elm_genlist_clear(pObjVideosList);
- if (nFolderListSize > 0)
- {
- //__mp_remove_view_append_folder_items(pObjVideosList);
+ if (nFolderListSize > 0) {
__mp_remove_view_append_folder_grid_layout(pObjVideosList);
- }
- else
- {
- elm_naviframe_item_pop(g_pListRemoveViewHandle->pNaviFrameHandle);
+ } else {
+ elm_naviframe_item_pop(g_pListRemoveViewHandle->
+ pNaviFrameHandle);
return FALSE;
}
- }
- else
- {
+ } else {
VideoLogError("invalid Tabbar type!");
}
+ mp_remove_view_change_title_info();
+
elm_genlist_decorate_mode_set(pObjVideosList, EINA_TRUE);
evas_object_show(pObjVideosList);
return TRUE;
}
-static bool __mp_remove_view_arrange_video_list(void *pObjVideosList, MpVideoListTabType eTabType, bool bNeedSvc)
+static bool __mp_remove_view_arrange_video_list(void *pObjVideosList,
+ MpVideoListTabType
+ eTabType, bool bNeedSvc)
{
- if (!g_pListRemoveViewWidget || !g_pListRemoveViewHandle)
- {
+ if (!g_pListRemoveViewWidget || !g_pListRemoveViewHandle) {
VideoLogError("No exist g_pRemoveListViewWidget.");
return FALSE;
}
- if (!pObjVideosList)
- {
+ if (!pObjVideosList) {
VideoLogError("No exist genlist object.");
return FALSE;
}
int nVideoListSize = 0;
- if (LIST_TAB_TYPE_PERSONAL == eTabType)
- {
+ if (LIST_TAB_TYPE_PERSONAL == eTabType) {
int nSortType = mp_remove_view_get_sort_type();
int nViewType = mp_view_as_ctrl_get_type();
- if ((nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) && g_pListRemoveViewHandle->pFolderPath)
- {
- if (g_pListRemoveViewHandle->pFolderPath)
- {
- VideoSecureLogInfo("szFolderPath : %s", g_pListRemoveViewHandle->pFolderPath);
- if (vp_file_exists(g_pListRemoveViewHandle->pFolderPath))
- {
+ if ((nViewType == MP_LIST_VIEW_AS_FOLDER_LIST)
+ && g_pListRemoveViewHandle->pFolderPath) {
+ if (g_pListRemoveViewHandle->pFolderPath) {
+ VideoSecureLogInfo("szFolderPath : %s",
+ g_pListRemoveViewHandle->pFolderPath);
+ if (vp_file_exists(g_pListRemoveViewHandle->pFolderPath)) {
//update video-list
mp_util_svc_destory_video_item_list();
- mp_util_svc_extract_video_list_from_folder(g_pListRemoveViewHandle->pFolderPath, nSortType, MP_LIST_VIEW_PHONE);
- if (bNeedSvc)
- {
- //__mp_remove_view_update_selected_video_list();
- }
- else
- {
- nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
- mp_remove_view_set_value(nVideoListSize);
+ mp_util_svc_extract_video_list_from_folder
+ (g_pListRemoveViewHandle->pFolderPath, nSortType,
+ MP_LIST_VIEW_PHONE);
+ if (!g_pListRemoveViewHandle->update_view_data) {
+ if (bNeedSvc) {
+ __mp_remove_view_update_selected_video_list();
+ } else {
+ nVideoListSize =
+ mp_util_svc_get_number_of_video_item_by_type
+ ();
+ mp_remove_view_set_value(nVideoListSize);
+ }
}
- }
- else
- {
- elm_naviframe_item_pop(g_pListRemoveViewHandle->pNaviFrameHandle);
+ } else {
+ elm_naviframe_item_pop(g_pListRemoveViewHandle->
+ pNaviFrameHandle);
return FALSE;
}
}
- }
- else
- {
+ } else {
mp_util_svc_destory_video_list();
- mp_util_svc_extract_video_list_by_item_type(nSortType, MP_LIST_VIEW_PHONE);
- if (bNeedSvc)
- {
- //__mp_remove_view_update_selected_video_list();
- }
- else
- {
- nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
- mp_remove_view_set_value(nVideoListSize);
+ mp_util_svc_extract_video_list_by_item_type(nSortType,
+ MP_LIST_VIEW_PHONE);
+ if (!g_pListRemoveViewHandle->update_view_data) {
+ if (bNeedSvc) {
+ __mp_remove_view_update_selected_video_list();
+ } else {
+ nVideoListSize =
+ mp_util_svc_get_number_of_video_item_by_type();
+ mp_remove_view_set_value(nVideoListSize);
+ }
}
}
nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
VideoLogInfo("nVideoListSize : %d", nVideoListSize);
if (elm_check_state_get(g_pListRemoveViewWidget->pSelectallbtn)) {
- g_pListRemoveViewHandle->nSelectCounterForEditList = nVideoListSize;
+ g_pListRemoveViewHandle->nSelectCounterForEditList =
+ nVideoListSize;
}
- if (nVideoListSize > 0)
- {
+ if (nVideoListSize > 0) {
#ifdef VS_FEATURE_THUMBNAIL_VIEW //
- if (g_pListRemoveViewHandle->bThumbnailView)
- {
+ if (g_pListRemoveViewHandle->bThumbnailView) {
elm_genlist_clear(pObjVideosList);
__mp_remove_view_append_grid_layout(pObjVideosList);
- }
- else
+ } else
#endif
{
elm_genlist_clear(pObjVideosList);
mp_remove_view_append_video_items(pObjVideosList);
}
- }
- else
- {
- elm_naviframe_item_pop(g_pListRemoveViewHandle->pNaviFrameHandle);
+ } else {
+ elm_naviframe_item_pop(g_pListRemoveViewHandle->
+ pNaviFrameHandle);
return FALSE;
}
- }
- else
- {
+ } else {
VideoLogError("invalid Tabbar type!");
}
#ifdef VS_FEATURE_THUMBNAIL_VIEW_TODO //
if (!g_pListRemoveViewHandle->bThumbnailView) {
elm_genlist_decorate_mode_set(pObjVideosList, EINA_TRUE);
}
-#endif //
+#endif //
evas_object_show(pObjVideosList);
return TRUE;
}
Evas_Object *mp_remove_view_init_internal_layout(void *pParent)
{
- if (!pParent)
- {
+ if (!pParent) {
VideoLogError("[ERR]");
return NULL;
}
VideoLogInfo("");
- if (g_pListRemoveViewWidget->pRemoveViewBaselayout)
- {
+ if (g_pListRemoveViewWidget->pRemoveViewBaselayout) {
evas_object_del(g_pListRemoveViewWidget->pRemoveViewBaselayout);
g_pListRemoveViewWidget->pRemoveViewBaselayout = NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_REMOVE_LIST_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_REMOVE_LIST_EDJ);
free(path);
- g_pListRemoveViewWidget->pRemoveViewBaselayout = elm_layout_add(pParent);
- elm_layout_file_set(g_pListRemoveViewWidget->pRemoveViewBaselayout, edj_path, REMOVE_LIST_EDJ_GROUP);
- evas_object_size_hint_weight_set(g_pListRemoveViewWidget->pRemoveViewBaselayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(g_pListRemoveViewWidget->pRemoveViewBaselayout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ g_pListRemoveViewWidget->pRemoveViewBaselayout =
+ elm_layout_add(pParent);
+ elm_layout_file_set(g_pListRemoveViewWidget->pRemoveViewBaselayout,
+ edj_path, REMOVE_LIST_EDJ_GROUP);
+ evas_object_size_hint_weight_set(g_pListRemoveViewWidget->
+ pRemoveViewBaselayout,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(g_pListRemoveViewWidget->
+ pRemoveViewBaselayout, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
return g_pListRemoveViewWidget->pRemoveViewBaselayout;
}
static bool __mp_remove_view_get_selected_video_list(int nSelectedSize)
{
- if (!g_pListRemoveViewHandle || !g_pListRemoveViewWidget)
- {
+ if (!g_pListRemoveViewHandle || !g_pListRemoveViewWidget) {
VideoLogError("Main handles of list view are not existed.");
return FALSE;
}
int nVideoListSize = 0;
- if (LIST_TAB_TYPE_PERSONAL != g_pListRemoveViewHandle->eTabType)
- {
+ if (LIST_TAB_TYPE_PERSONAL != g_pListRemoveViewHandle->eTabType) {
return FALSE;
}
- if (!g_pListRemoveViewHandle->nSelectCounterForEditList || nSelectedSize < 1)
- {
+ if (!g_pListRemoveViewHandle->nSelectCounterForEditList
+ || nSelectedSize < 1) {
return FALSE;
}
- if (g_pListRemoveViewHandle->bFolderDel)
- {
+ if (g_pListRemoveViewHandle->bFolderDel) {
nVideoListSize = mp_util_svc_get_video_folder_size();
- }
- else
- {
+ } else {
nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
}
+ VideoLogInfo("current size is %d", nVideoListSize);
+
+ getFolderCount = nVideoListSize;
+
__mp_remove_view_free_selected_list();
int nIndex = 0;
int nCounter = 0;
char *pMediaId = NULL;
- g_pListRemoveViewHandle->pSelectedList = (char**) calloc (sizeof(char*), nSelectedSize);
+ g_pListRemoveViewHandle->pSelectedList =
+ (char **) calloc(sizeof(char *), nSelectedSize);
VideoLogInfo("current edit size===%d", nSelectedSize);
- for (nCounter = 0; nCounter <nVideoListSize; nCounter++)
- {
- if (g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved[nCounter])
- {
- if (g_pListRemoveViewHandle->bFolderDel)
- {
+ for (nCounter = 0; nCounter < nVideoListSize; nCounter++) {
+ if (g_pListRemoveViewHandle->bFolderDel) {
pMediaId = mp_util_svc_get_video_folder_id(nCounter);
- }
- else
- {
+ } else {
pMediaId = mp_util_svc_get_video_id_by_index(nCounter);
}
- if (pMediaId != NULL)
- {
- g_pListRemoveViewHandle->pSelectedList[nIndex] = strdup(pMediaId);
- MP_FREE_STRING(pMediaId);
- nIndex++;
+
+ if (pMediaId != NULL) {
+ if (__mp_remove_view_is_selected_file(pMediaId)) {
+ g_pListRemoveViewHandle->pSelectedList[nIndex] =
+ strdup(pMediaId);
+ MP_FREE_STRING(pMediaId);
+ nIndex++;
+ }
}
- }
+ folderStatus[nCounter] = TRUE;
}
return TRUE;
}
-/*static void __mp_remove_view_update_select_all(void)
+int __mp_remove_folder_view_get_folder_count()
{
- if (!g_pListRemoveViewHandle || !g_pListRemoveViewWidget)
- {
+ return getFolderCount;
+}
+
+static void __mp_remove_view_update_select_all(void)
+{
+ if (!g_pListRemoveViewHandle || !g_pListRemoveViewWidget) {
VideoLogError("Main handles of list view are not existed.");
return;
}
int nItemListSize = 0;
- if (g_pListRemoveViewHandle->bFolderDel)
- {
+ if (g_pListRemoveViewHandle->bFolderDel) {
nItemListSize = mp_util_svc_get_video_folder_size();
- }
- else
- {
+ } else {
nItemListSize = mp_util_svc_get_number_of_video_item_by_type();
}
- if (nItemListSize == g_pListRemoveViewHandle->nSelectCounterForEditList)
- {
- VideoLogInfo("All check box of edit list state are true.");
+ if (nItemListSize == eina_list_count(g_pSelectedList)) {
+ VideoLogInfo(" All check box of edit list state are true.");
g_pListRemoveViewHandle->bSelectallCheckBoxState = TRUE;
- }
- else
- {
+ } else {
g_pListRemoveViewHandle->bSelectallCheckBoxState = FALSE;
}
- VideoLogInfo("nItemListSize=%d,nSelectCounterForEditList=%d", nItemListSize, g_pListRemoveViewHandle->nSelectCounterForEditList);
- elm_check_state_set(g_pListRemoveViewWidget->pSelectallbtn, g_pListRemoveViewHandle->bSelectallCheckBoxState);
+ VideoLogInfo(" nItemListSize=%d,nSelectCounterForEditList=%d",
+ nItemListSize,
+ g_pListRemoveViewHandle->nSelectCounterForEditList);
+ elm_check_state_set(g_pListRemoveViewWidget->pSelectallbtn,
+ g_pListRemoveViewHandle->bSelectallCheckBoxState);
}
static void __mp_remove_view_update_selected_video_list(void)
{
- if (!g_pListRemoveViewHandle || !g_pListRemoveViewWidget)
- {
+ if (!g_pListRemoveViewHandle || !g_pListRemoveViewWidget) {
VideoLogError("Main handles of list view are not existed.");
return;
}
int nVideoListSize = 0;
- if (LIST_TAB_TYPE_PERSONAL != g_pListRemoveViewHandle->eTabType)
- {
+ __mp_remove_view_validate_selected_list();
+
+ if (LIST_TAB_TYPE_PERSONAL != g_pListRemoveViewHandle->eTabType) {
return;
}
+ int nTotal = 0;
MpMediaType eMediaType = MEDIA_TYPE_FILE;
- if (g_pListRemoveViewHandle->bFolderDel)
- {
+ if (g_pListRemoveViewHandle->bFolderDel) {
eMediaType = MEDIA_TYPE_DIRECTORY;
nVideoListSize = mp_util_svc_get_video_folder_size();
- }
- else
- {
+ nTotal = __mp_remove_folder_view_get_folder_count();
+ } else {
+ nTotal = g_pListRemoveViewHandle->nSelectCounterForEditList;
nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
}
int nIndex = 0;
int nCounter = 0;
bool bValidMedia = FALSE;
- int nTotal = g_pListRemoveViewHandle->nSelectCounterForEditList;
- VideoLogInfo("OldEditList ===%d", nTotal);
+
+ VideoLogInfo("OldEditList ===%d nVideoListSize :%d", nTotal, nVideoListSize);
g_pListRemoveViewHandle->nSelectCounterForEditList = 0;
mp_remove_view_set_value(nVideoListSize);
- if (!g_pListRemoveViewHandle->pSelectedList)
- {
+ if (!g_pListRemoveViewHandle->pSelectedList) {
return;
}
- while ((nIndex < nTotal) && g_pListRemoveViewHandle->pSelectedList[nIndex])
- {
+ VideoLogInfo(" nTotal %d", nTotal);
+
+ while ((nIndex < nVideoListSize)) {
+ char * pMediaId;
+ if (g_pListRemoveViewHandle->bFolderDel) {
+ pMediaId = mp_util_svc_get_video_folder_id(nIndex);
+ } else {
+ pMediaId = mp_util_svc_get_video_id_by_index(nIndex);
+ }
- bValidMedia = mp_util_svc_check_valid_media_id(g_pListRemoveViewHandle->pSelectedList[nIndex], eMediaType, &nCounter);
- if (bValidMedia)
- {
- g_pListRemoveViewHandle->pCheckedItemsEditListForRemoved[nCounter] = TRUE;
- g_pListRemoveViewHandle->nSelectCounterForEditList ++;
+ if (pMediaId) {
+ bValidMedia =
+ __mp_remove_view_is_selected_file(pMediaId);
+ } else {
+ bValidMedia = FALSE;
+ }
+
+ VideoLogInfo(" nIndex which were true are %d and media selected is : %d",
+ nIndex,
+ bValidMedia);
+ if (bValidMedia) {
+ g_pListRemoveViewHandle->
+ pCheckedItemsEditListForRemoved[nIndex] = TRUE;
+ folderStatus[nIndex] = TRUE;
+ g_pListRemoveViewHandle->nSelectCounterForEditList++;
+ } else {
+ folderStatus[nIndex] = FALSE;
+ g_pListRemoveViewHandle->
+ pCheckedItemsEditListForRemoved[nIndex] = FALSE;
}
nIndex++;
}
- //update select all button state
+ //update select all button state
__mp_remove_view_update_select_all();
mp_remove_view_change_title_info();
- if (g_pListRemoveViewHandle->nSelectCounterForEditList > 0)
- elm_object_disabled_set(g_pListRemoveViewWidget->pSavebtn, EINA_FALSE);
+ if (eina_list_count(g_pSelectedList) > 0)
+ elm_object_disabled_set(g_pListRemoveViewWidget->pSavebtn,
+ EINA_FALSE);
else
- elm_object_disabled_set(g_pListRemoveViewWidget->pSavebtn, EINA_TRUE);
-}*/
+ elm_object_disabled_set(g_pListRemoveViewWidget->pSavebtn,
+ EINA_TRUE);
+}
static void __mp_remove_view_db_changed_cb(void *pUserData)
{
bool bNormalShow = TRUE;
if (g_pListRemoveViewHandle->bFolderDel) {
- bNormalShow = __mp_remove_view_arrange_folder_list(g_pListRemoveViewHandle->pObjVideosList, LIST_TAB_TYPE_PERSONAL, TRUE);
- if (!bNormalShow)
- {
+ bNormalShow =
+ __mp_remove_view_arrange_folder_list(g_pListRemoveViewHandle->
+ pObjVideosList,
+ LIST_TAB_TYPE_PERSONAL,
+ TRUE);
+ if (!bNormalShow) {
VideoLogError("invalid view");
return;
}
} else {
- bNormalShow = __mp_remove_view_arrange_video_list(g_pListRemoveViewHandle->pObjVideosList, LIST_TAB_TYPE_PERSONAL, TRUE);
- if (!bNormalShow)
- {
+ bNormalShow =
+ __mp_remove_view_arrange_video_list(g_pListRemoveViewHandle->
+ pObjVideosList,
+ LIST_TAB_TYPE_PERSONAL,
+ TRUE);
+ if (!bNormalShow) {
VideoLogError("invalid view");
return;
}
Elm_Object_Item *pItem = NULL;
#ifdef VS_FEATURE_THUMBNAIL_VIEW_TODO //
- if (g_pListRemoveViewHandle->bThumbnailView)
- {
- pItem = elm_gengrid_first_item_get(g_pListRemoveViewHandle->pObjVideosList);
- if (pItem)
- {
+ if (g_pListRemoveViewHandle->bThumbnailView) {
+ pItem =
+ elm_gengrid_first_item_get(g_pListRemoveViewHandle->
+ pObjVideosList);
+ if (pItem) {
elm_gengrid_item_bring_in(pItem, ELM_GENGRID_ITEM_SCROLLTO_IN);
}
- }
- else
-#endif //
+ } else
+#endif //
{
- pItem = elm_genlist_first_item_get(g_pListRemoveViewHandle->pObjVideosList);
- if (pItem)
- {
+ pItem =
+ elm_genlist_first_item_get(g_pListRemoveViewHandle->
+ pObjVideosList);
+ if (pItem) {
elm_genlist_item_bring_in(pItem, ELM_GENLIST_ITEM_SCROLLTO_IN);
}
}
static void __mp_remove_view_db_backup_cb(void *pUserData)
{
- if (!g_pListRemoveViewHandle || !g_pListRemoveViewWidget)
- {
+ if (!g_pListRemoveViewHandle || !g_pListRemoveViewWidget) {
VideoLogError("Main handles of list view are not existed.");
return;
}
- __mp_remove_view_get_selected_video_list(g_pListRemoveViewHandle->nSelectCounterForEditList);
-
+ __mp_remove_view_get_selected_video_list(g_pListRemoveViewHandle->
+ nSelectCounterForEditList);
}
-static void __mp_remove_select_all_layout_down_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+static void __mp_remove_select_all_layout_down_cb(void *data, Evas * evas,
+ Evas_Object * obj,
+ void *event_info)
{
- if (!g_pListRemoveViewHandle || !g_pListRemoveViewWidget)
- {
+ if (!g_pListRemoveViewHandle || !g_pListRemoveViewWidget) {
VideoLogError("Main handles of list view are not existed.");
return;
}
- Evas_Object *check = elm_object_part_content_get(g_pListRemoveViewWidget->pSelAllLayout, "elm.icon");
+ Evas_Object *check =
+ elm_object_part_content_get(g_pListRemoveViewWidget->pSelAllLayout,
+ "elm.icon");
Eina_Bool state = elm_check_state_get(check);
elm_check_state_set(check, !state);
__mp_remove_view_select_all_change_check_box_cb(data, check, NULL);
void mp_remove_view_init(void *pParent, MpVideoListTabType eTabType)
{
- if (!g_pListRemoveViewHandle || !g_pListRemoveViewWidget)
- {
+ if (!g_pListRemoveViewHandle || !g_pListRemoveViewWidget) {
VideoLogError("Main handles of list view are not existed.");
return;
}
VideoLogInfo("");
- g_pListRemoveViewWidget->pRemoveViewBaselayout = mp_remove_view_init_internal_layout(pParent);
+ g_pListRemoveViewWidget->pRemoveViewBaselayout =
+ mp_remove_view_init_internal_layout(pParent);
if (!g_pListRemoveViewWidget->pRemoveViewBaselayout) {
VideoLogError("pRemoveViewBaselayout is not existed.");
return;
}
- evas_object_event_callback_add(g_pListRemoveViewWidget->pRemoveViewBaselayout, EVAS_CALLBACK_DEL, __mp_remove_view_base_layout_del_cb, NULL);
+ evas_object_event_callback_add(g_pListRemoveViewWidget->
+ pRemoveViewBaselayout,
+ EVAS_CALLBACK_DEL,
+ __mp_remove_view_base_layout_del_cb,
+ NULL);
- g_pListRemoveViewWidget->pVideoListBox = elm_box_add(g_pListRemoveViewWidget->pRemoveViewBaselayout);
+ g_pListRemoveViewWidget->pVideoListBox =
+ elm_box_add(g_pListRemoveViewWidget->pRemoveViewBaselayout);
if (!g_pListRemoveViewWidget->pVideoListBox) {
VideoLogError("pVideoListBox is not existed.");
return;
}
- evas_object_size_hint_weight_set(g_pListRemoveViewWidget->pVideoListBox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(g_pListRemoveViewWidget->pVideoListBox, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(g_pListRemoveViewWidget->
+ pVideoListBox, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(g_pListRemoveViewWidget->pVideoListBox,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
- mp_widget_ctrl_create_select_all_layout(g_pListRemoveViewWidget->pVideoListBox, __mp_remove_view_select_all_change_check_box_cb, __mp_remove_select_all_layout_down_cb, (void *)g_pListRemoveViewWidget,
- &g_pListRemoveViewWidget->pSelectallbtn, &g_pListRemoveViewWidget->pSelAllLayout);
+ mp_widget_ctrl_create_select_all_layout(g_pListRemoveViewWidget->
+ pVideoListBox,
+ __mp_remove_view_select_all_change_check_box_cb,
+ __mp_remove_select_all_layout_down_cb,
+ (void *)
+ g_pListRemoveViewWidget,
+ &g_pListRemoveViewWidget->
+ pSelectallbtn,
+ &g_pListRemoveViewWidget->
+ pSelAllLayout);
if (!g_pListRemoveViewWidget->pSelAllLayout) {
VideoLogError("pSelAllLayout is not existed.");
return;
}
- elm_box_pack_start(g_pListRemoveViewWidget->pVideoListBox, g_pListRemoveViewWidget->pSelAllLayout);
+ elm_box_pack_start(g_pListRemoveViewWidget->pVideoListBox,
+ g_pListRemoveViewWidget->pSelAllLayout);
#ifdef VS_FEATURE_THUMBNAIL_VIEW_TODO //
- if (g_pListRemoveViewHandle->bThumbnailView)
- {
- g_pListRemoveViewHandle->pObjVideosList = elm_gengrid_add(g_pListRemoveViewWidget->pVideoListBox);
+ if (g_pListRemoveViewHandle->bThumbnailView) {
+ g_pListRemoveViewHandle->pObjVideosList =
+ elm_gengrid_add(g_pListRemoveViewWidget->pVideoListBox);
if (!g_pListRemoveViewHandle->pObjVideosList) {
VideoLogError("pVideoGrid is not existed.");
return;
}
- evas_object_size_hint_weight_set(g_pListRemoveViewHandle->pObjVideosList, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(g_pListRemoveViewHandle->pObjVideosList, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(g_pListRemoveViewHandle->
+ pObjVideosList, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(g_pListRemoveViewHandle->
+ pObjVideosList, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
int nHeight = VP_ALBUM_THUMB_ICON_HEIGHT * MP_SCALE;
int nWidth = VIDEO_GENGRID_ICON_WIDTH * MP_SCALE;
- elm_gengrid_item_size_set(g_pListRemoveViewHandle->pObjVideosList, nWidth, nHeight);
- elm_gengrid_align_set(g_pListRemoveViewHandle->pObjVideosList, 0.0, 0.0);
- elm_gengrid_horizontal_set(g_pListRemoveViewHandle->pObjVideosList, EINA_FALSE);
- //elm_gengrid_multi_select_set(g_pListRemoveViewHandle->pObjVideosList, EINA_TRUE);
- }
- else
-#endif //
+ elm_gengrid_item_size_set(g_pListRemoveViewHandle->pObjVideosList,
+ nWidth, nHeight);
+ elm_gengrid_align_set(g_pListRemoveViewHandle->pObjVideosList, 0.0,
+ 0.0);
+ elm_gengrid_horizontal_set(g_pListRemoveViewHandle->pObjVideosList,
+ EINA_FALSE);
+ } else
+#endif
{
- g_pListRemoveViewHandle->pObjVideosList = elm_genlist_add(g_pListRemoveViewWidget->pVideoListBox);
+ g_pListRemoveViewHandle->pObjVideosList =
+ elm_genlist_add(g_pListRemoveViewWidget->pVideoListBox);
if (!g_pListRemoveViewHandle->pObjVideosList) {
VideoLogError("pObjVideosList is not existed.");
return;
}
- elm_scroller_bounce_set(g_pListRemoveViewHandle->pObjVideosList, EINA_FALSE, EINA_TRUE);
- evas_object_size_hint_weight_set(g_pListRemoveViewHandle->pObjVideosList, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(g_pListRemoveViewHandle->pObjVideosList, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_genlist_block_count_set(g_pListRemoveViewHandle->pObjVideosList, VIDEO_GENLIST_BLOCK_COUNT);
- elm_genlist_homogeneous_set(g_pListRemoveViewHandle->pObjVideosList, EINA_TRUE);
- elm_genlist_mode_set(g_pListRemoveViewHandle->pObjVideosList, ELM_LIST_COMPRESS);
+ elm_scroller_bounce_set(g_pListRemoveViewHandle->pObjVideosList,
+ EINA_FALSE, EINA_TRUE);
+ evas_object_size_hint_weight_set(g_pListRemoveViewHandle->
+ pObjVideosList, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(g_pListRemoveViewHandle->
+ pObjVideosList, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ elm_genlist_block_count_set(g_pListRemoveViewHandle->
+ pObjVideosList,
+ VIDEO_GENLIST_BLOCK_COUNT);
+ elm_genlist_homogeneous_set(g_pListRemoveViewHandle->
+ pObjVideosList, EINA_TRUE);
+ elm_genlist_mode_set(g_pListRemoveViewHandle->pObjVideosList,
+ ELM_LIST_COMPRESS);
+ elm_genlist_select_mode_set(g_pListRemoveViewWidget->pVideoListBox,
+ ELM_OBJECT_SELECT_MODE_NONE);
}
g_pListRemoveViewHandle->eTabType = eTabType;
- elm_box_pack_end(g_pListRemoveViewWidget->pVideoListBox, g_pListRemoveViewHandle->pObjVideosList);
- elm_object_part_content_set(g_pListRemoveViewWidget->pRemoveViewBaselayout, SWALLOW_LISTVIEW_CONTENT, g_pListRemoveViewWidget->pVideoListBox);
+ elm_box_pack_end(g_pListRemoveViewWidget->pVideoListBox,
+ g_pListRemoveViewHandle->pObjVideosList);
+ elm_object_part_content_set(g_pListRemoveViewWidget->
+ pRemoveViewBaselayout,
+ SWALLOW_LISTVIEW_CONTENT,
+ g_pListRemoveViewWidget->pVideoListBox);
bool bNormalShow = TRUE;
if (g_pListRemoveViewHandle->bFolderDel) {
- bNormalShow = __mp_remove_view_arrange_folder_list(g_pListRemoveViewHandle->pObjVideosList, eTabType, FALSE);
- if (!bNormalShow)
- {
+ bNormalShow =
+ __mp_remove_view_arrange_folder_list(g_pListRemoveViewHandle->
+ pObjVideosList, eTabType,
+ FALSE);
+ if (!bNormalShow) {
VideoLogError("invalid view");
return;
}
} else {
- bNormalShow = __mp_remove_view_arrange_video_list(g_pListRemoveViewHandle->pObjVideosList, eTabType, FALSE);
- if (!bNormalShow)
- {
+ bNormalShow =
+ __mp_remove_view_arrange_video_list(g_pListRemoveViewHandle->
+ pObjVideosList, eTabType,
+ FALSE);
+ if (!bNormalShow) {
VideoLogError("invalid view");
return;
}
}
- char *szTitle = g_strdup_printf(VIDEOS_SELECTVIEW_HEADER_PD_SELECTED, g_pListRemoveViewHandle->nSelectCounterForEditList);
-
- g_pListRemoveViewHandle->pNaviFrameItem = elm_naviframe_item_push(g_pListRemoveViewHandle->pNaviFrameHandle, szTitle, NULL, NULL, g_pListRemoveViewWidget->pRemoveViewBaselayout, NULL);
- elm_object_item_domain_text_translatable_set(g_pListRemoveViewHandle->pNaviFrameItem, VIDEOS_STRING, EINA_TRUE);
- elm_naviframe_item_pop_cb_set(g_pListRemoveViewHandle->pNaviFrameItem, __mp_remove_view_back_btn_cb, g_pListRemoveViewHandle);
-
- elm_naviframe_item_title_enabled_set(g_pListRemoveViewHandle->pNaviFrameItem, EINA_TRUE, EINA_FALSE);
- evas_object_smart_callback_add(g_pListRemoveViewHandle->pNaviFrameHandle, "transition,finished", mp_remove_view_naviframe_transition_effect_cb, NULL);
-
- /*g_pListRemoveViewWidget->pCancelbtn = mp_widget_ctrl_create_navi_left_btn(g_pListRemoveViewHandle->pNaviFrameHandle, g_pListRemoveViewHandle->pNaviFrameItem, NULL, __mp_remove_view_run_cancel_items_cb, (void *)g_pListRemoveViewHandle);
- g_pListRemoveViewWidget->pSavebtn = mp_widget_ctrl_create_navi_right_btn(g_pListRemoveViewHandle->pNaviFrameHandle, g_pListRemoveViewHandle->pNaviFrameItem, NULL, __mp_remove_view_run_delete_items_cb, (void *)g_pListRemoveViewHandle);*/
-
- g_pListRemoveViewWidget->pCancelbtn = elm_button_add(g_pListRemoveViewHandle->pNaviFrameHandle);
- elm_object_style_set(g_pListRemoveViewWidget->pCancelbtn, "naviframe/title_left");
- //elm_object_text_set(g_pListRemoveViewWidget->pCancelbtn, VIDEOS_DELETEVIEW_CANCEL_IDS);
- mp_util_set_translate_str(g_pListRemoveViewWidget->pCancelbtn, "IDS_TPLATFORM_ACBUTTON_CANCEL_ABB");
- elm_object_signal_callback_add(g_pListRemoveViewWidget->pCancelbtn, "elm,action,click", "", __mp_remove_view_run_cancel_items_cb, (void *)g_pListRemoveViewHandle);
- elm_object_item_part_content_set(g_pListRemoveViewHandle->pNaviFrameItem, "title_left_btn", g_pListRemoveViewWidget->pCancelbtn);
+ char *szTitle =
+ g_strdup_printf(VIDEOS_SELECTVIEW_HEADER_PD_SELECTED,
+ g_pListRemoveViewHandle->
+ nSelectCounterForEditList);
+
+ g_pListRemoveViewHandle->pNaviFrameItem =
+ elm_naviframe_item_push(g_pListRemoveViewHandle->pNaviFrameHandle,
+ szTitle, NULL, NULL,
+ g_pListRemoveViewWidget->
+ pRemoveViewBaselayout, NULL);
+ elm_object_item_domain_text_translatable_set(g_pListRemoveViewHandle->
+ pNaviFrameItem,
+ VIDEOS_STRING, EINA_TRUE);
+ elm_naviframe_item_pop_cb_set(g_pListRemoveViewHandle->pNaviFrameItem,
+ __mp_remove_view_back_btn_cb,
+ g_pListRemoveViewHandle);
+
+ elm_naviframe_item_title_enabled_set(g_pListRemoveViewHandle->
+ pNaviFrameItem, EINA_TRUE,
+ EINA_FALSE);
+ evas_object_smart_callback_add(g_pListRemoveViewHandle->
+ pNaviFrameHandle, "transition,finished",
+ mp_remove_view_naviframe_transition_effect_cb,
+ NULL);
+
+ g_pListRemoveViewWidget->pCancelbtn =
+ elm_button_add(g_pListRemoveViewHandle->pNaviFrameHandle);
+ elm_object_style_set(g_pListRemoveViewWidget->pCancelbtn,
+ "naviframe/title_left");
+ mp_util_set_translate_str(g_pListRemoveViewWidget->pCancelbtn,
+ "IDS_TPLATFORM_ACBUTTON_CANCEL_ABB");
+ elm_object_signal_callback_add(g_pListRemoveViewWidget->pCancelbtn,
+ "elm,action,click", "",
+ __mp_remove_view_run_cancel_items_cb,
+ (void *) g_pListRemoveViewHandle);
+ elm_object_item_part_content_set(g_pListRemoveViewHandle->
+ pNaviFrameItem, "title_left_btn",
+ g_pListRemoveViewWidget->pCancelbtn);
evas_object_show(g_pListRemoveViewWidget->pCancelbtn);
- g_pListRemoveViewWidget->pSavebtn = elm_button_add(g_pListRemoveViewHandle->pNaviFrameHandle);
- elm_object_style_set(g_pListRemoveViewWidget->pSavebtn, "naviframe/title_right");
- //elm_object_text_set(g_pListRemoveViewWidget->pSavebtn, VIDEOS_DELETEVIEW_DELETE_IDS);
- mp_util_set_translate_str(g_pListRemoveViewWidget->pSavebtn, "IDS_TPLATFORM_ACBUTTON_DELETE_ABB");
- elm_object_signal_callback_add(g_pListRemoveViewWidget->pSavebtn, "elm,action,click", "", __mp_remove_view_run_delete_items_cb, (void *)g_pListRemoveViewHandle);
- elm_object_item_part_content_set(g_pListRemoveViewHandle->pNaviFrameItem, "title_right_btn", g_pListRemoveViewWidget->pSavebtn);
+ g_pListRemoveViewWidget->pSavebtn =
+ elm_button_add(g_pListRemoveViewHandle->pNaviFrameHandle);
+ elm_object_style_set(g_pListRemoveViewWidget->pSavebtn,
+ "naviframe/title_right");
+ mp_util_set_translate_str(g_pListRemoveViewWidget->pSavebtn,
+ "IDS_TPLATFORM_ACBUTTON_DELETE_ABB");
+ elm_object_signal_callback_add(g_pListRemoveViewWidget->pSavebtn,
+ "elm,action,click", "",
+ __mp_remove_view_run_delete_items_cb,
+ (void *) g_pListRemoveViewHandle);
+ elm_object_item_part_content_set(g_pListRemoveViewHandle->
+ pNaviFrameItem, "title_right_btn",
+ g_pListRemoveViewWidget->pSavebtn);
evas_object_show(g_pListRemoveViewWidget->pSavebtn);
elm_object_disabled_set(g_pListRemoveViewWidget->pSavebtn, EINA_TRUE);
evas_object_show(g_pListRemoveViewHandle->pObjVideosList);
evas_object_show(g_pListRemoveViewWidget->pRemoveViewBaselayout);
- mp_util_db_set_update_fun(g_pListRemoveViewHandle->euLev, __mp_remove_view_db_changed_cb);
- mp_util_db_set_backup_fun(g_pListRemoveViewHandle->euLev, __mp_remove_view_db_backup_cb);
+ mp_util_db_set_update_fun(g_pListRemoveViewHandle->euLev,
+ __mp_remove_view_db_changed_cb);
+ mp_util_db_set_backup_fun(g_pListRemoveViewHandle->euLev,
+ __mp_remove_view_db_backup_cb);
+
+ __mp_remove_view_release_selected_list();
MP_FREE_STRING(szTitle);
mp_util_hide_indicator();
}
-void mp_remove_view_push(void *pNaviFrame, ListRemoveViewCbFunc pUpdateViewCb, ChangeListRemoveViewCbFunc pChangeViewCb, char *pFolderPath, MpVideoListTabType eTabType)
+void mp_remove_view_push(void *pNaviFrame,
+ ListRemoveViewCbFunc pUpdateViewCb,
+ ChangeListRemoveViewCbFunc pChangeViewCb,
+ char *pFolderPath, MpVideoListTabType eTabType)
{
VideoLogInfo("");
mp_remove_view_destroy();
- g_pListRemoveViewHandle = (st_VideoListRemoveViewHandle*)calloc(1, sizeof(st_VideoListRemoveViewHandle));
- g_pListRemoveViewWidget = (st_VideoListRemoveViewWidget*)calloc(1, sizeof(st_VideoListRemoveViewWidget));
-
- memset(g_pListRemoveViewHandle, 0, sizeof(st_VideoListRemoveViewHandle));
- memset(g_pListRemoveViewWidget, 0, sizeof(st_VideoListRemoveViewWidget));
+ g_pListRemoveViewHandle =
+ (st_VideoListRemoveViewHandle *) calloc(1,
+ sizeof
+ (st_VideoListRemoveViewHandle));
+ g_pListRemoveViewWidget =
+ (st_VideoListRemoveViewWidget *) calloc(1,
+ sizeof
+ (st_VideoListRemoveViewWidget));
+
+ memset(g_pListRemoveViewHandle, 0,
+ sizeof(st_VideoListRemoveViewHandle));
+ memset(g_pListRemoveViewWidget, 0,
+ sizeof(st_VideoListRemoveViewWidget));
mp_remove_view_reset_value();
g_pListRemoveViewHandle->pNaviFrameHandle = pNaviFrame;
g_pListRemoveViewHandle->euLev = MP_DB_UPDATE_LEV_1;
int nViewType = mp_view_as_ctrl_get_type();
- if (nViewType == MP_LIST_VIEW_AS_FOLDER_LIST && g_pListRemoveViewHandle->pFolderPath) {
+ if (nViewType == MP_LIST_VIEW_AS_FOLDER_LIST
+ && g_pListRemoveViewHandle->pFolderPath) {
g_pListRemoveViewHandle->euLev = MP_DB_UPDATE_LEV_2;
}
- if ((nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) && (!g_pListRemoveViewHandle->pFolderPath) && (LIST_TAB_TYPE_PERSONAL == eTabType)) {
+ if ((nViewType == MP_LIST_VIEW_AS_FOLDER_LIST)
+ && (!g_pListRemoveViewHandle->pFolderPath)
+ && (LIST_TAB_TYPE_PERSONAL == eTabType)) {
g_pListRemoveViewHandle->bFolderDel = TRUE;
} else {
g_pListRemoveViewHandle->bFolderDel = FALSE;
}
-#ifdef VS_FEATURE_THUMBNAIL_VIEW //
- if ((nViewType == MP_LIST_VIEW_AS_THUMBNAIL_LIST || nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) && (LIST_TAB_TYPE_PERSONAL == eTabType)) {
+#ifdef VS_FEATURE_THUMBNAIL_VIEW
+ if ((nViewType == MP_LIST_VIEW_AS_THUMBNAIL_LIST
+ || nViewType == MP_LIST_VIEW_AS_FOLDER_LIST)
+ && (LIST_TAB_TYPE_PERSONAL == eTabType)) {
g_pListRemoveViewHandle->bThumbnailView = TRUE;
} else {
g_pListRemoveViewHandle->bThumbnailView = FALSE;
}
-#endif //
- mp_remove_view_init(g_pListRemoveViewHandle->pNaviFrameHandle, eTabType);
- evas_object_smart_callback_add((Evas_Object*)mp_util_get_main_window_handle(), "wm,rotation,changed", __mp_remove_view_rotate_cb, (void*)g_pListRemoveViewHandle);
+#endif
+ mp_remove_view_init(g_pListRemoveViewHandle->pNaviFrameHandle,
+ eTabType);
+ evas_object_smart_callback_add((Evas_Object *)
+ mp_util_get_main_window_handle(),
+ "wm,rotation,changed",
+ __mp_remove_view_rotate_cb,
+ (void *) g_pListRemoveViewHandle);
+ g_pListRemoveViewHandle->update_view_data = false;
}
void mp_remove_view_pop(void)
{
VideoLogInfo("");
- if (!g_pListRemoveViewHandle)
- {
+ if (!g_pListRemoveViewHandle) {
VideoLogError("No existed handle of remove view.");
return;
}
-
// KEEP BELOW CALLING SEQUENCE OF FUNCTION.
bool bUpdateList = FALSE;
- if (g_pListRemoveViewHandle->bUpdateList)
- {
- if (g_pListRemoveViewHandle->pChangeViewUpdateFunc)
- {
+ if (g_pListRemoveViewHandle->bUpdateList) {
+ if (g_pListRemoveViewHandle->pChangeViewUpdateFunc) {
bUpdateList = TRUE;
- g_pListRemoveViewHandle->pChangeViewUpdateFunc(LIST_UPDATE_TYPE_ALL);
+ g_pListRemoveViewHandle->
+ pChangeViewUpdateFunc(LIST_UPDATE_TYPE_ALL);
}
}
- if (!bUpdateList)
- {
- if (g_pListRemoveViewHandle->pChangeViewUserCbFunc)
- {
+ if (!bUpdateList) {
+ if (g_pListRemoveViewHandle->pChangeViewUserCbFunc) {
g_pListRemoveViewHandle->pChangeViewUserCbFunc();
}
}
void mp_remove_view_change_language(void)
{
- if (!g_pListRemoveViewHandle || !g_pListRemoveViewWidget)
- {
+ if (!g_pListRemoveViewHandle || !g_pListRemoveViewWidget) {
VideoLogError("No existed handle of remove view.");
return;
}
static void
-__mp_remove_view_base_layout_del_cb(void *pUserData, Evas *e, Evas_Object *pObject, void *pEventInfo)
+__mp_remove_view_base_layout_del_cb(void *pUserData, Evas * e,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
- //evas_object_event_callback_del(g_pListRemoveViewWidget->pRemoveViewBaselayout, EVAS_CALLBACK_DEL, __mp_remove_view_base_layout_del_cb);
-
__mp_remove_view_reset();
}
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <Eina.h>
#include <Ecore_Evas.h>
} st_VideoListShareViaViewHandle;
typedef struct {
- /* Evas_Object *pSelectionInfoLayout; */
Evas_Object *pVideoListBox;
Evas_Object *pChareViaViewBaselayout;
Evas_Object *pSelectallbtn;
static st_VideoListShareViaViewHandle *g_pShareViaHandle = NULL;
static st_VideoListShareViaViewWidget *g_pShareViaWidget = NULL;
+static app_control_h g_pServiceShare = NULL;
+static char **g_pShareList = NULL;
+static int g_nShareListSize = 0;
+static bool g_bSharePanelLaunched = FALSE;
+
int mp_share_view_get_sort_type(void);
-bool __mp_share_view_arrange_video_list(void *pObjVideosList, bool bNeedSvc);
+bool __mp_share_view_arrange_video_list(void *pObjVideosList,
+ bool bNeedSvc);
void mp_share_view_naviframe_transition_effect_cb(void *pUserData,
- Evas_Object *pObject, void *pEventInfo);
+ Evas_Object * pObject,
+ void *pEventInfo);
void mp_share_view_change_title_info(void);
-static void __mp_share_view_base_layout_del_cb(void *pUserData, Evas *e,
- Evas_Object *pObject, void *pEventInfo);
-static void __mp_share_via_view_rotate_cb(void *data, Evas_Object *obj,
- void *event_info);
+static void __mp_share_view_base_layout_del_cb(void *pUserData, Evas * e,
+ Evas_Object * pObject,
+ void *pEventInfo);
+static void __mp_share_via_view_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info);
static bool __mp_share_view_get_selected_video_list(int nSelectedSize);
-/* static void __mp_share_view_update_selected_video_list(void); */
+
+static void __vp_share_view_create_launch_share_panel(void);
+static void __vp_share_view_destroy_share_panel(void);
+
static void __mp_share_view_free_selected_list(void)
{
int nVideoItemIndex = 0;
#ifdef VS_FEATURE_THUMBNAIL_VIEW
if (g_pShareViaHandle->bThumbnailView) {
- currentItem = elm_genlist_first_item_get(
- g_pShareViaHandle->pObjVideosList);
+ currentItem =
+ elm_genlist_first_item_get(g_pShareViaHandle->pObjVideosList);
nVideoItemIndex = 0;
while (currentItem && (nVideoItemIndex < nVideoListSize)) {
- Evas_Object *gengrid = elm_object_item_part_content_get(
- currentItem, "elm.icon");
+ Evas_Object *gengrid =
+ elm_object_item_part_content_get(currentItem, "elm.icon");
currentItemGengrid = elm_gengrid_first_item_get(gengrid);
- while (currentItemGengrid && (nVideoItemIndex < nVideoListSize)) {
+ while (currentItemGengrid
+ && (nVideoItemIndex < nVideoListSize)) {
Evas_Object *check_box =
- elm_object_item_part_content_get(
- currentItemGengrid,
- "elm.swallow.end");
+ elm_object_item_part_content_get(currentItemGengrid,
+ "elm.swallow.end");
if (check_box) {
elm_check_state_set(check_box,
- g_pShareViaHandle->pCheckedItemsEditList[nVideoItemIndex]);
+ g_pShareViaHandle->
+ pCheckedItemsEditList
+ [nVideoItemIndex]);
}
- currentItemGengrid = elm_gengrid_item_next_get(currentItemGengrid);
+ currentItemGengrid =
+ elm_gengrid_item_next_get(currentItemGengrid);
nVideoItemIndex++;
}
currentItem = elm_genlist_item_next_get(currentItem);
} else
#endif
{
- currentItem = elm_genlist_first_item_get(g_pShareViaHandle->pObjVideosList);
+ currentItem =
+ elm_genlist_first_item_get(g_pShareViaHandle->pObjVideosList);
nVideoItemIndex = 0;
while (currentItem && (nVideoItemIndex < nVideoListSize)) {
- check_box_layout = elm_object_item_part_content_get(
- currentItem, "elm.icon.2");
- check_box = elm_object_part_content_get(check_box_layout,
- "elm.swallow.content");
+ check_box_layout =
+ elm_object_item_part_content_get(currentItem,
+ "elm.icon.2");
+ check_box =
+ elm_object_part_content_get(check_box_layout,
+ "elm.swallow.content");
if (check_box) {
elm_check_state_set(check_box,
- g_pShareViaHandle->pCheckedItemsEditList[nVideoItemIndex]);
+ g_pShareViaHandle->
+ pCheckedItemsEditList
+ [nVideoItemIndex]);
}
currentItem = elm_genlist_item_next_get(currentItem);
nVideoItemIndex++;
if (g_pShareViaHandle) {
evas_object_smart_callback_del(g_pShareViaHandle->pNaviFrameHandle,
- "transition,finished", mp_share_view_naviframe_transition_effect_cb);
+ "transition,finished",
+ mp_share_view_naviframe_transition_effect_cb);
__mp_share_view_free_selected_list();
MP_DEL_OBJ(g_pShareViaHandle->pObjVideosList);
MP_DEL_GRID_ITC(g_pShareViaHandle->pGenGridItc_2);
MP_FREE_STRING(g_pShareViaHandle->pCheckedItemsEditList);
MP_FREE_STRING(g_pShareViaHandle->pFolderPath);
- evas_object_smart_callback_del(
- (Evas_Object *)mp_util_get_main_window_handle(),
- "wm,rotation,changed", __mp_share_via_view_rotate_cb);
+ evas_object_smart_callback_del((Evas_Object *)
+ mp_util_get_main_window_handle(),
+ "wm,rotation,changed",
+ __mp_share_via_view_rotate_cb);
MP_FREE_STRING(g_pShareViaHandle);
}
if (g_pShareViaHandle) {
mp_util_db_set_update_fun(g_pShareViaHandle->euLev, NULL);
mp_util_db_set_backup_fun(g_pShareViaHandle->euLev, NULL);
- evas_object_smart_callback_del(
- g_pShareViaHandle->pNaviFrameHandle,
- "transition,finished",
- mp_share_view_naviframe_transition_effect_cb);
- evas_object_smart_callback_del((Evas_Object *)mp_util_get_main_window_handle(),
- "wm,rotation,changed", __mp_share_via_view_rotate_cb);
+ evas_object_smart_callback_del(g_pShareViaHandle->pNaviFrameHandle,
+ "transition,finished",
+ mp_share_view_naviframe_transition_effect_cb);
+ evas_object_smart_callback_del((Evas_Object *)
+ mp_util_get_main_window_handle(),
+ "wm,rotation,changed",
+ __mp_share_via_view_rotate_cb);
__mp_share_view_free_selected_list();
g_pShareViaHandle->pObjVideosList = NULL;
g_pShareViaHandle->nSortType = MP_MEDIA_SORT_BY_RECENTLY_VIEWED;
if (g_pShareViaHandle->pNaviFrameItem) {
- elm_object_item_part_content_unset(g_pShareViaHandle->pNaviFrameItem, "toolbar_more_btn");
- elm_object_item_part_content_unset(g_pShareViaHandle->pNaviFrameItem, "toolbar");
- elm_object_item_part_content_unset(g_pShareViaHandle->pNaviFrameItem, "toolbar_button2");
+ elm_object_item_part_content_unset(g_pShareViaHandle->
+ pNaviFrameItem,
+ "toolbar_more_btn");
+ elm_object_item_part_content_unset(g_pShareViaHandle->
+ pNaviFrameItem, "toolbar");
+ elm_object_item_part_content_unset(g_pShareViaHandle->
+ pNaviFrameItem,
+ "toolbar_button2");
}
}
+
+static void __vp_share_view_create_launch_share_panel(void)
+{
+ char *pOperation = VIDEO_SHARE_OPERATION_SINGLE;
+ int nCounter;
+ int nErr = 0;
+
+ if (g_nShareListSize > 1) {
+ pOperation = VIDEO_SHARE_OPERATION_MULTIPLE;
+ }
+
+ if (!g_pShareList) {
+ VideoLogWarning("[WARNING] Fail to get uri at first.");
+ goto ERROR_EXCEPTION;
+ }
+
+ if (!g_pServiceShare) {
+ nErr = app_control_create(&g_pServiceShare);
+ if (nErr != APP_CONTROL_ERROR_NONE) {
+ VideoLogInfo("Fail to create ug service handle - [0x%x]",
+ nErr);
+ goto ERROR_EXCEPTION;
+ }
+ }
+
+ nErr = app_control_create(&g_pServiceShare);
+ if (nErr != APP_CONTROL_ERROR_NONE) {
+ VideoLogInfo("Fail to create ug service handle - [0x%x]", nErr);
+ goto ERROR_EXCEPTION;
+ }
+
+ nErr = app_control_set_uri(g_pServiceShare, g_pShareList[0]);
+ if (nErr != APP_CONTROL_ERROR_NONE) {
+ VideoLogInfo("Fail to set uri into ug service handle - [0x%x]",
+ nErr);
+ goto ERROR_EXCEPTION;
+ }
+
+ nErr = app_control_set_operation(g_pServiceShare, pOperation);
+ if (nErr != APP_CONTROL_ERROR_NONE) {
+ VideoLogInfo("app_control_add_extra_data_array().. [0x%x]", nErr);
+ goto ERROR_EXCEPTION;
+ }
+
+ if (g_nShareListSize >= 1) {
+ nErr = app_control_add_extra_data_array(g_pServiceShare,
+ "http://tizen.org/appcontrol/data/path",
+ (const char
+ **) (&g_pShareList[1]),
+ g_nShareListSize - 1);
+ if (nErr != APP_CONTROL_ERROR_NONE) {
+ VideoLogWarning
+ ("[WARNING] app_control_add_extra_data_array() [0x%x]",
+ nErr);
+ goto ERROR_EXCEPTION;
+ }
+ }
+
+ nErr = app_control_send_launch_request(g_pServiceShare, NULL, NULL);
+ if (nErr != APP_CONTROL_ERROR_NONE) {
+ VideoLogWarning
+ ("[WARNING] app_control_send_launch_request().. [0x%x]", nErr);
+ goto ERROR_EXCEPTION;
+ }
+
+ g_bSharePanelLaunched = TRUE;
+
+ elm_naviframe_item_pop(g_pShareViaHandle->pNaviFrameHandle);
+
+ return;
+
+ ERROR_EXCEPTION:
+ if (g_pServiceShare) {
+ app_control_destroy(g_pServiceShare);
+ g_pServiceShare = NULL;
+ }
+
+ if (g_pShareList) {
+ for (nCounter = 0; nCounter < g_nShareListSize; nCounter++) {
+ if (g_pShareList[nCounter]) {
+ free(g_pShareList[nCounter]);
+ g_pShareList[nCounter] = NULL;
+ }
+ }
+ free(g_pShareList);
+ g_pShareList = NULL;
+ }
+
+}
+
+static void __vp_share_view_destroy_share_panel(void)
+{
+ int nCounter;
+ if (g_pServiceShare && g_bSharePanelLaunched) {
+ app_control_send_terminate_request(g_pServiceShare);
+ app_control_destroy(g_pServiceShare);
+ g_pServiceShare = NULL;
+ g_bSharePanelLaunched = FALSE;
+
+ if (g_pShareList) {
+ for (nCounter = 0; nCounter < g_nShareListSize; nCounter++) {
+ if (g_pShareList[nCounter]) {
+ free(g_pShareList[nCounter]);
+ g_pShareList[nCounter] = NULL;
+ }
+ }
+ free(g_pShareList);
+ g_pShareList = NULL;
+ }
+ g_nShareListSize = 0;
+ }
+}
+
+void vp_share_view_update_share_panel(void)
+{
+ MpMediaType eMediaType = MEDIA_TYPE_FILE;
+ bool bValidMedia = FALSE;
+ int i, nCounter;
+
+ if (g_pServiceShare && g_bSharePanelLaunched == TRUE) {
+
+ for (i = 0; i < g_nShareListSize; i++) {
+
+ if (!vp_file_exists((const char *) g_pShareList[i])) {
+ VideoLogError("File %s doesn't exist", g_pShareList[i]);
+ bValidMedia = FALSE;
+ } else {
+ bValidMedia = TRUE;
+ }
+
+ if (bValidMedia) {
+ break;
+ }
+ }
+
+ if (!bValidMedia) {
+ VideoLogInfo
+ ("Selected media not found. Destroying share panel");
+ __vp_share_view_destroy_share_panel();
+ }
+ }
+}
+
+
+
void mp_share_view_launching_share_panel(void)
{
if (!g_pShareViaHandle || !g_pShareViaHandle->pCheckedItemsEditList) {
int nTotalAppendedItem = 0;
int nExtraDataSize = 0;
- app_control_h pService = NULL;
+ g_nShareListSize = 0;
char *pOperation = VIDEO_SHARE_OPERATION_SINGLE;
char *szFileUrlForServiceSetUri = NULL;
nExtraDataSize = nTotalVideoItem;
if (nExtraDataSize) {
- szFileUrlArrayForServiceExtraData = (char **)calloc(
- nExtraDataSize, sizeof(char *));
+ szFileUrlArrayForServiceExtraData =
+ (char **) calloc(nExtraDataSize, sizeof(char *));
+
+ /* Store the list so the share panel can be updated later */
+ g_pShareList = (char **) calloc(nExtraDataSize, sizeof(char *));
}
/* Extract First URI. */
if (szFileUrl) {
szFileUrlForServiceSetUri = szFileUrl;
nCounter++;
+
+ g_pShareList[0] = strdup(szFileUrl);
+ g_nShareListSize++;
break;
} else {
VideoLogError("szFileUrl is not existed.");
if (szFileUrl) {
if (nTotalAppendedItem < nExtraDataSize) {
- szFileUrlArrayForServiceExtraData[nTotalAppendedItem] = szFileUrl;
- VideoSecureLogInfo("Appending share item : %s, Total Appended item : %d", (const char **)szFileUrlArrayForServiceExtraData[nTotalAppendedItem], nTotalAppendedItem);
+ szFileUrlArrayForServiceExtraData
+ [nTotalAppendedItem] = szFileUrl;
+ VideoSecureLogInfo
+ ("Appending share item : %s, Total Appended item : %d",
+ (const char **)
+ szFileUrlArrayForServiceExtraData
+ [nTotalAppendedItem], nTotalAppendedItem);
nTotalAppendedItem++;
+
+ g_pShareList[g_nShareListSize++] =
+ strdup(szFileUrl);
continue;
} else {
- VideoLogWarning("[WARNING] OVERFLOW ALOOCATED MEMORY SIZE.");
+ VideoLogWarning
+ ("[WARNING] OVERFLOW ALOOCATED MEMORY SIZE.");
free(szFileUrl);
}
} else {
}
}
- if (nTotalAppendedItem > 1) {
- pOperation = VIDEO_SHARE_OPERATION_MULTIPLE;
- }
-
- if (!szFileUrlForServiceSetUri) {
- VideoLogWarning("[WARNING] Fail to get uri at first.");
- goto ERROR_EXCEPTION;
- }
-
- nErr = app_control_create(&pService);
- if (nErr != APP_CONTROL_ERROR_NONE) {
- VideoLogInfo("Fail to create ug service handle - [0x%x]", nErr);
- goto ERROR_EXCEPTION;
- }
-
- nErr = app_control_set_uri(pService, szFileUrlForServiceSetUri);
- if (nErr != APP_CONTROL_ERROR_NONE) {
- VideoLogInfo("Fail to set uri into ug service handle - [0x%x]", nErr);
- goto ERROR_EXCEPTION;
- }
-
- nErr = app_control_set_operation(pService, pOperation);
- if (nErr != APP_CONTROL_ERROR_NONE) {
- VideoLogInfo("app_control_add_extra_data_array().. [0x%x]", nErr);
- goto ERROR_EXCEPTION;
- }
- if (nTotalAppendedItem >= 1) {
- nErr = app_control_add_extra_data_array(pService,
- "http://tizen.org/appcontrol/data/path",
- (const char **)szFileUrlArrayForServiceExtraData,
- nTotalAppendedItem);
- if (nErr != APP_CONTROL_ERROR_NONE) {
- VideoLogWarning("[WARNING] app_control_add_extra_data_array() [0x%x]", nErr);
- goto ERROR_EXCEPTION;
- }
- }
-/*
- nErr = app_control_set_window(pService, elm_win_xwindow_get(
- mp_util_get_main_window_handle()));
- if (nErr != APP_CONTROL_ERROR_NONE) {
- VideoLogWarning("[WARNING] app_control_set_window()... [0x%x]", nErr);
- goto ERROR_EXCEPTION;
- }
-*/
- nErr = app_control_send_launch_request(pService, NULL, NULL);
- if (nErr != APP_CONTROL_ERROR_NONE) {
- VideoLogWarning("[WARNING] app_control_send_launch_request().. [0x%x]", nErr);
- goto ERROR_EXCEPTION;
- }
- elm_naviframe_item_pop(g_pShareViaHandle->pNaviFrameHandle);
- app_control_destroy(pService);
- pService = NULL;
+ __vp_share_view_create_launch_share_panel();
VideoLogInfo("Launching share panel.");
-ERROR_EXCEPTION:
- if (pService) {
- app_control_destroy(pService);
- pService = NULL;
- }
-
+ ERROR_EXCEPTION:
if (szFileUrlForServiceSetUri) {
free(szFileUrlForServiceSetUri);
szFileUrlForServiceSetUri = NULL;
return;
}
-void __mp_share_view_show_cancel_cb(void *data, Evas_Object *obj,
- const char *emission, const char *source)
+void __mp_share_view_show_cancel_cb(void *data, Evas_Object * obj,
+ const char *emission,
+ const char *source)
{
if (!g_pShareViaHandle->pNaviFrameHandle) {
VideoSecureLogError("g_pShareViaHandle->pNaviFrameHandle is NULL");
elm_naviframe_item_pop(g_pShareViaHandle->pNaviFrameHandle);
}
-void __mp_share_view_show_share_via_panel_cb(void *data, Evas_Object *obj,
- const char *emission, const char *source)
+void __mp_share_view_show_share_via_panel_cb(void *data, Evas_Object * obj,
+ const char *emission,
+ const char *source)
{
if (!g_pShareViaHandle) {
VideoLogInfo("[ERR] g_pMainViewHandle is NULL.");
}
VideoLogInfo("[INFO]nSelectCounterForEditList : %d",
- g_pShareViaHandle->nSelectCounterForEditList);
+ g_pShareViaHandle->nSelectCounterForEditList);
if (g_pShareViaHandle->nSelectCounterForEditList > 0) {
mp_share_view_launching_share_panel();
- /* g_pShareViaHandle->nSelectCounterForEditList = 0; */
}
}
static void __mp_share_view_trans_finished_cb(void *pUserData,
- Evas_Object *obj, void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
if (!obj) {
VideoLogError("[ERR] g_pShareViaHandle is NULL.");
mp_widget_ctrl_enable_navi_handle_focus(obj);
evas_object_smart_callback_del(obj, "transition,finished",
- __mp_share_view_trans_finished_cb);
+ __mp_share_view_trans_finished_cb);
}
static Eina_Bool mp_share_view_back_btn_cb(void *pUserData,
- Elm_Object_Item *pItem)
+ Elm_Object_Item * pItem)
{
if (!g_pShareViaHandle) {
VideoLogInfo("[ERR] g_pShareViaHandle is NULL.");
return EINA_TRUE;
}
- mp_widget_ctrl_disable_navi_handle_focus_except_item(
- g_pShareViaHandle->pNaviFrameHandle,
- g_pShareViaHandle->pNaviFrameItem);
+ mp_widget_ctrl_disable_navi_handle_focus_except_item
+ (g_pShareViaHandle->pNaviFrameHandle,
+ g_pShareViaHandle->pNaviFrameItem);
evas_object_smart_callback_add(g_pShareViaHandle->pNaviFrameHandle,
- "transition,finished", __mp_share_view_trans_finished_cb,
- NULL);
+ "transition,finished",
+ __mp_share_view_trans_finished_cb,
+ NULL);
mp_share_view_pop();
void mp_share_view_change_title_info(void)
{
VideoLogInfo("nNumOfSelectdCount : %d",
- g_pShareViaHandle->nSelectCounterForEditList);
+ g_pShareViaHandle->nSelectCounterForEditList);
if (g_pShareViaHandle->nSelectCounterForEditList > 0) {
elm_object_disabled_set(g_pShareViaWidget->pSavebtn, EINA_FALSE);
elm_object_disabled_set(g_pShareViaWidget->pSavebtn, EINA_TRUE);
}
- char *szCheckingTotalItem = g_strdup_printf(
- VIDEOS_SELECTVIEW_HEADER_PD_SELECTED,
- g_pShareViaHandle->nSelectCounterForEditList);
- elm_object_item_domain_translatable_part_text_set(
- g_pShareViaHandle->pNaviFrameItem, "elm.text.title",
- VIDEOS_STRING, szCheckingTotalItem);
+ char *szCheckingTotalItem =
+ g_strdup_printf(VIDEOS_SELECTVIEW_HEADER_PD_SELECTED,
+ g_pShareViaHandle->nSelectCounterForEditList);
+ elm_object_item_domain_translatable_part_text_set(g_pShareViaHandle->
+ pNaviFrameItem,
+ "elm.text.title",
+ VIDEOS_STRING,
+ szCheckingTotalItem);
MP_FREE_STRING(szCheckingTotalItem);
}
static void __mp_share_view_select_all_change_check_box_cb(void *pUserData,
- Evas_Object *pObject, void *pEventInfo)
+ Evas_Object *
+ pObject,
+ void
+ *pEventInfo)
{
if (!pObject) {
VideoLogError("[ERR]");
if (!g_pShareViaHandle->bSelectallCheckBoxState) {
if (nVideoListSize > VIDEO_SHARE_ITEM_MAX) {
- VideoLogError("nVideoListSize is bigger than VIDEO_SHARE_ITEM_MAX");
- char *pStrWarning = g_strdup_printf(
- VIDEOS_NOTIPOP_MSG_SHARE_ITEM_MAX,
- VIDEO_SHARE_ITEM_MAX);
+ VideoLogError
+ ("nVideoListSize is bigger than VIDEO_SHARE_ITEM_MAX");
+ char *pStrWarning =
+ g_strdup_printf(VIDEOS_NOTIPOP_MSG_SHARE_ITEM_MAX,
+ VIDEO_SHARE_ITEM_MAX);
mp_util_ticker_toast_popup(pStrWarning, false, false);
MP_FREE_STRING(pStrWarning);
- elm_check_state_set(g_pShareViaWidget->pSelectallbtn, g_pShareViaHandle->bSelectallCheckBoxState);
+ elm_check_state_set(g_pShareViaWidget->pSelectallbtn,
+ g_pShareViaHandle->
+ bSelectallCheckBoxState);
return;
}
g_pShareViaHandle->bSelectallCheckBoxState = TRUE;
}
elm_check_state_set(g_pShareViaWidget->pSelectallbtn,
- g_pShareViaHandle->bSelectallCheckBoxState);
+ g_pShareViaHandle->bSelectallCheckBoxState);
mp_share_view_change_title_info();
mp_share_view_update_all_check_box();
- /* elm_genlist_realized_items_update(g_pShareViaHandle->pObjVideosList); */
}
void mp_share_view_delete_select_all(void)
Check box callback
*/
void mp_share_view_change_check_box_state_cb(void *pUserData,
- Evas_Object *pObject, void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!pObject) {
VideoLogError("[ERR]");
VideoLogError("pObject : %x", pObject);
}
- int nVideoItemIndex = (int)pUserData;
+ int nVideoItemIndex = (int) pUserData;
int nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
bool bState = elm_check_state_get(pObject);
if (bState) {
if (g_pShareViaHandle->nSelectCounterForEditList >
(VIDEO_SHARE_ITEM_MAX - 1)) {
- char *pStrWarning = g_strdup_printf(
- VIDEOS_NOTIPOP_MSG_SHARE_ITEM_MAX,
- VIDEO_SHARE_ITEM_MAX);
+ char *pStrWarning =
+ g_strdup_printf(VIDEOS_NOTIPOP_MSG_SHARE_ITEM_MAX,
+ VIDEO_SHARE_ITEM_MAX);
mp_util_ticker_toast_popup(pStrWarning, false, false);
MP_FREE_STRING(pStrWarning);
}
g_pShareViaHandle->pCheckedItemsEditList[nVideoItemIndex] = TRUE;
g_pShareViaHandle->nSelectCounterForEditList++;
- if (nVideoListSize ==
- g_pShareViaHandle->nSelectCounterForEditList) {
+ if (nVideoListSize == g_pShareViaHandle->nSelectCounterForEditList) {
VideoLogInfo("All check box of edit list state are true.");
g_pShareViaHandle->bSelectallCheckBoxState = TRUE;
}
g_pShareViaHandle->nSelectCounterForEditList--;
if (g_pShareViaHandle->nSelectCounterForEditList < 1) {
VideoLogInfo("Unactivate delete button.");
- elm_object_disabled_set(g_pShareViaWidget->pSavebtn, EINA_TRUE);
+ elm_object_disabled_set(g_pShareViaWidget->pSavebtn,
+ EINA_TRUE);
}
}
elm_check_state_set(g_pShareViaWidget->pSelectallbtn,
- g_pShareViaHandle->bSelectallCheckBoxState);
+ g_pShareViaHandle->bSelectallCheckBoxState);
mp_share_view_change_title_info();
-/*
- if (pSelectedItem) {
- elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
- }
-*/
}
/*
Genlist callback
*/
void mp_share_view_naviframe_transition_effect_cb(void *pUserData,
- Evas_Object *pObject, void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!g_pShareViaHandle) {
VideoLogError("[ERR] No exist g_pShareViaHandle.");
return;
}
- pTmpItem = elm_naviframe_top_item_get(g_pShareViaHandle->pNaviFrameHandle);
+ pTmpItem =
+ elm_naviframe_top_item_get(g_pShareViaHandle->pNaviFrameHandle);
pTmpContents = elm_object_item_content_get(pTmpItem);
if (pTmpContents) {
if (pTmpContents == g_pShareViaWidget->pVideoListBox) {
} else {
- VideoLogInfo("It's not pListShareViaViewTabbarLayout in top screen.");
+ VideoLogInfo
+ ("It's not pListShareViaViewTabbarLayout in top screen.");
}
} else {
VideoLogError("[ERR] No exist naviframe top item.");
VideoLogInfo("");
- elm_genlist_item_bring_in(elm_genlist_first_item_get(
- g_pShareViaHandle->pObjVideosList),
- ELM_GENLIST_ITEM_SCROLLTO_TOP);
+ elm_genlist_item_bring_in(elm_genlist_first_item_get
+ (g_pShareViaHandle->pObjVideosList),
+ ELM_GENLIST_ITEM_SCROLLTO_TOP);
}
char *mp_share_view_get_duration_time(int nVideoItemIndex)
{
VideoLogInfo("");
- char szTmpStr[STR_LEN_MAX] = {0,};
- char szTmpStrDurationTime[STR_LEN_MAX] = {0,};
- char szTmpStrLastPlayedPos[STR_LEN_MAX] = {0,};
+ char szTmpStr[STR_LEN_MAX] = { 0, };
+ char szTmpStrDurationTime[STR_LEN_MAX] = { 0, };
+ char szTmpStrLastPlayedPos[STR_LEN_MAX] = { 0, };
unsigned int nVideoInfoDuration =
mp_util_svc_get_video_duration_time(nVideoItemIndex);
mp_util_convert_time(nVideoInfoLastTime, szTmpStrLastPlayedPos, TRUE);
snprintf(szTmpStr, STR_LEN_MAX, "%s/%s", szTmpStrLastPlayedPos,
- szTmpStrDurationTime);
+ szTmpStrDurationTime);
return strdup(szTmpStr);
}
static void __mp_share_view_select_grid_item_cb(void *pUserData,
- Evas_Object *pObject, void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!g_pShareViaHandle->pObjVideosList) {
VideoLogError("No exist genlist object.");
int nVideoItemIndex = 0;
- Elm_Object_Item *pItem = (Elm_Object_Item *)pEventInfo;
- Elm_Object_Item *pSelectedItem = elm_gengrid_selected_item_get(pObject);
+ Elm_Object_Item *pItem = (Elm_Object_Item *) pEventInfo;
+ Elm_Object_Item *pSelectedItem =
+ elm_gengrid_selected_item_get(pObject);
if (pItem) {
- nVideoItemIndex = (int)elm_object_item_data_get(pItem);
+ nVideoItemIndex = (int) elm_object_item_data_get(pItem);
VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
- int nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
+ int nVideoListSize =
+ mp_util_svc_get_number_of_video_item_by_type();
- VideoLogInfo("BEFORE : nSelectCounterForEditList : %d", g_pShareViaHandle->nSelectCounterForEditList);
+ VideoLogInfo("BEFORE : nSelectCounterForEditList : %d",
+ g_pShareViaHandle->nSelectCounterForEditList);
if (g_pShareViaHandle->pCheckedItemsEditList[nVideoItemIndex]) {
- g_pShareViaHandle->pCheckedItemsEditList[nVideoItemIndex] = FALSE;
- if (nVideoListSize == g_pShareViaHandle->nSelectCounterForEditList) {
- VideoLogInfo("All check box of edit list state are not true.");
+ g_pShareViaHandle->pCheckedItemsEditList[nVideoItemIndex] =
+ FALSE;
+ if (nVideoListSize ==
+ g_pShareViaHandle->nSelectCounterForEditList) {
+ VideoLogInfo
+ ("All check box of edit list state are not true.");
g_pShareViaHandle->bSelectallCheckBoxState = FALSE;
}
g_pShareViaHandle->nSelectCounterForEditList--;
if (g_pShareViaHandle->nSelectCounterForEditList < 1) {
VideoLogInfo("Unactivate delete button.");
- elm_object_disabled_set(g_pShareViaWidget->pSavebtn, EINA_TRUE);
+ elm_object_disabled_set(g_pShareViaWidget->pSavebtn,
+ EINA_TRUE);
}
} else {
- VideoLogInfo("selected count = %d", g_pShareViaHandle->nSelectCounterForEditList);
- if (g_pShareViaHandle->nSelectCounterForEditList > (VIDEO_SHARE_ITEM_MAX - 1)) {
- char *pStrWarning = g_strdup_printf(VIDEOS_NOTIPOP_MSG_SHARE_ITEM_MAX, VIDEO_SHARE_ITEM_MAX);
+ VideoLogInfo("selected count = %d",
+ g_pShareViaHandle->nSelectCounterForEditList);
+ if (g_pShareViaHandle->nSelectCounterForEditList >
+ (VIDEO_SHARE_ITEM_MAX - 1)) {
+ char *pStrWarning =
+ g_strdup_printf(VIDEOS_NOTIPOP_MSG_SHARE_ITEM_MAX,
+ VIDEO_SHARE_ITEM_MAX);
mp_util_ticker_toast_popup(pStrWarning, false, false);
MP_FREE_STRING(pStrWarning);
if (pSelectedItem) {
- elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
+ elm_genlist_item_selected_set(pSelectedItem,
+ EINA_FALSE);
elm_gengrid_item_update(pSelectedItem);
}
return;
}
- g_pShareViaHandle->pCheckedItemsEditList[nVideoItemIndex] = TRUE;
+ g_pShareViaHandle->pCheckedItemsEditList[nVideoItemIndex] =
+ TRUE;
g_pShareViaHandle->nSelectCounterForEditList++;
- if (nVideoListSize == g_pShareViaHandle->nSelectCounterForEditList) {
+ if (nVideoListSize ==
+ g_pShareViaHandle->nSelectCounterForEditList) {
VideoLogInfo("All check box of edit list state are true.");
g_pShareViaHandle->bSelectallCheckBoxState = TRUE;
}
}
- VideoLogInfo("AFTER : nSelectCounterForEditList : %d", g_pShareViaHandle->nSelectCounterForEditList);
- elm_check_state_set(g_pShareViaWidget->pSelectallbtn, g_pShareViaHandle->bSelectallCheckBoxState);
+ VideoLogInfo("AFTER : nSelectCounterForEditList : %d",
+ g_pShareViaHandle->nSelectCounterForEditList);
+ elm_check_state_set(g_pShareViaWidget->pSelectallbtn,
+ g_pShareViaHandle->bSelectallCheckBoxState);
mp_share_view_change_title_info();
elm_gengrid_item_update(pItem);
}
}
-void mp_share_view_select_video_item_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+void mp_share_view_select_video_item_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!g_pShareViaHandle->pObjVideosList) {
VideoLogError("No exist genlist object.");
int nVideoItemIndex = 0;
- Elm_Object_Item *pItem = (Elm_Object_Item *)pEventInfo;
- Elm_Object_Item *pSelectedItem = elm_genlist_selected_item_get(pObject);
+ Elm_Object_Item *pItem = (Elm_Object_Item *) pEventInfo;
+ Elm_Object_Item *pSelectedItem =
+ elm_genlist_selected_item_get(pObject);
if (pItem) {
- nVideoItemIndex = (int)elm_object_item_data_get(pItem);
+ nVideoItemIndex = (int) elm_object_item_data_get(pItem);
VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
- int nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
+ int nVideoListSize =
+ mp_util_svc_get_number_of_video_item_by_type();
- VideoLogInfo("BEFORE : nSelectCounterForEditList : %d", g_pShareViaHandle->nSelectCounterForEditList);
+ VideoLogInfo("BEFORE : nSelectCounterForEditList : %d",
+ g_pShareViaHandle->nSelectCounterForEditList);
if (g_pShareViaHandle->pCheckedItemsEditList[nVideoItemIndex]) {
- g_pShareViaHandle->pCheckedItemsEditList[nVideoItemIndex] = FALSE;
- if (nVideoListSize == g_pShareViaHandle->nSelectCounterForEditList) {
- VideoLogInfo("All check box of edit list state are not true.");
+ g_pShareViaHandle->pCheckedItemsEditList[nVideoItemIndex] =
+ FALSE;
+ if (nVideoListSize ==
+ g_pShareViaHandle->nSelectCounterForEditList) {
+ VideoLogInfo
+ ("All check box of edit list state are not true.");
g_pShareViaHandle->bSelectallCheckBoxState = FALSE;
}
g_pShareViaHandle->nSelectCounterForEditList--;
if (g_pShareViaHandle->nSelectCounterForEditList < 1) {
VideoLogInfo("Unactivate delete button.");
- elm_object_disabled_set(g_pShareViaWidget->pSavebtn, EINA_TRUE);
+ elm_object_disabled_set(g_pShareViaWidget->pSavebtn,
+ EINA_TRUE);
}
} else {
- VideoLogInfo("Unactivate delete button. = %d", g_pShareViaHandle->nSelectCounterForEditList);
- if (g_pShareViaHandle->nSelectCounterForEditList > (VIDEO_SHARE_ITEM_MAX - 1)) {
- char *pStrWarning = g_strdup_printf(VIDEOS_NOTIPOP_MSG_SHARE_ITEM_MAX, VIDEO_SHARE_ITEM_MAX);
+ VideoLogInfo("Unactivate delete button. = %d",
+ g_pShareViaHandle->nSelectCounterForEditList);
+ if (g_pShareViaHandle->nSelectCounterForEditList >
+ (VIDEO_SHARE_ITEM_MAX - 1)) {
+ char *pStrWarning =
+ g_strdup_printf(VIDEOS_NOTIPOP_MSG_SHARE_ITEM_MAX,
+ VIDEO_SHARE_ITEM_MAX);
mp_util_ticker_toast_popup(pStrWarning, false, false);
MP_FREE_STRING(pStrWarning);
if (pSelectedItem) {
- elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
+ elm_genlist_item_selected_set(pSelectedItem,
+ EINA_FALSE);
}
return;
}
- g_pShareViaHandle->pCheckedItemsEditList[nVideoItemIndex] = TRUE;
+ g_pShareViaHandle->pCheckedItemsEditList[nVideoItemIndex] =
+ TRUE;
g_pShareViaHandle->nSelectCounterForEditList++;
- if (nVideoListSize == g_pShareViaHandle->nSelectCounterForEditList) {
+ if (nVideoListSize ==
+ g_pShareViaHandle->nSelectCounterForEditList) {
VideoLogInfo("All check box of edit list state are true.");
g_pShareViaHandle->bSelectallCheckBoxState = TRUE;
}
}
- VideoLogInfo("AFTER : nSelectCounterForEditList : %d", g_pShareViaHandle->nSelectCounterForEditList);
- elm_check_state_set(g_pShareViaWidget->pSelectallbtn, g_pShareViaHandle->bSelectallCheckBoxState);
+ VideoLogInfo("AFTER : nSelectCounterForEditList : %d",
+ g_pShareViaHandle->nSelectCounterForEditList);
+ elm_check_state_set(g_pShareViaWidget->pSelectallbtn,
+ g_pShareViaHandle->bSelectallCheckBoxState);
mp_share_view_change_title_info();
- Evas_Object *check_box_layout = elm_object_item_part_content_get(pItem, "elm.icon.2");
- Evas_Object *check_box = elm_object_part_content_get(check_box_layout, "elm.swallow.content");
+ Evas_Object *check_box_layout =
+ elm_object_item_part_content_get(pItem, "elm.icon.2");
+ Evas_Object *check_box =
+ elm_object_part_content_get(check_box_layout,
+ "elm.swallow.content");
if (check_box) {
- elm_check_state_set(check_box, g_pShareViaHandle->pCheckedItemsEditList[nVideoItemIndex]);
+ elm_check_state_set(check_box,
+ g_pShareViaHandle->
+ pCheckedItemsEditList[nVideoItemIndex]);
}
- /* elm_genlist_item_fields_update(pSelectedItem, "elm.edit.icon.1", ELM_GENLIST_ITEM_FIELD_CONTENT); */
} else {
VideoLogInfo("[ERR]Error item number.");
}
}
#ifdef VS_FEATURE_THUMBNAIL_VIEW
-static char *__mp_share_view_get_label_of_grid_item_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static char *__mp_share_view_get_label_of_grid_item_cb(const void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char *pPart)
{
- int nVideoItemIndex = (int)pUserData;
+ int nVideoItemIndex = (int) pUserData;
if (!strcmp(pPart, "elm.text")) {
char *szTitle = NULL;
}
#endif
-char *mp_share_view_get_label_of_video_item_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+char *mp_share_view_get_label_of_video_item_cb(const void *pUserData,
+ Evas_Object * pObject,
+ const char *pPart)
{
- int nVideoItemIndex = (int)pUserData;
+ int nVideoItemIndex = (int) pUserData;
if (!strcmp(pPart, "elm.text.main.left.top")) {
char *szTitle = NULL;
} else if (!strcmp(pPart, "elm.text.sub.left.bottom")) {
return mp_util_svc_get_duration_str_time(nVideoItemIndex);
}
-/*
- else if (!strcmp(pPart, "elm.text.sub.right.bottom")) {
- unsigned long long nFilesize = 0;
-
- nFilesize = mp_util_svc_get_video_item_size(nVideoItemIndex);
- char *szFileSize = mp_util_get_file_size(nFilesize);
- char *szTitleUtf8 = NULL;
- if (szFileSize)
- {
- szTitleUtf8 = elm_entry_utf8_to_markup(szFileSize);
- free(szFileSize);
- szFileSize = NULL;
- }
-
- return szTitleUtf8;
- }
-*/
-
return NULL;
}
#ifdef VS_FEATURE_THUMBNAIL_VIEW
-static Evas_Object *__mp_share_view_get_grid_icon_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static Evas_Object *__mp_share_view_get_grid_icon_cb(const void *pUserData,
+ Evas_Object * pObject,
+ const char *pPart)
{
- int nVideoItemIndex = (int)pUserData;
- char edj_path[1024] = {0};
+ int nVideoItemIndex = (int) pUserData;
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_IMAGE_NAME_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_IMAGE_NAME_EDJ);
free(path);
if (!strcmp(pPart, "elm.swallow.icon")) {
- char *pThumbIconUri = mp_util_svc_get_video_thumbnail(nVideoItemIndex);
+ char *pThumbIconUri =
+ mp_util_svc_get_video_thumbnail(nVideoItemIndex);
Evas_Object *pBg = NULL;
if (!pThumbIconUri || !vp_file_exists(pThumbIconUri)) {
pBg = elm_image_add(pObject);
MP_FREE_STRING(pThumbIconUri);
- evas_object_size_hint_aspect_set(pBg, EVAS_ASPECT_CONTROL_BOTH, 1, 1);
+ evas_object_size_hint_aspect_set(pBg, EVAS_ASPECT_CONTROL_BOTH,
+ 1, 1);
elm_image_file_set(pBg, pThumbIconUri, NULL);
} else {
- pBg = mp_util_create_preload_image(pObject, pThumbIconUri, GRID_VIDEO_ICON_WIDTH);
+ pBg =
+ mp_util_create_preload_image(pObject, pThumbIconUri,
+ GRID_VIDEO_ICON_WIDTH);
}
MP_FREE_STRING(pThumbIconUri);
double nRatio = 0.0;
if (nDurationTime > 0) {
- nRatio = ((double)nLastPlayedTime) / ((double)nDurationTime);
+ nRatio = ((double) nLastPlayedTime) / ((double) nDurationTime);
}
if (nRatio < 0.05) {
elm_object_style_set(pProgressBar, "video/list_progress");
elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
evas_object_size_hint_align_set(pProgressBar,
- EVAS_HINT_FILL, EVAS_HINT_FILL);
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pProgressBar,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
elm_progressbar_value_set(pProgressBar, nRatio);
evas_object_show(pProgressBar);
return pProgressBar;
} else if (!strcmp(pPart, "elm.lock.icon")) {
char *pVideoFile = mp_util_svc_get_video_url(nVideoItemIndex);
- bool bRet = mp_util_check_video_personal_status(
- (const char *)pVideoFile);
+ bool bRet = mp_util_check_video_personal_status((const char *)
+ pVideoFile);
MP_FREE_STRING(pVideoFile);
if (bRet) {
Evas_Object *pLockIcon = elm_image_add(pObject);
elm_image_file_set(pLockIcon,
- edj_path,
- VIDEO_LIST_VIEW_ICON_PERSONAL_LOCK);
+ edj_path,
+ VIDEO_LIST_VIEW_ICON_PERSONAL_LOCK);
evas_object_size_hint_align_set(pLockIcon,
- EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(pLockIcon,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pLockIcon, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
evas_object_show(pLockIcon);
return pLockIcon;
} else {
if (bRet) {
Evas_Object *pDropboxIcon = elm_image_add(pObject);
elm_image_file_set(pDropboxIcon,
- edj_path,
- VIDEO_LIST_VIEW_ICON_DROPBOX);
+ edj_path, VIDEO_LIST_VIEW_ICON_DROPBOX);
evas_object_size_hint_align_set(pDropboxIcon,
- EVAS_HINT_FILL, EVAS_HINT_FILL);
+ EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pDropboxIcon,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
evas_object_show(pDropboxIcon);
return pDropboxIcon;
} else {
Evas_Object *pCheckBox = elm_check_add(pObject);
elm_object_style_set(pCheckBox, "default");
elm_check_state_pointer_set(pCheckBox,
- (Eina_Bool *)&(g_pShareViaHandle->pCheckedItemsEditList
- [nVideoItemIndex]));
+ (Eina_Bool *) & (g_pShareViaHandle->
+ pCheckedItemsEditList
+ [nVideoItemIndex]));
evas_object_show(pCheckBox);
#endif
Evas_Object *mp_share_view_get_icon_of_video_item_cb(const void *pUserData,
- Evas_Object *pObject, const char *pPart)
+ Evas_Object * pObject,
+ const char *pPart)
{
- int nVideoItemIndex = (int)pUserData;
+ int nVideoItemIndex = (int) pUserData;
Evas_Object *pLayout = NULL;
if (!strcmp(pPart, "elm.icon.1")) {
pLayout = elm_layout_add(pObject);
- char *pThumbIconUri = mp_util_svc_get_video_thumbnail(
- nVideoItemIndex);
+ char *pThumbIconUri =
+ mp_util_svc_get_video_thumbnail(nVideoItemIndex);
Evas_Object *pBg = NULL;
if (!pThumbIconUri || !vp_file_exists(pThumbIconUri)) {
}
pBg = mp_util_create_preload_image(pLayout, pThumbIconUri,
- VIDEO_ICON_WIDTH);
+ VIDEO_ICON_WIDTH);
if (pBg)
evas_object_show(pBg);
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_CUSTOM_THEME);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_CUSTOM_THEME);
free(path);
elm_layout_file_set(pLayout, edj_path,
- "listview.thumbnail.layout");
+ "listview.thumbnail.layout");
elm_layout_content_set(pLayout, "elm.thumbnail.icon", pBg);
MP_FREE_STRING(pThumbIconUri);
- int nLastPlayedTime = mp_util_svc_get_video_last_played_pos(
- nVideoItemIndex);
- int nDurationTime = mp_util_svc_get_video_duration_time(
- nVideoItemIndex);
+ int nLastPlayedTime =
+ mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
+ int nDurationTime =
+ mp_util_svc_get_video_duration_time(nVideoItemIndex);
if (nLastPlayedTime > 0) {
double nRatio = 0.0;
if (nDurationTime > 0) {
- nRatio = ((double)nLastPlayedTime) /
- ((double)nDurationTime);
+ nRatio = ((double) nLastPlayedTime) /
+ ((double) nDurationTime);
}
if (nRatio < 0.05) {
nRatio = 0.05;
}
- Evas_Object *pProgressBar = elm_progressbar_add(
- pLayout);
+ Evas_Object *pProgressBar = elm_progressbar_add(pLayout);
elm_object_style_set(pProgressBar,
- "elm/progressbar/horizontal/default");
- elm_progressbar_horizontal_set(pProgressBar,
- EINA_TRUE);
+ "elm/progressbar/horizontal/default");
+ elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
elm_progressbar_span_size_set(pProgressBar,
- VIDEO_LIST_PROGRESSBAR_LENGTH);
+ VIDEO_LIST_PROGRESSBAR_LENGTH);
evas_object_size_hint_align_set(pProgressBar,
- EVAS_HINT_FILL, EVAS_HINT_FILL);
+ EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pProgressBar,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
elm_progressbar_value_set(pProgressBar, nRatio);
evas_object_show(pProgressBar);
elm_layout_content_set(pLayout, "elm.progress.icon",
- pProgressBar);
+ pProgressBar);
}
if (!mp_util_create_video_sub_icon(pLayout, nVideoItemIndex)) {
- VideoLogWarning("Create sub icon is failed.",
- nVideoItemIndex);
+ VideoLogWarning("Create sub icon is failed.", nVideoItemIndex);
}
return pLayout;
Evas_Object *pCheckBox = elm_check_add(pLayout);
elm_layout_theme_set(pLayout, "layout", "list/C/type.2",
- "default");
+ "default");
evas_object_propagate_events_set(pCheckBox, EINA_FALSE);
evas_object_smart_callback_add(pCheckBox, "changed",
- mp_share_view_change_check_box_state_cb, pUserData);
+ mp_share_view_change_check_box_state_cb,
+ pUserData);
elm_check_state_pointer_set(pCheckBox,
- (Eina_Bool *)&(g_pShareViaHandle->pCheckedItemsEditList
- [nVideoItemIndex]));
+ (Eina_Bool *) & (g_pShareViaHandle->
+ pCheckedItemsEditList
+ [nVideoItemIndex]));
evas_object_show(pCheckBox);
- elm_layout_content_set(pLayout, "elm.swallow.content",
- pCheckBox);
+ elm_layout_content_set(pLayout, "elm.swallow.content", pCheckBox);
return pLayout;
}
int mp_share_view_get_sort_type(void)
{
switch (mp_sort_ctrl_get_sort_state()) {
-/*
- case MP_LIST_SORT_BY_RECENTLY_VIEWED:
- g_pShareViaHandle->nSortType =
- MP_MEDIA_SORT_BY_RECENTLY_VIEWED;
- break;
-*/
case MP_LIST_SORT_BY_RECENTLY_ADDED:
g_pShareViaHandle->nSortType = MP_MEDIA_SORT_BY_RECENTLY_ADDED;
g_pShareViaHandle->nSortType = MP_MEDIA_SORT_BY_NAME;
break;
-/*
- case MP_LIST_SORT_BY_SIZE:
- g_pShareViaHandle->nSortType = MP_MEDIA_SORT_BY_SIZE;
- break;
-
- case MP_LIST_SORT_BY_TYPE:
- g_pShareViaHandle->nSortType = MP_MEDIA_SORT_BY_TYPE;
- break;
-*/
}
return g_pShareViaHandle->nSortType;
#ifdef VS_FEATURE_THUMBNAIL_VIEW
static void __mp_share_view_append_grid_items(void *pObjVideosList,
- int nGenItemIndex)
+ int nGenItemIndex)
{
if (!g_pShareViaHandle) {
VideoLogInfo("invalid handle");
g_pShareViaHandle->pGenGridItc_1 = elm_gengrid_item_class_new();
g_pShareViaHandle->pGenGridItc_1->item_style = "video/album_grid";
g_pShareViaHandle->pGenGridItc_1->func.text_get =
- (void *)__mp_share_view_get_label_of_grid_item_cb;
+ (void *) __mp_share_view_get_label_of_grid_item_cb;
g_pShareViaHandle->pGenGridItc_1->func.content_get =
- (void *)__mp_share_view_get_grid_icon_cb;
+ (void *) __mp_share_view_get_grid_icon_cb;
g_pShareViaHandle->pGenGridItc_1->func.state_get = NULL;
g_pShareViaHandle->pGenGridItc_1->func.del = NULL;
- int nCount = (mp_rotate_ctrl_check_landspace_by_win(
- (Evas_Object *)mp_util_get_main_window_handle()) ?
- VP_GENLIST_THUMB_LANDSPACE_COUNT :
- VP_GENLIST_THUMB_PORTRAIT_COUNT);
+ int nCount = (mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
+ mp_util_get_main_window_handle
+ ()) ?
+ VP_GENLIST_THUMB_LANDSPACE_COUNT :
+ VP_GENLIST_THUMB_PORTRAIT_COUNT);
int nIndex = nGenItemIndex * nCount;
int nMaxIndex = nIndex + nCount;
int nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
Elm_Object_Item *gridItem = NULL;
for (; (nIndex < nMaxIndex) && (nIndex < nVideoListSize); nIndex++) {
- gridItem = elm_gengrid_item_append(pObjVideosList, g_pShareViaHandle->pGenGridItc_1, (void *)nIndex, __mp_share_view_select_grid_item_cb, (void *)nIndex);
- elm_gengrid_item_select_mode_set(gridItem, ELM_OBJECT_SELECT_MODE_ALWAYS);
- elm_object_item_data_set(gridItem, (void *)nIndex);
+ gridItem =
+ elm_gengrid_item_append(pObjVideosList,
+ g_pShareViaHandle->pGenGridItc_1,
+ (void *) nIndex,
+ __mp_share_view_select_grid_item_cb,
+ (void *) nIndex);
+ elm_gengrid_item_select_mode_set(gridItem,
+ ELM_OBJECT_SELECT_MODE_ALWAYS);
+ elm_object_item_data_set(gridItem, (void *) nIndex);
}
}
-static Evas_Object *__mp_share_view_create_gengrid(Evas_Object *parent,
- int nWidth, int nHeight)
+static Evas_Object *__mp_share_view_create_gengrid(Evas_Object * parent,
+ int nWidth, int nHeight)
{
Evas_Object *pGengrid;
pGengrid = elm_gengrid_add(parent);
if (!pGengrid) {
VideoLogError("pVideoGrid is not existed.");
- return NULL;
+ return NULL;
}
evas_object_size_hint_weight_set(pGengrid, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pGengrid, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
elm_gengrid_item_size_set(pGengrid, nWidth, nHeight);
elm_gengrid_align_set(pGengrid, 0.0, 0.0);
elm_gengrid_horizontal_set(pGengrid, EINA_TRUE);
int winHeight = 0;
int winWidth = 0;
elm_win_screen_size_get(mp_util_get_main_window_handle(), NULL, NULL,
- &winWidth, &winHeight);
+ &winWidth, &winHeight);
- bool bLandscape = mp_rotate_ctrl_check_landspace_by_win(
- (Evas_Object *)mp_util_get_main_window_handle());
+ bool bLandscape = mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
+ mp_util_get_main_window_handle
+ ());
if (bLandscape) {
*width = winHeight / VP_GENLIST_THUMB_LANDSPACE_COUNT;
} else {
*height = VP_ALBUM_THUMB_ICON_HEIGHT * MP_SCALE;
}
-static Evas_Object *__mp_share_view_get_icon_of_grid_cb(const void *pUserData,
- Evas_Object *pObject, const char *pPart)
+static Evas_Object *__mp_share_view_get_icon_of_grid_cb(const void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char *pPart)
{
if (!g_pShareViaHandle || !pObject) {
VideoLogError("g_pMainViewWidgetOfShareList is NULL");
return NULL;
}
- int nGenItemIndex = (int)pUserData;
+ int nGenItemIndex = (int) pUserData;
int nHeight = 0;
int nWidth = 0;
mp_share_view_get_icon_dimensions(&nHeight, &nWidth);
Evas_Object *pGengrid = __mp_share_view_create_gengrid(pObject,
- nWidth, nHeight);
+ nWidth,
+ nHeight);
__mp_share_view_append_grid_items(pGengrid, nGenItemIndex);
return pGengrid;
return 0;
}
int nGenlistIndex = 0;
- int nItemCount = (mp_rotate_ctrl_check_landspace_by_win(
- (Evas_Object *)mp_util_get_main_window_handle()) ?
- VP_GENLIST_THUMB_LANDSPACE_COUNT :
- VP_GENLIST_THUMB_PORTRAIT_COUNT);
- nGenlistIndex = nVideoItemIndex/nItemCount;
+ int nItemCount = (mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
+ mp_util_get_main_window_handle
+ ()) ?
+ VP_GENLIST_THUMB_LANDSPACE_COUNT :
+ VP_GENLIST_THUMB_PORTRAIT_COUNT);
+ nGenlistIndex = nVideoItemIndex / nItemCount;
return nGenlistIndex;
}
g_pShareViaHandle->pGenListItc->item_style = "video/1icon.thumbnail";
g_pShareViaHandle->pGenListItc->func.text_get = NULL;
g_pShareViaHandle->pGenListItc->func.content_get =
- (void *)__mp_share_view_get_icon_of_grid_cb;
+ (void *) __mp_share_view_get_icon_of_grid_cb;
g_pShareViaHandle->pGenListItc->func.state_get = NULL;
g_pShareViaHandle->pGenListItc->func.del = NULL;
g_pShareViaHandle->pGenListItc->decorate_item_style = NULL;
"video/1icon.thumbnail.landscape";
g_pShareViaHandle->pGenListLandscapeItc->func.text_get = NULL;
g_pShareViaHandle->pGenListLandscapeItc->func.content_get =
- (void *)__mp_share_view_get_icon_of_grid_cb;
+ (void *) __mp_share_view_get_icon_of_grid_cb;
g_pShareViaHandle->pGenListLandscapeItc->func.state_get = NULL;
g_pShareViaHandle->pGenListLandscapeItc->func.del = NULL;
g_pShareViaHandle->pGenListLandscapeItc->decorate_item_style = NULL;
int nGenlistRow = 0;
- nGenlistRow = mp_share_view_thumbnail_to_genlist_index(
- nVideoListSize - 1);
+ nGenlistRow =
+ mp_share_view_thumbnail_to_genlist_index(nVideoListSize - 1);
- if (mp_rotate_ctrl_check_landspace_by_win(
- (Evas_Object *)mp_util_get_main_window_handle())) {
+ if (mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
+ mp_util_get_main_window_handle
+ ())) {
for (nIndex = 0; nIndex <= nGenlistRow; nIndex++) {
- elm_genlist_item_append(pGenlist,
- g_pShareViaHandle->pGenListLandscapeItc,
- (void *)nIndex,
- NULL,
- ELM_GENLIST_ITEM_NONE,
- NULL,
- NULL);
+ elm_genlist_item_append(pGenlist,
+ g_pShareViaHandle->
+ pGenListLandscapeItc, (void *) nIndex,
+ NULL, ELM_GENLIST_ITEM_NONE, NULL,
+ NULL);
}
} else {
for (nIndex = 0; nIndex <= nGenlistRow; nIndex++) {
- elm_genlist_item_append(pGenlist,
- g_pShareViaHandle->pGenListItc,
- (void *)nIndex,
- NULL,
- ELM_GENLIST_ITEM_NONE,
- NULL,
- NULL);
+ elm_genlist_item_append(pGenlist,
+ g_pShareViaHandle->pGenListItc,
+ (void *) nIndex,
+ NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
}
}
return TRUE;
}
-static void __mp_share_via_view_rotate_cb(void *data, Evas_Object *obj,
- void *event_info)
+static void __mp_share_via_view_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
if (!g_pShareViaHandle) {
VideoLogError("__mp_share_via_view_rotate_cb IS null");
return;
}
- bool bLandscape = mp_rotate_ctrl_check_landspace_by_win(
- (Evas_Object *)mp_util_get_main_window_handle());
+ bool bLandscape = mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
+ mp_util_get_main_window_handle
+ ());
if (bLandscape) {
VideoLogInfo("Landscape mode");
g_pShareViaHandle->bLandscape = true;
g_pShareViaHandle->bLandscape = false;
}
__mp_share_view_arrange_video_list(g_pShareViaHandle->pObjVideosList,
- TRUE);
+ TRUE);
mp_share_view_change_title_info();
}
#endif
}
int nIndex = 0;
- int nVideoListSize =
- mp_util_svc_get_number_of_video_item_by_type();
+ int nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
MP_DEL_ITC(g_pShareViaHandle->pGenListItc);
g_pShareViaHandle->pGenListItc = elm_genlist_item_class_new();
-/*
- g_pShareViaHandle->pGenListItc->item_style = "video/edit_list";
-*/
g_pShareViaHandle->pGenListItc->item_style = "2line.top";
g_pShareViaHandle->pGenListItc->func.text_get =
- (void *)mp_share_view_get_label_of_video_item_cb;
+ (void *) mp_share_view_get_label_of_video_item_cb;
g_pShareViaHandle->pGenListItc->func.content_get =
- (void *)mp_share_view_get_icon_of_video_item_cb;
+ (void *) mp_share_view_get_icon_of_video_item_cb;
g_pShareViaHandle->pGenListItc->func.state_get = NULL;
g_pShareViaHandle->pGenListItc->func.del = NULL;
-/*
- g_pShareViaHandle->pGenListItc->decorate_item_style = "mode/slide4";
- g_pShareViaHandle->pGenListItc->decorate_all_item_style =
- "edit_default";
-*/
for (nIndex = 0; nIndex < nVideoListSize; nIndex++) {
elm_genlist_item_append(pObjVideosList,
- g_pShareViaHandle->pGenListItc, (void *)nIndex, NULL,
- ELM_GENLIST_ITEM_NONE,
- mp_share_view_select_video_item_cb, NULL);
+ g_pShareViaHandle->pGenListItc,
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ mp_share_view_select_video_item_cb, NULL);
}
}
if (nTotalSize > 0) {
g_pShareViaHandle->pCheckedItemsEditList =
- (bool *)malloc(sizeof(bool)*nTotalSize);
+ (bool *) malloc(sizeof(bool) * nTotalSize);
memset(g_pShareViaHandle->pCheckedItemsEditList, 0,
- sizeof(bool)*nTotalSize);
+ sizeof(bool) * nTotalSize);
}
g_pShareViaHandle->bSelectallCheckBoxState = FALSE;
}
-bool __mp_share_view_arrange_video_list(void *pObjVideosList, bool bNeedSvc)
+bool __mp_share_view_arrange_video_list(void *pObjVideosList,
+ bool bNeedSvc)
{
if (!g_pShareViaWidget || !g_pShareViaHandle) {
VideoLogError("No exist g_pShareViaListViewWidget.");
if ((nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) &&
(g_pShareViaHandle->pFolderPath)) {
VideoSecureLogInfo("szFolderPath : %s",
- g_pShareViaHandle->pFolderPath);
+ g_pShareViaHandle->pFolderPath);
if (g_pShareViaHandle->pFolderPath) {
if (vp_file_exists(g_pShareViaHandle->pFolderPath)) {
/* update video-list */
VideoLogInfo("update delete item");
mp_util_svc_destory_video_item_list();
- mp_util_svc_extract_video_list_from_folder(
- g_pShareViaHandle->pFolderPath,
- nSortType,
- MP_LIST_VIEW_PHONE);
+ mp_util_svc_extract_video_list_from_folder
+ (g_pShareViaHandle->pFolderPath, nSortType,
+ MP_LIST_VIEW_PHONE);
#ifdef ENABLE_DRM_FEATURE
mp_util_svc_filter_drm_video_item_list();
#endif
if (bNeedSvc) {
-/*
- __mp_share_view_update_selected_video_list();
-*/
} else {
mp_share_view_set_value(nVideoListSize);
}
} else {
VideoLogInfo("popup folder item");
- elm_naviframe_item_pop(
- g_pShareViaHandle->pNaviFrameHandle);
+ elm_naviframe_item_pop(g_pShareViaHandle->
+ pNaviFrameHandle);
return FALSE;
}
}
} else {
mp_util_svc_destory_video_item_list();
mp_util_svc_extract_video_list_by_item_type(nSortType,
- MP_LIST_VIEW_PHONE);
+ MP_LIST_VIEW_PHONE);
#ifdef ENABLE_DRM_FEATURE
mp_util_svc_filter_drm_video_item_list();
#endif
if (bNeedSvc) {
- /* __mp_share_view_update_selected_video_list(); */
} else {
mp_share_view_set_value(nVideoListSize);
}
evas_object_del(g_pShareViaWidget->pChareViaViewBaselayout);
g_pShareViaWidget->pChareViaViewBaselayout = NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_REMOVE_LIST_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_REMOVE_LIST_EDJ);
free(path);
g_pShareViaWidget->pChareViaViewBaselayout = elm_layout_add(pParent);
elm_layout_file_set(g_pShareViaWidget->pChareViaViewBaselayout,
- edj_path,
- REMOVE_LIST_EDJ_GROUP);
- evas_object_size_hint_weight_set(
- g_pShareViaWidget->pChareViaViewBaselayout,
- EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(
- g_pShareViaWidget->pChareViaViewBaselayout,
- EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ edj_path, REMOVE_LIST_EDJ_GROUP);
+ evas_object_size_hint_weight_set(g_pShareViaWidget->
+ pChareViaViewBaselayout,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(g_pShareViaWidget->
+ pChareViaViewBaselayout,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
return g_pShareViaWidget->pChareViaViewBaselayout;
}
return FALSE;
}
- if (!g_pShareViaHandle->nSelectCounterForEditList ||
- nSelectedSize < 1) {
+ if (!g_pShareViaHandle->nSelectCounterForEditList || nSelectedSize < 1) {
return FALSE;
}
int nCounter = 0;
char *pMediaId = NULL;
- g_pShareViaHandle->pSelectedList = (char **)calloc(sizeof(char*),
- nSelectedSize);
+ g_pShareViaHandle->pSelectedList = (char **) calloc(sizeof(char *),
+ nSelectedSize);
VideoLogInfo("current edit size===%d", nSelectedSize);
for (nCounter = 0; nCounter < nVideoListSize; nCounter++) {
return TRUE;
}
-/*
-static void __mp_share_view_update_select_all(void)
-{
- if (!g_pShareViaHandle || !g_pShareViaWidget) {
- VideoLogError("Main handles of list view are not existed.");
- return;
- }
-
- int nVideoListSize = 0;
- nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
-
- if (nVideoListSize == g_pShareViaHandle->nSelectCounterForEditList) {
- VideoLogInfo("All check box of edit list state are true.");
- g_pShareViaHandle->bSelectallCheckBoxState = TRUE;
- }
- else
- {
- g_pShareViaHandle->bSelectallCheckBoxState = FALSE;
- }
-
- VideoLogInfo("nVideoListSize=%d,nSelectCounterForEditList=%d",
- nVideoListSize, g_pShareViaHandle->nSelectCounterForEditList);
- elm_check_state_set(g_pShareViaWidget->pSelectallbtn,
- g_pShareViaHandle->bSelectallCheckBoxState);
-}
-
-static void __mp_share_view_update_selected_video_list(void)
-{
- if (!g_pShareViaHandle || !g_pShareViaWidget) {
- VideoLogError("Main handles of list view are not existed.");
- return;
- }
-
- int nVideoListSize = 0;
-
- if (LIST_TAB_TYPE_PERSONAL != g_pShareViaHandle->eTabType) {
- return;
- }
-
- MpMediaType eMediaType = MEDIA_TYPE_FILE;
-
- nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
- mp_share_view_set_value(nVideoListSize);
-
- int nIndex = 0;
- int nCounter = 0;
- bool bValidMedia = FALSE;
- int nTotal = g_pShareViaHandle->nSelectCounterForEditList;
- VideoLogInfo("OldEditList = %d", nTotal);
- g_pShareViaHandle->nSelectCounterForEditList = 0;
-
- if (!g_pShareViaHandle->pSelectedList) {
- return;
- }
-
- while ((nIndex < nTotal) && g_pShareViaHandle->pSelectedList[nIndex]) {
-
- bValidMedia = mp_util_svc_check_valid_media_id(
- g_pShareViaHandle->pSelectedList[nIndex], eMediaType,
- &nCounter);
- if (bValidMedia) {
- g_pShareViaHandle->pCheckedItemsEditList[nCounter] =
- TRUE;
- g_pShareViaHandle->nSelectCounterForEditList++;
- }
- nIndex++;
- }
-
- __mp_share_view_update_select_all();
-
- mp_share_view_change_title_info();
-
- if (g_pShareViaHandle->nSelectCounterForEditList > 0)
- elm_object_disabled_set(g_pShareViaWidget->pSavebtn,
- EINA_FALSE);
- else
- elm_object_disabled_set(g_pShareViaWidget->pSavebtn,
- EINA_TRUE);
-
-}
-*/
-
static void __mp_share_view_db_changed_cb(void *pUserData)
{
return;
}
bool bNormalShow = TRUE;
- bNormalShow = __mp_share_view_arrange_video_list(
- g_pShareViaHandle->pObjVideosList, TRUE);
+ bNormalShow =
+ __mp_share_view_arrange_video_list(g_pShareViaHandle->
+ pObjVideosList, TRUE);
if (!bNormalShow) {
VideoLogError("invalid view");
return;
Elm_Object_Item *pItem = NULL;
#ifdef VS_FEATURE_THUMBNAIL_VIEW
if (g_pShareViaHandle->bThumbnailView) {
- pItem = elm_gengrid_first_item_get(
- g_pShareViaHandle->pObjVideosList);
+ pItem =
+ elm_gengrid_first_item_get(g_pShareViaHandle->pObjVideosList);
if (pItem) {
- elm_gengrid_item_bring_in(pItem,
- ELM_GENGRID_ITEM_SCROLLTO_IN);
+ elm_gengrid_item_bring_in(pItem, ELM_GENGRID_ITEM_SCROLLTO_IN);
}
} else
#endif
{
- pItem = elm_genlist_first_item_get(
- g_pShareViaHandle->pObjVideosList);
+ pItem =
+ elm_genlist_first_item_get(g_pShareViaHandle->pObjVideosList);
if (pItem) {
- elm_genlist_item_bring_in(pItem,
- ELM_GENLIST_ITEM_SCROLLTO_IN);
+ elm_genlist_item_bring_in(pItem, ELM_GENLIST_ITEM_SCROLLTO_IN);
}
}
}
VideoLogError("Main handles of list view are not existed.");
return;
}
- __mp_share_view_get_selected_video_list(
- g_pShareViaHandle->nSelectCounterForEditList);
+ __mp_share_view_get_selected_video_list(g_pShareViaHandle->
+ nSelectCounterForEditList);
}
-static void __mp_share_select_all_layout_down_cb(void *data, Evas *evas,
- Evas_Object *obj, void *event_info)
+static void __mp_share_select_all_layout_down_cb(void *data, Evas * evas,
+ Evas_Object * obj,
+ void *event_info)
{
if (!g_pShareViaHandle || !g_pShareViaWidget) {
VideoLogError("Main handles of list view are not existed.");
int nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
VideoLogInfo("nVideoListSize : %d", nVideoListSize);
- Evas_Object *check = elm_object_part_content_get(
- g_pShareViaWidget->pSelAllLayout, "elm.icon");
+ Evas_Object *check =
+ elm_object_part_content_get(g_pShareViaWidget->pSelAllLayout,
+ "elm.icon");
Eina_Bool state = elm_check_state_get(check);
if (nVideoListSize <= VIDEO_SHARE_ITEM_MAX) {
VideoLogError("pChareViaViewBaselayout is not existed.");
return;
}
- evas_object_event_callback_add(
- g_pShareViaWidget->pChareViaViewBaselayout,
- EVAS_CALLBACK_DEL,
- __mp_share_view_base_layout_del_cb,
- NULL);
+ evas_object_event_callback_add(g_pShareViaWidget->
+ pChareViaViewBaselayout,
+ EVAS_CALLBACK_DEL,
+ __mp_share_view_base_layout_del_cb,
+ NULL);
- g_pShareViaWidget->pVideoListBox = elm_box_add(
- g_pShareViaWidget->pChareViaViewBaselayout);
+ g_pShareViaWidget->pVideoListBox =
+ elm_box_add(g_pShareViaWidget->pChareViaViewBaselayout);
if (!g_pShareViaWidget->pVideoListBox) {
VideoLogError("pVideoListBox is not existed.");
return;
}
evas_object_size_hint_weight_set(g_pShareViaWidget->pVideoListBox,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(g_pShareViaWidget->pVideoListBox,
- EVAS_HINT_FILL, EVAS_HINT_FILL);
-
- mp_widget_ctrl_create_select_all_layout(
- g_pShareViaWidget->pVideoListBox,
- __mp_share_view_select_all_change_check_box_cb,
- __mp_share_select_all_layout_down_cb,
- (void *)g_pShareViaWidget,
- &g_pShareViaWidget->pSelectallbtn,
- &g_pShareViaWidget->pSelAllLayout);
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+ mp_widget_ctrl_create_select_all_layout(g_pShareViaWidget->
+ pVideoListBox,
+ __mp_share_view_select_all_change_check_box_cb,
+ __mp_share_select_all_layout_down_cb,
+ (void *) g_pShareViaWidget,
+ &g_pShareViaWidget->
+ pSelectallbtn,
+ &g_pShareViaWidget->
+ pSelAllLayout);
if (!g_pShareViaWidget->pSelAllLayout) {
VideoLogError("pSelAllLayout is not existed.");
}
elm_box_pack_start(g_pShareViaWidget->pVideoListBox,
- g_pShareViaWidget->pSelAllLayout);
+ g_pShareViaWidget->pSelAllLayout);
#ifdef VS_FEATURE_THUMBNAIL_VIEW
if (g_pShareViaHandle->bThumbnailView) {
- g_pShareViaHandle->pObjVideosList = elm_genlist_add(
- g_pShareViaWidget->pVideoListBox);
+ g_pShareViaHandle->pObjVideosList =
+ elm_genlist_add(g_pShareViaWidget->pVideoListBox);
if (!g_pShareViaHandle->pObjVideosList) {
VideoLogError("pObjVideosList does not exist.");
return;
}
elm_scroller_bounce_set(g_pShareViaHandle->pObjVideosList,
- EINA_FALSE, EINA_TRUE);
- evas_object_size_hint_weight_set(
- g_pShareViaHandle->pObjVideosList, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(
- g_pShareViaHandle->pObjVideosList, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EINA_FALSE, EINA_TRUE);
+ evas_object_size_hint_weight_set(g_pShareViaHandle->pObjVideosList,
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(g_pShareViaHandle->pObjVideosList,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_genlist_block_count_set(g_pShareViaHandle->pObjVideosList,
- VIDEO_GENLIST_BLOCK_COUNT);
+ VIDEO_GENLIST_BLOCK_COUNT);
elm_genlist_homogeneous_set(g_pShareViaHandle->pObjVideosList,
- EINA_TRUE);
+ EINA_TRUE);
elm_genlist_mode_set(g_pShareViaHandle->pObjVideosList,
- ELM_LIST_COMPRESS);
+ ELM_LIST_COMPRESS);
} else
#endif
{
- g_pShareViaHandle->pObjVideosList = elm_genlist_add(
- g_pShareViaWidget->pVideoListBox);
+ g_pShareViaHandle->pObjVideosList =
+ elm_genlist_add(g_pShareViaWidget->pVideoListBox);
if (!g_pShareViaHandle->pObjVideosList) {
VideoLogError("pObjVideosList is not existed.");
return;
}
- evas_object_size_hint_weight_set(
- g_pShareViaHandle->pObjVideosList,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(
- g_pShareViaHandle->pObjVideosList,
- EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(g_pShareViaHandle->pObjVideosList,
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(g_pShareViaHandle->pObjVideosList,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_genlist_block_count_set(g_pShareViaHandle->pObjVideosList,
- VIDEO_GENLIST_BLOCK_COUNT);
+ VIDEO_GENLIST_BLOCK_COUNT);
elm_genlist_homogeneous_set(g_pShareViaHandle->pObjVideosList,
- EINA_TRUE);
+ EINA_TRUE);
elm_genlist_mode_set(g_pShareViaHandle->pObjVideosList,
- ELM_LIST_COMPRESS);
+ ELM_LIST_COMPRESS);
}
elm_box_pack_end(g_pShareViaWidget->pVideoListBox,
- g_pShareViaHandle->pObjVideosList);
+ g_pShareViaHandle->pObjVideosList);
elm_object_part_content_set(g_pShareViaWidget->pChareViaViewBaselayout,
- SWALLOW_LISTVIEW_CONTENT, g_pShareViaWidget->pVideoListBox);
+ SWALLOW_LISTVIEW_CONTENT,
+ g_pShareViaWidget->pVideoListBox);
bool bNormalShow = TRUE;
- bNormalShow = __mp_share_view_arrange_video_list(
- g_pShareViaHandle->pObjVideosList, FALSE);
+ bNormalShow =
+ __mp_share_view_arrange_video_list(g_pShareViaHandle->
+ pObjVideosList, FALSE);
if (!bNormalShow) {
VideoLogError("invalid view");
return;
}
char *szTitle = g_strdup_printf(VIDEOS_SELECTVIEW_HEADER_PD_SELECTED,
- g_pShareViaHandle->nSelectCounterForEditList);
-
- g_pShareViaHandle->pNaviFrameItem = elm_naviframe_item_push(
- g_pShareViaHandle->pNaviFrameHandle, szTitle, NULL, NULL,
- g_pShareViaWidget->pChareViaViewBaselayout, NULL);
- elm_object_item_domain_text_translatable_set(
- g_pShareViaHandle->pNaviFrameItem, VIDEOS_STRING, EINA_TRUE);
+ g_pShareViaHandle->
+ nSelectCounterForEditList);
+
+ g_pShareViaHandle->pNaviFrameItem =
+ elm_naviframe_item_push(g_pShareViaHandle->pNaviFrameHandle,
+ szTitle, NULL, NULL,
+ g_pShareViaWidget->pChareViaViewBaselayout,
+ NULL);
+ elm_object_item_domain_text_translatable_set(g_pShareViaHandle->
+ pNaviFrameItem,
+ VIDEOS_STRING, EINA_TRUE);
elm_naviframe_item_pop_cb_set(g_pShareViaHandle->pNaviFrameItem,
- mp_share_view_back_btn_cb, g_pShareViaHandle);
+ mp_share_view_back_btn_cb,
+ g_pShareViaHandle);
elm_naviframe_item_title_enabled_set(g_pShareViaHandle->pNaviFrameItem,
- EINA_TRUE, EINA_FALSE);
+ EINA_TRUE, EINA_FALSE);
evas_object_smart_callback_add(g_pShareViaHandle->pNaviFrameHandle,
- "transition,finished",
- mp_share_view_naviframe_transition_effect_cb, NULL);
+ "transition,finished",
+ mp_share_view_naviframe_transition_effect_cb,
+ NULL);
-/*
- g_pShareViaWidget->pCancelbtn = mp_widget_ctrl_create_navi_left_btn(
- g_pShareViaHandle->pNaviFrameHandle,
- g_pShareViaHandle->pNaviFrameItem,
- NULL,
- __mp_share_view_show_cancel_cb,
- (void *)g_pShareViaHandle);
- g_pShareViaWidget->pSavebtn = mp_widget_ctrl_create_navi_right_btn(
- g_pShareViaHandle->pNaviFrameHandle,
- g_pShareViaHandle->pNaviFrameItem,
- NULL, __mp_share_view_show_share_via_panel_cb,
- (void *)g_pShareViaHandle);
-*/
- g_pShareViaWidget->pCancelbtn = elm_button_add(
- g_pShareViaHandle->pNaviFrameHandle);
- elm_object_style_set(g_pShareViaWidget->pCancelbtn, "naviframe/title_left");
- //elm_object_text_set(g_pShareViaWidget->pCancelbtn,
- // VIDEOS_SHAREVIEW_CANCEL_IDS);
+ g_pShareViaWidget->pCancelbtn =
+ elm_button_add(g_pShareViaHandle->pNaviFrameHandle);
+ elm_object_style_set(g_pShareViaWidget->pCancelbtn,
+ "naviframe/title_left");
mp_util_set_translate_str(g_pShareViaWidget->pCancelbtn,
- "IDS_TPLATFORM_ACBUTTON_CANCEL_ABB");
+ "IDS_TPLATFORM_ACBUTTON_CANCEL_ABB");
elm_object_signal_callback_add(g_pShareViaWidget->pCancelbtn,
- "elm,action,click", "", __mp_share_view_show_cancel_cb,
- (void *)g_pShareViaHandle);
+ "elm,action,click", "",
+ __mp_share_view_show_cancel_cb,
+ (void *) g_pShareViaHandle);
elm_object_item_part_content_set(g_pShareViaHandle->pNaviFrameItem,
- "title_left_btn", g_pShareViaWidget->pCancelbtn);
+ "title_left_btn",
+ g_pShareViaWidget->pCancelbtn);
evas_object_show(g_pShareViaWidget->pCancelbtn);
/* Title Done layout */
- g_pShareViaWidget->pSavebtn = elm_button_add(
- g_pShareViaHandle->pNaviFrameHandle);
- elm_object_style_set(g_pShareViaWidget->pSavebtn, "naviframe/title_right");
- //elm_object_text_set(g_pShareViaWidget->pSavebtn,
- // VIDEOS_SHAREVIEW_DONE_IDS);
+ g_pShareViaWidget->pSavebtn =
+ elm_button_add(g_pShareViaHandle->pNaviFrameHandle);
+ elm_object_style_set(g_pShareViaWidget->pSavebtn,
+ "naviframe/title_right");
mp_util_set_translate_str(g_pShareViaWidget->pSavebtn,
- "IDS_TPLATFORM_ACBUTTON_DONE_ABB");
+ "IDS_TPLATFORM_ACBUTTON_DONE_ABB");
elm_object_signal_callback_add(g_pShareViaWidget->pSavebtn,
- "elm,action,click", "",
- __mp_share_view_show_share_via_panel_cb,
- (void *)g_pShareViaHandle);
+ "elm,action,click", "",
+ __mp_share_view_show_share_via_panel_cb,
+ (void *) g_pShareViaHandle);
elm_object_item_part_content_set(g_pShareViaHandle->pNaviFrameItem,
- "title_right_btn", g_pShareViaWidget->pSavebtn);
+ "title_right_btn",
+ g_pShareViaWidget->pSavebtn);
evas_object_show(g_pShareViaWidget->pSavebtn);
elm_object_disabled_set(g_pShareViaWidget->pSavebtn, EINA_TRUE);
evas_object_show(g_pShareViaWidget->pChareViaViewBaselayout);
mp_util_db_set_update_fun(g_pShareViaHandle->euLev,
- __mp_share_view_db_changed_cb);
+ __mp_share_view_db_changed_cb);
mp_util_db_set_backup_fun(g_pShareViaHandle->euLev,
- __mp_share_view_db_backup_cb);
+ __mp_share_view_db_backup_cb);
MP_FREE_STRING(szTitle);
mp_util_hide_indicator();
}
void mp_share_view_push(void *pNaviFrame,
- ChangeListShareViewCbFunc pChangeViewCb, char *pFolderPath,
- MpVideoListTabType eTabType)
+ ChangeListShareViewCbFunc pChangeViewCb,
+ char *pFolderPath, MpVideoListTabType eTabType)
{
VideoLogInfo("");
if (g_pShareViaHandle || g_pShareViaWidget) {
mp_share_view_destroy();
}
- g_pShareViaHandle = (st_VideoListShareViaViewHandle *)calloc(1,
- sizeof(st_VideoListShareViaViewHandle));
- g_pShareViaWidget = (st_VideoListShareViaViewWidget *)calloc(1,
- sizeof(st_VideoListShareViaViewWidget));
+ g_pShareViaHandle = (st_VideoListShareViaViewHandle *) calloc(1,
+ sizeof
+ (st_VideoListShareViaViewHandle));
+ g_pShareViaWidget =
+ (st_VideoListShareViaViewWidget *) calloc(1,
+ sizeof
+ (st_VideoListShareViaViewWidget));
memset(g_pShareViaHandle, 0, sizeof(st_VideoListShareViaViewHandle));
memset(g_pShareViaWidget, 0, sizeof(st_VideoListShareViaViewWidget));
}
#ifdef VS_FEATURE_THUMBNAIL_VIEW
if ((nViewType == MP_LIST_VIEW_AS_THUMBNAIL_LIST ||
- nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) &&
+ nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) &&
(LIST_TAB_TYPE_PERSONAL == eTabType)) {
g_pShareViaHandle->bThumbnailView = TRUE;
} else {
#endif
mp_share_view_init(g_pShareViaHandle->pNaviFrameHandle);
- evas_object_smart_callback_add(
- (Evas_Object *)mp_util_get_main_window_handle(),
- "wm,rotation,changed", __mp_share_via_view_rotate_cb,
- (void *)g_pShareViaHandle);
+ evas_object_smart_callback_add((Evas_Object *)
+ mp_util_get_main_window_handle(),
+ "wm,rotation,changed",
+ __mp_share_via_view_rotate_cb,
+ (void *) g_pShareViaHandle);
}
void mp_share_view_pop(void)
{
VideoLogInfo("");
- /*
- elm_naviframe_item_pop(g_pShareViaHandle->pNaviFrameHandle);
- */
if (!g_pShareViaHandle) {
VideoLogError("No existed handle of share view.");
return;
static void
-__mp_share_view_base_layout_del_cb(void *pUserData, Evas *e,
- Evas_Object *pObject, void *pEventInfo)
+__mp_share_view_base_layout_del_cb(void *pUserData, Evas * e,
+ Evas_Object * pObject, void *pEventInfo)
{
- /*
- evas_object_event_callback_del(
- g_pShareViaWidget->pChareViaViewBaselayout,
- EVAS_CALLBACK_DEL, __mp_share_view_base_layout_del_cb);
- */
-
__mp_share_view_reset();
}
-
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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-video-list-view-common.h"
void mp_list_common_set_callabcks(void *viewHandle,
- Evas_Smart_Cb
- pGenlistItemtLanguageChangedCb,
- Evas_Smart_Cb pGenlistItemtRealizeCb,
- Evas_Smart_Cb pGenlistItemtPressCb,
- Evas_Smart_Cb pGenlistItemtLongPressCb)
+ Evas_Smart_Cb
+ pGenlistItemtLanguageChangedCb,
+ Evas_Smart_Cb pGenlistItemtRealizeCb,
+ Evas_Smart_Cb pGenlistItemtPressCb,
+ Evas_Smart_Cb pGenlistItemtLongPressCb)
{
st_VideoListViewMainViewHandle *handle =
(st_VideoListViewMainViewHandle *) viewHandle;
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
bool bItemSelected;
- /*start popup*/
+ /*start popup */
Ecore_Idler *pRemoveIdler;
Evas_Object *pRemovePopUpHandle;
Evas_Object *pProgressbar;
Ecore_Timer *pStartDelTimer;
Ecore_Timer *pFinishDelTimer;
int nCompltedDeleteItem;
- /*end popup*/
-#ifdef VS_FEATURE_THUMBNAIL_VIEW /**/
+ /*end popup */
+#ifdef VS_FEATURE_THUMBNAIL_VIEW
bool bLandscape;
#endif
static stFolderView *g_pFolderView = NULL;
static void __mp_folder_view_button_popup_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo);
+ Evas_Object * pObject,
+ void *pEventInfo);
static void __mp_folder_view_delete_popup_handle(void);
void __mp_folder_view_create_no_content()
if (!g_pFolderView->pNocontentlayout) {
g_pFolderView->pNocontentlayout =
- mp_create_nocontent_layout(g_pFolderView->pMainWidget->
- pListViewBaselayout,
- VIDEOS_NOCONTENT_MSG_NO_VIDEOS_IDS,
- VIDEOS_NOCONTENT_MSG_NO_VIDEOS_DESC_IDS);
- elm_object_part_content_unset(g_pFolderView->pMainWidget->
- pListViewBaselayout,
- SWALLOW_LISTVIEW_CONTENT);
+ mp_create_nocontent_layout(g_pFolderView->
+ pMainWidget->pListViewBaselayout,
+ VIDEOS_NOCONTENT_MSG_NO_VIDEOS_IDS,
+ VIDEOS_NOCONTENT_MSG_NO_VIDEOS_DESC_IDS);
+ elm_object_part_content_unset(g_pFolderView->
+ pMainWidget->pListViewBaselayout,
+ SWALLOW_LISTVIEW_CONTENT);
if (g_pFolderView->pVideosGenlist) {
evas_object_hide(g_pFolderView->pVideosGenlist);
}
evas_object_show(g_pFolderView->pMainWidget->pListViewBaselayout);
- elm_object_part_content_set(g_pFolderView->pMainWidget->
- pListViewBaselayout,
- SWALLOW_LISTVIEW_CONTENT,
- g_pFolderView->pNocontentlayout);
+ elm_object_part_content_set(g_pFolderView->
+ pMainWidget->pListViewBaselayout,
+ SWALLOW_LISTVIEW_CONTENT,
+ g_pFolderView->pNocontentlayout);
}
}
if (mp_mgr_get_library_naviframe()) {
int count =
eina_list_count(elm_naviframe_items_get
- (mp_mgr_get_library_naviframe()));
+ (mp_mgr_get_library_naviframe()));
return (count == 1);
}
return FALSE;
VideoLogInfo("");
if (g_pFolderView->pRemovePopUpHandle) {
eext_object_event_callback_del(g_pFolderView->pRemovePopUpHandle,
- EEXT_CALLBACK_BACK,
- __mp_folder_view_button_popup_cb);
+ EEXT_CALLBACK_BACK,
+ __mp_folder_view_button_popup_cb);
}
MP_DEL_TIMER(g_pFolderView->pStartDelTimer);
MP_DEL_TIMER(g_pFolderView->pFinishDelTimer);
}
void mp_folder_view_warning_popup_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
mp_util_svc_destory_video_item_list();
char *szPath = mp_util_svc_get_video_folder_url(nFolderItemIndex);
mp_util_svc_extract_video_list_from_folder(szPath,
- mp_sort_ctrl_get_sort_state
- (), MP_LIST_VIEW_ALL);
+ mp_sort_ctrl_get_sort_state
+ (), MP_LIST_VIEW_ALL);
int nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
MP_FREE_STRING(szPath);
}
static char *mp_folder_view_get_label_of_folder_cb(const void *pUserData,
- Evas_Object *pObject,
- const char *pPart)
+ Evas_Object * pObject,
+ const char *pPart)
{
int nFolderItemIndex = (int) pUserData;
MP_FREE_STRING(szTitle1);
return szTitleUtf8;
- }
- else if (!strcmp(pPart, "elm.text.number")) {
- char szTitle2[10] = {0, };
+ } else if (!strcmp(pPart, "elm.text.number")) {
+ char szTitle2[10] = { 0, };
int nVideoListSize =
mp_folder_view_get_respective_video_no(nFolderItemIndex);
snprintf(szTitle2, 10, "(%d)", nVideoListSize);
return szTitleUtf8;
}
- /*else if (!strcmp(pPart, "elm.text.2")) {
- char *szFolderPath = NULL;
- szFolderPath = mp_util_svc_get_video_folder_url(nFolderItemIndex);
- char *pDes_path = mp_util_get_dir_by_path(szFolderPath);
- MP_FREE_STRING(szFolderPath);
- char *szFolderUtf8 = elm_entry_utf8_to_markup(pDes_path);
- MP_FREE_STRING(pDes_path);
- return szFolderUtf8;
- } */
+
return NULL;
}
static Evas_Object *mp_folder_view_get_icon_of_folder_cb(const void
- *pUserData,
- Evas_Object *
- pObject,
- const char
- *pPart)
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char
+ *pPart)
{
int nFolderItemIndex = (int) pUserData;
VideoLogInfo("Index : %d", nFolderItemIndex);
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_CUSTOM_THEME);
Evas_Object *pBg = NULL;
char *pThumbIconUri =
mp_util_get_folder_thumbnail(nFolderItemIndex,
- mp_sort_ctrl_get_sort_state());
+ mp_sort_ctrl_get_sort_state());
pLayout = elm_layout_add(pObject);
elm_layout_file_set(pLayout, edj_path,
- "listview.thumbnail.layout");
+ "listview.thumbnail.layout");
if (!pThumbIconUri || !vp_file_exists(pThumbIconUri)) {
MP_FREE_STRING(pThumbIconUri);
pBg =
mp_util_create_preload_image(pLayout, pThumbIconUri,
- VIDEO_ICON_WIDTH);
+ VIDEO_ICON_WIDTH);
elm_layout_content_set(pLayout, "elm.thumbnail.icon", pBg);
if (pBg)
evas_object_show(pBg);
if (!mp_util_create_folder_sub_icon(pLayout, nFolderItemIndex)) {
VideoLogWarning
- ("Create sub icon is failed. nFolderItemIndex: %d",
- nFolderItemIndex);
+ ("Create sub icon is failed. nFolderItemIndex: %d",
+ nFolderItemIndex);
}
MP_FREE_STRING(pThumbIconUri);
} else if (!strcmp(pPart, "elm.swallow.icon")) {
char *pThumbIconUri =
mp_util_get_folder_thumbnail(nFolderItemIndex,
- mp_sort_ctrl_get_sort_state());
+ mp_sort_ctrl_get_sort_state());
Evas_Object *thumb = NULL;
int nWidth = 0;
int nHeight = 0;
if (StorageType == MP_MEDIA_TYPE_STORAGE_EXTERNAL) {
Evas_Object *pSdcardIcon = elm_image_add(pObject);
elm_image_file_set(pSdcardIcon, edj_path,
- VIDEO_LIST_VIEW_ICON_FOLDER_SDCARD);
+ VIDEO_LIST_VIEW_ICON_FOLDER_SDCARD);
evas_object_size_hint_align_set(pSdcardIcon, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pSdcardIcon,
- EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
evas_object_show(pSdcardIcon);
return pSdcardIcon;
} else {
}
Evas_Object *mp_folder_view_get_icon_of_no_folder_item_cb(const void
- *pUserData,
- Evas_Object *
- pObject,
- const char
- *pPart)
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char
+ *pPart)
{
VideoSecureLogInfo("");
if (!strcmp(pPart, "elm.icon")) {
int width = NO_ITEM_GENLIST_WIDTH * elm_config_scale_get();
int height = NO_ITEM_GENLIST_HEIGHT * elm_config_scale_get();
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_NO_ITEM_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_NO_ITEM_EDJ);
free(path);
Evas_Object *pNoItemLayout = NULL;
pNoItemLayout = elm_layout_add(pObject);
elm_layout_file_set(pNoItemLayout, edj_path,
- GENLIST_NOITEM_EDJ_GROUP);
+ GENLIST_NOITEM_EDJ_GROUP);
evas_object_size_hint_min_set(pNoItemLayout, width, height);
elm_object_part_text_set(pNoItemLayout,
- SWALLOW_LISTVIEW_NO_ITEM_TEXT,
- VIDEOS_NOCONTENT_MSG_NO_VIDEOS_DESC);
- /*elm_object_domain_translatable_part_text_set(pNoItemLayout, SWALLOW_LISTVIEW_NO_ITEM_TEXT, PACKAGE, VIDEOS_NOCONTENT_MSG_NO_VIDEOS_DESC);*/
+ SWALLOW_LISTVIEW_NO_ITEM_TEXT,
+ VIDEOS_NOCONTENT_MSG_NO_VIDEOS_DESC);
+
evas_object_show(pNoItemLayout);
return pNoItemLayout;
}
}
static void mp_folder_view_gen_select_video_folder_cb(void *pUserData,
- Evas_Object *
- pObject,
- void *pEventInfo)
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
if (!g_pFolderView || !pObject) {
VideoLogWarning
- ("[WARNING] Main handles of list view are not existed.");
+ ("[WARNING] Main handles of list view are not existed.");
return;
}
Elm_Object_Item *pSelectedItem =
VideoLogInfo("pSelectedItem is NULL");
elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
}
- Evas_Object *pPopup = evas_object_data_get(pObject, "popup"); /* Get popup*/
+ Evas_Object *pPopup = evas_object_data_get(pObject, "popup"); /* Get popup */
if (pPopup) {
VideoLogInfo("long press is called");
- return; /* If popup exists, do nothing*/
+ return; /* If popup exists, do nothing */
}
if (!g_pFolderView->fUpdateListItemUserCb) {
return;
}
- if (!pObject) {
- VideoLogWarning("[WARNING] No have pObject");
- return;
- }
-
VideoLogInfo("");
int nFolderItemIndex = 0;
VideoLogInfo("nFolderItemIndex:%d", nFolderItemIndex);
mp_folder_item_view_push((void *) mp_mgr_get_library_naviframe(),
- nFolderItemIndex,
- (UpdateListItemsCbFunc) g_pFolderView->
- fUpdateListItemUserCb);
+ nFolderItemIndex,
+ (UpdateListItemsCbFunc)
+ g_pFolderView->fUpdateListItemUserCb);
}
#ifdef VS_FEATURE_THUMBNAIL_VIEW
static void __mp_folder_view_append_gengrid_items(void *pObjVideosList,
- int nGenItemIndex)
+ int nGenItemIndex)
{
if (!g_pFolderView) {
VideoLogInfo("invalid handle");
Elm_Object_Item *gridItem = NULL;
for (; (nIndex < nMaxIndex) && (nIndex < nVideoListSize); nIndex++) {
elm_gengrid_item_append(pObjVideosList,
- g_pFolderView->pGenGridItc,
- (void *) nIndex,
- mp_folder_view_gen_select_video_folder_cb,
- NULL);
+ g_pFolderView->pGenGridItc,
+ (void *) nIndex,
+ mp_folder_view_gen_select_video_folder_cb,
+ NULL);
elm_object_item_data_set(gridItem, (void *) nIndex);
}
}
-static Evas_Object *__mp_folder_view_create_gengrid(Evas_Object *parent,
- int nWidth,
- int nHeight)
+static Evas_Object *__mp_folder_view_create_gengrid(Evas_Object * parent,
+ int nWidth,
+ int nHeight)
{
Evas_Object *pGengrid;
pGengrid = elm_gengrid_add(parent);
return NULL;
}
evas_object_size_hint_weight_set(pGengrid, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pGengrid, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
elm_gengrid_item_size_set(pGengrid, nWidth, nHeight);
elm_gengrid_align_set(pGengrid, 0.0, 0.0);
elm_gengrid_horizontal_set(pGengrid, EINA_TRUE);
int winHeight = 0;
int winWidth = 0;
elm_win_screen_size_get(mp_util_get_main_window_handle(), NULL, NULL,
- &winWidth, &winHeight);
+ &winWidth, &winHeight);
- bool bLandscape = mp_rotate_ctrl_check_landspace_by_win((Evas_Object*)mp_util_get_main_window_handle());
+ bool bLandscape =
+ mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
+ mp_util_get_main_window_handle
+ ());
if (bLandscape) {
*width = winHeight / VP_GENLIST_THUMB_LANDSPACE_COUNT;
} else {
}
static Evas_Object *__mp_folder_view_get_icon_of_grid_cb(const void
- *pUserData,
- Evas_Object *
- pObject,
- const char
- *pPart)
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char
+ *pPart)
{
VideoLogInfo("in __mp_folder_view_get_icon_of_grid_cb");
if (!g_pFolderView || !pObject) {
g_pFolderView->pFolderList_Itc->decorate_item_style = NULL;
MP_DEL_ITC(g_pFolderView->pFolderListLandscape_Itc);
- g_pFolderView->pFolderListLandscape_Itc =
- elm_genlist_item_class_new();
+ g_pFolderView->pFolderListLandscape_Itc = elm_genlist_item_class_new();
g_pFolderView->pFolderListLandscape_Itc->item_style =
"video/1icon.thumbnail.landscape";
g_pFolderView->pFolderListLandscape_Itc->func.text_get = NULL;
if (mp_rotate_ctrl_check_landspace()) {
for (nIndex = 0; nIndex <= nGenlistRow; nIndex++) {
elm_genlist_item_append(pGenlist,
- g_pFolderView->
- pFolderListLandscape_Itc,
- (void *) nIndex, NULL,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
- /*elm_genlist_item_select_mode_set(pTmpVideoGenlistItem, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);*/
+ g_pFolderView->pFolderListLandscape_Itc,
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
}
} else {
for (nIndex = 0; nIndex <= nGenlistRow; nIndex++) {
elm_genlist_item_append(pGenlist,
- g_pFolderView->pFolderList_Itc,
- (void *) nIndex, NULL,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
- /*elm_genlist_item_select_mode_set(pTmpVideoGenlistItem, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);*/
+ g_pFolderView->pFolderList_Itc,
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
}
}
}
#endif
-/*void mp_folder_view_append_folder_items(void *pVideosGenlist)
-{
- int nIndex = 0;
- int nFolderListSize = 0;
-
- nFolderListSize = mp_util_svc_get_video_folder_size();
- VideoLogInfo("nVideoListSize : %d", nFolderListSize);
-
- if (nFolderListSize > 0)
- {
- MP_DEL_ITC(g_pFolderView->pFolderList_Itc);
- g_pFolderView->pFolderList_Itc = elm_genlist_item_class_new();
- g_pFolderView->pFolderList_Itc->item_style = "2line.top";
- g_pFolderView->pFolderList_Itc->func.text_get = (void*)mp_folder_view_get_label_of_folder_cb;
- g_pFolderView->pFolderList_Itc->func.content_get = (void*)mp_folder_view_get_icon_of_folder_cb;
- g_pFolderView->pFolderList_Itc->func.state_get = NULL;
- g_pFolderView->pFolderList_Itc->func.del = NULL;
- g_pFolderView->pFolderList_Itc->decorate_item_style = NULL;
-
- for (nIndex = 0; nIndex < nFolderListSize; nIndex++)
- {
- VideoLogInfo("nCounter : %d", nIndex);
- elm_genlist_item_append(pVideosGenlist, g_pFolderView->pFolderList_Itc, (void*)nIndex, NULL, ELM_GENLIST_ITEM_NONE, mp_folder_view_gen_select_video_folder_cb, NULL);
- }
- }
-}*/
#ifdef ENABLE_LONGPRESS
static void __mp_folder_view_delete_popup_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
}
static void __mp_folder_view_mouse_back_up_popup_cb(void *pUserData,
- Evas *pEvas,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas * pEvas,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
Evas_Event_Mouse_Up *pEvent = pEventInfo;
if (!pEvent) {
}
#endif
-void __mp_folder_view_key_back_popup_cb(void *pUserData, Evas *pEvas,
- Evas_Object *pObject,
- void *pEventInfo)
+void __mp_folder_view_key_back_popup_cb(void *pUserData, Evas * pEvas,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
Evas_Event_Key_Down *pEvent = pEventInfo;
if (!pEvent) {
#ifdef ENABLE_LONGPRESS
static void __mp_folder_view_remove_video_item(int nVideoItemIndex)
{
- /*int nVideoTotal = mp_util_svc_get_video_list_size_for_checking_index();*/
-
char *szFileUrl = mp_util_svc_get_video_url(nVideoItemIndex);
if (szFileUrl) {
VideoSecureLogInfo("Delete file url : %s", szFileUrl);
static Eina_Bool __mp_folder_view_delete_item_idler_cb(void *pUserData)
{
- int nVideoTotal =
- mp_util_svc_get_video_list_size_for_checking_index();
+ int nVideoTotal = mp_util_svc_get_video_list_size_for_checking_index();
VideoLogInfo("nVideoTotal = %d", nVideoTotal);
- /* int nVideoItemIndex = 0;*/
double nDeleteRate = 0.0;
- __mp_folder_view_remove_video_item(g_pFolderView->
- nCompltedDeleteItem);
+ __mp_folder_view_remove_video_item(g_pFolderView->nCompltedDeleteItem);
g_pFolderView->nCompltedDeleteItem++;
((double) g_pFolderView->nCompltedDeleteItem) /
((double) nVideoTotal);
elm_progressbar_value_set(g_pFolderView->pProgressbar,
- nDeleteRate);
+ nDeleteRate);
}
if (g_pFolderView->nCompltedDeleteItem == nVideoTotal) {
MP_DEL_TIMER(g_pFolderView->pFinishDelTimer);
g_pFolderView->pFinishDelTimer =
ecore_timer_add(0.1, __mp_folder_view_finish_del_timer_cb,
- pUserData);
+ pUserData);
return FALSE;
}
#endif
static void __mp_folder_view_button_popup_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
__mp_folder_view_delete_popup_handle();
}
static void __mp_folder_view_respones_delete_popup_cb(void *pUserData,
- Evas_Object *
- pObject,
- void *pEventInfo)
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
mp_util_delete_popup_handle();
int nFolderItemIndex = (int) pUserData;
if (nFolderItemIndex < 0
- || nFolderItemIndex >= mp_util_svc_get_video_folder_size()) {
+ || nFolderItemIndex >= mp_util_svc_get_video_folder_size()) {
VideoLogError("nFolderItemIndex is invalid");
return;
}
mp_util_svc_get_video_folder_url(nFolderItemIndex);
VideoSecureLogInfo("folder_index : %d, szTmpFolderUrl : %s",
- nFolderItemIndex, szTmpFolderUrl);
+ nFolderItemIndex, szTmpFolderUrl);
mp_util_svc_destory_video_item_list();
if (szTmpFolderUrl) {
mp_util_svc_extract_video_list_from_folder(szTmpFolderUrl,
- MP_MEDIA_SORT_BY_NAME,
- MP_LIST_VIEW_ALL);
+ MP_MEDIA_SORT_BY_NAME,
+ MP_LIST_VIEW_ALL);
} else {
VideoLogError("folder path is NULL");
return;
elm_popup_add(mp_util_get_main_window_handle());
#endif
eext_object_event_callback_add(g_pFolderView->pRemovePopUpHandle,
- EEXT_CALLBACK_BACK,
- __mp_folder_view_button_popup_cb,
- NULL);
- Evas_Object *pLabel =
- elm_label_add(g_pFolderView->pRemovePopUpHandle);
+ EEXT_CALLBACK_BACK,
+ __mp_folder_view_button_popup_cb, NULL);
+ Evas_Object *pLabel = elm_label_add(g_pFolderView->pRemovePopUpHandle);
elm_object_style_set(pLabel, "popup/default");
elm_label_line_wrap_set(pLabel, ELM_WRAP_MIXED);
elm_object_domain_translatable_text_set(pLabel, MP_SYS_STRING,
- VIDEOS_DELETEPOP_MSG_DELETING_IDS);
+ VIDEOS_DELETEPOP_MSG_DELETING_IDS);
evas_object_size_hint_weight_set(pLabel, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(pLabel, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_show(pLabel);
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_POPUP_PROGRESSBAR_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_POPUP_PROGRESSBAR_EDJ);
free(path);
Evas_Object *pPopupLayout =
elm_layout_add(g_pFolderView->pRemovePopUpHandle);
elm_layout_file_set(pPopupLayout, edj_path,
- "popup_center_text_progressview");
+ "popup_center_text_progressview");
evas_object_size_hint_weight_set(pPopupLayout, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
Evas_Object *pProgressbar =
elm_progressbar_add(g_pFolderView->pRemovePopUpHandle);
elm_object_style_set(pProgressbar, "list_progress");
elm_progressbar_horizontal_set(pProgressbar, EINA_TRUE);
evas_object_size_hint_align_set(pProgressbar, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pProgressbar, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
elm_progressbar_value_set(pProgressbar, 0.0);
evas_object_show(pProgressbar);
g_pFolderView->pProgressbar = pProgressbar;
elm_object_part_content_set(pPopupLayout, "elm.swallow.content",
- pLabel);
+ pLabel);
elm_object_part_content_set(pPopupLayout, "elm.swallow.end",
- pProgressbar);
+ pProgressbar);
elm_object_part_text_set(pPopupLayout, "elm.text.subtext1", "");
elm_object_part_text_set(pPopupLayout, "elm.text.subtext2", "");
elm_object_content_set(g_pFolderView->pRemovePopUpHandle,
- pPopupLayout);
+ pPopupLayout);
Evas_Object *pButton =
elm_button_add(g_pFolderView->pRemovePopUpHandle);
elm_object_style_set(pButton, "popup_button/default");
elm_object_domain_translatable_text_set(pButton, VIDEOS_STRING,
- VIDEOS_COMMON_BUTTON_CANCEL_IDS);
+ VIDEOS_COMMON_BUTTON_CANCEL_IDS);
elm_object_part_content_set(g_pFolderView->pRemovePopUpHandle,
- "button1", pButton);
+ "button1", pButton);
evas_object_smart_callback_add(pButton, "clicked",
- __mp_folder_view_button_popup_cb,
- pUserData);
+ __mp_folder_view_button_popup_cb,
+ pUserData);
evas_object_show(g_pFolderView->pRemovePopUpHandle);
g_pFolderView->nCompltedDeleteItem = 0;
MP_DEL_TIMER(g_pFolderView->pStartDelTimer);
g_pFolderView->pStartDelTimer =
ecore_timer_add(0.3, __mp_folder_view_start_del_timer_cb,
- pUserData);
+ pUserData);
}
static void __mp_folder_view_popup_delete_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
mp_option_ctrl_delete_handle();
int nFolderItemIndex = (int) pUserData;
MpListViewAsType type = MP_LIST_VIEW_AS_FOLDER_LIST;
mp_util_remove_question_popup(nFolderItemIndex, type,
- __mp_folder_view_respones_delete_popup_cb,
- __mp_folder_view_delete_popup_cb,
- __mp_folder_view_mouse_back_up_popup_cb,
- __mp_folder_view_key_back_popup_cb);
+ __mp_folder_view_respones_delete_popup_cb,
+ __mp_folder_view_delete_popup_cb,
+ __mp_folder_view_mouse_back_up_popup_cb,
+ __mp_folder_view_key_back_popup_cb);
VideoLogInfo("");
}
static void __mp_folder_view_share_via_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
mp_option_ctrl_delete_handle();
char *szFolderPath = NULL;
szFolderPath = mp_util_svc_get_video_folder_url(nFolderItemIndex);
VideoSecureLogInfo("nFolderItemIndex=%d, szFolderPath=%s",
- nFolderItemIndex, szFolderPath);
+ nFolderItemIndex, szFolderPath);
mp_share_view_push(g_pFolderView->pMainHandle->pNaviFrameHandle,
- (ChangeListShareViewCbFunc) g_pFolderView->
- fUpdateListItemUserCb, szFolderPath,
- LIST_TAB_TYPE_PERSONAL);
+ (ChangeListShareViewCbFunc)
+ g_pFolderView->fUpdateListItemUserCb, szFolderPath,
+ LIST_TAB_TYPE_PERSONAL);
Elm_Object_Item *pSelectedItem =
elm_genlist_selected_item_get(pObject);
}
static void __mp_folder_view_long_press_item_cb(void *pUserData,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
if (!g_pFolderView || !event_info || !obj) {
}
Elm_Object_Item *long_item = (Elm_Object_Item *) event_info;
- /*elm_genlist_item_selected_set(long_item, EINA_FALSE);*/
int nFolderItemIndex = elm_genlist_item_index_get(long_item);
if (nFolderItemIndex < 0) {
VideoLogError("nGenlistItemIndex is invalid");
st_RegisteOptionCbFunc *pRegisteCbFunc =
(st_RegisteOptionCbFunc *) calloc(1,
- sizeof(st_RegisteOptionCbFunc));
+ sizeof(st_RegisteOptionCbFunc));
if (pRegisteCbFunc) {
pRegisteCbFunc->ShareViaItemCb =
(void *) __mp_folder_view_share_via_cb;
pRegisteCbFunc->AddToHomeItemCb = NULL;
- /*pRegisteCbFunc->DetailsItemCb= NULL;*/
pRegisteCbFunc->DeleteItemCb =
(void *) __mp_folder_view_popup_delete_cb;
}
VideoLogDebug("nVideoItemIndex=%d", nFolderItemIndex);
char *title = mp_util_svc_get_video_folder_name(nFolderItemIndex);
mp_option_ctrl_show(g_pFolderView->pMainHandle->pNaviFrameHandle,
- (const char *) title, nFolderItemIndex,
- pRegisteCbFunc,
- __mp_folder_view_normal_result_popup, NULL,
- MP_LIST_OPTION_DOWNLOAD_NONE);
+ (const char *) title, nFolderItemIndex,
+ pRegisteCbFunc,
+ __mp_folder_view_normal_result_popup, NULL,
+ MP_LIST_OPTION_DOWNLOAD_NONE);
if (mp_option_ctrl_get_handle()) {
evas_object_data_set(g_pFolderView->pVideosGenlist, "popup",
- mp_option_ctrl_get_handle());
+ mp_option_ctrl_get_handle());
elm_object_scroll_freeze_push(g_pFolderView->pVideosGenlist);
}
MP_FREE_STRING(pRegisteCbFunc);
}
-static void __mp_folder_view_del_genlist_cb(Evas_Object *pVideosGenlist)
+static void __mp_folder_view_del_genlist_cb(Evas_Object * pVideosGenlist)
{
if (!pVideosGenlist) {
VideoSecureLogError("pVideosGenlist is NULL");
return;
}
evas_object_smart_callback_del(pVideosGenlist, "longpressed",
- __mp_folder_view_long_press_item_cb);
+ __mp_folder_view_long_press_item_cb);
}
-static void __mp_folder_view_add_genlist_cb(Evas_Object *pVideosGenlist)
+static void __mp_folder_view_add_genlist_cb(Evas_Object * pVideosGenlist)
{
if (!pVideosGenlist) {
VideoSecureLogError("pVideosGenlist is NULL");
}
evas_object_smart_callback_add(pVideosGenlist, "longpressed",
- __mp_folder_view_long_press_item_cb,
- NULL);
+ __mp_folder_view_long_press_item_cb,
+ NULL);
}
#endif
/* External APIs*/
-static void __mp_folder_view_rotate_cb(void *data, Evas_Object *obj,
- void *event_info)
+static void __mp_folder_view_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
if (!g_pFolderView) {
VideoLogError("__mp_folder_view_rotate_cb IS null");
}
if (!mp_folder_view_is_top_view())
return;
- bool bLandscape =
- mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
- mp_util_get_main_window_handle
- ());
+ bool bLandscape = mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
+ mp_util_get_main_window_handle
+ ());
if (bLandscape) {
VideoLogInfo("landscape mode");
g_pFolderView->bLandscape = true;
}
void mp_folder_view_arrange_folder_list(void *pMainViewHandle,
- void *pMainViewWidget,
- MpListUpdateType eUpdateType,
- UpdateListItemsCbFunc
- pUpdateVideoListUserCb)
+ void *pMainViewWidget,
+ MpListUpdateType eUpdateType,
+ UpdateListItemsCbFunc
+ pUpdateVideoListUserCb)
{
if (!pMainViewHandle || !pMainViewWidget || !pUpdateVideoListUserCb) {
VideoLogInfo
- ("pMainViewHandle or pMainViewHandle or pUpdateVideoListUserCb are not existed.");
+ ("pMainViewHandle or pMainViewHandle or pUpdateVideoListUserCb are not existed.");
return;
}
if (eUpdateType == LIST_UPDATE_TYPE_NONE) {
g_pFolderView->fUpdateListItemUserCb = pUpdateVideoListUserCb;
g_pFolderView->bLandscape =
mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
- mp_util_get_main_window_handle
- ());
+ mp_util_get_main_window_handle
+ ());
- elm_object_item_part_text_set(g_pFolderView->pMainHandle->
- pNaviFrameItem, "elm.text.title",
- VIDEOS_TITLE_OPT_FOLDER);
+ elm_object_item_part_text_set(g_pFolderView->
+ pMainHandle->pNaviFrameItem,
+ "elm.text.title",
+ VIDEOS_TITLE_OPT_FOLDER);
VideoLogInfo("");
int nFolderListSize = 0;
if (eUpdateType == LIST_UPDATE_TYPE_ALL
- || eUpdateType == LIST_UPDATE_TYPE_DATA) {
+ || eUpdateType == LIST_UPDATE_TYPE_DATA) {
mp_util_svc_destory_video_list();
mp_util_svc_extract_video_list_by_item_type
- (mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
+ (mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
mp_util_svc_extract_video_folder_list_by_type
- (mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
+ (mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
}
nFolderListSize = mp_util_svc_get_video_folder_size();
VideoLogInfo("nVideoListSize : %d", nFolderListSize);
- /*mp_util_svc_set_update_db_cb_func(g_pFolderView->fUpdateListItemUserCb);*/
if (nFolderListSize > 0) {
if (g_pFolderView->pNocontentlayout) {
elm_object_part_content_unset(g_pFolderView->pNocontentlayout,
- SWALLOW_LISTVIEW_CONTENT);
+ SWALLOW_LISTVIEW_CONTENT);
MP_DEL_OBJ(g_pFolderView->pNocontentlayout);
}
if (!g_pFolderView->pVideosGenlist) {
g_pFolderView->pVideosGenlist =
- elm_genlist_add(g_pFolderView->pMainHandle->
- pNaviFrameHandle);
+ elm_genlist_add(g_pFolderView->
+ pMainHandle->pNaviFrameHandle);
elm_scroller_bounce_set(g_pFolderView->pVideosGenlist,
- EINA_FALSE, EINA_TRUE);
- evas_object_size_hint_weight_set(g_pFolderView->
- pVideosGenlist,
- EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EINA_FALSE, EINA_TRUE);
+ evas_object_size_hint_weight_set(g_pFolderView->pVideosGenlist,
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(g_pFolderView->pVideosGenlist,
- EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
elm_genlist_mode_set(g_pFolderView->pVideosGenlist,
- ELM_LIST_COMPRESS);
+ ELM_LIST_COMPRESS);
elm_genlist_homogeneous_set(g_pFolderView->pVideosGenlist,
- EINA_TRUE);
+ EINA_TRUE);
elm_genlist_block_count_set(g_pFolderView->pVideosGenlist,
- VIDEO_MAIN_LIST_BLOCK_COUNT);
- elm_scroller_single_direction_set(g_pFolderView->
- pVideosGenlist,
- ELM_SCROLLER_SINGLE_DIRECTION_HARD);
+ VIDEO_MAIN_LIST_BLOCK_COUNT);
+ elm_scroller_single_direction_set
+ (g_pFolderView->pVideosGenlist,
+ ELM_SCROLLER_SINGLE_DIRECTION_HARD);
#ifdef ENABLE_LONGPRESS
- __mp_folder_view_del_genlist_cb(g_pFolderView->
- pVideosGenlist);
- __mp_folder_view_add_genlist_cb(g_pFolderView->
- pVideosGenlist);
+ __mp_folder_view_del_genlist_cb(g_pFolderView->pVideosGenlist);
+ __mp_folder_view_add_genlist_cb(g_pFolderView->pVideosGenlist);
#endif
}
- elm_object_part_content_set(g_pFolderView->pMainWidget->
- pListViewBaselayout,
- SWALLOW_LISTVIEW_CONTENT,
- g_pFolderView->pVideosGenlist);
- /*mp_folder_view_append_folder_items(g_pFolderView->pVideosGenlist);*/
- __mp_folder_view_append_grid_layout(g_pFolderView->
- pVideosGenlist);
+ elm_object_part_content_set(g_pFolderView->
+ pMainWidget->pListViewBaselayout,
+ SWALLOW_LISTVIEW_CONTENT,
+ g_pFolderView->pVideosGenlist);
+ __mp_folder_view_append_grid_layout(g_pFolderView->pVideosGenlist);
evas_object_smart_callback_add((Evas_Object *)
- mp_util_get_main_window_handle(),
- "wm,rotation,changed",
- __mp_folder_view_rotate_cb, NULL);
+ mp_util_get_main_window_handle(),
+ "wm,rotation,changed",
+ __mp_folder_view_rotate_cb, NULL);
evas_object_show(g_pFolderView->pVideosGenlist);
} else {
__mp_folder_view_create_no_content();
{
if (!g_pFolderView->pVideosGenlist) {
VideoLogWarning
- ("[WARNING] g_pFolderView->pFolderItemList is not existed.");
+ ("[WARNING] g_pFolderView->pFolderItemList is not existed.");
return;
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
/****************************folder view***************************/
-typedef struct
-{
+typedef struct {
void *pNaviFrameHandle;
void *pNaviFrameItem;
void *pVideosGenlist;
MpDbUpdateViewLev euLev;
UpdateListItemsCbFunc pUpdateListUserCbFunc;
-}st_VideoFolderViewHandle;
+} st_VideoFolderViewHandle;
-typedef struct
-{
+typedef struct {
Evas_Object *pFolderViewBox;
Evas_Object *pFolderViewCountlayout;
Evas_Object *pFolderViewBaselayout;
Evas_Object *pNocontentsLayout;
Evas_Object *pViewButton;
-// Evas_Object *pSearchBtn;
Evas_Object *pFolderViewGenlistTitle;
Elm_Genlist_Item_Class *pFolderViewGenlistTitleItc;
Elm_Object_Item *pFolderViewGenlistItemForTitle;
Eina_List *pVideolistItemList;
-}st_VideoFolderViewWidget;
+} st_VideoFolderViewWidget;
-st_VideoFolderViewHandle *g_pFolderViewHandle = NULL;
-st_VideoFolderViewWidget *g_pFolderViewWidget = NULL;
-Elm_Genlist_Item_Class VideoFolder_Itc;
+st_VideoFolderViewHandle *g_pFolderViewHandle = NULL;
+st_VideoFolderViewWidget *g_pFolderViewWidget = NULL;
+Elm_Genlist_Item_Class VideoFolder_Itc;
-static bool __mp_folder_item_view_update_video_list(MpListUpdateType eUpdateType);
+static bool __mp_folder_item_view_update_video_list(MpListUpdateType
+ eUpdateType);
static void __mp_folder_item_view_db_changed_cb(void *pUserData);
#ifdef ENABLE_LONGPRESS
static void __mp_folder_item_view_delete_video_items(int nVideoItemIndex);
#endif
static void __mp_folder_item_view_db_result_data_update_cb(void);
-static void __mp_folder_item_view_result_user_cb(MpListUpdateType eUpdateType);
+static void __mp_folder_item_view_result_user_cb(MpListUpdateType
+ eUpdateType);
static void __mp_folder_item_view_result_view_update_cb(void);
-//static void __mp_folder_item_view_update_count_layout();
-static void __mp_folder_item_view_rotate_cb(void *data, Evas_Object *obj, void *event_info);
+static void __mp_folder_item_view_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info);
static void mp_folder_view_cancel_thumbnail_update(int nIndexGenlist);
-static int mp_folder_item_view_thumbnail_to_genlist_index(int nVideoItemIndex);
+static int mp_folder_item_view_thumbnail_to_genlist_index(int
+ nVideoItemIndex);
static int __mp_folder_item_view_get_sort_type(void);
-/*
-void __mp_folder_item_view_check_search_button_enable(void)
-{
- Eina_Bool bActivateSearchButton = EINA_FALSE;
-
- int nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
- VideoLogInfo("nVideoListSize : %d", nVideoListSize);
-
- if (nVideoListSize < 1)
- {
- bActivateSearchButton = EINA_TRUE;
- }
- else
- {
- bActivateSearchButton = EINA_FALSE;
- }
-
- elm_object_disabled_set(g_pFolderViewWidget->pSearchBtn, bActivateSearchButton);
-}
-*/
static bool __mp_folder_item_view_free_video_genlistItem(void)
{
if (!g_pFolderViewWidget || !g_pFolderViewWidget->pVideolistItemList) {
- VideoLogError("g_pMainViewWidget->pVideoGenlistItemList is already empty.");
+ VideoLogError
+ ("g_pMainViewWidget->pVideoGenlistItemList is already empty.");
return FALSE;
}
VideoLogInfo("");
Elm_Object_Item *pTmpVideoGenlistItem = NULL;
- EINA_LIST_FREE(g_pFolderViewWidget->pVideolistItemList, pTmpVideoGenlistItem)
- {
+ EINA_LIST_FREE(g_pFolderViewWidget->pVideolistItemList,
+ pTmpVideoGenlistItem) {
if (pTmpVideoGenlistItem) {
- int nIndex = (int)elm_object_item_data_get(pTmpVideoGenlistItem);
- //mp_util_svc_cancel_thumbnail_update(nIndex);
+ int nIndex =
+ (int) elm_object_item_data_get(pTmpVideoGenlistItem);
+
mp_folder_view_cancel_thumbnail_update(nIndex);
pTmpVideoGenlistItem = NULL;
}
static void __mp_folder_item_view_destroy(void)
{
VideoLogInfo("");
- if (g_pFolderViewHandle)
- {
+ if (g_pFolderViewHandle) {
g_pFolderViewHandle->nFolder_index = 0;
- __mp_folder_item_view_clear_genlist(g_pFolderViewHandle->pVideosGenlist);
+ __mp_folder_item_view_clear_genlist(g_pFolderViewHandle->
+ pVideosGenlist);
MP_DEL_OBJ(g_pFolderViewHandle->pVideosGenlist);
g_pFolderViewHandle->nPlayVideoIndex = -1;
g_pFolderViewHandle = NULL;
}
- if (g_pFolderViewWidget)
- {
+ if (g_pFolderViewWidget) {
MP_DEL_ITC(g_pFolderViewWidget->pFolderViewGenlistTitleItc);
MP_DEL_OBJ(g_pFolderViewWidget->pViewButton);
-// MP_DEL_OBJ(g_pFolderViewWidget->pSearchBtn);
MP_DEL_OBJ(g_pFolderViewWidget->pNocontentsLayout);
MP_DEL_OBJ(g_pFolderViewWidget->pFolderViewBaselayout);
MP_DEL_OBJ(g_pFolderViewWidget->pFolderViewCountlayout);
free(g_pFolderViewWidget);
g_pFolderViewWidget = NULL;
}
- evas_object_smart_callback_del((Evas_Object*)mp_util_get_main_window_handle(), "wm,rotation,changed", __mp_folder_item_view_rotate_cb);
+ evas_object_smart_callback_del((Evas_Object *)
+ mp_util_get_main_window_handle(),
+ "wm,rotation,changed",
+ __mp_folder_item_view_rotate_cb);
}
static void __mp_folder_item_view_reset(void)
{
VideoLogInfo("");
- if (g_pFolderViewHandle)
- {
+ if (g_pFolderViewHandle) {
mp_util_db_set_update_fun(g_pFolderViewHandle->euLev, NULL);
g_pFolderViewHandle->nFolder_index = 0;
- __mp_folder_item_view_clear_genlist(g_pFolderViewHandle->pVideosGenlist);
+ __mp_folder_item_view_clear_genlist(g_pFolderViewHandle->
+ pVideosGenlist);
g_pFolderViewHandle->pVideosGenlist = NULL;
MP_FREE_STRING(g_pFolderViewHandle->pFolderUrl);
g_pFolderViewHandle = NULL;
}
- if (g_pFolderViewWidget)
- {
+ if (g_pFolderViewWidget) {
MP_DEL_ITC(g_pFolderViewWidget->pFolderViewGenlistTitleItc);
g_pFolderViewWidget->pFolderViewBaselayout = NULL;
g_pFolderViewWidget->pNocontentsLayout = NULL;
-// g_pFolderViewWidget->pSearchBtn = NULL;
g_pFolderViewWidget->pViewButton = NULL;
free(g_pFolderViewWidget);
g_pFolderViewWidget = NULL;
}
- evas_object_smart_callback_del((Evas_Object*)mp_util_get_main_window_handle(), "wm,rotation,changed", __mp_folder_item_view_rotate_cb);
+ evas_object_smart_callback_del((Evas_Object *)
+ mp_util_get_main_window_handle(),
+ "wm,rotation,changed",
+ __mp_folder_item_view_rotate_cb);
}
static Evas_Object *__mp_folder_item_view_init_base_layout(void *pParent)
{
- if (!pParent)
- {
+ if (!pParent) {
VideoLogError("[ERR]");
return NULL;
}
VideoLogInfo("");
MP_DEL_OBJ(g_pFolderViewWidget->pFolderViewBaselayout);
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_LISTVIEW_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_LISTVIEW_EDJ);
free(path);
// Create folder view base layout.
g_pFolderViewWidget->pFolderViewBaselayout = elm_layout_add(pParent);
- elm_layout_file_set(g_pFolderViewWidget->pFolderViewBaselayout, edj_path, LISTVIEW_EDJ_GROUP);
- evas_object_size_hint_weight_set(g_pFolderViewWidget->pFolderViewBaselayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(g_pFolderViewWidget->pFolderViewBaselayout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_layout_file_set(g_pFolderViewWidget->pFolderViewBaselayout,
+ edj_path, LISTVIEW_EDJ_GROUP);
+ evas_object_size_hint_weight_set(g_pFolderViewWidget->
+ pFolderViewBaselayout,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(g_pFolderViewWidget->
+ pFolderViewBaselayout, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
return g_pFolderViewWidget->pFolderViewBaselayout;
}
static void __mp_folder_item_view_pop(void *pNaviFrame, void *pUserData)
{
- if (!g_pFolderViewHandle)
- {
+ if (!g_pFolderViewHandle) {
VideoLogInfo("[ERR] g_pFolderViewHandle");
return;
}
mp_ft_ctrl_destroy();
- if (g_pFolderViewHandle && g_pFolderViewHandle->pUpdateListUserCbFunc)
- {
+ if (g_pFolderViewHandle && g_pFolderViewHandle->pUpdateListUserCbFunc) {
g_pFolderViewHandle->pUpdateListUserCbFunc(LIST_UPDATE_TYPE_ALL);
VideoLogInfo("");
}
- //MpVideoServiceCtrlSetPlayerType(MpVideoServiceCtrlGetPrevPlayerType());
-
}
-static void __mp_folder_item_view_trans_finished_cb(void *pUserData, Evas_Object *obj, void *event_info)
+static void __mp_folder_item_view_trans_finished_cb(void *pUserData,
+ Evas_Object * obj,
+ void *event_info)
{
- if (!obj)
- {
+ if (!obj) {
VideoLogError("[ERR] g_pAsfDeviceListViewHandle is NULL.");
return;
}
mp_widget_ctrl_enable_navi_handle_focus(obj);
- evas_object_smart_callback_del(obj, "transition,finished", __mp_folder_item_view_trans_finished_cb);
+ evas_object_smart_callback_del(obj, "transition,finished",
+ __mp_folder_item_view_trans_finished_cb);
}
// Back button
-static Eina_Bool __mp_folder_item_view_back_btn_cb(void *pUserData, Elm_Object_Item *pItem)
+static Eina_Bool __mp_folder_item_view_back_btn_cb(void *pUserData,
+ Elm_Object_Item * pItem)
{
- if (!g_pFolderViewHandle)
- {
+ if (!g_pFolderViewHandle) {
VideoLogInfo("[ERR] g_pListRemoveViewHandle is NULL.");
return EINA_TRUE;
}
VideoLogInfo("");
g_pFolderViewHandle->bExist = true;
- mp_widget_ctrl_disable_navi_handle_focus_except_item(g_pFolderViewHandle->pNaviFrameHandle, g_pFolderViewHandle->pNaviFrameItem);
- evas_object_smart_callback_add(g_pFolderViewHandle->pNaviFrameHandle, "transition,finished", __mp_folder_item_view_trans_finished_cb, NULL);
+ mp_widget_ctrl_disable_navi_handle_focus_except_item
+ (g_pFolderViewHandle->pNaviFrameHandle,
+ g_pFolderViewHandle->pNaviFrameItem);
+ evas_object_smart_callback_add(g_pFolderViewHandle->pNaviFrameHandle,
+ "transition,finished",
+ __mp_folder_item_view_trans_finished_cb,
+ NULL);
__mp_folder_item_view_pop(g_pFolderViewHandle->pNaviFrameHandle, NULL);
mp_folder_view_set_is_item_view(false);
{
VideoLogInfo("");
- char szTmpStr[STR_LEN_MAX] = {0, };
- char szTmpStrDurationTime[STR_LEN_MAX] = {0, };
- char szTmpStrLastPlayedPos[STR_LEN_MAX] = {0, };
+ char szTmpStr[STR_LEN_MAX] = { 0, };
+ char szTmpStrDurationTime[STR_LEN_MAX] = { 0, };
+ char szTmpStrLastPlayedPos[STR_LEN_MAX] = { 0, };
- unsigned int nVideoInfoDuration = mp_util_svc_get_video_duration_time(nVideoItemIndex);
- unsigned int nVideoInfoLastTime = mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
+ unsigned int nVideoInfoDuration =
+ mp_util_svc_get_video_duration_time(nVideoItemIndex);
+ unsigned int nVideoInfoLastTime =
+ mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
mp_util_convert_time(nVideoInfoDuration, szTmpStrDurationTime, FALSE);
-/* if (nVideoInfoLastTime > 0)
- {
- mp_util_convert_time(nVideoInfoLastTime, szTmpStrLastPlayedPos, TRUE);
- snprintf(szTmpStr, STR_LEN_MAX, "<match>%s</match>/%s", szTmpStrLastPlayedPos, szTmpStrDurationTime);
- }
- else
- {*/
- snprintf(szTmpStr, STR_LEN_MAX, "%s", szTmpStrDurationTime);
-// }
+ snprintf(szTmpStr, STR_LEN_MAX, "%s", szTmpStrDurationTime);
return strdup(szTmpStr);
}
-static char *__mp_folder_item_view_get_label_of_video_item_cb(void *pUserData, Evas_Object *pObject, const char *pPart)
+static char *__mp_folder_item_view_get_label_of_video_item_cb(void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char
+ *pPart)
{
- int nVideoItemIndex = (int)pUserData;
+ int nVideoItemIndex = (int) pUserData;
mp_util_svc_destory_video_item_list();
- mp_util_svc_extract_video_list_from_folder(g_pFolderViewHandle->pFolderUrl, __mp_folder_item_view_get_sort_type(), MP_LIST_VIEW_ALL);
+ mp_util_svc_extract_video_list_from_folder(g_pFolderViewHandle->
+ pFolderUrl,
+ __mp_folder_item_view_get_sort_type
+ (), MP_LIST_VIEW_ALL);
if (!strcmp(pPart, "elm.text.main.left.top")) {
char *szTitle;
szTitle = mp_util_svc_get_video_title(nVideoItemIndex);
char *szTitleUtf8 = elm_entry_utf8_to_markup(szTitle);
- VideoLogWarning("testestesteste = %d, %s", nVideoItemIndex, szTitleUtf8);
+ VideoLogWarning("testestesteste = %d, %s", nVideoItemIndex,
+ szTitleUtf8);
if (szTitle) {
free(szTitle);
}
return szTitleUtf8;
- } else if (!strcmp(pPart, "elm.text.sub.left.bottom"))
- {
+ } else if (!strcmp(pPart, "elm.text.sub.left.bottom")) {
return __mp_folder_item_view_get_guration_time(nVideoItemIndex);
- } else if (!strcmp(pPart, "elm.text"))
- {
+ } else if (!strcmp(pPart, "elm.text")) {
char *szTitle;
szTitle = mp_util_svc_get_video_title(nVideoItemIndex);
char *szTitleUtf8 = elm_entry_utf8_to_markup(szTitle);
- VideoLogInfo("%s",szTitle);
+ VideoLogInfo("%s", szTitle);
if (szTitle) {
free(szTitle);
szTitle = NULL;
}
return szTitleUtf8;
- } else if (!strcmp(pPart, "elm.text.2"))
- {
+ } else if (!strcmp(pPart, "elm.text.2")) {
return __mp_folder_item_view_get_guration_time(nVideoItemIndex);
}
- /*else if (!strcmp(pPart, "elm.text.sub.right.bottom"))
- {
- unsigned long long nFilesize = 0;
-
- nFilesize = mp_util_svc_get_video_item_size(nVideoItemIndex);
- char *szFileSize = mp_util_get_file_size(nFilesize);
- char *szTitleUtf8 = NULL;
- if (szFileSize)
- {
- szTitleUtf8 = elm_entry_utf8_to_markup(szFileSize);
- free(szFileSize);
- szFileSize = NULL;
- }
-
- return szTitleUtf8;
- }*/
return NULL;
}
#ifdef ENABLE_LONGPRESS
-static void __mp_folder_item_view_HW_mouse_back_up_popup_cb(void *pUserData, Evas *pEvas, Evas_Object *pObject, void *pEventInfo)
+static void __mp_folder_item_view_HW_mouse_back_up_popup_cb(void
+ *pUserData,
+ Evas * pEvas,
+ Evas_Object *
+ pObject,
+ void
+ *pEventInfo)
{
Evas_Event_Mouse_Up *pEvent = pEventInfo;
- if (pEvent->button == 3)
- {
+ if (pEvent->button == 3) {
mp_util_delete_popup_handle();
}
}
-static void __mp_folder_item_view_HW_key_back_popup_cb(void *pUserData, Evas *pEvas, Evas_Object *pObject, void *pEventInfo)
+static void __mp_folder_item_view_HW_key_back_popup_cb(void *pUserData,
+ Evas * pEvas,
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
Evas_Event_Key_Down *pEvent = pEventInfo;
- if (!g_strcmp0(pEvent->keyname, "XF86Back"))
- {
+ if (!g_strcmp0(pEvent->keyname, "XF86Back")) {
mp_util_delete_popup_handle();
}
}
#endif
#ifdef ENABLE_LONGPRESS
-static void __mp_folder_item_view_respones_delete_popup_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_folder_item_view_respones_delete_popup_cb(void *pUserData,
+ Evas_Object *
+ pObject,
+ void
+ *pEventInfo)
{
mp_util_delete_popup_handle();
- int nVideoItemIndex = (int)pUserData;
+ int nVideoItemIndex = (int) pUserData;
VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
- if (nVideoItemIndex < 0 || nVideoItemIndex >= mp_util_svc_get_video_list_size_for_checking_index())
- {
+ if (nVideoItemIndex < 0
+ || nVideoItemIndex >=
+ mp_util_svc_get_video_list_size_for_checking_index()) {
VideoLogError("[ERR] list item index.");
return;
}
char *szFileUrl = mp_util_svc_get_video_url(nVideoItemIndex);
- if (szFileUrl)
- {
+ if (szFileUrl) {
VideoLogInfo("Delete file url : %s", szFileUrl);
vp_file_unlink(szFileUrl);
free(szFileUrl);
mp_util_svc_remove_item_by_list_index(nVideoItemIndex);
__mp_folder_item_view_delete_video_items(nVideoItemIndex);
- //__mp_folder_item_view_update_count_layout();
}
}
-static void __mp_folder_item_view_respones_cancel_popup_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_folder_item_view_respones_cancel_popup_cb(void *pUserData,
+ Evas_Object *
+ pObject,
+ void
+ *pEventInfo)
{
VideoLogInfo("");
mp_util_delete_popup_handle();
}
-static void __mp_folder_item_view_delete_btn_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_folder_item_view_delete_btn_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
mp_option_ctrl_delete_handle();
- int nVideoItemIndex = (int)pUserData;
+ int nVideoItemIndex = (int) pUserData;
MpListViewAsType type = MP_LIST_VIEW_AS_THUMBNAIL_LIST;
- mp_util_remove_question_popup(nVideoItemIndex, type, __mp_folder_item_view_respones_delete_popup_cb, __mp_folder_item_view_respones_cancel_popup_cb, __mp_folder_item_view_HW_mouse_back_up_popup_cb, __mp_folder_item_view_HW_key_back_popup_cb);
+ mp_util_remove_question_popup(nVideoItemIndex, type,
+ __mp_folder_item_view_respones_delete_popup_cb,
+ __mp_folder_item_view_respones_cancel_popup_cb,
+ __mp_folder_item_view_HW_mouse_back_up_popup_cb,
+ __mp_folder_item_view_HW_key_back_popup_cb);
}
#endif
-Evas_Object *__mp_folder_item_view_get_icon_of_video_item_cb(void *pUserData, Evas_Object *pObject, const char *pPart)
+Evas_Object *__mp_folder_item_view_get_icon_of_video_item_cb(void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char
+ *pPart)
{
Evas_Object *pLayout = NULL;
- int nVideoItemIndex = (int)pUserData;
- if (!pPart || !pObject)
- {
+ int nVideoItemIndex = (int) pUserData;
+ if (!pPart || !pObject) {
return NULL;
}
mp_util_svc_destory_video_item_list();
- mp_util_svc_extract_video_list_from_folder(g_pFolderViewHandle->pFolderUrl, __mp_folder_item_view_get_sort_type(), MP_LIST_VIEW_ALL);
- if (!strcmp(pPart, "elm.icon.1"))
- {
+ mp_util_svc_extract_video_list_from_folder(g_pFolderViewHandle->
+ pFolderUrl,
+ __mp_folder_item_view_get_sort_type
+ (), MP_LIST_VIEW_ALL);
+ if (!strcmp(pPart, "elm.icon.1")) {
VideoLogInfo("pPart: elm.icon.1 - thumbnail");
- char *pThumbIconUri = mp_util_svc_get_video_thumbnail(nVideoItemIndex);
+ char *pThumbIconUri =
+ mp_util_svc_get_video_thumbnail(nVideoItemIndex);
Evas_Object *pBg = NULL;
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_CUSTOM_THEME);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_CUSTOM_THEME);
free(path);
pLayout = elm_layout_add(pObject);
- elm_layout_file_set(pLayout, edj_path, "listview.thumbnail.layout");
+ elm_layout_file_set(pLayout, edj_path,
+ "listview.thumbnail.layout");
if (!pThumbIconUri || !vp_file_exists(pThumbIconUri)) {
MP_FREE_STRING(pThumbIconUri);
}
- pBg = mp_util_create_preload_image(pLayout, pThumbIconUri, VIDEO_ICON_WIDTH);
+ pBg =
+ mp_util_create_preload_image(pLayout, pThumbIconUri,
+ VIDEO_ICON_WIDTH);
elm_layout_content_set(pLayout, "elm.thumbnail.icon", pBg);
if (pBg)
MP_FREE_STRING(pThumbIconUri);
- int nLastPlayedTime = mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
- int nDurationTime = mp_util_svc_get_video_duration_time(nVideoItemIndex);
+ int nLastPlayedTime =
+ mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
+ int nDurationTime =
+ mp_util_svc_get_video_duration_time(nVideoItemIndex);
if (nLastPlayedTime > 0 && nDurationTime > 0) {
- double nRatio = ((double)nLastPlayedTime) / ((double)nDurationTime);
+ double nRatio =
+ ((double) nLastPlayedTime) / ((double) nDurationTime);
if (nRatio < 0.05) {
nRatio = 0.05;
}
- Evas_Object *pProgressBar = mp_widget_ctrl_create_progressbar(pLayout, nRatio);
- elm_layout_content_set(pLayout, "elm.progressbar.icon", pProgressBar);
+ Evas_Object *pProgressBar =
+ mp_widget_ctrl_create_progressbar(pLayout, nRatio);
+ elm_layout_content_set(pLayout, "elm.progressbar.icon",
+ pProgressBar);
- if (pProgressBar) {
+ if (pProgressBar) {
evas_object_show(pProgressBar);
}
}
- if (!mp_util_create_video_sub_icon(pLayout, nVideoItemIndex)) {
- VideoLogWarning("Local File or Create sub icon is failed.", nVideoItemIndex);
+ if (!mp_util_create_video_sub_icon(pLayout, nVideoItemIndex)) {
+ VideoLogWarning("Local File or Create sub icon is failed.",
+ nVideoItemIndex);
}
- if (pLayout) {
- evas_object_show(pLayout);
+ if (pLayout) {
+ evas_object_show(pLayout);
}
return pLayout;
- } else if (!strcmp(pPart, "elm.swallow.icon"))
- {
- char *pThumbIconUri = mp_util_svc_get_video_thumbnail(nVideoItemIndex);
- Evas_Object *thumb = NULL;
- int nWidth = 0;
- int nHeight = 0;
+ } else if (!strcmp(pPart, "elm.swallow.icon")) {
+ char *pThumbIconUri =
+ mp_util_svc_get_video_thumbnail(nVideoItemIndex);
+ Evas_Object *thumb = NULL;
+ int nWidth = 0;
+ int nHeight = 0;
thumb = elm_image_add(pObject);
elm_image_preload_disabled_set(thumb, EINA_FALSE);
elm_image_smooth_set(thumb, EINA_FALSE);
- elm_image_prescale_set(thumb, 50*MP_SCALE);
+ elm_image_prescale_set(thumb, 50 * MP_SCALE);
elm_image_file_set(thumb, pThumbIconUri, NULL);
elm_image_object_size_get(thumb, &nWidth, &nHeight);
MP_FREE_STRING(pThumbIconUri);
return thumb;
- } else if (!strcmp(pPart, "elm.progressbar.icon"))
- {
- int nLastPlayedTime = mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
- int nDurationTime = mp_util_svc_get_video_duration_time(nVideoItemIndex);
+ } else if (!strcmp(pPart, "elm.progressbar.icon")) {
+ int nLastPlayedTime =
+ mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
+ int nDurationTime =
+ mp_util_svc_get_video_duration_time(nVideoItemIndex);
if (nLastPlayedTime <= 0) {
return NULL;
double nRatio = 0.0;
if (nDurationTime > 0) {
- nRatio = ((double)nLastPlayedTime) /
- ((double)nDurationTime);
+ nRatio = ((double) nLastPlayedTime) / ((double) nDurationTime);
}
if (nRatio < 0.05) {
Evas_Object *pProgressBar = elm_progressbar_add(pObject);
elm_object_style_set(pProgressBar, "video/list_progress");
elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
- evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(pProgressBar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pProgressBar, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
elm_progressbar_value_set(pProgressBar, nRatio);
evas_object_show(pProgressBar);
// Genlist item callback.
static void __mp_folder_item_view_warning_popup_cb(void *pUserData,
- Evas_Object *pObject, void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!pUserData) {
VideoLogInfo("No exist pUserData");
mp_util_delete_popup_handle();
}
-static void __mp_folder_item_view_select_video_item_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_folder_item_view_select_video_item_cb(void *pUserData,
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
if (!pObject) {
VideoLogError("[ERR]No have pUserData");
return;
}
- Evas_Object *pPopup = evas_object_data_get(pObject, "popup"); // Get popup
- if (pPopup)
- {
+ Evas_Object *pPopup = evas_object_data_get(pObject, "popup"); // Get popup
+ if (pPopup) {
VideoLogError("long press is called");
- return; // If popup exists, do nothing
+ return; // If popup exists, do nothing
}
if (!mp_util_call_off()) {
- mp_util_ticker_toast_popup(VIDEOS_NOTIPOP_MSG_UNABLE_TO_PLAY_VIDEO_DURING_CALL, false, false);
+ mp_util_ticker_toast_popup
+ (VIDEOS_NOTIPOP_MSG_UNABLE_TO_PLAY_VIDEO_DURING_CALL, false,
+ false);
return;
}
return;
}
- int nVideoItemIndex = (int)pUserData;
+ int nVideoItemIndex = (int) pUserData;
int nVideoListSize = g_pFolderViewHandle->currentItemCount;
- VideoLogDebug("nVideoItemIndex = %d--%d", nVideoItemIndex, nVideoListSize);
+ VideoLogDebug("nVideoItemIndex = %d--%d", nVideoItemIndex,
+ nVideoListSize);
if (nVideoItemIndex < 0 || nVideoItemIndex >= nVideoListSize) {
VideoLogError("nVideoItemIndex < 0 ===>>> RETURN");
if (szVideoUrl) {
if (!mp_util_check_local_file_exist(szVideoUrl)) {
- mp_util_notify_popup(NULL, VIDEOS_COMMON_HEADER_ERROR, VIDEOS_NOTIPOP_MSG_FILE_NOT_EXIST, __mp_folder_item_view_warning_popup_cb);
+ mp_util_notify_popup(NULL, VIDEOS_COMMON_HEADER_ERROR,
+ VIDEOS_NOTIPOP_MSG_FILE_NOT_EXIST,
+ __mp_folder_item_view_warning_popup_cb);
MP_FREE_STRING(szVideoUrl);
return;
}
nVideoItemIndex = nIndexGenlist * nItemCount;
int nVideoListSize = g_pFolderViewHandle->currentItemCount;
- VideoLogInfo("realize is %d--%d--%d", nItemCount, nVideoItemIndex, nVideoListSize);
+ VideoLogInfo("realize is %d--%d--%d", nItemCount, nVideoItemIndex,
+ nVideoListSize);
int nIndex = 0;
- for (; (nIndex < nItemCount) && (nVideoItemIndex < nVideoListSize); nIndex++) {
+ for (; (nIndex < nItemCount) && (nVideoItemIndex < nVideoListSize);
+ nIndex++) {
mp_util_svc_cancel_thumbnail_update(nVideoItemIndex);
nVideoItemIndex++;
}
}
-static void __mp_folder_item_view_video_item_del_cb(void *data, Evas_Object *obj, void *event_info)
+static void __mp_folder_item_view_video_item_del_cb(void *data,
+ Evas_Object * obj,
+ void *event_info)
{
- if (!g_pFolderViewWidget || !event_info || !g_pFolderViewWidget->pVideolistItemList)
- {
+ if (!g_pFolderViewWidget || !event_info
+ || !g_pFolderViewWidget->pVideolistItemList) {
VideoLogError("g_pMainViewWidge is NULL");
return;
}
int nIndexGenlist = 0;
- Elm_Object_Item *pCurrentItem = (Elm_Object_Item *)event_info;
+ Elm_Object_Item *pCurrentItem = (Elm_Object_Item *) event_info;
Eina_List *pCurList = NULL;
Elm_Object_Item *pTmpVideoItem = NULL;
- EINA_LIST_FOREACH(g_pFolderViewWidget->pVideolistItemList, pCurList, pTmpVideoItem)
- {
- if (pCurrentItem == pTmpVideoItem)
- {
- nIndexGenlist = (int)elm_object_item_data_get(pCurrentItem);
+ EINA_LIST_FOREACH(g_pFolderViewWidget->pVideolistItemList, pCurList,
+ pTmpVideoItem) {
+ if (pCurrentItem == pTmpVideoItem) {
+ nIndexGenlist = (int) elm_object_item_data_get(pCurrentItem);
mp_folder_view_cancel_thumbnail_update(nIndexGenlist);
pTmpVideoItem = NULL;
pCurList->data = NULL;
}
#ifdef VS_FEATURE_THUMBNAIL_VIEW
-static void __mp_folder_item_view_append_gengrid_items(Evas_Object *pObjVideosList, int nGenItemIndex)
+static void __mp_folder_item_view_append_gengrid_items(Evas_Object *
+ pObjVideosList,
+ int nGenItemIndex)
{
if (!g_pFolderViewHandle) {
VideoLogInfo("invalid handle");
MP_DEL_GRID_ITC(g_pFolderViewHandle->pGenGridItc_l);
g_pFolderViewHandle->pGenGridItc_l = elm_gengrid_item_class_new();
g_pFolderViewHandle->pGenGridItc_l->item_style = "video/album_grid";
- g_pFolderViewHandle->pGenGridItc_l->func.text_get = (void*)__mp_folder_item_view_get_label_of_video_item_cb;
- g_pFolderViewHandle->pGenGridItc_l->func.content_get = (void*)__mp_folder_item_view_get_icon_of_video_item_cb;
+ g_pFolderViewHandle->pGenGridItc_l->func.text_get =
+ (void *) __mp_folder_item_view_get_label_of_video_item_cb;
+ g_pFolderViewHandle->pGenGridItc_l->func.content_get =
+ (void *) __mp_folder_item_view_get_icon_of_video_item_cb;
g_pFolderViewHandle->pGenGridItc_l->func.state_get = NULL;
g_pFolderViewHandle->pGenGridItc_l->func.del = NULL;
- int nCount = (mp_rotate_ctrl_check_landspace() ? VP_GENLIST_THUMB_LANDSPACE_COUNT : VP_GENLIST_THUMB_PORTRAIT_COUNT);
- int nIndex = nGenItemIndex*nCount;
+ int nCount =
+ (mp_rotate_ctrl_check_landspace() ? VP_GENLIST_THUMB_LANDSPACE_COUNT
+ : VP_GENLIST_THUMB_PORTRAIT_COUNT);
+ int nIndex = nGenItemIndex * nCount;
int nMaxIndex = nIndex + nCount;
int nVideoListSize = g_pFolderViewHandle->currentItemCount;
Elm_Object_Item *gridItem = NULL;
for (; (nIndex < nMaxIndex) && (nIndex < nVideoListSize); nIndex++) {
- gridItem = elm_gengrid_item_append(pObjVideosList, g_pFolderViewHandle->pGenGridItc_l, (void *)nIndex, __mp_folder_item_view_select_video_item_cb, (void *)nIndex);
- elm_gengrid_item_select_mode_set(gridItem, ELM_OBJECT_SELECT_MODE_ALWAYS);
- elm_object_item_data_set(gridItem, (void *)nIndex);
+ gridItem =
+ elm_gengrid_item_append(pObjVideosList,
+ g_pFolderViewHandle->pGenGridItc_l,
+ (void *) nIndex,
+ __mp_folder_item_view_select_video_item_cb,
+ (void *) nIndex);
+ elm_gengrid_item_select_mode_set(gridItem,
+ ELM_OBJECT_SELECT_MODE_ALWAYS);
+ elm_object_item_data_set(gridItem, (void *) nIndex);
}
}
-static Evas_Object *__mp_folder_item_view_create_gengrid(Evas_Object *parent, int nWidth, int nHeight)
+static Evas_Object *__mp_folder_item_view_create_gengrid(Evas_Object *
+ parent,
+ int nWidth,
+ int nHeight)
{
Evas_Object *pGengrid;
pGengrid = elm_gengrid_add(parent);
VideoLogError("pVideoGrid is not existed.");
return NULL;
}
- evas_object_size_hint_weight_set(pGengrid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(pGengrid, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pGengrid, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pGengrid, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
elm_gengrid_item_size_set(pGengrid, nWidth, nHeight);
elm_gengrid_align_set(pGengrid, 0.0, 0.0);
elm_gengrid_horizontal_set(pGengrid, EINA_TRUE);
return pGengrid;
}
-static void mp_item_of_folder_view_get_icon_dimensions(int *height, int *width)
+static void mp_item_of_folder_view_get_icon_dimensions(int *height,
+ int *width)
{
int winHeight = 0;
int winWidth = 0;
elm_win_screen_size_get(mp_util_get_main_window_handle(), NULL, NULL,
- &winWidth, &winHeight);
+ &winWidth, &winHeight);
- bool bLandscape = mp_rotate_ctrl_check_landspace_by_win((Evas_Object*)mp_util_get_main_window_handle());
+ bool bLandscape =
+ mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
+ mp_util_get_main_window_handle
+ ());
if (bLandscape) {
*width = winHeight / VP_GENLIST_THUMB_LANDSPACE_COUNT;
} else {
*height = VP_ALBUM_THUMB_ICON_HEIGHT * MP_SCALE;
}
-static Evas_Object *__mp_folder_item_view_get_icon_of_grid_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static Evas_Object *__mp_folder_item_view_get_icon_of_grid_cb(const void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char
+ *pPart)
{
if (!g_pFolderViewHandle || !pObject) {
VideoLogError("g_pMainViewWidgetOfFolderItemList is NULL");
return NULL;
}
- int nGenItemIndex = (int)pUserData;
+ int nGenItemIndex = (int) pUserData;
int nHeight = 0;
int nWidth = 0;
mp_item_of_folder_view_get_icon_dimensions(&nHeight, &nWidth);
- Evas_Object *pGengrid = __mp_folder_item_view_create_gengrid(pObject, nWidth, nHeight);
+ Evas_Object *pGengrid =
+ __mp_folder_item_view_create_gengrid(pObject, nWidth, nHeight);
__mp_folder_item_view_append_gengrid_items(pGengrid, nGenItemIndex);
return pGengrid;
}
-static int mp_folder_item_view_thumbnail_to_genlist_index(int nVideoItemIndex)
+static int mp_folder_item_view_thumbnail_to_genlist_index(int
+ nVideoItemIndex)
{
- if (nVideoItemIndex < 0)
- {
+ if (nVideoItemIndex < 0) {
VideoLogDebug("invalid nVideoItemIndex");
return 0;
}
int nItemCount = VP_GENLIST_THUMB_PORTRAIT_COUNT;
int nGenlistIndex = 0;
- if (g_pFolderViewHandle->bLandscape)
- {
+ if (g_pFolderViewHandle->bLandscape) {
nItemCount = VP_GENLIST_THUMB_LANDSPACE_COUNT;
}
- nGenlistIndex = nVideoItemIndex/nItemCount;
+ nGenlistIndex = nVideoItemIndex / nItemCount;
return nGenlistIndex;
}
g_pFolderViewHandle->pGenGridItc = elm_genlist_item_class_new();
g_pFolderViewHandle->pGenGridItc->item_style = "video/1icon.thumbnail";
g_pFolderViewHandle->pGenGridItc->func.text_get = NULL;
- g_pFolderViewHandle->pGenGridItc->func.content_get = (void *)__mp_folder_item_view_get_icon_of_grid_cb;
+ g_pFolderViewHandle->pGenGridItc->func.content_get =
+ (void *) __mp_folder_item_view_get_icon_of_grid_cb;
g_pFolderViewHandle->pGenGridItc->func.state_get = NULL;
g_pFolderViewHandle->pGenGridItc->func.del = NULL;
g_pFolderViewHandle->pGenGridItc->decorate_item_style = NULL;
MP_DEL_ITC(g_pFolderViewHandle->pGenGridLandscapeItc);
- g_pFolderViewHandle->pGenGridLandscapeItc = elm_genlist_item_class_new();
- g_pFolderViewHandle->pGenGridLandscapeItc->item_style = "video/1icon.thumbnail.landscape";
+ g_pFolderViewHandle->pGenGridLandscapeItc =
+ elm_genlist_item_class_new();
+ g_pFolderViewHandle->pGenGridLandscapeItc->item_style =
+ "video/1icon.thumbnail.landscape";
g_pFolderViewHandle->pGenGridLandscapeItc->func.text_get = NULL;
- g_pFolderViewHandle->pGenGridLandscapeItc->func.content_get = (void *)__mp_folder_item_view_get_icon_of_grid_cb;
+ g_pFolderViewHandle->pGenGridLandscapeItc->func.content_get =
+ (void *) __mp_folder_item_view_get_icon_of_grid_cb;
g_pFolderViewHandle->pGenGridLandscapeItc->func.state_get = NULL;
g_pFolderViewHandle->pGenGridLandscapeItc->func.del = NULL;
g_pFolderViewHandle->pGenGridLandscapeItc->decorate_item_style = NULL;
int nGenlistRow = 0;
- nGenlistRow = mp_folder_item_view_thumbnail_to_genlist_index(nVideoListSize - 1);
+ nGenlistRow =
+ mp_folder_item_view_thumbnail_to_genlist_index(nVideoListSize - 1);
Elm_Object_Item *pTmpVideoGenlistItem = NULL;
if (mp_rotate_ctrl_check_landspace()) {
for (nIndex = 0; nIndex <= nGenlistRow; nIndex++) {
- pTmpVideoGenlistItem = elm_genlist_item_append(pGenlist, g_pFolderViewHandle->pGenGridItc, (void *)nIndex, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- g_pFolderViewWidget->pVideolistItemList = eina_list_append(g_pFolderViewWidget->pVideolistItemList, pTmpVideoGenlistItem);
- elm_object_item_del_cb_set(pTmpVideoGenlistItem, __mp_folder_item_view_video_item_del_cb);
+ pTmpVideoGenlistItem =
+ elm_genlist_item_append(pGenlist,
+ g_pFolderViewHandle->pGenGridItc,
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ g_pFolderViewWidget->pVideolistItemList =
+ eina_list_append(g_pFolderViewWidget->pVideolistItemList,
+ pTmpVideoGenlistItem);
+ elm_object_item_del_cb_set(pTmpVideoGenlistItem,
+ __mp_folder_item_view_video_item_del_cb);
}
} else {
for (nIndex = 0; nIndex <= nGenlistRow; nIndex++) {
- pTmpVideoGenlistItem = elm_genlist_item_append(pGenlist, g_pFolderViewHandle->pGenGridLandscapeItc, (void *)nIndex, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- g_pFolderViewWidget->pVideolistItemList = eina_list_append(g_pFolderViewWidget->pVideolistItemList, pTmpVideoGenlistItem);
- elm_object_item_del_cb_set(pTmpVideoGenlistItem, __mp_folder_item_view_video_item_del_cb);
+ pTmpVideoGenlistItem =
+ elm_genlist_item_append(pGenlist,
+ g_pFolderViewHandle->
+ pGenGridLandscapeItc,
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ g_pFolderViewWidget->pVideolistItemList =
+ eina_list_append(g_pFolderViewWidget->pVideolistItemList,
+ pTmpVideoGenlistItem);
+ elm_object_item_del_cb_set(pTmpVideoGenlistItem,
+ __mp_folder_item_view_video_item_del_cb);
}
}
}
#endif
-/*static void __mp_folder_item_view_append_video_items(void *pVideosGenlist)
-{
- VideoLogInfo("");
-
- int nIndex = 0;
- int nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
-
- VideoFolder_Itc.item_style = "2line.top";
- VideoFolder_Itc.func.text_get = (void*)__mp_folder_item_view_get_label_of_video_item_cb;
- VideoFolder_Itc.func.content_get = (void*)__mp_folder_item_view_get_icon_of_video_item_cb;
- VideoFolder_Itc.func.state_get = NULL;
- VideoFolder_Itc.func.del = NULL;
- VideoFolder_Itc.decorate_item_style = NULL;//"mode/slide4";
- VideoFolder_Itc.decorate_all_item_style = NULL;//"edit_default";
- Elm_Object_Item *pTmpVideoGenlistItem = NULL;
-
- for (nIndex = 0; nIndex < nVideoListSize; nIndex++)
- {
- pTmpVideoGenlistItem = elm_genlist_item_append(pVideosGenlist, &VideoFolder_Itc,
- (void*)nIndex, NULL, ELM_GENLIST_ITEM_NONE, __mp_folder_item_view_select_video_item_cb, NULL);
-
- g_pFolderViewWidget->pVideolistItemList = eina_list_append(g_pFolderViewWidget->pVideolistItemList, pTmpVideoGenlistItem);
- elm_object_item_del_cb_set(pTmpVideoGenlistItem, __mp_folder_item_view_video_item_del_cb);
- }
-}*/
-
static void __mp_folder_item_view_hide_genlist(void)
{
- if (!g_pFolderViewWidget || !g_pFolderViewHandle)
- {
+ if (!g_pFolderViewWidget || !g_pFolderViewHandle) {
VideoLogError("g_pSearchViewWidget == NULL");
return;
}
- elm_object_part_content_unset(g_pFolderViewWidget->pFolderViewBaselayout, SWALLOW_LISTVIEW_CONTENT);
- if (g_pFolderViewHandle->pVideosGenlist)
- {
+ elm_object_part_content_unset(g_pFolderViewWidget->
+ pFolderViewBaselayout,
+ SWALLOW_LISTVIEW_CONTENT);
+ if (g_pFolderViewHandle->pVideosGenlist) {
evas_object_hide(g_pFolderViewHandle->pVideosGenlist);
}
}
static void __mp_folder_item_view_hide_no_layout(void)
{
- if (!g_pFolderViewWidget || !g_pFolderViewHandle)
- {
+ if (!g_pFolderViewWidget || !g_pFolderViewHandle) {
VideoLogError("g_pSearchViewWidget == NULL");
return;
}
- if (g_pFolderViewWidget->pNocontentsLayout)
- {
- elm_object_part_content_unset(g_pFolderViewWidget->pFolderViewBaselayout, SWALLOW_LISTVIEW_CONTENT);
+ if (g_pFolderViewWidget->pNocontentsLayout) {
+ elm_object_part_content_unset(g_pFolderViewWidget->
+ pFolderViewBaselayout,
+ SWALLOW_LISTVIEW_CONTENT);
MP_DEL_OBJ(g_pFolderViewWidget->pNocontentsLayout);
}
}
static Evas_Object *__mp_folder_item_view_add_no_contents_layout()
{
- if (!g_pFolderViewWidget)
- {
+ if (!g_pFolderViewWidget) {
VideoLogError("g_pFolderViewWidget is not existed.");
return NULL;
}
VideoLogInfo("");
MP_DEL_OBJ(g_pFolderViewWidget->pNocontentsLayout);
- g_pFolderViewWidget->pNocontentsLayout = mp_create_nocontent_layout(g_pFolderViewWidget->pFolderViewBaselayout,
- VIDEOS_NOCONTENT_MSG_NO_VIDEOS_IDS,
- NULL);
+ g_pFolderViewWidget->pNocontentsLayout =
+ mp_create_nocontent_layout(g_pFolderViewWidget->
+ pFolderViewBaselayout,
+ VIDEOS_NOCONTENT_MSG_NO_VIDEOS_IDS,
+ NULL);
return g_pFolderViewWidget->pNocontentsLayout;
}
-static bool __mp_folder_item_view_arrange_video_list(int nItemSortType, MpListUpdateType eUpdateType, void *pVideosGenlist)
+static bool __mp_folder_item_view_arrange_video_list(int nItemSortType,
+ MpListUpdateType
+ eUpdateType,
+ void *pVideosGenlist)
{
- if (!g_pFolderViewWidget || !g_pFolderViewHandle)
- {
+ if (!g_pFolderViewWidget || !g_pFolderViewHandle) {
VideoLogError("No exist g_pSearchViewWidget.");
return false;
}
int nVideoListSize = 0;
bool bUnset = FALSE;
- if (eUpdateType == LIST_UPDATE_TYPE_ALL || eUpdateType == LIST_UPDATE_TYPE_DATA)
- {
+ if (eUpdateType == LIST_UPDATE_TYPE_ALL
+ || eUpdateType == LIST_UPDATE_TYPE_DATA) {
mp_util_svc_destory_video_item_list();
- if (g_pFolderViewHandle->pFolderUrl)
- {
- mp_util_svc_extract_video_list_from_folder(g_pFolderViewHandle->pFolderUrl, nItemSortType, MP_LIST_VIEW_ALL);
+ if (g_pFolderViewHandle->pFolderUrl) {
+ mp_util_svc_extract_video_list_from_folder
+ (g_pFolderViewHandle->pFolderUrl, nItemSortType,
+ MP_LIST_VIEW_ALL);
}
}
nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
elm_genlist_clear(pVideosGenlist);
- //__mp_folder_item_view_update_count_layout();
-
- if (nVideoListSize > 0)
- {
+ if (nVideoListSize > 0) {
__mp_folder_item_view_free_video_genlistItem();
if (g_pFolderViewWidget->pNocontentsLayout) {
__mp_folder_item_view_hide_no_layout();
bUnset = TRUE;
}
- //__mp_folder_item_view_append_video_items(pVideosGenlist);
__mp_folder_item_view_append_grid_layout(pVideosGenlist);
if (bUnset) {
- elm_object_part_content_set(g_pFolderViewWidget->pFolderViewBaselayout, SWALLOW_LISTVIEW_CONTENT, pVideosGenlist);
+ elm_object_part_content_set(g_pFolderViewWidget->
+ pFolderViewBaselayout,
+ SWALLOW_LISTVIEW_CONTENT,
+ pVideosGenlist);
evas_object_show(pVideosGenlist);
}
- }
- else
- {
+ } else {
__mp_folder_item_view_hide_genlist();
__mp_folder_item_view_add_no_contents_layout();
- elm_object_part_content_set(g_pFolderViewWidget->pFolderViewBaselayout, SWALLOW_LISTVIEW_CONTENT, g_pFolderViewWidget->pNocontentsLayout);
+ elm_object_part_content_set(g_pFolderViewWidget->
+ pFolderViewBaselayout,
+ SWALLOW_LISTVIEW_CONTENT,
+ g_pFolderViewWidget->
+ pNocontentsLayout);
evas_object_show(g_pFolderViewWidget->pNocontentsLayout);
}
- //__mp_folder_item_view_update_count_layout();
return true;
}
mp_ft_ctrl_hide_more_popup();
char *szFolderPath = NULL;
- szFolderPath = mp_util_svc_get_video_folder_url(g_pFolderViewHandle->nFolder_index);
- mp_search_view_push((void *)mp_mgr_get_library_naviframe(), szFolderPath);
+ szFolderPath =
+ mp_util_svc_get_video_folder_url(g_pFolderViewHandle->
+ nFolder_index);
+ mp_search_view_push((void *) mp_mgr_get_library_naviframe(),
+ szFolderPath);
MP_FREE_STRING(szFolderPath);
- mp_search_view_register_update_list_func(__mp_folder_item_view_result_user_cb, __mp_folder_item_view_result_view_update_cb);
+ mp_search_view_register_update_list_func
+ (__mp_folder_item_view_result_user_cb,
+ __mp_folder_item_view_result_view_update_cb);
}
-void __mp_folder_item_view_search_item_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+void __mp_folder_item_view_search_item_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
}
// Naviframe title button
-Evas_Object *__mp_folder_item_view_create_title_btn(Evas_Object *pParent, Evas_Smart_Cb pFunc)
+Evas_Object *__mp_folder_item_view_create_title_btn(Evas_Object * pParent,
+ Evas_Smart_Cb pFunc)
{
VideoLogInfo("");
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_IMAGE_NAME_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_IMAGE_NAME_EDJ);
free(path);
Evas_Object *search_ic = elm_image_add(pParent);
elm_image_file_set(search_ic, edj_path, VIDEO_LIST_VIEW_ICON_SEARCH);
// Smart callback of Genlist.
-/*static void __mp_folder_item_view_thumbnail_update_cb(int nError, const char *szPath, void *pUserData)
-{
- int nVideoItemIndex = (int)pUserData;
-
- VideoLogInfo("Index : %d", nVideoItemIndex);
-
- if (!g_pFolderViewHandle) {
- VideoLogError("g_pFolderViewWidget is not existed.");
- return;
- }
-
- if (!g_pFolderViewWidget) {
- VideoLogError("g_pFolderViewWidget is not existed.");
- return;
- }
-
- mp_util_svc_update_thumbnail_info(nVideoItemIndex);
-
- if (g_pFolderViewWidget->pVideolistItemList) {
- Elm_Object_Item *pTmpVideoGenlistItem = (Elm_Object_Item*)eina_list_nth(g_pFolderViewWidget->pVideolistItemList, nVideoItemIndex);
- if (pTmpVideoGenlistItem) {
- elm_genlist_item_fields_update(pTmpVideoGenlistItem, "elm.icon.1", ELM_GENLIST_ITEM_FIELD_CONTENT);
- } else {
- VideoLogInfo("[ERR] Fail to update genlist filed thumbnail icon.");
- }
- } else {
- VideoLogInfo("[ERR] No exist g_pFolderViewWidget->pVideolistItemList.");
- }
- // elm_genlist_realized_items_update(g_pMainViewHandle->pVideosGenlist);
-}*/
-
-static void __mp_folder_item_view_realize_genlist_item_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_folder_item_view_realize_genlist_item_cb(void *pUserData,
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
if (!pEventInfo) {
VideoLogError("invalid pEveninfo");
}
if (elm_config_access_get()) {
VideoLogWarning("Support TTS.");
- const Eina_List *org = elm_object_item_access_order_get(pEventInfo);
- Evas_Object *content = elm_object_item_part_content_get(pEventInfo, "elm.icon");
- if (content && !eina_list_data_find(org, content)) {
- Evas_Object *tmp;
- Eina_List *l;
- Eina_List *items = NULL;
- // Duplicate original access order
- EINA_LIST_FOREACH((Eina_List *)org, l, tmp)
- items = eina_list_append(items, tmp);
- Evas_Object *ao = elm_access_object_register(content, pObject);
- items = eina_list_append(items, ao);
- elm_object_item_access_order_set(pEventInfo, items);
- }
+ const Eina_List *org =
+ elm_object_item_access_order_get(pEventInfo);
+ Evas_Object *content =
+ elm_object_item_part_content_get(pEventInfo, "elm.icon");
+ if (content && !eina_list_data_find(org, content)) {
+ Evas_Object *tmp;
+ Eina_List *l;
+ Eina_List *items = NULL;
+ // Duplicate original access order
+ EINA_LIST_FOREACH((Eina_List *) org, l, tmp)
+ items = eina_list_append(items, tmp);
+ Evas_Object *ao = elm_access_object_register(content, pObject);
+ items = eina_list_append(items, ao);
+ elm_object_item_access_order_set(pEventInfo, items);
+ }
}
}
int nSortType = MP_MEDIA_SORT_BY_RECENTLY_VIEWED;
- switch (mp_sort_ctrl_get_sort_state())
- {
- /*case MP_LIST_SORT_BY_RECENTLY_VIEWED:
- nSortType = MP_MEDIA_SORT_BY_RECENTLY_VIEWED;
- break;*/
-
+ switch (mp_sort_ctrl_get_sort_state()) {
case MP_LIST_SORT_BY_RECENTLY_ADDED:
nSortType = MP_MEDIA_SORT_BY_RECENTLY_ADDED;
break;
case MP_LIST_SORT_BY_NAME:
nSortType = MP_MEDIA_SORT_BY_NAME;
break;
-
- /*case MP_LIST_SORT_BY_SIZE:
- nSortType = MP_MEDIA_SORT_BY_SIZE;
- break;
-
- case MP_LIST_SORT_BY_TYPE:
- nSortType = MP_MEDIA_SORT_BY_TYPE;
- break;*/
}
VideoLogInfo("current sorttype = %d", nSortType);
static void __mp_folder_item_view_update_video_items(void *pVideosGenlist)
{
if (!pVideosGenlist) {
- VideoLogInfo("[ERR] pVideosGenlist or g_pMainViewWidget are NULL.");
+ VideoLogInfo
+ ("[ERR] pVideosGenlist or g_pMainViewWidget are NULL.");
return;
}
VideoLogInfo("");
Elm_Object_Item *pNextGenlistItem = NULL;
- Elm_Object_Item *pCurrGenlistItem = elm_genlist_first_item_get(pVideosGenlist);
+ Elm_Object_Item *pCurrGenlistItem =
+ elm_genlist_first_item_get(pVideosGenlist);
- while (pCurrGenlistItem)
- {
+ while (pCurrGenlistItem) {
pNextGenlistItem = elm_genlist_item_next_get(pCurrGenlistItem);
elm_genlist_item_update(pCurrGenlistItem);
static void __mp_folder_item_view_db_result_data_update_cb(void)
{
- if (!g_pFolderViewHandle)
- {
- VideoLogInfo("g_pFolderViewHandle handles of list view are not existed.");
+ if (!g_pFolderViewHandle) {
+ VideoLogInfo
+ ("g_pFolderViewHandle handles of list view are not existed.");
return;
}
VideoLogInfo("");
- if (!g_pFolderViewHandle->pVideosGenlist)
- {
+ if (!g_pFolderViewHandle->pVideosGenlist) {
VideoLogInfo("g_pMainViewHandle->pVideosGenlist is NULL.");
return;
}
- if (g_pFolderViewHandle->pFolderUrl)
- {
+ if (g_pFolderViewHandle->pFolderUrl) {
mp_util_svc_destory_video_item_list();
- mp_util_svc_extract_video_list_from_folder(g_pFolderViewHandle->pFolderUrl, __mp_folder_item_view_get_sort_type(), MP_LIST_VIEW_ALL);
- //mp_util_svc_ctrl_sort_list(mp_sort_ctrl_get_sort_state());
- }
- else
- {
+ mp_util_svc_extract_video_list_from_folder(g_pFolderViewHandle->
+ pFolderUrl,
+ __mp_folder_item_view_get_sort_type
+ (), MP_LIST_VIEW_ALL);
+ } else {
VideoLogError("url is NULL.");
}
- __mp_folder_item_view_update_video_items(g_pFolderViewHandle->pVideosGenlist);
+ __mp_folder_item_view_update_video_items(g_pFolderViewHandle->
+ pVideosGenlist);
}
static void __mp_folder_item_view_result_view_update_cb(void)
{
- if (!g_pFolderViewHandle)
- {
+ if (!g_pFolderViewHandle) {
VideoLogInfo("Main handles of list view are not existed.");
return;
}
VideoLogInfo("");
- if (g_pFolderViewHandle->pFolderUrl)
- {
+ if (g_pFolderViewHandle->pFolderUrl) {
mp_util_svc_destory_video_item_list();
- mp_util_svc_extract_video_list_from_folder(g_pFolderViewHandle->pFolderUrl, mp_sort_ctrl_get_sort_state(), MP_LIST_VIEW_ALL);
- }
- else
- {
+ mp_util_svc_extract_video_list_from_folder(g_pFolderViewHandle->
+ pFolderUrl,
+ mp_sort_ctrl_get_sort_state
+ (), MP_LIST_VIEW_ALL);
+ } else {
VideoLogError("url is NULL.");
}
-// __mp_folder_item_view_check_search_button_enable();
__mp_folder_item_view_update_video_list(LIST_UPDATE_TYPE_ALL);
VideoLogInfo("");
}
-static void __mp_folder_item_view_result_user_cb(MpListUpdateType eUpdateType)
+static void __mp_folder_item_view_result_user_cb(MpListUpdateType
+ eUpdateType)
{
- if (!g_pFolderViewHandle)
- {
+ if (!g_pFolderViewHandle) {
VideoLogInfo("Main handles of list view are not existed.");
return;
}
VideoLogInfo("");
- if (__mp_folder_item_view_update_video_list(eUpdateType))
- {
- Elm_Object_Item *pItem = elm_genlist_first_item_get(g_pFolderViewHandle->pVideosGenlist);
- if (pItem)
- {
+ if (__mp_folder_item_view_update_video_list(eUpdateType)) {
+ Elm_Object_Item *pItem =
+ elm_genlist_first_item_get(g_pFolderViewHandle->
+ pVideosGenlist);
+ if (pItem) {
elm_genlist_item_bring_in(pItem, ELM_GENLIST_ITEM_SCROLLTO_IN);
}
}
}
-static void __mp_folder_item_view_delete_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_folder_item_view_delete_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
- if (!g_pFolderViewHandle)
- {
+ if (!g_pFolderViewHandle) {
VideoLogError("g_pFolderViewHandle == NULL");
return;
}
mp_ft_ctrl_hide_more_popup();
char *szFolderPath = NULL;
- szFolderPath = mp_util_svc_get_video_folder_url(g_pFolderViewHandle->nFolder_index);
-
- mp_remove_view_push(g_pFolderViewHandle->pNaviFrameHandle, __mp_folder_item_view_result_user_cb, __mp_folder_item_view_result_view_update_cb, szFolderPath, LIST_TAB_TYPE_PERSONAL);
+ szFolderPath =
+ mp_util_svc_get_video_folder_url(g_pFolderViewHandle->
+ nFolder_index);
+
+ mp_remove_view_push(g_pFolderViewHandle->pNaviFrameHandle,
+ __mp_folder_item_view_result_user_cb,
+ __mp_folder_item_view_result_view_update_cb,
+ szFolderPath, LIST_TAB_TYPE_PERSONAL);
MP_FREE_STRING(szFolderPath);
}
-static void __mp_folder_item_view_sort_item_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_folder_item_view_sort_item_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
}
-void __mp_folder_item_view_auto_play_cb(void *pUserData, Evas_Object *pObject,
- void *pEventInfo)
+void __mp_folder_item_view_auto_play_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
mp_ft_ctrl_hide_more_popup();
}
-void __mp_folder_item_view_rename_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+void __mp_folder_item_view_rename_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
- if (!g_pFolderViewHandle)
- {
+ if (!g_pFolderViewHandle) {
VideoLogError("g_pFolderViewHandle == NULL");
return;
}
mp_ft_ctrl_hide_more_popup();
char *szFolderPath = NULL;
- szFolderPath = mp_util_svc_get_video_folder_url(g_pFolderViewHandle->nFolder_index);
- mp_select_view_push((void *)mp_mgr_get_library_naviframe(), g_pFolderViewHandle->pNaviFrameItem,__mp_folder_item_view_result_user_cb, szFolderPath, SELECT_TYPE_RENAME, LIST_TAB_TYPE_PERSONAL);
+ szFolderPath =
+ mp_util_svc_get_video_folder_url(g_pFolderViewHandle->
+ nFolder_index);
+ mp_select_view_push((void *) mp_mgr_get_library_naviframe(),
+ g_pFolderViewHandle->pNaviFrameItem,
+ __mp_folder_item_view_result_user_cb, szFolderPath,
+ SELECT_TYPE_RENAME, LIST_TAB_TYPE_PERSONAL);
MP_FREE_STRING(szFolderPath);
}
-/*void __mp_folder_item_view_details_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
-{
- if (!g_pFolderViewHandle)
- {
- VideoLogError("g_pFolderViewHandle == NULL");
- return;
- }
-
- VideoLogInfo("");
- mp_ft_ctrl_hide_more_popup();
- char *szFolderPath = NULL;
- szFolderPath = mp_util_svc_get_video_folder_url(g_pFolderViewHandle->nFolder_index);
- mp_select_view_push((void *)mp_mgr_get_library_naviframe(), g_pFolderViewHandle->pNaviFrameItem, NULL, szFolderPath, SELECT_TYPE_DETAIL, LIST_TAB_TYPE_PERSONAL);
- MP_FREE_STRING(szFolderPath);
-
-}*/
-
-static void __mp_folder_item_view_download_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_folder_item_view_download_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
- if (!g_pFolderViewHandle)
- {
+ if (!g_pFolderViewHandle) {
VideoLogError("g_pFolderViewHandle == NULL");
return;
}
mp_ft_ctrl_hide_more_popup();
}
-static void __mp_folder_item_view_share_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_folder_item_view_share_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
- if (!g_pFolderViewHandle)
- {
+ if (!g_pFolderViewHandle) {
VideoLogInfo("Main handles of list view are not existed.");
return;
}
mp_ft_ctrl_hide_more_popup();
char *szFolderPath = NULL;
- szFolderPath = mp_util_svc_get_video_folder_url(g_pFolderViewHandle->nFolder_index);
+ szFolderPath =
+ mp_util_svc_get_video_folder_url(g_pFolderViewHandle->
+ nFolder_index);
- mp_share_view_push(g_pFolderViewHandle->pNaviFrameHandle, __mp_folder_item_view_result_view_update_cb, szFolderPath, LIST_TAB_TYPE_PERSONAL);
+ mp_share_view_push(g_pFolderViewHandle->pNaviFrameHandle,
+ __mp_folder_item_view_result_view_update_cb,
+ szFolderPath, LIST_TAB_TYPE_PERSONAL);
MP_FREE_STRING(szFolderPath);
}
+
#ifdef ENABLE_PRIVATE_MODE
-static void __mp_folder_item_view_add_personal_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_folder_item_view_add_personal_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
- if (!g_pFolderViewHandle)
- {
+ if (!g_pFolderViewHandle) {
VideoLogInfo("Main handles of list view are not existed.");
return;
}
mp_ft_ctrl_hide_more_popup();
char *szFolderPath = NULL;
- szFolderPath = mp_util_svc_get_video_folder_url(g_pFolderViewHandle->nFolder_index);
+ szFolderPath =
+ mp_util_svc_get_video_folder_url(g_pFolderViewHandle->
+ nFolder_index);
- mp_personal_view_push(g_pFolderViewHandle->pNaviFrameHandle, __mp_folder_item_view_result_user_cb, szFolderPath, 0);
+ mp_personal_view_push(g_pFolderViewHandle->pNaviFrameHandle,
+ __mp_folder_item_view_result_user_cb,
+ szFolderPath, 0);
MP_FREE_STRING(szFolderPath);
}
-static void __mp_folder_item_view_remove_personal_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_folder_item_view_remove_personal_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
- if (!g_pFolderViewHandle)
- {
+ if (!g_pFolderViewHandle) {
VideoLogInfo("Main handles of list view are not existed.");
return;
}
mp_ft_ctrl_hide_more_popup();
char *szFolderPath = NULL;
- szFolderPath = mp_util_svc_get_video_folder_url(g_pFolderViewHandle->nFolder_index);
- mp_personal_view_push(g_pFolderViewHandle->pNaviFrameHandle, __mp_folder_item_view_result_user_cb, szFolderPath, 1);
+ szFolderPath =
+ mp_util_svc_get_video_folder_url(g_pFolderViewHandle->
+ nFolder_index);
+ mp_personal_view_push(g_pFolderViewHandle->pNaviFrameHandle,
+ __mp_folder_item_view_result_user_cb,
+ szFolderPath, 1);
MP_FREE_STRING(szFolderPath);
}
#endif
#ifdef ENABLE_LONGPRESS
-static void __mp_folder_item_view_share_via_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_folder_item_view_share_via_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
mp_option_ctrl_delete_handle();
- if (!g_pFolderViewHandle)
- {
+ if (!g_pFolderViewHandle) {
VideoLogError("g_pFolderViewHandle of list view are not existed.");
return;
}
- int videoItemIndex = (int)pUserData;
+ int videoItemIndex = (int) pUserData;
char *pVideo_url = mp_util_svc_get_video_url(videoItemIndex);
#ifdef ENABLE_DRM_FEATURE
bool bDRMLock = FALSE;
- mp_util_check_drm_lock((const char*)pVideo_url, &bDRMLock);
- if (bDRMLock)
- {
+ mp_util_check_drm_lock((const char *) pVideo_url, &bDRMLock);
+ if (bDRMLock) {
MP_FREE_STRING(pVideo_url);
- mp_util_notify_popup(NULL, VIDEOS_COMMON_HEADER_ERROR, VIDEOS_NOTIPOP_MSG_UNABLE_TO_SHARE_DRM_FILE, __mp_folder_item_view_warning_popup_cb);
+ mp_util_notify_popup(NULL, VIDEOS_COMMON_HEADER_ERROR,
+ VIDEOS_NOTIPOP_MSG_UNABLE_TO_SHARE_DRM_FILE,
+ __mp_folder_item_view_warning_popup_cb);
return;
}
#endif
}
#ifdef ENABLE_LONGPRESS
-static void __mp_folder_item_view_add_to_home_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_folder_item_view_add_to_home_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
mp_option_ctrl_delete_handle();
- if (!g_pFolderViewHandle)
- {
+ if (!g_pFolderViewHandle) {
VideoLogInfo("g_pFolderViewHandle of list view are not existed.");
return;
}
- int nVideoItemIndex = (int)pUserData;
+ int nVideoItemIndex = (int) pUserData;
VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
char *pVideo_id = mp_util_svc_get_video_id_by_index(nVideoItemIndex);
- char *pVideo_thumbnail = mp_util_svc_get_video_thumbnail(nVideoItemIndex);
- if (pVideo_id)
- {
-// if (!mp_util_add_to_home(pVideo_id, pVideo_thumbnail))
+ char *pVideo_thumbnail =
+ mp_util_svc_get_video_thumbnail(nVideoItemIndex);
+ if (pVideo_id) {
{
mp_util_status_bar_noti_popup_show(MP_COM_OPT_UNABLE_ADDED);
}
- }
- else
- {
+ } else {
VideoLogError("[ERR] No exist file uri.");
}
MP_FREE_STRING(pVideo_id);
}
#endif
-#if 0 //Unused function
-bool __mp_folder_item_view_get_detail_info(int nVideoItemIndex, stDetailInfo **pDetailInfo)
+#if 0 //Unused function
+bool __mp_folder_item_view_get_detail_info(int nVideoItemIndex,
+ stDetailInfo ** pDetailInfo)
{
char *szFilePath = NULL;
char *szVideoTitle = NULL;
- char szTmpStr[FORMAT_LEN_MAX] = {0,};
- char szTmpFileDate[FORMAT_LEN_MAX] = {0,};
- char szTmpFileExtension[FORMAT_LEN_MAX] = {0,};
- char szTmpFileSize[FORMAT_LEN_MAX] = {0,};
+ char szTmpStr[FORMAT_LEN_MAX] = { 0, };
+ char szTmpFileDate[FORMAT_LEN_MAX] = { 0, };
+ char szTmpFileExtension[FORMAT_LEN_MAX] = { 0, };
+ char szTmpFileSize[FORMAT_LEN_MAX] = { 0, };
char *szTmpModifiedTime = NULL;
- //double dLongitude = 0.0;
- //double dLatitude = 0.0;
-
int nWidth = 0;
int nHeight = 0;
stDetailInfo *pDetail = NULL;
szFilePath = mp_util_svc_get_video_url(nVideoItemIndex);
szVideoTitle = mp_util_svc_get_video_title(nVideoItemIndex);
- mp_info_ctrl_get_file_info(szFilePath, szTmpFileDate, FORMAT_LEN_MAX-1, szTmpFileExtension, FORMAT_LEN_MAX-1, szTmpFileSize, FORMAT_LEN_MAX-1);
+ mp_info_ctrl_get_file_info(szFilePath, szTmpFileDate,
+ FORMAT_LEN_MAX - 1, szTmpFileExtension,
+ FORMAT_LEN_MAX - 1, szTmpFileSize,
+ FORMAT_LEN_MAX - 1);
nWidth = mp_util_svc_get_video_item_width(nVideoItemIndex);
nHeight = mp_util_svc_get_video_item_height(nVideoItemIndex);
- //dLongitude = mp_util_svc_get_video_item_longitude(nVideoItemIndex);
- //dLatitude = mp_util_svc_get_video_item_latitude(nVideoItemIndex);
- szTmpModifiedTime = mp_util_svc_get_video_item_modified_time(nVideoItemIndex);
+ szTmpModifiedTime =
+ mp_util_svc_get_video_item_modified_time(nVideoItemIndex);
pDetail = calloc(1, sizeof(stDetailInfo));
if (!pDetail) {
pDetail->szLocation = vp_util_convert_file_location(szFilePath);
MP_FREE_STRING(szFilePath);
- snprintf(szTmpStr, FORMAT_LEN_MAX-1, "%s", szTmpFileExtension);
- pDetail->szFormat= g_strdup(szTmpStr);
+ snprintf(szTmpStr, FORMAT_LEN_MAX - 1, "%s", szTmpFileExtension);
+ pDetail->szFormat = g_strdup(szTmpStr);
memset(szTmpStr, 0, FORMAT_LEN_MAX);
- /*snprintf(szTmpStr, FORMAT_LEN_MAX-1, "%s", szTmpFileDate);
- pDetail->szDate = g_strdup(szTmpStr);
- memset(szTmpStr, 0, FORMAT_LEN_MAX);*/
-
- snprintf(szTmpStr, FORMAT_LEN_MAX-1, "%s", szTmpFileSize);
+ snprintf(szTmpStr, FORMAT_LEN_MAX - 1, "%s", szTmpFileSize);
pDetail->szSize = g_strdup(szTmpStr);
memset(szTmpStr, 0, FORMAT_LEN_MAX);
pDetail->szLastModifiedTime = g_strdup(szTmpModifiedTime);
MP_FREE_STRING(szTmpModifiedTime);
- snprintf(szTmpStr, FORMAT_LEN_MAX-1, "%d X %d", nWidth, nHeight);
+ snprintf(szTmpStr, FORMAT_LEN_MAX - 1, "%d X %d", nWidth, nHeight);
pDetail->szResolution = g_strdup(szTmpStr);
memset(szTmpStr, 0, FORMAT_LEN_MAX);
- /*snprintf(szTmpStr, FORMAT_LEN_MAX-1, "%f", dLatitude);
- pDetail->szLatitude = g_strdup(szTmpStr);
- memset(szTmpStr, 0, FORMAT_LEN_MAX);
-
- snprintf(szTmpStr, FORMAT_LEN_MAX-1, "%f", dLongitude);
- pDetail->szLongitude = g_strdup(szTmpStr);
- memset(szTmpStr, 0, FORMAT_LEN_MAX);*/
*pDetailInfo = pDetail;
return TRUE;
}
#ifdef ENABLE_LONGPRESS
static void __mp_folder_item_view_normal_result_popup()
{
- if (!g_pFolderViewHandle)
- {
+ if (!g_pFolderViewHandle) {
VideoLogError("Invalid list and object");
return;
}
- evas_object_data_set(g_pFolderViewHandle->pVideosGenlist, "popup", NULL);
+ evas_object_data_set(g_pFolderViewHandle->pVideosGenlist, "popup",
+ NULL);
elm_object_scroll_freeze_pop(g_pFolderViewHandle->pVideosGenlist);
}
-static void __mp_folder_item_view_long_press_item_cb(void *data, Evas_Object *obj, void *pEventInfo)
+static void __mp_folder_item_view_long_press_item_cb(void *data,
+ Evas_Object * obj,
+ void *pEventInfo)
{
if (!g_pFolderViewHandle || !pEventInfo) {
VideoLogError("Invalid list");
return;
}
- Elm_Object_Item *long_item = (Elm_Object_Item *)pEventInfo;
+ Elm_Object_Item *long_item = (Elm_Object_Item *) pEventInfo;
- //elm_genlist_item_selected_set(long_item, EINA_FALSE);
int nIndexGenlist = elm_genlist_item_index_get(long_item);
VideoLogDebug("nIndexGenlist : %d", nIndexGenlist);
- if (nIndexGenlist < 0 || nIndexGenlist >= mp_util_svc_get_video_list_size_for_checking_index())
- {
+ if (nIndexGenlist < 0
+ || nIndexGenlist >=
+ mp_util_svc_get_video_list_size_for_checking_index()) {
VideoSecureLogError("nVideoItemIndex is invalid");
return;
}
- st_RegisteOptionCbFunc *pRegisteCbFunc = (st_RegisteOptionCbFunc*)calloc(1, sizeof(st_RegisteOptionCbFunc));
+ st_RegisteOptionCbFunc *pRegisteCbFunc =
+ (st_RegisteOptionCbFunc *) calloc(1,
+ sizeof(st_RegisteOptionCbFunc));
if (pRegisteCbFunc) {
- pRegisteCbFunc->ShareViaItemCb= (void*)__mp_folder_item_view_share_via_cb;
- pRegisteCbFunc->AddToHomeItemCb= (void*)__mp_folder_item_view_add_to_home_cb;
- //pRegisteCbFunc->RenameItemCb = (void*)__mp_folder_item_view_rename_popup_cb;
- //pRegisteCbFunc->DetailsItemCb= (void*)__mp_folder_item_view_detail_cb;
- pRegisteCbFunc->DeleteItemCb = (void*)__mp_folder_item_view_delete_btn_cb;
+ pRegisteCbFunc->ShareViaItemCb =
+ (void *) __mp_folder_item_view_share_via_cb;
+ pRegisteCbFunc->AddToHomeItemCb =
+ (void *) __mp_folder_item_view_add_to_home_cb;
+ pRegisteCbFunc->DeleteItemCb =
+ (void *) __mp_folder_item_view_delete_btn_cb;
}
char *title = mp_util_svc_get_video_title(nIndexGenlist);
mp_option_ctrl_show(g_pFolderViewHandle->pNaviFrameHandle,
- (const char*)title, nIndexGenlist, pRegisteCbFunc, __mp_folder_item_view_normal_result_popup, NULL, 0);
- if (mp_option_ctrl_get_handle())
- {
- evas_object_data_set(g_pFolderViewHandle->pVideosGenlist, "popup", mp_option_ctrl_get_handle());
+ (const char *) title, nIndexGenlist,
+ pRegisteCbFunc,
+ __mp_folder_item_view_normal_result_popup, NULL,
+ 0);
+ if (mp_option_ctrl_get_handle()) {
+ evas_object_data_set(g_pFolderViewHandle->pVideosGenlist, "popup",
+ mp_option_ctrl_get_handle());
elm_object_scroll_freeze_push(g_pFolderViewHandle->pVideosGenlist);
}
MP_FREE_STRING(pRegisteCbFunc);
}
#endif
-void __mp_folder_item_view_language_changed(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+void __mp_folder_item_view_language_changed(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
if (!pObject) {
static void __mp_folder_item_view_del_genlist_cb(void)
{
if (!g_pFolderViewHandle || !g_pFolderViewHandle->pVideosGenlist) {
- VideoSecureLogError("g_pFolderViewHandle or pVideosGenlist is NULL");
+ VideoSecureLogError
+ ("g_pFolderViewHandle or pVideosGenlist is NULL");
return;
}
VideoLogInfo("");
- evas_object_smart_callback_del(g_pFolderViewHandle->pVideosGenlist, "language,changed", __mp_folder_item_view_language_changed);
- evas_object_smart_callback_del(g_pFolderViewHandle->pVideosGenlist, "realized", __mp_folder_item_view_realize_genlist_item_cb);
+ evas_object_smart_callback_del(g_pFolderViewHandle->pVideosGenlist,
+ "language,changed",
+ __mp_folder_item_view_language_changed);
+ evas_object_smart_callback_del(g_pFolderViewHandle->pVideosGenlist,
+ "realized",
+ __mp_folder_item_view_realize_genlist_item_cb);
#ifdef ENABLE_LONGPRESS
- evas_object_smart_callback_del(g_pFolderViewHandle->pVideosGenlist, "longpressed", __mp_folder_item_view_long_press_item_cb);
+ evas_object_smart_callback_del(g_pFolderViewHandle->pVideosGenlist,
+ "longpressed",
+ __mp_folder_item_view_long_press_item_cb);
#endif
}
}
VideoLogInfo("");
- evas_object_smart_callback_add(g_pFolderViewHandle->pVideosGenlist, "language,changed", __mp_folder_item_view_language_changed, NULL);
- evas_object_smart_callback_add(g_pFolderViewHandle->pVideosGenlist, "realized", __mp_folder_item_view_realize_genlist_item_cb, NULL);
+ evas_object_smart_callback_add(g_pFolderViewHandle->pVideosGenlist,
+ "language,changed",
+ __mp_folder_item_view_language_changed,
+ NULL);
+ evas_object_smart_callback_add(g_pFolderViewHandle->pVideosGenlist,
+ "realized",
+ __mp_folder_item_view_realize_genlist_item_cb,
+ NULL);
#ifdef ENABLE_LONGPRESS
- evas_object_smart_callback_add(g_pFolderViewHandle->pVideosGenlist, "longpressed", __mp_folder_item_view_long_press_item_cb, NULL);
+ evas_object_smart_callback_add(g_pFolderViewHandle->pVideosGenlist,
+ "longpressed",
+ __mp_folder_item_view_long_press_item_cb,
+ NULL);
#endif
}
-static bool __mp_folder_item_view_update_video_list(MpListUpdateType eUpdateType)
+static bool __mp_folder_item_view_update_video_list(MpListUpdateType
+ eUpdateType)
{
- if (!g_pFolderViewHandle || !g_pFolderViewWidget || !g_pFolderViewHandle->pVideosGenlist) {
+ if (!g_pFolderViewHandle || !g_pFolderViewWidget
+ || !g_pFolderViewHandle->pVideosGenlist) {
VideoLogError("handles of list view are not existed.");
return false;
}
__mp_folder_item_view_del_genlist_cb();
- bool bRet = __mp_folder_item_view_arrange_video_list(__mp_folder_item_view_get_sort_type(), eUpdateType, g_pFolderViewHandle->pVideosGenlist);
+ bool bRet =
+ __mp_folder_item_view_arrange_video_list
+ (__mp_folder_item_view_get_sort_type(), eUpdateType,
+ g_pFolderViewHandle->pVideosGenlist);
int nVideoListSize = 0;
if (bRet) {
nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
if (nVideoListSize > 0) {
VideoLogInfo("listsize:%d", nVideoListSize);
g_pFolderViewHandle->currentItemCount = nVideoListSize;
- __mp_folder_item_view_add_genlist_cb(g_pFolderViewHandle->pVideosGenlist);
+ __mp_folder_item_view_add_genlist_cb(g_pFolderViewHandle->
+ pVideosGenlist);
}
}
}
if (g_pFolderViewHandle->pFolderUrl) {
- VideoSecureLogInfo("szFolderPath : %s", g_pFolderViewHandle->pFolderUrl);
- if (vp_file_exists(g_pFolderViewHandle->pFolderUrl))
- {
+ VideoSecureLogInfo("szFolderPath : %s",
+ g_pFolderViewHandle->pFolderUrl);
+ if (vp_file_exists(g_pFolderViewHandle->pFolderUrl)) {
//update video-list
VideoLogInfo("update folder item");
__mp_folder_item_view_result_user_cb(LIST_UPDATE_TYPE_ALL);
- }
- else
- {
+ } else {
VideoLogInfo("pop folder item");
elm_naviframe_item_pop(g_pFolderViewHandle->pNaviFrameHandle);
}
{
int nVideoListSize = g_pFolderViewHandle->currentItemCount;
- if (nVideoListSize == 0)
- {
+ if (nVideoListSize == 0) {
__mp_folder_item_view_update_video_list(LIST_UPDATE_TYPE_ALL);
return;
}
- if (!g_pFolderViewHandle || !g_pFolderViewWidget || !g_pFolderViewWidget->pVideolistItemList)
- {
+ if (!g_pFolderViewHandle || !g_pFolderViewWidget
+ || !g_pFolderViewWidget->pVideolistItemList) {
VideoLogWarning("[WARNING] g_pFolderViewWidget is not existed.");
return;
}
- Elm_Object_Item *pTmpVideoGenlistItem = (Elm_Object_Item*)eina_list_nth(g_pFolderViewWidget->pVideolistItemList, nVideoItemIndex);
- if (!pTmpVideoGenlistItem)
- {
+ Elm_Object_Item *pTmpVideoGenlistItem =
+ (Elm_Object_Item *) eina_list_nth(g_pFolderViewWidget->
+ pVideolistItemList,
+ nVideoItemIndex);
+ if (!pTmpVideoGenlistItem) {
VideoLogWarning("[WARNING] pVideolistItemList is not existed.");
return;
}
Elm_Object_Item *pNextGenlistItem = NULL;
- Elm_Object_Item *pCurrGenlistItem = elm_genlist_item_next_get(pTmpVideoGenlistItem);
+ Elm_Object_Item *pCurrGenlistItem =
+ elm_genlist_item_next_get(pTmpVideoGenlistItem);
- g_pFolderViewWidget->pVideolistItemList = eina_list_remove(g_pFolderViewWidget->pVideolistItemList, pTmpVideoGenlistItem);
+ g_pFolderViewWidget->pVideolistItemList =
+ eina_list_remove(g_pFolderViewWidget->pVideolistItemList,
+ pTmpVideoGenlistItem);
elm_object_item_del(pTmpVideoGenlistItem);
- if (!pCurrGenlistItem)
- {
+ if (!pCurrGenlistItem) {
return;
}
- while (pCurrGenlistItem)
- {
+ while (pCurrGenlistItem) {
pNextGenlistItem = elm_genlist_item_next_get(pCurrGenlistItem);
- g_pFolderViewWidget->pVideolistItemList = eina_list_remove(g_pFolderViewWidget->pVideolistItemList, pCurrGenlistItem);
+ g_pFolderViewWidget->pVideolistItemList =
+ eina_list_remove(g_pFolderViewWidget->pVideolistItemList,
+ pCurrGenlistItem);
elm_object_item_del(pCurrGenlistItem);
pCurrGenlistItem = pNextGenlistItem;
}
int nIndex = nVideoItemIndex;
- for (nIndex = nVideoItemIndex; nIndex < nVideoListSize; nIndex++)
- {
- pTmpVideoGenlistItem = elm_genlist_item_append(g_pFolderViewHandle->pVideosGenlist, &VideoFolder_Itc,
- (void*)nIndex, NULL, ELM_GENLIST_ITEM_NONE, __mp_folder_item_view_select_video_item_cb, NULL);
- g_pFolderViewWidget->pVideolistItemList = eina_list_append(g_pFolderViewWidget->pVideolistItemList, pTmpVideoGenlistItem);
+ for (nIndex = nVideoItemIndex; nIndex < nVideoListSize; nIndex++) {
+ pTmpVideoGenlistItem =
+ elm_genlist_item_append(g_pFolderViewHandle->pVideosGenlist,
+ &VideoFolder_Itc, (void *) nIndex,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ __mp_folder_item_view_select_video_item_cb,
+ NULL);
+ g_pFolderViewWidget->pVideolistItemList =
+ eina_list_append(g_pFolderViewWidget->pVideolistItemList,
+ pTmpVideoGenlistItem);
- elm_object_item_del_cb_set(pTmpVideoGenlistItem, __mp_folder_item_view_video_item_del_cb);
+ elm_object_item_del_cb_set(pTmpVideoGenlistItem,
+ __mp_folder_item_view_video_item_del_cb);
}
}
#endif
static void
-__mp_folder_item_view_base_layout_del_cb(void *pUserData, Evas *e, Evas_Object *pObject, void *pEventInfo)
+__mp_folder_item_view_base_layout_del_cb(void *pUserData, Evas * e,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
- //evas_object_event_callback_del(g_pListRemoveViewWidget->pRemoveViewBaselayout, EVAS_CALLBACK_DEL, __mp_remove_view_base_layout_del_cb);
VideoLogInfo("");
__mp_folder_item_view_reset();
}
-static void __mp_folder_item_view_rotate_cb(void *data, Evas_Object *obj, void *event_info)
+static void __mp_folder_item_view_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
if (!g_pFolderViewWidget || !g_pFolderViewHandle) {
VideoLogError("__mp_folder_view_rotate_cb IS null");
return;
}
- bool bLandscape = mp_rotate_ctrl_check_landspace_by_win((Evas_Object*)mp_util_get_main_window_handle());
+ bool bLandscape =
+ mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
+ mp_util_get_main_window_handle
+ ());
if (bLandscape) {
g_pFolderViewHandle->bLandscape = true;
} else {
g_pFolderViewHandle->bLandscape = false;
}
elm_genlist_clear(g_pFolderViewHandle->pVideosGenlist);
- __mp_folder_item_view_append_grid_layout(g_pFolderViewHandle->pVideosGenlist);
+ __mp_folder_item_view_append_grid_layout(g_pFolderViewHandle->
+ pVideosGenlist);
}
-void __mp_folder_soft_back_button_cb(void *data, Evas_Object *obj, void *event_info)
+void __mp_folder_soft_back_button_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
VideoLogInfo(" ");
Evas_Object *pTopNaviFrame = NULL;
- pTopNaviFrame = elm_naviframe_item_pop(g_pFolderViewHandle->pNaviFrameHandle);
+ pTopNaviFrame =
+ elm_naviframe_item_pop(g_pFolderViewHandle->pNaviFrameHandle);
evas_object_del(pTopNaviFrame);
}
static void __mp_folder_item_view_init(void *pParent)
{
- if (!g_pFolderViewHandle || !g_pFolderViewWidget)
- {
+ if (!g_pFolderViewHandle || !g_pFolderViewWidget) {
VideoLogError("Main handles of list view are not existed.");
return;
}
VideoLogInfo("");
- g_pFolderViewWidget->pFolderViewBox = elm_box_add((Evas_Object*)pParent);
- elm_box_horizontal_set(g_pFolderViewWidget->pFolderViewBox , EINA_FALSE);
+ g_pFolderViewWidget->pFolderViewBox =
+ elm_box_add((Evas_Object *) pParent);
+ elm_box_horizontal_set(g_pFolderViewWidget->pFolderViewBox,
+ EINA_FALSE);
evas_object_show(g_pFolderViewWidget->pFolderViewBox);
- g_pFolderViewWidget->pFolderViewBaselayout = __mp_folder_item_view_init_base_layout(g_pFolderViewWidget->pFolderViewBox);
+ g_pFolderViewWidget->pFolderViewBaselayout =
+ __mp_folder_item_view_init_base_layout(g_pFolderViewWidget->
+ pFolderViewBox);
evas_object_show(g_pFolderViewWidget->pFolderViewBaselayout);
- elm_box_pack_end(g_pFolderViewWidget->pFolderViewBox, g_pFolderViewWidget->pFolderViewBaselayout);
-
- evas_object_event_callback_add(g_pFolderViewWidget->pFolderViewBaselayout, EVAS_CALLBACK_DEL, __mp_folder_item_view_base_layout_del_cb, NULL);
-
- g_pFolderViewHandle->pVideosGenlist = elm_genlist_add(g_pFolderViewWidget->pFolderViewBaselayout);
- elm_scroller_bounce_set(g_pFolderViewHandle->pVideosGenlist, EINA_FALSE, EINA_TRUE);
- evas_object_size_hint_weight_set(g_pFolderViewHandle->pVideosGenlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(g_pFolderViewHandle->pVideosGenlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_genlist_block_count_set(g_pFolderViewHandle->pVideosGenlist, VIDEO_GENLIST_BLOCK_COUNT);
- elm_scroller_single_direction_set(g_pFolderViewHandle->pVideosGenlist, ELM_SCROLLER_SINGLE_DIRECTION_HARD);
- elm_genlist_mode_set(g_pFolderViewHandle->pVideosGenlist, ELM_LIST_COMPRESS);
- elm_object_part_content_set(g_pFolderViewWidget->pFolderViewBaselayout, SWALLOW_LISTVIEW_CONTENT, g_pFolderViewHandle->pVideosGenlist);
+ elm_box_pack_end(g_pFolderViewWidget->pFolderViewBox,
+ g_pFolderViewWidget->pFolderViewBaselayout);
+
+ evas_object_event_callback_add(g_pFolderViewWidget->
+ pFolderViewBaselayout,
+ EVAS_CALLBACK_DEL,
+ __mp_folder_item_view_base_layout_del_cb,
+ NULL);
+
+ g_pFolderViewHandle->pVideosGenlist =
+ elm_genlist_add(g_pFolderViewWidget->pFolderViewBaselayout);
+ elm_scroller_bounce_set(g_pFolderViewHandle->pVideosGenlist,
+ EINA_FALSE, EINA_TRUE);
+ evas_object_size_hint_weight_set(g_pFolderViewHandle->pVideosGenlist,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(g_pFolderViewHandle->pVideosGenlist,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_genlist_block_count_set(g_pFolderViewHandle->pVideosGenlist,
+ VIDEO_GENLIST_BLOCK_COUNT);
+ elm_scroller_single_direction_set(g_pFolderViewHandle->pVideosGenlist,
+ ELM_SCROLLER_SINGLE_DIRECTION_HARD);
+ elm_genlist_mode_set(g_pFolderViewHandle->pVideosGenlist,
+ ELM_LIST_COMPRESS);
+ elm_object_part_content_set(g_pFolderViewWidget->pFolderViewBaselayout,
+ SWALLOW_LISTVIEW_CONTENT,
+ g_pFolderViewHandle->pVideosGenlist);
__mp_folder_item_view_update_video_list(LIST_UPDATE_TYPE_ALL);
evas_object_show(g_pFolderViewHandle->pVideosGenlist);
g_pFolderViewHandle->bLandscape = false;
- evas_object_smart_callback_add((Evas_Object*)mp_util_get_main_window_handle(), "wm,rotation,changed", __mp_folder_item_view_rotate_cb, NULL);
+ evas_object_smart_callback_add((Evas_Object *)
+ mp_util_get_main_window_handle(),
+ "wm,rotation,changed",
+ __mp_folder_item_view_rotate_cb, NULL);
- Evas_Object * pLeftbtn = elm_button_add(g_pFolderViewHandle->pNaviFrameHandle);
+ Evas_Object *pLeftbtn =
+ elm_button_add(g_pFolderViewHandle->pNaviFrameHandle);
elm_object_style_set(pLeftbtn, "naviframe/end_btn/default");
- evas_object_smart_callback_add(pLeftbtn, "clicked", __mp_folder_soft_back_button_cb, NULL);
+ evas_object_smart_callback_add(pLeftbtn, "clicked",
+ __mp_folder_soft_back_button_cb, NULL);
- char *folder_name = mp_util_svc_get_video_folder_name(g_pFolderViewHandle->nFolder_index);
+ char *folder_name =
+ mp_util_svc_get_video_folder_name(g_pFolderViewHandle->
+ nFolder_index);
- g_pFolderViewHandle->pNaviFrameItem = elm_naviframe_item_push( g_pFolderViewHandle->pNaviFrameHandle,
- (const char*)folder_name,
- pLeftbtn,
- NULL,
- g_pFolderViewWidget->pFolderViewBox,
- NULL );
+ g_pFolderViewHandle->pNaviFrameItem =
+ elm_naviframe_item_push(g_pFolderViewHandle->pNaviFrameHandle,
+ (const char *) folder_name, pLeftbtn, NULL,
+ g_pFolderViewWidget->pFolderViewBox, NULL);
- elm_naviframe_item_pop_cb_set(g_pFolderViewHandle->pNaviFrameItem , __mp_folder_item_view_back_btn_cb, g_pFolderViewHandle);
+ elm_naviframe_item_pop_cb_set(g_pFolderViewHandle->pNaviFrameItem,
+ __mp_folder_item_view_back_btn_cb,
+ g_pFolderViewHandle);
MP_FREE_STRING(folder_name);
mp_folder_item_view_check_more_button_of_toolbar();
- elm_naviframe_item_title_enabled_set(g_pFolderViewHandle->pNaviFrameItem, TRUE, EINA_FALSE);
+ elm_naviframe_item_title_enabled_set(g_pFolderViewHandle->
+ pNaviFrameItem, TRUE, EINA_FALSE);
- mp_util_db_set_update_fun(g_pFolderViewHandle->euLev, __mp_folder_item_view_db_changed_cb);
+ mp_util_db_set_update_fun(g_pFolderViewHandle->euLev,
+ __mp_folder_item_view_db_changed_cb);
mp_util_hide_indicator();
return;
}
- st_RegisteCbFunc *pRegisteCbFunc = (st_RegisteCbFunc*)calloc(1, sizeof(st_RegisteCbFunc));
+ st_RegisteCbFunc *pRegisteCbFunc =
+ (st_RegisteCbFunc *) calloc(1, sizeof(st_RegisteCbFunc));
if (!pRegisteCbFunc) {
VideoLogError("failed to allocate memory");
return;
}
- pRegisteCbFunc->DownloadCb = (void*)__mp_folder_item_view_download_cb;
- pRegisteCbFunc->SearchCb = (void*)__mp_folder_item_view_search_item_cb;
- pRegisteCbFunc->ShareViaCb = (void*)__mp_folder_item_view_share_cb;
- pRegisteCbFunc->DeleteCb = (void*)__mp_folder_item_view_delete_cb;
- pRegisteCbFunc->SortItemCb = (void*)__mp_folder_item_view_sort_item_cb;
- pRegisteCbFunc->RenameCb = (void*)__mp_folder_item_view_rename_cb;
- pRegisteCbFunc->AutoPlayCb = (void*)__mp_folder_item_view_auto_play_cb;
-// pRegisteCbFunc->DetailsCb= (void*)__mp_folder_item_view_details_cb;
+ pRegisteCbFunc->DownloadCb =
+ (void *) __mp_folder_item_view_download_cb;
+ pRegisteCbFunc->SearchCb =
+ (void *) __mp_folder_item_view_search_item_cb;
+ pRegisteCbFunc->ShareViaCb = (void *) __mp_folder_item_view_share_cb;
+ pRegisteCbFunc->DeleteCb = (void *) __mp_folder_item_view_delete_cb;
+ pRegisteCbFunc->SortItemCb =
+ (void *) __mp_folder_item_view_sort_item_cb;
+ pRegisteCbFunc->RenameCb = (void *) __mp_folder_item_view_rename_cb;
+ pRegisteCbFunc->AutoPlayCb =
+ (void *) __mp_folder_item_view_auto_play_cb;
#ifdef ENABLE_PRIVATE_MODE
- pRegisteCbFunc->AddToPersonalCB = (void*)__mp_folder_item_view_add_personal_cb;
- pRegisteCbFunc->RemoveFromPersonalCB = (void*)__mp_folder_item_view_remove_personal_cb;
+ pRegisteCbFunc->AddToPersonalCB =
+ (void *) __mp_folder_item_view_add_personal_cb;
+ pRegisteCbFunc->RemoveFromPersonalCB =
+ (void *) __mp_folder_item_view_remove_personal_cb;
#endif
- mp_ft_ctrl_create(g_pFolderViewHandle->pNaviFrameHandle, g_pFolderViewHandle->pNaviFrameItem, FOOTER_TAB_TYPE_PERSONAL, pRegisteCbFunc);
+ mp_ft_ctrl_create(g_pFolderViewHandle->pNaviFrameHandle,
+ g_pFolderViewHandle->pNaviFrameItem,
+ FOOTER_TAB_TYPE_PERSONAL, pRegisteCbFunc);
free(pRegisteCbFunc);
- elm_naviframe_item_title_enabled_set(g_pFolderViewHandle->pNaviFrameItem, EINA_TRUE, EINA_FALSE);
- mp_util_db_set_update_fun(g_pFolderViewHandle->euLev, __mp_folder_item_view_db_changed_cb);
+ elm_naviframe_item_title_enabled_set(g_pFolderViewHandle->
+ pNaviFrameItem, EINA_TRUE,
+ EINA_FALSE);
+ mp_util_db_set_update_fun(g_pFolderViewHandle->euLev,
+ __mp_folder_item_view_db_changed_cb);
mp_util_hide_indicator();
}
-char*
-__mp_folder_item_view_text_get_video_number_cb(void *pUserData, Evas_Object *pObj, const char *part)
+char *__mp_folder_item_view_text_get_video_number_cb(void *pUserData,
+ Evas_Object * pObj,
+ const char *part)
{
VideoLogInfo("");
- if (!g_pFolderViewHandle)
- {
+ if (!g_pFolderViewHandle) {
VideoLogWarning("g_pFolderViewHandle is NULL.");
return NULL;
}
- if (!g_pFolderViewWidget)
- {
+ if (!g_pFolderViewWidget) {
VideoLogWarning("g_pFolderViewWidget is NULL.");
return NULL;
}
- if (!g_strcmp0(part, "elm.text.sub"))
- {
- int nCount = (int)pUserData;
+ if (!g_strcmp0(part, "elm.text.sub")) {
+ int nCount = (int) pUserData;
- if (nCount == 1)
- {
+ if (nCount == 1) {
return g_strdup_printf(VIDEOS_LISTVIEW_BODY_ONE_VIDEO);
- }
- else
- {
+ } else {
return g_strdup_printf(VIDEOS_LISTVIEW_BODY_PD_VIDEOS, nCount);
}
}
}
-/*static void __mp_folder_item_title_layout_del_cb(void *pUserData, Evas *e, Evas_Object *pObject, void *pEventInfo)
-{
- if (!g_pFolderViewWidget)
- {
- VideoLogError("g_pMainViewWidget == NUL!!!");
- return;
- }
-
- g_pFolderViewWidget->pFolderViewCountlayout = NULL;
- g_pFolderViewWidget->pFolderViewGenlistTitle = NULL;
- g_pFolderViewWidget->pFolderViewGenlistItemForTitle = NULL;
-}*/
-/*static void __mp_folder_video_index_item_del_cb(void *data, Evas_Object *obj, void *event_info)
+void mp_folder_item_view_push(void *pNaviFrame, int folder_index,
+ UpdateListItemsCbFunc pChangeViewCb)
{
- if (!g_pFolderViewWidget)
- {
- VideoLogError("g_pMainViewWidget == NUL!!!");
- return;
- }
-
- g_pFolderViewWidget->pFolderViewGenlistItemForTitle = NULL;
-}*/
-
-
-/*static void
-__mp_folder_item_view_update_count_layout()
-{
- unsigned int nCount = mp_util_svc_get_number_of_video_item_by_type();
-
- VideoLogInfo("nCount : [%d]", nCount);
-
- if (nCount == 0)
- {
- if (g_pFolderViewWidget->pFolderViewCountlayout != NULL)
- {
- elm_box_unpack(g_pFolderViewWidget->pFolderViewBox, g_pFolderViewWidget->pFolderViewCountlayout);
- evas_object_del(g_pFolderViewWidget->pFolderViewCountlayout);
- g_pFolderViewWidget->pFolderViewCountlayout = NULL;
- }
- }
- else
- {
- if (g_pFolderViewWidget->pFolderViewGenlistItemForTitle != NULL) {
- elm_object_item_del(g_pFolderViewWidget->pFolderViewGenlistItemForTitle);
- }
-
- if (g_pFolderViewWidget->pFolderViewGenlistTitleItc == NULL) {
-
- g_pFolderViewWidget->pFolderViewGenlistTitleItc = elm_genlist_item_class_new();
- g_pFolderViewWidget->pFolderViewGenlistTitleItc->item_style = "groupindex.sub";
- g_pFolderViewWidget->pFolderViewGenlistTitleItc->func.text_get = __mp_folder_item_view_text_get_video_number_cb;
- g_pFolderViewWidget->pFolderViewGenlistTitleItc->func.content_get = NULL;
- g_pFolderViewWidget->pFolderViewGenlistTitleItc->func.del = NULL;
- }
-
- if (g_pFolderViewWidget->pFolderViewGenlistTitle == NULL) {
- g_pFolderViewWidget->pFolderViewGenlistTitle = elm_genlist_add(g_pFolderViewWidget->pFolderViewBox);
- elm_genlist_mode_set(g_pFolderViewWidget->pFolderViewGenlistTitle, ELM_LIST_COMPRESS);
- evas_object_show(g_pFolderViewWidget->pFolderViewGenlistTitle);
- }
-
- if (g_pFolderViewWidget->pFolderViewCountlayout == NULL) {
- // create layout
- g_pFolderViewWidget->pFolderViewCountlayout = elm_layout_add(g_pFolderViewWidget->pFolderViewBox);
- evas_object_size_hint_weight_set(g_pFolderViewWidget->pFolderViewCountlayout, EVAS_HINT_EXPAND, 0);
- evas_object_size_hint_align_set(g_pFolderViewWidget->pFolderViewCountlayout, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_layout_file_set(g_pFolderViewWidget->pFolderViewCountlayout, VIDEO_CUSTOM_THEME, "count_info_groupindex");
- evas_object_event_callback_add(g_pFolderViewWidget->pFolderViewCountlayout, EVAS_CALLBACK_DEL, __mp_folder_item_title_layout_del_cb, NULL);
-
- evas_object_show(g_pFolderViewWidget->pFolderViewCountlayout);
-
- elm_layout_content_set(g_pFolderViewWidget->pFolderViewCountlayout, "elm.swallow.groupindex", g_pFolderViewWidget->pFolderViewGenlistTitle);
-
- elm_box_pack_start(g_pFolderViewWidget->pFolderViewBox, g_pFolderViewWidget->pFolderViewCountlayout);
- }
-
- g_pFolderViewWidget->pFolderViewGenlistItemForTitle = elm_genlist_item_append(g_pFolderViewWidget->pFolderViewGenlistTitle,
- g_pFolderViewWidget->pFolderViewGenlistTitleItc,
- (void *)nCount,
- NULL,
- ELM_GENLIST_ITEM_NONE,
- NULL,
- NULL);
- elm_object_item_del_cb_set(g_pFolderViewWidget->pFolderViewGenlistItemForTitle, __mp_folder_video_index_item_del_cb);
- }
-}*/
-
-
-void mp_folder_item_view_push(void *pNaviFrame, int folder_index, UpdateListItemsCbFunc pChangeViewCb)
-{
- if (!pNaviFrame)
- {
+ if (!pNaviFrame) {
VideoLogError("[ERR] pNaviFrame");
return;
}
VideoLogInfo("");
__mp_folder_item_view_destroy();
- g_pFolderViewHandle = (st_VideoFolderViewHandle*)calloc(1, sizeof(st_VideoFolderViewHandle));
- g_pFolderViewWidget = (st_VideoFolderViewWidget*)calloc(1, sizeof(st_VideoFolderViewWidget));
+ g_pFolderViewHandle =
+ (st_VideoFolderViewHandle *) calloc(1,
+ sizeof
+ (st_VideoFolderViewHandle));
+ g_pFolderViewWidget =
+ (st_VideoFolderViewWidget *) calloc(1,
+ sizeof
+ (st_VideoFolderViewWidget));
memset(g_pFolderViewHandle, 0, sizeof(st_VideoFolderViewHandle));
memset(g_pFolderViewWidget, 0, sizeof(st_VideoFolderViewWidget));
g_pFolderViewHandle->pUpdateListUserCbFunc = pChangeViewCb;
g_pFolderViewHandle->nFolder_index = folder_index;
g_pFolderViewHandle->bExist = false;
- g_pFolderViewHandle->bLandscape = mp_rotate_ctrl_check_landspace_by_win((Evas_Object*)mp_util_get_main_window_handle());
+ g_pFolderViewHandle->bLandscape =
+ mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
+ mp_util_get_main_window_handle
+ ());
char *szPath = mp_util_svc_get_video_folder_url(folder_index);
g_pFolderViewHandle->pFolderUrl = g_strdup(szPath);
VideoSecureLogInfo("folder path = %s", szPath);
int nGenlistIndex = nGenItemIndex;
if (!g_pFolderViewHandle->bLandscape)
- nGenlistIndex = nGenlistIndex / VP_GENLIST_THUMB_PORTRAIT_COUNT;
+ nGenlistIndex =
+ nGenlistIndex / VP_GENLIST_THUMB_PORTRAIT_COUNT;
else
- nGenlistIndex = nGenlistIndex / VP_GENLIST_THUMB_LANDSPACE_COUNT;
+ nGenlistIndex =
+ nGenlistIndex / VP_GENLIST_THUMB_LANDSPACE_COUNT;
Elm_Object_Item *pTmpVideoGenlistItem = NULL;
- pTmpVideoGenlistItem = elm_genlist_nth_item_get((const Evas_Object *)g_pFolderViewHandle->pVideosGenlist, nGenlistIndex);
+ pTmpVideoGenlistItem =
+ elm_genlist_nth_item_get((const Evas_Object *)
+ g_pFolderViewHandle->pVideosGenlist,
+ nGenlistIndex);
mp_util_svc_destory_video_item_list();
- mp_util_svc_extract_video_list_from_folder(g_pFolderViewHandle->pFolderUrl, __mp_folder_item_view_get_sort_type(), MP_LIST_VIEW_ALL);
- mp_util_svc_update_thumbnail_info(g_pFolderViewHandle->nPlayVideoIndex);
+ mp_util_svc_extract_video_list_from_folder(g_pFolderViewHandle->
+ pFolderUrl,
+ __mp_folder_item_view_get_sort_type
+ (), MP_LIST_VIEW_ALL);
+ mp_util_svc_update_thumbnail_info(g_pFolderViewHandle->
+ nPlayVideoIndex);
elm_genlist_item_update(pTmpVideoGenlistItem);
if (pTmpVideoGenlistItem) {
- //elm_genlist_clear(g_pFolderViewHandle->pVideosGenlist);
- //__mp_folder_item_view_append_grid_layout(g_pFolderViewHandle->pVideosGenlist);
- //elm_genlist_item_update(pTmpVideoGenlistItem);
- //elm_genlist_item_fields_update(pTmpVideoGenlistItem, "elm.icon.1", ELM_GENLIST_ITEM_FIELD_CONTENT);
- elm_genlist_item_selected_set(pTmpVideoGenlistItem, EINA_FALSE);
- int nLastPlayedTime = mp_util_svc_get_video_last_played_pos(nGenItemIndex);
- int nDurationTime = mp_util_svc_get_video_duration_time(nGenItemIndex);
- Evas_Object *pIconContent = elm_object_item_part_content_get(pTmpVideoGenlistItem, "elm.icon.1");
+ elm_genlist_item_selected_set(pTmpVideoGenlistItem,
+ EINA_FALSE);
+ int nLastPlayedTime =
+ mp_util_svc_get_video_last_played_pos(nGenItemIndex);
+ int nDurationTime =
+ mp_util_svc_get_video_duration_time(nGenItemIndex);
+ Evas_Object *pIconContent =
+ elm_object_item_part_content_get(pTmpVideoGenlistItem,
+ "elm.icon.1");
if (!pIconContent) {
VideoLogError("");
return;
}
- Evas_Object *pProgressbar = elm_layout_content_get(pIconContent, "elm.progressbar.icon");
+ Evas_Object *pProgressbar =
+ elm_layout_content_get(pIconContent,
+ "elm.progressbar.icon");
if (nLastPlayedTime > 0 && nDurationTime > 0) {
- double nRatio = ((double)nLastPlayedTime) / ((double)nDurationTime);
+ double nRatio =
+ ((double) nLastPlayedTime) / ((double) nDurationTime);
if (!pProgressbar) {
- elm_genlist_item_fields_update(pTmpVideoGenlistItem, "elm.icon.1", ELM_GENLIST_ITEM_FIELD_CONTENT);
+ elm_genlist_item_fields_update(pTmpVideoGenlistItem,
+ "elm.icon.1",
+ ELM_GENLIST_ITEM_FIELD_CONTENT);
} else {
elm_progressbar_value_set(pProgressbar, nRatio);
}
} else {
if (pProgressbar) {
- elm_layout_content_unset(pIconContent, "elm.progressbar.icon");
+ elm_layout_content_unset(pIconContent,
+ "elm.progressbar.icon");
MP_DEL_OBJ(pProgressbar);
}
}
- elm_genlist_item_fields_update(pTmpVideoGenlistItem, "elm.text.sub.left.bottom", ELM_GENLIST_ITEM_FIELD_TEXT);
+ elm_genlist_item_fields_update(pTmpVideoGenlistItem,
+ "elm.text.sub.left.bottom",
+ ELM_GENLIST_ITEM_FIELD_TEXT);
}
}
}
void mp_folder_item_view_change_language(void)
{
- if (!g_pFolderViewHandle || !g_pFolderViewWidget)
- {
+ if (!g_pFolderViewHandle || !g_pFolderViewWidget) {
VideoLogError("No existed handle of Folder item view.");
return;
}
VideoLogInfo("");
- //__mp_folder_item_view_update_count_layout();
}
/*external interface*/
void mp_folder_item_view_update_video_list(MpListUpdateType eUpdateType)
{
- if (!g_pFolderViewHandle || !g_pFolderViewWidget || !g_pFolderViewHandle->pVideosGenlist)
- {
+ if (!g_pFolderViewHandle || !g_pFolderViewWidget
+ || !g_pFolderViewHandle->pVideosGenlist) {
VideoLogError("handles of list view are not existed.");
return;
}
__mp_folder_item_view_update_video_list(eUpdateType);
}
}
-
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
/*///////////////////////////////////////////////////*/
/* Pre-define function for building.*/
static void __mp_list_view_update_list(int nListTabType,
- MpListUpdateType eUpdateType);
+ MpListUpdateType eUpdateType);
/*static void mp_list_view_check_center_button_of_toolbar(void);*/
static void mp_list_view_check_more_button_of_toolbar(void);
static void __mp_list_view_result_media_data_update_cb(void);
static char *__mp_list_view_count_layout_tts_cb(void *data,
- Evas_Object *obj);
+ Evas_Object * obj);
static void __mp_list_view_recently_change_cb(const char *key, void *data)
static void __mp_list_view_register_recently_config()
{
mp_util_config_ignore_preview_key_changed_cb();
- mp_util_config_preview_key_changed_cb(__mp_list_view_recently_change_cb, NULL);
+ mp_util_config_preview_key_changed_cb
+ (__mp_list_view_recently_change_cb, NULL);
}
void mp_list_view_free_main_view_widget(void)
g_pMainViewWidget->pBox = NULL;
}
MP_DEL_ITC(g_pMainViewWidget->pVideoGenlistTitleItc);
- /*
- if (g_pMainViewWidget->pSearchBtn)
- {
- evas_object_del(g_pMainViewWidget->pSearchBtn);
- g_pMainViewWidget->pSearchBtn = NULL;
- }
- */
free(g_pMainViewWidget);
g_pMainViewWidget = NULL;
}
/*//////////////////////////////////////////////////*/
/* Callback function of more of footer widget.*/
-void mp_list_view_delete_cb(void *pUserData, Evas_Object *pObject,
- void *pEventInfo)
+void mp_list_view_delete_cb(void *pUserData, Evas_Object * pObject,
+ void *pEventInfo)
{
if (!g_pMainViewHandle) {
VideoLogWarning
- ("[WARNING] Main handles of list view are not existed.");
+ ("[WARNING] Main handles of list view are not existed.");
return;
}
(MpFooterLibraryMainListTabType) pUserData;
if (FOOTER_TAB_TYPE_PERSONAL == footerTabType) {
mp_remove_view_push((void *) mp_mgr_get_library_naviframe(),
- (void *) __mp_list_view_result_user_cb,
- (void *) __mp_list_view_result_view_update_cb,
- NULL, LIST_TAB_TYPE_PERSONAL);
+ (void *) __mp_list_view_result_user_cb,
+ (void *) __mp_list_view_result_view_update_cb,
+ NULL, LIST_TAB_TYPE_PERSONAL);
} else {
VideoLogError("invalid footer type");
}
}
-void mp_list_view_sort_item_cb(void *pUserData, Evas_Object *pObject,
- void *pEventInfo)
+void mp_list_view_sort_item_cb(void *pUserData, Evas_Object * pObject,
+ void *pEventInfo)
{
mp_ft_ctrl_hide_more_popup();
if (g_pMainViewHandle->nCurrentViewType != nPreViewType) {
- elm_object_part_content_unset(g_pMainViewWidget->
- pListViewBaselayout,
- SWALLOW_LISTVIEW_CONTENT);
+ elm_object_part_content_unset
+ (g_pMainViewWidget->pListViewBaselayout,
+ SWALLOW_LISTVIEW_CONTENT);
#ifdef VS_FEATURE_LIST_VIEW
if (nPreViewType == MP_LIST_VIEW_AS_NORMAL_LIST) {
mp_normal_view_destroy();
} else
#endif
- if (nPreViewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
- mp_folder_view_destroy();
- } else if (nPreViewType == MP_LIST_VIEW_AS_THUMBNAIL_LIST) {
- mp_thumbnail_view_destroy();
- } else {
- VideoLogError("invalid type");
+ if (nPreViewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
+ mp_folder_view_destroy();
+ } else if (nPreViewType == MP_LIST_VIEW_AS_THUMBNAIL_LIST) {
+ mp_thumbnail_view_destroy();
+ } else {
+ VideoLogError("invalid type");
#ifdef VS_FEATURE_LIST_VIEW
- mp_normal_view_destroy();
+ mp_normal_view_destroy();
#endif
- mp_folder_view_destroy();
- mp_thumbnail_view_destroy();
- }
+ mp_folder_view_destroy();
+ mp_thumbnail_view_destroy();
+ }
}
__mp_list_view_result_user_cb(MP_LIST_VIEW_ALL);
}
-void mp_list_view_view_as_cb(void *pUserData, Evas_Object *pObject,
- void *pEventInfo)
+void mp_list_view_view_as_cb(void *pUserData, Evas_Object * pObject,
+ void *pEventInfo)
{
mp_ft_ctrl_hide_more_popup();
MpFooterLibraryMainListTabType footerTabType =
(MpFooterLibraryMainListTabType) pUserData;
if (FOOTER_TAB_TYPE_PERSONAL == footerTabType) {
- mp_view_as_ctrl_show(footerTabType,
- (void *)
- __mp_list_view_view_as_result_user_cb);
+ mp_view_as_ctrl_show(footerTabType, (void *)
+ __mp_list_view_view_as_result_user_cb);
} else {
VideoLogError("invalid footer type");
}
}
-void mp_list_view_auto_play_cb(void *pUserData, Evas_Object *pObject,
- void *pEventInfo)
+void mp_list_view_auto_play_cb(void *pUserData, Evas_Object * pObject,
+ void *pEventInfo)
{
mp_ft_ctrl_hide_more_popup();
}
}
-void mp_list_view_rename_cb(void *pUserData, Evas_Object *pObject,
- void *pEventInfo)
+void mp_list_view_rename_cb(void *pUserData, Evas_Object * pObject,
+ void *pEventInfo)
{
if (!g_pMainViewHandle) {
VideoLogWarning
- ("[WARNING] Main handles of list view are not existed.");
+ ("[WARNING] Main handles of list view are not existed.");
return;
}
mp_ft_ctrl_hide_more_popup();
mp_select_view_push((void *) mp_mgr_get_library_naviframe(),
- g_pMainViewHandle->pNaviFrameItem,
- __mp_list_view_result_user_cb, NULL,
- SELECT_TYPE_RENAME, LIST_TAB_TYPE_PERSONAL);
+ g_pMainViewHandle->pNaviFrameItem,
+ __mp_list_view_result_user_cb, NULL,
+ SELECT_TYPE_RENAME, LIST_TAB_TYPE_PERSONAL);
}
-/*void mp_list_view_details_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
-{
- if (!g_pMainViewHandle)
- {
- VideoLogWarning("[WARNING] Main handles of list view are not existed.");
- return;
- }
-
- mp_ft_ctrl_hide_more_popup();
- mp_select_view_push((void *)mp_mgr_get_library_naviframe(), g_pMainViewHandle->pNaviFrameItem, NULL, NULL, SELECT_TYPE_DETAIL, LIST_TAB_TYPE_PERSONAL);
-}*/
void mp_list_view_content_to_display_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
mp_ft_ctrl_hide_more_popup();
mp_view_ctrl_show((void *) __mp_list_view_result_user_cb);
}
-void mp_list_view_sign_in_cb(void *pUserData, Evas_Object *pObject,
- void *pEventInfo)
+void mp_list_view_sign_in_cb(void *pUserData, Evas_Object * pObject,
+ void *pEventInfo)
{
mp_ft_ctrl_hide_more_popup();
-
- /*mp_sign_ctrl_request_everglades_sign_in(NULL, NULL);*/
}
-void mp_list_view_share_via_cb(void *pUserData, Evas_Object *pObject,
- void *pEventInfo)
+void mp_list_view_share_via_cb(void *pUserData, Evas_Object * pObject,
+ void *pEventInfo)
{
if (!g_pMainViewHandle) {
VideoLogError("Main handles of list view are not existed.");
if (mp_view_as_ctrl_get_type() == MP_LIST_VIEW_AS_FOLDER_LIST) {
VideoLogWarning("Select folder for sharing.");
mp_folder_share_view_push((void *) mp_mgr_get_library_naviframe(),
- (void *)
- __mp_list_view_result_view_update_cb,
- LIST_TAB_TYPE_PERSONAL);
+ (void *)
+ __mp_list_view_result_view_update_cb,
+ LIST_TAB_TYPE_PERSONAL);
} else {
mp_share_view_push((void *) mp_mgr_get_library_naviframe(),
- (void *) __mp_list_view_result_view_update_cb,
- NULL, LIST_TAB_TYPE_PERSONAL);
+ (void *) __mp_list_view_result_view_update_cb,
+ NULL, LIST_TAB_TYPE_PERSONAL);
}
}
-void mp_list_view_add_personal_cb(void *pUserData, Evas_Object *pObject,
- void *pEventInfo)
+void mp_list_view_add_personal_cb(void *pUserData, Evas_Object * pObject,
+ void *pEventInfo)
{
if (!g_pMainViewHandle) {
VideoLogError("Main handles of list view are not existed.");
mp_ft_ctrl_hide_more_popup();
- mp_personal_view_push((void *) mp_mgr_get_library_naviframe(),
- (void *)
- __mp_list_view_result_media_data_update_cb,
- NULL, 0);
+ mp_personal_view_push((void *) mp_mgr_get_library_naviframe(), (void *)
+ __mp_list_view_result_media_data_update_cb,
+ NULL, 0);
}
void mp_list_view_remove_personal_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!g_pMainViewHandle) {
VideoLogError("Main handles of list view are not existed.");
mp_ft_ctrl_hide_more_popup();
- mp_personal_view_push((void *) mp_mgr_get_library_naviframe(),
- (void *)
- __mp_list_view_result_media_data_update_cb,
- NULL, 1);
+ mp_personal_view_push((void *) mp_mgr_get_library_naviframe(), (void *)
+ __mp_list_view_result_media_data_update_cb,
+ NULL, 1);
}
-/**/
+ /**/
/*//////////////////////////////////////////////////*/
-
/*//////////////////////////////////////////////////*/
/* Footer widgets*/
-
void mp_list_view_check_more_button_of_toolbar(void)
{
if (!g_pMainViewHandle) {
if (mp_view_as_ctrl_get_type() != MP_LIST_VIEW_AS_FOLDER_LIST) {
pRegisteCbFunc->SortItemCb =
(void *) mp_list_view_sort_item_cb;
- pRegisteCbFunc->RenameCb =
- (void *) mp_list_view_rename_cb;
- /*pRegisteCbFunc->DetailsCb= (void*)mp_list_view_details_cb;*/
+ pRegisteCbFunc->RenameCb = (void *) mp_list_view_rename_cb;
+ /*pRegisteCbFunc->DetailsCb= (void*)mp_list_view_details_cb; */
pRegisteCbFunc->ShareViaCb =
(void *) mp_list_view_share_via_cb;
pRegisteCbFunc->AutoPlayCb =
bool bShowFT = mp_ft_ctrl_is_show();
if (bShowFT == FALSE) {
mp_ft_ctrl_create(g_pMainViewHandle->pNaviFrameHandle,
- g_pMainViewHandle->pNaviFrameItem,
- g_pMainViewHandle->nListTabType,
- pRegisteCbFunc);
+ g_pMainViewHandle->pNaviFrameItem,
+ g_pMainViewHandle->nListTabType,
+ pRegisteCbFunc);
}
free(pRegisteCbFunc);
}
}
}
-/**/
+ /**/
/*//////////////////////////////////////////////////*/
-
/*//////////////////////////////////////////////////*/
/* Search view*/
void mp_list_view_show_search_view(void)
mp_search_view_push((void *) mp_mgr_get_library_naviframe(), NULL);
mp_search_view_register_update_list_func((void *)
- __mp_list_view_result_user_cb,
- (void *)
- __mp_list_view_result_view_update_cb);
+ __mp_list_view_result_user_cb,
+ (void *)
+ __mp_list_view_result_view_update_cb);
}
-/**/
+ /**/
/*//////////////////////////////////////////////////*/
-
/*//////////////////////////////////////////////////*/
/* Callback function of base widget in main list view.*/
void mp_list_view_naviframe_transition_effect_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!g_pMainViewHandle) {
VideoLogInfo("Main handles of list view are not existed.");
mp_util_svc_destory_video_list();
mp_util_svc_extract_video_list_by_item_type
- (mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
+ (mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
int nViewType = mp_view_as_ctrl_get_type();
#ifdef VS_FEATURE_LIST_VIEW
mp_normal_view_update_video_list();
} else
#endif
- if (nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
- mp_folder_view_update_video_items();
- mp_util_svc_extract_video_folder_list_by_type
+ if (nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
+ mp_folder_view_update_video_items();
+ mp_util_svc_extract_video_folder_list_by_type
(mp_sort_ctrl_get_sort_state(), MP_LIST_VIEW_ALL);
- } else {
- VideoLogError("");
- }
+ } else {
+ VideoLogError("");
+ }
mp_list_view_check_more_button_of_toolbar();
- /*mp_list_view_check_center_button_of_toolbar();*/
+ /*mp_list_view_check_center_button_of_toolbar(); */
}
static void __mp_list_view_result_user_cb(MpListUpdateType eUpdateType)
VideoLogInfo("");
elm_object_item_part_text_set(g_pMainViewHandle->pNaviFrameItem,
- "elm.text.title", VIDEOS_TITLE_VIDEO);
+ "elm.text.title", VIDEOS_TITLE_VIDEO);
__mp_list_view_update_list(g_pMainViewHandle->nListTabType,
- eUpdateType);
+ eUpdateType);
mp_list_view_check_more_button_of_toolbar();
- /*mp_list_view_check_center_button_of_toolbar();*/
}
static void __mp_list_view_result_data_update_cb(void)
VideoLogInfo("");
- /* mp_util_svc_ctrl_sort_list(mp_sort_ctrl_get_sort_state());*/
int nViewType = mp_view_as_ctrl_get_type();
#ifdef VS_FEATURE_LIST_VIEW
if (nViewType == MP_LIST_VIEW_AS_NORMAL_LIST) {
mp_util_svc_destory_video_item_list();
mp_util_svc_extract_video_list_by_item_type
- (mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
+ (mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
mp_normal_view_update_video_list();
} else
#endif
- if (nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
- mp_util_svc_destory_video_folder_list();
- mp_util_svc_extract_video_folder_list_by_type
+ if (nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
+ mp_util_svc_destory_video_folder_list();
+ mp_util_svc_extract_video_folder_list_by_type
(mp_sort_ctrl_get_sort_state(), MP_LIST_VIEW_ALL);
- mp_folder_view_update_video_items();
- } else if (nViewType == MP_LIST_VIEW_AS_THUMBNAIL_LIST) {
- mp_util_svc_destory_video_item_list();
- mp_util_svc_extract_video_list_by_item_type
+ mp_folder_view_update_video_items();
+ } else if (nViewType == MP_LIST_VIEW_AS_THUMBNAIL_LIST) {
+ mp_util_svc_destory_video_item_list();
+ mp_util_svc_extract_video_list_by_item_type
(mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
- mp_thumbnail_view_update_video_list();
- } else {
+ mp_thumbnail_view_update_video_list();
+ } else {
- VideoLogError("");
- }
+ VideoLogError("");
+ }
mp_list_view_check_more_button_of_toolbar();
- /*mp_list_view_check_center_button_of_toolbar();*/
}
static void __mp_list_view_result_view_update_cb(void)
int nViewType = mp_view_as_ctrl_get_type();
mp_util_svc_destory_video_list();
mp_util_svc_extract_video_list_by_item_type
- (mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
+ (mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
if (nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
/*refresh folder view */
mp_util_svc_extract_video_folder_list_by_type
- (mp_sort_ctrl_get_sort_state(), MP_LIST_VIEW_ALL);
- if (!mp_folder_view_is_item_view() && !mp_search_view_get_active_view())
+ (mp_sort_ctrl_get_sort_state(), MP_LIST_VIEW_ALL);
+ if (!mp_folder_view_is_item_view()
+ && !mp_search_view_get_active_view())
mp_folder_view_arrange_folder_list(g_pMainViewHandle,
- g_pMainViewWidget,
- LIST_UPDATE_TYPE_VIEW,
- (void *)
- __mp_list_view_result_user_cb);
+ g_pMainViewWidget,
+ LIST_UPDATE_TYPE_VIEW,
+ (void *)
+ __mp_list_view_result_user_cb);
}
if (nViewType == MP_LIST_VIEW_AS_THUMBNAIL_LIST) {
/*refresh thumbnail view */
}
mp_list_view_check_more_button_of_toolbar();
- /*mp_list_view_check_center_button_of_toolbar();*/
}
static void __mp_list_view_db_update(int nUpdateStyle)
mp_util_db_run_backup_fun_except_lev0(NULL, NULL, NULL, NULL);
__mp_list_view_update_list(g_pMainViewHandle->nListTabType,
- LIST_UPDATE_TYPE_ALL);
+ LIST_UPDATE_TYPE_ALL);
mp_util_db_run_update_fun_except_lev0(NULL, NULL, NULL, NULL);
}
static void __mp_list_view_db_change_cb(void *pUserData, float fTime,
- int nUpdateStyle)
+ int nUpdateStyle)
{
if (!g_pMainViewHandle || !g_pMainViewWidget) {
VideoLogInfo("Main handles of list view are not existed.");
MP_DEL_TIMER(g_pMainViewHandle->pDbUpdateTimer);
g_pMainViewHandle->pDbUpdateTimer =
ecore_timer_add(fTime, __mp_list_view_db_update_timer_cb,
- (void *) nUpdateStyle);
+ (void *) nUpdateStyle);
}
-void mp_list_view_search_item_cb(void *pUserData, Evas_Object *pObject,
- void *pEventInfo)
+void mp_list_view_search_item_cb(void *pUserData, Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
}
Eina_Bool mp_list_view_back_btn_cb(void *pUserData,
- Elm_Object_Item *pItem)
+ Elm_Object_Item * pItem)
{
VideoLogInfo("");
}
void mp_list_view_launching_video_player_cb(void *pUserData,
- void *pBuffer,
- unsigned int nBufferSize)
+ void *pBuffer,
+ unsigned int nBufferSize)
{
if (pUserData == NULL) {
VideoLogError("pUserData is NULL");
/*//////////////////////////////////////////////////*/
-/**/
-void __mp_list_view_update_list(int nListTabType,
- MpListUpdateType eUpdateType)
+ /**/
+ void __mp_list_view_update_list(int nListTabType,
+ MpListUpdateType eUpdateType)
{
VideoLogInfo("");
mp_option_ctrl_delete_handle();
mp_util_delete_popup_handle();
- //mp_rename_ctrl_delete_handle();
int nViewType = mp_view_as_ctrl_get_type();
#ifdef VS_FEATURE_LIST_VIEW
if (nViewType == MP_LIST_VIEW_AS_NORMAL_LIST) {
mp_normal_view_arrange_list_item(g_pMainViewHandle,
- g_pMainViewWidget, eUpdateType,
- (void *)
- __mp_list_view_result_user_cb);
+ g_pMainViewWidget, eUpdateType,
+ (void *)
+ __mp_list_view_result_user_cb);
} else
#endif
- if (nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
- mp_folder_view_arrange_folder_list(g_pMainViewHandle,
- g_pMainViewWidget, eUpdateType,
- (void *)
- __mp_list_view_result_user_cb);
- } else if (nViewType == MP_LIST_VIEW_AS_THUMBNAIL_LIST) {
- mp_thumbnail_view_arrange_list_item(g_pMainViewHandle,
- g_pMainViewWidget,
- eUpdateType,
- (void *)
- __mp_list_view_result_user_cb);
- }
+ if (nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
+ mp_folder_view_arrange_folder_list(g_pMainViewHandle,
+ g_pMainViewWidget, eUpdateType,
+ (void *)
+ __mp_list_view_result_user_cb);
+ } else if (nViewType == MP_LIST_VIEW_AS_THUMBNAIL_LIST) {
+ mp_thumbnail_view_arrange_list_item(g_pMainViewHandle,
+ g_pMainViewWidget,
+ eUpdateType, (void *)
+ __mp_list_view_result_user_cb);
+ }
mp_list_view_check_more_button_of_toolbar();
- /*mp_list_view_check_center_button_of_toolbar();*/
-
}
char *__mp_list_view_text_get_video_number_cb(void *pUserData,
- Evas_Object *pObj,
- const char *part)
+ Evas_Object * pObj,
+ const char *part)
{
VideoLogInfo("");
nCount = mp_util_svc_get_number_of_video_item_by_type();
}
- VideoLogInfo("nViewType : [%d], nCount : [%d]", nViewType,
- nCount);
+ VideoLogInfo("nViewType : [%d], nCount : [%d]", nViewType, nCount);
if (nCount == 1) {
if (nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
return g_strdup_printf("%s",
- VIDEOS_FOLDERVIEW_BODY_ONE_FOLDER);
+ VIDEOS_FOLDERVIEW_BODY_ONE_FOLDER);
} else {
return g_strdup_printf("%s",
- VIDEOS_LISTVIEW_BODY_ONE_VIDEO);
+ VIDEOS_LISTVIEW_BODY_ONE_VIDEO);
}
} else {
if (nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
return g_strdup_printf(VIDEOS_FOLDERVIEW_BODY_PD_FOLDERS,
- nCount);
+ nCount);
} else {
return g_strdup_printf(VIDEOS_LISTVIEW_BODY_PD_VIDEOS,
- nCount);
+ nCount);
}
}
}
return NULL;
}
-/**/
+ /**/
/*//////////////////////////////////////////////////*/
-
void mp_list_view_update_whole_genlist(MpListUpdateType eUpdateType)
{
if (!g_pMainViewHandle) {
#ifdef VS_FEATURE_LIST_VIEW
if (nViewType == MP_LIST_VIEW_AS_NORMAL_LIST) {
mp_normal_view_arrange_list_item(g_pMainViewHandle,
- g_pMainViewWidget,
- eUpdateType,
- (void *)
- __mp_list_view_result_user_cb);
+ g_pMainViewWidget,
+ eUpdateType, (void *)
+ __mp_list_view_result_user_cb);
} else
#endif
- if (nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
- mp_folder_view_arrange_folder_list(g_pMainViewHandle,
- g_pMainViewWidget,
- eUpdateType,
- (void *)
- __mp_list_view_result_user_cb);
- mp_folder_item_view_update_video_list(LIST_UPDATE_TYPE_NONE); /*folder item view, update NONE*/
- }
+ if (nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
+ mp_folder_view_arrange_folder_list(g_pMainViewHandle,
+ g_pMainViewWidget,
+ eUpdateType, (void *)
+ __mp_list_view_result_user_cb);
+ mp_folder_item_view_update_video_list(LIST_UPDATE_TYPE_NONE); /*folder item view, update NONE */
+ }
if (mp_personal_view_is_top_view()) {
mp_personal_view_update();
}
}
mp_ft_ctrl_rotate_update();
- /*mp_list_view_check_center_button_of_toolbar();*/
}
void mp_list_view_rotate_view(MpListUpdateType eUpdateType)
mp_ft_ctrl_rotate_update();
}
-static void __mp_main_title_layout_del_cb(void *pUserData, Evas *e,
- Evas_Object *pObject,
- void *pEventInfo)
+static void __mp_main_title_layout_del_cb(void *pUserData, Evas * e,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!g_pMainViewWidget) {
VideoLogError("g_pMainViewWidget == NUL!!!");
}
static void __mp_main_video_index_item_del_cb(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
if (!g_pMainViewWidget) {
VideoLogError("g_pMainViewWidget == NUL!!!");
if (nCount == 0) {
if (g_pMainViewWidget->pListViewTitlelayout != NULL) {
elm_box_unpack(g_pMainViewWidget->pBox,
- g_pMainViewWidget->pListViewTitlelayout);
+ g_pMainViewWidget->pListViewTitlelayout);
evas_object_del(g_pMainViewWidget->pListViewTitlelayout);
g_pMainViewWidget->pListViewTitlelayout = NULL;
}
} else {
- /* genlist - groupindex*/
+ /* genlist - groupindex */
if (g_pMainViewWidget->pVideoGenlistItemForTitle != NULL) {
- elm_object_item_del(g_pMainViewWidget->
- pVideoGenlistItemForTitle);
+ elm_object_item_del
+ (g_pMainViewWidget->pVideoGenlistItemForTitle);
}
if (g_pMainViewWidget->pVideoGenlistTitleItc == NULL) {
g_pMainViewWidget->pVideoGenlistTitle =
elm_genlist_add(g_pMainViewWidget->pBox);
elm_genlist_mode_set(g_pMainViewWidget->pVideoGenlistTitle,
- ELM_LIST_COMPRESS);
+ ELM_LIST_COMPRESS);
evas_object_show(g_pMainViewWidget->pVideoGenlistTitle);
}
if (g_pMainViewWidget->pListViewTitlelayout == NULL) {
Evas_Object *pTTSObject = NULL;
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_CUSTOM_THEME);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_CUSTOM_THEME);
- /* create layout*/
+ /* create layout */
g_pMainViewWidget->pListViewTitlelayout =
elm_layout_add(g_pMainViewWidget->pBox);
- evas_object_size_hint_weight_set(g_pMainViewWidget->
- pListViewTitlelayout,
- EVAS_HINT_EXPAND, 0);
- evas_object_size_hint_align_set(g_pMainViewWidget->
- pListViewTitlelayout,
- EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set
+ (g_pMainViewWidget->pListViewTitlelayout, EVAS_HINT_EXPAND,
+ 0);
+ evas_object_size_hint_align_set
+ (g_pMainViewWidget->pListViewTitlelayout, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
elm_layout_file_set(g_pMainViewWidget->pListViewTitlelayout,
- edj_path,
- "count_info_groupindex");
- evas_object_event_callback_add(g_pMainViewWidget->
- pListViewTitlelayout,
- EVAS_CALLBACK_DEL,
- __mp_main_title_layout_del_cb,
- NULL);
+ edj_path, "count_info_groupindex");
+ evas_object_event_callback_add
+ (g_pMainViewWidget->pListViewTitlelayout,
+ EVAS_CALLBACK_DEL, __mp_main_title_layout_del_cb, NULL);
evas_object_show(g_pMainViewWidget->pListViewTitlelayout);
pTTSObject =
- elm_access_object_register(g_pMainViewWidget->
- pListViewTitlelayout,
- g_pMainViewWidget->pBox);
+ elm_access_object_register
+ (g_pMainViewWidget->pListViewTitlelayout,
+ g_pMainViewWidget->pBox);
elm_access_info_cb_set(pTTSObject, ELM_ACCESS_TYPE,
- __mp_list_view_count_layout_tts_cb,
- NULL);
+ __mp_list_view_count_layout_tts_cb,
+ NULL);
- elm_layout_content_set(g_pMainViewWidget->
- pListViewTitlelayout,
- "elm.swallow.groupindex",
- g_pMainViewWidget->pVideoGenlistTitle);
+ elm_layout_content_set(g_pMainViewWidget->pListViewTitlelayout,
+ "elm.swallow.groupindex",
+ g_pMainViewWidget->pVideoGenlistTitle);
elm_box_pack_start(g_pMainViewWidget->pBox,
- g_pMainViewWidget->pListViewTitlelayout);
+ g_pMainViewWidget->pListViewTitlelayout);
}
g_pMainViewWidget->pVideoGenlistItemForTitle =
elm_genlist_item_append(g_pMainViewWidget->pVideoGenlistTitle,
- g_pMainViewWidget->
- pVideoGenlistTitleItc, NULL, NULL,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
- elm_object_item_del_cb_set(g_pMainViewWidget->
- pVideoGenlistItemForTitle,
- __mp_main_video_index_item_del_cb);
+ g_pMainViewWidget->pVideoGenlistTitleItc,
+ NULL, NULL, ELM_GENLIST_ITEM_NONE,
+ NULL, NULL);
+ elm_object_item_del_cb_set
+ (g_pMainViewWidget->pVideoGenlistItemForTitle,
+ __mp_main_video_index_item_del_cb);
}
}
evas_object_del(g_pMainViewWidget->pListViewBaselayout);
g_pMainViewWidget->pListViewBaselayout = NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_LISTVIEW_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_LISTVIEW_EDJ);
g_pMainViewWidget->pListViewBaselayout = elm_layout_add(pParent);
elm_layout_file_set(g_pMainViewWidget->pListViewBaselayout,
- edj_path, LISTVIEW_EDJ_GROUP);
- evas_object_size_hint_weight_set(g_pMainViewWidget->
- pListViewBaselayout,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(g_pMainViewWidget->
- pListViewBaselayout, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ edj_path, LISTVIEW_EDJ_GROUP);
+ evas_object_size_hint_weight_set
+ (g_pMainViewWidget->pListViewBaselayout, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(g_pMainViewWidget->pListViewBaselayout,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
return g_pMainViewWidget->pListViewBaselayout;
}
VideoLogAssert(0);
return;
}
- /* if (g_pMainViewWidget->pListViewBaselayout == NULL)*/
- /* {*/
- /* g_pMainViewWidget->pListViewBaselayout = mp_list_view_create_base_layout(g_pMainViewWidget->pBox);*/
- /* }*/
evas_object_show(g_pMainViewWidget->pListViewBaselayout);
- /*elm_box_pack_end(g_pMainViewWidget->pBox, g_pMainViewWidget->pListViewBaselayout);*/
- /*elm_box_pack_end(g_pMainViewWidget->pBox, g_pMainViewWidget->pListViewBaselayout);*/
mp_list_view_check_more_button_of_toolbar();
__mp_list_view_update_list(g_pMainViewHandle->nListTabType,
- LIST_UPDATE_TYPE_ALL);
+ LIST_UPDATE_TYPE_ALL);
}
void mp_list_view_init_widget(void *pNaviFrameHandle)
g_pMainViewHandle->nListTabType = mp_util_get_main_tab_type();
VideoLogInfo("g_pMainViewHandle->nListTabType : [%d]",
- g_pMainViewHandle->nListTabType);
+ g_pMainViewHandle->nListTabType);
if (g_pMainViewHandle->nListTabType != LIST_TAB_TYPE_PERSONAL
- && g_pMainViewHandle->nListTabType != LIST_TAB_TYPE_DEVICES) {
+ && g_pMainViewHandle->nListTabType != LIST_TAB_TYPE_DEVICES) {
VideoLogError("ListTabType error : [%d]!!!",
- g_pMainViewHandle->nListTabType);
+ g_pMainViewHandle->nListTabType);
g_pMainViewHandle->nListTabType = LIST_TAB_TYPE_PERSONAL;
mp_util_set_main_tab_type(g_pMainViewHandle->nListTabType);
}
g_pMainViewHandle->pNaviFrameHandle = pNaviFrameHandle;
- /* g_pMainViewWidget->pBox = elm_box_add((Evas_Object*)pNaviFrameHandle);*/
- /* elm_box_horizontal_set(g_pMainViewWidget->pBox, EINA_FALSE);*/
- /* evas_object_show(g_pMainViewWidget->pBox);*/
-
-
if (g_pMainViewWidget->pListViewBaselayout == NULL) {
g_pMainViewWidget->pListViewBaselayout =
- mp_list_view_create_base_layout(g_pMainViewHandle->
- pNaviFrameHandle);
+ mp_list_view_create_base_layout
+ (g_pMainViewHandle->pNaviFrameHandle);
}
g_pMainViewHandle->pNaviFrameItem =
elm_naviframe_item_push(g_pMainViewHandle->pNaviFrameHandle,
- VIDEOS_TITLE_VIDEO, NULL, NULL,
- g_pMainViewWidget->pListViewBaselayout,
- NULL);
+ VIDEOS_TITLE_VIDEO, NULL, NULL,
+ g_pMainViewWidget->pListViewBaselayout,
+ NULL);
elm_naviframe_item_pop_cb_set(g_pMainViewHandle->pNaviFrameItem,
- mp_list_view_back_btn_cb,
- g_pMainViewHandle);
- elm_naviframe_item_title_enabled_set(g_pMainViewHandle->
- pNaviFrameItem, EINA_TRUE,
- EINA_FALSE);
+ mp_list_view_back_btn_cb,
+ g_pMainViewHandle);
+ elm_naviframe_item_title_enabled_set(g_pMainViewHandle->pNaviFrameItem,
+ EINA_TRUE, EINA_FALSE);
evas_object_smart_callback_add(g_pMainViewHandle->pNaviFrameHandle,
- "transition,finished",
- mp_list_view_naviframe_transition_effect_cb,
- NULL);
+ "transition,finished",
+ mp_list_view_naviframe_transition_effect_cb,
+ NULL);
__mp_list_view_register_recently_config();
- /* mp_util_cloud_change_callback_register((void*)__mp_list_view_result_user_cb);*/
mp_util_svc_set_update_db_cb_func((UpdateDatabaseCbFunc)
- __mp_list_view_db_change_cb);
+ __mp_list_view_db_change_cb);
mp_util_hide_indicator();
g_pMainViewHandle->nListTabType = mp_util_get_main_tab_type();
g_pMainViewHandle =
(st_VideoListViewMainViewHandle *) calloc(1,
- sizeof
- (st_VideoListViewMainViewHandle));
+ sizeof
+ (st_VideoListViewMainViewHandle));
g_pMainViewWidget =
(st_VideoListViewMainViewWidget *) calloc(1,
- sizeof
- (st_VideoListViewMainViewWidget));
+ sizeof
+ (st_VideoListViewMainViewWidget));
}
if (mp_mgr_get_library_naviframe()) {
int count =
eina_list_count(elm_naviframe_items_get
- (mp_mgr_get_library_naviframe()));
+ (mp_mgr_get_library_naviframe()));
VideoLogInfo("eina_list_count = %d", count);
return (count == 1);
}
}
static char *__mp_list_view_count_layout_tts_cb(void *data,
- Evas_Object *obj)
+ Evas_Object * obj)
{
Elm_Object_Item *pItem = NULL;
const char *pText = NULL;
if (g_pMainViewWidget->pListViewTitlelayout == NULL) {
VideoLogError
- ("g_pMainViewWidget->pListViewTitlelayout == NULL!!!");
+ ("g_pMainViewWidget->pListViewTitlelayout == NULL!!!");
return NULL;
}
mp_ft_ctrl_hide_more_popup();
if (g_pMainViewHandle->nListTabType == LIST_TAB_TYPE_PERSONAL) {
- int nSortType = mp_sort_ctrl_get_sort_state();
- if (MP_LIST_SORT_BY_RECENTLY_ADDED == nSortType) {
- char *pFirstPath = mp_util_svc_get_video_url(0);
- char *pVideoPath = mp_util_config_get_preview();
- if (g_strcmp0(pFirstPath, pVideoPath) != 0) {
- MP_FREE_STRING(pVideoPath);
- MP_FREE_STRING(pFirstPath);
- __mp_list_view_db_update(-1);
- return;
- }
- MP_FREE_STRING(pVideoPath);
- MP_FREE_STRING(pFirstPath);
- }
- /*if (MP_LIST_SORT_BY_RECENTLY_VIEWED == nSortType)
- {
- mp_search_view_update_played_item(0);
- } */
- else {
- mp_search_view_update_played_item(-1);
- }
+ mp_search_view_update_played_item(-1);
#ifdef VS_FEATURE_LIST_VIEW
if (nViewType == MP_LIST_VIEW_AS_NORMAL_LIST) {
int nSelectedVideoItemIndex =
mp_normal_view_update_video_items(nSelectedVideoItemIndex);
} else
#endif
- if (nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
- VideoLogInfo("MP_LIST_VIEW_AS_FOLDER_LIST");
- mp_folder_item_view_update_played_item();
- mp_search_view_update_genlist();
- } else if (nViewType == MP_LIST_VIEW_AS_THUMBNAIL_LIST) {
- VideoLogInfo("MP_LIST_VIEW_AS_THUMBNAIL_LIST");
- mp_thumbnail_view_update_played_item();
- } else {
- VideoLogInfo("Don't need to update video item");
- }
+ if (nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
+ VideoLogInfo("MP_LIST_VIEW_AS_FOLDER_LIST");
+ mp_folder_item_view_update_played_item();
+ mp_search_view_update_genlist();
+ } else if (nViewType == MP_LIST_VIEW_AS_THUMBNAIL_LIST) {
+ VideoLogInfo("MP_LIST_VIEW_AS_THUMBNAIL_LIST");
+ mp_thumbnail_view_update_played_item();
+ } else {
+ VideoLogInfo("Don't need to update video item");
+ }
}
VideoLogInfo("MP_LIST_VIEW_AS_FOLDER_LIST");
mp_folder_item_view_update_played_item();
mp_search_view_update_genlist();
- } else if (nViewType == MP_LIST_VIEW_AS_THUMBNAIL_LIST) {
- VideoLogInfo("MP_LIST_VIEW_AS_THUMBNAIL_LIST");
- mp_thumbnail_view_update_played_item();
- } else {
- VideoLogInfo("Don't need to update video item");
- }
+ } else if (nViewType == MP_LIST_VIEW_AS_THUMBNAIL_LIST) {
+ VideoLogInfo("MP_LIST_VIEW_AS_THUMBNAIL_LIST");
+ mp_thumbnail_view_update_played_item();
+ } else {
+ VideoLogInfo("Don't need to update video item");
+ }
}
+
void mp_list_view_change_language(void)
{
if (!g_pMainViewHandle || !g_pMainViewWidget) {
VideoLogInfo("");
- elm_object_item_domain_translatable_part_text_set(g_pMainViewHandle->
- pNaviFrameItem,
- "elm.text.title",
- PACKAGE,
- VIDEOS_TITLE_VIDEO);
+ elm_object_item_domain_translatable_part_text_set
+ (g_pMainViewHandle->pNaviFrameItem, "elm.text.title", PACKAGE,
+ VIDEOS_TITLE_VIDEO);
#ifdef VS_FEATURE_LIST_VIEW
mp_normal_view_change_language();
#endif
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
if (!g_pNormalView->pNocontentlayout) {
g_pNormalView->pNocontentlayout =
- mp_create_nocontent_layout(g_pNormalView->pMainWidget->
- pListViewBaselayout,
- VIDEOS_NOCONTENT_MSG_NO_VIDEOS_IDS,
- VIDEOS_NOCONTENT_MSG_NO_VIDEOS_DESC_IDS);
- elm_object_part_content_unset(g_pNormalView->pMainWidget->
- pListViewBaselayout,
- SWALLOW_LISTVIEW_CONTENT);
+ mp_create_nocontent_layout(g_pNormalView->
+ pMainWidget->pListViewBaselayout,
+ VIDEOS_NOCONTENT_MSG_NO_VIDEOS_IDS,
+ VIDEOS_NOCONTENT_MSG_NO_VIDEOS_DESC_IDS);
+ elm_object_part_content_unset(g_pNormalView->
+ pMainWidget->pListViewBaselayout,
+ SWALLOW_LISTVIEW_CONTENT);
if (g_pNormalView->pVideosGenlist) {
evas_object_hide(g_pNormalView->pVideosGenlist);
}
evas_object_show(g_pNormalView->pMainWidget->pListViewBaselayout);
- elm_object_part_content_set(g_pNormalView->pMainWidget->
- pListViewBaselayout,
- SWALLOW_LISTVIEW_CONTENT,
- g_pNormalView->pNocontentlayout);
+ elm_object_part_content_set(g_pNormalView->
+ pMainWidget->pListViewBaselayout,
+ SWALLOW_LISTVIEW_CONTENT,
+ g_pNormalView->pNocontentlayout);
}
}
}
if (g_pNormalView->pVideoItemList) {
Elm_Object_Item *pTmpVideoGenlistItem = NULL;
- EINA_LIST_FREE(g_pNormalView->pVideoItemList,
- pTmpVideoGenlistItem) {
+ EINA_LIST_FREE(g_pNormalView->pVideoItemList, pTmpVideoGenlistItem) {
if (pTmpVideoGenlistItem) {
int nIndex =
(int) elm_object_item_data_get(pTmpVideoGenlistItem);
if (!g_pNormalView->pVideoItemList) {
VideoLogWarning
- ("[WARNING] g_pNormalView->pVideoItemList is not existed.");
+ ("[WARNING] g_pNormalView->pVideoItemList is not existed.");
return;
}
Elm_Object_Item *pTmpVideoGenlistItem =
(Elm_Object_Item *) eina_list_nth(g_pNormalView->pVideoItemList,
- nVideoItemIndex);
+ nVideoItemIndex);
if (pTmpVideoGenlistItem) {
- /*elm_genlist_item_update(pTmpVideoGenlistItem);*/
- /*elm_genlist_item_fields_update(pTmpVideoGenlistItem, "elm.icon.1", ELM_GENLIST_ITEM_FIELD_CONTENT);*/
elm_genlist_item_selected_set(pTmpVideoGenlistItem, EINA_FALSE);
int nLastPlayedTime =
mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
mp_util_svc_get_video_duration_time(nVideoItemIndex);
Evas_Object *pIconContent =
elm_object_item_part_content_get(pTmpVideoGenlistItem,
- "elm.icon.1");
+ "elm.icon.1");
if (!pIconContent) {
VideoLogError("");
return;
if (!pProgressbar) {
elm_genlist_item_fields_update(pTmpVideoGenlistItem,
- "elm.icon.1",
- ELM_GENLIST_ITEM_FIELD_CONTENT);
+ "elm.icon.1",
+ ELM_GENLIST_ITEM_FIELD_CONTENT);
} else {
elm_progressbar_value_set(pProgressbar, nRatio);
}
} else {
if (pProgressbar) {
elm_layout_content_unset(pIconContent,
- "elm.progressbar.icon");
+ "elm.progressbar.icon");
MP_DEL_OBJ(pProgressbar);
}
}
elm_genlist_item_fields_update(pTmpVideoGenlistItem,
- "elm.text.sub.left.bottom",
- ELM_GENLIST_ITEM_FIELD_TEXT);
+ "elm.text.sub.left.bottom",
+ ELM_GENLIST_ITEM_FIELD_TEXT);
}
}
if (mp_mgr_get_library_naviframe()) {
int count =
eina_list_count(elm_naviframe_items_get
- (mp_mgr_get_library_naviframe()));
+ (mp_mgr_get_library_naviframe()));
return (count == 1);
}
return FALSE;
}
static void __mp_normal_view_warning_popup_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
return TRUE;
}
-/**/
+ /**/
/*////////////////////////////////////////////////////////////*/
-
-
/*////////////////////////////////////////////////////////////*/
-/**/
-void mp_normal_view_thumbnail_update_cb(int nError, const char *szPath,
- void *pUserData)
+ /**/
+ void mp_normal_view_thumbnail_update_cb(int nError, const char *szPath,
+ void *pUserData)
{
if (!g_pNormalView) {
VideoLogError("");
if (g_pNormalView->pVideoItemList) {
Elm_Object_Item *pTmpVideoGenlistItem =
- (Elm_Object_Item *) eina_list_nth(g_pNormalView->
- pVideoItemList,
- nVideoItemIndex);
+ (Elm_Object_Item *)
+ eina_list_nth(g_pNormalView->pVideoItemList,
+ nVideoItemIndex);
if (pTmpVideoGenlistItem) {
elm_genlist_item_fields_update(pTmpVideoGenlistItem,
- "elm.icon.1",
- ELM_GENLIST_ITEM_FIELD_CONTENT);
+ "elm.icon.1",
+ ELM_GENLIST_ITEM_FIELD_CONTENT);
} else {
VideoLogError
- ("[ERR] Fail to update genlist filed thumbnail icon.");
+ ("[ERR] Fail to update genlist filed thumbnail icon.");
}
} else {
VideoLogError("[ERR] No exist g_pNormalView->pVideoItemList.");
}
-
- /* elm_genlist_realized_items_update(g_pNormalView->pVideosGenlist);*/
}
-/**/
+ /**/
/*////////////////////////////////////////////////////////////*/
-
/*////////////////////////////////////////////////////////////*/
/* Smart callback of Genlist about normal.*/
static void __mp_normal_view_genlist_language_changed_cb(void *pUserData,
- Evas_Object *
- pObject,
- void *pEventInfo)
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
if (mp_normal_view_is_normal_list() == FALSE) {
VideoLogError("Current list is not for normal video item.");
}
static void __mp_normal_view_realize_genlist_item_cb(void *pUserData,
- Evas_Object *
- pObject,
- void *pEventInfo)
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
if (!g_pNormalView) {
VideoLogError("");
}
if ((nIndexGenlist < 0)
- || (nIndexGenlist >=
- mp_util_svc_get_number_of_video_item_by_type())) {
+ || (nIndexGenlist >=
+ mp_util_svc_get_number_of_video_item_by_type())) {
VideoLogError("nIndexGenlist < 0 = RETURN = %d", nIndexGenlist);
return;
}
char *pThumbIconUri = mp_util_svc_get_video_thumbnail(nIndexGenlist);
if (!pThumbIconUri) {
VideoLogInfo("nIndexGenlist : %d", nIndexGenlist);
- mp_util_svc_register_thumbnail_update_func(nIndexGenlist,
- (void *)
- mp_normal_view_thumbnail_update_cb,
- (void *)
- nIndexGenlist);
+ mp_util_svc_register_thumbnail_update_func(nIndexGenlist, (void *)
+ mp_normal_view_thumbnail_update_cb,
+ (void *)
+ nIndexGenlist);
} else {
free(pThumbIconUri);
pThumbIconUri = NULL;
/*////////////////////////////////////////////////////////////*/
/* Content/Text Callback of Elm_Genlist_Item_Class.*/
char *mp_normal_view_get_label_of_video_item_cb(const void *pUserData,
- Evas_Object *pObject,
- const char *pPart)
+ Evas_Object * pObject,
+ const char *pPart)
{
int nVideoItemIndex = (int) pUserData;
}
Evas_Object *mp_normal_view_get_icon_of_video_item_cb(const void
- *pUserData,
- Evas_Object *
- pObject,
- const char *pPart)
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char *pPart)
{
Evas_Object *pLayout = NULL;
if (!pPart || !pObject) {
return NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_CUSTOM_THEME);
pLayout = elm_layout_add(pObject);
elm_layout_file_set(pLayout, edj_path,
- "listview.thumbnail.layout");
+ "listview.thumbnail.layout");
if (!pThumbIconUri || !vp_file_exists(pThumbIconUri)) {
MP_FREE_STRING(pThumbIconUri);
pBg =
mp_util_create_preload_image(pLayout, pThumbIconUri,
- VIDEO_ICON_WIDTH);
+ VIDEO_ICON_WIDTH);
elm_layout_content_set(pLayout, "elm.thumbnail.icon", pBg);
if (pBg)
Evas_Object *pProgressBar =
mp_widget_ctrl_create_progressbar(pLayout, nRatio);
elm_layout_content_set(pLayout, "elm.progressbar.icon",
- pProgressBar);
+ pProgressBar);
if (pProgressBar) {
evas_object_show(pProgressBar);
if (!mp_util_create_video_sub_icon(pLayout, nVideoItemIndex)) {
VideoLogWarning("Local File or Create sub icon is failed.",
- nVideoItemIndex);
+ nVideoItemIndex);
}
if (pLayout) {
}
Evas_Object *mp_normal_view_get_icon_of_no_item_cb(const void *pUserData,
- Evas_Object *pObject,
- const char *pPart)
+ Evas_Object * pObject,
+ const char *pPart)
{
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_NO_ITEM_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_NO_ITEM_EDJ);
free(path);
if (!strcmp(pPart, "elm.icon")) {
int width = NO_ITEM_GENLIST_WIDTH * elm_config_scale_get();
Evas_Object *pNoItemLayout = NULL;
pNoItemLayout = elm_layout_add(pObject);
elm_layout_file_set(pNoItemLayout, edj_path,
- GENLIST_NOITEM_EDJ_GROUP);
+ GENLIST_NOITEM_EDJ_GROUP);
evas_object_size_hint_min_set(pNoItemLayout, width, height);
elm_object_part_text_set(pNoItemLayout,
- SWALLOW_LISTVIEW_NO_ITEM_TEXT,
- VIDEOS_NOCONTENT_MSG_NO_VIDEOS_DESC);
+ SWALLOW_LISTVIEW_NO_ITEM_TEXT,
+ VIDEOS_NOCONTENT_MSG_NO_VIDEOS_DESC);
evas_object_show(pNoItemLayout);
return pNoItemLayout;
}
/*////////////////////////////////////////////////////////////*/
-/**/
-static void mp_normal_view_select_video_item_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ /**/
+ static void mp_normal_view_select_video_item_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!pObject) {
VideoLogError("[ERR]No have pUserData");
if (!mp_launch_video_allow_check()) {
return;
}
- Evas_Object *pPopup = evas_object_data_get(pObject, "popup"); /* Get popup*/
+ Evas_Object *pPopup = evas_object_data_get(pObject, "popup"); /* Get popup */
if (pPopup) {
VideoLogError("long press is called");
- return; /* If popup exists, do nothing*/
+ return; /* If popup exists, do nothing */
}
int nTotal = elm_genlist_items_count(pObject);
- /*int nVideoItemIndex = elm_genlist_item_index_get(pSelectedItem);*/
int nVideoItemIndex = (int) elm_object_item_data_get(pSelectedItem);
if (nVideoItemIndex < 0) {
return;
}
- VideoLogInfo("nVideoIndex:ngenIndex : %d:%d", nVideoItemIndex,
- nTotal);
+ VideoLogInfo("nVideoIndex:ngenIndex : %d:%d", nVideoItemIndex, nTotal);
if (nVideoItemIndex < 0) {
if (!mp_util_call_off()) {
mp_util_ticker_toast_popup
- (VIDEOS_NOTIPOP_MSG_UNABLE_TO_PLAY_VIDEO_DURING_CALL, false,
- false);
+ (VIDEOS_NOTIPOP_MSG_UNABLE_TO_PLAY_VIDEO_DURING_CALL, false,
+ false);
return;
}
if (szMediaUrl) {
if (!mp_util_check_local_file_exist(szMediaUrl)) {
mp_util_notify_popup(NULL, VIDEOS_COMMON_HEADER_ERROR,
- VIDEOS_NOTIPOP_MSG_FILE_NOT_EXIST,
- __mp_normal_view_warning_popup_cb);
+ VIDEOS_NOTIPOP_MSG_FILE_NOT_EXIST,
+ __mp_normal_view_warning_popup_cb);
free(szMediaUrl);
return;
}
}
}
-/**/
+ /**/
/*////////////////////////////////////////////////////////////*/
-
/*////////////////////////////////////////////////////////////*/
/* Append item into genlist.*/
-
static void __mp_normal_view_video_item_del_cb(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
if (!g_pNormalView) {
VideoLogError("");
Eina_List *pCurList = NULL;
Elm_Object_Item *pTmpVideoItem = NULL;
EINA_LIST_FOREACH(g_pNormalView->pVideoItemList, pCurList,
- pTmpVideoItem) {
+ pTmpVideoItem) {
if (pCurrentItem == pTmpVideoItem) {
mp_util_svc_cancel_thumbnail_update(nIndexGenlist);
VideoLogInfo("testestesteste=%p", pCurrentItem);
for (nIndex = 0; nIndex < nVideoListSize; nIndex++) {
pTmpVideoGenlistItem =
elm_genlist_item_append(pVideosGenlist,
- g_pNormalView->pVideoList_Itc,
- (void *) nIndex, NULL,
- ELM_GENLIST_ITEM_NONE,
- mp_normal_view_select_video_item_cb,
- NULL);
+ g_pNormalView->pVideoList_Itc,
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ mp_normal_view_select_video_item_cb,
+ NULL);
g_pNormalView->pVideoItemList =
eina_list_append(g_pNormalView->pVideoItemList,
- pTmpVideoGenlistItem);
+ pTmpVideoGenlistItem);
elm_object_item_data_set(pTmpVideoGenlistItem, (void *) nIndex);
elm_object_item_del_cb_set(pTmpVideoGenlistItem,
- __mp_normal_view_video_item_del_cb);
+ __mp_normal_view_video_item_del_cb);
}
}
#ifdef ENABLE_LONGPRESS
static void __mp_normal_view_share_via_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
mp_option_ctrl_delete_handle();
if (!g_pNormalView->pMainHandle) {
VideoLogInfo
- ("g_pNormalView->pMainHandle of list view are not existed.");
+ ("g_pNormalView->pMainHandle of list view are not existed.");
return;
}
VideoLogInfo("");
if (bDRMLock) {
MP_FREE_STRING(pVideo_url);
mp_util_notify_popup(NULL, VIDEOS_COMMON_HEADER_ERROR,
- VIDEOS_NOTIPOP_MSG_UNABLE_TO_SHARE_DRM_FILE,
- __mp_normal_view_warning_popup_cb);
+ VIDEOS_NOTIPOP_MSG_UNABLE_TO_SHARE_DRM_FILE,
+ __mp_normal_view_warning_popup_cb);
return;
}
#endif
if (g_pNormalView->pMainHandle) {
- mp_external_service_share_panel(pVideo_url); /*, g_pNormalView->pMainHandle->pNaviFrameHandle);*/
+ mp_external_service_share_panel(pVideo_url); /*, g_pNormalView->pMainHandle->pNaviFrameHandle); */
}
MP_FREE_STRING(pVideo_url);
}
static void __mp_normal_view_add_to_home_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
mp_option_ctrl_delete_handle();
if (!g_pNormalView->pMainHandle) {
VideoLogError
- ("g_pNormalView->pMainHandle of list view are not existed.");
+ ("g_pNormalView->pMainHandle of list view are not existed.");
return;
}
mp_util_svc_get_video_thumbnail(nVideoItemIndex);
if (pVideo_id) {
- /* if (!mp_util_add_to_home(pVideo_id, pVideo_thumbnail))*/
{
mp_util_status_bar_noti_popup_show(MP_COM_OPT_UNABLE_ADDED);
}
MP_FREE_STRING(pVideo_id);
MP_FREE_STRING(pVideo_thumbnail);
- /*to do share*/
+ /*to do share */
}
#endif
#ifdef ENABLE_LONGPRESS
static void mp_normal_view_detail_video_popup_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
mp_util_delete_popup_handle();
}
static void mp_normal_view_detail_mouse_back_popup_cb(void *pUserData,
- Evas *pEvas,
- Evas_Object *
- pObject,
- void *pEventInfo)
+ Evas * pEvas,
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
Evas_Event_Mouse_Up *pEvent = pEventInfo;
if (!pEvent) {
#endif
void mp_normal_view_detail_key_back_popup_cb(void *pUserData,
- Evas *pEvas,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas * pEvas,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
Evas_Event_Key_Down *pEvent = pEventInfo;
if (!pEvent) {
{
if (!g_pNormalView->pVideoItemList || !g_pNormalView->pMainHandle) {
VideoLogWarning
- ("[WARNING] g_pNormalView->pVideoItemList is not existed.");
+ ("[WARNING] g_pNormalView->pVideoItemList is not existed.");
return;
}
Elm_Object_Item *pTmpVideoGenlistItem =
(Elm_Object_Item *) eina_list_nth(g_pNormalView->pVideoItemList,
- nVideoItemIndex);
+ nVideoItemIndex);
if (!pTmpVideoGenlistItem) {
VideoLogWarning
- ("[WARNING] g_pNormalView->pVideoItemList is not existed.");
+ ("[WARNING] g_pNormalView->pVideoItemList is not existed.");
return;
}
g_pNormalView->pVideoItemList =
eina_list_remove(g_pNormalView->pVideoItemList,
- pTmpVideoGenlistItem);
+ pTmpVideoGenlistItem);
elm_object_item_del(pTmpVideoGenlistItem);
if (!pCurrGenlistItem) {
pNextGenlistItem = elm_genlist_item_next_get(pCurrGenlistItem);
g_pNormalView->pVideoItemList =
eina_list_remove(g_pNormalView->pVideoItemList,
- pCurrGenlistItem);
+ pCurrGenlistItem);
elm_object_item_del(pCurrGenlistItem);
pCurrGenlistItem = pNextGenlistItem;
}
for (nIndex = nVideoItemIndex; nIndex < nVideoListSize; nIndex++) {
pTmpVideoGenlistItem =
elm_genlist_item_append(g_pNormalView->pVideosGenlist,
- g_pNormalView->pVideoList_Itc,
- (void *) nIndex, NULL,
- ELM_GENLIST_ITEM_NONE,
- mp_normal_view_select_video_item_cb,
- NULL);
+ g_pNormalView->pVideoList_Itc,
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ mp_normal_view_select_video_item_cb,
+ NULL);
g_pNormalView->pVideoItemList =
eina_list_append(g_pNormalView->pVideoItemList,
- pTmpVideoGenlistItem);
+ pTmpVideoGenlistItem);
elm_object_item_del_cb_set(pTmpVideoGenlistItem,
- __mp_normal_view_video_item_del_cb);
+ __mp_normal_view_video_item_del_cb);
}
if (nVideoListSize == 0) {
static void mp_normal_view_respones_delete_popup_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
mp_util_delete_popup_handle();
VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
if (nVideoItemIndex < 0
- || nVideoItemIndex >=
- mp_util_svc_get_video_list_size_for_checking_index()) {
+ || nVideoItemIndex >=
+ mp_util_svc_get_video_list_size_for_checking_index()) {
VideoLogError("[ERR] list item index.");
return;
}
}
static void __mp_normal_view_delete_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
mp_option_ctrl_delete_handle();
if (!g_pNormalView->pMainHandle) {
VideoLogError
- ("g_pNormalView->pMainHandle of list view are not existed.");
+ ("g_pNormalView->pMainHandle of list view are not existed.");
return;
}
int nVideoItemIndex = (int) pUserData;
MpListViewAsType type = MP_LIST_VIEW_AS_NORMAL_LIST;
mp_util_remove_question_popup(nVideoItemIndex, type,
- mp_normal_view_respones_delete_popup_cb,
- mp_normal_view_detail_video_popup_cb,
- mp_normal_view_detail_mouse_back_popup_cb,
- mp_normal_view_detail_mouse_back_popup_cb);
+ mp_normal_view_respones_delete_popup_cb,
+ mp_normal_view_detail_video_popup_cb,
+ mp_normal_view_detail_mouse_back_popup_cb,
+ mp_normal_view_detail_mouse_back_popup_cb);
}
elm_object_scroll_freeze_pop(g_pNormalView->pVideosGenlist);
}
-/**/
+ /**/
/*////////////////////////////////////////////////////////////*/
-
static void __mp_normal_view_long_pressed_item_cb(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
if (!g_pNormalView || !event_info || !obj) {
VideoLogError("Invalid list and object");
g_pNormalView->bRunLongPress = true;
Elm_Object_Item *long_item = (Elm_Object_Item *) event_info;
- /*elm_genlist_item_selected_set(long_item, EINA_FALSE);*/
int nVideoItemIndex = elm_genlist_item_index_get(long_item);
if (nVideoItemIndex < 0) {
VideoLogError("nGenlistItemIndex is invalid");
}
if (nVideoItemIndex < 0
- || nVideoItemIndex >=
- mp_util_svc_get_video_list_size_for_checking_index()) {
+ || nVideoItemIndex >=
+ mp_util_svc_get_video_list_size_for_checking_index()) {
VideoSecureLogError("nVideoItemIndex is invalid");
return;
}
st_RegisteOptionCbFunc *pRegisteCbFunc =
(st_RegisteOptionCbFunc *) calloc(1,
- sizeof(st_RegisteOptionCbFunc));
+ sizeof(st_RegisteOptionCbFunc));
if (pRegisteCbFunc) {
pRegisteCbFunc->ShareViaItemCb =
(void *) __mp_normal_view_share_via_cb;
pRegisteCbFunc->AddToHomeItemCb =
(void *) __mp_normal_view_add_to_home_cb;
- pRegisteCbFunc->DeleteItemCb =
- (void *) __mp_normal_view_delete_cb;
+ pRegisteCbFunc->DeleteItemCb = (void *) __mp_normal_view_delete_cb;
}
VideoLogDebug("nVideoItemIndex=:%d", nVideoItemIndex);
char *szTitle = mp_util_svc_get_video_title(nVideoItemIndex);
mp_option_ctrl_show(g_pNormalView->pMainHandle->pNaviFrameHandle,
- (const char *) szTitle, nVideoItemIndex,
- pRegisteCbFunc, __mp_normal_view_result_pop_up,
- NULL, 0);
+ (const char *) szTitle, nVideoItemIndex,
+ pRegisteCbFunc, __mp_normal_view_result_pop_up,
+ NULL, 0);
if (mp_option_ctrl_get_handle()) {
evas_object_data_set(g_pNormalView->pVideosGenlist, "popup",
- mp_option_ctrl_get_handle());
+ mp_option_ctrl_get_handle());
elm_object_scroll_freeze_push(g_pNormalView->pVideosGenlist);
}
#endif
static void __mp_normal_view_pressed_item_cb(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
if (!g_pNormalView) {
VideoLogError("Invalid list");
g_pNormalView->bRunLongPress = false;
}
-static void __mp_normal_view_del_genlist_cb(Evas_Object *pVideosGenlist)
+static void __mp_normal_view_del_genlist_cb(Evas_Object * pVideosGenlist)
{
if (!pVideosGenlist) {
VideoSecureLogError("pVideosGenlist is NULL");
return;
}
evas_object_smart_callback_del(pVideosGenlist, "language,changed",
- __mp_normal_view_genlist_language_changed_cb);
+ __mp_normal_view_genlist_language_changed_cb);
evas_object_smart_callback_del(pVideosGenlist, "realized",
- __mp_normal_view_realize_genlist_item_cb);
+ __mp_normal_view_realize_genlist_item_cb);
#ifdef ENABLE_LONGPRESS
evas_object_smart_callback_del(pVideosGenlist, "longpressed",
- __mp_normal_view_long_pressed_item_cb);
+ __mp_normal_view_long_pressed_item_cb);
#endif
evas_object_smart_callback_del(pVideosGenlist, "pressed",
- __mp_normal_view_pressed_item_cb);
+ __mp_normal_view_pressed_item_cb);
}
-static void __mp_normal_view_add_genlist_cb(Evas_Object *pVideosGenlist)
+static void __mp_normal_view_add_genlist_cb(Evas_Object * pVideosGenlist)
{
if (!pVideosGenlist) {
VideoSecureLogError("pVideosGenlist is NULL");
}
evas_object_smart_callback_add(pVideosGenlist, "language,changed",
- __mp_normal_view_genlist_language_changed_cb,
- NULL);
+ __mp_normal_view_genlist_language_changed_cb,
+ NULL);
evas_object_smart_callback_add(pVideosGenlist, "realized",
- __mp_normal_view_realize_genlist_item_cb,
- NULL);
+ __mp_normal_view_realize_genlist_item_cb,
+ NULL);
#ifdef ENABLE_LONGPRESS
evas_object_smart_callback_add(pVideosGenlist, "longpressed",
- __mp_normal_view_long_pressed_item_cb,
- NULL);
+ __mp_normal_view_long_pressed_item_cb,
+ NULL);
#endif
evas_object_smart_callback_add(pVideosGenlist, "pressed",
- __mp_normal_view_pressed_item_cb,
- NULL);
+ __mp_normal_view_pressed_item_cb, NULL);
}
/*//////////////////////////////////////////////////*/
/* External APIs*/
bool mp_normal_view_arrange_list_item(void *pMainViewHandle,
- void *pMainViewWidget,
- MpListUpdateType eUpdateType,
- UpdateListItemsCbFunc
- pUpdateVideoListUserCb)
+ void *pMainViewWidget,
+ MpListUpdateType eUpdateType,
+ UpdateListItemsCbFunc
+ pUpdateVideoListUserCb)
{
if (!pMainViewHandle || !pMainViewWidget || !pUpdateVideoListUserCb) {
VideoLogError
- ("pMainViewHandle or pMainViewHandle or pUpdateVideoListUserCb are not existed.");
+ ("pMainViewHandle or pMainViewHandle or pUpdateVideoListUserCb are not existed.");
return FALSE;
}
int nVideoListSize = 0;
if (eUpdateType == LIST_UPDATE_TYPE_ALL
- || eUpdateType == LIST_UPDATE_TYPE_DATA) {
+ || eUpdateType == LIST_UPDATE_TYPE_DATA) {
mp_util_svc_destory_video_list();
mp_util_svc_extract_video_list_by_item_type
- (mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
+ (mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
}
nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
VideoLogInfo("nVideoListSize : %d", nVideoListSize);
- /*mp_util_svc_set_update_db_cb_func(g_pNormalView->fUpdateListItemUserCb);*/
+
mp_list_view_update_count_layout();
if (nVideoListSize > 0) {
if (g_pNormalView->pNocontentlayout) {
elm_object_part_content_unset(g_pNormalView->pNocontentlayout,
- SWALLOW_LISTVIEW_CONTENT);
+ SWALLOW_LISTVIEW_CONTENT);
MP_DEL_OBJ(g_pNormalView->pNocontentlayout);
}
if (!g_pNormalView->pVideosGenlist) {
g_pNormalView->pVideosGenlist =
- elm_genlist_add(g_pNormalView->pMainWidget->
- pListViewBaselayout);
+ elm_genlist_add(g_pNormalView->
+ pMainWidget->pListViewBaselayout);
elm_scroller_bounce_set(g_pNormalView->pVideosGenlist,
- EINA_FALSE, EINA_TRUE);
- evas_object_size_hint_weight_set(g_pNormalView->
- pVideosGenlist,
- EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EINA_FALSE, EINA_TRUE);
+ evas_object_size_hint_weight_set(g_pNormalView->pVideosGenlist,
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(g_pNormalView->pVideosGenlist,
- EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
elm_genlist_mode_set(g_pNormalView->pVideosGenlist,
- ELM_LIST_COMPRESS);
+ ELM_LIST_COMPRESS);
elm_genlist_homogeneous_set(g_pNormalView->pVideosGenlist,
- EINA_TRUE);
+ EINA_TRUE);
elm_genlist_block_count_set(g_pNormalView->pVideosGenlist,
- VIDEO_MAIN_LIST_BLOCK_COUNT);
- elm_scroller_single_direction_set(g_pNormalView->
- pVideosGenlist,
- ELM_SCROLLER_SINGLE_DIRECTION_HARD);
- evas_object_show(g_pNormalView->pMainWidget->
- pListViewBaselayout);
- __mp_normal_view_del_genlist_cb(g_pNormalView->
- pVideosGenlist);
- __mp_normal_view_add_genlist_cb(g_pNormalView->
- pVideosGenlist);
+ VIDEO_MAIN_LIST_BLOCK_COUNT);
+ elm_scroller_single_direction_set
+ (g_pNormalView->pVideosGenlist,
+ ELM_SCROLLER_SINGLE_DIRECTION_HARD);
+ evas_object_show(g_pNormalView->
+ pMainWidget->pListViewBaselayout);
+ __mp_normal_view_del_genlist_cb(g_pNormalView->pVideosGenlist);
+ __mp_normal_view_add_genlist_cb(g_pNormalView->pVideosGenlist);
}
- elm_object_part_content_set(g_pNormalView->pMainWidget->
- pListViewBaselayout,
- SWALLOW_LISTVIEW_CONTENT,
- g_pNormalView->pVideosGenlist);
+ elm_object_part_content_set(g_pNormalView->
+ pMainWidget->pListViewBaselayout,
+ SWALLOW_LISTVIEW_CONTENT,
+ g_pNormalView->pVideosGenlist);
mp_normal_view_append_video_items(g_pNormalView->pVideosGenlist);
{
if (!g_pNormalView || !g_pNormalView->pVideosGenlist) {
VideoLogWarning
- ("[ERR] pVideosGenlist or g_pMainViewWidget are NULL.");
+ ("[ERR] pVideosGenlist or g_pMainViewWidget are NULL.");
return;
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <Eina.h>
#include <Ecore_Evas.h>
#include "mp-rotate-ctrl.h"
#include "videos-view-mgr.h"
-typedef struct
-{
+typedef struct {
void *pNaviFrameHandle;
void *pNaviFrameItem;
void *pPreNaviItem;
#ifdef VS_FEATURE_THUMBNAIL_VIEW //
bool bLandscape;
#endif
-}st_SelectViewHandle;
+} st_SelectViewHandle;
-typedef struct
-{
+typedef struct {
Evas_Object *pBox;
Evas_Object *pBaselayout;
-}st_SelectViewWidget;
+} st_SelectViewWidget;
static st_SelectViewHandle *g_pSelectHandle = NULL;
static st_SelectViewWidget *g_pSelectWidget = NULL;
// Pre define function
int mp_select_view_get_sort_type(void);
bool mp_select_view_arrange_video_list(void *pGenlist, bool bNeedSvc);
-void mp_select_view_naviframe_transition_effect_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo);
-static void __mp_select_view_base_layout_del_cb(void *pUserData, Evas *e, Evas_Object *pObject, void *pEventInfo);
+void mp_select_view_naviframe_transition_effect_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo);
+static void __mp_select_view_base_layout_del_cb(void *pUserData, Evas * e,
+ Evas_Object * pObject,
+ void *pEventInfo);
void mp_select_view_destroy(void)
{
VideoLogInfo("");
- if (g_pSelectHandle)
- {
- evas_object_smart_callback_del(g_pSelectHandle->pNaviFrameHandle, "transition,finished", mp_select_view_naviframe_transition_effect_cb);
+ if (g_pSelectHandle) {
+ evas_object_smart_callback_del(g_pSelectHandle->pNaviFrameHandle,
+ "transition,finished",
+ mp_select_view_naviframe_transition_effect_cb);
MP_DEL_OBJ(g_pSelectHandle->pGenlist);
MP_DEL_ITC(g_pSelectHandle->pGenListItc);
MP_FREE_STRING(g_pSelectHandle);
}
- if (g_pSelectWidget)
- {
+ if (g_pSelectWidget) {
MP_DEL_OBJ(g_pSelectWidget->pBox);
- if (g_pSelectWidget->pBaselayout != NULL)
- {
- evas_object_event_callback_del(g_pSelectWidget->pBaselayout, EVAS_CALLBACK_DEL, __mp_select_view_base_layout_del_cb);
+ if (g_pSelectWidget->pBaselayout != NULL) {
+ evas_object_event_callback_del(g_pSelectWidget->pBaselayout,
+ EVAS_CALLBACK_DEL,
+ __mp_select_view_base_layout_del_cb);
MP_DEL_OBJ(g_pSelectWidget->pBaselayout);
}
MP_FREE_STRING(g_pSelectWidget);
{
VideoLogInfo("");
- if (g_pSelectHandle)
- {
+ if (g_pSelectHandle) {
MP_FREE_STRING(g_pSelectHandle->pFolderUrl);
mp_util_db_set_update_fun(g_pSelectHandle->euLev, NULL);
mp_util_db_set_backup_fun(g_pSelectHandle->euLev, NULL);
- evas_object_smart_callback_del(g_pSelectHandle->pNaviFrameHandle, "transition,finished", mp_select_view_naviframe_transition_effect_cb);
+ evas_object_smart_callback_del(g_pSelectHandle->pNaviFrameHandle,
+ "transition,finished",
+ mp_select_view_naviframe_transition_effect_cb);
g_pSelectHandle->pGenlist = NULL;
MP_FREE_STRING(g_pSelectHandle);
}
- if (g_pSelectWidget)
- {
+ if (g_pSelectWidget) {
g_pSelectWidget->pBox = NULL;
g_pSelectWidget->pBaselayout = NULL;
{
VideoLogInfo("");
- if (!g_pSelectHandle)
- {
+ if (!g_pSelectHandle) {
VideoLogError("[ERR] g_pSelectHandle is not existed.");
return;
}
g_pSelectHandle->nSortType = MP_MEDIA_SORT_BY_RECENTLY_VIEWED;
}
-static void __mp_select_view_trans_finished_cb(void *pUserData, Evas_Object *obj, void *event_info)
+static void __mp_select_view_trans_finished_cb(void *pUserData,
+ Evas_Object * obj,
+ void *event_info)
{
- if (!obj)
- {
+ if (!obj) {
VideoLogError("[ERR] g_pSelectHandle is NULL.");
return;
}
mp_widget_ctrl_enable_navi_handle_focus(obj);
- evas_object_smart_callback_del(obj, "transition,finished", __mp_select_view_trans_finished_cb);
+ evas_object_smart_callback_del(obj, "transition,finished",
+ __mp_select_view_trans_finished_cb);
}
-static Eina_Bool mp_select_view_back_btn_cb(void *pUserData, Elm_Object_Item *pItem)
+static Eina_Bool mp_select_view_back_btn_cb(void *pUserData,
+ Elm_Object_Item * pItem)
{
- if (!g_pSelectHandle)
- {
+ if (!g_pSelectHandle) {
VideoLogInfo("[ERR] g_pSelectHandle is NULL.");
return EINA_TRUE;
}
-
// Register transition finished callback.
- mp_widget_ctrl_disable_navi_handle_focus_except_item(g_pSelectHandle->pNaviFrameHandle, g_pSelectHandle->pNaviFrameItem);
- evas_object_smart_callback_add(g_pSelectHandle->pNaviFrameHandle, "transition,finished", __mp_select_view_trans_finished_cb, NULL);
+ mp_widget_ctrl_disable_navi_handle_focus_except_item(g_pSelectHandle->
+ pNaviFrameHandle,
+ g_pSelectHandle->
+ pNaviFrameItem);
+ evas_object_smart_callback_add(g_pSelectHandle->pNaviFrameHandle,
+ "transition,finished",
+ __mp_select_view_trans_finished_cb,
+ NULL);
mp_select_view_pop();
return EINA_TRUE;
}
-void mp_select_view_naviframe_transition_effect_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+void mp_select_view_naviframe_transition_effect_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
- if (!g_pSelectHandle)
- {
+ if (!g_pSelectHandle) {
VideoLogError("[ERR] No exist g_pSelectHandle.");
return;
}
Evas_Object *pTmpContents = NULL;
Elm_Object_Item *pTmpItem = NULL;
- if (!g_pSelectHandle->pNaviFrameHandle)
- {
+ if (!g_pSelectHandle->pNaviFrameHandle) {
VideoLogInfo("[ERR] No exist naviframe handle.");
return;
}
- pTmpItem = elm_naviframe_top_item_get(g_pSelectHandle->pNaviFrameHandle);
+ pTmpItem =
+ elm_naviframe_top_item_get(g_pSelectHandle->pNaviFrameHandle);
pTmpContents = elm_object_item_content_get(pTmpItem);
if (g_pRenameLayout) {
mp_rename_ctrl_set_focus();
}
- if (pTmpContents)
- {
- if (pTmpContents == g_pSelectWidget->pBox)
- {
- }
- else
- {
- VideoLogInfo("It's not pListShareViaViewTabbarLayout in top screen.");
+ if (pTmpContents) {
+ if (pTmpContents == g_pSelectWidget->pBox) {
+ } else {
+ VideoLogInfo
+ ("It's not pListShareViaViewTabbarLayout in top screen.");
}
- }
- else
- {
+ } else {
VideoLogError("[ERR] No exist naviframe top item.");
}
}
-static char *__mp_select_view_get_label_of_folder_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static char *__mp_select_view_get_label_of_folder_cb(const void *pUserData,
+ Evas_Object * pObject,
+ const char *pPart)
{
- int nFolderItemIndex = (int)pUserData;
+ int nFolderItemIndex = (int) pUserData;
- if (!g_strcmp0(pPart, "elm.text.main.left.top"))
- {
+ if (!g_strcmp0(pPart, "elm.text.main.left.top")) {
char *szTitle = NULL;
szTitle = mp_util_svc_get_video_folder_name(nFolderItemIndex);
MP_FREE_STRING(szTitle);
return szTitleUtf8;
- }
- else if (!g_strcmp0(pPart, "elm.text.sub.left.bottom"))
- {
+ } else if (!g_strcmp0(pPart, "elm.text.sub.left.bottom")) {
char *szFolderPath = NULL;
szFolderPath = mp_util_svc_get_video_folder_url(nFolderItemIndex);
char *pDes_path = mp_util_get_dir_by_path(szFolderPath);
return NULL;
}
-static Evas_Object *__mp_select_view_get_icon_of_folder_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static Evas_Object *__mp_select_view_get_icon_of_folder_cb(const void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char
+ *pPart)
{
- int nFolderItemIndex = (int)pUserData;
+ int nFolderItemIndex = (int) pUserData;
VideoLogInfo("Index : %d", nFolderItemIndex);
- if (!g_strcmp0(pPart, "elm.icon.1"))
- {
+ if (!g_strcmp0(pPart, "elm.icon.1")) {
VideoLogInfo("pPart: elm.icon.1 - thumbnail");
Evas_Object *pLayout = NULL;
Evas_Object *pBg = NULL;
- char *pThumbIconUri = mp_util_get_folder_thumbnail(nFolderItemIndex, mp_sort_ctrl_get_sort_state());
- char edj_path[1024] = {0};
+ char *pThumbIconUri =
+ mp_util_get_folder_thumbnail(nFolderItemIndex,
+ mp_sort_ctrl_get_sort_state());
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_CUSTOM_THEME);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_CUSTOM_THEME);
free(path);
pLayout = elm_layout_add(pObject);
- elm_layout_file_set(pLayout, edj_path, "listview.thumbnail.layout");
+ elm_layout_file_set(pLayout, edj_path,
+ "listview.thumbnail.layout");
- if (!pThumbIconUri || !vp_file_exists(pThumbIconUri))
- {
+ if (!pThumbIconUri || !vp_file_exists(pThumbIconUri)) {
MP_FREE_STRING(pThumbIconUri);
}
- pBg = mp_util_create_preload_image(pLayout, pThumbIconUri, VIDEO_ICON_WIDTH);
+ pBg =
+ mp_util_create_preload_image(pLayout, pThumbIconUri,
+ VIDEO_ICON_WIDTH);
elm_layout_content_set(pLayout, "elm.thumbnail.icon", pBg);
if (pBg)
evas_object_show(pBg);
- if (!mp_util_create_folder_sub_icon(pLayout, nFolderItemIndex)) {
- VideoLogWarning("Create sub icon is failed. nFolderItemIndex: %d", nFolderItemIndex);
+ if (!mp_util_create_folder_sub_icon(pLayout, nFolderItemIndex)) {
+ VideoLogWarning
+ ("Create sub icon is failed. nFolderItemIndex: %d",
+ nFolderItemIndex);
}
MP_FREE_STRING(pThumbIconUri);
int mp_select_view_get_sort_type(void)
{
- switch (mp_sort_ctrl_get_sort_state())
- {
- /*case MP_LIST_SORT_BY_RECENTLY_VIEWED:
- g_pSelectHandle->nSortType = MP_MEDIA_SORT_BY_RECENTLY_VIEWED;
- break;*/
-
+ switch (mp_sort_ctrl_get_sort_state()) {
case MP_LIST_SORT_BY_RECENTLY_ADDED:
g_pSelectHandle->nSortType = MP_MEDIA_SORT_BY_RECENTLY_ADDED;
break;
case MP_LIST_SORT_BY_NAME:
g_pSelectHandle->nSortType = MP_MEDIA_SORT_BY_NAME;
break;
-
- /*case MP_LIST_SORT_BY_SIZE:
- g_pSelectHandle->nSortType = MP_MEDIA_SORT_BY_SIZE;
- break;
-
- case MP_LIST_SORT_BY_TYPE:
- g_pSelectHandle->nSortType = MP_MEDIA_SORT_BY_TYPE;
- break;*/
}
return g_pSelectHandle->nSortType;
}
#ifdef VS_FEATURE_LIST_VIEW
-static char *__mp_select_view_get_label_of_video_item_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static char *__mp_select_view_get_label_of_video_item_cb(const void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char *pPart)
{
- int nVideoItemIndex = (int)pUserData;
+ int nVideoItemIndex = (int) pUserData;
- if (!strcmp(pPart, "elm.text.main.left.top"))
- {
+ if (!strcmp(pPart, "elm.text.main.left.top")) {
char *szTitle = mp_util_svc_get_video_title(nVideoItemIndex);
char *szTitleUtf8 = elm_entry_utf8_to_markup(szTitle);
- if (szTitle)
- {
+ if (szTitle) {
free(szTitle);
szTitle = NULL;
}
return szTitleUtf8;
- }
- else if (!strcmp(pPart, "elm.text.sub.left.bottom"))
- {
+ } else if (!strcmp(pPart, "elm.text.sub.left.bottom")) {
return mp_util_svc_get_duration_str_time(nVideoItemIndex);
}
- /*else if (!strcmp(pPart, "elm.text.sub.right.bottom"))
- {
- unsigned long long nFilesize = 0;
-
- nFilesize = mp_util_svc_get_video_item_size(nVideoItemIndex);
- char *szFileSize = mp_util_get_file_size(nFilesize);
- char *szTitleUtf8 = NULL;
-
- if (szFileSize)
- {
- szTitleUtf8 = elm_entry_utf8_to_markup(szFileSize);
- free(szFileSize);
- szFileSize = NULL;
- }
-
- return szTitleUtf8;
- }*/
-
return NULL;
}
-static Evas_Object *__mp_select_view_get_icon_of_video_item_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static Evas_Object *__mp_select_view_get_icon_of_video_item_cb(const void
+ *pUserData,
+ Evas_Object
+ *pObject,
+ const char
+ *pPart)
{
Evas_Object *pLayout = NULL;
- int nVideoItemIndex = (int)pUserData;
- if (!pPart || !pObject)
- {
+ int nVideoItemIndex = (int) pUserData;
+ if (!pPart || !pObject) {
return NULL;
}
- if (!strcmp(pPart, "elm.icon.1"))
- {
+ if (!strcmp(pPart, "elm.icon.1")) {
VideoLogInfo("pPart: elm.icon.1 - thumbnail");
- char *pThumbIconUri = mp_util_svc_get_video_thumbnail(nVideoItemIndex);
+ char *pThumbIconUri =
+ mp_util_svc_get_video_thumbnail(nVideoItemIndex);
Evas_Object *pBg = NULL;
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_CUSTOM_THEME);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_CUSTOM_THEME);
free(path);
pLayout = elm_layout_add(pObject);
- elm_layout_file_set(pLayout, edj_path, "listview.thumbnail.layout");
+ elm_layout_file_set(pLayout, edj_path,
+ "listview.thumbnail.layout");
- if (!pThumbIconUri || !vp_file_exists(pThumbIconUri))
- {
+ if (!pThumbIconUri || !vp_file_exists(pThumbIconUri)) {
MP_FREE_STRING(pThumbIconUri);
}
- pBg = mp_util_create_preload_image(pLayout, pThumbIconUri, VIDEO_ICON_WIDTH);
+ pBg =
+ mp_util_create_preload_image(pLayout, pThumbIconUri,
+ VIDEO_ICON_WIDTH);
elm_layout_content_set(pLayout, "elm.thumbnail.icon", pBg);
if (pBg)
MP_FREE_STRING(pThumbIconUri);
- int nLastPlayedTime = mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
- int nDurationTime = mp_util_svc_get_video_duration_time(nVideoItemIndex);
+ int nLastPlayedTime =
+ mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
+ int nDurationTime =
+ mp_util_svc_get_video_duration_time(nVideoItemIndex);
- if (nLastPlayedTime > 0)
- {
- double nRatio = ((double)nLastPlayedTime) / ((double)nDurationTime);
+ if (nLastPlayedTime > 0) {
+ double nRatio =
+ ((double) nLastPlayedTime) / ((double) nDurationTime);
if (nRatio < 0.05) {
nRatio = 0.05;
}
Evas_Object *pProgressBar = elm_progressbar_add(pLayout);
- elm_object_style_set(pProgressBar, "elm/progressbar/horizontal/default");
+ elm_object_style_set(pProgressBar,
+ "elm/progressbar/horizontal/default");
elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
- elm_progressbar_span_size_set(pProgressBar, VIDEO_LIST_PROGRESSBAR_LENGTH);
- evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(pProgressBar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_progressbar_span_size_set(pProgressBar,
+ VIDEO_LIST_PROGRESSBAR_LENGTH);
+ evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pProgressBar,
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
elm_progressbar_value_set(pProgressBar, nRatio);
- elm_layout_content_set(pLayout, "elm.progressbar.icon", pProgressBar);
+ elm_layout_content_set(pLayout, "elm.progressbar.icon",
+ pProgressBar);
- if (pProgressBar) {
+ if (pProgressBar) {
evas_object_show(pProgressBar);
}
}
- if (!mp_util_create_video_sub_icon(pLayout, nVideoItemIndex)) {
- VideoLogWarning("Local File or Create sub icon is failed.", nVideoItemIndex);
+ if (!mp_util_create_video_sub_icon(pLayout, nVideoItemIndex)) {
+ VideoLogWarning("Local File or Create sub icon is failed.",
+ nVideoItemIndex);
}
- if (pLayout) {
+ if (pLayout) {
evas_object_show(pLayout);
}
/*if other view need update select view, need register this update callback*/
static void __mp_select_view_result_view_update_cb(void)
{
- if (!g_pSelectHandle)
- {
+ if (!g_pSelectHandle) {
VideoLogInfo("g_pSelectHandle is null.");
return;
}
g_pSelectHandle->bRename = TRUE;
- bool bNormalShow = mp_select_view_arrange_video_list(g_pSelectHandle->pGenlist, TRUE);
- if (bNormalShow)
- {
+ bool bNormalShow =
+ mp_select_view_arrange_video_list(g_pSelectHandle->pGenlist, TRUE);
+ if (bNormalShow) {
Elm_Object_Item *pItem = NULL;
pItem = elm_genlist_first_item_get(g_pSelectHandle->pGenlist);
- if (pItem)
- {
+ if (pItem) {
elm_genlist_item_bring_in(pItem, ELM_GENLIST_ITEM_SCROLLTO_IN);
}
- }
- else
- {
+ } else {
elm_naviframe_item_pop(g_pSelectHandle->pNaviFrameHandle);
}
g_pSelectHandle->pChangeViewUserCbFunc(MP_LIST_VIEW_ALL);
static void __mp_select_view_show_detail_view(int nIndex, bool IsFolder)
{
- if (!g_pSelectHandle)
- {
+ if (!g_pSelectHandle) {
VideoLogInfo("g_pSelectHandle of list view are not existed.");
return;
}
if (IsFolder) {
mp_detail_view_get_folder_detail_info(nIndex, &pDetail);
pMediaId = mp_util_svc_get_video_folder_id(nIndex);
- }
- else
- {
+ } else {
mp_detail_view_get_video_detail_info(nIndex, &pDetail);
pMediaId = mp_util_svc_get_video_id_by_index(nIndex);
}
- mp_detail_view_push((void *)g_pSelectHandle->pNaviFrameHandle, IsFolder, pMediaId, pDetail);
+ mp_detail_view_push((void *) g_pSelectHandle->pNaviFrameHandle,
+ IsFolder, pMediaId, pDetail);
mp_detail_view_free_detail_info(pDetail);
MP_FREE_STRING(pMediaId);
}
-static void __mp_select_view_genlist_selected_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_select_view_genlist_selected_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
- if (!g_pSelectHandle || !pObject)
- {
- VideoLogWarning("[WARNING] Main handles of list view are not existed.");
+ if (!g_pSelectHandle || !pObject) {
+ VideoLogWarning
+ ("[WARNING] Main handles of list view are not existed.");
return;
}
#ifdef VS_FEATURE_THUMBNAIL_VIEW
- Elm_Object_Item *pSelectedItem = elm_gengrid_selected_item_get(pObject);
+ Elm_Object_Item *pSelectedItem =
+ elm_gengrid_selected_item_get(pObject);
if (pSelectedItem) {
elm_gengrid_item_selected_set(pSelectedItem, EINA_FALSE);
}
#else
- Elm_Object_Item *pSelectedItem = elm_genlist_selected_item_get(pObject);
+ Elm_Object_Item *pSelectedItem =
+ elm_genlist_selected_item_get(pObject);
if (pSelectedItem) {
elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
}
#endif
- int nSelectedIndex = (int)pUserData;
+ int nSelectedIndex = (int) pUserData;
VideoLogInfo("selected index is %d", nSelectedIndex);
if (SELECT_TYPE_DETAIL == g_pSelectHandle->eSelType) {
VideoLogInfo("Show detail view");
- /*Todo: show detail view*/
+ /*Todo: show detail view */
if (MP_LIST_VIEW_AS_THUMBNAIL_LIST == g_pSelectHandle->nViewType) {
__mp_select_view_show_detail_view(nSelectedIndex, FALSE);
- } else if (MP_LIST_VIEW_AS_FOLDER_LIST == g_pSelectHandle->nViewType) {
+ } else if (MP_LIST_VIEW_AS_FOLDER_LIST ==
+ g_pSelectHandle->nViewType) {
if (g_pSelectHandle->pFolderUrl) {
VideoLogWarning("Folder item view");
__mp_select_view_show_detail_view(nSelectedIndex, FALSE);
__mp_select_view_show_detail_view(nSelectedIndex, TRUE);
}
}
- }
- else if (SELECT_TYPE_RENAME == g_pSelectHandle->eSelType)
- {
+ } else if (SELECT_TYPE_RENAME == g_pSelectHandle->eSelType) {
VideoLogInfo("Show rename popup");
- /*char *szTitle = NULL;
- szTitle = g_strdup(VIDEOS_SELECTVIEW_HEADER_SELECT_VIDEO);*/
- g_pRenameLayout = mp_rename_ctrl_show(g_pSelectHandle->pNaviFrameHandle, NULL, (void*)__mp_select_view_result_view_update_cb, nSelectedIndex);
+ g_pRenameLayout =
+ mp_rename_ctrl_show(g_pSelectHandle->pNaviFrameHandle, NULL,
+ (void *)
+ __mp_select_view_result_view_update_cb,
+ nSelectedIndex);
}
}
nFolderListSize = mp_util_svc_get_video_folder_size();
VideoLogInfo("nVideoListSize : %d", nFolderListSize);
- if (nFolderListSize > 0)
- {
+ if (nFolderListSize > 0) {
MP_DEL_ITC(g_pSelectHandle->pGenListItc);
g_pSelectHandle->pGenListItc = elm_genlist_item_class_new();
g_pSelectHandle->pGenListItc->item_style = "2line.top";
- g_pSelectHandle->pGenListItc->func.text_get = (void*)__mp_select_view_get_label_of_folder_cb;
- g_pSelectHandle->pGenListItc->func.content_get = (void*)__mp_select_view_get_icon_of_folder_cb;
+ g_pSelectHandle->pGenListItc->func.text_get =
+ (void *) __mp_select_view_get_label_of_folder_cb;
+ g_pSelectHandle->pGenListItc->func.content_get =
+ (void *) __mp_select_view_get_icon_of_folder_cb;
g_pSelectHandle->pGenListItc->func.state_get = NULL;
g_pSelectHandle->pGenListItc->func.del = NULL;
g_pSelectHandle->pGenListItc->decorate_item_style = NULL;
- for (nIndex = 0; nIndex < nFolderListSize; nIndex++)
- {
+ for (nIndex = 0; nIndex < nFolderListSize; nIndex++) {
VideoLogInfo("nCounter : %d", nIndex);
- elm_genlist_item_append(pFolderGenlist, g_pSelectHandle->pGenListItc, (void*)nIndex, NULL, ELM_GENLIST_ITEM_NONE, __mp_select_view_genlist_selected_cb, (void *)nIndex);
+ elm_genlist_item_append(pFolderGenlist,
+ g_pSelectHandle->pGenListItc,
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __mp_select_view_genlist_selected_cb,
+ (void *) nIndex);
}
}
}
#ifdef VS_FEATURE_THUMBNAIL_VIEW
-static Evas_Object *__mp_select_view_create_gengrid(Evas_Object *parent, int nWidth, int nHeight)
+static Evas_Object *__mp_select_view_create_gengrid(Evas_Object * parent,
+ int nWidth,
+ int nHeight)
{
Evas_Object *pGengrid;
pGengrid = elm_gengrid_add(parent);
VideoLogError("pVideoGrid does not exist.");
return NULL;
}
- evas_object_size_hint_weight_set(pGengrid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(pGengrid, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pGengrid, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pGengrid, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
elm_gengrid_item_size_set(pGengrid, nWidth, nHeight);
elm_gengrid_align_set(pGengrid, 0.0, 0.0);
elm_gengrid_horizontal_set(pGengrid, EINA_TRUE);
return pGengrid;
}
-static char *__mp_select_view_get_label_of_grid_item_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static char *__mp_select_view_get_label_of_grid_item_cb(const void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char *pPart)
{
- int nVideoItemIndex = (int)pUserData;
+ int nVideoItemIndex = (int) pUserData;
if (!strcmp(pPart, "elm.text")) {
char *szTitle;
}
return szTitleUtf8;
- } else if (!strcmp(pPart, "elm.text.2"))
- {
+ } else if (!strcmp(pPart, "elm.text.2")) {
return mp_util_svc_get_duration_str_time(nVideoItemIndex);
}
return NULL;
}
-static Evas_Object *__mp_select_view_get_grid_icon_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static Evas_Object *__mp_select_view_get_grid_icon_cb(const void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char *pPart)
{
- int nVideoItemIndex = (int)pUserData;
- char edj_path[1024] = {0};
+ int nVideoItemIndex = (int) pUserData;
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_IMAGE_NAME_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_IMAGE_NAME_EDJ);
free(path);
if (!strcmp(pPart, "elm.swallow.icon")) {
- char *pThumbIconUri = mp_util_svc_get_video_thumbnail(nVideoItemIndex);
+ char *pThumbIconUri =
+ mp_util_svc_get_video_thumbnail(nVideoItemIndex);
Evas_Object *pBg = NULL;
if (!pThumbIconUri || !vp_file_exists(pThumbIconUri)) {
pBg = elm_image_add(pObject);
MP_FREE_STRING(pThumbIconUri);
- evas_object_size_hint_aspect_set(pBg, EVAS_ASPECT_CONTROL_BOTH, 1, 1);
+ evas_object_size_hint_aspect_set(pBg, EVAS_ASPECT_CONTROL_BOTH,
+ 1, 1);
elm_image_file_set(pBg, pThumbIconUri, NULL);
} else {
- pBg = mp_util_create_preload_image(pObject, pThumbIconUri, GRID_VIDEO_ICON_WIDTH);
+ pBg =
+ mp_util_create_preload_image(pObject, pThumbIconUri,
+ GRID_VIDEO_ICON_WIDTH);
}
MP_FREE_STRING(pThumbIconUri);
return pBg;
- } else if (!strcmp(pPart, "elm.progressbar.icon"))
- {
- int nLastPlayedTime = mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
- int nDurationTime = mp_util_svc_get_video_duration_time(nVideoItemIndex);
+ } else if (!strcmp(pPart, "elm.progressbar.icon")) {
+ int nLastPlayedTime =
+ mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
+ int nDurationTime =
+ mp_util_svc_get_video_duration_time(nVideoItemIndex);
if (nLastPlayedTime <= 0) {
return NULL;
double nRatio = 0.0;
if (nDurationTime > 0) {
- nRatio = ((double)nLastPlayedTime) / ((double)nDurationTime);
+ nRatio = ((double) nLastPlayedTime) / ((double) nDurationTime);
}
if (nRatio < 0.05) {
Evas_Object *pProgressBar = elm_progressbar_add(pObject);
elm_object_style_set(pProgressBar, "video/list_progress");
elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
- evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(pProgressBar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pProgressBar, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
elm_progressbar_value_set(pProgressBar, nRatio);
evas_object_show(pProgressBar);
return pProgressBar;
- } else if (!strcmp(pPart, "elm.lock.icon"))
- {
+ } else if (!strcmp(pPart, "elm.lock.icon")) {
char *pVideoFile = mp_util_svc_get_video_url(nVideoItemIndex);
- bool bRet = mp_util_check_video_personal_status((const char*)pVideoFile);
+ bool bRet =
+ mp_util_check_video_personal_status((const char *) pVideoFile);
MP_FREE_STRING(pVideoFile);
if (bRet) {
Evas_Object *pLockIcon = elm_image_add(pObject);
- elm_image_file_set(pLockIcon, edj_path, VIDEO_LIST_VIEW_ICON_PERSONAL_LOCK);
- evas_object_size_hint_align_set(pLockIcon, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(pLockIcon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_image_file_set(pLockIcon, edj_path,
+ VIDEO_LIST_VIEW_ICON_PERSONAL_LOCK);
+ evas_object_size_hint_align_set(pLockIcon, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pLockIcon, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
evas_object_show(pLockIcon);
return pLockIcon;
} else {
return NULL;
}
- } else if (!strcmp(pPart, "elm.dropbox.icon"))
- {
+ } else if (!strcmp(pPart, "elm.dropbox.icon")) {
bool bRet = mp_util_svc_is_cloud_storage(nVideoItemIndex);
if (bRet) {
Evas_Object *pDropboxIcon = elm_image_add(pObject);
- elm_image_file_set(pDropboxIcon, edj_path, VIDEO_LIST_VIEW_ICON_DROPBOX);
- evas_object_size_hint_align_set(pDropboxIcon, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(pDropboxIcon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_image_file_set(pDropboxIcon, edj_path,
+ VIDEO_LIST_VIEW_ICON_DROPBOX);
+ evas_object_size_hint_align_set(pDropboxIcon, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pDropboxIcon,
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
evas_object_show(pDropboxIcon);
return pDropboxIcon;
} else {
return NULL;
}
- } else if (!strcmp(pPart, "elm.swallow.end"))
- {
+ } else if (!strcmp(pPart, "elm.swallow.end")) {
}
return NULL;
}
-static void __mp_select_view_append_grid_items(void *pObjVideosList, int nGenItemIndex)
+static void __mp_select_view_append_grid_items(void *pObjVideosList,
+ int nGenItemIndex)
{
if (!g_pSelectHandle) {
VideoLogInfo("invalid handle");
MP_DEL_GRID_ITC(g_pSelectHandle->pGenGridItc_2);
g_pSelectHandle->pGenGridItc_1 = elm_gengrid_item_class_new();
g_pSelectHandle->pGenGridItc_1->item_style = "video/album_grid";
- g_pSelectHandle->pGenGridItc_1->func.text_get = (void*)__mp_select_view_get_label_of_grid_item_cb;
- g_pSelectHandle->pGenGridItc_1->func.content_get = (void*)__mp_select_view_get_grid_icon_cb;
+ g_pSelectHandle->pGenGridItc_1->func.text_get =
+ (void *) __mp_select_view_get_label_of_grid_item_cb;
+ g_pSelectHandle->pGenGridItc_1->func.content_get =
+ (void *) __mp_select_view_get_grid_icon_cb;
g_pSelectHandle->pGenGridItc_1->func.state_get = NULL;
g_pSelectHandle->pGenGridItc_1->func.del = NULL;
g_pSelectHandle->pGenGridItc_2 = elm_gengrid_item_class_new();
g_pSelectHandle->pGenGridItc_2->item_style = "video/album_grid";
- g_pSelectHandle->pGenGridItc_2->func.text_get = (void*)__mp_select_view_get_label_of_grid_item_cb;
- g_pSelectHandle->pGenGridItc_2->func.content_get = (void*)__mp_select_view_get_grid_icon_cb;
+ g_pSelectHandle->pGenGridItc_2->func.text_get =
+ (void *) __mp_select_view_get_label_of_grid_item_cb;
+ g_pSelectHandle->pGenGridItc_2->func.content_get =
+ (void *) __mp_select_view_get_grid_icon_cb;
g_pSelectHandle->pGenGridItc_2->func.state_get = NULL;
g_pSelectHandle->pGenGridItc_2->func.del = NULL;
- int nCount = (mp_rotate_ctrl_check_landspace() ? VP_GENLIST_THUMB_LANDSPACE_COUNT : VP_GENLIST_THUMB_PORTRAIT_COUNT);
- int nIndex = nGenItemIndex*nCount;
+ int nCount =
+ (mp_rotate_ctrl_check_landspace() ? VP_GENLIST_THUMB_LANDSPACE_COUNT
+ : VP_GENLIST_THUMB_PORTRAIT_COUNT);
+ int nIndex = nGenItemIndex * nCount;
int nMaxIndex = nIndex + nCount;
int nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
Elm_Object_Item *gridItem = NULL;
for (; (nIndex < nMaxIndex) && (nIndex < nVideoListSize); nIndex++) {
- if (nIndex%2 == 0) {
- elm_gengrid_item_append(pObjVideosList, g_pSelectHandle->pGenGridItc_1, (void *)nIndex, __mp_select_view_genlist_selected_cb, (void *)nIndex);
+ if (nIndex % 2 == 0) {
+ elm_gengrid_item_append(pObjVideosList,
+ g_pSelectHandle->pGenGridItc_1,
+ (void *) nIndex,
+ __mp_select_view_genlist_selected_cb,
+ (void *) nIndex);
} else {
- elm_gengrid_item_append(pObjVideosList, g_pSelectHandle->pGenGridItc_2, (void *)nIndex, __mp_select_view_genlist_selected_cb, (void *)nIndex);
+ elm_gengrid_item_append(pObjVideosList,
+ g_pSelectHandle->pGenGridItc_2,
+ (void *) nIndex,
+ __mp_select_view_genlist_selected_cb,
+ (void *) nIndex);
}
- elm_object_item_data_set(gridItem, (void *)nIndex);
+ elm_object_item_data_set(gridItem, (void *) nIndex);
}
}
int winHeight = 0;
int winWidth = 0;
elm_win_screen_size_get(mp_util_get_main_window_handle(), NULL, NULL,
- &winWidth, &winHeight);
+ &winWidth, &winHeight);
- bool bLandscape = mp_rotate_ctrl_check_landspace_by_win((Evas_Object*)mp_util_get_main_window_handle());
+ bool bLandscape =
+ mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
+ mp_util_get_main_window_handle
+ ());
if (bLandscape) {
*width = winHeight / VP_GENLIST_THUMB_LANDSPACE_COUNT;
} else {
*height = VP_ALBUM_THUMB_ICON_HEIGHT * MP_SCALE;
}
-static Evas_Object *__mp_select_view_get_icon_of_grid_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static Evas_Object *__mp_select_view_get_icon_of_grid_cb(const void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char *pPart)
{
VideoLogInfo("in __mp_select_view_get_icon_of_grid_cb");
if (!g_pSelectHandle || !pObject) {
return NULL;
}
- int nGenItemIndex = (int)pUserData;
+ int nGenItemIndex = (int) pUserData;
int nHeight = 0;
int nWidth = 0;
mp_select_view_get_icon_dimensions(&nHeight, &nWidth);
- Evas_Object *pGengrid = __mp_select_view_create_gengrid(pObject, nWidth, nHeight);
+ Evas_Object *pGengrid =
+ __mp_select_view_create_gengrid(pObject, nWidth, nHeight);
__mp_select_view_append_grid_items(pGengrid, nGenItemIndex);
return pGengrid;
int mp_select_view_thumbnail_to_genlist_index(int nVideoItemIndex)
{
- /*nVideoItemIndex = 0-->max*/
+ /*nVideoItemIndex = 0-->max */
if (nVideoItemIndex < 0) {
VideoLogDebug("invalid nVideoItemIndex");
return 0;
}
- g_pSelectHandle->bLandscape = mp_rotate_ctrl_check_landspace_by_win((Evas_Object*)mp_util_get_main_window_handle());
+ g_pSelectHandle->bLandscape =
+ mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
+ mp_util_get_main_window_handle
+ ());
int nItemCount = VP_GENLIST_THUMB_PORTRAIT_COUNT;
int nGenlistIndex = 0;
if (g_pSelectHandle->bLandscape) {
nItemCount = VP_GENLIST_THUMB_LANDSPACE_COUNT;
}
- nGenlistIndex = nVideoItemIndex/nItemCount;
- VideoLogWarning("in mp_select_view_thumbnail_to_genlist_index %d",nGenlistIndex);
+ nGenlistIndex = nVideoItemIndex / nItemCount;
+ VideoLogWarning("in mp_select_view_thumbnail_to_genlist_index %d",
+ nGenlistIndex);
return nGenlistIndex;
}
g_pSelectHandle->pGenListItc->item_style = "video/1icon.thumbnail";
g_pSelectHandle->pGenListItc->func.text_get = NULL;
- g_pSelectHandle->pGenListItc->func.content_get = (void *)__mp_select_view_get_icon_of_grid_cb;
+ g_pSelectHandle->pGenListItc->func.content_get =
+ (void *) __mp_select_view_get_icon_of_grid_cb;
g_pSelectHandle->pGenListItc->func.state_get = NULL;
g_pSelectHandle->pGenListItc->func.del = NULL;
g_pSelectHandle->pGenListItc->decorate_item_style = NULL;
MP_DEL_ITC(g_pSelectHandle->pGenListLandscapeItc);
g_pSelectHandle->pGenListLandscapeItc = elm_genlist_item_class_new();
- g_pSelectHandle->pGenListLandscapeItc->item_style = "video/1icon.thumbnail.landscape";
+ g_pSelectHandle->pGenListLandscapeItc->item_style =
+ "video/1icon.thumbnail.landscape";
g_pSelectHandle->pGenListLandscapeItc->func.text_get = NULL;
- g_pSelectHandle->pGenListLandscapeItc->func.content_get = (void *)__mp_select_view_get_icon_of_grid_cb;
+ g_pSelectHandle->pGenListLandscapeItc->func.content_get =
+ (void *) __mp_select_view_get_icon_of_grid_cb;
g_pSelectHandle->pGenListLandscapeItc->func.state_get = NULL;
g_pSelectHandle->pGenListLandscapeItc->func.del = NULL;
g_pSelectHandle->pGenListLandscapeItc->decorate_item_style = NULL;
int nGenlistRow = 0;
- nGenlistRow = mp_select_view_thumbnail_to_genlist_index(nVideoListSize - 1);
+ nGenlistRow =
+ mp_select_view_thumbnail_to_genlist_index(nVideoListSize - 1);
if (g_pSelectHandle->bLandscape) {
for (nIndex = 0; nIndex <= nGenlistRow; nIndex++) {
- elm_genlist_item_append(pGenlist, g_pSelectHandle->pGenListLandscapeItc, (void *)nIndex, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ elm_genlist_item_append(pGenlist,
+ g_pSelectHandle->pGenListLandscapeItc,
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
}
} else {
for (nIndex = 0; nIndex <= nGenlistRow; nIndex++) {
- elm_genlist_item_append(pGenlist, g_pSelectHandle->pGenListItc, (void *)nIndex, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ elm_genlist_item_append(pGenlist, g_pSelectHandle->pGenListItc,
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
}
}
static void __mp_select_view_append_video_items(void *pVideosGenlist)
{
VideoLogInfo("");
- if (!g_pSelectHandle)
- {
+ if (!g_pSelectHandle) {
VideoLogError("");
return;
}
MP_DEL_ITC(g_pSelectHandle->pGenListItc);
g_pSelectHandle->pGenListItc = elm_genlist_item_class_new();
g_pSelectHandle->pGenListItc->item_style = "2line.top";
- g_pSelectHandle->pGenListItc->func.text_get = (void*)__mp_select_view_get_label_of_video_item_cb;
- g_pSelectHandle->pGenListItc->func.content_get = (void*)__mp_select_view_get_icon_of_video_item_cb;
+ g_pSelectHandle->pGenListItc->func.text_get =
+ (void *) __mp_select_view_get_label_of_video_item_cb;
+ g_pSelectHandle->pGenListItc->func.content_get =
+ (void *) __mp_select_view_get_icon_of_video_item_cb;
g_pSelectHandle->pGenListItc->func.state_get = NULL;
g_pSelectHandle->pGenListItc->func.del = NULL;
g_pSelectHandle->pGenListItc->decorate_item_style = NULL;
- for (nIndex = 0; nIndex < nVideoListSize; nIndex++)
- {
- elm_genlist_item_append(pVideosGenlist, g_pSelectHandle->pGenListItc, (void *)nIndex, NULL, ELM_GENLIST_ITEM_NONE, __mp_select_view_genlist_selected_cb, (void *)nIndex);
+ for (nIndex = 0; nIndex < nVideoListSize; nIndex++) {
+ elm_genlist_item_append(pVideosGenlist,
+ g_pSelectHandle->pGenListItc,
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __mp_select_view_genlist_selected_cb,
+ (void *) nIndex);
}
}
#endif
int nVideoListSize = 0;
#ifdef VS_FEATURE_LIST_VIEW
if (g_pSelectHandle->nViewType == MP_LIST_VIEW_AS_NORMAL_LIST) {
- /*update video list data*/
+ /*update video list data */
mp_util_svc_destory_video_list();
- mp_util_svc_extract_video_list_by_item_type(mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
+ mp_util_svc_extract_video_list_by_item_type
+ (mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
- if (nVideoListSize <= 0)
- {
+ if (nVideoListSize <= 0) {
VideoLogWarning("nVideoListSize=%d", nVideoListSize);
- //elm_naviframe_item_pop(g_pSelectHandle->pNaviFrameHandle);
return FALSE;
}
__mp_select_view_append_video_items(pGenlist);
} else
#endif
- if (g_pSelectHandle->nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
+ if (g_pSelectHandle->nViewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
if (g_pSelectHandle->pFolderUrl) {
VideoLogWarning("Folder item view");
- /*update folder item list data*/
+ /*update folder item list data */
mp_util_svc_destory_video_item_list();
- mp_util_svc_extract_video_list_from_folder(g_pSelectHandle->pFolderUrl, mp_sort_ctrl_get_sort_state(), MP_LIST_VIEW_ALL);
-
- nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
+ mp_util_svc_extract_video_list_from_folder(g_pSelectHandle->
+ pFolderUrl,
+ mp_sort_ctrl_get_sort_state
+ (),
+ MP_LIST_VIEW_ALL);
+
+ nVideoListSize =
+ mp_util_svc_get_number_of_video_item_by_type();
if (nVideoListSize <= 0) {
VideoLogWarning("nVideoListSize=%d", nVideoListSize);
- //elm_naviframe_item_pop(g_pSelectHandle->pNaviFrameHandle);
return FALSE;
}
elm_genlist_clear(pGenlist);
- //__mp_select_view_append_video_items(pGenlist);
__mp_select_view_append_grid_layout(pGenlist);
} else {
VideoLogWarning("Folder view");
- /*update folder list data*/
+ /*update folder list data */
mp_util_svc_destory_video_list();
- mp_util_svc_extract_video_list_by_item_type(mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
- mp_util_svc_extract_video_folder_list_by_type(mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
+ mp_util_svc_extract_video_list_by_item_type
+ (mp_sort_ctrl_get_sort_state(),
+ mp_view_ctrl_get_list_type());
+ mp_util_svc_extract_video_folder_list_by_type
+ (mp_sort_ctrl_get_sort_state(),
+ mp_view_ctrl_get_list_type());
nVideoListSize = mp_util_svc_get_video_folder_size();
if (nVideoListSize <= 0) {
VideoLogWarning("nVideoListSize=%d", nVideoListSize);
- //elm_naviframe_item_pop(g_pSelectHandle->pNaviFrameHandle);
return FALSE;
}
elm_genlist_clear(pGenlist);
__mp_select_view_append_folder_items(pGenlist);
}
- } else if (g_pSelectHandle->nViewType == MP_LIST_VIEW_AS_THUMBNAIL_LIST) {
- /*update video list data*/
+ } else if (g_pSelectHandle->nViewType ==
+ MP_LIST_VIEW_AS_THUMBNAIL_LIST) {
+ /*update video list data */
mp_util_svc_destory_video_list();
- mp_util_svc_extract_video_list_by_item_type(mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
+ mp_util_svc_extract_video_list_by_item_type
+ (mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
if (nVideoListSize <= 0) {
VideoLogWarning("nVideoListSize=%d", nVideoListSize);
- //elm_naviframe_item_pop(g_pSelectHandle->pNaviFrameHandle);
return FALSE;
}
Evas_Object *mp_select_view_create_internal_layout(void *pParent)
{
- if (!pParent)
- {
+ if (!pParent) {
VideoLogInfo("[ERR]");
return NULL;
}
VideoLogInfo("");
- if (g_pSelectWidget->pBaselayout)
- {
+ if (g_pSelectWidget->pBaselayout) {
evas_object_del(g_pSelectWidget->pBaselayout);
g_pSelectWidget->pBaselayout = NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_REMOVE_LIST_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_REMOVE_LIST_EDJ);
free(path);
g_pSelectWidget->pBaselayout = elm_layout_add(pParent);
- elm_layout_file_set(g_pSelectWidget->pBaselayout, edj_path, REMOVE_LIST_EDJ_GROUP);
- evas_object_size_hint_weight_set(g_pSelectWidget->pBaselayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(g_pSelectWidget->pBaselayout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_layout_file_set(g_pSelectWidget->pBaselayout, edj_path,
+ REMOVE_LIST_EDJ_GROUP);
+ evas_object_size_hint_weight_set(g_pSelectWidget->pBaselayout,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(g_pSelectWidget->pBaselayout,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
return g_pSelectWidget->pBaselayout;
}
static void __mp_select_view_db_changed_cb(void *pUserData)
{
VideoLogWarning("Video DB has been changed.");
- if (!g_pSelectHandle || !g_pSelectWidget)
- {
+ if (!g_pSelectHandle || !g_pSelectWidget) {
VideoLogError("Main handles of list view are not existed.");
return;
}
bool bNormalShow = TRUE;
- bNormalShow = mp_select_view_arrange_video_list(g_pSelectHandle->pGenlist, TRUE);
- if (bNormalShow)
- {
+ bNormalShow =
+ mp_select_view_arrange_video_list(g_pSelectHandle->pGenlist, TRUE);
+ if (bNormalShow) {
Elm_Object_Item *pItem = NULL;
pItem = elm_genlist_first_item_get(g_pSelectHandle->pGenlist);
- if (pItem)
- {
+ if (pItem) {
elm_genlist_item_bring_in(pItem, ELM_GENLIST_ITEM_SCROLLTO_IN);
}
if (SELECT_TYPE_DETAIL == g_pSelectHandle->eSelType) {
elm_naviframe_item_pop_to(g_pSelectHandle->pPreNaviItem);
}
-void __mp_select_soft_back_button_cb(void *data, Evas_Object *obj, void *event_info)
+void __mp_select_soft_back_button_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
Evas_Object *pTopNaviFrame = NULL;
- pTopNaviFrame = elm_naviframe_item_pop(g_pSelectHandle->pNaviFrameHandle);
+ pTopNaviFrame =
+ elm_naviframe_item_pop(g_pSelectHandle->pNaviFrameHandle);
evas_object_del(pTopNaviFrame);
}
VideoLogError("pGenlist is not existed.");
return;
}
- elm_scroller_bounce_set(g_pSelectHandle->pGenlist, EINA_FALSE, EINA_TRUE);
- evas_object_size_hint_weight_set(g_pSelectHandle->pGenlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(g_pSelectHandle->pGenlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_genlist_block_count_set(g_pSelectHandle->pGenlist, VIDEO_GENLIST_BLOCK_COUNT);
+ elm_scroller_bounce_set(g_pSelectHandle->pGenlist, EINA_FALSE,
+ EINA_TRUE);
+ evas_object_size_hint_weight_set(g_pSelectHandle->pGenlist,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(g_pSelectHandle->pGenlist,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_genlist_block_count_set(g_pSelectHandle->pGenlist,
+ VIDEO_GENLIST_BLOCK_COUNT);
elm_genlist_homogeneous_set(g_pSelectHandle->pGenlist, EINA_TRUE);
elm_genlist_mode_set(g_pSelectHandle->pGenlist, ELM_LIST_COMPRESS);
+ elm_genlist_select_mode_set(g_pSelectHandle->pGenlist,
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
elm_box_pack_end(g_pSelectWidget->pBox, g_pSelectHandle->pGenlist);
- elm_object_part_content_set(g_pSelectWidget->pBaselayout, SWALLOW_LISTVIEW_CONTENT, g_pSelectWidget->pBox);
+ elm_object_part_content_set(g_pSelectWidget->pBaselayout,
+ SWALLOW_LISTVIEW_CONTENT,
+ g_pSelectWidget->pBox);
bool bNormalShow = TRUE;
- bNormalShow = mp_select_view_arrange_video_list(g_pSelectHandle->pGenlist, FALSE);
+ bNormalShow =
+ mp_select_view_arrange_video_list(g_pSelectHandle->pGenlist,
+ FALSE);
if (!bNormalShow) {
VideoLogError("invalid view");
mp_select_view_destroy();
void mp_select_view_init(void *pParent)
{
- if (!g_pSelectHandle || !g_pSelectWidget)
- {
+ if (!g_pSelectHandle || !g_pSelectWidget) {
VideoLogError("Main handles of list view are not existed.");
return;
}
VideoLogInfo("");
- g_pSelectWidget->pBaselayout = mp_select_view_create_internal_layout(pParent);
+ g_pSelectWidget->pBaselayout =
+ mp_select_view_create_internal_layout(pParent);
if (!g_pSelectWidget->pBaselayout) {
VideoLogError("pBaselayout is not existed.");
return;
}
- evas_object_event_callback_add(g_pSelectWidget->pBaselayout, EVAS_CALLBACK_DEL, __mp_select_view_base_layout_del_cb, NULL);
+ evas_object_event_callback_add(g_pSelectWidget->pBaselayout,
+ EVAS_CALLBACK_DEL,
+ __mp_select_view_base_layout_del_cb,
+ NULL);
g_pSelectWidget->pBox = elm_box_add(g_pSelectWidget->pBaselayout);
if (!g_pSelectWidget->pBox) {
Evas_Object *pLeftbtn = elm_button_add(pParent);
elm_object_style_set(pLeftbtn, "naviframe/end_btn/default");
- evas_object_smart_callback_add(pLeftbtn, "clicked", __mp_select_soft_back_button_cb, NULL);
+ evas_object_smart_callback_add(pLeftbtn, "clicked",
+ __mp_select_soft_back_button_cb, NULL);
char *szTitle = NULL;
szTitle = g_strdup(VIDEOS_SELECTVIEW_HEADER_SELECT_VIDEO);
- g_pSelectHandle->pNaviFrameItem = elm_naviframe_item_push(g_pSelectHandle->pNaviFrameHandle,
- szTitle,
- pLeftbtn,
- NULL,
- g_pSelectWidget->pBaselayout,
- NULL);
-
- elm_object_item_domain_text_translatable_set(g_pSelectHandle->pNaviFrameItem, VIDEOS_STRING, EINA_TRUE);
- elm_naviframe_item_pop_cb_set(g_pSelectHandle->pNaviFrameItem, mp_select_view_back_btn_cb, g_pSelectHandle);
+ g_pSelectHandle->pNaviFrameItem =
+ elm_naviframe_item_push(g_pSelectHandle->pNaviFrameHandle, szTitle,
+ pLeftbtn, NULL,
+ g_pSelectWidget->pBaselayout, NULL);
+
+ elm_object_item_domain_text_translatable_set(g_pSelectHandle->
+ pNaviFrameItem,
+ VIDEOS_STRING, EINA_TRUE);
+ elm_naviframe_item_pop_cb_set(g_pSelectHandle->pNaviFrameItem,
+ mp_select_view_back_btn_cb,
+ g_pSelectHandle);
g_free(szTitle);
- elm_naviframe_item_title_enabled_set(g_pSelectHandle->pNaviFrameItem, EINA_TRUE, EINA_FALSE);
- evas_object_smart_callback_add(g_pSelectHandle->pNaviFrameHandle, "transition,finished", mp_select_view_naviframe_transition_effect_cb, NULL);
+ elm_naviframe_item_title_enabled_set(g_pSelectHandle->pNaviFrameItem,
+ EINA_TRUE, EINA_FALSE);
+ evas_object_smart_callback_add(g_pSelectHandle->pNaviFrameHandle,
+ "transition,finished",
+ mp_select_view_naviframe_transition_effect_cb,
+ NULL);
evas_object_show(g_pSelectWidget->pBaselayout);
- mp_util_db_set_update_fun(g_pSelectHandle->euLev, __mp_select_view_db_changed_cb);
+ mp_util_db_set_update_fun(g_pSelectHandle->euLev,
+ __mp_select_view_db_changed_cb);
mp_util_hide_indicator();
}
-static void __mp_select_view_rotate_cb(void *data, Evas_Object *obj, void *event_info)
+static void __mp_select_view_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
if (!g_pSelectHandle) {
VideoLogError("__mp_select_view_rotate_cb IS null");
return;
}
- bool bLandscape = mp_rotate_ctrl_check_landspace_by_win((Evas_Object*)mp_util_get_main_window_handle());
+ bool bLandscape =
+ mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
+ mp_util_get_main_window_handle
+ ());
if (bLandscape) {
g_pSelectHandle->bLandscape = true;
} else {
g_pSelectHandle->bLandscape = false;
}
- mp_select_view_arrange_video_list(g_pSelectHandle->pGenlist, TRUE);
}
-void mp_select_view_push(void *pNaviFrame, void *pNaviItem, ChangeSelectViewCbFunc pChangeViewCb, char *pFolderUrl, SelectType eSelType, MpVideoListTabType eTabType)
+void mp_select_view_push(void *pNaviFrame, void *pNaviItem,
+ ChangeSelectViewCbFunc pChangeViewCb,
+ char *pFolderUrl, SelectType eSelType,
+ MpVideoListTabType eTabType)
{
VideoLogInfo("");
if (g_pSelectHandle || g_pSelectWidget) {
mp_select_view_destroy();
}
- g_pSelectHandle = (st_SelectViewHandle*)calloc(1, sizeof(st_SelectViewHandle));
- g_pSelectWidget = (st_SelectViewWidget*)calloc(1, sizeof(st_SelectViewWidget));
+ g_pSelectHandle =
+ (st_SelectViewHandle *) calloc(1, sizeof(st_SelectViewHandle));
+ g_pSelectWidget =
+ (st_SelectViewWidget *) calloc(1, sizeof(st_SelectViewWidget));
memset(g_pSelectHandle, 0, sizeof(st_SelectViewHandle));
memset(g_pSelectWidget, 0, sizeof(st_SelectViewWidget));
g_pSelectHandle->pFolderUrl = g_strdup(pFolderUrl);
g_pSelectHandle->eSelType = eSelType;
g_pSelectHandle->eTabType = eTabType;
- g_pSelectHandle->euLev = pFolderUrl ? MP_DB_UPDATE_LEV_2 : MP_DB_UPDATE_LEV_1;
+ g_pSelectHandle->euLev =
+ pFolderUrl ? MP_DB_UPDATE_LEV_2 : MP_DB_UPDATE_LEV_1;
g_pSelectHandle->nViewType = mp_view_as_ctrl_get_type();
- g_pSelectHandle->bLandscape = mp_rotate_ctrl_check_landspace_by_win((Evas_Object*)mp_util_get_main_window_handle());
+ g_pSelectHandle->bLandscape =
+ mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
+ mp_util_get_main_window_handle
+ ());
mp_select_view_init(g_pSelectHandle->pNaviFrameHandle);
- evas_object_smart_callback_add((Evas_Object*)mp_util_get_main_window_handle(), "wm,rotation,changed", __mp_select_view_rotate_cb, (void*)g_pSelectHandle);
+ evas_object_smart_callback_add((Evas_Object *)
+ mp_util_get_main_window_handle(),
+ "wm,rotation,changed",
+ __mp_select_view_rotate_cb,
+ (void *) g_pSelectHandle);
}
{
VideoLogInfo("");
- if (!g_pSelectHandle)
- {
+ if (!g_pSelectHandle) {
VideoLogError("No existed handle of select view.");
return;
}
- if (g_pSelectHandle->bRename && g_pSelectHandle->pChangeViewUserCbFunc)
- {
+ if (g_pSelectHandle->bRename && g_pSelectHandle->pChangeViewUserCbFunc) {
g_pSelectHandle->pChangeViewUserCbFunc(MP_LIST_VIEW_ALL);
}
void mp_select_view_change_language(void)
{
- if (!g_pSelectHandle || !g_pSelectWidget)
- {
+ if (!g_pSelectHandle || !g_pSelectWidget) {
VideoLogError("No existed handle of select view.");
return;
}
} else if (SELECT_TYPE_RENAME == g_pSelectHandle->eSelType) {
szTitle = g_strdup(VIDEOS_RENAMEVIEW_HEADER_RENAME_IDS);
}
- elm_object_item_domain_translatable_part_text_set(g_pSelectHandle->pNaviFrameItem, "elm.text.title", VIDEOS_STRING, szTitle);
+ elm_object_item_domain_translatable_part_text_set(g_pSelectHandle->
+ pNaviFrameItem,
+ "elm.text.title",
+ VIDEOS_STRING,
+ szTitle);
g_free(szTitle);
}
-static void __mp_select_view_base_layout_del_cb(void *pUserData, Evas *e ,Evas_Object *pObject, void *pEventInfo)
+static void __mp_select_view_base_layout_del_cb(void *pUserData, Evas * e,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
__mp_select_view_reset();
}
-
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
#include "mp-video-info-ctrl.h"
#include "mp-video-list-view-main.h"
#include "mp-video-detail-view.h"
+#include "mp-video-list-share-via-view.h"
#include "mp-util-preference.h"
#include "mp-util-config.h"
Ecore_Idler *pWallResolutionIdler;
MpListUpdateType eUpdateType;
- /*wall*/
+ /*wall */
Eina_List *pWallHandleList;
Evas_Object *pNocontentlayout;
static void __mp_thumbnail_view_update_cb(int nError, const char *szPath,
- void *pUserData);
+ void *pUserData);
static void __mp_thumbnail_view_language_changed_genlist_cb(void
- *pUserData,
- Evas_Object *
- pObject,
- void
- *pEventInfo);
+ *pUserData,
+ Evas_Object *
+ pObject, void
+ *pEventInfo);
static void __mp_thumbnail_view_realize_genlist_item_cb(void *pUserData,
- Evas_Object *
- pObject,
- void *pEventInfo);
+ Evas_Object *
+ pObject,
+ void *pEventInfo);
static void __mp_thumbnail_view_append_gengrid_items(Evas_Object *
- pGengrid,
- int nGenItemIndex);
+ pGengrid,
+ int nGenItemIndex);
static Evas_Object *__mp_thumbnail_view_create_gengrid(Evas_Object *
- parent, int nWidth,
- int nHeight);
+ parent, int nWidth,
+ int nHeight);
static void __mp_thumbnail_view_reset(MpListUpdateType eUpdateType);
static int mp_thumbnail_get_portrait_count()
int winHeight = 0;
int winWidth = 0;
elm_win_screen_size_get(mp_util_get_main_window_handle(), NULL, NULL,
- &winWidth, &winHeight);
+ &winWidth, &winHeight);
bool bLandscape = mp_rotate_ctrl_check_landspace();
if (bLandscape) {
nVideoItemIndex = nIndexGenlist * nItemCount;
int nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
VideoLogInfo("realize is %d--%d--%d", nItemCount, nVideoItemIndex,
- nVideoListSize);
+ nVideoListSize);
int nIndex = 0;
for (; (nIndex < nItemCount) && (nVideoItemIndex < nVideoListSize);
- nIndex++) {
+ nIndex++) {
nVideoItemIndex = nVideoItemIndex + nIndex;
mp_util_svc_cancel_thumbnail_update(nVideoItemIndex);
}
void __mp_thumbnail_view_warning_popup_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
int nVideoItemIndex = (int) pUserData;
if (nVideoItemIndex < 0
- || nVideoItemIndex >=
- mp_util_svc_get_video_list_size_for_checking_index()) {
+ || nVideoItemIndex >=
+ mp_util_svc_get_video_list_size_for_checking_index()) {
VideoLogError("[ERR] list item index.");
return ECORE_CALLBACK_CANCEL;
}
if (szMediaUrl) {
if (!mp_util_check_local_file_exist(szMediaUrl)) {
mp_util_notify_popup(NULL, VIDEOS_COMMON_HEADER_ERROR,
- VIDEOS_NOTIPOP_MSG_FILE_NOT_EXIST,
- __mp_thumbnail_view_warning_popup_cb);
+ VIDEOS_NOTIPOP_MSG_FILE_NOT_EXIST,
+ __mp_thumbnail_view_warning_popup_cb);
free(szMediaUrl);
return ECORE_CALLBACK_CANCEL;
}
}
static Evas_Object *__mp_thumbnail_view_get_icon_of_grid_cb(const void
- *pUserData,
- Evas_Object *
- pObject,
- const char
- *pPart)
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char
+ *pPart)
{
if (!g_pThumbnailView || !pObject) {
VideoLogError("g_pMainViewWidgetOfThumbnailList is NULL");
}
static void __mp_thumbnail_view_video_item_del_cb(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
if (!g_pThumbnailView || !event_info
- || !g_pThumbnailView->pVideoItemList) {
+ || !g_pThumbnailView->pVideoItemList) {
VideoLogError("g_pMainViewWidge is NULL");
return;
}
Eina_List *pCurList = NULL;
Elm_Object_Item *pTmpVideoItem = NULL;
EINA_LIST_FOREACH(g_pThumbnailView->pVideoItemList, pCurList,
- pTmpVideoItem) {
+ pTmpVideoItem) {
if (pCurrentItem == pTmpVideoItem) {
nIndexGenlist = (int) elm_object_item_data_get(pCurrentItem);
mp_thumbnail_view_cancel_thumbnail_update(nIndexGenlist);
static void __mp_thumbnail_view_free_video_wall_item(char *pVideoItemId)
{
if (!pVideoItemId || !g_pThumbnailView
- || !g_pThumbnailView->pWallHandleList) {
+ || !g_pThumbnailView->pWallHandleList) {
VideoLogError("");
return;
}
for (nIndex = 0; nIndex <= nGenlistRow; nIndex++) {
pTmpVideoGenlistItem =
elm_genlist_item_append(pGenlist,
- g_pThumbnailView->pGenGridZoomItc,
- (void *) nIndex, NULL,
- ELM_GENLIST_ITEM_NONE, NULL,
- NULL);
- /*elm_genlist_item_select_mode_set(pTmpVideoGenlistItem, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);*/
+ g_pThumbnailView->pGenGridZoomItc,
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
g_pThumbnailView->pVideoItemList =
eina_list_append(g_pThumbnailView->pVideoItemList,
- pTmpVideoGenlistItem);
+ pTmpVideoGenlistItem);
elm_object_item_del_cb_set(pTmpVideoGenlistItem,
- __mp_thumbnail_view_video_item_del_cb);
+ __mp_thumbnail_view_video_item_del_cb);
}
} else {
for (nIndex = 0; nIndex <= nGenlistRow; nIndex++) {
pTmpVideoGenlistItem =
elm_genlist_item_append(pGenlist,
- g_pThumbnailView->pGenGridItc,
- (void *) nIndex, NULL,
- ELM_GENLIST_ITEM_NONE, NULL,
- NULL);
- /*elm_genlist_item_select_mode_set(pTmpVideoGenlistItem, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);*/
+ g_pThumbnailView->pGenGridItc,
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
g_pThumbnailView->pVideoItemList =
eina_list_append(g_pThumbnailView->pVideoItemList,
- pTmpVideoGenlistItem);
+ pTmpVideoGenlistItem);
elm_object_item_del_cb_set(pTmpVideoGenlistItem,
- __mp_thumbnail_view_video_item_del_cb);
+ __mp_thumbnail_view_video_item_del_cb);
}
}
}
Evas_Object *__mp_thumbnail_view_get_icon_of_no_item_cb(const void
- *pUserData,
- Evas_Object *
- pObject,
- const char *pPart)
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char *pPart)
{
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_NO_ITEM_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_NO_ITEM_EDJ);
free(path);
if (!strcmp(pPart, "elm.icon")) {
int width = NO_ITEM_GENLIST_WIDTH * elm_config_scale_get();
Evas_Object *pNoItemLayout = NULL;
pNoItemLayout = elm_layout_add(pObject);
elm_layout_file_set(pNoItemLayout, edj_path,
- GENLIST_NOITEM_EDJ_GROUP);
+ GENLIST_NOITEM_EDJ_GROUP);
evas_object_size_hint_min_set(pNoItemLayout, width, height);
elm_object_part_text_set(pNoItemLayout,
- SWALLOW_LISTVIEW_NO_ITEM_TEXT,
- VIDEOS_NOCONTENT_MSG_NO_VIDEOS_DESC);
+ SWALLOW_LISTVIEW_NO_ITEM_TEXT,
+ VIDEOS_NOCONTENT_MSG_NO_VIDEOS_DESC);
evas_object_show(pNoItemLayout);
return pNoItemLayout;
}
/*//////////////////////////////////////////////////*/
/* External APIs*/
-static void __mp_thumbnail_view_rotate_cb(void *data, Evas_Object *obj,
- void *event_info)
+static void __mp_thumbnail_view_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
if (!g_pThumbnailView) {
VideoLogError("__mp_thumbnail_view_rotate_cb IS null");
return;
}
- bool bLandscape =
- mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
- mp_util_get_main_window_handle
- ());
+ bool bLandscape = mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
+ mp_util_get_main_window_handle
+ ());
if (bLandscape) {
VideoLogInfo("landscape mode");
g_pThumbnailView->bLandscape = true;
g_pThumbnailView->bLandscape = false;
}
elm_genlist_clear(g_pThumbnailView->pVideosGenlist);
- __mp_thumbnail_view_append_grid_layout(g_pThumbnailView->
- pVideosGenlist);
+ __mp_thumbnail_view_append_grid_layout
+ (g_pThumbnailView->pVideosGenlist);
}
-int _grid_view_zoom_out(void *data, Evas_Object *view)
+int _grid_view_zoom_out(void *data, Evas_Object * view)
{
st_VideoListViewMainViewWidget *ad =
(st_VideoListViewMainViewWidget *) data;
g_pThumbnailView->zoom_level = ad->zoom_level;
elm_genlist_clear(g_pThumbnailView->pVideosGenlist);
- __mp_thumbnail_view_append_grid_layout(g_pThumbnailView->
- pVideosGenlist);
+ __mp_thumbnail_view_append_grid_layout
+ (g_pThumbnailView->pVideosGenlist);
return 0;
}
-int _grid_view_zoom_in(void *data, Evas_Object *view)
+int _grid_view_zoom_in(void *data, Evas_Object * view)
{
st_VideoListViewMainViewWidget *ad =
(st_VideoListViewMainViewWidget *) data;
g_pThumbnailView->zoom_level = ad->zoom_level;
elm_genlist_clear(g_pThumbnailView->pVideosGenlist);
- __mp_thumbnail_view_append_grid_layout(g_pThumbnailView->
- pVideosGenlist);
+ __mp_thumbnail_view_append_grid_layout
+ (g_pThumbnailView->pVideosGenlist);
return 0;
}
bool mp_thumbnail_view_arrange_list_item(void *pMainViewHandle,
- void *pMainViewWidget,
- MpListUpdateType eUpdateType,
- UpdateListItemsCbFunc
- pUpdateVideoListUserCb)
+ void *pMainViewWidget,
+ MpListUpdateType eUpdateType,
+ UpdateListItemsCbFunc
+ pUpdateVideoListUserCb)
{
VideoLogInfo("");
g_pThumbnailView->zoom_level = VP_ZOOM_IN_DEFAULT;
g_pThumbnailView->bLandscape =
mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
- mp_util_get_main_window_handle
- ());
+ mp_util_get_main_window_handle
+ ());
st_VideoListViewMainViewHandle *pMainHandle =
g_pThumbnailView->pMainHandle;
int nVideoListSize = 0;
if (g_pThumbnailView->eUpdateType == LIST_UPDATE_TYPE_ALL
- || g_pThumbnailView->eUpdateType == LIST_UPDATE_TYPE_DATA) {
+ || g_pThumbnailView->eUpdateType == LIST_UPDATE_TYPE_DATA) {
mp_util_svc_destory_video_list();
mp_util_svc_extract_video_list_by_item_type
- (mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
+ (mp_sort_ctrl_get_sort_state(), mp_view_ctrl_get_list_type());
}
nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
VideoLogInfo("nVideoListSize : %d", nVideoListSize);
- /*mp_list_view_update_count_layout();*/
- /*mp_list_view_update_base_layout();*/
+ if (nVideoListSize == 0) {
+ mp_ft_ctrl_destroy();
+ }
+
if (!g_pThumbnailView->pVideosGenlist) {
g_pThumbnailView->pVideosGenlist =
- elm_genlist_add(g_pThumbnailView->pMainWidget->
- pListViewBaselayout);
+ elm_genlist_add(g_pThumbnailView->
+ pMainWidget->pListViewBaselayout);
elm_scroller_bounce_set(g_pThumbnailView->pVideosGenlist,
- EINA_FALSE, EINA_TRUE);
+ EINA_FALSE, EINA_TRUE);
evas_object_size_hint_weight_set(g_pThumbnailView->pVideosGenlist,
- EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(g_pThumbnailView->pVideosGenlist,
- EVAS_HINT_FILL, EVAS_HINT_FILL);
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_genlist_mode_set(g_pThumbnailView->pVideosGenlist,
- ELM_LIST_COMPRESS);
- elm_scroller_single_direction_set(g_pThumbnailView->
- pVideosGenlist,
- ELM_SCROLLER_SINGLE_DIRECTION_HARD);
- evas_object_show(g_pThumbnailView->pMainWidget->
- pListViewBaselayout);
- }
-
- elm_object_part_content_set(g_pThumbnailView->pMainWidget->
- pListViewBaselayout,
- SWALLOW_LISTVIEW_CONTENT,
- g_pThumbnailView->pVideosGenlist);
+ ELM_LIST_COMPRESS);
+ elm_scroller_single_direction_set(g_pThumbnailView->pVideosGenlist,
+ ELM_SCROLLER_SINGLE_DIRECTION_HARD);
+ evas_object_show(g_pThumbnailView->
+ pMainWidget->pListViewBaselayout);
+ }
+
+ elm_object_part_content_set(g_pThumbnailView->
+ pMainWidget->pListViewBaselayout,
+ SWALLOW_LISTVIEW_CONTENT,
+ g_pThumbnailView->pVideosGenlist);
if (nVideoListSize > 0) {
if (g_pThumbnailView->pNocontentlayout) {
- elm_object_part_content_unset(g_pThumbnailView->
- pNocontentlayout,
- SWALLOW_LISTVIEW_CONTENT);
+ elm_object_part_content_unset
+ (g_pThumbnailView->pNocontentlayout,
+ SWALLOW_LISTVIEW_CONTENT);
MP_DEL_OBJ(g_pThumbnailView->pNocontentlayout);
}
_vp_pinch_add_event(g_pThumbnailView->pMainWidget,
- g_pThumbnailView->pMainWidget->
- pListViewBaselayout);
- __mp_thumbnail_view_append_grid_layout(g_pThumbnailView->
- pVideosGenlist);
+ g_pThumbnailView->
+ pMainWidget->pListViewBaselayout);
+ __mp_thumbnail_view_append_grid_layout
+ (g_pThumbnailView->pVideosGenlist);
} else {
- g_pThumbnailView->pNocontentlayout =
- mp_create_nocontent_layout(g_pThumbnailView->pMainWidget->
- pListViewBaselayout,
- VIDEOS_NOCONTENT_MSG_NO_VIDEOS_IDS,
- VIDEOS_NOCONTENT_MSG_NO_VIDEOS_DESC_IDS);
- elm_object_part_content_unset(g_pThumbnailView->pMainWidget->
- pListViewBaselayout,
- SWALLOW_LISTVIEW_CONTENT);
- if (g_pThumbnailView->pVideosGenlist) {
- evas_object_hide(g_pThumbnailView->pVideosGenlist);
- }
- evas_object_show(g_pThumbnailView->pMainWidget->
- pListViewBaselayout);
- elm_object_part_content_set(g_pThumbnailView->pMainWidget->
- pListViewBaselayout,
- SWALLOW_LISTVIEW_CONTENT,
- g_pThumbnailView->
- pNocontentlayout);
+ g_pThumbnailView->pNocontentlayout =
+ mp_create_nocontent_layout(g_pThumbnailView->
+ pMainWidget->pListViewBaselayout,
+ VIDEOS_NOCONTENT_MSG_NO_VIDEOS_IDS,
+ VIDEOS_NOCONTENT_MSG_NO_VIDEOS_DESC_IDS);
+ elm_object_part_content_unset(g_pThumbnailView->
+ pMainWidget->pListViewBaselayout,
+ SWALLOW_LISTVIEW_CONTENT);
+ if (g_pThumbnailView->pVideosGenlist) {
+ evas_object_hide(g_pThumbnailView->pVideosGenlist);
+ }
+ evas_object_show(g_pThumbnailView->
+ pMainWidget->pListViewBaselayout);
+ elm_object_part_content_set(g_pThumbnailView->
+ pMainWidget->pListViewBaselayout,
+ SWALLOW_LISTVIEW_CONTENT,
+ g_pThumbnailView->pNocontentlayout);
}
evas_object_smart_callback_add((Evas_Object *)
- mp_util_get_main_window_handle(),
- "wm,rotation,changed",
- __mp_thumbnail_view_rotate_cb, NULL);
+ mp_util_get_main_window_handle(),
+ "wm,rotation,changed",
+ __mp_thumbnail_view_rotate_cb, NULL);
mp_list_common_set_callabcks(g_pThumbnailView->pMainHandle,
- __mp_thumbnail_view_language_changed_genlist_cb,
- __mp_thumbnail_view_realize_genlist_item_cb,
- NULL, NULL);
+ __mp_thumbnail_view_language_changed_genlist_cb,
+ __mp_thumbnail_view_realize_genlist_item_cb,
+ NULL, NULL);
evas_object_show(g_pThumbnailView->pVideosGenlist);
}
VideoLogInfo("g_pThumbnailView->nSelectedVideoItem : %d",
- g_pThumbnailView->nSelectedVideoItem);
+ g_pThumbnailView->nSelectedVideoItem);
return g_pThumbnailView->nSelectedVideoItem;
}
static void __mp_thumbnail_view_update_video_items(int nVideoItemIndex)
{
if (!g_pThumbnailView) {
- VideoLogError
- ("g_pMainViewHandleOfThumbnailList are not existed.");
+ VideoLogError("g_pMainViewHandleOfThumbnailList are not existed.");
return;
}
if (!g_pThumbnailView->pVideoItemList) {
VideoSecureLogError
- ("g_pThumbnailView->pVideosGenlist is not existed.");
+ ("g_pThumbnailView->pVideosGenlist is not existed.");
return;
}
int nGenistIndex =
mp_thumbnail_view_thumbnail_to_genlist_index(nVideoItemIndex);
Elm_Object_Item *pTmpVideoGenlistItem =
- (Elm_Object_Item *) eina_list_nth(g_pThumbnailView->
- pVideoItemList, nGenistIndex);
+ (Elm_Object_Item *) eina_list_nth(g_pThumbnailView->pVideoItemList,
+ nGenistIndex);
if (pTmpVideoGenlistItem) {
VideoLogWarning("Update index: %d", nVideoItemIndex);
Evas_Object *gengrid =
elm_object_item_part_content_get(pTmpVideoGenlistItem,
- "elm.icon");
+ "elm.icon");
if (gengrid) {
int nCount =
- (mp_rotate_ctrl_check_landspace() ?
+ (mp_rotate_ctrl_check_landspace() ?
VP_GENLIST_THUMB_LANDSPACE_COUNT :
VP_GENLIST_THUMB_PORTRAIT_COUNT);
int nIndex = nVideoItemIndex % nCount;
#ifdef ENABLE_LONGPRESS
static void __mp_thumbnail_view_share_via_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
mp_option_ctrl_delete_handle();
if (!g_pThumbnailView) {
if (bDRMLock) {
MP_FREE_STRING(pVideo_url);
mp_util_notify_popup(NULL, VIDEOS_COMMON_HEADER_ERROR,
- VIDEOS_NOTIPOP_MSG_UNABLE_TO_SHARE_DRM_FILE,
- __mp_thumbnail_view_warning_popup_cb);
+ VIDEOS_NOTIPOP_MSG_UNABLE_TO_SHARE_DRM_FILE,
+ __mp_thumbnail_view_warning_popup_cb);
return;
}
#ifdef ENABLE_LONGPRESS
static void __mp_thumbnail_view_add_to_home_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
mp_option_ctrl_delete_handle();
mp_util_svc_get_video_thumbnail(nVideoItemIndex);
if (pVideo_id) {
- /* if (!mp_util_add_to_home(pVideo_id, pVideo_thumbnail))*/
{
mp_util_status_bar_noti_popup_show(MP_COM_OPT_UNABLE_ADDED);
}
}
static void __mp_thumbnail_view_detail_video_popup_cb(void *pUserData,
- Evas_Object *
- pObject,
- void *pEventInfo)
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
}
static void __mp_thumbnail_view_detail_mouse_back_popup_cb(void
- *pUserData,
- Evas *pEvas,
- Evas_Object *
- pObject,
- void
- *pEventInfo)
+ *pUserData,
+ Evas * pEvas,
+ Evas_Object *
+ pObject, void
+ *pEventInfo)
{
Evas_Event_Mouse_Up *pEvent = pEventInfo;
if (!pEvent) {
#endif
void __mp_thumbnail_view_detail_key_back_popup_cb(void *pUserData,
- Evas *pEvas,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas * pEvas,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
Evas_Event_Key_Down *pEvent = pEventInfo;
if (!pEvent) {
}
}
-#if 0 /*Unused function*/
-bool __mp_thumbnail_view_get_detail_info(int nVideoItemIndex,
- stDetailInfo **pDetailInfo)
-{
- char *szFilePath = NULL;
- char *szVideoTitle = NULL;
-
- char szTmpStr[FORMAT_LEN_MAX] = { 0, };
- char szTmpFileDate[FORMAT_LEN_MAX] = { 0, };
- char szTmpFileExtension[FORMAT_LEN_MAX] = { 0, };
- char szTmpFileSize[FORMAT_LEN_MAX] = { 0, };
-
- /*double dLongitude = 0.0;*/
- /*double dLatitude = 0.0;*/
-
- int nWidth = 0;
- int nHeight = 0;
- stDetailInfo *pDetail = NULL;
-
- szFilePath = mp_util_svc_get_video_url(nVideoItemIndex);
- szVideoTitle = mp_util_svc_get_video_title(nVideoItemIndex);
-
- mp_info_ctrl_get_file_info(szFilePath, szTmpFileDate,
- FORMAT_LEN_MAX - 1, szTmpFileExtension,
- FORMAT_LEN_MAX - 1, szTmpFileSize,
- FORMAT_LEN_MAX - 1);
-
- nWidth = mp_util_svc_get_video_item_width(nVideoItemIndex);
- nHeight = mp_util_svc_get_video_item_height(nVideoItemIndex);
- /*mp_info_ctrl_get_gps(szFilePath, &dLongitude, &dLatitude);*/
-
- pDetail = calloc(1, sizeof(stDetailInfo));
- if (!pDetail) {
- MP_FREE_STRING(szFilePath);
- MP_FREE_STRING(szVideoTitle);
- VideoLogError("pDetailPopup alloc fail");
- return FALSE;
- }
-
- pDetail->szTitle = g_strdup(szVideoTitle);
- pDetail->szLocation = vp_util_convert_file_location(szFilePath);
- MP_FREE_STRING(szFilePath);
-
- snprintf(szTmpStr, FORMAT_LEN_MAX - 1, "%s", szTmpFileExtension);
- pDetail->szFormat = g_strdup(szTmpStr);
- memset(szTmpStr, 0, FORMAT_LEN_MAX);
-
- /*snprintf(szTmpStr, FORMAT_LEN_MAX-1, "%s", szTmpFileDate);
- pDetail->szDate = g_strdup(szTmpStr);
- memset(szTmpStr, 0, FORMAT_LEN_MAX); */
-
- snprintf(szTmpStr, FORMAT_LEN_MAX - 1, "%s", szTmpFileSize);
- pDetail->szSize = g_strdup(szTmpStr);
- memset(szTmpStr, 0, FORMAT_LEN_MAX);
-
- snprintf(szTmpStr, FORMAT_LEN_MAX - 1, "%d X %d", nWidth, nHeight);
- pDetail->szResolution = g_strdup(szTmpStr);
- memset(szTmpStr, 0, FORMAT_LEN_MAX);
-
- /*snprintf(szTmpStr, FORMAT_LEN_MAX-1, "%f", dLatitude);
- pDetail->szLatitude = g_strdup(szTmpStr);
- memset(szTmpStr, 0, FORMAT_LEN_MAX);
-
- snprintf(szTmpStr, FORMAT_LEN_MAX-1, "%f", dLongitude);
- pDetail->szLongitude = g_strdup(szTmpStr);
- memset(szTmpStr, 0, FORMAT_LEN_MAX); */
- *pDetailInfo = pDetail;
- return TRUE;
-}
-#endif
#ifdef ENABLE_LONGPRESS
static void __mp_thumbnail_view_cloud_download_btn_cb(void *pUserData,
- Evas_Object *
- pObject,
- void *pEventInfo)
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
}
static void __mp_thumbnail_view_respones_delete_popup_cb(void *pUserData,
- Evas_Object *
- pObject,
- void *pEventInfo)
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
if (!g_pThumbnailView) {
VideoLogError("");
VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
if (nVideoItemIndex < 0
- || nVideoItemIndex >=
- mp_util_svc_get_video_list_size_for_checking_index()) {
+ || nVideoItemIndex >=
+ mp_util_svc_get_video_list_size_for_checking_index()) {
VideoLogInfo("[ERR] list item index.");
return;
}
mp_util_svc_remove_item_by_list_index(nVideoItemIndex);
mp_list_view_update_count_layout();
- /*mp_list_view_update_base_layout();*/
if (g_pThumbnailView->fViewCbFunc) {
g_pThumbnailView->fViewCbFunc(LIST_UPDATE_TYPE_VIEW);
}
static void __mp_thumbnail_view_pop_up_delete_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
mp_option_ctrl_delete_handle();
}
int nVideoItemIndex = (int) pUserData;
mp_util_remove_question_popup(nVideoItemIndex,
- (MpListViewAsType) 0,
- __mp_thumbnail_view_respones_delete_popup_cb,
- __mp_thumbnail_view_detail_video_popup_cb,
- __mp_thumbnail_view_detail_mouse_back_popup_cb,
- __mp_thumbnail_view_detail_key_back_popup_cb);
+ (MpListViewAsType) 0,
+ __mp_thumbnail_view_respones_delete_popup_cb,
+ __mp_thumbnail_view_detail_video_popup_cb,
+ __mp_thumbnail_view_detail_mouse_back_popup_cb,
+ __mp_thumbnail_view_detail_key_back_popup_cb);
}
if (mp_mgr_get_library_naviframe()) {
int count =
eina_list_count(elm_naviframe_items_get
- (mp_mgr_get_library_naviframe()));
+ (mp_mgr_get_library_naviframe()));
return (count == 1);
}
return FALSE;
}
static void __mp_thumbnail_view_update_cb(int nError, const char *szPath,
- void *pUserData)
+ void *pUserData)
{
int nVideoItemIndex = (int) pUserData;
}
if (nVideoItemIndex < 0
- || nVideoItemIndex >=
- mp_util_svc_get_video_list_size_for_checking_index()) {
+ || nVideoItemIndex >=
+ mp_util_svc_get_video_list_size_for_checking_index()) {
VideoSecureLogError("nVideoItemIndex is invalid = %d",
- nVideoItemIndex);
+ nVideoItemIndex);
return;
}
mp_thumbnail_view_update_genlist_item(nVideoItemIndex);
} else {
VideoLogError
- ("[ERR] No exist g_pMainViewWidgetOfNormalList->pVideolistItemList.");
+ ("[ERR] No exist g_pMainViewWidgetOfNormalList->pVideolistItemList.");
}
}
static void __mp_thumbnail_view_update_empty_cb(int nError,
- const char *szPath,
- void *pUserData)
+ const char *szPath,
+ void *pUserData)
{
int nVideoItemIndex = (int) pUserData;
}
static void __mp_thumbnail_view_realize_genlist_item_cb(void *pUserData,
- Evas_Object *
- pObject,
- void *pEventInfo)
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
if (!pEventInfo || !g_pThumbnailView) {
VideoLogError
- ("invalid pEveninfo 0r g_pMainViewWidgetOfThumbnailList");
+ ("invalid pEveninfo 0r g_pMainViewWidgetOfThumbnailList");
return;
}
}
static void __mp_thumbnail_view_language_changed_genlist_cb(void
- *pUserData,
- Evas_Object *
- pObject,
- void
- *pEventInfo)
+ *pUserData,
+ Evas_Object *
+ pObject, void
+ *pEventInfo)
{
VideoLogInfo("");
if (!pObject) {
#ifdef ENABLE_LONGPRESS
static void __mp_thumbnail_view_gengrid_long_press_cb(void *pUserData,
- Evas_Object *
- pObject,
- void *pEventInfo)
+ Evas_Object *
+ pObject,
+ void *pEventInfo)
{
if (!g_pThumbnailView) {
VideoLogError("");
(int) elm_object_item_data_get((Elm_Object_Item *) pEventInfo);
VideoLogInfo("Select nVideoItemIndex: %d", nVideoItemIndex);
if (nVideoItemIndex < 0
- || nVideoItemIndex >=
- mp_util_svc_get_video_list_size_for_checking_index()) {
+ || nVideoItemIndex >=
+ mp_util_svc_get_video_list_size_for_checking_index()) {
VideoSecureLogError("nVideoItemIndex is invalid = %d",
- nVideoItemIndex);
+ nVideoItemIndex);
return;
}
st_RegisteOptionCbFunc *pRegisteCbFunc =
(st_RegisteOptionCbFunc *) calloc(1,
- sizeof(st_RegisteOptionCbFunc));
+ sizeof(st_RegisteOptionCbFunc));
if (pRegisteCbFunc) {
pRegisteCbFunc->ShareViaItemCb =
(void *) __mp_thumbnail_view_share_via_cb;
pRegisteCbFunc->AddToHomeItemCb =
(void *) __mp_thumbnail_view_add_to_home_cb;
- /*pRegisteCbFunc->RenameItemCb = (void*)__mp_thumbnail_view_rename_popup_cb;*/
- /*pRegisteCbFunc->DetailsItemCb= (void*)__mp_thumbnail_view_pop_up_detail_cb;*/
pRegisteCbFunc->DeleteItemCb =
(void *) __mp_thumbnail_view_pop_up_delete_cb;
pRegisteCbFunc->DownloadCb =
char *title = mp_util_svc_get_video_title(nVideoItemIndex);
mp_option_ctrl_show(g_pThumbnailView->pMainHandle->pNaviFrameHandle,
- (const char *) title, nVideoItemIndex,
- pRegisteCbFunc, __mp_thumbnail_view_result_pop_up,
- g_pThumbnailView->pVideosGenlist,
- MP_LIST_OPTION_CLOUD_DOWNLOAD_ITEM);
+ (const char *) title, nVideoItemIndex,
+ pRegisteCbFunc, __mp_thumbnail_view_result_pop_up,
+ g_pThumbnailView->pVideosGenlist,
+ MP_LIST_OPTION_CLOUD_DOWNLOAD_ITEM);
if (mp_option_ctrl_get_handle()) {
evas_object_data_set(g_pThumbnailView->pVideosGenlist, "popup",
- mp_option_ctrl_get_handle());
+ mp_option_ctrl_get_handle());
elm_object_scroll_freeze_push(g_pThumbnailView->pVideosGenlist);
}
MP_FREE_STRING(pRegisteCbFunc);
#endif
static void __mp_thumbnail_view_gengrid_realize_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!pEventInfo) {
return;
}
+ vp_share_view_update_share_panel();
+
int nVideoItemIndex =
(int) elm_object_item_data_get((Elm_Object_Item *) pEventInfo);
VideoLogInfo("Select nVideoItemIndex: %d", nVideoItemIndex);
if (nVideoItemIndex < 0
- || nVideoItemIndex >=
- mp_util_svc_get_video_list_size_for_checking_index()) {
+ || nVideoItemIndex >=
+ mp_util_svc_get_video_list_size_for_checking_index()) {
VideoSecureLogError("nVideoItemIndex is invalid = %d",
- nVideoItemIndex);
+ nVideoItemIndex);
return;
}
int nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
- char *pThumbIconUri =
- mp_util_svc_get_video_thumbnail(nVideoItemIndex);
+ char *pThumbIconUri = mp_util_svc_get_video_thumbnail(nVideoItemIndex);
VideoSecureLogInfo("pThumbIconUri = %s:%d", pThumbIconUri,
- nVideoItemIndex);
+ nVideoItemIndex);
if (!pThumbIconUri) {
if (nVideoItemIndex < nVideoListSize - 1) {
mp_util_svc_register_thumbnail_update_func(nVideoItemIndex,
- __mp_thumbnail_view_update_empty_cb,
- (void *)
- nVideoItemIndex);
+ __mp_thumbnail_view_update_empty_cb,
+ (void *)
+ nVideoItemIndex);
} else {
mp_util_svc_register_thumbnail_update_func(nVideoItemIndex,
- (void *)
- __mp_thumbnail_view_update_cb,
- (void *)
- nVideoItemIndex);
+ (void *)
+ __mp_thumbnail_view_update_cb,
+ (void *)
+ nVideoItemIndex);
}
} else {
free(pThumbIconUri);
}
static Evas_Object *__mp_thumbnail_view_create_gengrid(Evas_Object *
- parent, int nWidth,
- int nHeight)
+ parent, int nWidth,
+ int nHeight)
{
Evas_Object *pGengrid =
mp_util_create_gengrid(parent, nWidth, nHeight, EINA_TRUE);
}
#ifdef ENABLE_LONGPRESS
evas_object_smart_callback_add(pGengrid, "longpressed",
- __mp_thumbnail_view_gengrid_long_press_cb,
- NULL);
+ __mp_thumbnail_view_gengrid_long_press_cb,
+ NULL);
#endif
evas_object_smart_callback_add(pGengrid, "realized",
- __mp_thumbnail_view_gengrid_realize_cb,
- NULL);
+ __mp_thumbnail_view_gengrid_realize_cb,
+ NULL);
return pGengrid;
}
static char *__mp_thumbnail_view_get_label_of_grid_item_cb(const void
- *pUserData,
- Evas_Object *
- pObject,
- const char
- *pPart)
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char
+ *pPart)
{
int nVideoItemIndex = (int) pUserData;
}
static Evas_Object *__mp_thumbnail_view_get_grid_icon_cb(const void
- *pUserData,
- Evas_Object *
- pObject,
- const char
- *pPart)
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char
+ *pPart)
{
int nVideoItemIndex = (int) pUserData;
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_IMAGE_NAME_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_IMAGE_NAME_EDJ);
free(path);
if (!strcmp(pPart, "elm.swallow.icon")) {
char *pThumbIconUri =
double nRatio = 0.0;
if (nDurationTime > 0) {
- nRatio = ((double)nLastPlayedTime) /
- ((double)nDurationTime);
+ nRatio = ((double) nLastPlayedTime) / ((double) nDurationTime);
}
if (nRatio < 0.05) {
elm_object_style_set(pProgressBar, "video/list_progress");
elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pProgressBar, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
elm_progressbar_value_set(pProgressBar, nRatio);
evas_object_show(pProgressBar);
return pProgressBar;
} else if (!strcmp(pPart, "elm.lock.icon")) {
char *pVideoFile = mp_util_svc_get_video_url(nVideoItemIndex);
- bool bRet =
- mp_util_check_video_personal_status((const char *)
- pVideoFile);
+ bool bRet = mp_util_check_video_personal_status((const char *)
+ pVideoFile);
MP_FREE_STRING(pVideoFile);
if (bRet) {
Evas_Object *pLockIcon = elm_image_add(pObject);
elm_image_file_set(pLockIcon, edj_path,
- VIDEO_LIST_VIEW_ICON_PERSONAL_LOCK);
+ VIDEO_LIST_VIEW_ICON_PERSONAL_LOCK);
evas_object_size_hint_align_set(pLockIcon, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pLockIcon, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_show(pLockIcon);
return pLockIcon;
} else {
if (bRet) {
Evas_Object *pDropboxIcon = elm_image_add(pObject);
elm_image_file_set(pDropboxIcon, edj_path,
- VIDEO_LIST_VIEW_ICON_DROPBOX);
+ VIDEO_LIST_VIEW_ICON_DROPBOX);
evas_object_size_hint_align_set(pDropboxIcon, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pDropboxIcon,
- EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
evas_object_show(pDropboxIcon);
return pDropboxIcon;
} else {
}
static void __mp_thumbnail_view_select_grid_item_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!g_pThumbnailView) {
VideoLogError("");
VideoLogInfo("[ERR]No have pUserData");
return;
}
- Evas_Object *pPopup = evas_object_data_get(g_pThumbnailView->pVideosGenlist, "popup"); /* Get popup*/
+ Evas_Object *pPopup = evas_object_data_get(g_pThumbnailView->pVideosGenlist, "popup"); /* Get popup */
if (pPopup) {
VideoLogInfo("long press is called");
- return; /* If popup exists, do nothing*/
+ return; /* If popup exists, do nothing */
}
if (!mp_util_call_off()) {
mp_util_ticker_toast_popup
- (VIDEOS_NOTIPOP_MSG_UNABLE_TO_PLAY_VIDEO_DURING_CALL, false,
- false);
+ (VIDEOS_NOTIPOP_MSG_UNABLE_TO_PLAY_VIDEO_DURING_CALL, false,
+ false);
return;
}
int nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
VideoLogDebug("nVideoItemIndex = %d--%d", nVideoItemIndex,
- nVideoListSize);
+ nVideoListSize);
if (nVideoItemIndex < 0 || nVideoItemIndex >= nVideoListSize) {
VideoLogError("nVideoItemIndex < 0 ===>>> RETURN");
MP_DEL_IDLER(g_pThumbnailView->pPlayIdler);
g_pThumbnailView->pPlayIdler =
ecore_idler_add(__mp_thumbnail_view_play_video_idler_cb,
- (void *) nVideoItemIndex);
+ (void *) nVideoItemIndex);
}
static void __mp_thumbnail_view_grid_item_del_cb(void *pUserdata,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object * obj,
+ void *event_info)
{
if (!g_pThumbnailView || !event_info
- || !g_pThumbnailView->pVideoItemList) {
+ || !g_pThumbnailView->pVideoItemList) {
VideoLogError("g_pMainViewWidge is NULL");
return;
}
}
static void __mp_thumbnail_view_append_gengrid_items(Evas_Object *
- pGengrid,
- int nGenItemIndex)
+ pGengrid,
+ int nGenItemIndex)
{
if (!g_pThumbnailView) {
VideoLogError("");
int nCount =
- (mp_rotate_ctrl_check_landspace() ?
+ (mp_rotate_ctrl_check_landspace() ?
mp_thumbnail_get_landscape_count() :
mp_thumbnail_get_portrait_count());
int nIndex = nGenItemIndex * nCount;
for (; (nIndex < nMaxIndex) && (nIndex < nVideoListSize); nIndex++) {
gridItem =
elm_gengrid_item_append(pGengrid,
- g_pThumbnailView->pGenGridItc_l,
- (void *) nIndex,
- __mp_thumbnail_view_select_grid_item_cb,
- (void *) nIndex);
+ g_pThumbnailView->pGenGridItc_l,
+ (void *) nIndex,
+ __mp_thumbnail_view_select_grid_item_cb,
+ (void *) nIndex);
elm_gengrid_item_select_mode_set(gridItem,
- ELM_OBJECT_SELECT_MODE_ALWAYS);
+ ELM_OBJECT_SELECT_MODE_ALWAYS);
elm_object_item_del_cb_set(gridItem,
- __mp_thumbnail_view_grid_item_del_cb);
+ __mp_thumbnail_view_grid_item_del_cb);
elm_object_item_data_set(gridItem, (void *) nIndex);
}
}
if (g_pThumbnailView->pVideoItemList) {
Elm_Object_Item *pTmpVideoGenlistItem = NULL;
EINA_LIST_FREE(g_pThumbnailView->pVideoItemList,
- pTmpVideoGenlistItem) {
+ pTmpVideoGenlistItem) {
if (pTmpVideoGenlistItem) {
int nIndex =
(int) elm_object_item_data_get(pTmpVideoGenlistItem);
free(g_pThumbnailView);
g_pThumbnailView = NULL;
evas_object_smart_callback_del((Evas_Object *)
- mp_util_get_main_window_handle(),
- "wm,rotation,changed",
- __mp_thumbnail_view_rotate_cb);
+ mp_util_get_main_window_handle(),
+ "wm,rotation,changed",
+ __mp_thumbnail_view_rotate_cb);
}
}
elm_genlist_clear(g_pThumbnailView->pVideosGenlist);
}
evas_object_smart_callback_del((Evas_Object *)
- mp_util_get_main_window_handle(),
- "wm,rotation,changed",
- __mp_thumbnail_view_rotate_cb);
+ mp_util_get_main_window_handle(),
+ "wm,rotation,changed",
+ __mp_thumbnail_view_rotate_cb);
}
}
int nGenlistIndex = nGenItemIndex;
g_pThumbnailView->bLandscape =
- mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
- mp_util_get_main_window_handle
- ());
+ mp_rotate_ctrl_check_landspace_by_win((Evas_Object *)
+ mp_util_get_main_window_handle
+ ());
if (g_pThumbnailView->bLandscape) {
- nGenlistIndex = nGenlistIndex / mp_thumbnail_get_landscape_count();
+ nGenlistIndex =
+ nGenlistIndex / mp_thumbnail_get_landscape_count();
} else {
- nGenlistIndex = nGenlistIndex / mp_thumbnail_get_portrait_count();
+ nGenlistIndex =
+ nGenlistIndex / mp_thumbnail_get_portrait_count();
}
Elm_Object_Item *pTmpVideoGenlistItem = NULL;
pTmpVideoGenlistItem =
elm_genlist_nth_item_get((const Evas_Object *)
- g_pThumbnailView->pVideosGenlist,
- nGenlistIndex);
- mp_util_svc_update_thumbnail_info(g_pThumbnailView->
- nSelectedVideoItem);
+ g_pThumbnailView->pVideosGenlist,
+ nGenlistIndex);
+ mp_util_svc_update_thumbnail_info
+ (g_pThumbnailView->nSelectedVideoItem);
- Evas_Object *pGengrid = elm_object_item_part_content_get(pTmpVideoGenlistItem, "elm.icon");
+ Evas_Object *pGengrid =
+ elm_object_item_part_content_get(pTmpVideoGenlistItem,
+ "elm.icon");
Elm_Object_Item *pTmpVideoGengridItem = NULL;
pTmpVideoGengridItem = elm_gengrid_selected_item_get(pGengrid);
elm_gengrid_item_update(pTmpVideoGengridItem);
{
if (!g_pThumbnailView || !g_pThumbnailView->pVideosGenlist) {
VideoLogWarning
- ("[ERR] pVideosGenlist or g_pMainViewWidget are NULL.");
+ ("[ERR] pVideosGenlist or g_pMainViewWidget are NULL.");
return;
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <Eina.h>
#define DEF_BUF_STR_LEN_MAX 4096
#define SEARCH_CHAR_LEN (VIDEO_FILE_SEARCH_CHAR_LEN_MAX*4+1)
-#define PREEDIT_START "<preedit>"
+#define PREEDIT_START "<preedit>"
#define PREEDIT_END "</preedit>"
-typedef struct
-{
+typedef struct {
void *pNaviFrameHandle;
void *pNaviFrameItem;
void *pVideosGenlist;
ListViewUpdateListItemCbFunc pChangeViewUserCbFunc;
ViewUpdateListItemCbFunc pChangeViewUpdateFunc;
-}st_VideoSearchViewHandle;
+} st_VideoSearchViewHandle;
-typedef struct
-{
+typedef struct {
//Evas_Object *pDimminglayout;
Evas_Object *pSearchViewBaselayout;
Evas_Object *pSearchBarlayout;
Evas_Object *pCancelButton;
Evas_Object *pClearButton;
Evas_Object *pNocontentsLayout;
-}st_VideoSearchViewWidget;
+} st_VideoSearchViewWidget;
st_VideoSearchViewHandle *g_pSearchViewHandle = NULL;
// Pre-define function for building.
-static void __mp_search_view_naviframe_transition_effect_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo);
-static void __mp_search_view_append_video_items(void *pVideosGenlist, bool bSearchedView);
+static void __mp_search_view_naviframe_transition_effect_cb(void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ void
+ *pEventInfo);
+static void __mp_search_view_append_video_items(void *pVideosGenlist,
+ bool bSearchedView);
static int __mp_search_view_get_sort_type(void);
-static void __mp_search_view_arrange_video_list(int nItemSortType, void *pVideosGenlist);
-static void __mp_search_view_base_layout_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void __mp_search_view_arrange_video_list(int nItemSortType,
+ void *pVideosGenlist);
+static void __mp_search_view_base_layout_del_cb(void *data, Evas * e,
+ Evas_Object * obj,
+ void *event_info);
static void __mp_search_view_pop(void *pNaviFrame);
-//static void __mp_search_view_warning_popup_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo);
static void __mp_search_view_db_changed_cb(void *pUserData);
static void __mp_search_view_reset(void);
-static void __mp_search_view_update_video_items(Evas_Object *pGenlist, int nGenItemIndex, int nPlayVideoIndex);
-
+static void __mp_search_view_update_video_items(Evas_Object * pGenlist,
+ int nGenItemIndex,
+ int nPlayVideoIndex);
-/*
-static void __MpVideoSearchViewDimmingMouseUpCb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
-{
- if (!g_pSearchViewWidget) {
- VideoLogInfo("[ERR] g_pSearchViewWidget is NULL.");
- return ;
- }
-
- VideoLogInfo("");
- if (g_pSearchViewWidget->pDimminglayout) {
- elm_object_signal_emit(g_pSearchViewWidget->pDimminglayout, SIGNAL_SEARCH_VIEW_INTERNAL_DIMMING_HIDE, "");
- }
-}
-*/
-
static void __mp_search_view_reset(void)
{
- if (g_pSearchViewHandle)
- {
- mp_util_db_set_update_fun(g_pSearchViewHandle->euLev, NULL);
- g_pSearchViewHandle->nPlayVideoIndex = -1;
- evas_object_smart_callback_del(g_pSearchViewHandle->pNaviFrameHandle, "transition,finished", __mp_search_view_naviframe_transition_effect_cb);
-
- MP_DEL_OBJ(g_pSearchViewHandle->pVideosGenlist);
+ if (g_pSearchViewHandle) {
+ mp_util_db_set_update_fun(g_pSearchViewHandle->euLev, NULL);
+ g_pSearchViewHandle->nPlayVideoIndex = -1;
+ evas_object_smart_callback_del(g_pSearchViewHandle->
+ pNaviFrameHandle,
+ "transition,finished",
+ __mp_search_view_naviframe_transition_effect_cb);
- MP_FREE_STRING(g_pSearchViewHandle->szMediaUrl);
- MP_FREE_STRING(g_pSearchViewHandle->pFolderPath);
+ MP_DEL_OBJ(g_pSearchViewHandle->pVideosGenlist);
- if (g_pSearchViewHandle->SearchedIndexList) {
- eina_list_free(g_pSearchViewHandle->SearchedIndexList);
- g_pSearchViewHandle->SearchedIndexList = NULL;
- }
- g_pSearchViewHandle->pNaviFrameHandle = NULL;
- g_pSearchViewHandle->pNaviFrameItem = NULL;
- g_pSearchViewHandle->pChangeViewUserCbFunc = NULL;
- g_pSearchViewHandle->pChangeViewUpdateFunc = NULL;
+ MP_FREE_STRING(g_pSearchViewHandle->szMediaUrl);
+ MP_FREE_STRING(g_pSearchViewHandle->pFolderPath);
- free(g_pSearchViewHandle);
- g_pSearchViewHandle = NULL;
+ if (g_pSearchViewHandle->SearchedIndexList) {
+ eina_list_free(g_pSearchViewHandle->SearchedIndexList);
+ g_pSearchViewHandle->SearchedIndexList = NULL;
}
+ g_pSearchViewHandle->pNaviFrameHandle = NULL;
+ g_pSearchViewHandle->pNaviFrameItem = NULL;
+ g_pSearchViewHandle->pChangeViewUserCbFunc = NULL;
+ g_pSearchViewHandle->pChangeViewUpdateFunc = NULL;
- if (g_pSearchViewWidget)
- {
- /*
- if (g_pSearchViewWidget->pDimminglayout)
- {
- evas_object_event_callback_del(g_pSearchViewWidget->pDimminglayout, EVAS_CALLBACK_MOUSE_UP, __MpVideoSearchViewDimmingMouseUpCb);
- evas_object_del(g_pSearchViewWidget->pDimminglayout);
- g_pSearchViewWidget->pDimminglayout = NULL;
- }
- */
+ free(g_pSearchViewHandle);
+ g_pSearchViewHandle = NULL;
+ }
- g_pSearchViewWidget->pSearchViewBaselayout = NULL;
+ if (g_pSearchViewWidget) {
- g_pSearchViewWidget->pSearchBarlayout = NULL;
+ g_pSearchViewWidget->pSearchViewBaselayout = NULL;
- g_pSearchViewWidget->pSearchBarEntry = NULL;
+ g_pSearchViewWidget->pSearchBarlayout = NULL;
- g_pSearchViewWidget->pCancelButton = NULL;
+ g_pSearchViewWidget->pSearchBarEntry = NULL;
- g_pSearchViewWidget->pNocontentsLayout = NULL;
+ g_pSearchViewWidget->pCancelButton = NULL;
+ g_pSearchViewWidget->pNocontentsLayout = NULL;
- free(g_pSearchViewWidget);
- g_pSearchViewWidget = NULL;
- }
+
+ free(g_pSearchViewWidget);
+ g_pSearchViewWidget = NULL;
+ }
}
void mp_search_view_destroy(void)
{
- if (g_pSearchViewHandle)
- {
+ if (g_pSearchViewHandle) {
mp_util_db_set_update_fun(g_pSearchViewHandle->euLev, NULL);
mp_util_db_set_backup_fun(g_pSearchViewHandle->euLev, NULL);
g_pSearchViewHandle->nPlayVideoIndex = -1;
- evas_object_smart_callback_del(g_pSearchViewHandle->pNaviFrameHandle, "transition,finished", __mp_search_view_naviframe_transition_effect_cb);
+ evas_object_smart_callback_del(g_pSearchViewHandle->
+ pNaviFrameHandle,
+ "transition,finished",
+ __mp_search_view_naviframe_transition_effect_cb);
MP_DEL_OBJ(g_pSearchViewHandle->pVideosGenlist);
MP_FREE_STRING(g_pSearchViewHandle->szMediaUrl);
g_pSearchViewHandle = NULL;
}
- if (g_pSearchViewWidget)
- {
- /*
- if (g_pSearchViewWidget->pDimminglayout)
- {
- evas_object_event_callback_del(g_pSearchViewWidget->pDimminglayout, EVAS_CALLBACK_MOUSE_UP, __MpVideoSearchViewDimmingMouseUpCb);
- evas_object_del(g_pSearchViewWidget->pDimminglayout);
- g_pSearchViewWidget->pDimminglayout = NULL;
- }
- */
+ if (g_pSearchViewWidget) {
MP_DEL_OBJ(g_pSearchViewWidget->pCancelButton);
MP_DEL_OBJ(g_pSearchViewWidget->pSearchBarEntry);
MP_DEL_OBJ(g_pSearchViewWidget->pSearchBarlayout);
MP_DEL_OBJ(g_pSearchViewWidget->pNocontentsLayout);
- if (g_pSearchViewWidget->pSearchViewBaselayout != NULL)
- {
- evas_object_event_callback_del(g_pSearchViewWidget->pSearchViewBaselayout, EVAS_CALLBACK_DEL, __mp_search_view_base_layout_del_cb);
+ if (g_pSearchViewWidget->pSearchViewBaselayout != NULL) {
+ evas_object_event_callback_del(g_pSearchViewWidget->
+ pSearchViewBaselayout,
+ EVAS_CALLBACK_DEL,
+ __mp_search_view_base_layout_del_cb);
MP_DEL_OBJ(g_pSearchViewWidget->pSearchViewBaselayout);
}
}
}
-char *mp_search_view_search_markup_keyword(char *szOriginStr, char *szSearchWord, bool *bResult)
+char *mp_search_view_search_markup_keyword(char *szOriginStr,
+ char *szSearchWord,
+ bool * bResult)
{
if (!szOriginStr) {
VideoLogError("[ERR] szOriginStr is NULL.");
return NULL;
}
- char szStr[DEF_BUF_STR_LEN + 1] = {0,};
+ char szStr[DEF_BUF_STR_LEN + 1] = { 0, };
static char szTargetStr[DEF_BUF_STR_LEN + 1] = { 0, };
int nWordLength = 0;
int nSearchLength = 0;
int nCounter = 0;
bool bFound = FALSE;
gchar *szMarkupTextStart = NULL;
- gchar *szMarkupTextEnd= NULL;
- gchar *szMarkupText= NULL;
+ gchar *szMarkupTextEnd = NULL;
+ gchar *szMarkupText = NULL;
int r = 222;
int g = 111;
int b = 31;
nWordLength = strlen(szStr);
nSearchLength = strlen(szSearchWord);
- for (nCounter = 0; nCounter < nWordLength; nCounter++)
- {
- if (!strncasecmp(szSearchWord, &szStr[nCounter], nSearchLength)) {
+ for (nCounter = 0; nCounter < nWordLength; nCounter++) {
+ if (!strncasecmp
+ (szSearchWord, &szStr[nCounter], nSearchLength)) {
bFound = TRUE;
break;
}
if (bFound) {
if (nCounter == 0) {
- szMarkupText = g_markup_escape_text(&szStr[0], nSearchLength);
- szMarkupTextEnd = g_markup_escape_text(&szStr[nSearchLength], nWordLength - nSearchLength);
+ szMarkupText =
+ g_markup_escape_text(&szStr[0], nSearchLength);
+ szMarkupTextEnd =
+ g_markup_escape_text(&szStr[nSearchLength],
+ nWordLength - nSearchLength);
if (!szMarkupText && !szMarkupTextEnd) {
- VideoLogInfo("szMarkupText and szMarkupTextEnd are NULL.");
+ VideoLogInfo
+ ("szMarkupText and szMarkupTextEnd are NULL.");
return NULL;
}
- //snprintf(szTargetStr, DEF_BUF_STR_LEN, "<match>%s</match>%s", szMarkupText, (char*)szMarkupTextEnd);
- snprintf(szTargetStr, DEF_BUF_STR_LEN, "<color=#%02x%02x%02x%02x>%s</color>%s", r, g, b, a,
- szMarkupText, (char*)szMarkupTextEnd);
+ snprintf(szTargetStr, DEF_BUF_STR_LEN,
+ "<color=#%02x%02x%02x%02x>%s</color>%s", r, g, b,
+ a, szMarkupText, (char *) szMarkupTextEnd);
if (szMarkupText) {
free(szMarkupText);
free(szMarkupTextEnd);
szMarkupTextEnd = NULL;
}
- }
- else {
- szMarkupTextStart = g_markup_escape_text(&szStr[0], nCounter);
- szMarkupText = g_markup_escape_text(&szStr[nCounter], nSearchLength);
- szMarkupTextEnd = g_markup_escape_text(&szStr[nCounter + nSearchLength], nWordLength - (nCounter + nSearchLength));
-
- if (!szMarkupTextStart && !szMarkupText && !szMarkupTextEnd) {
- VideoLogInfo("szMarkupTextStart and szMarkupText and szMarkupTextEnd are NULL.");
+ } else {
+ szMarkupTextStart =
+ g_markup_escape_text(&szStr[0], nCounter);
+ szMarkupText =
+ g_markup_escape_text(&szStr[nCounter], nSearchLength);
+ szMarkupTextEnd =
+ g_markup_escape_text(&szStr[nCounter + nSearchLength],
+ nWordLength - (nCounter +
+ nSearchLength));
+
+ if (!szMarkupTextStart && !szMarkupText
+ && !szMarkupTextEnd) {
+ VideoLogInfo
+ ("szMarkupTextStart and szMarkupText and szMarkupTextEnd are NULL.");
return NULL;
}
- //snprintf(szTargetStr, DEF_BUF_STR_LEN, "%s<match>%s</match>%s", (char*)szMarkupTextStart, szMarkupText, (char*)szMarkupTextEnd);
- snprintf(szTargetStr, DEF_BUF_STR_LEN, "%s<color=#%02x%02x%02x%02x>%s</color>%s", (char*)szMarkupTextStart,
- r, g, b, a, szMarkupText, (char*)szMarkupTextEnd);
+ snprintf(szTargetStr, DEF_BUF_STR_LEN,
+ "%s<color=#%02x%02x%02x%02x>%s</color>%s",
+ (char *) szMarkupTextStart, r, g, b, a,
+ szMarkupText, (char *) szMarkupTextEnd);
if (szMarkupText) {
free(szMarkupText);
szMarkupTextEnd = NULL;
}
}
- }
- else {
+ } else {
snprintf(szTargetStr, DEF_BUF_STR_LEN, "%s", szStr);
}
}
}
-static void __mp_search_view_trans_finished_cb(void *pUserData, Evas_Object *obj, void *event_info)
+static void __mp_search_view_trans_finished_cb(void *pUserData,
+ Evas_Object * obj,
+ void *event_info)
{
- if (!obj)
- {
+ if (!obj) {
VideoLogError("[ERR] g_pListRemoveViewHandle is NULL.");
return;
}
mp_widget_ctrl_enable_navi_handle_focus(obj);
- evas_object_smart_callback_del(obj, "transition,finished", __mp_search_view_trans_finished_cb);
+ evas_object_smart_callback_del(obj, "transition,finished",
+ __mp_search_view_trans_finished_cb);
}
-static Eina_Bool mp_search_view_back_btn_cb(void *pUserData, Elm_Object_Item *pItem)
+static Eina_Bool mp_search_view_back_btn_cb(void *pUserData,
+ Elm_Object_Item * pItem)
{
- if (!g_pSearchViewHandle)
- {
+ if (!g_pSearchViewHandle) {
VideoLogInfo("[ERR] g_pListRemoveViewHandle is NULL.");
return EINA_TRUE;
}
-
// Register transition finished callback.
- mp_widget_ctrl_disable_navi_handle_focus_except_item(g_pSearchViewHandle->pNaviFrameHandle, g_pSearchViewHandle->pNaviFrameItem);
- evas_object_smart_callback_add(g_pSearchViewHandle->pNaviFrameHandle, "transition,finished", __mp_search_view_trans_finished_cb, (void *)g_pSearchViewHandle->pNaviFrameHandle);
+ mp_widget_ctrl_disable_navi_handle_focus_except_item
+ (g_pSearchViewHandle->pNaviFrameHandle,
+ g_pSearchViewHandle->pNaviFrameItem);
+ evas_object_smart_callback_add(g_pSearchViewHandle->pNaviFrameHandle,
+ "transition,finished",
+ __mp_search_view_trans_finished_cb,
+ (void *) g_pSearchViewHandle->
+ pNaviFrameHandle);
__mp_search_view_pop(g_pSearchViewHandle->pNaviFrameHandle);
////////////////////////////////////////////////
// Genlist callback
-void __mp_search_view_naviframe_transition_effect_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+void __mp_search_view_naviframe_transition_effect_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
- if (!g_pSearchViewHandle)
- {
+ if (!g_pSearchViewHandle) {
VideoLogError("[ERR] No exist g_pSearchViewHandle.");
return;
}
VideoLogInfo("");
- //Evas_Object *pTmpContents = NULL;
- //Elm_Object_Item *pTmpItem = NULL;
-
- if (!g_pSearchViewHandle->pNaviFrameHandle)
- {
+ if (!g_pSearchViewHandle->pNaviFrameHandle) {
VideoLogInfo("[ERR] No exist naviframe handle.");
return;
}
- //pTmpItem = elm_naviframe_top_item_get(g_pSearchViewHandle->pNaviFrameHandle);
- //pTmpContents = elm_object_item_content_get(pTmpItem);
-
elm_object_focus_set(g_pSearchViewWidget->pSearchBarEntry, EINA_TRUE);
}
// Genlist item callback.
-/*
-static void __mp_search_view_warning_popup_cb(void *pUserData,
- Evas_Object *pObject, void *pEventInfo)
-{
-
- VideoLogInfo("");
- mp_util_delete_popup_handle();
-}
-*/
-static void __mp_search_view_select_video_item_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_search_view_select_video_item_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
- if (!g_pSearchViewHandle)
- {
+ if (!g_pSearchViewHandle) {
VideoLogError("g_pSearchViewHandle is not exist.");
return;
}
int nVideoItemIndex = 0;
- Elm_Object_Item *pItem = (Elm_Object_Item *)pEventInfo;
- Elm_Object_Item *pSelectedItem = elm_genlist_selected_item_get(pObject);
+ Elm_Object_Item *pItem = (Elm_Object_Item *) pEventInfo;
+ Elm_Object_Item *pSelectedItem =
+ elm_genlist_selected_item_get(pObject);
- if (pItem)
- {
- nVideoItemIndex = (int)elm_object_item_data_get(pItem);
- }
- else
- {
+ if (pItem) {
+ nVideoItemIndex = (int) elm_object_item_data_get(pItem);
+ } else {
- if (pSelectedItem)
- {
+ if (pSelectedItem) {
elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
}
VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
- if (!pSelectedItem)
- {
+ if (!pSelectedItem) {
VideoLogError("pSelectedItem is NULL");
return;
}
elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
- Evas_Object *pPopup = evas_object_data_get(pObject, "popup"); // Get popup
- if (pPopup)
- {
+ Evas_Object *pPopup = evas_object_data_get(pObject, "popup"); // Get popup
+ if (pPopup) {
VideoLogError("long press is called");
- return; // If popup exists, do nothing
+ return; // If popup exists, do nothing
}
- if (!mp_launch_video_allow_check())
- {
+ if (!mp_launch_video_allow_check()) {
return;
}
- if (nVideoItemIndex < 0)
- {
+ if (nVideoItemIndex < 0) {
VideoLogWarning("nVideoItemIndex < 0 ===>>> RETURN");
return;
}
- if (!mp_util_call_off())
- {
- mp_util_ticker_toast_popup(VIDEOS_NOTIPOP_MSG_UNABLE_TO_PLAY_VIDEO_DURING_CALL, false, false);
+ if (!mp_util_call_off()) {
+ mp_util_ticker_toast_popup
+ (VIDEOS_NOTIPOP_MSG_UNABLE_TO_PLAY_VIDEO_DURING_CALL, false,
+ false);
return;
}
g_pSearchViewHandle->nPlayVideoIndex = nVideoItemIndex;
- if (g_pSearchViewHandle->szMediaUrl)
- {
+ if (g_pSearchViewHandle->szMediaUrl) {
free(g_pSearchViewHandle->szMediaUrl);
g_pSearchViewHandle->szMediaUrl = NULL;
}
- g_pSearchViewHandle->szMediaUrl = mp_util_svc_get_video_url(nVideoItemIndex);
+ g_pSearchViewHandle->szMediaUrl =
+ mp_util_svc_get_video_url(nVideoItemIndex);
- if (g_pSearchViewHandle->szMediaUrl)
- {
- elm_object_focus_allow_set(g_pSearchViewWidget->pSearchBarlayout, EINA_FALSE);
- elm_object_focus_allow_set(g_pSearchViewWidget->pSearchBarEntry, EINA_FALSE);
+ if (g_pSearchViewHandle->szMediaUrl) {
+ elm_object_focus_allow_set(g_pSearchViewWidget->pSearchBarlayout,
+ EINA_FALSE);
+ elm_object_focus_allow_set(g_pSearchViewWidget->pSearchBarEntry,
+ EINA_FALSE);
elm_object_focus_set(pObject, EINA_TRUE);
- mp_launch_video_play(g_pSearchViewHandle->szMediaUrl, MP_PLAYER_TYPE_VIDEO, NULL);
+ mp_launch_video_play(g_pSearchViewHandle->szMediaUrl,
+ MP_PLAYER_TYPE_VIDEO, NULL);
free(g_pSearchViewHandle->szMediaUrl);
g_pSearchViewHandle->szMediaUrl = NULL;
- }
- else
- {
+ } else {
VideoLogError("[Err] Fail to get video uri from media service.");
}
}
char *mp_search_view_get_duration_time(int nVideoItemIndex)
{
- char szTmpStr[DEF_BUF_STR_LEN_MAX] = {0, };
- char szTmpStrDurationTime[DEF_BUF_STR_LEN_MAX] = {0, };
- char szTmpStrLastPlayedPos[DEF_BUF_STR_LEN_MAX] = {0, };
+ char szTmpStr[DEF_BUF_STR_LEN_MAX] = { 0, };
+ char szTmpStrDurationTime[DEF_BUF_STR_LEN_MAX] = { 0, };
+ char szTmpStrLastPlayedPos[DEF_BUF_STR_LEN_MAX] = { 0, };
- unsigned int nVideoInfoDuration = mp_util_svc_get_video_duration_time(nVideoItemIndex);
- unsigned int nVideoInfoLastTime = mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
+ unsigned int nVideoInfoDuration =
+ mp_util_svc_get_video_duration_time(nVideoItemIndex);
+ unsigned int nVideoInfoLastTime =
+ mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
mp_util_convert_time(nVideoInfoDuration, szTmpStrDurationTime, FALSE);
mp_util_convert_time(nVideoInfoLastTime, szTmpStrLastPlayedPos, TRUE);
- snprintf(szTmpStr, DEF_BUF_STR_LEN_MAX, "%s/%s", szTmpStrLastPlayedPos, szTmpStrDurationTime);
+ snprintf(szTmpStr, DEF_BUF_STR_LEN_MAX, "%s/%s", szTmpStrLastPlayedPos,
+ szTmpStrDurationTime);
return strdup(szTmpStr);
}
-char *mp_search_view_get_label_of_video_item_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+char *mp_search_view_get_label_of_video_item_cb(const void *pUserData,
+ Evas_Object * pObject,
+ const char *pPart)
{
- int nVideoItemIndex = (int)pUserData;
+ int nVideoItemIndex = (int) pUserData;
- if (!strcmp(pPart, "elm.text"))
- {
+ if (!strcmp(pPart, "elm.text")) {
char *szTitle = NULL;
char *szTitleUtf8 = NULL;
char *szTitleWithSearchWordColor = NULL;
szTitle = mp_util_svc_get_video_title(nVideoItemIndex);
- if (strlen(g_pSearchViewHandle->szSearchWord) > 0)
- {
- szTitleWithSearchWordColor = mp_search_view_search_markup_keyword(szTitle, (char*)g_pSearchViewHandle->szSearchWord, &bResult);
- if (bResult)
- {
- if (szTitle)
- {
+ if (strlen(g_pSearchViewHandle->szSearchWord) > 0) {
+ szTitleWithSearchWordColor =
+ mp_search_view_search_markup_keyword(szTitle,
+ (char *)
+ g_pSearchViewHandle->
+ szSearchWord,
+ &bResult);
+ if (bResult) {
+ if (szTitle) {
free(szTitle);
szTitle = NULL;
}
if (szTitleWithSearchWordColor) {
- VideoLogInfo("szTitleWithSearchWordColor : %s", szTitleWithSearchWordColor);
- return strdup(szTitleWithSearchWordColor);
+ VideoLogInfo("szTitleWithSearchWordColor : %s",
+ szTitleWithSearchWordColor);
+ return strdup(szTitleWithSearchWordColor);
} else {
return NULL;
}
}
szTitleUtf8 = elm_entry_utf8_to_markup(szTitle);
- if (szTitle)
- {
+ if (szTitle) {
free(szTitle);
szTitle = NULL;
}
return szTitleUtf8;
- }
- else if (!strcmp(pPart, "elm.text.sub"))
- {
+ } else if (!strcmp(pPart, "elm.text.sub")) {
return mp_util_svc_get_duration_str_time(nVideoItemIndex);
}
-/*
-// else if (!strcmp(pPart, "elm.text.3"))
- else if (!strcmp(pPart, "elm.text.sub.right.bottom"))
- {
- unsigned long long nFilesize = 0;
-
- nFilesize = mp_util_svc_get_video_item_size(nVideoItemIndex);
- char *szFileSize = mp_util_get_file_size(nFilesize);
- char *szTitleUtf8 = NULL;
- if (szFileSize)
- {
- szTitleUtf8 = elm_entry_utf8_to_markup(szFileSize);
- free(szFileSize);
- szFileSize = NULL;
- }
-
- return szTitleUtf8;
- }
-*/ else
- {
- }
return NULL;
}
-Evas_Object *mp_search_view_get_icon_of_video_item_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+Evas_Object *mp_search_view_get_icon_of_video_item_cb(const void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char *pPart)
{
- if (!strcmp(pPart, "elm.swallow.icon"))
- {
+ if (!strcmp(pPart, "elm.swallow.icon")) {
VideoLogError("pPart: elm.icon.1 - thumbnail");
- int nVideoItemIndex = (int)pUserData;
+ int nVideoItemIndex = (int) pUserData;
Evas_Object *pLayout = elm_layout_add(pObject);
- char *pThumbIconUri = mp_util_svc_get_video_thumbnail(nVideoItemIndex);
+ char *pThumbIconUri =
+ mp_util_svc_get_video_thumbnail(nVideoItemIndex);
Evas_Object *pBg = NULL;
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_CUSTOM_THEME);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_CUSTOM_THEME);
free(path);
pLayout = elm_layout_add(pObject);
- elm_layout_file_set(pLayout, edj_path, "listview.thumbnail.layout");
+ elm_layout_file_set(pLayout, edj_path,
+ "listview.thumbnail.layout");
- if (!pThumbIconUri || !vp_file_exists(pThumbIconUri))
- {
+ if (!pThumbIconUri || !vp_file_exists(pThumbIconUri)) {
MP_FREE_STRING(pThumbIconUri);
}
- pBg = mp_util_create_preload_image(pLayout, pThumbIconUri, VIDEO_ICON_WIDTH);
+ pBg =
+ mp_util_create_preload_image(pLayout, pThumbIconUri,
+ VIDEO_ICON_WIDTH);
if (!elm_layout_content_set(pLayout, "elm.thumbnail.icon", pBg))
VideoLogError("elm_layout_content_set() is failed.");
MP_FREE_STRING(pThumbIconUri);
- int nLastPlayedTime = mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
- int nDurationTime = mp_util_svc_get_video_duration_time(nVideoItemIndex);
+ int nLastPlayedTime =
+ mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
+ int nDurationTime =
+ mp_util_svc_get_video_duration_time(nVideoItemIndex);
- if (nLastPlayedTime > 0)
- {
+ if (nLastPlayedTime > 0) {
double nRatio = 0.0;
if (nDurationTime > 0) {
- nRatio = ((double)nLastPlayedTime) /
- ((double)nDurationTime);
+ nRatio = ((double) nLastPlayedTime) /
+ ((double) nDurationTime);
}
if (nRatio < 0.05) {
Evas_Object *pProgressBar = elm_progressbar_add(pObject);
elm_object_style_set(pProgressBar, "video/list_progress");
elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
- evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(pProgressBar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pProgressBar,
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
elm_progressbar_value_set(pProgressBar, nRatio);
- if (!elm_layout_content_set(pLayout, "elm.progressbar.icon", pProgressBar))
+ if (!elm_layout_content_set
+ (pLayout, "elm.progressbar.icon", pProgressBar))
VideoLogError("elm_layout_content_set() is failed.");
- if (pProgressBar) {
+ if (pProgressBar) {
evas_object_show(pProgressBar);
}
}
- if (!mp_util_create_video_sub_icon(pLayout, nVideoItemIndex)) {
- VideoLogWarning("Local File or Create sub icon is failed.", nVideoItemIndex);
+ if (!mp_util_create_video_sub_icon(pLayout, nVideoItemIndex)) {
+ VideoLogWarning("Local File or Create sub icon is failed.",
+ nVideoItemIndex);
}
- if (pLayout) {
+ if (pLayout) {
evas_object_show(pLayout);
}
return NULL;
}
+
//
////////////////////////////////////////////////
{
VideoLogInfo("");
- if (g_pSearchViewWidget->pNocontentsLayout)
- {
+ if (g_pSearchViewWidget->pNocontentsLayout) {
mp_util_virtual_keypad_disabled_set(EINA_TRUE);
evas_object_del(g_pSearchViewWidget->pNocontentsLayout);
g_pSearchViewWidget->pNocontentsLayout = NULL;
}
mp_util_virtual_keypad_disabled_set(EINA_FALSE);
- g_pSearchViewWidget->pNocontentsLayout = mp_create_nocontent_layout(pParent, VIDEOS_SEARCHVIEW_MSG_NO_SEARCH_RESULTS, NULL);
+ g_pSearchViewWidget->pNocontentsLayout =
+ mp_create_nocontent_layout(pParent,
+ VIDEOS_SEARCHVIEW_MSG_NO_SEARCH_RESULTS,
+ NULL);
evas_object_show(g_pSearchViewWidget->pNocontentsLayout);
static void __mp_search_view_is_existed_no_content_layout(void)
{
- if (!g_pSearchViewWidget)
- {
+ if (!g_pSearchViewWidget) {
VideoLogError("g_pSearchViewWidget == NULL");
return;
}
VideoLogInfo("");
- if (g_pSearchViewWidget->pNocontentsLayout)
- {
- elm_object_part_content_unset(g_pSearchViewWidget->pSearchViewBaselayout, "elm.swallow.content");
+ if (g_pSearchViewWidget->pNocontentsLayout) {
+ elm_object_part_content_unset(g_pSearchViewWidget->
+ pSearchViewBaselayout,
+ "elm.swallow.content");
__mp_search_view_del_no_contents_layout();
- //mp_util_virtual_keypad_disabled_set(EINA_FALSE);
- elm_object_part_content_set(g_pSearchViewWidget->pSearchViewBaselayout, "elm.swallow.content", g_pSearchViewHandle->pVideosGenlist);
- //elm_object_part_content_set(g_pSearchViewWidget->pSearchViewBaselayout, "elm.swallow.content", g_pSearchViewWidget->pDimminglayout);
- //evas_object_show(g_pSearchViewWidget->pDimminglayout);
+ elm_object_part_content_set(g_pSearchViewWidget->
+ pSearchViewBaselayout,
+ "elm.swallow.content",
+ g_pSearchViewHandle->pVideosGenlist);
if (g_pSearchViewHandle->pVideosGenlist)
evas_object_show(g_pSearchViewHandle->pVideosGenlist);
}
static void __mp_search_view_is_existed_genlist(void)
{
- if (!g_pSearchViewWidget)
- {
+ if (!g_pSearchViewWidget) {
VideoLogError("g_pSearchViewWidget == NULL");
return;
}
- if (!g_pSearchViewWidget->pNocontentsLayout)
- {
- elm_object_part_content_unset(g_pSearchViewWidget->pSearchViewBaselayout, "elm.swallow.content");
- //evas_object_hide(g_pSearchViewWidget->pDimminglayout);
+ if (!g_pSearchViewWidget->pNocontentsLayout) {
+ elm_object_part_content_unset(g_pSearchViewWidget->
+ pSearchViewBaselayout,
+ "elm.swallow.content");
if (g_pSearchViewHandle->pVideosGenlist)
evas_object_hide(g_pSearchViewHandle->pVideosGenlist);
- }
- else
- {
- VideoLogError("g_pSearchViewWidget->pNocontentsLayout is existed.");
+ } else {
+ VideoLogError
+ ("g_pSearchViewWidget->pNocontentsLayout is existed.");
}
}
void mp_search_view_search_genlist_item(const char *szSearchWord)
{
- if (!g_pSearchViewHandle)
- {
+ if (!g_pSearchViewHandle) {
VideoLogError("g_pSearchViewHandle == NULL");
return;
}
- if (!szSearchWord)
- {
+ if (!szSearchWord) {
VideoLogError("szSearchWord == NULL");
return;
}
VideoLogInfo("");
- //int nVideoListSize = 0;
-
- //mp_util_svc_destory_video_list();
- //mp_util_svc_extract_video_list_for_search_view(szSearchWord, g_pSearchViewHandle->nViewType);
- //nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
- //VideoLogInfo("nVideoListSize : %d", nVideoListSize);
-
if (g_pSearchViewHandle->SearchedIndexList) {
eina_list_free(g_pSearchViewHandle->SearchedIndexList);
g_pSearchViewHandle->SearchedIndexList = NULL;
}
- mp_util_svc_index_list_for_search_view(szSearchWord, (void **)&g_pSearchViewHandle->SearchedIndexList);
+ mp_util_svc_index_list_for_search_view(szSearchWord,
+ (void **) &g_pSearchViewHandle->
+ SearchedIndexList);
- if (g_pSearchViewHandle->SearchedIndexList)
- {
- memset(g_pSearchViewHandle->szSearchWord, 0, sizeof(char) * SEARCH_CHAR_LEN);
- strncpy(g_pSearchViewHandle->szSearchWord, szSearchWord, SEARCH_CHAR_LEN - 1);
+ if (g_pSearchViewHandle->SearchedIndexList) {
+ memset(g_pSearchViewHandle->szSearchWord, 0,
+ sizeof(char) * SEARCH_CHAR_LEN);
+ strncpy(g_pSearchViewHandle->szSearchWord, szSearchWord,
+ SEARCH_CHAR_LEN - 1);
__mp_search_view_is_existed_no_content_layout();
elm_genlist_clear(g_pSearchViewHandle->pVideosGenlist);
- __mp_search_view_append_video_items(g_pSearchViewHandle->pVideosGenlist, true);
- //elm_object_signal_emit(g_pSearchViewWidget->pDimminglayout, SIGNAL_SEARCH_VIEW_INTERNAL_DIMMING_HIDE, "");
- }
- else
- {
+ __mp_search_view_append_video_items(g_pSearchViewHandle->
+ pVideosGenlist, true);
+ } else {
__mp_search_view_is_existed_genlist();
- void *pNoContentLayout = __mp_search_view_add_no_contents_layout(g_pSearchViewWidget->pSearchViewBaselayout);
- elm_object_part_content_set(g_pSearchViewWidget->pSearchViewBaselayout, "elm.swallow.content", pNoContentLayout);
+ void *pNoContentLayout =
+ __mp_search_view_add_no_contents_layout(g_pSearchViewWidget->
+ pSearchViewBaselayout);
+ elm_object_part_content_set(g_pSearchViewWidget->
+ pSearchViewBaselayout,
+ "elm.swallow.content",
+ pNoContentLayout);
}
}
static char *mp_search_view_get_fact_str(const char *str)
{
- if (!str)
- {
+ if (!str) {
VideoLogWarning("str == NULL");
return NULL;
}
- int nLen = strlen(str);
- if (nLen >= SEARCH_CHAR_LEN -1)
- {
+ int nLen = strlen(str);
+ if (nLen >= SEARCH_CHAR_LEN - 1) {
VideoLogError("str length is too large : [%d]", nLen);
return NULL;
}
- char des_str[SEARCH_CHAR_LEN] = {0,};
- char *temp_str = strstr(str, PREEDIT_START);
- char *pTempStr2 = strstr(str, PREEDIT_END);
+ char des_str[SEARCH_CHAR_LEN] = { 0, };
+ char *temp_str = strstr(str, PREEDIT_START);
+ char *pTempStr2 = strstr(str, PREEDIT_END);
- if (temp_str != NULL && pTempStr2 != NULL)
- {
- if (str != temp_str)
- {
+ if (temp_str != NULL && pTempStr2 != NULL) {
+ if (str != temp_str) {
strncpy(des_str, str, temp_str - str);
}
- if (strlen(des_str) != 0)
- {
- strncat(des_str, temp_str + strlen(PREEDIT_START), pTempStr2 - temp_str - strlen(PREEDIT_START));
- }
- else
- {
- strncpy(des_str, temp_str + strlen(PREEDIT_START), pTempStr2 - temp_str - strlen(PREEDIT_START));
+ if (strlen(des_str) != 0) {
+ strncat(des_str, temp_str + strlen(PREEDIT_START),
+ pTempStr2 - temp_str - strlen(PREEDIT_START));
+ } else {
+ strncpy(des_str, temp_str + strlen(PREEDIT_START),
+ pTempStr2 - temp_str - strlen(PREEDIT_START));
}
- }
- else
- {
- strncpy(des_str, str, SEARCH_CHAR_LEN -1);
+ } else {
+ strncpy(des_str, str, SEARCH_CHAR_LEN - 1);
}
VideoSecureLogInfo("get string = %s:%s", des_str, str);
return strdup(des_str);
}
bool bLandscape = mp_rotate_ctrl_check_landspace();
- const char *temp = elm_object_text_get(g_pSearchViewWidget->pSearchBarEntry);
+ const char *temp =
+ elm_object_text_get(g_pSearchViewWidget->pSearchBarEntry);
char *TempUtf8 = elm_entry_markup_to_utf8(temp);
char *szChangedStr = mp_search_view_get_fact_str(TempUtf8);
if (bLandscape) {
- elm_object_signal_emit(g_pSearchViewWidget->pSearchBarlayout, "elm,state,show,landscape", "elm");
+ elm_object_signal_emit(g_pSearchViewWidget->pSearchBarlayout,
+ "elm,state,show,landscape", "elm");
if (szChangedStr != NULL && strlen(szChangedStr) > 0) {
- elm_object_signal_emit(g_pSearchViewWidget->pSearchBarlayout, "elm,state,show,clear_button,landscape", "elm");
+ elm_object_signal_emit(g_pSearchViewWidget->pSearchBarlayout,
+ "elm,state,show,clear_button,landscape",
+ "elm");
}
} else {
- elm_object_signal_emit(g_pSearchViewWidget->pSearchBarlayout, "elm,state,show,portrait", "elm");
+ elm_object_signal_emit(g_pSearchViewWidget->pSearchBarlayout,
+ "elm,state,show,portrait", "elm");
if (szChangedStr != NULL && strlen(szChangedStr) > 0) {
- elm_object_signal_emit(g_pSearchViewWidget->pSearchBarlayout, "elm,state,show,clear_button,portrait", "elm");
+ elm_object_signal_emit(g_pSearchViewWidget->pSearchBarlayout,
+ "elm,state,show,clear_button,portrait",
+ "elm");
}
}
MP_FREE_STRING(TempUtf8);
}
-static void __mp_search_view_genlist_scroll_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_search_view_genlist_scroll_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
elm_object_focus_set(g_pSearchViewWidget->pSearchBarEntry, EINA_FALSE);
}
-static void __mp_search_view_entry_changed_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_search_view_entry_changed_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
char *szChangedStr = NULL;
-// if (elm_object_focus_get(pUserData)) {
- if (elm_entry_is_empty(pObject)) {
- elm_object_signal_emit(pUserData, "elm,state,eraser,hide", "elm");
- elm_object_disabled_set(g_pSearchViewWidget->pClearButton, EINA_TRUE);
- elm_object_style_set(g_pSearchViewWidget->pClearButton, "clear_dim");
- } else {
- elm_object_signal_emit(pUserData, "elm,state,eraser,show", "elm");
- elm_object_disabled_set(g_pSearchViewWidget->pClearButton, EINA_FALSE);
- elm_object_style_set(g_pSearchViewWidget->pClearButton, "clear");
- }
-// }
+ if (elm_entry_is_empty(pObject)) {
+ elm_object_signal_emit(pUserData, "elm,state,eraser,hide", "elm");
+ elm_object_disabled_set(g_pSearchViewWidget->pClearButton,
+ EINA_TRUE);
+ elm_object_style_set(g_pSearchViewWidget->pClearButton,
+ "clear_dim");
+ } else {
+ elm_object_signal_emit(pUserData, "elm,state,eraser,show", "elm");
+ elm_object_disabled_set(g_pSearchViewWidget->pClearButton,
+ EINA_FALSE);
+ elm_object_style_set(g_pSearchViewWidget->pClearButton, "clear");
+ }
if (!elm_entry_is_empty(pObject)) {
- elm_object_signal_emit(pUserData, "elm,state,guidetext,hide", "elm");
+ elm_object_signal_emit(pUserData, "elm,state,guidetext,hide",
+ "elm");
}
if (mp_util_svc_get_number_of_video_item_by_type() < 1) {
VideoLogWarning("There don't have any videos.");
__mp_search_view_is_existed_genlist();
- void *pNoContentLayout = __mp_search_view_add_no_contents_layout(g_pSearchViewWidget->pSearchViewBaselayout);
- elm_object_part_content_set(g_pSearchViewWidget->pSearchViewBaselayout, "elm.swallow.content", pNoContentLayout);
+ void *pNoContentLayout =
+ __mp_search_view_add_no_contents_layout(g_pSearchViewWidget->
+ pSearchViewBaselayout);
+ elm_object_part_content_set(g_pSearchViewWidget->
+ pSearchViewBaselayout,
+ "elm.swallow.content",
+ pNoContentLayout);
return;
}
VideoSecureLogInfo("Changed word in entry widget : %s", szChangedStr);
if (szChangedStr != NULL && strlen(szChangedStr) > 0) {
- elm_object_part_content_set(g_pSearchViewWidget->pSearchBarlayout, "searchbar_clear_btn", g_pSearchViewWidget->pClearButton);
+ elm_object_part_content_set(g_pSearchViewWidget->pSearchBarlayout,
+ "searchbar_clear_btn",
+ g_pSearchViewWidget->pClearButton);
mp_search_view_check_landscape();
mp_search_view_search_genlist_item(szChangedStr);
} else {
- elm_object_part_content_unset(g_pSearchViewWidget->pSearchBarlayout, "searchbar_clear_btn");
+ elm_object_part_content_unset(g_pSearchViewWidget->
+ pSearchBarlayout,
+ "searchbar_clear_btn");
evas_object_hide(g_pSearchViewWidget->pClearButton);
- memset(g_pSearchViewHandle->szSearchWord, 0, sizeof(char) * SEARCH_CHAR_LEN);
- //strncpy(g_pSearchViewHandle->szSearchWord, szChangedStr, SEARCH_CHAR_LEN - 1);
+ memset(g_pSearchViewHandle->szSearchWord, 0,
+ sizeof(char) * SEARCH_CHAR_LEN);
__mp_search_view_is_existed_no_content_layout();
- __mp_search_view_arrange_video_list(__mp_search_view_get_sort_type(), g_pSearchViewHandle->pVideosGenlist);
- //elm_object_signal_emit(g_pSearchViewWidget->pDimminglayout, SIGNAL_SEARCH_VIEW_INTERNAL_DIMMING_SHOW, "");
+ __mp_search_view_arrange_video_list(__mp_search_view_get_sort_type
+ (),
+ g_pSearchViewHandle->
+ pVideosGenlist);
}
MP_FREE_STRING(szChangedStr);
}
-static void __mp_search_view_focused_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_search_view_focused_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
- if (!pUserData || !g_pSearchViewWidget || !g_pSearchViewHandle)
- {
+ if (!pUserData || !g_pSearchViewWidget || !g_pSearchViewHandle) {
VideoLogError("[ERR]No have pUserData");
return;
}
- if (elm_entry_is_empty(pObject))
- {
+ if (elm_entry_is_empty(pObject)) {
elm_object_signal_emit(pUserData, "elm,state,eraser,hide", "elm");
- }
- else
- {
+ } else {
elm_object_signal_emit(pUserData, "elm,state,eraser,show", "elm");
}
elm_object_signal_emit(pUserData, "elm,state,guidetext,hide", "elm");
elm_object_signal_emit(pUserData, "cancel,in", "");
- elm_object_focus_allow_set(pObject,EINA_TRUE);
+ elm_object_focus_allow_set(pObject, EINA_TRUE);
}
-static void __mp_search_view_unfocused_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_search_view_unfocused_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
- if (!pUserData || !g_pSearchViewWidget || !g_pSearchViewHandle)
- {
+ if (!pUserData || !g_pSearchViewWidget || !g_pSearchViewHandle) {
VideoLogError("[ERR]No have pUserData");
return;
}
- if (elm_entry_is_empty(pObject))
- {
- elm_object_signal_emit(pUserData, "elm,state,guidetext,show", "elm");
+ if (elm_entry_is_empty(pObject)) {
+ elm_object_signal_emit(pUserData, "elm,state,guidetext,show",
+ "elm");
}
elm_object_signal_emit(pUserData, "elm,state,eraser,hide", "elm");
- //elm_object_focus_allow_set(pObject, EINA_FALSE);
}
-static void __mp_search_view_activated_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_search_view_activated_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
- if (!pObject)
- {
+ if (!pObject) {
VideoLogError("[ERR]No have pObject");
return;
}
elm_object_focus_set(pObject, FALSE);
}
-static void __mp_search_view_entry_max_len_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_search_view_entry_max_len_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
- mp_util_ticker_toast_popup(VIDEOS_NOTIPOP_MSG_MAX_NUM_OF_CHARACTERS, false, false);
- //mp_util_info_popup(VIDEOS_NOTIPOP_MSG_MAX_NUM_OF_CHARACTERS, ___MpVideoSearchViewPopUpBackCb, pUserData, VIDEOS_STRING);
+ mp_util_ticker_toast_popup(VIDEOS_NOTIPOP_MSG_MAX_NUM_OF_CHARACTERS,
+ false, false);
}
-static void __mp_search_view_eraser_clicked_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_search_view_eraser_clicked_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
- if (!pUserData)
- {
+ if (!pUserData) {
VideoLogError("error userdata");
return;
}
- elm_object_part_content_unset(g_pSearchViewWidget->pSearchBarlayout, "searchbar_clear_btn");
+ elm_object_part_content_unset(g_pSearchViewWidget->pSearchBarlayout,
+ "searchbar_clear_btn");
evas_object_hide(g_pSearchViewWidget->pClearButton);
- Evas_Object *pEntry = (Evas_Object *)pUserData;
+ Evas_Object *pEntry = (Evas_Object *) pUserData;
elm_entry_entry_set(pEntry, "");
- elm_object_focus_allow_set(pObject,EINA_TRUE);
+ elm_object_focus_allow_set(pObject, EINA_TRUE);
elm_object_focus_set(pObject, EINA_TRUE);
}
-static void __mp_search_view_bg_clicked_cb(void *pUserData, Evas_Object *pObject, const char *emission, const char *source)
+static void __mp_search_view_bg_clicked_cb(void *pUserData,
+ Evas_Object * pObject,
+ const char *emission,
+ const char *source)
{
VideoLogInfo("");
- if (!pUserData)
- {
+ if (!pUserData) {
VideoLogError("error userdata");
return;
}
- //elm_object_focus_set(pUserData, EINA_TRUE);
elm_object_tree_focus_allow_set(pUserData, EINA_TRUE);
}
-/*void mp_search_view_search_cancel_btn_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
-{
- VideoLogInfo("");
-
- if (!g_pSearchViewHandle)
- {
- VideoLogError("g_pSearchViewHandle is not exist.");
- return;
- }
-
- elm_naviframe_item_pop(g_pSearchViewHandle->pNaviFrameHandle);
-}*/
-
-static void __mp_search_view_search_symbol_clicked_cb(void *pUserData, Evas_Object *pObject, const char *emission, const char *source)
+static void __mp_search_view_search_symbol_clicked_cb(void *pUserData,
+ Evas_Object *
+ pObject,
+ const char *emission,
+ const char *source)
{
VideoLogInfo("");
- if (!pUserData)
- {
+ if (!pUserData) {
VideoLogError("error userdata");
return;
}
elm_object_focus_set(pUserData, EINA_TRUE);
}
+
//
////////////////////////////////////////////////
int nSortType = MP_MEDIA_SORT_BY_RECENTLY_VIEWED;
- switch (mp_sort_ctrl_get_sort_state())
- {
- /*case MP_LIST_SORT_BY_RECENTLY_VIEWED:
- nSortType = MP_MEDIA_SORT_BY_RECENTLY_VIEWED;
- break;*/
-
+ switch (mp_sort_ctrl_get_sort_state()) {
case MP_LIST_SORT_BY_RECENTLY_ADDED:
nSortType = MP_MEDIA_SORT_BY_RECENTLY_ADDED;
break;
case MP_LIST_SORT_BY_NAME:
nSortType = MP_MEDIA_SORT_BY_NAME;
break;
-
- /*case MP_LIST_SORT_BY_SIZE:
- nSortType = MP_MEDIA_SORT_BY_SIZE;
- break;
-
- case MP_LIST_SORT_BY_TYPE:
- nSortType = MP_MEDIA_SORT_BY_TYPE;
- break;*/
}
return nSortType;
}
-void __mp_search_view_append_video_items(void *pVideosGenlist, bool bSearchedView)
+void __mp_search_view_append_video_items(void *pVideosGenlist,
+ bool bSearchedView)
{
VideoLogInfo("");
- if (!pVideosGenlist)
- {
+ if (!pVideosGenlist) {
VideoLogInfo("No exist genlist object.");
return;
}
int nIndex = 0;
int nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
-// VideoSearch_Itc.item_style = "video/search_list";
VideoSearch_Itc.item_style = "type1";
- VideoSearch_Itc.func.text_get = (void*)mp_search_view_get_label_of_video_item_cb;
- VideoSearch_Itc.func.content_get = (void*)mp_search_view_get_icon_of_video_item_cb;
+ VideoSearch_Itc.func.text_get =
+ (void *) mp_search_view_get_label_of_video_item_cb;
+ VideoSearch_Itc.func.content_get =
+ (void *) mp_search_view_get_icon_of_video_item_cb;
VideoSearch_Itc.func.state_get = NULL;
VideoSearch_Itc.func.del = NULL;
if (bSearchedView) {
Eina_List *pIterateList = NULL;
- void *nTempIndex = (void *)0;
- EINA_LIST_FOREACH(g_pSearchViewHandle->SearchedIndexList, pIterateList, nTempIndex)
- {
- nIndex = (int)nTempIndex;
+ void *nTempIndex = (void *) 0;
+ EINA_LIST_FOREACH(g_pSearchViewHandle->SearchedIndexList,
+ pIterateList, nTempIndex) {
+ nIndex = (int) nTempIndex;
VideoLogInfo("searched nIndex : %d", nIndex);
- elm_genlist_item_append(pVideosGenlist, &VideoSearch_Itc, (void*)nIndex,
- NULL, ELM_GENLIST_ITEM_NONE, __mp_search_view_select_video_item_cb, NULL);
+ elm_genlist_item_append(pVideosGenlist, &VideoSearch_Itc,
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __mp_search_view_select_video_item_cb,
+ NULL);
}
} else {
- for (nIndex = 0; nIndex < nVideoListSize; nIndex++)
- {
+ for (nIndex = 0; nIndex < nVideoListSize; nIndex++) {
VideoLogInfo("nIndex : %d", nIndex);
- elm_genlist_item_append(pVideosGenlist, &VideoSearch_Itc, (void*)nIndex,
- NULL, ELM_GENLIST_ITEM_NONE, __mp_search_view_select_video_item_cb, NULL);
+ elm_genlist_item_append(pVideosGenlist, &VideoSearch_Itc,
+ (void *) nIndex, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __mp_search_view_select_video_item_cb,
+ NULL);
}
}
}
-void __mp_search_view_arrange_video_list(int nItemSortType, void *pVideosGenlist)
+void __mp_search_view_arrange_video_list(int nItemSortType,
+ void *pVideosGenlist)
{
VideoLogInfo("");
- if (!pVideosGenlist)
- {
+ if (!pVideosGenlist) {
VideoLogInfo("No exist genlist object.");
return;
}
- if (!g_pSearchViewHandle || !g_pSearchViewWidget)
- {
+ if (!g_pSearchViewHandle || !g_pSearchViewWidget) {
VideoLogInfo("Handles are not existed about search view.");
return;
}
VideoLogInfo("");
int nVideoListSize = 0;
- /*Don't need to re-make new video list, because searched data only works current video list*/
- if (g_pSearchViewHandle->nViewType == MP_LIST_VIEW_AS_FOLDER_LIST && !mp_folder_view_is_item_view()) {
+ /*Don't need to re-make new video list, because searched data only works current video list */
+ if (g_pSearchViewHandle->nViewType == MP_LIST_VIEW_AS_FOLDER_LIST
+ && !mp_folder_view_is_item_view()) {
mp_util_svc_destory_video_list();
- mp_util_svc_extract_video_list_by_item_type(nItemSortType, mp_view_ctrl_get_list_type());
+ mp_util_svc_extract_video_list_by_item_type(nItemSortType,
+ mp_view_ctrl_get_list_type
+ ());
}
-// MpUtilMediaSvcExtractVideoListByViewType(nItemSortType, nViewType);
nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
VideoLogInfo("nVideoListSize : %d", nVideoListSize);
elm_genlist_clear(pVideosGenlist);
- if (nVideoListSize > 0)
- {
+ if (nVideoListSize > 0) {
__mp_search_view_append_video_items(pVideosGenlist, false);
}
evas_object_show(pVideosGenlist);
}
-static void __mp_search_view_clicked_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_search_view_clicked_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
- if (!pObject)
- {
+ if (!pObject) {
VideoLogError("[ERR]No have pObject");
return;
}
- elm_object_focus_allow_set(pObject,EINA_TRUE);
+ elm_object_focus_allow_set(pObject, EINA_TRUE);
elm_object_focus_set(pObject, EINA_TRUE);
}
-static void __mp_search_view_soft_back_button_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+static void __mp_search_view_soft_back_button_cb(void *data,
+ Evas_Object * obj,
+ const char *emission,
+ const char *source)
{
VideoLogInfo(" ");
- Evas_Object *pTopNaviFrame = NULL;
- pTopNaviFrame = elm_naviframe_item_pop(g_pSearchViewHandle->pNaviFrameHandle);
- evas_object_del(pTopNaviFrame);
+ Evas_Object *pTopNaviFrame = NULL;
+ pTopNaviFrame =
+ elm_naviframe_item_pop(g_pSearchViewHandle->pNaviFrameHandle);
+ evas_object_del(pTopNaviFrame);
}
-static void __mp_search_view_rotate_cb(void *data, Evas_Object *obj, void *event_info)
+static void __mp_search_view_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
if (!g_pSearchViewWidget) {
VideoLogError("__mp_search_view_rotate_cb IS null");
return;
}
- //mp_util_virtual_keypad_disabled_set(EINA_TRUE);
bool bLandscape = mp_rotate_ctrl_check_landspace();
- const char *temp = elm_object_text_get(g_pSearchViewWidget->pSearchBarEntry);
+ const char *temp =
+ elm_object_text_get(g_pSearchViewWidget->pSearchBarEntry);
char *TempUtf8 = elm_entry_markup_to_utf8(temp);
char *szChangedStr = mp_search_view_get_fact_str(TempUtf8);
if (bLandscape) {
- elm_object_signal_emit(g_pSearchViewWidget->pSearchBarlayout, "elm,state,show,portrait", "elm");
+ elm_object_signal_emit(g_pSearchViewWidget->pSearchBarlayout,
+ "elm,state,show,portrait", "elm");
if (szChangedStr != NULL && strlen(szChangedStr) > 0) {
- elm_object_signal_emit(g_pSearchViewWidget->pSearchBarlayout, "elm,state,show,clear_button,portrait", "elm");
+ elm_object_signal_emit(g_pSearchViewWidget->pSearchBarlayout,
+ "elm,state,show,clear_button,portrait",
+ "elm");
}
} else {
- elm_object_signal_emit(g_pSearchViewWidget->pSearchBarlayout, "elm,state,show,landscape", "elm");
+ elm_object_signal_emit(g_pSearchViewWidget->pSearchBarlayout,
+ "elm,state,show,landscape", "elm");
if (szChangedStr != NULL && strlen(szChangedStr) > 0) {
- elm_object_signal_emit(g_pSearchViewWidget->pSearchBarlayout, "elm,state,show,clear_button,landscape", "elm");
+ elm_object_signal_emit(g_pSearchViewWidget->pSearchBarlayout,
+ "elm,state,show,clear_button,landscape",
+ "elm");
}
}
evas_object_del(g_pSearchViewWidget->pSearchViewBaselayout);
g_pSearchViewWidget->pSearchViewBaselayout = NULL;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_BASIC_NAVIFRAME_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_BASIC_NAVIFRAME_EDJ);
free(path);
// Create search view base layout.
g_pSearchViewWidget->pSearchViewBaselayout = elm_layout_add(pParent);
- elm_layout_file_set(g_pSearchViewWidget->pSearchViewBaselayout, edj_path, "search_view_layout");
+ elm_layout_file_set(g_pSearchViewWidget->pSearchViewBaselayout,
+ edj_path, "search_view_layout");
// Create search bar layout.
- g_pSearchViewWidget->pSearchBarlayout = elm_layout_add(g_pSearchViewWidget->pSearchViewBaselayout);
- elm_layout_file_set(g_pSearchViewWidget->pSearchBarlayout, edj_path, "searchbar_video");
- elm_object_part_content_set(g_pSearchViewWidget->pSearchViewBaselayout, "search_bar", g_pSearchViewWidget->pSearchBarlayout);
- elm_object_signal_callback_add(g_pSearchViewWidget->pSearchBarlayout, "elm,action,click", "back_button_callback", __mp_search_view_soft_back_button_cb, NULL);
- elm_object_signal_emit(g_pSearchViewWidget->pSearchBarlayout, "elm,state,show,searchbar", "elm");
+ g_pSearchViewWidget->pSearchBarlayout =
+ elm_layout_add(g_pSearchViewWidget->pSearchViewBaselayout);
+ elm_layout_file_set(g_pSearchViewWidget->pSearchBarlayout, edj_path,
+ "searchbar_video");
+ elm_object_part_content_set(g_pSearchViewWidget->pSearchViewBaselayout,
+ "search_bar",
+ g_pSearchViewWidget->pSearchBarlayout);
+ elm_object_signal_callback_add(g_pSearchViewWidget->pSearchBarlayout,
+ "elm,action,click",
+ "back_button_callback",
+ __mp_search_view_soft_back_button_cb,
+ NULL);
+ elm_object_signal_emit(g_pSearchViewWidget->pSearchBarlayout,
+ "elm,state,show,searchbar", "elm");
// Create entry.
- g_pSearchViewWidget->pSearchBarEntry = elm_entry_add(g_pSearchViewWidget->pSearchBarlayout);
- elm_entry_single_line_set(g_pSearchViewWidget->pSearchBarEntry, EINA_TRUE);
- elm_entry_scrollable_set(g_pSearchViewWidget->pSearchBarEntry, EINA_TRUE);
- elm_object_domain_translatable_part_text_set(g_pSearchViewWidget->pSearchBarEntry, "elm.guide", VIDEOS_STRING, VIDEOS_CTXPOP_MENU_SEARCH_IDS);
- elm_object_domain_part_text_translatable_set(g_pSearchViewWidget->pSearchBarEntry, "elm.guide", VIDEOS_STRING, EINA_TRUE);
-
- elm_entry_scrollable_set(g_pSearchViewWidget->pSearchBarEntry, EINA_TRUE);
- elm_entry_single_line_set(g_pSearchViewWidget->pSearchBarEntry, EINA_TRUE);
- elm_entry_cnp_mode_set(g_pSearchViewWidget->pSearchBarEntry, ELM_CNP_MODE_PLAINTEXT);
- elm_entry_prediction_allow_set(g_pSearchViewWidget->pSearchBarEntry, EINA_TRUE);
- evas_object_smart_callback_add(g_pSearchViewWidget->pSearchBarEntry, "changed", __mp_search_view_entry_changed_cb, g_pSearchViewWidget->pSearchBarlayout);
- evas_object_smart_callback_add(g_pSearchViewWidget->pSearchBarEntry, "focused", __mp_search_view_focused_cb, g_pSearchViewWidget->pSearchBarlayout);
- evas_object_smart_callback_add(g_pSearchViewWidget->pSearchBarEntry, "unfocused", __mp_search_view_unfocused_cb, g_pSearchViewWidget->pSearchBarlayout);
- evas_object_smart_callback_add(g_pSearchViewWidget->pSearchBarEntry, "preedit,changed", __mp_search_view_entry_changed_cb, g_pSearchViewWidget->pSearchBarlayout);
- evas_object_smart_callback_add(g_pSearchViewWidget->pSearchBarEntry, "activated", __mp_search_view_activated_cb, g_pSearchViewWidget->pSearchBarlayout);
- evas_object_smart_callback_add(g_pSearchViewWidget->pSearchBarEntry, "clicked", __mp_search_view_clicked_cb, g_pSearchViewWidget->pSearchBarlayout);
-
- g_pSearchViewWidget->pClearButton = elm_button_add(g_pSearchViewWidget->pSearchBarlayout);
+ g_pSearchViewWidget->pSearchBarEntry =
+ elm_entry_add(g_pSearchViewWidget->pSearchBarlayout);
+ elm_entry_single_line_set(g_pSearchViewWidget->pSearchBarEntry,
+ EINA_TRUE);
+ elm_entry_scrollable_set(g_pSearchViewWidget->pSearchBarEntry,
+ EINA_TRUE);
+ elm_object_domain_translatable_part_text_set(g_pSearchViewWidget->
+ pSearchBarEntry,
+ "elm.guide",
+ VIDEOS_STRING,
+ VIDEOS_CTXPOP_MENU_SEARCH_IDS);
+ elm_object_domain_part_text_translatable_set(g_pSearchViewWidget->
+ pSearchBarEntry,
+ "elm.guide",
+ VIDEOS_STRING, EINA_TRUE);
+
+ elm_entry_scrollable_set(g_pSearchViewWidget->pSearchBarEntry,
+ EINA_TRUE);
+ elm_entry_single_line_set(g_pSearchViewWidget->pSearchBarEntry,
+ EINA_TRUE);
+ elm_entry_cnp_mode_set(g_pSearchViewWidget->pSearchBarEntry,
+ ELM_CNP_MODE_PLAINTEXT);
+ elm_entry_prediction_allow_set(g_pSearchViewWidget->pSearchBarEntry,
+ EINA_TRUE);
+ evas_object_smart_callback_add(g_pSearchViewWidget->pSearchBarEntry,
+ "changed",
+ __mp_search_view_entry_changed_cb,
+ g_pSearchViewWidget->pSearchBarlayout);
+ evas_object_smart_callback_add(g_pSearchViewWidget->pSearchBarEntry,
+ "focused", __mp_search_view_focused_cb,
+ g_pSearchViewWidget->pSearchBarlayout);
+ evas_object_smart_callback_add(g_pSearchViewWidget->pSearchBarEntry,
+ "unfocused",
+ __mp_search_view_unfocused_cb,
+ g_pSearchViewWidget->pSearchBarlayout);
+ evas_object_smart_callback_add(g_pSearchViewWidget->pSearchBarEntry,
+ "preedit,changed",
+ __mp_search_view_entry_changed_cb,
+ g_pSearchViewWidget->pSearchBarlayout);
+ evas_object_smart_callback_add(g_pSearchViewWidget->pSearchBarEntry,
+ "activated",
+ __mp_search_view_activated_cb,
+ g_pSearchViewWidget->pSearchBarlayout);
+ evas_object_smart_callback_add(g_pSearchViewWidget->pSearchBarEntry,
+ "clicked", __mp_search_view_clicked_cb,
+ g_pSearchViewWidget->pSearchBarlayout);
+
+ g_pSearchViewWidget->pClearButton =
+ elm_button_add(g_pSearchViewWidget->pSearchBarlayout);
elm_object_style_set(g_pSearchViewWidget->pClearButton, "clear_dim");
elm_object_disabled_set(g_pSearchViewWidget->pClearButton, EINA_TRUE);
- evas_object_smart_callback_add(g_pSearchViewWidget->pClearButton, "clicked", __mp_search_view_eraser_clicked_cb, g_pSearchViewWidget->pSearchBarEntry);
+ evas_object_smart_callback_add(g_pSearchViewWidget->pClearButton,
+ "clicked",
+ __mp_search_view_eraser_clicked_cb,
+ g_pSearchViewWidget->pSearchBarEntry);
static Elm_Entry_Filter_Limit_Size limit_filter_data;
limit_filter_data.max_char_count = VIDEO_FILE_SEARCH_CHAR_LEN_MAX;
limit_filter_data.max_byte_count = 0;
- elm_entry_markup_filter_append(g_pSearchViewWidget->pSearchBarEntry, elm_entry_filter_limit_size, &limit_filter_data);
- evas_object_smart_callback_add(g_pSearchViewWidget->pSearchBarEntry, "maxlength,reached", __mp_search_view_entry_max_len_cb,NULL);
-
- elm_object_part_content_set(g_pSearchViewWidget->pSearchBarlayout, "searchbar", g_pSearchViewWidget->pSearchBarEntry);
- elm_object_part_content_set(g_pSearchViewWidget->pSearchViewBaselayout, "search_bar", g_pSearchViewWidget->pSearchBarlayout);
- //elm_object_signal_callback_add(g_pSearchViewWidget->pSearchViewBaselayout, "elm,eraser,clicked", "elm", __mp_search_view_eraser_clicked_cb, g_pSearchViewWidget->pSearchBarEntry);
- elm_object_signal_callback_add(g_pSearchViewWidget->pSearchViewBaselayout, "elm,bg,clicked", "elm", __mp_search_view_bg_clicked_cb, g_pSearchViewWidget->pSearchBarEntry);
- elm_entry_input_panel_layout_set(g_pSearchViewWidget->pSearchBarEntry, ELM_INPUT_PANEL_LAYOUT_NORMAL);
- elm_entry_input_panel_return_key_type_set(g_pSearchViewWidget->pSearchBarEntry, ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH);
- evas_object_size_hint_weight_set(g_pSearchViewWidget->pSearchViewBaselayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(g_pSearchViewWidget->pSearchViewBaselayout, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_object_signal_callback_add(g_pSearchViewWidget->pSearchViewBaselayout, "elm,action,click", "", __mp_search_view_search_symbol_clicked_cb, g_pSearchViewWidget->pSearchBarEntry);
+ elm_entry_markup_filter_append(g_pSearchViewWidget->pSearchBarEntry,
+ elm_entry_filter_limit_size,
+ &limit_filter_data);
+ evas_object_smart_callback_add(g_pSearchViewWidget->pSearchBarEntry,
+ "maxlength,reached",
+ __mp_search_view_entry_max_len_cb,
+ NULL);
+
+ elm_object_part_content_set(g_pSearchViewWidget->pSearchBarlayout,
+ "searchbar",
+ g_pSearchViewWidget->pSearchBarEntry);
+ elm_object_part_content_set(g_pSearchViewWidget->pSearchViewBaselayout,
+ "search_bar",
+ g_pSearchViewWidget->pSearchBarlayout);
+ elm_object_signal_callback_add(g_pSearchViewWidget->
+ pSearchViewBaselayout, "elm,bg,clicked",
+ "elm", __mp_search_view_bg_clicked_cb,
+ g_pSearchViewWidget->pSearchBarEntry);
+ elm_entry_input_panel_layout_set(g_pSearchViewWidget->pSearchBarEntry,
+ ELM_INPUT_PANEL_LAYOUT_NORMAL);
+ elm_entry_input_panel_return_key_type_set(g_pSearchViewWidget->
+ pSearchBarEntry,
+ ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH);
+ evas_object_size_hint_weight_set(g_pSearchViewWidget->
+ pSearchViewBaselayout,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(g_pSearchViewWidget->
+ pSearchViewBaselayout, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ elm_object_signal_callback_add(g_pSearchViewWidget->
+ pSearchViewBaselayout,
+ "elm,action,click", "",
+ __mp_search_view_search_symbol_clicked_cb,
+ g_pSearchViewWidget->pSearchBarEntry);
return g_pSearchViewWidget->pSearchViewBaselayout;
}
static void __mp_search_view_update_genlist_item(const char *szSearchWord)
{
- if (!g_pSearchViewHandle)
- {
+ if (!g_pSearchViewHandle) {
VideoLogError("g_pSearchViewHandle == NULL");
return;
}
- if (!szSearchWord)
- {
+ if (!szSearchWord) {
VideoLogError("szSearchWord == NULL");
return;
}
VideoLogInfo("");
- //int nVideoListSize = 0;
-
- //mp_util_svc_destory_video_list();
- //mp_util_svc_extract_video_list_for_search_view(szSearchWord, g_pSearchViewHandle->nViewType);
- //nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
- //VideoLogInfo("nVideoListSize : %d", nVideoListSize);
-
if (g_pSearchViewHandle->SearchedIndexList) {
eina_list_free(g_pSearchViewHandle->SearchedIndexList);
g_pSearchViewHandle->SearchedIndexList = NULL;
}
- mp_util_svc_index_list_for_search_view(szSearchWord, (void **)&g_pSearchViewHandle->SearchedIndexList);
+ mp_util_svc_index_list_for_search_view(szSearchWord,
+ (void **) &g_pSearchViewHandle->
+ SearchedIndexList);
if (g_pSearchViewHandle->pVideosGenlist)
elm_genlist_clear(g_pSearchViewHandle->pVideosGenlist);
- if (g_pSearchViewHandle->SearchedIndexList)
- {
- memset(g_pSearchViewHandle->szSearchWord, 0, sizeof(char) * SEARCH_CHAR_LEN);
- strncpy(g_pSearchViewHandle->szSearchWord, szSearchWord, SEARCH_CHAR_LEN - 1);
+ if (g_pSearchViewHandle->SearchedIndexList) {
+ memset(g_pSearchViewHandle->szSearchWord, 0,
+ sizeof(char) * SEARCH_CHAR_LEN);
+ strncpy(g_pSearchViewHandle->szSearchWord, szSearchWord,
+ SEARCH_CHAR_LEN - 1);
__mp_search_view_is_existed_no_content_layout();
- __mp_search_view_append_video_items(g_pSearchViewHandle->pVideosGenlist, true);
- //elm_object_signal_emit(g_pSearchViewWidget->pDimminglayout, SIGNAL_SEARCH_VIEW_INTERNAL_DIMMING_HIDE, "");
- }
- else
- {
+ __mp_search_view_append_video_items(g_pSearchViewHandle->
+ pVideosGenlist, true);
+ } else {
__mp_search_view_is_existed_genlist();
- void *pNoContentLayout = __mp_search_view_add_no_contents_layout(g_pSearchViewWidget->pSearchViewBaselayout);
- elm_object_part_content_set(g_pSearchViewWidget->pSearchViewBaselayout, "elm.swallow.content", pNoContentLayout);
+ void *pNoContentLayout =
+ __mp_search_view_add_no_contents_layout(g_pSearchViewWidget->
+ pSearchViewBaselayout);
+ elm_object_part_content_set(g_pSearchViewWidget->
+ pSearchViewBaselayout,
+ "elm.swallow.content",
+ pNoContentLayout);
}
}
void mp_search_view_update_genlist()
{
if (g_pSearchViewHandle && g_pSearchViewHandle->pVideosGenlist) {
- if (g_pSearchViewHandle->nViewType == MP_LIST_VIEW_AS_FOLDER_LIST && mp_folder_view_is_item_view()) {
+ if (g_pSearchViewHandle->nViewType == MP_LIST_VIEW_AS_FOLDER_LIST
+ && mp_folder_view_is_item_view()) {
Elm_Object_Item *currItem = NULL;
Elm_Object_Item *nextItem = NULL;
- currItem = elm_genlist_first_item_get(g_pSearchViewHandle->pVideosGenlist);
+ currItem =
+ elm_genlist_first_item_get(g_pSearchViewHandle->
+ pVideosGenlist);
int index = 0;
while (currItem) {
nextItem = elm_genlist_item_next_get(currItem);
elm_genlist_item_update(currItem);
- mp_util_svc_update_thumbnail_info(g_pSearchViewHandle->nPlayVideoIndex);
- __mp_search_view_update_video_items((Evas_Object *)g_pSearchViewHandle->pVideosGenlist, index, g_pSearchViewHandle->nPlayVideoIndex);
+ mp_util_svc_update_thumbnail_info(g_pSearchViewHandle->
+ nPlayVideoIndex);
+ __mp_search_view_update_video_items((Evas_Object *)
+ g_pSearchViewHandle->
+ pVideosGenlist, index,
+ g_pSearchViewHandle->
+ nPlayVideoIndex);
currItem = nextItem;
index++;
}
}
}
-static void __mp_search_view_db_data_changed(void *pUserData, Evas_Object *pObject)
+static void __mp_search_view_db_data_changed(void *pUserData,
+ Evas_Object * pObject)
{
VideoLogInfo("");
- if (!g_pSearchViewHandle || !pUserData || !pObject)
- {
+ if (!g_pSearchViewHandle || !pUserData || !pObject) {
VideoLogError("g_pSearchViewHandle == NULL");
return;
}
VideoLogInfo("Changed word in entry widget : %s", szChangedStr);
- if (szChangedStr != NULL && strlen(szChangedStr) > 0)
- {
+ if (szChangedStr != NULL && strlen(szChangedStr) > 0) {
__mp_search_view_update_genlist_item(szChangedStr);
- }
- else
- {
- memset(g_pSearchViewHandle->szSearchWord, 0, sizeof(char) * SEARCH_CHAR_LEN);
- //strncpy(g_pSearchViewHandle->szSearchWord, szChangedStr, SEARCH_CHAR_LEN - 1);
+ } else {
+ memset(g_pSearchViewHandle->szSearchWord, 0,
+ sizeof(char) * SEARCH_CHAR_LEN);
__mp_search_view_is_existed_no_content_layout();
- __mp_search_view_arrange_video_list(__mp_search_view_get_sort_type(), g_pSearchViewHandle->pVideosGenlist);
- //elm_object_signal_emit(g_pSearchViewWidget->pDimminglayout, SIGNAL_SEARCH_VIEW_INTERNAL_DIMMING_SHOW, "");
- elm_object_focus_set(g_pSearchViewWidget->pSearchBarEntry, EINA_TRUE);
+ __mp_search_view_arrange_video_list(__mp_search_view_get_sort_type
+ (),
+ g_pSearchViewHandle->
+ pVideosGenlist);
+ elm_object_focus_set(g_pSearchViewWidget->pSearchBarEntry,
+ EINA_TRUE);
}
MP_FREE_STRING(szChangedStr);
static void __mp_search_view_db_changed_cb(void *pUserData)
{
- if (!g_pSearchViewHandle || !g_pSearchViewWidget)
- {
+ if (!g_pSearchViewHandle || !g_pSearchViewWidget) {
VideoLogError("Main handles of list view are not existed.");
return;
}
int nSortType = __mp_search_view_get_sort_type();
- if (g_pSearchViewHandle->pFolderPath)
- {
- if (g_pSearchViewHandle->pFolderPath)
- {
- VideoSecureLogDebug("szFolderPath : %s", g_pSearchViewHandle->pFolderPath);
- if (vp_file_exists(g_pSearchViewHandle->pFolderPath))
- {
+ if (g_pSearchViewHandle->pFolderPath) {
+ if (g_pSearchViewHandle->pFolderPath) {
+ VideoSecureLogDebug("szFolderPath : %s",
+ g_pSearchViewHandle->pFolderPath);
+ if (vp_file_exists(g_pSearchViewHandle->pFolderPath)) {
//update video-list
mp_util_svc_destory_video_item_list();
- mp_util_svc_extract_video_list_from_folder(g_pSearchViewHandle->pFolderPath, nSortType, MP_LIST_VIEW_ALL);
- int nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
+ mp_util_svc_extract_video_list_from_folder
+ (g_pSearchViewHandle->pFolderPath, nSortType,
+ MP_LIST_VIEW_ALL);
+ int nVideoListSize =
+ mp_util_svc_get_number_of_video_item_by_type();
VideoLogInfo("nVideoListSize : %d", nVideoListSize);
- if (nVideoListSize > 0)
- {
- __mp_search_view_db_data_changed(g_pSearchViewWidget->pSearchBarlayout, g_pSearchViewWidget->pSearchBarEntry);
- }
- else
- {
- elm_naviframe_item_pop(g_pSearchViewHandle->pNaviFrameHandle);
+ if (nVideoListSize > 0) {
+ __mp_search_view_db_data_changed(g_pSearchViewWidget->
+ pSearchBarlayout,
+ g_pSearchViewWidget->
+ pSearchBarEntry);
+ } else {
+ elm_naviframe_item_pop(g_pSearchViewHandle->
+ pNaviFrameHandle);
}
- }
- else
- {
- elm_naviframe_item_pop(g_pSearchViewHandle->pNaviFrameHandle);
+ } else {
+ elm_naviframe_item_pop(g_pSearchViewHandle->
+ pNaviFrameHandle);
}
}
- }
- else
- {
+ } else {
mp_util_svc_destory_video_list();
- mp_util_svc_extract_video_list_by_item_type(nSortType, mp_view_ctrl_get_list_type());
+ mp_util_svc_extract_video_list_by_item_type(nSortType,
+ mp_view_ctrl_get_list_type
+ ());
- int nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
+ int nVideoListSize =
+ mp_util_svc_get_number_of_video_item_by_type();
VideoLogInfo("nVideoListSize : %d", nVideoListSize);
- if (nVideoListSize > 0)
- {
- __mp_search_view_db_data_changed(g_pSearchViewWidget->pSearchBarlayout, g_pSearchViewWidget->pSearchBarEntry);
- }
- else
- {
+ if (nVideoListSize > 0) {
+ __mp_search_view_db_data_changed(g_pSearchViewWidget->
+ pSearchBarlayout,
+ g_pSearchViewWidget->
+ pSearchBarEntry);
+ } else {
elm_naviframe_item_pop(g_pSearchViewHandle->pNaviFrameHandle);
}
}
- Elm_Object_Item *pItem = elm_genlist_first_item_get(g_pSearchViewHandle->pVideosGenlist);
- if (pItem)
- {
+ Elm_Object_Item *pItem =
+ elm_genlist_first_item_get(g_pSearchViewHandle->pVideosGenlist);
+ if (pItem) {
elm_genlist_item_bring_in(pItem, ELM_GENLIST_ITEM_SCROLLTO_IN);
}
{
VideoLogInfo("");
- if (!g_pSearchViewHandle || !g_pSearchViewWidget)
- {
+ if (!g_pSearchViewHandle || !g_pSearchViewWidget) {
VideoLogInfo("Handles are not existed about search view.");
return;
}
g_pSearchViewHandle->bShowNormalLayout = TRUE;
- g_pSearchViewWidget->pSearchViewBaselayout = __mp_search_view_init_internal_layout(pParent);
- evas_object_smart_callback_add((Evas_Object*)mp_util_get_main_window_handle(), "wm,rotation,changed", __mp_search_view_rotate_cb, NULL);
+ g_pSearchViewWidget->pSearchViewBaselayout =
+ __mp_search_view_init_internal_layout(pParent);
+ evas_object_smart_callback_add((Evas_Object *)
+ mp_util_get_main_window_handle(),
+ "wm,rotation,changed",
+ __mp_search_view_rotate_cb, NULL);
mp_search_view_check_landscape();
- g_pSearchViewHandle->pVideosGenlist = elm_genlist_add(g_pSearchViewWidget->pSearchViewBaselayout);
- evas_object_size_hint_weight_set(g_pSearchViewHandle->pVideosGenlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(g_pSearchViewHandle->pVideosGenlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_genlist_block_count_set(g_pSearchViewHandle->pVideosGenlist, VIDEO_GENLIST_BLOCK_COUNT);
- elm_genlist_mode_set(g_pSearchViewHandle->pVideosGenlist, ELM_LIST_COMPRESS);
- elm_genlist_homogeneous_set(g_pSearchViewHandle->pVideosGenlist, EINA_TRUE);
- evas_object_smart_callback_add(g_pSearchViewHandle->pVideosGenlist, "scroll,anim,start", __mp_search_view_genlist_scroll_cb, (void *)g_pSearchViewWidget);
+ g_pSearchViewHandle->pVideosGenlist =
+ elm_genlist_add(g_pSearchViewWidget->pSearchViewBaselayout);
+ evas_object_size_hint_weight_set(g_pSearchViewHandle->pVideosGenlist,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(g_pSearchViewHandle->pVideosGenlist,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_genlist_block_count_set(g_pSearchViewHandle->pVideosGenlist,
+ VIDEO_GENLIST_BLOCK_COUNT);
+ elm_genlist_mode_set(g_pSearchViewHandle->pVideosGenlist,
+ ELM_LIST_COMPRESS);
+ elm_genlist_homogeneous_set(g_pSearchViewHandle->pVideosGenlist,
+ EINA_TRUE);
+ evas_object_smart_callback_add(g_pSearchViewHandle->pVideosGenlist,
+ "scroll,anim,start",
+ __mp_search_view_genlist_scroll_cb,
+ (void *) g_pSearchViewWidget);
g_pSearchViewHandle->isViewActive = true;
- __mp_search_view_arrange_video_list(__mp_search_view_get_sort_type(), g_pSearchViewHandle->pVideosGenlist);
- elm_object_part_content_set(g_pSearchViewWidget->pSearchViewBaselayout, "elm.swallow.content", g_pSearchViewHandle->pVideosGenlist);
- evas_object_event_callback_add(g_pSearchViewWidget->pSearchViewBaselayout, EVAS_CALLBACK_DEL, __mp_search_view_base_layout_del_cb, NULL);
-
- g_pSearchViewHandle->pNaviFrameItem = elm_naviframe_item_push(g_pSearchViewHandle->pNaviFrameHandle, NULL, NULL, NULL, g_pSearchViewWidget->pSearchViewBaselayout, NULL);
- elm_naviframe_item_pop_cb_set(g_pSearchViewHandle->pNaviFrameItem, mp_search_view_back_btn_cb, g_pSearchViewHandle);
- evas_object_smart_callback_add(g_pSearchViewHandle->pNaviFrameHandle, "transition,finished", __mp_search_view_naviframe_transition_effect_cb, NULL);
- elm_naviframe_item_title_enabled_set(g_pSearchViewHandle->pNaviFrameItem, EINA_FALSE, EINA_FALSE);
+ __mp_search_view_arrange_video_list(__mp_search_view_get_sort_type(),
+ g_pSearchViewHandle->
+ pVideosGenlist);
+ elm_object_part_content_set(g_pSearchViewWidget->pSearchViewBaselayout,
+ "elm.swallow.content",
+ g_pSearchViewHandle->pVideosGenlist);
+ evas_object_event_callback_add(g_pSearchViewWidget->
+ pSearchViewBaselayout,
+ EVAS_CALLBACK_DEL,
+ __mp_search_view_base_layout_del_cb,
+ NULL);
+
+ g_pSearchViewHandle->pNaviFrameItem =
+ elm_naviframe_item_push(g_pSearchViewHandle->pNaviFrameHandle,
+ NULL, NULL, NULL,
+ g_pSearchViewWidget->pSearchViewBaselayout,
+ NULL);
+ elm_naviframe_item_pop_cb_set(g_pSearchViewHandle->pNaviFrameItem,
+ mp_search_view_back_btn_cb,
+ g_pSearchViewHandle);
+ evas_object_smart_callback_add(g_pSearchViewHandle->pNaviFrameHandle,
+ "transition,finished",
+ __mp_search_view_naviframe_transition_effect_cb,
+ NULL);
+ elm_naviframe_item_title_enabled_set(g_pSearchViewHandle->
+ pNaviFrameItem, EINA_FALSE,
+ EINA_FALSE);
- if (mp_util_svc_get_number_of_video_item_by_type() < 1)
- {
+ if (mp_util_svc_get_number_of_video_item_by_type() < 1) {
__mp_search_view_is_existed_genlist();
- void *pNoContentLayout = __mp_search_view_add_no_contents_layout(g_pSearchViewWidget->pSearchViewBaselayout);
- elm_object_part_content_set(g_pSearchViewWidget->pSearchViewBaselayout, "elm.swallow.content", pNoContentLayout);
+ void *pNoContentLayout =
+ __mp_search_view_add_no_contents_layout(g_pSearchViewWidget->
+ pSearchViewBaselayout);
+ elm_object_part_content_set(g_pSearchViewWidget->
+ pSearchViewBaselayout,
+ "elm.swallow.content",
+ pNoContentLayout);
}
mp_util_virtual_keypad_disabled_set(EINA_TRUE);
- mp_util_db_set_update_fun(g_pSearchViewHandle->euLev, __mp_search_view_db_changed_cb);
+ mp_util_db_set_update_fun(g_pSearchViewHandle->euLev,
+ __mp_search_view_db_changed_cb);
mp_util_hide_indicator();
- elm_object_signal_emit(g_pSearchViewWidget->pSearchBarlayout, "elm,state,eraser,hide", "elm");
+ elm_object_signal_emit(g_pSearchViewWidget->pSearchBarlayout,
+ "elm,state,eraser,hide", "elm");
}
void mp_search_view_push(void *pNaviFrame, char *pFolderPath)
{
- if (!pNaviFrame)
- {
+ if (!pNaviFrame) {
VideoLogError("[ERR] No existed pNaviFrame.");
return;
}
VideoLogInfo("");
mp_search_view_destroy();
- g_pSearchViewHandle = (st_VideoSearchViewHandle*)calloc(1, sizeof(st_VideoSearchViewHandle));
- g_pSearchViewWidget = (st_VideoSearchViewWidget*)calloc(1, sizeof(st_VideoSearchViewWidget));
+ g_pSearchViewHandle =
+ (st_VideoSearchViewHandle *) calloc(1,
+ sizeof
+ (st_VideoSearchViewHandle));
+ g_pSearchViewWidget =
+ (st_VideoSearchViewWidget *) calloc(1,
+ sizeof
+ (st_VideoSearchViewWidget));
memset(g_pSearchViewHandle, 0, sizeof(st_VideoSearchViewHandle));
memset(g_pSearchViewWidget, 0, sizeof(st_VideoSearchViewWidget));
g_pSearchViewHandle->pNaviFrameHandle = pNaviFrame;
- if (pFolderPath)
- {
+ if (pFolderPath) {
g_pSearchViewHandle->pFolderPath = strdup(pFolderPath);
}
int nViewType = mp_view_as_ctrl_get_type();
g_pSearchViewHandle->nViewType = nViewType;
g_pSearchViewHandle->euLev = MP_DB_UPDATE_LEV_1;
- if (nViewType == MP_LIST_VIEW_AS_FOLDER_LIST && g_pSearchViewHandle->pFolderPath)
- {
+ if (nViewType == MP_LIST_VIEW_AS_FOLDER_LIST
+ && g_pSearchViewHandle->pFolderPath) {
g_pSearchViewHandle->euLev = MP_DB_UPDATE_LEV_2;
}
{
VideoLogInfo("");
- if (!g_pSearchViewHandle || !g_pSearchViewWidget)
- {
+ if (!g_pSearchViewHandle || !g_pSearchViewWidget) {
VideoLogError("Handles are not existed about search view.");
return;
}
if (g_pSearchViewHandle->bUpdateList) {
if (g_pSearchViewHandle->pChangeViewUpdateFunc) {
bUpdateList = TRUE;
- g_pSearchViewHandle->pChangeViewUpdateFunc(LIST_UPDATE_TYPE_ALL);
+ g_pSearchViewHandle->
+ pChangeViewUpdateFunc(LIST_UPDATE_TYPE_ALL);
}
}
}
}
-void mp_search_view_register_update_list_func(ViewUpdateListItemCbFunc pUpdateViewCb, ListViewUpdateListItemCbFunc pChangeViewCb)
+void mp_search_view_register_update_list_func(ViewUpdateListItemCbFunc
+ pUpdateViewCb,
+ ListViewUpdateListItemCbFunc
+ pChangeViewCb)
{
if (!pUpdateViewCb || !pChangeViewCb) {
VideoLogInfo("[ERR]");
g_pSearchViewHandle->pChangeViewUpdateFunc = pUpdateViewCb;
}
-static void __mp_search_view_update_video_items(Evas_Object *pGenlist, int nGenItemIndex, int nPlayVideoIndex)
+static void __mp_search_view_update_video_items(Evas_Object * pGenlist,
+ int nGenItemIndex,
+ int nPlayVideoIndex)
{
- if (!pGenlist)
- {
+ if (!pGenlist) {
VideoLogWarning("[WARNING] pNormalVideoItemList is not existed.");
return;
}
VideoLogInfo("%d", nGenItemIndex);
- Elm_Object_Item *pTmpVideoGenlistItem = elm_genlist_nth_item_get((const Evas_Object *)pGenlist, nGenItemIndex);
- if (pTmpVideoGenlistItem)
- {
- //elm_genlist_item_update(pTmpVideoGenlistItem);
- //elm_genlist_item_fields_update(pTmpVideoGenlistItem, "elm.icon.1", ELM_GENLIST_ITEM_FIELD_CONTENT);
+ Elm_Object_Item *pTmpVideoGenlistItem =
+ elm_genlist_nth_item_get((const Evas_Object *) pGenlist,
+ nGenItemIndex);
+ if (pTmpVideoGenlistItem) {
elm_genlist_item_selected_set(pTmpVideoGenlistItem, EINA_FALSE);
- int nLastPlayedTime = mp_util_svc_get_video_last_played_pos(nPlayVideoIndex);
- int nDurationTime = mp_util_svc_get_video_duration_time(nPlayVideoIndex);
- Evas_Object *pIconContent = elm_object_item_part_content_get(pTmpVideoGenlistItem, "elm.swallow.icon");
- if (!pIconContent)
- {
+ int nLastPlayedTime =
+ mp_util_svc_get_video_last_played_pos(nPlayVideoIndex);
+ int nDurationTime =
+ mp_util_svc_get_video_duration_time(nPlayVideoIndex);
+ Evas_Object *pIconContent =
+ elm_object_item_part_content_get(pTmpVideoGenlistItem,
+ "elm.swallow.icon");
+ if (!pIconContent) {
VideoLogError("");
return;
}
- Evas_Object *pProgressbar = elm_layout_content_get(pIconContent, "elm.progressbar.icon");
+ Evas_Object *pProgressbar =
+ elm_layout_content_get(pIconContent, "elm.progressbar.icon");
- if (nLastPlayedTime > 0)
- {
+ if (nLastPlayedTime > 0) {
double nRatio = 0.0;
if (nDurationTime > 0) {
- nRatio = ((double)nLastPlayedTime) /
- ((double)nDurationTime);
+ nRatio = ((double) nLastPlayedTime) /
+ ((double) nDurationTime);
}
if (nRatio < 0.05) {
nRatio = 0.05;
}
- if (!pProgressbar)
- {
- elm_genlist_item_fields_update(pTmpVideoGenlistItem, "elm.swallow.icon", ELM_GENLIST_ITEM_FIELD_CONTENT);
- }
- else
- {
+ if (!pProgressbar) {
+ elm_genlist_item_fields_update(pTmpVideoGenlistItem,
+ "elm.swallow.icon",
+ ELM_GENLIST_ITEM_FIELD_CONTENT);
+ } else {
elm_progressbar_value_set(pProgressbar, nRatio);
}
- }
- else
- {
- if (pProgressbar)
- {
- elm_layout_content_unset(pIconContent, "elm.progressbar.icon");
+ } else {
+ if (pProgressbar) {
+ elm_layout_content_unset(pIconContent,
+ "elm.progressbar.icon");
MP_DEL_OBJ(pProgressbar);
}
}
- elm_genlist_item_fields_update(pTmpVideoGenlistItem, "elm.text.sub", ELM_GENLIST_ITEM_FIELD_TEXT);
+ elm_genlist_item_fields_update(pTmpVideoGenlistItem,
+ "elm.text.sub",
+ ELM_GENLIST_ITEM_FIELD_TEXT);
}
}
void mp_search_view_update_played_item(int nIndex)
{
- if (!g_pSearchViewHandle || !g_pSearchViewWidget || (g_pSearchViewHandle->nPlayVideoIndex < 0))
- {
+ if (!g_pSearchViewHandle || !g_pSearchViewWidget
+ || (g_pSearchViewHandle->nPlayVideoIndex < 0)) {
VideoLogInfo("SearchView of list view are not existed.");
return;
}
- if (nIndex >= 0)
- {
+ if (nIndex >= 0) {
g_pSearchViewHandle->nPlayVideoIndex = nIndex;
}
VideoLogInfo("");
- if (g_pSearchViewHandle->pVideosGenlist)
- {
+ if (g_pSearchViewHandle->pVideosGenlist) {
int nGenItemIndex = g_pSearchViewHandle->nPlayVideoIndex;
- if (g_pSearchViewHandle->SearchedIndexList)
- {
+ if (g_pSearchViewHandle->SearchedIndexList) {
Eina_List *pIterateList = NULL;
- void *nTempIndex = (void *)0;
+ void *nTempIndex = (void *) 0;
int nIndex = 0;
- EINA_LIST_FOREACH(g_pSearchViewHandle->SearchedIndexList, pIterateList, nTempIndex)
- {
- VideoLogInfo("nTempIndex:index==%d:%d:%d", (int)nTempIndex, nIndex, nGenItemIndex);
- if (g_pSearchViewHandle->nPlayVideoIndex == (int)nTempIndex)
- {
+ EINA_LIST_FOREACH(g_pSearchViewHandle->SearchedIndexList,
+ pIterateList, nTempIndex) {
+ VideoLogInfo("nTempIndex:index==%d:%d:%d",
+ (int) nTempIndex, nIndex, nGenItemIndex);
+ if (g_pSearchViewHandle->nPlayVideoIndex ==
+ (int) nTempIndex) {
nGenItemIndex = nIndex;
break;
}
nIndex++;
}
}
- mp_util_svc_update_thumbnail_info(g_pSearchViewHandle->nPlayVideoIndex);
- __mp_search_view_update_video_items((Evas_Object *)g_pSearchViewHandle->pVideosGenlist, nGenItemIndex, g_pSearchViewHandle->nPlayVideoIndex);
+ mp_util_svc_update_thumbnail_info(g_pSearchViewHandle->
+ nPlayVideoIndex);
+ __mp_search_view_update_video_items((Evas_Object *)
+ g_pSearchViewHandle->
+ pVideosGenlist, nGenItemIndex,
+ g_pSearchViewHandle->
+ nPlayVideoIndex);
}
}
{
VideoLogInfo("");
- if (!g_pSearchViewHandle || !g_pSearchViewWidget)
- {
+ if (!g_pSearchViewHandle || !g_pSearchViewWidget) {
VideoLogError("Handles are not existed about search view.");
return;
}
- //elm_object_item_domain_translatable_part_text_set(g_pSearchViewHandle->pNaviFrameItem, "elm.text.title", MP_SYS_STRING, VIDEOS_CTXPOP_MENU_SEARCH);
- //elm_object_domain_translatable_text_set(g_pSearchViewWidget->pCancelButton, VIDEOS_STRING, MP_SK_CANCEL);
- elm_object_domain_translatable_part_text_set(g_pSearchViewWidget->pSearchBarlayout, "elm.guidetext", VIDEOS_STRING, VIDEOS_CTXPOP_MENU_SEARCH);
+ elm_object_domain_translatable_part_text_set(g_pSearchViewWidget->
+ pSearchBarlayout,
+ "elm.guidetext",
+ VIDEOS_STRING,
+ VIDEOS_CTXPOP_MENU_SEARCH);
}
static void
-__mp_search_view_base_layout_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+__mp_search_view_base_layout_del_cb(void *data, Evas * e,
+ Evas_Object * obj, void *event_info)
{
- //evas_object_event_callback_del(g_pSearchViewWidget->pSearchViewBaselayout, EVAS_CALLBACK_DEL, __mp_search_view_base_layout_del_cb);
-
__mp_search_view_reset();
}
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <stdbool.h>
static int __mp_mgr_get_device_orientation_type()
{
if (g_WindowData
- && (g_WindowData->mOrientation == APP_DEVICE_ORIENTATION_270
- || g_WindowData->mOrientation == APP_DEVICE_ORIENTATION_90)) {
+ && (g_WindowData->mOrientation == APP_DEVICE_ORIENTATION_270
+ || g_WindowData->mOrientation == APP_DEVICE_ORIENTATION_90)) {
return DEVICE_ORIENTATION_LANDSCAPE;
} else {
return DEVICE_ORIENTATION_PORTRAIT;
#ifdef ENABLE_LANDSCAPE
static void
-__mp_mgr_main_window_rotation_change_cb(void *data, Evas_Object *obj,
- void *event_info)
+__mp_mgr_main_window_rotation_change_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
int changed_angle = elm_win_rotation_get(obj);
VideoLogWarning("window rotated [%d] => [%d]",
- g_WindowData->mOrientation, changed_angle);
+ g_WindowData->mOrientation, changed_angle);
if (g_WindowData->mOrientation != changed_angle) {
g_WindowData->mOrientation = changed_angle;
}
static void
-__mp_mgr_main_win_del_cb(void *data, Evas_Object *obj,
- void *mouse_event_rect)
+__mp_mgr_main_win_del_cb(void *data, Evas_Object * obj,
+ void *mouse_event_rect)
{
VideoLogInfo("");
if (NULL == data || data != g_WindowData) {
VideoLogError(" data[%p] == NULL || data != g_WindowData[%p]!!!",
- data, g_WindowData);
+ data, g_WindowData);
return;
}
elm_exit();
}
-static Evas_Object *__mp_mgr_create_bg(Evas_Object *pWin)
+static Evas_Object *__mp_mgr_create_bg(Evas_Object * pWin)
{
VideoLogInfo("");
bg = elm_bg_add(pWin);
Eina_Bool ret = elm_bg_file_set(bg,
- "/usr/apps/org.tizen.videos/res/images/core_theme_bg_01.png",
- NULL);
+ "/usr/apps/org.tizen.videos/res/images/core_theme_bg_01.png",
+ NULL);
if (ret != true) {
VideoLogInfo("failed to set layout bg");
}
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(bg, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(bg, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_win_resize_object_add(pWin, bg);
evas_object_show(bg);
if (eo) {
elm_win_title_set(eo, name);
evas_object_smart_callback_add(eo, "delete,request",
- __mp_mgr_main_win_del_cb,
- g_WindowData);
+ __mp_mgr_main_win_del_cb,
+ g_WindowData);
elm_win_screen_size_get(eo, NULL, NULL, &w, &h);
VideoLogInfo("window size:%d,%d", w, h);
evas_object_resize(eo, w, h);
- /*elm_win_indicator_mode_set(eo, ELM_WIN_INDICATOR_HIDE);*/
+
elm_win_indicator_mode_set(eo, ELM_WIN_INDICATOR_SHOW);
elm_win_indicator_opacity_set(eo, ELM_WIN_INDICATOR_TRANSPARENT);
}
#ifdef ENABLE_LANDSCAPE
VideoLogWarning("support rotate",
- elm_win_wm_rotation_supported_get(g_WindowData->
- pMainWindow));
+ elm_win_wm_rotation_supported_get
+ (g_WindowData->pMainWindow));
if (elm_win_wm_rotation_supported_get(g_WindowData->pMainWindow)) {
const int rots[4] = { 0, 90, 180, 270 };
- elm_win_wm_rotation_available_rotations_set(g_WindowData->
- pMainWindow, rots, 4);
+ elm_win_wm_rotation_available_rotations_set
+ (g_WindowData->pMainWindow, rots, 4);
evas_object_smart_callback_add(g_WindowData->pMainWindow,
- "wm,rotation,changed",
- __mp_mgr_main_window_rotation_change_cb,
- g_WindowData);
+ "wm,rotation,changed",
+ __mp_mgr_main_window_rotation_change_cb,
+ g_WindowData);
g_WindowData->mOrientation =
elm_win_rotation_get(g_WindowData->pMainWindow);
VideoLogWarning("mOrientation=%d", g_WindowData->mOrientation);
}
#endif
- /* evas_object_show(g_WindowData->pMainWindow);*/
elm_win_conformant_set(g_WindowData->pMainWindow, EINA_TRUE);
evas_object_size_hint_weight_set(g_WindowData->pConformant,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(g_WindowData->pMainWindow,
- g_WindowData->pConformant);
+ g_WindowData->pConformant);
evas_object_show(g_WindowData->pConformant);
elm_object_signal_emit(g_WindowData->pConformant,
- "elm,state,indicator,overlap", "");
+ "elm,state,indicator,overlap", "");
evas_object_data_set(g_WindowData->pConformant, "overlap",
- (void *) EINA_TRUE);
+ (void *) EINA_TRUE);
mp_util_set_main_conformat((void *) g_WindowData->pConformant);
mp_util_set_main_window_handle((void *) g_WindowData->pMainWindow);
elm_exit();
return;
}
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_BASIC_LAYOUT_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_BASIC_LAYOUT_EDJ);
free(path);
elm_layout_file_set(g_WindowData->pMainLayout, edj_path,
- "elm/layout/application/video/default");
+ "elm/layout/application/video/default");
evas_object_size_hint_weight_set(g_WindowData->pMainLayout,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(g_WindowData->pMainLayout,
- EVAS_HINT_FILL, EVAS_HINT_FILL);
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(g_WindowData->pMainLayout);
elm_object_content_set(g_WindowData->pConformant,
- g_WindowData->pMainLayout);
+ g_WindowData->pMainLayout);
if (g_WindowData->pLibraryInnerNaviframe != NULL) {
evas_object_del(g_WindowData->pLibraryInnerNaviframe);
MP_DEL_IDLER(g_WindowData->pInitValueIdler);
g_WindowData->pInitValueIdler =
ecore_idler_add(__mp_mgr_init_data_idler_cb,
- (void *) g_WindowData);
+ (void *) g_WindowData);
elm_object_part_content_set(g_WindowData->pMainLayout,
- "elm.swallow.content",
- g_WindowData->pLibraryInnerNaviframe);
+ "elm.swallow.content",
+ g_WindowData->pLibraryInnerNaviframe);
eext_object_event_callback_add(g_WindowData->pLibraryInnerNaviframe,
- EEXT_CALLBACK_BACK,
- eext_naviframe_back_cb, NULL);
+ EEXT_CALLBACK_BACK,
+ eext_naviframe_back_cb, NULL);
eext_object_event_callback_add(g_WindowData->pLibraryInnerNaviframe,
- EEXT_CALLBACK_MORE,
- eext_naviframe_more_cb, NULL);
+ EEXT_CALLBACK_MORE,
+ eext_naviframe_more_cb, NULL);
mp_util_hide_indicator();
}
Eina_Bool mp_mgr_is_landscape()
{
return (__mp_mgr_get_device_orientation_type() ==
- DEVICE_ORIENTATION_LANDSCAPE);
+ DEVICE_ORIENTATION_LANDSCAPE);
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
nErr = app_control_set_uri(pService, pUrl);
if (nErr != APP_CONTROL_ERROR_NONE) {
VideoLogError("Fail to set uri into ug service handle - [0x%x]",
- nErr);
+ nErr);
goto ERROR_EXCEPTION;
}
nErr = app_control_send_launch_request(pService, NULL, NULL);
if (nErr != APP_CONTROL_ERROR_NONE) {
VideoLogWarning("[WARNING] rvice_send_launch_request().. [0x%x]",
- nErr);
+ nErr);
goto ERROR_EXCEPTION;
}
pService = NULL;
-ERROR_EXCEPTION:
+ ERROR_EXCEPTION:
if (pService) {
app_control_destroy(pService);
pService = NULL;
}
return;
}
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <Eina.h>
if (g_pToolbarWidget) {
if (g_pToolbarWidget->pNaviFrameItem) {
- /*elm_object_item_part_content_unset(g_pToolbarWidget->pNaviFrameItem, "toolbar_more_btn");*/
- /*elm_object_item_part_content_unset(g_pToolbarWidget->pNaviFrameItem, "toolbar_button1");*/
- elm_object_item_part_content_unset(g_pToolbarWidget->
- pNaviFrameItem,
- "toolbar_button2");
+ elm_object_item_part_content_unset
+ (g_pToolbarWidget->pNaviFrameItem, "toolbar_button2");
g_pToolbarWidget->pNaviFrameItem = NULL;
}
g_pToolbarWidget->pNaviFrameItem = NULL;
memset((void *) &g_pToolbarWidget->ToolbarCbFunc, 0,
- sizeof(st_RegisteCbFunc));
+ sizeof(st_RegisteCbFunc));
free(g_pToolbarWidget);
g_pToolbarWidget = NULL;
}
void *mp_ft_ctrl_create_more_style_btn(void *pParent, Evas_Smart_Cb pFunc,
- void *pUserData)
+ void *pUserData)
{
if (!pParent) {
VideoLogError("No exist parent.");
}
void *mp_ft_ctrl_create_toolbar_btn(void *pParent, const char *pText,
- Evas_Smart_Cb pFunc, void *pUserData)
+ Evas_Smart_Cb pFunc, void *pUserData)
{
if (!pParent) {
VideoLogError("No exist parent.");
}
void mp_ft_ctrl_more_popup_dismissed_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
mp_ft_ctrl_hide_more_popup();
}
-void mp_ft_ctrl_move_more_popup(Evas_Object *pCtxPopup,
- Evas_Object *pTargetObject)
+void mp_ft_ctrl_move_more_popup(Evas_Object * pCtxPopup,
+ Evas_Object * pTargetObject)
{
Evas_Coord_Rectangle rect = { 0, };
int nRotate = elm_win_rotation_get(mp_util_get_main_window_handle());
elm_win_screen_size_get(mp_util_get_main_window_handle(), &rect.x,
- &rect.y, &rect.w, &rect.h);
+ &rect.y, &rect.w, &rect.h);
VideoLogInfo("nRotate : [%d], rect.w : [%d], rect.h : [%d]", nRotate,
- rect.w, rect.h);
+ rect.w, rect.h);
int nW = 0;
int nH = 0;
switch (nRotate) {
case 0:
case 180:
- {
- nW = rect.w / 2;
- nH = rect.h;
- }
- break;
+ {
+ nW = rect.w / 2;
+ nH = rect.h;
+ }
+ break;
case 90:
- {
- nW = rect.h / 2;
- nH = rect.w;
- }
- break;
+ {
+ nW = rect.h / 2;
+ nH = rect.w;
+ }
+ break;
case 270:
- {
- nW = rect.h / 2;
- nH = rect.w;
- }
- break;
+ {
+ nW = rect.h / 2;
+ nH = rect.w;
+ }
+ break;
default:
- {
- VideoLogError("not handled nRotate : [%d]!!!", nRotate);
- }
- break;
+ {
+ VideoLogError("not handled nRotate : [%d]!!!", nRotate);
+ }
+ break;
}
evas_object_move(g_pToolbarWidget->pMoreCtxPopup, nW, nH);
}
-static void __mp_ft_ctrl_more_popup_del_cb(void *data, Evas *e,
- Evas_Object *obj,
- void *event_info)
+static void __mp_ft_ctrl_more_popup_del_cb(void *data, Evas * e,
+ Evas_Object * obj,
+ void *event_info)
{
VideoLogInfo("");
evas_object_event_callback_del(obj, EVAS_CALLBACK_DEL,
- __mp_ft_ctrl_more_popup_del_cb);
+ __mp_ft_ctrl_more_popup_del_cb);
if (g_pToolbarWidget)
g_pToolbarWidget->pMoreCtxPopup = NULL;
}
void mp_ft_ctrl_create_more_btn_of_personal(void *pUserData,
- Evas_Object *pTargetObject)
+ Evas_Object * pTargetObject)
{
VideoLogInfo("");
int nVideoListSize = mp_util_svc_get_number_of_video_item_by_type();
- g_pToolbarWidget->pMoreCtxPopup =
- elm_ctxpopup_add((Evas_Object *)
- mp_util_get_main_window_handle());
+ g_pToolbarWidget->pMoreCtxPopup = elm_ctxpopup_add((Evas_Object *)
+ mp_util_get_main_window_handle
+ ());
if (g_pToolbarWidget->pMoreCtxPopup == NULL) {
}
evas_object_event_callback_add(g_pToolbarWidget->pMoreCtxPopup,
- EVAS_CALLBACK_DEL,
- __mp_ft_ctrl_more_popup_del_cb, NULL);
+ EVAS_CALLBACK_DEL,
+ __mp_ft_ctrl_more_popup_del_cb, NULL);
eext_object_event_callback_add(g_pToolbarWidget->pMoreCtxPopup,
- EEXT_CALLBACK_BACK,
- eext_ctxpopup_back_cb, NULL);
+ EEXT_CALLBACK_BACK,
+ eext_ctxpopup_back_cb, NULL);
eext_object_event_callback_add(g_pToolbarWidget->pMoreCtxPopup,
- EEXT_CALLBACK_MORE,
- eext_ctxpopup_back_cb, NULL);
+ EEXT_CALLBACK_MORE,
+ eext_ctxpopup_back_cb, NULL);
elm_object_style_set(g_pToolbarWidget->pMoreCtxPopup, "more/default");
elm_ctxpopup_auto_hide_disabled_set(g_pToolbarWidget->pMoreCtxPopup,
- EINA_TRUE);
+ EINA_TRUE);
evas_object_smart_callback_add(g_pToolbarWidget->pMoreCtxPopup,
- "dismissed",
- mp_ft_ctrl_more_popup_dismissed_cb,
- NULL);
+ "dismissed",
+ mp_ft_ctrl_more_popup_dismissed_cb,
+ NULL);
if (nVideoListSize > 0 && g_pToolbarWidget->ToolbarCbFunc.SearchCb) {
item =
elm_ctxpopup_item_append(g_pToolbarWidget->pMoreCtxPopup,
- VIDEOS_CTXPOP_MENU_SEARCH_IDS, NULL,
- g_pToolbarWidget->ToolbarCbFunc.
- SearchCb,
- (void *) FOOTER_TAB_TYPE_PERSONAL);
+ VIDEOS_CTXPOP_MENU_SEARCH_IDS, NULL,
+ g_pToolbarWidget->
+ ToolbarCbFunc.SearchCb,
+ (void *) FOOTER_TAB_TYPE_PERSONAL);
elm_object_item_domain_text_translatable_set(item, VIDEOS_STRING,
- EINA_TRUE);
+ EINA_TRUE);
nItemCount++;
}
if (nVideoListSize > 0 && g_pToolbarWidget->ToolbarCbFunc.DeleteCb) {
item =
elm_ctxpopup_item_append(g_pToolbarWidget->pMoreCtxPopup,
- VIDEOS_CTXPOP_MENU_DELETE_IDS, NULL,
- g_pToolbarWidget->ToolbarCbFunc.
- DeleteCb,
- (void *) FOOTER_TAB_TYPE_PERSONAL);
+ VIDEOS_CTXPOP_MENU_DELETE_IDS, NULL,
+ g_pToolbarWidget->
+ ToolbarCbFunc.DeleteCb,
+ (void *) FOOTER_TAB_TYPE_PERSONAL);
elm_object_item_domain_text_translatable_set(item, VIDEOS_STRING,
- EINA_TRUE);
+ EINA_TRUE);
nItemCount++;
}
if (g_pToolbarWidget->ToolbarCbFunc.ShareViaCb) {
item =
elm_ctxpopup_item_append(g_pToolbarWidget->pMoreCtxPopup,
- VIDEOS_CTXPOP_MENU_SHARE_IDS, NULL,
- g_pToolbarWidget->ToolbarCbFunc.
- ShareViaCb, NULL);
+ VIDEOS_CTXPOP_MENU_SHARE_IDS, NULL,
+ g_pToolbarWidget->
+ ToolbarCbFunc.ShareViaCb, NULL);
elm_object_item_domain_text_translatable_set(item, VIDEOS_STRING,
- EINA_TRUE);
+ EINA_TRUE);
nItemCount++;
}
if (nVideoListSize > 0 && g_pToolbarWidget->ToolbarCbFunc.ViewAsCb) {
item =
elm_ctxpopup_item_append(g_pToolbarWidget->pMoreCtxPopup,
- VIDEOS_CTXPOP_MENU_VIEW_AS_IDS, NULL,
- g_pToolbarWidget->ToolbarCbFunc.
- ViewAsCb,
- (void *) FOOTER_TAB_TYPE_PERSONAL);
+ VIDEOS_CTXPOP_MENU_VIEW_AS_IDS, NULL,
+ g_pToolbarWidget->
+ ToolbarCbFunc.ViewAsCb,
+ (void *) FOOTER_TAB_TYPE_PERSONAL);
elm_object_item_domain_text_translatable_set(item, VIDEOS_STRING,
- EINA_TRUE);
+ EINA_TRUE);
nItemCount++;
}
if (nVideoListSize > 0 && g_pToolbarWidget->ToolbarCbFunc.SortItemCb) {
item =
elm_ctxpopup_item_append(g_pToolbarWidget->pMoreCtxPopup,
- VIDEOS_CTXPOP_MENU_SORT_BY_IDS, NULL,
- g_pToolbarWidget->ToolbarCbFunc.
- SortItemCb,
- (void *) FOOTER_TAB_TYPE_PERSONAL);
+ VIDEOS_CTXPOP_MENU_SORT_BY_IDS, NULL,
+ g_pToolbarWidget->
+ ToolbarCbFunc.SortItemCb,
+ (void *) FOOTER_TAB_TYPE_PERSONAL);
elm_object_item_domain_text_translatable_set(item, VIDEOS_STRING,
- EINA_TRUE);
+ EINA_TRUE);
nItemCount++;
}
if (nVideoListSize > 0 && g_pToolbarWidget->ToolbarCbFunc.AutoPlayCb) {
- item =
- elm_ctxpopup_item_append(g_pToolbarWidget->pMoreCtxPopup,
- VIDEOS_CTXPOP_MENU_AUTO_PLAY_NEXT_IDS, NULL,
- g_pToolbarWidget->ToolbarCbFunc.
- AutoPlayCb,
- (void *) FOOTER_TAB_TYPE_PERSONAL);
- elm_object_item_domain_text_translatable_set(item, VIDEOS_STRING,
- EINA_TRUE);
- nItemCount++;
+ item =
+ elm_ctxpopup_item_append(g_pToolbarWidget->pMoreCtxPopup,
+ VIDEOS_CTXPOP_MENU_AUTO_PLAY_NEXT_IDS,
+ NULL,
+ g_pToolbarWidget->
+ ToolbarCbFunc.AutoPlayCb,
+ (void *) FOOTER_TAB_TYPE_PERSONAL);
+ elm_object_item_domain_text_translatable_set(item, VIDEOS_STRING,
+ EINA_TRUE);
+ nItemCount++;
}
if (nVideoListSize > 0 && g_pToolbarWidget->ToolbarCbFunc.RenameCb) {
item =
elm_ctxpopup_item_append(g_pToolbarWidget->pMoreCtxPopup,
- VIDEOS_CTXPOP_MENU_RENAME_IDS, NULL,
- g_pToolbarWidget->ToolbarCbFunc.
- RenameCb,
- (void *) FOOTER_TAB_TYPE_PERSONAL);
+ VIDEOS_CTXPOP_MENU_RENAME_IDS, NULL,
+ g_pToolbarWidget->
+ ToolbarCbFunc.RenameCb,
+ (void *) FOOTER_TAB_TYPE_PERSONAL);
elm_object_item_domain_text_translatable_set(item, VIDEOS_STRING,
- EINA_TRUE);
+ EINA_TRUE);
nItemCount++;
}
if (nVideoListSize > 0 && g_pToolbarWidget->ToolbarCbFunc.DetailsCb) {
item =
elm_ctxpopup_item_append(g_pToolbarWidget->pMoreCtxPopup,
- VIDEOS_CTXPOP_MENU_DETAILS_IDS, NULL,
- g_pToolbarWidget->ToolbarCbFunc.
- DetailsCb,
- (void *) FOOTER_TAB_TYPE_PERSONAL);
+ VIDEOS_CTXPOP_MENU_DETAILS_IDS, NULL,
+ g_pToolbarWidget->
+ ToolbarCbFunc.DetailsCb,
+ (void *) FOOTER_TAB_TYPE_PERSONAL);
elm_object_item_domain_text_translatable_set(item, VIDEOS_STRING,
- EINA_TRUE);
+ EINA_TRUE);
nItemCount++;
}
if (nItemCount > 0) {
mp_ft_ctrl_move_more_popup(g_pToolbarWidget->pMoreCtxPopup,
- pTargetObject);
+ pTargetObject);
evas_object_show(g_pToolbarWidget->pMoreCtxPopup);
} else {
mp_ft_ctrl_free_toolbar_btn();
}
-void mp_ft_ctrl_more_btn_cb(void *pUserData, Evas_Object *pObject,
- void *pEventInfo)
+void mp_ft_ctrl_more_btn_cb(void *pUserData, Evas_Object * pObject,
+ void *pEventInfo)
{
if (!pObject) {
VideoLogInfo("[ERR]");
int nVideoListSize =
mp_util_svc_get_number_of_video_item_by_type();
VideoLogInfo("g_pToolbarWidget->nFooterListTabType=%d",
- g_pToolbarWidget->nFooterListTabType);
+ g_pToolbarWidget->nFooterListTabType);
if (nVideoListSize > 0) {
if (g_pToolbarWidget->nFooterListTabType ==
- FOOTER_TAB_TYPE_PERSONAL) {
- mp_ft_ctrl_create_more_btn_of_personal(pUserData,
- pObject);
+ FOOTER_TAB_TYPE_PERSONAL) {
+ mp_ft_ctrl_create_more_btn_of_personal(pUserData, pObject);
} else {
VideoLogError("invalid footer type");
}
}
void mp_ft_ctrl_create_center_button(void *pUserData,
- void *pToolbarCenterButtonCb)
+ void *pToolbarCenterButtonCb)
{
if (!g_pToolbarWidget) {
VideoLogError("g_pToolbarWidget is NULL.");
g_pToolbarWidget->pViewButton =
mp_ft_ctrl_create_toolbar_btn(g_pToolbarWidget->pNaviFrameHandle,
- MP_VPL_LIST_TAB_VIEW,
- pToolbarCenterButtonCb, pUserData);
+ MP_VPL_LIST_TAB_VIEW,
+ pToolbarCenterButtonCb, pUserData);
elm_object_item_part_content_set(g_pToolbarWidget->pNaviFrameItem,
- "toolbar_button1",
- g_pToolbarWidget->pViewButton);
+ "toolbar_button1",
+ g_pToolbarWidget->pViewButton);
}
void mp_ft_ctrl_create_center_toolbar(void *pParent,
- void *pToolbarCenterButtonCb)
+ void *pToolbarCenterButtonCb)
{
if (!g_pToolbarWidget || !pParent) {
VideoLogError("g_pToolbarWidget or pParent is NULL.");
elm_toolbar_transverse_expanded_set(toolbar, EINA_TRUE);
elm_toolbar_select_mode_set(toolbar, ELM_OBJECT_SELECT_MODE_NONE);
elm_toolbar_item_append(toolbar, NULL, MP_VPL_LIST_TAB_VIEW,
- pToolbarCenterButtonCb, NULL);
+ pToolbarCenterButtonCb, NULL);
if (g_pToolbarWidget->pNaviFrameItem) {
elm_object_item_part_content_set(g_pToolbarWidget->pNaviFrameItem,
- "toolbar", toolbar);
+ "toolbar", toolbar);
}
}
if (g_pToolbarWidget->pNaviFrameItem) {
toolbar =
- elm_object_item_part_content_unset(g_pToolbarWidget->
- pNaviFrameItem, "toolbar");
+ elm_object_item_part_content_unset
+ (g_pToolbarWidget->pNaviFrameItem, "toolbar");
MP_DEL_OBJ(toolbar);
}
}
}
if (g_pToolbarWidget->pNaviFrameItem) {
- elm_object_item_part_content_unset(g_pToolbarWidget->
- pNaviFrameItem,
- "toolbar_button1");
+ elm_object_item_part_content_unset
+ (g_pToolbarWidget->pNaviFrameItem, "toolbar_button1");
}
if (g_pToolbarWidget->pViewButton) {
}
if (g_pToolbarWidget->pNaviFrameItem) {
- elm_object_item_part_content_unset(g_pToolbarWidget->
- pNaviFrameItem,
- "toolbar_more_btn");
+ elm_object_item_part_content_unset
+ (g_pToolbarWidget->pNaviFrameItem, "toolbar_more_btn");
}
if (g_pToolbarWidget->pMoreToolbarButton) {
}
}
-void mp_ft_ctrl_registe_cb_func(st_RegisteCbFunc *pCallbackFunc)
+void mp_ft_ctrl_registe_cb_func(st_RegisteCbFunc * pCallbackFunc)
{
if (!g_pToolbarWidget) {
VideoLogError("g_pToolbarWidget == NULL");
VideoLogInfo("");
memset((void *) &g_pToolbarWidget->ToolbarCbFunc, 0,
- sizeof(st_RegisteCbFunc));
+ sizeof(st_RegisteCbFunc));
if (pCallbackFunc->DownloadCb) {
g_pToolbarWidget->ToolbarCbFunc.DownloadCb =
}
if (pCallbackFunc->SearchCb) {
- g_pToolbarWidget->ToolbarCbFunc.SearchCb =
- pCallbackFunc->SearchCb;
+ g_pToolbarWidget->ToolbarCbFunc.SearchCb = pCallbackFunc->SearchCb;
}
if (pCallbackFunc->DeleteCb) {
- g_pToolbarWidget->ToolbarCbFunc.DeleteCb =
- pCallbackFunc->DeleteCb;
+ g_pToolbarWidget->ToolbarCbFunc.DeleteCb = pCallbackFunc->DeleteCb;
}
if (pCallbackFunc->SortItemCb) {
}
if (pCallbackFunc->ViewAsCb) {
- g_pToolbarWidget->ToolbarCbFunc.ViewAsCb =
- pCallbackFunc->ViewAsCb;
+ g_pToolbarWidget->ToolbarCbFunc.ViewAsCb = pCallbackFunc->ViewAsCb;
}
if (pCallbackFunc->AutoPlayCb) {
- g_pToolbarWidget->ToolbarCbFunc.AutoPlayCb =
- pCallbackFunc->AutoPlayCb;
+ g_pToolbarWidget->ToolbarCbFunc.AutoPlayCb =
+ pCallbackFunc->AutoPlayCb;
}
if (pCallbackFunc->SignInCb) {
- g_pToolbarWidget->ToolbarCbFunc.SignInCb =
- pCallbackFunc->SignInCb;
+ g_pToolbarWidget->ToolbarCbFunc.SignInCb = pCallbackFunc->SignInCb;
}
if (pCallbackFunc->ShareViaCb) {
}
if (pCallbackFunc->RenameCb) {
- g_pToolbarWidget->ToolbarCbFunc.RenameCb =
- pCallbackFunc->RenameCb;
+ g_pToolbarWidget->ToolbarCbFunc.RenameCb = pCallbackFunc->RenameCb;
}
if (pCallbackFunc->DetailsCb) {
void mp_ft_ctrl_create(void *pNaviFrameHandle, void *pNaviFrameItem,
- MpFooterLibraryMainListTabType nFooterListTabType,
- st_RegisteCbFunc *pRegisteCbFunc)
+ MpFooterLibraryMainListTabType nFooterListTabType,
+ st_RegisteCbFunc * pRegisteCbFunc)
{
if (!pNaviFrameHandle) {
VideoLogError("g_pToolbarWidget is NULL.");
}
g_pToolbarWidget->pMoreToolbarButton =
- mp_ft_ctrl_create_more_style_btn(g_pToolbarWidget->
- pNaviFrameHandle,
- mp_ft_ctrl_more_btn_cb, NULL);
+ mp_ft_ctrl_create_more_style_btn
+ (g_pToolbarWidget->pNaviFrameHandle, mp_ft_ctrl_more_btn_cb, NULL);
elm_object_item_part_content_set(g_pToolbarWidget->pNaviFrameItem,
- "toolbar_more_btn",
- g_pToolbarWidget->
- pMoreToolbarButton);
+ "toolbar_more_btn",
+ g_pToolbarWidget->pMoreToolbarButton);
}
void mp_ft_ctrl_destroy(void)
if (g_pToolbarWidget->pMoreCtxPopup) {
evas_object_smart_callback_del(g_pToolbarWidget->pMoreCtxPopup,
- "dismissed",
- mp_ft_ctrl_more_popup_dismissed_cb);
- /*evas_object_hide(g_pToolbarWidget->pMoreCtxPopup);*/
+ "dismissed",
+ mp_ft_ctrl_more_popup_dismissed_cb);
evas_object_del(g_pToolbarWidget->pMoreCtxPopup);
g_pToolbarWidget->pMoreCtxPopup = NULL;
}
}
void mp_ft_ctrl_set_list_tab_type(MpFooterLibraryMainListTabType
- nFooterListTabType)
+ nFooterListTabType)
{
if (!g_pToolbarWidget) {
VideoLogError("g_pToolbarWidget == NULL");
if (g_pToolbarWidget->nFooterListTabType == FOOTER_TAB_TYPE_PERSONAL) {
VideoLogInfo("FOOTER_TAB_TYPE_PERSONAL");
} else if (g_pToolbarWidget->nFooterListTabType ==
- FOOTER_TAB_TYPE_DOWNLOAD) {
+ FOOTER_TAB_TYPE_DOWNLOAD) {
VideoLogInfo("FOOTER_TAB_TYPE_DOWNLOAD");
} else {
g_pToolbarWidget->nFooterListTabType = FOOTER_TAB_TYPE_PERSONAL;
{
VideoLogInfo("");
if (g_pToolbarWidget != NULL
- && g_pToolbarWidget->pMoreCtxPopup != NULL) {
+ && g_pToolbarWidget->pMoreCtxPopup != NULL) {
mp_ft_ctrl_move_more_popup(g_pToolbarWidget->pMoreCtxPopup, NULL);
evas_object_show(g_pToolbarWidget->pMoreCtxPopup);
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <glib.h>
#include <stdbool.h>
/*Focus UI*/
-void mp_widget_ctrl_navi_item_layout_focus_out(Evas_Object *pFocusLayout)
+void mp_widget_ctrl_navi_item_layout_focus_out(Evas_Object * pFocusLayout)
{
if (pFocusLayout == NULL) {
VideoLogError("pFocusLayout is NULL");
elm_object_focus_allow_set(pFocusLayout, EINA_FALSE);
}
-void mp_widget_ctrl_navi_item_layout_focus_in(Evas_Object *pFocusLayout)
+void mp_widget_ctrl_navi_item_layout_focus_in(Evas_Object * pFocusLayout)
{
if (pFocusLayout == NULL) {
VideoLogError("pFocusLayout is NULL");
elm_object_focus_set(pFocusLayout, EINA_TRUE);
}
-void mp_widget_ctrl_enable_navi_handle_focus(Evas_Object *pNaviHandle)
+void mp_widget_ctrl_enable_navi_handle_focus(Evas_Object * pNaviHandle)
{
return;
}
void mp_widget_ctrl_disable_navi_handle_focus_except_item(Evas_Object *
- pNaviHandle,
- Elm_Object_Item
- *
- pCurentNaviItem)
+ pNaviHandle,
+ Elm_Object_Item
+ *
+ pCurentNaviItem)
{
return;
}
-void mp_widget_ctrl_set_popup_min_size(Evas_Object *pBox, int nListCount,
- euPopUpStyle eStyle)
+void mp_widget_ctrl_set_popup_min_size(Evas_Object * pBox, int nListCount,
+ euPopUpStyle eStyle)
{
if (pBox) {
int nMinHeight = 0;
switch (eStyle) {
case VIDEOS_POPUP_114:
if (mp_rotate_ctrl_check_landspace_by_win
- ((Evas_Object *) mp_util_get_main_window_handle())) {
+ ((Evas_Object *) mp_util_get_main_window_handle())) {
nMinHeight = VIDEO_POPUP_LIST_HEIGHT_L(nListCount);
} else {
nMinHeight = VIDEO_POPUP_LIST_HEIGHT(nListCount);
break;
case VIDEOS_POPUP_141:
if (mp_rotate_ctrl_check_landspace_by_win
- ((Evas_Object *) mp_util_get_main_window_handle())) {
+ ((Evas_Object *) mp_util_get_main_window_handle())) {
nMinHeight = VIDEO_POPUP_2_TEXT_HEIGHT_L(nListCount);
} else {
nMinHeight = VIDEO_POPUP_2_TEXT_HEIGHT(nListCount);
}
evas_object_size_hint_min_set(pBox,
- VIDEO_POPUP_ITEM_W *
- elm_config_scale_get(),
- nMinHeight *
- elm_config_scale_get());
+ VIDEO_POPUP_ITEM_W *
+ elm_config_scale_get(),
+ nMinHeight * elm_config_scale_get());
}
}
-Evas_Object *mp_widget_ctrl_create_navi_btn(Evas_Object *pParent,
- const char *pIconPath,
- Evas_Smart_Cb pFunc,
- void *pUserData)
+Evas_Object *mp_widget_ctrl_create_navi_btn(Evas_Object * pParent,
+ const char *pIconPath,
+ Evas_Smart_Cb pFunc,
+ void *pUserData)
{
if (!pParent) {
VideoLogError("pParent is NULL");
}
VideoLogInfo("");
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_PLAYER_IMAGE_NAME_EDJ);
+ snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
+ VIDEO_PLAYER_IMAGE_NAME_EDJ);
free(path);
Evas_Object *pImage = elm_image_add(pParent);
elm_image_file_set(pImage, edj_path, pIconPath);
Evas_Object *pTitleBtn = elm_button_add(pParent);
elm_object_style_set(pTitleBtn, "naviframe/title_icon");
elm_object_part_content_set(pTitleBtn, "icon", pImage);
- evas_object_smart_callback_add(pTitleBtn, "clicked", pFunc,
- pUserData);
+ evas_object_smart_callback_add(pTitleBtn, "clicked", pFunc, pUserData);
return pTitleBtn;
}
-Evas_Object *mp_widget_ctrl_create_navi_left_btn(Evas_Object *pParent,
- Elm_Object_Item *
- pNaviItem,
- const char *pIconPath,
- Evas_Smart_Cb pFunc,
- void *pUserData)
+Evas_Object *mp_widget_ctrl_create_navi_left_btn(Evas_Object * pParent,
+ Elm_Object_Item *
+ pNaviItem,
+ const char *pIconPath,
+ Evas_Smart_Cb pFunc,
+ void *pUserData)
{
if (!pParent || !pNaviItem) {
if (pIconPath) {
pLeftbtn =
mp_widget_ctrl_create_navi_btn(pParent, pIconPath, pFunc,
- pUserData);
+ pUserData);
} else {
pLeftbtn = elm_button_add(pParent);
elm_object_style_set(pLeftbtn, "naviframe/title_cancel");
evas_object_smart_callback_add(pLeftbtn, "clicked", pFunc,
- pUserData);
+ pUserData);
}
if (!pLeftbtn) {
}
elm_object_item_part_content_set(pNaviItem, "title_left_btn",
- pLeftbtn);
+ pLeftbtn);
evas_object_show(pLeftbtn);
}
-Evas_Object *mp_widget_ctrl_create_navi_right_btn(Evas_Object *pParent,
- Elm_Object_Item *
- pNaviItem,
- const char *pIconPath,
- Evas_Smart_Cb pFunc,
- void *pUserData)
+Evas_Object *mp_widget_ctrl_create_navi_right_btn(Evas_Object * pParent,
+ Elm_Object_Item *
+ pNaviItem,
+ const char *pIconPath,
+ Evas_Smart_Cb pFunc,
+ void *pUserData)
{
if (!pParent || !pNaviItem) {
if (pIconPath) {
pRightbtn =
mp_widget_ctrl_create_navi_btn(pParent, pIconPath, pFunc,
- pUserData);
+ pUserData);
} else {
pRightbtn = elm_button_add(pParent);
elm_object_style_set(pRightbtn, "naviframe/title_done");
evas_object_smart_callback_add(pRightbtn, "clicked", pFunc,
- pUserData);
+ pUserData);
}
if (!pRightbtn) {
}
elm_object_item_part_content_set(pNaviItem, "title_right_btn",
- pRightbtn);
+ pRightbtn);
evas_object_show(pRightbtn);
}
-bool mp_widget_ctrl_create_select_all_layout(Evas_Object *pParent,
- Evas_Smart_Cb pChangeFunc,
- Evas_Object_Event_Cb
- pMouseDownFunc,
- void *pUserData,
- Evas_Object **pCheckBox,
- Evas_Object **pSelectLayout)
+bool mp_widget_ctrl_create_select_all_layout(Evas_Object * pParent,
+ Evas_Smart_Cb pChangeFunc,
+ Evas_Object_Event_Cb
+ pMouseDownFunc,
+ void *pUserData,
+ Evas_Object ** pCheckBox,
+ Evas_Object ** pSelectLayout)
{
if (!pParent) {
VideoLogError("parent is NULL.");
Evas_Object *pSelectAllLayout = elm_layout_add(pParent);
elm_layout_theme_set(pSelectAllLayout, "genlist", "item",
- "group_index/default");
- /*elm_layout_file_set(pSelectAllLayout, VIDEO_CUSTOM_THEME, "select.all.layout");*/
+ "group_index/default");
evas_object_size_hint_weight_set(pSelectAllLayout, EVAS_HINT_EXPAND,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_size_hint_align_set(pSelectAllLayout, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_event_callback_add(pSelectAllLayout,
- EVAS_CALLBACK_MOUSE_DOWN,
- pMouseDownFunc, NULL);
+ EVAS_CALLBACK_MOUSE_DOWN,
+ pMouseDownFunc, NULL);
*pSelectLayout = pSelectAllLayout;
Evas_Object *pSelectAllCheckbox = elm_check_add(pSelectAllLayout);
- /*elm_check_state_pointer_set(pSelectAllCheckbox, (void *)FALSE);*/
evas_object_smart_callback_add(pSelectAllCheckbox, "changed",
- pChangeFunc, NULL);
+ pChangeFunc, NULL);
evas_object_propagate_events_set(pSelectAllCheckbox, EINA_FALSE);
elm_object_part_content_set(pSelectAllLayout, "elm.swallow.end",
- pSelectAllCheckbox);
+ pSelectAllCheckbox);
elm_object_domain_translatable_part_text_set(pSelectAllLayout,
- "elm.text",
- VIDEOS_STRING,
- VIDEOS_SELECTVIEW_BODY_SELECT_ALL_IDS);
+ "elm.text",
+ VIDEOS_STRING,
+ VIDEOS_SELECTVIEW_BODY_SELECT_ALL_IDS);
evas_object_show(pSelectAllLayout);
*pCheckBox = pSelectAllCheckbox;
return TRUE;
}
-Evas_Object *mp_widget_ctrl_create_progressbar(Evas_Object *pParent,
- double dRadio)
+Evas_Object *mp_widget_ctrl_create_progressbar(Evas_Object * pParent,
+ double dRadio)
{
if (!pParent) {
return NULL;
}
Evas_Object *pProgressBar = elm_progressbar_add(pParent);
elm_object_style_set(pProgressBar,
- "elm/progressbar/horizontal/default");
+ "elm/progressbar/horizontal/default");
elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
elm_progressbar_span_size_set(pProgressBar,
- VIDEO_LIST_PROGRESSBAR_LENGTH);
+ VIDEO_LIST_PROGRESSBAR_LENGTH);
evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pProgressBar, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
elm_progressbar_value_set(pProgressBar, dRadio);
return pProgressBar;
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
#include <Ecore_Evas.h>
#define PREF_MP_VIDEO_AUTO_PLAY_TYPE_KEY "preference/org.tizen.videos/auto_play_type"
-typedef struct _MpVideoAutoPlay{
+typedef struct _MpVideoAutoPlay {
//obj
Evas_Object *pPopUpHandle;
Evas_Object *pGroupRadio;
//data
Elm_Genlist_Item_Class *stAutoPlayItc;
MpListAutoPlaySelect nAutoPlaySelect;
-}stMpVideoAutoPlay;
+} stMpVideoAutoPlay;
stMpVideoAutoPlay *g_pAutoPlayHandle = NULL;
////////////////////////////////////////////////////////////
// Internal function
////////////////////////////////////////////////////////////
-static void __mp_auto_play_ctrl_rotate_cb(void *data, Evas_Object *obj, void *event_info);
-static void __mp_auto_play_ctrl_mouse_up_cb(void *pUserData, Evas *pEvas, Evas_Object *pObject, void *pEventInfo);
-static void __mp_auto_play_ctrl_cancel_btn_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo);
-static void __mp_auto_play_ctrl_select_item_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo);
-static void __mp_auto_play_ctrl_select_radio_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo);
+static void __mp_auto_play_ctrl_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info);
+static void __mp_auto_play_ctrl_mouse_up_cb(void *pUserData, Evas * pEvas,
+ Evas_Object * pObject,
+ void *pEventInfo);
+static void __mp_auto_play_ctrl_cancel_btn_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo);
+static void __mp_auto_play_ctrl_select_item_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo);
+static void __mp_auto_play_ctrl_select_radio_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo);
-/*void mp_auto_play_config_set_auto_play_status(bool bMultiPlay)
-{
- int nErr = 0;
-
- nErr = preference_set_boolean(PREF_MP_VIDEO_AUTO_PLAY_TYPE_KEY, bMultiPlay);
- if (nErr != 0) {
- VideoLogError("failed to set MULTI PLAY FLAG [0x%x]", nErr);
- return FALSE;
- }
-
- return TRUE;
-}*/
bool mp_auto_play_config_get_auto_play_status()
{
VideoLogError("failed to get MULTI PLAY FLAG [0x%x]", nErr);
return FALSE;
}
- if(nVal)
+ if (nVal)
return TRUE;
else
return FALSE;
}
+
void mp_auto_play_ctrl_delete_handle(void)
{
VideoLogInfo("");
- if (!g_pAutoPlayHandle)
- {
+ if (!g_pAutoPlayHandle) {
VideoLogError("-------g_pAutoPlayHandle is NULL--------");
return;
}
- if (g_pAutoPlayHandle->pPopUpHandle)
- {
- eext_object_event_callback_del(g_pAutoPlayHandle->pPopUpHandle, EEXT_CALLBACK_BACK, __mp_auto_play_ctrl_cancel_btn_cb);
- evas_object_event_callback_del(g_pAutoPlayHandle->pPopUpHandle, EVAS_CALLBACK_MOUSE_UP, __mp_auto_play_ctrl_mouse_up_cb);
- evas_object_smart_callback_del(g_pAutoPlayHandle->pPopUpHandle, "block,clicked", __mp_auto_play_ctrl_cancel_btn_cb);
- evas_object_smart_callback_del((Evas_Object*)mp_util_get_main_window_handle(), "rotation,changed", __mp_auto_play_ctrl_rotate_cb);
+ if (g_pAutoPlayHandle->pPopUpHandle) {
+ eext_object_event_callback_del(g_pAutoPlayHandle->pPopUpHandle,
+ EEXT_CALLBACK_BACK,
+ __mp_auto_play_ctrl_cancel_btn_cb);
+ evas_object_event_callback_del(g_pAutoPlayHandle->pPopUpHandle,
+ EVAS_CALLBACK_MOUSE_UP,
+ __mp_auto_play_ctrl_mouse_up_cb);
+ evas_object_smart_callback_del(g_pAutoPlayHandle->pPopUpHandle,
+ "block,clicked",
+ __mp_auto_play_ctrl_cancel_btn_cb);
+ evas_object_smart_callback_del((Evas_Object *)
+ mp_util_get_main_window_handle(),
+ "rotation,changed",
+ __mp_auto_play_ctrl_rotate_cb);
}
MP_DEL_OBJ(g_pAutoPlayHandle->pGroupRadio);
MP_DEL_OBJ(g_pAutoPlayHandle->pGenList);
void mp_auto_play_ctrl_set_type(MpListAutoPlaySelect nAutoPlaySelect)
{
- if (!g_pAutoPlayHandle)
- {
+ if (!g_pAutoPlayHandle) {
VideoLogError("");
return;
}
- if (MP_LIST_AUTO_PLAY_NONE >= nAutoPlaySelect || nAutoPlaySelect >= MP_LIST_AUTO_PLAY_MAX)
- {
- VideoLogWarning("[WARNING] Value of Auto Play selection is not matched.");
+ if (MP_LIST_AUTO_PLAY_NONE >= nAutoPlaySelect
+ || nAutoPlaySelect >= MP_LIST_AUTO_PLAY_MAX) {
+ VideoLogWarning
+ ("[WARNING] Value of Auto Play selection is not matched.");
g_pAutoPlayHandle->nAutoPlaySelect = MP_LIST_AUTO_PLAY_OFF;
}
}
-static char *__mp_auto_play_ctrl_get_label_of_genlsit_item_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static char *__mp_auto_play_ctrl_get_label_of_genlsit_item_cb(const void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char
+ *pPart)
{
- int nIndex = (int)pUserData;
+ int nIndex = (int) pUserData;
- if (!strcmp(pPart, "elm.text") || !strcmp(pPart, "elm.text.main.left"))
- {
- switch (nIndex)
- {
- case MP_LIST_AUTO_PLAY_ON: return strdup(VIDEOS_STRING_COM_ON);
- case MP_LIST_AUTO_PLAY_OFF: return strdup(VIDEOS_STRING_COM_OFF);
+ if (!strcmp(pPart, "elm.text") || !strcmp(pPart, "elm.text.main.left")) {
+ switch (nIndex) {
+ case MP_LIST_AUTO_PLAY_ON:
+ return strdup(VIDEOS_STRING_COM_ON);
+ case MP_LIST_AUTO_PLAY_OFF:
+ return strdup(VIDEOS_STRING_COM_OFF);
}
}
return NULL;
}
-static Evas_Object *__mp_auto_play_ctrl_get_icon_of_genlsit_item_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static Evas_Object *__mp_auto_play_ctrl_get_icon_of_genlsit_item_cb(const
+ void
+ *pUserData,
+ Evas_Object
+ *
+ pObject,
+ const
+ char
+ *pPart)
{
- if (!g_pAutoPlayHandle)
- {
+ if (!g_pAutoPlayHandle) {
VideoLogError("");
return NULL;
}
- int nIndex = (int)pUserData;
+ int nIndex = (int) pUserData;
Evas_Object *pTmpRadio = NULL;
- /*Evas_Object *pLayout = NULL;*/
-
- if (!strcmp(pPart, "elm.swallow.end") || !strcmp(pPart, "elm.icon.2"))
- {
- //pLayout = elm_layout_add(pObject);
- //elm_layout_theme_set(pLayout, "layout", "list/C/type.2", "default");
- //pTmpRadio = elm_radio_add(pLayout);
+ if (!strcmp(pPart, "elm.swallow.end") || !strcmp(pPart, "elm.icon.2")) {
pTmpRadio = elm_radio_add(pObject);
elm_radio_state_value_set(pTmpRadio, nIndex);
elm_radio_group_add(pTmpRadio, g_pAutoPlayHandle->pGroupRadio);
- if (g_pAutoPlayHandle->nAutoPlaySelect == nIndex)
- {
- elm_radio_value_set(g_pAutoPlayHandle->pGroupRadio, g_pAutoPlayHandle->nAutoPlaySelect);
+ if (g_pAutoPlayHandle->nAutoPlaySelect == nIndex) {
+ elm_radio_value_set(g_pAutoPlayHandle->pGroupRadio,
+ g_pAutoPlayHandle->nAutoPlaySelect);
mp_auto_play_ctrl_set_type(g_pAutoPlayHandle->nAutoPlaySelect);
}
- evas_object_smart_callback_add(pTmpRadio, "changed", __mp_auto_play_ctrl_select_radio_cb, (void *)pUserData);
- //elm_layout_content_set(pLayout, "elm.swallow.content", pTmpRadio);
+ evas_object_smart_callback_add(pTmpRadio, "changed",
+ __mp_auto_play_ctrl_select_radio_cb,
+ (void *) pUserData);
evas_object_show(pTmpRadio);
- //evas_object_show(pLayout);
}
- //return pLayout;
return pTmpRadio;
}
-static void __mp_auto_play_ctrl_cancel_btn_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_auto_play_ctrl_cancel_btn_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
mp_auto_play_ctrl_hide();
}
-static void __mp_auto_play_ctrl_select_item_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_auto_play_ctrl_select_item_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
- if (!g_pAutoPlayHandle)
- {
+ if (!g_pAutoPlayHandle) {
VideoLogError("g_pAutoPlayHandle is ?NULL");
return;
}
}
int nIndex = 0;
- Elm_Object_Item *pItem = (Elm_Object_Item *)pEventInfo;
- Elm_Object_Item *pSelectedItem = elm_genlist_selected_item_get(pObject);
- if (pSelectedItem)
- {
+ Elm_Object_Item *pItem = (Elm_Object_Item *) pEventInfo;
+ Elm_Object_Item *pSelectedItem =
+ elm_genlist_selected_item_get(pObject);
+ if (pSelectedItem) {
elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
}
- nIndex = (int)elm_object_item_data_get(pItem);
- VideoLogError("====================nindex=%d",nIndex);
- if(nIndex == 1) {
+ nIndex = (int) elm_object_item_data_get(pItem);
+ VideoLogError("====================nindex=%d", nIndex);
+ if (nIndex == 1) {
VideoLogError("====================vp_set_auto_play=%true");
vp_set_auto_play(true);
- }
- else
- {
+ } else {
VideoLogError("====================vp_set_auto_play=%false");
vp_set_auto_play(false);
}
- if(vp_is_auto_play_on())
- {
+ if (vp_is_auto_play_on()) {
VideoLogError("====================found vp_set_auto_play=%true");
}
if (nIndex == g_pAutoPlayHandle->nAutoPlaySelect) {
mp_auto_play_ctrl_hide();
} else {
g_pAutoPlayHandle->nAutoPlaySelect = nIndex;
- elm_radio_value_set(g_pAutoPlayHandle->pGroupRadio, g_pAutoPlayHandle->nAutoPlaySelect);
+ elm_radio_value_set(g_pAutoPlayHandle->pGroupRadio,
+ g_pAutoPlayHandle->nAutoPlaySelect);
mp_auto_play_ctrl_set_type(g_pAutoPlayHandle->nAutoPlaySelect);
- /*ListAutoPlayCtrlCbFunc fFunc = g_pAutoPlayHandle->ListAutoPlayCtrlUserCbFunc;*/
mp_auto_play_ctrl_hide();
-/*
- if (fFunc)
- {
- fFunc();
- }*/
}
}
-static void __mp_auto_play_ctrl_select_radio_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_auto_play_ctrl_select_radio_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
- if (!g_pAutoPlayHandle)
- {
+ if (!g_pAutoPlayHandle) {
VideoLogError("");
return;
}
- int nIndex = (int)pUserData;
+ int nIndex = (int) pUserData;
- VideoLogError("====================nindex=%d",nIndex);
- if(nIndex == 1) {
+ VideoLogError("====================nindex=%d", nIndex);
+ if (nIndex == 1) {
VideoLogError("====================vp_set_auto_play=true");
vp_set_auto_play(true);
- }
- else
- {
+ } else {
VideoLogError("====================vp_set_auto_play=false");
vp_set_auto_play(false);
}
- if(vp_is_auto_play_on())
- {
+ if (vp_is_auto_play_on()) {
VideoLogError("====================found vp_set_auto_play=true");
}
if (nIndex == g_pAutoPlayHandle->nAutoPlaySelect) {
mp_auto_play_ctrl_hide();
} else {
g_pAutoPlayHandle->nAutoPlaySelect = nIndex;
- elm_radio_value_set(g_pAutoPlayHandle->pGroupRadio, g_pAutoPlayHandle->nAutoPlaySelect);
+ elm_radio_value_set(g_pAutoPlayHandle->pGroupRadio,
+ g_pAutoPlayHandle->nAutoPlaySelect);
mp_auto_play_ctrl_set_type(g_pAutoPlayHandle->nAutoPlaySelect);
- /*ListAutoPlayCtrlCbFunc fFunc = g_pAutoPlayHandle->ListAutoPlayCtrlUserCbFunc;*/
mp_auto_play_ctrl_hide();
}
}
-static void __mp_auto_play_ctrl_mouse_up_cb(void *pUserData, Evas *pEvas, Evas_Object *pObject, void *pEventInfo)
+static void __mp_auto_play_ctrl_mouse_up_cb(void *pUserData, Evas * pEvas,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
Evas_Event_Mouse_Up *pEvent = pEventInfo;
- if (pEvent->button == 3)
- {
+ if (pEvent->button == 3) {
mp_auto_play_ctrl_hide();
}
}
-static void __mp_auto_play_ctrl_realized(void *data, Evas_Object *obj, void *event_info)
+static void __mp_auto_play_ctrl_realized(void *data, Evas_Object * obj,
+ void *event_info)
{
- if (!event_info || !obj)
- {
+ if (!event_info || !obj) {
VideoLogError("event info is invalid");
return;
}
Elm_Object_Item *pItem = elm_genlist_last_item_get(obj);
- if (pItem)
- {
- elm_object_item_signal_emit(pItem, "elm,state,bottomline,hide", "");
+ if (pItem) {
+ elm_object_item_signal_emit(pItem, "elm,state,bottomline,hide",
+ "");
}
}
-static void __mp_auto_play_ctrl_rotate_cb(void *data, Evas_Object *obj, void *event_info)
+static void __mp_auto_play_ctrl_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
- if (!g_pAutoPlayHandle)
- {
+ if (!g_pAutoPlayHandle) {
VideoLogError("pVideoListSortPopUpHandle IS null");
return;
}
- /*if (g_pAutoPlayHandle->nListCount < VIDEO_POPUP_MIN_ITEMS)
- {
- return;
- }*/
- mp_widget_ctrl_set_popup_min_size(g_pAutoPlayHandle->pBox,2, VIDEOS_POPUP_114);
+ mp_widget_ctrl_set_popup_min_size(g_pAutoPlayHandle->pBox, 2,
+ VIDEOS_POPUP_114);
}
mp_auto_play_ctrl_delete_handle();
- g_pAutoPlayHandle = (stMpVideoAutoPlay*)calloc(1, sizeof(stMpVideoAutoPlay));
- if (!g_pAutoPlayHandle)
- {
+ g_pAutoPlayHandle =
+ (stMpVideoAutoPlay *) calloc(1, sizeof(stMpVideoAutoPlay));
+ if (!g_pAutoPlayHandle) {
VideoLogError("g_pAutoPlayHandle is NULL");
return FALSE;
}
- //g_pAutoPlayHandle->ListAutoPlayCtrlUserCbFunc = pListAutoPlayCtrlCb;
g_pAutoPlayHandle->nAutoPlaySelect = MP_LIST_AUTO_PLAY_OFF;
g_pAutoPlayHandle->nAutoPlaySelect = mp_auto_play_ctrl_get_type();
- g_pAutoPlayHandle->pPopUpHandle = elm_popup_add(mp_util_get_main_window_handle());
-
-
- //elm_object_style_set(pListAutoPlayPopUpHandle, "content_no_vhpad"); //menustyle
- elm_object_style_set(g_pAutoPlayHandle->pPopUpHandle, "default"); //menustyle
- elm_object_domain_translatable_part_text_set(g_pAutoPlayHandle->pPopUpHandle, "title,text", PACKAGE, VIDEOS_MENU_AUTO_PLAY_NEXT_POP_HEADER);
- evas_object_size_hint_weight_set(g_pAutoPlayHandle->pPopUpHandle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- eext_object_event_callback_add(g_pAutoPlayHandle->pPopUpHandle, EEXT_CALLBACK_BACK, __mp_auto_play_ctrl_cancel_btn_cb, NULL);
- evas_object_event_callback_add(g_pAutoPlayHandle->pPopUpHandle, EVAS_CALLBACK_MOUSE_UP, __mp_auto_play_ctrl_mouse_up_cb, NULL);
- evas_object_smart_callback_add(g_pAutoPlayHandle->pPopUpHandle, "block,clicked", __mp_auto_play_ctrl_cancel_btn_cb, NULL);
- evas_object_smart_callback_add((Evas_Object*)mp_util_get_main_window_handle(), "rotation,changed", __mp_auto_play_ctrl_rotate_cb, NULL);
+ g_pAutoPlayHandle->pPopUpHandle =
+ elm_popup_add(mp_util_get_main_window_handle());
+ elm_object_style_set(g_pAutoPlayHandle->pPopUpHandle, "theme_bg");
+
+ elm_object_domain_translatable_part_text_set(g_pAutoPlayHandle->
+ pPopUpHandle,
+ "title,text", PACKAGE,
+ VIDEOS_MENU_AUTO_PLAY_NEXT_POP_HEADER);
+ evas_object_size_hint_weight_set(g_pAutoPlayHandle->pPopUpHandle,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+ eext_object_event_callback_add(g_pAutoPlayHandle->pPopUpHandle,
+ EEXT_CALLBACK_BACK,
+ __mp_auto_play_ctrl_cancel_btn_cb,
+ NULL);
+ evas_object_event_callback_add(g_pAutoPlayHandle->pPopUpHandle,
+ EVAS_CALLBACK_MOUSE_UP,
+ __mp_auto_play_ctrl_mouse_up_cb, NULL);
+ evas_object_smart_callback_add(g_pAutoPlayHandle->pPopUpHandle,
+ "block,clicked",
+ __mp_auto_play_ctrl_cancel_btn_cb,
+ NULL);
+ evas_object_smart_callback_add((Evas_Object *)
+ mp_util_get_main_window_handle(),
+ "rotation,changed",
+ __mp_auto_play_ctrl_rotate_cb, NULL);
// Set item of Genlist.
MP_DEL_ITC(g_pAutoPlayHandle->stAutoPlayItc);
g_pAutoPlayHandle->stAutoPlayItc = elm_genlist_item_class_new();
g_pAutoPlayHandle->stAutoPlayItc->item_style = "default"; //"1text.1icon.2/popup";
- g_pAutoPlayHandle->stAutoPlayItc->func.text_get = (void *)__mp_auto_play_ctrl_get_label_of_genlsit_item_cb;
- g_pAutoPlayHandle->stAutoPlayItc->func.content_get = (void *)__mp_auto_play_ctrl_get_icon_of_genlsit_item_cb;
+ g_pAutoPlayHandle->stAutoPlayItc->func.text_get =
+ (void *) __mp_auto_play_ctrl_get_label_of_genlsit_item_cb;
+ g_pAutoPlayHandle->stAutoPlayItc->func.content_get =
+ (void *) __mp_auto_play_ctrl_get_icon_of_genlsit_item_cb;
g_pAutoPlayHandle->stAutoPlayItc->func.state_get = NULL;
g_pAutoPlayHandle->stAutoPlayItc->func.del = NULL;
// Create genlist handle
- g_pAutoPlayHandle->pGenList = elm_genlist_add(g_pAutoPlayHandle->pPopUpHandle);
- evas_object_size_hint_weight_set(g_pAutoPlayHandle->pGenList, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(g_pAutoPlayHandle->pGenList, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_smart_callback_add(g_pAutoPlayHandle->pGenList, "realized", __mp_auto_play_ctrl_realized, NULL);
-
- g_pAutoPlayHandle->pGroupRadio = elm_radio_add(g_pAutoPlayHandle->pGenList);
+ g_pAutoPlayHandle->pGenList =
+ elm_genlist_add(g_pAutoPlayHandle->pPopUpHandle);
+ evas_object_size_hint_weight_set(g_pAutoPlayHandle->pGenList,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(g_pAutoPlayHandle->pGenList,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_smart_callback_add(g_pAutoPlayHandle->pGenList, "realized",
+ __mp_auto_play_ctrl_realized, NULL);
+
+ g_pAutoPlayHandle->pGroupRadio =
+ elm_radio_add(g_pAutoPlayHandle->pGenList);
bool pref;
pref = mp_auto_play_config_get_auto_play_status();
- if(pref)
- {
- g_pAutoPlayHandle->nAutoPlaySelect = MP_LIST_AUTO_PLAY_ON;
- }
- else
- {
- g_pAutoPlayHandle->nAutoPlaySelect = MP_LIST_AUTO_PLAY_OFF;
- }
- elm_radio_value_set(g_pAutoPlayHandle->pGroupRadio, g_pAutoPlayHandle->nAutoPlaySelect);
- int nMax_view_list = 0;
-/*#ifdef VS_FEATURE_LIST_VIEW
- elm_genlist_item_append(g_pAutoPlayHandle->pGenList, g_pAutoPlayHandle->stAutoPlayItc, (void *)MP_LIST_AUTO_PLAY_NORMAL_LIST, NULL, ELM_GENLIST_ITEM_NONE, __mp_auto_play_ctrl_select_item_cb, NULL);
- nMax_view_list++;
-#endif
-#ifdef VS_FEATURE_THUMBNAIL_VIEW
- elm_genlist_item_append(g_pAutoPlayHandle->pGenList, g_pAutoPlayHandle->stAutoPlayItc, (void *)MP_LIST_AUTO_PLAY_THUMBNAIL_LIST, NULL, ELM_GENLIST_ITEM_NONE, __mp_auto_play_ctrl_select_item_cb, NULL);
- nMax_view_list++;
-#endif
-#ifdef ENABLE_STORE_VIEWAS
- if (FOOTER_TAB_TYPE_PERSONAL == g_pAutoPlayHandle->nAutoPlaySelect)
- {
- elm_genlist_item_append(g_pAutoPlayHandle->pGenList, g_pAutoPlayHandle->stAutoPlayItc, (void *)MP_LIST_AUTO_PLAY_FOLDER_LIST, NULL, ELM_GENLIST_ITEM_NONE, __mp_auto_play_ctrl_select_item_cb, NULL);
- nMax_view_list++;
+ if (pref) {
+ g_pAutoPlayHandle->nAutoPlaySelect = MP_LIST_AUTO_PLAY_ON;
+ } else {
+ g_pAutoPlayHandle->nAutoPlaySelect = MP_LIST_AUTO_PLAY_OFF;
}
-#else
-*/
- if(!vp_is_auto_play_on())
- vp_set_auto_play(false);
- elm_genlist_item_append(g_pAutoPlayHandle->pGenList, g_pAutoPlayHandle->stAutoPlayItc, (void *)MP_LIST_AUTO_PLAY_ON, NULL, ELM_GENLIST_ITEM_NONE, __mp_auto_play_ctrl_select_item_cb, NULL);
- elm_genlist_item_append(g_pAutoPlayHandle->pGenList, g_pAutoPlayHandle->stAutoPlayItc, (void *)MP_LIST_AUTO_PLAY_OFF, NULL, ELM_GENLIST_ITEM_NONE, __mp_auto_play_ctrl_select_item_cb, NULL);
+ elm_radio_value_set(g_pAutoPlayHandle->pGroupRadio,
+ g_pAutoPlayHandle->nAutoPlaySelect);
+ int nMax_view_list = 0;
+
+ if (!vp_is_auto_play_on())
+ vp_set_auto_play(false);
+ elm_genlist_item_append(g_pAutoPlayHandle->pGenList,
+ g_pAutoPlayHandle->stAutoPlayItc,
+ (void *) MP_LIST_AUTO_PLAY_ON, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __mp_auto_play_ctrl_select_item_cb, NULL);
+ elm_genlist_item_append(g_pAutoPlayHandle->pGenList,
+ g_pAutoPlayHandle->stAutoPlayItc,
+ (void *) MP_LIST_AUTO_PLAY_OFF, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __mp_auto_play_ctrl_select_item_cb, NULL);
nMax_view_list++;
g_pAutoPlayHandle->pBox = elm_box_add(g_pAutoPlayHandle->pPopUpHandle);
- mp_widget_ctrl_set_popup_min_size(g_pAutoPlayHandle->pBox, 2, VIDEOS_POPUP_114);
- evas_object_size_hint_weight_set(g_pAutoPlayHandle->pBox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(g_pAutoPlayHandle->pBox, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ mp_widget_ctrl_set_popup_min_size(g_pAutoPlayHandle->pBox, 2,
+ VIDEOS_POPUP_114);
+ evas_object_size_hint_weight_set(g_pAutoPlayHandle->pBox,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(g_pAutoPlayHandle->pBox,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(g_pAutoPlayHandle->pBox, g_pAutoPlayHandle->pGenList);
- elm_object_content_set(g_pAutoPlayHandle->pPopUpHandle, g_pAutoPlayHandle->pBox);
+ elm_object_content_set(g_pAutoPlayHandle->pPopUpHandle,
+ g_pAutoPlayHandle->pBox);
evas_object_show(g_pAutoPlayHandle->pGenList);
evas_object_show(g_pAutoPlayHandle->pPopUpHandle);
void mp_auto_play_ctrl_change_language(void)
{
- if (!g_pAutoPlayHandle)
- {
+ if (!g_pAutoPlayHandle) {
VideoLogError("g_pAutoPlayHandle is NULL");
return;
}
- if (!g_pAutoPlayHandle->pGenList || !g_pAutoPlayHandle->pPopUpHandle)
- {
+ if (!g_pAutoPlayHandle->pGenList || !g_pAutoPlayHandle->pPopUpHandle) {
VideoLogInfo("No existed genlist or popup handle.");
return;
}
VideoLogInfo("");
- elm_object_domain_translatable_part_text_set(g_pAutoPlayHandle->pPopUpHandle, "title,text", PACKAGE, VIDEOS_MENU_AUTO_PLAY_NEXT_POP_HEADER);
+ elm_object_domain_translatable_part_text_set(g_pAutoPlayHandle->
+ pPopUpHandle,
+ "title,text", PACKAGE,
+ VIDEOS_MENU_AUTO_PLAY_NEXT_POP_HEADER);
elm_genlist_realized_items_update(g_pAutoPlayHandle->pGenList);
}
int mp_auto_play_ctrl_get_type(void)
{
- //int nValue = MP_LIST_AUTO_PLAY_NONE;
-
- /*if (preference_get_int(PREF_MP_VIDEO_AUTO_PLAY_TYPE_KEY, &nValue) != 0) {
- VideoLogInfo("Setting normal list type because of defending wrong value.");
- mp_auto_play_ctrl_set_type(MP_LIST_AUTO_PLAY_THUMBNAIL_LIST);
- return MP_LIST_AUTO_PLAY_THUMBNAIL_LIST;
- }
-
- if (nValue <= MP_LIST_AUTO_PLAY_NONE || nValue >= MP_LIST_AUTO_PLAY_MAX) {
- mp_auto_play_ctrl_set_type(MP_LIST_AUTO_PLAY_THUMBNAIL_LIST);
- return MP_LIST_AUTO_PLAY_THUMBNAIL_LIST;
- }*/
return g_pAutoPlayHandle->nAutoPlaySelect;
}
-
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
#include <glib.h>
typedef struct _MpVideoListOption {
- /*obj*/
+ /*obj */
Evas_Object *pPopUpHandle;
Evas_Object *pGenList;
Evas_Object *pBox;
- /*data*/
+ /*data */
MpDownloadType stDownloadType;
Elm_Genlist_Item_Class *stListOptionItc;
st_RegisteOptionCbFunc st_OptionCbFun;
static stMpVideoListOption *g_pOptionCtrlHandle = NULL;
-/*static void __MpListOptionCtrlDismissedCb(void *data, Evas_Object *obj, void *event_info);*/
-static void __mp_option_ctrl_realized(void *data, Evas_Object *obj,
- void *event_info);
+static void __mp_option_ctrl_realized(void *data, Evas_Object * obj,
+ void *event_info);
static void __mp_option_ctrl_cancel_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo);
-static void __mp_option_ctrl_mouse_up_cb(void *pUserData, Evas *pEvas,
- Evas_Object *pObject,
- void *pEventInfo);
-static void __mp_option_ctrl_rotate_cb(void *data, Evas_Object *obj,
- void *event_info);
+ Evas_Object * pObject,
+ void *pEventInfo);
+static void __mp_option_ctrl_mouse_up_cb(void *pUserData, Evas * pEvas,
+ Evas_Object * pObject,
+ void *pEventInfo);
+static void __mp_option_ctrl_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info);
void mp_option_ctrl_delete_handle(void)
{
}
if (g_pOptionCtrlHandle->pMpListOptionCloseCb) {
- g_pOptionCtrlHandle->pMpListOptionCloseCb(g_pOptionCtrlHandle->
- pUserData);
+ g_pOptionCtrlHandle->
+ pMpListOptionCloseCb(g_pOptionCtrlHandle->pUserData);
}
if (g_pOptionCtrlHandle->pPopUpHandle) {
evas_object_event_callback_del(g_pOptionCtrlHandle->pPopUpHandle,
- EVAS_CALLBACK_MOUSE_UP,
- __mp_option_ctrl_mouse_up_cb);
+ EVAS_CALLBACK_MOUSE_UP,
+ __mp_option_ctrl_mouse_up_cb);
evas_object_smart_callback_del(g_pOptionCtrlHandle->pPopUpHandle,
- "block,clicked",
- __mp_option_ctrl_cancel_cb);
+ "block,clicked",
+ __mp_option_ctrl_cancel_cb);
eext_object_event_callback_del(g_pOptionCtrlHandle->pPopUpHandle,
- EEXT_CALLBACK_BACK,
- __mp_option_ctrl_cancel_cb);
+ EEXT_CALLBACK_BACK,
+ __mp_option_ctrl_cancel_cb);
evas_object_smart_callback_del((Evas_Object *)
- mp_util_get_main_window_handle(),
- "rotation,changed",
- __mp_option_ctrl_rotate_cb);
+ mp_util_get_main_window_handle(),
+ "rotation,changed",
+ __mp_option_ctrl_rotate_cb);
}
MP_DEL_OBJ(g_pOptionCtrlHandle->pGenList);
MP_DEL_OBJ(g_pOptionCtrlHandle->pBox);
}
-/*static void __MpListOptionCtrlDismissedCb(void *data, Evas_Object *obj, void *event_info)
-{
- VideoSecureLogDebug("__MpListOptionCtrlDismissedCb");
-
- mp_option_ctrl_delete_handle();
-}*/
static void __mp_option_ctrl_register_cb_func(st_RegisteOptionCbFunc *
- pCallbackFunc)
+ pCallbackFunc)
{
if (!pCallbackFunc || !g_pOptionCtrlHandle) {
}
memset(&g_pOptionCtrlHandle->st_OptionCbFun, 0,
- sizeof(st_RegisteOptionCbFunc));
+ sizeof(st_RegisteOptionCbFunc));
if (pCallbackFunc->ShareViaItemCb) {
g_pOptionCtrlHandle->st_OptionCbFun.ShareViaItemCb =
}
static char *mp_option_ctrl_get_lable_of_gen_item_cb(const void
- *pUserData,
- Evas_Object *
- pObject,
- const char *pPart)
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char *pPart)
{
int nIndex = (int) pUserData;
- /* if (!strcmp(pPart, "elm.text"))*/
if (!strcmp(pPart, "elm.text.main.left")) {
switch (nIndex) {
case MP_LIST_OPTION_SHARE_VIA_ITEM:
return NULL;
}
-static void __mp_option_ctrl_realized(void *data, Evas_Object *obj,
- void *event_info)
+static void __mp_option_ctrl_realized(void *data, Evas_Object * obj,
+ void *event_info)
{
if (!event_info || !obj) {
VideoLogError("event info is invalid");
if (pItem) {
elm_object_item_signal_emit(pItem, "elm,state,bottomline,hide",
- "");
+ "");
}
}
static Evas_Object *__mp_option_ctrl_init(void *pNaviHandle,
- const char *title,
- int nVideoIndex)
+ const char *title,
+ int nVideoIndex)
{
VideoLogDebug("title=%s", title);
if (!g_pOptionCtrlHandle) {
MP_DEL_ITC(g_pOptionCtrlHandle->stListOptionItc);
g_pOptionCtrlHandle->stListOptionItc = elm_genlist_item_class_new();
- /* Set item of Genlist.*/
- g_pOptionCtrlHandle->stListOptionItc->item_style = "1line"; /*"1text/popup";*/
+ /* Set item of Genlist. */
+ g_pOptionCtrlHandle->stListOptionItc->item_style = "1line"; /*"1text/popup"; */
g_pOptionCtrlHandle->stListOptionItc->func.text_get =
(void *) mp_option_ctrl_get_lable_of_gen_item_cb;
g_pOptionCtrlHandle->stListOptionItc->func.content_get = NULL;
g_pOptionCtrlHandle->stListOptionItc->func.state_get = NULL;
g_pOptionCtrlHandle->stListOptionItc->func.del = NULL;
- /* Create genlist handle*/
+ /* Create genlist handle */
g_pOptionCtrlHandle->pGenList =
elm_genlist_add(g_pOptionCtrlHandle->pPopUpHandle);
evas_object_size_hint_weight_set(g_pOptionCtrlHandle->pGenList,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(g_pOptionCtrlHandle->pGenList,
- EVAS_HINT_FILL, EVAS_HINT_FILL);
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_smart_callback_add(g_pOptionCtrlHandle->pGenList,
- "realized", __mp_option_ctrl_realized,
- NULL);
+ "realized", __mp_option_ctrl_realized,
+ NULL);
g_pOptionCtrlHandle->nListCount = 0;
if (g_pOptionCtrlHandle->st_OptionCbFun.DeleteItemCb) {
g_pOptionCtrlHandle->nListCount++;
elm_genlist_item_append(g_pOptionCtrlHandle->pGenList,
- g_pOptionCtrlHandle->stListOptionItc,
- (void *) MP_LIST_OPTION_DELETE_ITEM, NULL,
- ELM_GENLIST_ITEM_NONE,
- g_pOptionCtrlHandle->st_OptionCbFun.
- DeleteItemCb, (void *) nVideoIndex);
+ g_pOptionCtrlHandle->stListOptionItc,
+ (void *) MP_LIST_OPTION_DELETE_ITEM, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ g_pOptionCtrlHandle->
+ st_OptionCbFun.DeleteItemCb,
+ (void *) nVideoIndex);
}
if (g_pOptionCtrlHandle->st_OptionCbFun.ShareViaItemCb) {
g_pOptionCtrlHandle->nListCount++;
elm_genlist_item_append(g_pOptionCtrlHandle->pGenList,
- g_pOptionCtrlHandle->stListOptionItc,
- (void *) MP_LIST_OPTION_SHARE_VIA_ITEM,
- NULL, ELM_GENLIST_ITEM_NONE,
- g_pOptionCtrlHandle->st_OptionCbFun.
- ShareViaItemCb, (void *) nVideoIndex);
+ g_pOptionCtrlHandle->stListOptionItc,
+ (void *) MP_LIST_OPTION_SHARE_VIA_ITEM,
+ NULL, ELM_GENLIST_ITEM_NONE,
+ g_pOptionCtrlHandle->
+ st_OptionCbFun.ShareViaItemCb,
+ (void *) nVideoIndex);
}
evas_object_show(g_pOptionCtrlHandle->pGenList);
elm_box_add(g_pOptionCtrlHandle->pPopUpHandle);
mp_widget_ctrl_set_popup_min_size(g_pOptionCtrlHandle->pBox,
- g_pOptionCtrlHandle->nListCount,
- VIDEOS_POPUP_114);
+ g_pOptionCtrlHandle->nListCount,
+ VIDEOS_POPUP_114);
evas_object_size_hint_weight_set(g_pOptionCtrlHandle->pBox,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(g_pOptionCtrlHandle->pBox,
- EVAS_HINT_FILL, EVAS_HINT_FILL);
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(g_pOptionCtrlHandle->pBox,
- g_pOptionCtrlHandle->pGenList);
+ g_pOptionCtrlHandle->pGenList);
evas_object_show(g_pOptionCtrlHandle->pBox);
}
static void __mp_option_ctrl_cancel_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
mp_option_ctrl_delete_handle();
}
-static void __mp_option_ctrl_mouse_up_cb(void *pUserData, Evas *pEvas,
- Evas_Object *pObject,
- void *pEventInfo)
+static void __mp_option_ctrl_mouse_up_cb(void *pUserData, Evas * pEvas,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
Evas_Event_Mouse_Up *pEvent = pEventInfo;
}
}
-static void __mp_option_ctrl_rotate_cb(void *data, Evas_Object *obj,
- void *event_info)
+static void __mp_option_ctrl_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
if (!g_pOptionCtrlHandle) {
VideoLogError("pVideoListSortPopUpHandle IS null");
return;
}
mp_widget_ctrl_set_popup_min_size(g_pOptionCtrlHandle->pBox,
- g_pOptionCtrlHandle->nListCount,
- VIDEOS_POPUP_114);
+ g_pOptionCtrlHandle->nListCount,
+ VIDEOS_POPUP_114);
}
bool mp_option_ctrl_show(void *pNaviHandle, const char *title,
- int nVideoIndex,
- st_RegisteOptionCbFunc *pCallbackFunc,
- MpListOptionCbFunc pCloseFun, void *userData,
- MpDownloadType euType)
+ int nVideoIndex,
+ st_RegisteOptionCbFunc * pCallbackFunc,
+ MpListOptionCbFunc pCloseFun, void *userData,
+ MpDownloadType euType)
{
if (!pNaviHandle) {
VideoSecureLogError("invalid pNaviHandle");
g_pOptionCtrlHandle->pPopUpHandle =
elm_popup_add((Evas_Object *) pNaviHandle);
- /*elm_object_style_set(pListOptionPopUpHandle, "content_no_vhpad"); //menustyle*/
elm_object_style_set(g_pOptionCtrlHandle->pPopUpHandle, "default");
if (title) {
char *szTitleUtf8 = elm_entry_utf8_to_markup(title);
elm_object_part_text_set(g_pOptionCtrlHandle->pPopUpHandle,
- "title,text", szTitleUtf8);
+ "title,text", szTitleUtf8);
MP_FREE_STRING(szTitleUtf8);
}
evas_object_size_hint_weight_set(g_pOptionCtrlHandle->pPopUpHandle,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_weight_set(g_pOptionCtrlHandle->pPopUpHandle,
- EVAS_HINT_FILL, EVAS_HINT_FILL);
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_event_callback_add(g_pOptionCtrlHandle->pPopUpHandle,
- EVAS_CALLBACK_MOUSE_UP,
- __mp_option_ctrl_mouse_up_cb, NULL);
+ EVAS_CALLBACK_MOUSE_UP,
+ __mp_option_ctrl_mouse_up_cb, NULL);
evas_object_smart_callback_add(g_pOptionCtrlHandle->pPopUpHandle,
- "block,clicked",
- __mp_option_ctrl_cancel_cb, NULL);
+ "block,clicked",
+ __mp_option_ctrl_cancel_cb, NULL);
eext_object_event_callback_add(g_pOptionCtrlHandle->pPopUpHandle,
- EEXT_CALLBACK_BACK,
- __mp_option_ctrl_cancel_cb, NULL);
+ EEXT_CALLBACK_BACK,
+ __mp_option_ctrl_cancel_cb, NULL);
evas_object_smart_callback_add((Evas_Object *)
- mp_util_get_main_window_handle(),
- "rotation,changed",
- __mp_option_ctrl_rotate_cb, NULL);
+ mp_util_get_main_window_handle(),
+ "rotation,changed",
+ __mp_option_ctrl_rotate_cb, NULL);
__mp_option_ctrl_init(pNaviHandle, title, nVideoIndex);
elm_object_content_set(g_pOptionCtrlHandle->pPopUpHandle,
- g_pOptionCtrlHandle->pBox);
+ g_pOptionCtrlHandle->pBox);
evas_object_show(g_pOptionCtrlHandle->pPopUpHandle);
return TRUE;
}
if (!g_pOptionCtrlHandle->pGenList
- || !g_pOptionCtrlHandle->pPopUpHandle) {
+ || !g_pOptionCtrlHandle->pPopUpHandle) {
VideoLogError("No existed genlist or popup handle.");
return;
}
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
#include <Ecore_Evas.h>
#define PREF_VP_VIDEOS_SORT_TYPE "preference/org.tizen.videos/sort_type"
-typedef struct _MpVideoListSort{
+typedef struct _MpVideoListSort {
//obj
Evas_Object *pPopUpHandle;
Evas_Object *pGroupRadio;
MpListSortType nCurrListSortType;
int nListCount;
-}stMpVideoListSort;
+} stMpVideoListSort;
stMpVideoListSort *g_pSortCtrlHandle = NULL;
-static void __mp_sort_ctrl_realized(void *data, Evas_Object *obj, void *event_info);
-static void __mp_sort_ctrl_rotate_cb(void *data, Evas_Object *obj, void *event_info);
-static void __mp_sort_ctrl_btn_asc_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo);
-static void __mp_sort_ctrl_mouse_up_cb(void *pUserData, Evas *pEvas, Evas_Object *pObject, void *pEventInfo);
-static void __mp_sort_ctrl_select_radio_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo);
+static void __mp_sort_ctrl_realized(void *data, Evas_Object * obj,
+ void *event_info);
+static void __mp_sort_ctrl_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info);
+static void __mp_sort_ctrl_btn_asc_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo);
+static void __mp_sort_ctrl_mouse_up_cb(void *pUserData, Evas * pEvas,
+ Evas_Object * pObject,
+ void *pEventInfo);
+static void __mp_sort_ctrl_select_radio_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo);
////////////////////////////////////////////////////////////
// Internal function
{
VideoLogInfo("");
- if (!g_pSortCtrlHandle)
- {
+ if (!g_pSortCtrlHandle) {
VideoLogError("");
return;
}
- if (g_pSortCtrlHandle->pPopUpHandle)
- {
- eext_object_event_callback_del(g_pSortCtrlHandle->pPopUpHandle, EEXT_CALLBACK_BACK, __mp_sort_ctrl_btn_asc_cb);
- //elm_object_style_set(pVideoListSortPopUpHandle, "content_no_vhpad");
- evas_object_smart_callback_del(g_pSortCtrlHandle->pPopUpHandle, "block,clicked", __mp_sort_ctrl_btn_asc_cb);
- evas_object_smart_callback_del((Evas_Object*)mp_util_get_main_window_handle(), "rotation,changed", __mp_sort_ctrl_rotate_cb);
- evas_object_event_callback_del(g_pSortCtrlHandle->pPopUpHandle, EVAS_CALLBACK_MOUSE_UP, __mp_sort_ctrl_mouse_up_cb);
+ if (g_pSortCtrlHandle->pPopUpHandle) {
+ eext_object_event_callback_del(g_pSortCtrlHandle->pPopUpHandle,
+ EEXT_CALLBACK_BACK,
+ __mp_sort_ctrl_btn_asc_cb);
+ evas_object_smart_callback_del(g_pSortCtrlHandle->pPopUpHandle,
+ "block,clicked",
+ __mp_sort_ctrl_btn_asc_cb);
+ evas_object_smart_callback_del((Evas_Object *)
+ mp_util_get_main_window_handle(),
+ "rotation,changed",
+ __mp_sort_ctrl_rotate_cb);
+ evas_object_event_callback_del(g_pSortCtrlHandle->pPopUpHandle,
+ EVAS_CALLBACK_MOUSE_UP,
+ __mp_sort_ctrl_mouse_up_cb);
}
MP_DEL_OBJ(g_pSortCtrlHandle->pGroupRadio);
MP_DEL_OBJ(g_pSortCtrlHandle->pGenList);
void mp_sort_ctrl_set_sort_state(MpListSortType nListSortType)
{
- if (!g_pSortCtrlHandle)
- {
+ if (!g_pSortCtrlHandle) {
VideoLogError("");
return;
}
- if (MP_LIST_SORT_BY_NONE >= nListSortType || nListSortType >= MP_LIST_SORT_BY_MAX)
- {
+ if (MP_LIST_SORT_BY_NONE >= nListSortType
+ || nListSortType >= MP_LIST_SORT_BY_MAX) {
VideoLogWarning("[WARNING] Value of sort type is not matched.");
nListSortType = MP_LIST_SORT_BY_RECENTLY_ADDED;
}
g_pSortCtrlHandle->nCurrListSortType = nListSortType;
- int nRet = preference_set_int(PREF_VP_VIDEOS_SORT_TYPE, g_pSortCtrlHandle->nCurrListSortType);
- if (nRet)
- {
+ int nRet =
+ preference_set_int(PREF_VP_VIDEOS_SORT_TYPE,
+ g_pSortCtrlHandle->nCurrListSortType);
+ if (nRet) {
VideoLogWarning("[WARNING] Fail to set value about sort type.");
}
}
-static char *mp_sort_ctrl_get_label_of_genlist_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static char *mp_sort_ctrl_get_label_of_genlist_cb(const void *pUserData,
+ Evas_Object * pObject,
+ const char *pPart)
{
- int nIndex = (int)pUserData;
-
- if (!strcmp(pPart, "elm.text") || !strcmp(pPart, "elm.text.main.left"))
- {
- switch (nIndex)
- {
- //case MP_LIST_SORT_BY_RECENTLY_VIEWED: return strdup(VIDEOS_SORTBYOPT_OPT_RECENTLY_VIEWED);
- case MP_LIST_SORT_BY_RECENTLY_ADDED: return strdup(VIDEOS_SORTBYOPT_OPT_DATE_MOST_RECENT);
- case MP_LIST_SORT_BY_NAME: return strdup(VIDEOS_SORTBYOPT_OPT_NAME);
- //case MP_LIST_SORT_BY_SIZE: return strdup(VIDEOS_SORTBYOPT_OPT_SIZE);
- //case MP_LIST_SORT_BY_TYPE: return strdup(VIDEOS_SORTBYOPT_OPT_TYPE);
+ int nIndex = (int) pUserData;
+
+ if (!strcmp(pPart, "elm.text") || !strcmp(pPart, "elm.text.main.left")) {
+ switch (nIndex) {
+ case MP_LIST_SORT_BY_RECENTLY_ADDED:
+ return strdup(VIDEOS_SORTBYOPT_OPT_DATE_MOST_RECENT);
+ case MP_LIST_SORT_BY_NAME:
+ return strdup(VIDEOS_SORTBYOPT_OPT_NAME);
}
}
return NULL;
}
-static Evas_Object *mp_sort_ctrl_get_icon_of_genlist_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static Evas_Object *mp_sort_ctrl_get_icon_of_genlist_cb(const void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char *pPart)
{
- int nIndex = (int)pUserData;
+ int nIndex = (int) pUserData;
//Evas_Object *pLayout = NULL;
Evas_Object *pTmpRadio = NULL;
- if (!g_pSortCtrlHandle)
- {
+ if (!g_pSortCtrlHandle) {
VideoLogError("");
return NULL;
}
- if (!strcmp(pPart, "elm.swallow.end") || !strcmp(pPart, "elm.icon.2"))
- {
- //pLayout = elm_layout_add(pObject);
- //pTmpRadio = elm_radio_add(pLayout);
+ if (!strcmp(pPart, "elm.swallow.end") || !strcmp(pPart, "elm.icon.2")) {
pTmpRadio = elm_radio_add(pObject);
- //elm_layout_theme_set(pLayout, "layout", "list/C/type.2", "default");
elm_radio_state_value_set(pTmpRadio, nIndex);
elm_radio_group_add(pTmpRadio, g_pSortCtrlHandle->pGroupRadio);
- if (g_pSortCtrlHandle->nCurrListSortType == nIndex)
- {
- elm_radio_value_set(g_pSortCtrlHandle->pGroupRadio, g_pSortCtrlHandle->nCurrListSortType);
- mp_sort_ctrl_set_sort_state(g_pSortCtrlHandle->nCurrListSortType);
+ if (g_pSortCtrlHandle->nCurrListSortType == nIndex) {
+ elm_radio_value_set(g_pSortCtrlHandle->pGroupRadio,
+ g_pSortCtrlHandle->nCurrListSortType);
+ mp_sort_ctrl_set_sort_state(g_pSortCtrlHandle->
+ nCurrListSortType);
}
-// elm_object_signal_callback_add(pTmpRadio, "elm,action,show,finished", "elm", __mp_sort_ctrl_select_radio_cb, (void *)pUserData);
- evas_object_smart_callback_add(pTmpRadio, "changed", __mp_sort_ctrl_select_radio_cb, (void *)pUserData);
- //elm_object_part_content_set(pLayout, "elm.swallow.content", pTmpRadio);
+ evas_object_smart_callback_add(pTmpRadio, "changed",
+ __mp_sort_ctrl_select_radio_cb,
+ (void *) pUserData);
evas_object_show(pTmpRadio);
- //evas_object_show(pLayout);
}
- //return pLayout;
return pTmpRadio;
}
-static void __mp_sort_ctrl_btn_asc_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_sort_ctrl_btn_asc_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
mp_sort_ctrl_hide();
}
-static void mp_sort_ctrl_select_item_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void mp_sort_ctrl_select_item_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
- if (!g_pSortCtrlHandle)
- {
+ if (!g_pSortCtrlHandle) {
VideoLogError("");
return;
}
int nIndex = 0;
- Elm_Object_Item *pItem = (Elm_Object_Item *)pEventInfo;
- Elm_Object_Item *pSelectedItem = elm_genlist_selected_item_get(pObject);
- if (pSelectedItem)
- {
+ Elm_Object_Item *pItem = (Elm_Object_Item *) pEventInfo;
+ Elm_Object_Item *pSelectedItem =
+ elm_genlist_selected_item_get(pObject);
+ if (pSelectedItem) {
elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
}
- nIndex = (int)elm_object_item_data_get(pItem);
+ nIndex = (int) elm_object_item_data_get(pItem);
if (nIndex == g_pSortCtrlHandle->nCurrListSortType) {
VideoLogInfo("Do nothing");
mp_sort_ctrl_hide();
} else {
g_pSortCtrlHandle->nCurrListSortType = nIndex;
- elm_radio_value_set(g_pSortCtrlHandle->pGroupRadio, g_pSortCtrlHandle->nCurrListSortType);
+ elm_radio_value_set(g_pSortCtrlHandle->pGroupRadio,
+ g_pSortCtrlHandle->nCurrListSortType);
mp_sort_ctrl_set_sort_state(g_pSortCtrlHandle->nCurrListSortType);
- ListSortCtrlCbFunc fFunc = g_pSortCtrlHandle->ListSortCtrlUserCbFunc;
+ ListSortCtrlCbFunc fFunc =
+ g_pSortCtrlHandle->ListSortCtrlUserCbFunc;
mp_sort_ctrl_hide();
- if (fFunc)
- {
+ if (fFunc) {
fFunc();
}
}
}
-static void __mp_sort_ctrl_select_radio_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_sort_ctrl_select_radio_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
- if (!g_pSortCtrlHandle)
- {
+ if (!g_pSortCtrlHandle) {
VideoLogError("");
return;
}
- int nIndex = (int)pUserData;
+ int nIndex = (int) pUserData;
g_pSortCtrlHandle->nCurrListSortType = nIndex;
mp_sort_ctrl_set_sort_state(g_pSortCtrlHandle->nCurrListSortType);
ListSortCtrlCbFunc fFunc = g_pSortCtrlHandle->ListSortCtrlUserCbFunc;
mp_sort_ctrl_hide();
- if (fFunc)
- {
+ if (fFunc) {
fFunc();
}
}
-static void __mp_sort_ctrl_mouse_up_cb(void *pUserData, Evas *pEvas, Evas_Object *pObject, void *pEventInfo)
+static void __mp_sort_ctrl_mouse_up_cb(void *pUserData, Evas * pEvas,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
Evas_Event_Mouse_Up *pEvent = pEventInfo;
- if (pEvent->button == 3)
- {
+ if (pEvent->button == 3) {
mp_sort_ctrl_hide();
}
}
////////////////////////////////////////////////////////////
// External function
////////////////////////////////////////////////////////////
-void mp_sort_ctrl_genlist_change_language(void *data, Evas_Object *obj, void *event_info)
+void mp_sort_ctrl_genlist_change_language(void *data, Evas_Object * obj,
+ void *event_info)
{
- elm_genlist_realized_items_update(obj);
+ elm_genlist_realized_items_update(obj);
}
-static void __mp_sort_ctrl_realized(void *data, Evas_Object *obj, void *event_info)
+static void __mp_sort_ctrl_realized(void *data, Evas_Object * obj,
+ void *event_info)
{
- if (!event_info || !obj)
- {
+ if (!event_info || !obj) {
VideoLogError("event info is invalid");
return;
}
Elm_Object_Item *pItem = elm_genlist_last_item_get(obj);
- if (pItem)
- {
- elm_object_item_signal_emit(pItem, "elm,state,bottomline,hide", "");
+ if (pItem) {
+ elm_object_item_signal_emit(pItem, "elm,state,bottomline,hide",
+ "");
}
}
-static void __mp_sort_ctrl_rotate_cb(void *data, Evas_Object *obj, void *event_info)
+static void __mp_sort_ctrl_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
- if (!g_pSortCtrlHandle)
- {
+ if (!g_pSortCtrlHandle) {
VideoLogError("pVideoListSortPopUpHandle IS null");
return;
}
- if (g_pSortCtrlHandle->nListCount < VIDEO_POPUP_MIN_ITEMS)
- {
+ if (g_pSortCtrlHandle->nListCount < VIDEO_POPUP_MIN_ITEMS) {
return;
}
- mp_widget_ctrl_set_popup_min_size(g_pSortCtrlHandle->pBox, g_pSortCtrlHandle->nListCount, VIDEOS_POPUP_114);
+ mp_widget_ctrl_set_popup_min_size(g_pSortCtrlHandle->pBox,
+ g_pSortCtrlHandle->nListCount,
+ VIDEOS_POPUP_114);
}
VideoLogInfo("");
mp_sort_ctrl_delete_handle();
- g_pSortCtrlHandle = (stMpVideoListSort*)calloc(1, sizeof(stMpVideoListSort));
- if (!g_pSortCtrlHandle)
- {
+ g_pSortCtrlHandle =
+ (stMpVideoListSort *) calloc(1, sizeof(stMpVideoListSort));
+ if (!g_pSortCtrlHandle) {
VideoLogError("g_pSortCtrlHandle is NULL");
return FALSE;
}
g_pSortCtrlHandle->ListSortCtrlUserCbFunc = pListSortCtrlCb;
g_pSortCtrlHandle->nCurrListSortType = mp_sort_ctrl_get_sort_state();
- g_pSortCtrlHandle->pPopUpHandle = elm_popup_add(mp_util_get_main_window_handle());
-
- elm_object_style_set(g_pSortCtrlHandle->pPopUpHandle, "default");
- eext_object_event_callback_add(g_pSortCtrlHandle->pPopUpHandle, EEXT_CALLBACK_BACK, __mp_sort_ctrl_btn_asc_cb, NULL);
- evas_object_smart_callback_add(g_pSortCtrlHandle->pPopUpHandle, "block,clicked", __mp_sort_ctrl_btn_asc_cb, NULL);
- evas_object_smart_callback_add((Evas_Object*)mp_util_get_main_window_handle(), "rotation,changed", __mp_sort_ctrl_rotate_cb, NULL);
-
- elm_object_domain_translatable_part_text_set(g_pSortCtrlHandle->pPopUpHandle, "title,text", VIDEOS_STRING, VIDEOS_SORTBYPOP_HEADER_SORT_BY_IDS);
- evas_object_size_hint_weight_set(g_pSortCtrlHandle->pPopUpHandle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- evas_object_event_callback_add(g_pSortCtrlHandle->pPopUpHandle, EVAS_CALLBACK_MOUSE_UP, __mp_sort_ctrl_mouse_up_cb, NULL);
- //evas_object_event_callback_add(pVideoListSortPopUpHandle, EVAS_CALLBACK_KEY_DOWN, MpVideoListSortKeyDownCb, NULL);
+ g_pSortCtrlHandle->pPopUpHandle =
+ elm_popup_add(mp_util_get_main_window_handle());
+ elm_object_style_set(g_pSortCtrlHandle->pPopUpHandle, "theme_bg");
+
+ eext_object_event_callback_add(g_pSortCtrlHandle->pPopUpHandle,
+ EEXT_CALLBACK_BACK,
+ __mp_sort_ctrl_btn_asc_cb, NULL);
+ evas_object_smart_callback_add(g_pSortCtrlHandle->pPopUpHandle,
+ "block,clicked",
+ __mp_sort_ctrl_btn_asc_cb, NULL);
+ evas_object_smart_callback_add((Evas_Object *)
+ mp_util_get_main_window_handle(),
+ "rotation,changed",
+ __mp_sort_ctrl_rotate_cb, NULL);
+
+ elm_object_domain_translatable_part_text_set(g_pSortCtrlHandle->
+ pPopUpHandle,
+ "title,text",
+ VIDEOS_STRING,
+ VIDEOS_SORTBYPOP_HEADER_SORT_BY_IDS);
+ evas_object_size_hint_weight_set(g_pSortCtrlHandle->pPopUpHandle,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+ evas_object_event_callback_add(g_pSortCtrlHandle->pPopUpHandle,
+ EVAS_CALLBACK_MOUSE_UP,
+ __mp_sort_ctrl_mouse_up_cb, NULL);
MP_DEL_ITC(g_pSortCtrlHandle->stListSortItc);
g_pSortCtrlHandle->stListSortItc = elm_genlist_item_class_new();
// Set item of Genlist.
- g_pSortCtrlHandle->stListSortItc->item_style = "default";//"1text.1icon.2/popup";
- g_pSortCtrlHandle->stListSortItc->func.text_get = (void *)mp_sort_ctrl_get_label_of_genlist_cb;
- g_pSortCtrlHandle->stListSortItc->func.content_get = (void *)mp_sort_ctrl_get_icon_of_genlist_cb;
+ g_pSortCtrlHandle->stListSortItc->item_style = "default"; //"1text.1icon.2/popup";
+ g_pSortCtrlHandle->stListSortItc->func.text_get =
+ (void *) mp_sort_ctrl_get_label_of_genlist_cb;
+ g_pSortCtrlHandle->stListSortItc->func.content_get =
+ (void *) mp_sort_ctrl_get_icon_of_genlist_cb;
g_pSortCtrlHandle->stListSortItc->func.state_get = NULL;
g_pSortCtrlHandle->stListSortItc->func.del = NULL;
// Create genlist handle
- g_pSortCtrlHandle->pGenList = elm_genlist_add(g_pSortCtrlHandle->pPopUpHandle);
- evas_object_size_hint_weight_set(g_pSortCtrlHandle->pGenList, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(g_pSortCtrlHandle->pGenList, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
- evas_object_smart_callback_add(g_pSortCtrlHandle->pGenList, "language,changed", mp_sort_ctrl_genlist_change_language, NULL);
- evas_object_smart_callback_add(g_pSortCtrlHandle->pGenList, "realized", __mp_sort_ctrl_realized, NULL);
-
- g_pSortCtrlHandle->pGroupRadio = elm_radio_add(g_pSortCtrlHandle->pGenList);
+ g_pSortCtrlHandle->pGenList =
+ elm_genlist_add(g_pSortCtrlHandle->pPopUpHandle);
+ evas_object_size_hint_weight_set(g_pSortCtrlHandle->pGenList,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(g_pSortCtrlHandle->pGenList,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+ evas_object_smart_callback_add(g_pSortCtrlHandle->pGenList,
+ "language,changed",
+ mp_sort_ctrl_genlist_change_language,
+ NULL);
+ evas_object_smart_callback_add(g_pSortCtrlHandle->pGenList, "realized",
+ __mp_sort_ctrl_realized, NULL);
+
+ g_pSortCtrlHandle->pGroupRadio =
+ elm_radio_add(g_pSortCtrlHandle->pGenList);
mp_sort_ctrl_get_sort_state();
int nListCount = 0;
- //elm_genlist_item_append(g_pSortCtrlHandle->pGenList, g_pSortCtrlHandle->stListSortItc, (void *)MP_LIST_SORT_BY_RECENTLY_VIEWED, NULL, ELM_GENLIST_ITEM_NONE, mp_sort_ctrl_select_item_cb, NULL);
- //nListCount++;
- elm_genlist_item_append(g_pSortCtrlHandle->pGenList, g_pSortCtrlHandle->stListSortItc, (void *)MP_LIST_SORT_BY_RECENTLY_ADDED, NULL, ELM_GENLIST_ITEM_NONE, mp_sort_ctrl_select_item_cb, NULL);
+ elm_genlist_item_append(g_pSortCtrlHandle->pGenList,
+ g_pSortCtrlHandle->stListSortItc,
+ (void *) MP_LIST_SORT_BY_RECENTLY_ADDED, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ mp_sort_ctrl_select_item_cb, NULL);
nListCount++;
- elm_genlist_item_append(g_pSortCtrlHandle->pGenList, g_pSortCtrlHandle->stListSortItc, (void *)MP_LIST_SORT_BY_NAME, NULL, ELM_GENLIST_ITEM_NONE, mp_sort_ctrl_select_item_cb, NULL);
+ elm_genlist_item_append(g_pSortCtrlHandle->pGenList,
+ g_pSortCtrlHandle->stListSortItc,
+ (void *) MP_LIST_SORT_BY_NAME, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ mp_sort_ctrl_select_item_cb, NULL);
nListCount++;
- //elm_genlist_item_append(g_pSortCtrlHandle->pGenList, g_pSortCtrlHandle->stListSortItc, (void *)MP_LIST_SORT_BY_SIZE, NULL, ELM_GENLIST_ITEM_NONE, mp_sort_ctrl_select_item_cb, NULL);
- //nListCount++;
- //elm_genlist_item_append(g_pSortCtrlHandle->pGenList, g_pSortCtrlHandle->stListSortItc, (void *)MP_LIST_SORT_BY_TYPE, NULL, ELM_GENLIST_ITEM_NONE, mp_sort_ctrl_select_item_cb, NULL);
- //nListCount++;
g_pSortCtrlHandle->nListCount = nListCount;
- //elm_radio_value_set(g_pSortCtrlHandle->pGroupRadio, g_pSortCtrlHandle->nCurrListSortType);
-
g_pSortCtrlHandle->pBox = elm_box_add(g_pSortCtrlHandle->pPopUpHandle);
- mp_widget_ctrl_set_popup_min_size(g_pSortCtrlHandle->pBox, g_pSortCtrlHandle->nListCount, VIDEOS_POPUP_114);
- evas_object_size_hint_weight_set(g_pSortCtrlHandle->pBox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(g_pSortCtrlHandle->pBox, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ mp_widget_ctrl_set_popup_min_size(g_pSortCtrlHandle->pBox,
+ g_pSortCtrlHandle->nListCount,
+ VIDEOS_POPUP_114);
+ evas_object_size_hint_weight_set(g_pSortCtrlHandle->pBox,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(g_pSortCtrlHandle->pBox,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(g_pSortCtrlHandle->pBox, g_pSortCtrlHandle->pGenList);
- elm_object_content_set(g_pSortCtrlHandle->pPopUpHandle, g_pSortCtrlHandle->pBox);
+ elm_object_content_set(g_pSortCtrlHandle->pPopUpHandle,
+ g_pSortCtrlHandle->pBox);
evas_object_show(g_pSortCtrlHandle->pBox);
evas_object_show(g_pSortCtrlHandle->pGenList);
void mp_sort_ctrl_change_language(void)
{
VideoLogInfo("");
- if (!g_pSortCtrlHandle)
- {
+ if (!g_pSortCtrlHandle) {
VideoLogError("");
return;
}
- if (!g_pSortCtrlHandle->pGenList || !g_pSortCtrlHandle->pPopUpHandle)
- {
+ if (!g_pSortCtrlHandle->pGenList || !g_pSortCtrlHandle->pPopUpHandle) {
VideoLogError("No existed genlist or popup handle.");
return;
}
{
int nValue = MP_LIST_SORT_BY_NONE;
- if (0 != preference_get_int(PREF_VP_VIDEOS_SORT_TYPE, &nValue))
- {
- VideoLogInfo("Setting normal list type because of defending wrong value.:%d", nValue);
+ if (0 != preference_get_int(PREF_VP_VIDEOS_SORT_TYPE, &nValue)) {
+ VideoLogInfo
+ ("Setting normal list type because of defending wrong value.:%d",
+ nValue);
mp_sort_ctrl_set_sort_state(MP_LIST_SORT_BY_RECENTLY_ADDED);
return MP_LIST_SORT_BY_RECENTLY_ADDED;
}
- if (nValue <= MP_LIST_SORT_BY_NONE || nValue >= MP_LIST_SORT_BY_MAX)
- {
+ if (nValue <= MP_LIST_SORT_BY_NONE || nValue >= MP_LIST_SORT_BY_MAX) {
mp_sort_ctrl_set_sort_state(MP_LIST_SORT_BY_RECENTLY_ADDED);
return MP_LIST_SORT_BY_RECENTLY_ADDED;
}
VideoLogInfo("sortstate start:%d", nValue);
- return (int)nValue;
+ return (int) nValue;
}
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
#include <Ecore_Evas.h>
#define PREF_MP_VIDEO_VIEW_AS_TYPE_KEY "preference/org.tizen.videos/view_as_type"
-typedef struct _MpVideoViewAs{
+typedef struct _MpVideoViewAs {
//obj
Evas_Object *pPopUpHandle;
Evas_Object *pGroupRadio;
int nListCount;
int nCurrTabType;
-}stMpVideoViewAs;
+} stMpVideoViewAs;
stMpVideoViewAs *g_pViewAsHandle = NULL;
////////////////////////////////////////////////////////////
// Internal function
////////////////////////////////////////////////////////////
-static void __mp_view_as_ctrl_rotate_cb(void *data, Evas_Object *obj, void *event_info);
-static void __mp_view_as_ctrl_mouse_up_cb(void *pUserData, Evas *pEvas, Evas_Object *pObject, void *pEventInfo);
-static void __mp_view_as_ctrl_cancel_btn_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo);
-static void __mp_view_as_ctrl_select_item_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo);
-static void __mp_view_as_ctrl_select_radio_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo);
+static void __mp_view_as_ctrl_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info);
+static void __mp_view_as_ctrl_mouse_up_cb(void *pUserData, Evas * pEvas,
+ Evas_Object * pObject,
+ void *pEventInfo);
+static void __mp_view_as_ctrl_cancel_btn_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo);
+static void __mp_view_as_ctrl_select_item_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo);
+static void __mp_view_as_ctrl_select_radio_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo);
void mp_view_as_ctrl_delete_handle(void)
{
VideoLogInfo("");
- if (!g_pViewAsHandle)
- {
+ if (!g_pViewAsHandle) {
VideoLogError("-------g_pViewAsHandle is NULL--------");
return;
}
- if (g_pViewAsHandle->pPopUpHandle)
- {
- eext_object_event_callback_del(g_pViewAsHandle->pPopUpHandle, EEXT_CALLBACK_BACK, __mp_view_as_ctrl_cancel_btn_cb);
- evas_object_event_callback_del(g_pViewAsHandle->pPopUpHandle, EVAS_CALLBACK_MOUSE_UP, __mp_view_as_ctrl_mouse_up_cb);
- evas_object_smart_callback_del(g_pViewAsHandle->pPopUpHandle, "block,clicked", __mp_view_as_ctrl_cancel_btn_cb);
- evas_object_smart_callback_del((Evas_Object*)mp_util_get_main_window_handle(), "rotation,changed", __mp_view_as_ctrl_rotate_cb);
+ if (g_pViewAsHandle->pPopUpHandle) {
+ eext_object_event_callback_del(g_pViewAsHandle->pPopUpHandle,
+ EEXT_CALLBACK_BACK,
+ __mp_view_as_ctrl_cancel_btn_cb);
+ evas_object_event_callback_del(g_pViewAsHandle->pPopUpHandle,
+ EVAS_CALLBACK_MOUSE_UP,
+ __mp_view_as_ctrl_mouse_up_cb);
+ evas_object_smart_callback_del(g_pViewAsHandle->pPopUpHandle,
+ "block,clicked",
+ __mp_view_as_ctrl_cancel_btn_cb);
+ evas_object_smart_callback_del((Evas_Object *)
+ mp_util_get_main_window_handle(),
+ "rotation,changed",
+ __mp_view_as_ctrl_rotate_cb);
}
MP_DEL_OBJ(g_pViewAsHandle->pGroupRadio);
MP_DEL_OBJ(g_pViewAsHandle->pGenList);
void mp_view_as_ctrl_set_type(MpListViewAsType nViewAsType)
{
- if (!g_pViewAsHandle)
- {
+ if (!g_pViewAsHandle) {
VideoLogError("");
return;
}
- if (MP_LIST_VIEW_AS_NONE >= nViewAsType || nViewAsType >= MP_LIST_VIEW_AS_MAX)
- {
+ if (MP_LIST_VIEW_AS_NONE >= nViewAsType
+ || nViewAsType >= MP_LIST_VIEW_AS_MAX) {
VideoLogWarning("[WARNING] Value of View as type is not matched.");
nViewAsType = MP_LIST_VIEW_AS_THUMBNAIL_LIST;
}
g_pViewAsHandle->nCurrViewAsType = nViewAsType;
- int nRet = preference_set_int(PREF_MP_VIDEO_VIEW_AS_TYPE_KEY, g_pViewAsHandle->nCurrViewAsType);
- if (nRet)
- {
- VideoLogWarning("[WARNING] Fail to set pref value about list view as type.");
+ int nRet =
+ preference_set_int(PREF_MP_VIDEO_VIEW_AS_TYPE_KEY,
+ g_pViewAsHandle->nCurrViewAsType);
+ if (nRet) {
+ VideoLogWarning
+ ("[WARNING] Fail to set pref value about list view as type.");
}
}
-static char *__mp_view_as_ctrl_get_label_of_genlsit_item_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static char *__mp_view_as_ctrl_get_label_of_genlsit_item_cb(const void
+ *pUserData,
+ Evas_Object *
+ pObject,
+ const char
+ *pPart)
{
- int nIndex = (int)pUserData;
+ int nIndex = (int) pUserData;
- if (!strcmp(pPart, "elm.text") || !strcmp(pPart, "elm.text.main.left"))
- {
- switch (nIndex)
- {
+ if (!strcmp(pPart, "elm.text") || !strcmp(pPart, "elm.text.main.left")) {
+ switch (nIndex) {
#ifdef VS_FEATURE_LIST_VIEW
- case MP_LIST_VIEW_AS_NORMAL_LIST: return strdup(VIDEOS_VIEWASOPT_OPT_LIST);
+ case MP_LIST_VIEW_AS_NORMAL_LIST:
+ return strdup(VIDEOS_VIEWASOPT_OPT_LIST);
#endif
#ifdef VS_FEATURE_THUMBNAIL_VIEW
- case MP_LIST_VIEW_AS_THUMBNAIL_LIST: return strdup(VIDEOS_VIEWASOPT_OPT_THUMBNAIL);
+ case MP_LIST_VIEW_AS_THUMBNAIL_LIST:
+ return strdup(VIDEOS_VIEWASOPT_OPT_THUMBNAIL);
#endif
- case MP_LIST_VIEW_AS_FOLDER_LIST: return strdup(VIDEOS_VIEWASOPT_OPT_FOLDER);
+ case MP_LIST_VIEW_AS_FOLDER_LIST:
+ return strdup(VIDEOS_VIEWASOPT_OPT_FOLDER);
}
}
return NULL;
}
-static Evas_Object *__mp_view_as_ctrl_get_icon_of_genlsit_item_cb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+static Evas_Object *__mp_view_as_ctrl_get_icon_of_genlsit_item_cb(const
+ void
+ *pUserData,
+ Evas_Object
+ *
+ pObject,
+ const
+ char
+ *pPart)
{
- if (!g_pViewAsHandle)
- {
+ if (!g_pViewAsHandle) {
VideoLogError("");
return NULL;
}
- int nIndex = (int)pUserData;
+ int nIndex = (int) pUserData;
Evas_Object *pTmpRadio = NULL;
- /*Evas_Object *pLayout = NULL;*/
- if (!strcmp(pPart, "elm.swallow.end") || !strcmp(pPart, "elm.icon.2"))
- {
- //pLayout = elm_layout_add(pObject);
- //elm_layout_theme_set(pLayout, "layout", "list/C/type.2", "default");
-
- //pTmpRadio = elm_radio_add(pLayout);
+ if (!strcmp(pPart, "elm.swallow.end") || !strcmp(pPart, "elm.icon.2")) {
pTmpRadio = elm_radio_add(pObject);
elm_radio_state_value_set(pTmpRadio, nIndex);
elm_radio_group_add(pTmpRadio, g_pViewAsHandle->pGroupRadio);
- if (g_pViewAsHandle->nCurrViewAsType == nIndex)
- {
- elm_radio_value_set(g_pViewAsHandle->pGroupRadio, g_pViewAsHandle->nCurrViewAsType);
+ if (g_pViewAsHandle->nCurrViewAsType == nIndex) {
+ elm_radio_value_set(g_pViewAsHandle->pGroupRadio,
+ g_pViewAsHandle->nCurrViewAsType);
mp_view_as_ctrl_set_type(g_pViewAsHandle->nCurrViewAsType);
}
- evas_object_smart_callback_add(pTmpRadio, "changed", __mp_view_as_ctrl_select_radio_cb, (void *)pUserData);
- //elm_layout_content_set(pLayout, "elm.swallow.content", pTmpRadio);
+ evas_object_smart_callback_add(pTmpRadio, "changed",
+ __mp_view_as_ctrl_select_radio_cb,
+ (void *) pUserData);
evas_object_show(pTmpRadio);
- //evas_object_show(pLayout);
}
- //return pLayout;
return pTmpRadio;
}
-static void __mp_view_as_ctrl_cancel_btn_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_view_as_ctrl_cancel_btn_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
mp_view_as_ctrl_hide();
}
-static void __mp_view_as_ctrl_select_item_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_view_as_ctrl_select_item_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
- if (!g_pViewAsHandle)
- {
+ if (!g_pViewAsHandle) {
VideoLogError("g_pViewAsHandle is ?NULL");
return;
}
}
int nIndex = 0;
- Elm_Object_Item *pItem = (Elm_Object_Item *)pEventInfo;
- Elm_Object_Item *pSelectedItem = elm_genlist_selected_item_get(pObject);
- if (pSelectedItem)
- {
+ Elm_Object_Item *pItem = (Elm_Object_Item *) pEventInfo;
+ Elm_Object_Item *pSelectedItem =
+ elm_genlist_selected_item_get(pObject);
+ if (pSelectedItem) {
elm_genlist_item_selected_set(pSelectedItem, EINA_FALSE);
}
- nIndex = (int)elm_object_item_data_get(pItem);
+ nIndex = (int) elm_object_item_data_get(pItem);
if (nIndex == g_pViewAsHandle->nCurrViewAsType) {
VideoLogInfo("Current state");
mp_view_as_ctrl_hide();
} else {
g_pViewAsHandle->nCurrViewAsType = nIndex;
- elm_radio_value_set(g_pViewAsHandle->pGroupRadio, g_pViewAsHandle->nCurrViewAsType);
+ elm_radio_value_set(g_pViewAsHandle->pGroupRadio,
+ g_pViewAsHandle->nCurrViewAsType);
mp_view_as_ctrl_set_type(g_pViewAsHandle->nCurrViewAsType);
- ListViewAsCtrlCbFunc fFunc = g_pViewAsHandle->ListViewAsCtrlUserCbFunc;
+ ListViewAsCtrlCbFunc fFunc =
+ g_pViewAsHandle->ListViewAsCtrlUserCbFunc;
mp_view_as_ctrl_hide();
- if (fFunc)
- {
+ if (fFunc) {
fFunc();
}
}
}
-static void __mp_view_as_ctrl_select_radio_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_view_as_ctrl_select_radio_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
- if (!g_pViewAsHandle)
- {
+ if (!g_pViewAsHandle) {
VideoLogError("");
return;
}
- int nIndex = (int)pUserData;
+ int nIndex = (int) pUserData;
g_pViewAsHandle->nCurrViewAsType = nIndex;
mp_view_as_ctrl_set_type(g_pViewAsHandle->nCurrViewAsType);
ListViewAsCtrlCbFunc fFunc = g_pViewAsHandle->ListViewAsCtrlUserCbFunc;
mp_view_as_ctrl_hide();
- if (fFunc)
- {
+ if (fFunc) {
fFunc();
}
}
-static void __mp_view_as_ctrl_mouse_up_cb(void *pUserData, Evas *pEvas, Evas_Object *pObject, void *pEventInfo)
+static void __mp_view_as_ctrl_mouse_up_cb(void *pUserData, Evas * pEvas,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
Evas_Event_Mouse_Up *pEvent = pEventInfo;
- if (pEvent->button == 3)
- {
+ if (pEvent->button == 3) {
mp_view_as_ctrl_hide();
}
}
-static void __mp_view_as_ctrl_realized(void *data, Evas_Object *obj, void *event_info)
+static void __mp_view_as_ctrl_realized(void *data, Evas_Object * obj,
+ void *event_info)
{
- if (!event_info || !obj)
- {
+ if (!event_info || !obj) {
VideoLogError("event info is invalid");
return;
}
Elm_Object_Item *pItem = elm_genlist_last_item_get(obj);
- if (pItem)
- {
- elm_object_item_signal_emit(pItem, "elm,state,bottomline,hide", "");
+ if (pItem) {
+ elm_object_item_signal_emit(pItem, "elm,state,bottomline,hide",
+ "");
}
}
-static void __mp_view_as_ctrl_rotate_cb(void *data, Evas_Object *obj, void *event_info)
+static void __mp_view_as_ctrl_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
- if (!g_pViewAsHandle)
- {
+ if (!g_pViewAsHandle) {
VideoLogError("pVideoListSortPopUpHandle IS null");
return;
}
- if (g_pViewAsHandle->nListCount < VIDEO_POPUP_MIN_ITEMS)
- {
+ if (g_pViewAsHandle->nListCount < VIDEO_POPUP_MIN_ITEMS) {
return;
}
- mp_widget_ctrl_set_popup_min_size(g_pViewAsHandle->pBox, g_pViewAsHandle->nListCount, VIDEOS_POPUP_114);
+ mp_widget_ctrl_set_popup_min_size(g_pViewAsHandle->pBox,
+ g_pViewAsHandle->nListCount,
+ VIDEOS_POPUP_114);
}
// External function
////////////////////////////////////////////////////////////
-bool mp_view_as_ctrl_show(int tabType, ListViewAsCtrlCbFunc pListViewAsCtrlCb)
+bool mp_view_as_ctrl_show(int tabType,
+ ListViewAsCtrlCbFunc pListViewAsCtrlCb)
{
VideoLogInfo("");
- if (pListViewAsCtrlCb == NULL)
- {
+ if (pListViewAsCtrlCb == NULL) {
VideoLogError("No have pListViewAsCtrlCb handle.");
return FALSE;
}
mp_view_as_ctrl_delete_handle();
- g_pViewAsHandle = (stMpVideoViewAs*)calloc(1, sizeof(stMpVideoViewAs));
- if (!g_pViewAsHandle)
- {
+ g_pViewAsHandle =
+ (stMpVideoViewAs *) calloc(1, sizeof(stMpVideoViewAs));
+ if (!g_pViewAsHandle) {
VideoLogError("g_pViewAsHandle is NULL");
return FALSE;
}
g_pViewAsHandle->nCurrTabType = tabType;
g_pViewAsHandle->nCurrViewAsType = mp_view_as_ctrl_get_type();
- g_pViewAsHandle->pPopUpHandle = elm_popup_add(mp_util_get_main_window_handle());
-
-
- //elm_object_style_set(pListViewAsPopUpHandle, "content_no_vhpad"); //menustyle
- elm_object_style_set(g_pViewAsHandle->pPopUpHandle, "default"); //menustyle
- elm_object_domain_translatable_part_text_set(g_pViewAsHandle->pPopUpHandle, "title,text", PACKAGE, VIDEOS_VIEWASPOP_HEADER_VIEW_AS);
- evas_object_size_hint_weight_set(g_pViewAsHandle->pPopUpHandle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- eext_object_event_callback_add(g_pViewAsHandle->pPopUpHandle, EEXT_CALLBACK_BACK, __mp_view_as_ctrl_cancel_btn_cb, NULL);
- evas_object_event_callback_add(g_pViewAsHandle->pPopUpHandle, EVAS_CALLBACK_MOUSE_UP, __mp_view_as_ctrl_mouse_up_cb, NULL);
- evas_object_smart_callback_add(g_pViewAsHandle->pPopUpHandle, "block,clicked", __mp_view_as_ctrl_cancel_btn_cb, NULL);
- evas_object_smart_callback_add((Evas_Object*)mp_util_get_main_window_handle(), "rotation,changed", __mp_view_as_ctrl_rotate_cb, NULL);
+ g_pViewAsHandle->pPopUpHandle =
+ elm_popup_add(mp_util_get_main_window_handle());
+ elm_object_style_set(g_pViewAsHandle->pPopUpHandle, "theme_bg");
+
+ elm_object_domain_translatable_part_text_set(g_pViewAsHandle->
+ pPopUpHandle,
+ "title,text", PACKAGE,
+ VIDEOS_VIEWASPOP_HEADER_VIEW_AS);
+ evas_object_size_hint_weight_set(g_pViewAsHandle->pPopUpHandle,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+ eext_object_event_callback_add(g_pViewAsHandle->pPopUpHandle,
+ EEXT_CALLBACK_BACK,
+ __mp_view_as_ctrl_cancel_btn_cb, NULL);
+ evas_object_event_callback_add(g_pViewAsHandle->pPopUpHandle,
+ EVAS_CALLBACK_MOUSE_UP,
+ __mp_view_as_ctrl_mouse_up_cb, NULL);
+ evas_object_smart_callback_add(g_pViewAsHandle->pPopUpHandle,
+ "block,clicked",
+ __mp_view_as_ctrl_cancel_btn_cb, NULL);
+ evas_object_smart_callback_add((Evas_Object *)
+ mp_util_get_main_window_handle(),
+ "rotation,changed",
+ __mp_view_as_ctrl_rotate_cb, NULL);
// Set item of Genlist.
MP_DEL_ITC(g_pViewAsHandle->stViewAsItc);
g_pViewAsHandle->stViewAsItc = elm_genlist_item_class_new();
g_pViewAsHandle->stViewAsItc->item_style = "default"; //"1text.1icon.2/popup";
- g_pViewAsHandle->stViewAsItc->func.text_get = (void *)__mp_view_as_ctrl_get_label_of_genlsit_item_cb;
- g_pViewAsHandle->stViewAsItc->func.content_get = (void *)__mp_view_as_ctrl_get_icon_of_genlsit_item_cb;
+ g_pViewAsHandle->stViewAsItc->func.text_get =
+ (void *) __mp_view_as_ctrl_get_label_of_genlsit_item_cb;
+ g_pViewAsHandle->stViewAsItc->func.content_get =
+ (void *) __mp_view_as_ctrl_get_icon_of_genlsit_item_cb;
g_pViewAsHandle->stViewAsItc->func.state_get = NULL;
g_pViewAsHandle->stViewAsItc->func.del = NULL;
// Create genlist handle
- g_pViewAsHandle->pGenList = elm_genlist_add(g_pViewAsHandle->pPopUpHandle);
- evas_object_size_hint_weight_set(g_pViewAsHandle->pGenList, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(g_pViewAsHandle->pGenList, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_smart_callback_add(g_pViewAsHandle->pGenList, "realized", __mp_view_as_ctrl_realized, NULL);
-
- g_pViewAsHandle->pGroupRadio = elm_radio_add(g_pViewAsHandle->pGenList);
+ g_pViewAsHandle->pGenList =
+ elm_genlist_add(g_pViewAsHandle->pPopUpHandle);
+ evas_object_size_hint_weight_set(g_pViewAsHandle->pGenList,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(g_pViewAsHandle->pGenList,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_smart_callback_add(g_pViewAsHandle->pGenList, "realized",
+ __mp_view_as_ctrl_realized, NULL);
+
+ g_pViewAsHandle->pGroupRadio =
+ elm_radio_add(g_pViewAsHandle->pGenList);
int nMax_view_list = 0;
#ifdef VS_FEATURE_LIST_VIEW
- elm_genlist_item_append(g_pViewAsHandle->pGenList, g_pViewAsHandle->stViewAsItc, (void *)MP_LIST_VIEW_AS_NORMAL_LIST, NULL, ELM_GENLIST_ITEM_NONE, __mp_view_as_ctrl_select_item_cb, NULL);
+ elm_genlist_item_append(g_pViewAsHandle->pGenList,
+ g_pViewAsHandle->stViewAsItc,
+ (void *) MP_LIST_VIEW_AS_NORMAL_LIST, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __mp_view_as_ctrl_select_item_cb, NULL);
nMax_view_list++;
#endif
#ifdef VS_FEATURE_THUMBNAIL_VIEW
- elm_genlist_item_append(g_pViewAsHandle->pGenList, g_pViewAsHandle->stViewAsItc, (void *)MP_LIST_VIEW_AS_THUMBNAIL_LIST, NULL, ELM_GENLIST_ITEM_NONE, __mp_view_as_ctrl_select_item_cb, NULL);
+ elm_genlist_item_append(g_pViewAsHandle->pGenList,
+ g_pViewAsHandle->stViewAsItc,
+ (void *) MP_LIST_VIEW_AS_THUMBNAIL_LIST, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __mp_view_as_ctrl_select_item_cb, NULL);
nMax_view_list++;
#endif
#ifdef ENABLE_STORE_VIEWAS
- if (FOOTER_TAB_TYPE_PERSONAL == g_pViewAsHandle->nCurrTabType)
- {
- elm_genlist_item_append(g_pViewAsHandle->pGenList, g_pViewAsHandle->stViewAsItc, (void *)MP_LIST_VIEW_AS_FOLDER_LIST, NULL, ELM_GENLIST_ITEM_NONE, __mp_view_as_ctrl_select_item_cb, NULL);
+ if (FOOTER_TAB_TYPE_PERSONAL == g_pViewAsHandle->nCurrTabType) {
+ elm_genlist_item_append(g_pViewAsHandle->pGenList,
+ g_pViewAsHandle->stViewAsItc,
+ (void *) MP_LIST_VIEW_AS_FOLDER_LIST, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __mp_view_as_ctrl_select_item_cb, NULL);
nMax_view_list++;
}
#else
- elm_genlist_item_append(g_pViewAsHandle->pGenList, g_pViewAsHandle->stViewAsItc, (void *)MP_LIST_VIEW_AS_FOLDER_LIST, NULL, ELM_GENLIST_ITEM_NONE, __mp_view_as_ctrl_select_item_cb, NULL);
+ elm_genlist_item_append(g_pViewAsHandle->pGenList,
+ g_pViewAsHandle->stViewAsItc,
+ (void *) MP_LIST_VIEW_AS_FOLDER_LIST, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __mp_view_as_ctrl_select_item_cb, NULL);
nMax_view_list++;
#endif
g_pViewAsHandle->pBox = elm_box_add(g_pViewAsHandle->pPopUpHandle);
- mp_widget_ctrl_set_popup_min_size(g_pViewAsHandle->pBox, g_pViewAsHandle->nListCount, VIDEOS_POPUP_114);
- evas_object_size_hint_weight_set(g_pViewAsHandle->pBox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(g_pViewAsHandle->pBox, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ mp_widget_ctrl_set_popup_min_size(g_pViewAsHandle->pBox,
+ g_pViewAsHandle->nListCount,
+ VIDEOS_POPUP_114);
+ evas_object_size_hint_weight_set(g_pViewAsHandle->pBox,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(g_pViewAsHandle->pBox, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
elm_box_pack_end(g_pViewAsHandle->pBox, g_pViewAsHandle->pGenList);
- elm_object_content_set(g_pViewAsHandle->pPopUpHandle, g_pViewAsHandle->pBox);
+ elm_object_content_set(g_pViewAsHandle->pPopUpHandle,
+ g_pViewAsHandle->pBox);
evas_object_show(g_pViewAsHandle->pGenList);
evas_object_show(g_pViewAsHandle->pPopUpHandle);
void mp_view_as_ctrl_change_language(void)
{
- if (!g_pViewAsHandle)
- {
+ if (!g_pViewAsHandle) {
VideoLogError("g_pViewAsHandle is NULL");
return;
}
- if (!g_pViewAsHandle->pGenList || !g_pViewAsHandle->pPopUpHandle)
- {
+ if (!g_pViewAsHandle->pGenList || !g_pViewAsHandle->pPopUpHandle) {
VideoLogInfo("No existed genlist or popup handle.");
return;
}
VideoLogInfo("");
- elm_object_domain_translatable_part_text_set(g_pViewAsHandle->pPopUpHandle, "title,text", PACKAGE, VIDEOS_VIEWASPOP_HEADER_VIEW_AS);
+ elm_object_domain_translatable_part_text_set(g_pViewAsHandle->
+ pPopUpHandle,
+ "title,text", PACKAGE,
+ VIDEOS_VIEWASPOP_HEADER_VIEW_AS);
elm_genlist_realized_items_update(g_pViewAsHandle->pGenList);
}
int nValue = MP_LIST_VIEW_AS_NONE;
if (preference_get_int(PREF_MP_VIDEO_VIEW_AS_TYPE_KEY, &nValue) != 0) {
- VideoLogInfo("Setting normal list type because of defending wrong value.");
+ VideoLogInfo
+ ("Setting normal list type because of defending wrong value.");
mp_view_as_ctrl_set_type(MP_LIST_VIEW_AS_THUMBNAIL_LIST);
return MP_LIST_VIEW_AS_THUMBNAIL_LIST;
}
}
return nValue;
}
-
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <Elementary.h>
#include "mp-video-value-define.h"
void
-mp_object_part_translate_set(Evas_Object *pObject, const char *ID,
- const char *pPart)
+mp_object_part_translate_set(Evas_Object * pObject, const char *ID,
+ const char *pPart)
{
if (!pObject || !ID || !pPart) {
VideoLogError("pObject || ID || pPart == NULL!!!");
const char *domain;
domain = NULL;
elm_object_domain_translatable_part_text_set(pObject, pPart, domain,
- ID);
+ ID);
}
-Evas_Object *mp_create_nocontent_layout(const Evas_Object *pParent,
- const char *pText,
- const char *pHelpText)
+Evas_Object *mp_create_nocontent_layout(const Evas_Object * pParent,
+ const char *pText,
+ const char *pHelpText)
{
Evas_Object *pLayout = NULL;
return NULL;
}
- VideoSecureLogInfo("pText : [%s], pHelpText : [%s]", pText,
- pHelpText);
+ VideoSecureLogInfo("pText : [%s], pHelpText : [%s]", pText, pHelpText);
- pLayout = elm_layout_add((Evas_Object *)pParent);
+ pLayout = elm_layout_add((Evas_Object *) pParent);
elm_layout_theme_set(pLayout, "layout", "nocontents", "text");
evas_object_size_hint_weight_set(pLayout, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pLayout, EVAS_HINT_FILL,
- EVAS_HINT_FILL);
+ EVAS_HINT_FILL);
- //mp_object_part_translate_set(pLayout, pText, "elm.text");
elm_object_part_text_set(pLayout, "elm.text", pText);
if (pHelpText != 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
#include <glib.h>
bool bPersonalType;
bool bSetToEnd;
Ecore_Idler *pSetLineEndIdler;
-}stRenamePopup;
+} stRenamePopup;
stRenamePopup *g_pRenameHandle = NULL;
-//static void _MpRenameDeletePopupHandle(void);
static bool __mp_rename_ctrl_check_valid_text(const char *text, int *nLen);
static bool __mp_rename_ctrl_check_valid_all_space(const char *text);
-/*
-static void __mp_rename_ctrl_invalid_popup_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
-{
- if (!pUserData) {
- VideoLogError("pUserData is NULL");
- return;
- }
- VideoLogInfo("");
-
- Evas_Object *en = pUserData;
- mp_util_delete_popup_handle();
-
- elm_entry_cursor_end_set(en);
- evas_object_show(en);
- elm_object_focus_set(en, EINA_TRUE);
-}
-*/
////////////////////////////////////////////////////////////
// Callback function
////////////////////////////////////////////////////////////
-static void __mp_rename_ctrl_cancel_btn_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_rename_ctrl_cancel_btn_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
mp_rename_ctrl_delete_handle();
}
-static void __mp_rename_ctrl_timeout_cb(void *pUserData, Evas_Object *pObject, void *event_info) {
+static void __mp_rename_ctrl_timeout_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *event_info)
+{
evas_object_del(pObject);
elm_entry_cursor_end_set(g_pRenameHandle->pEntry);
elm_object_focus_set(g_pRenameHandle->pEntry, EINA_TRUE);
}
-static void __mp_rename_ctrl_ok_btn_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_rename_ctrl_ok_btn_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
- Evas_Object *en = (Evas_Object *)pUserData;
+ Evas_Object *en = (Evas_Object *) pUserData;
if (!en || !g_pRenameHandle) {
VideoLogError("g_pRenameHandle is NULL");
return;
}
int nDstLen = 0;
- if (!__mp_rename_ctrl_check_valid_text(g_pRenameHandle->szSaveFileName, &nDstLen)) {
- mp_util_ticker_toast_with_timeout_cb_popup(VIDEOS_NOTIPOP_MSG_INVALID_CHARACTERS, __mp_rename_ctrl_timeout_cb);
+ if (!__mp_rename_ctrl_check_valid_text
+ (g_pRenameHandle->szSaveFileName, &nDstLen)) {
+ mp_util_ticker_toast_with_timeout_cb_popup
+ (VIDEOS_NOTIPOP_MSG_INVALID_CHARACTERS,
+ __mp_rename_ctrl_timeout_cb);
return;
}
- char *szFilePath = mp_util_svc_get_video_url(g_pRenameHandle->nVideoIndex);
+ char *szFilePath =
+ mp_util_svc_get_video_url(g_pRenameHandle->nVideoIndex);
if (!szFilePath) {
VideoLogError("szFilePath is NULL.");
mp_rename_ctrl_delete_handle();
return;
}
- int nLastPlayedTime = mp_util_svc_get_video_last_play_time_by_video_url(szFilePath);
+ int nLastPlayedTime =
+ mp_util_svc_get_video_last_play_time_by_video_url(szFilePath);
char *szLocation = NULL;
- szLocation = g_strndup(szFilePath, strlen(szFilePath) - strlen(szFileName));
+ szLocation =
+ g_strndup(szFilePath, strlen(szFilePath) - strlen(szFileName));
if (!szLocation) {
VideoLogError("szLocation is NULL.");
return;
}
- char *szNewFile = g_strdup_printf("%s/%s.%s", szLocation, g_pRenameHandle->szSaveFileName, szFileExt);
+ char *szNewFile =
+ g_strdup_printf("%s/%s.%s", szLocation,
+ g_pRenameHandle->szSaveFileName, szFileExt);
if (!szNewFile || vp_file_exists(szNewFile)) {
VideoLogInfo("szNewFile is %s.", szNewFile);
MP_FREE_STRING(szFilePath);
MP_FREE_STRING(szFileExt);
MP_FREE_STRING(szLocation);
-// mp_rename_ctrl_delete_handle();
- mp_util_ticker_toast_with_timeout_cb_popup(VIDEOS_NOTIPOP_MSG_ALREADY_EXISTS, __mp_rename_ctrl_timeout_cb);
+ mp_util_ticker_toast_with_timeout_cb_popup
+ (VIDEOS_NOTIPOP_MSG_ALREADY_EXISTS,
+ __mp_rename_ctrl_timeout_cb);
return;
}
if (strcmp(szNewFile, szFilePath) != 0) {
VideoLogInfo("Correct new name style");
char *szNewPath = NULL;
- int ret = mp_util_rename_file((const char *)szFilePath, (const char *)szNewFile, &szNewPath);
+ int ret =
+ mp_util_rename_file((const char *) szFilePath,
+ (const char *) szNewFile, &szNewPath);
if (!szNewPath) {
VideoLogError("szNewPath is NULL.");
if (ret != 0) {
VideoLogError("mp_util_rename_file failed");
} else {
- mp_util_svc_move_to_db(g_pRenameHandle->nVideoIndex, szNewPath);
- mp_util_svc_set_video_last_played_time_by_url(szNewFile, nLastPlayedTime);
+ mp_util_svc_move_to_db(g_pRenameHandle->nVideoIndex,
+ szNewPath);
+ mp_util_svc_set_video_last_played_time_by_url(szNewFile,
+ nLastPlayedTime);
}
char *szMediaUrl = mp_util_config_get_preview();
if (szMediaUrl) {
if (!strcmp(szFilePath, szMediaUrl)) {
mp_util_config_set_preview(szNewFile);
- mp_util_svc_set_video_last_played_time_by_url(szNewFile, nLastPlayedTime);
+ mp_util_svc_set_video_last_played_time_by_url(szNewFile,
+ nLastPlayedTime);
}
}
mp_rename_ctrl_delete_handle();
}
-static void __mp_rename_ctrl_entry_max_len_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_rename_ctrl_entry_max_len_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
- //mp_util_info_popup(VIDEOS_NOTIPOP_MSG_MAX_NUM_OF_CHARACTERS, __MpRenameEntryMaxLenBackCb, pUserData, VIDEOS_STRING);
- mp_util_ticker_toast_popup(VIDEOS_NOTIPOP_MSG_MAX_NUM_OF_CHARACTERS, false, false);
+ mp_util_ticker_toast_popup(VIDEOS_NOTIPOP_MSG_MAX_NUM_OF_CHARACTERS,
+ false, false);
}
-static void __mp_rename_ctrl_entry_activate_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+static void __mp_rename_ctrl_entry_activate_cb(void *pUserData,
+ Evas_Object * pObject,
+ void *pEventInfo)
{
if (!g_pRenameHandle) {
VideoLogError("g_pRenameHandle is NULL");
return;
}
- char *entry_data = (char *)elm_entry_entry_get(pObject);
+ char *entry_data = (char *) elm_entry_entry_get(pObject);
char *szFileName = elm_entry_markup_to_utf8(entry_data);
if (!szFileName) {
MP_FREE_STRING(g_pRenameHandle->szSaveFileName);
if (!strlen(szFileName)) {
VideoLogWarning("title is empty");
- }
- else {
+ } else {
g_pRenameHandle->szSaveFileName = g_strdup(szFileName);
}
return ECORE_CALLBACK_CANCEL;
}
-static void __mp_rename_ctrl_entry_clear_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+static void __mp_rename_ctrl_entry_clear_cb(void *data, Evas_Object * obj,
+ const char *emission,
+ const char *source)
{
if (!g_pRenameHandle) {
VideoLogError("g_pRenameHandle is NULL");
return;
}
- Evas_Object *en = (Evas_Object *)data;
+ Evas_Object *en = (Evas_Object *) data;
elm_entry_entry_set(en, "");
MP_FREE_STRING(g_pRenameHandle->szTempName);
}
-static void __mp_rename_ctrl_entry_changed_cb(void *pUserData, Evas_Object *pObj, void *pEvent)
+static void __mp_rename_ctrl_entry_changed_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEvent)
{
if (!g_pRenameHandle) {
VideoLogError("g_pRenameHandle is NULL");
Evas_Object *en = pObj;
- char *entry_data = (char *)elm_entry_entry_get(en);
+ char *entry_data = (char *) elm_entry_entry_get(en);
char *szFileName = elm_entry_markup_to_utf8(entry_data);
int nDstLen = 0;
bool isEmpty = elm_entry_is_empty(en);
if (isEmpty) {
VideoLogInfo("Entry is empty");
- elm_object_part_content_unset(g_pRenameHandle->pEntryLayout, "elm.swallow.end");
+ elm_object_part_content_unset(g_pRenameHandle->pEntryLayout,
+ "elm.swallow.end");
evas_object_hide(g_pRenameHandle->pEntryClearBtn);
} else {
- elm_object_part_content_set(g_pRenameHandle->pEntryLayout, "elm.swallow.end", g_pRenameHandle->pEntryClearBtn);
+ elm_object_part_content_set(g_pRenameHandle->pEntryLayout,
+ "elm.swallow.end",
+ g_pRenameHandle->pEntryClearBtn);
evas_object_show(g_pRenameHandle->pEntryClearBtn);
}
MP_FREE_STRING(g_pRenameHandle->szSaveFileName);
- if (isEmpty || !__mp_rename_ctrl_check_valid_all_space(szFileName))
- {
+ if (isEmpty || !__mp_rename_ctrl_check_valid_all_space(szFileName)) {
VideoLogWarning("Title is empty or title consists of only spaces");
if (g_pRenameHandle->pPopupOkBtn) {
- elm_object_disabled_set(g_pRenameHandle->pPopupOkBtn, EINA_TRUE);
+ elm_object_disabled_set(g_pRenameHandle->pPopupOkBtn,
+ EINA_TRUE);
}
- } else if (!__mp_rename_ctrl_check_valid_text(szFileName, &nDstLen))
- {
+ } else if (!__mp_rename_ctrl_check_valid_text(szFileName, &nDstLen)) {
VideoLogWarning("New file name is invalid.");
if (!g_strcmp0(g_pRenameHandle->szOldName, szFileName)) {
- elm_object_disabled_set(g_pRenameHandle->pPopupOkBtn, EINA_TRUE);
+ elm_object_disabled_set(g_pRenameHandle->pPopupOkBtn,
+ EINA_TRUE);
VideoLogInfo("it is the old name");
} else {
int position = elm_entry_cursor_pos_get(en);
- elm_entry_entry_set(en, elm_entry_utf8_to_markup(g_pRenameHandle->szTempName));
+ elm_entry_entry_set(en,
+ elm_entry_utf8_to_markup(g_pRenameHandle->
+ szTempName));
elm_entry_cursor_begin_set(en);
elm_entry_cursor_pos_set(en, position - 1);
- mp_util_status_bar_noti_popup_show(VIDEOS_NOTIPOP_MSG_INVALID_CHARACTERS);
+ mp_util_status_bar_noti_popup_show
+ (VIDEOS_NOTIPOP_MSG_INVALID_CHARACTERS);
MP_FREE_STRING(szFileName);
return;
}
} else {
g_pRenameHandle->szSaveFileName = g_strdup(szFileName);
if (!g_strcmp0(g_pRenameHandle->szOldName, szFileName)) {
- elm_object_disabled_set(g_pRenameHandle->pPopupOkBtn, EINA_TRUE);
+ elm_object_disabled_set(g_pRenameHandle->pPopupOkBtn,
+ EINA_TRUE);
VideoLogInfo("it is the old name");
- /*elm_entry_select_all(en);*/
+ /*elm_entry_select_all(en); */
elm_entry_cursor_end_set(en);
} else {
- elm_object_disabled_set(g_pRenameHandle->pPopupOkBtn, EINA_FALSE);
+ elm_object_disabled_set(g_pRenameHandle->pPopupOkBtn,
+ EINA_FALSE);
}
}
MP_FREE_STRING(g_pRenameHandle->szTempName);
g_pRenameHandle->szTempName = strdup(szFileName);
if (g_pRenameHandle->bSetToEnd) {
MP_DEL_IDLER(g_pRenameHandle->pSetLineEndIdler);
- g_pRenameHandle->pSetLineEndIdler = ecore_idler_add(__mp_rename_ctrl_entry_set_line_end, pObj);
+ g_pRenameHandle->pSetLineEndIdler =
+ ecore_idler_add(__mp_rename_ctrl_entry_set_line_end, pObj);
}
- MP_FREE_STRING(szFileName);
+ MP_FREE_STRING(szFileName);
}
-static void __mp_rename_ctrl_entry_clicked_cb(void *pUserData, Evas_Object *pObj, void *pEvent)
+static void __mp_rename_ctrl_entry_clicked_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEvent)
{
if (!g_pRenameHandle) {
VideoLogError("g_pRenameHandle is NULL");
return;
}
- Evas_Object *en = (Evas_Object *)pObj;
+ Evas_Object *en = (Evas_Object *) pObj;
elm_entry_select_none(en);
}
-static void __mp_rename_ctrl_entry_long_pressed_cb(void *pUserData, Evas_Object *pObj, void *pEvent)
+static void __mp_rename_ctrl_entry_long_pressed_cb(void *pUserData,
+ Evas_Object * pObj,
+ void *pEvent)
{
if (!g_pRenameHandle) {
VideoLogError("g_pRenameHandle is NULL");
return;
}
- Evas_Object *en = (Evas_Object *)pObj;
- evas_object_smart_callback_del (en, "clicked", (Evas_Smart_Cb) __mp_rename_ctrl_entry_clicked_cb);
+ Evas_Object *en = (Evas_Object *) pObj;
+ evas_object_smart_callback_del(en, "clicked",
+ (Evas_Smart_Cb)
+ __mp_rename_ctrl_entry_clicked_cb);
}
-static void __mp_entry_show_cb(void *data, Evas *e, Evas_Object *pObj, void *event_pEvent)
+static void __mp_entry_show_cb(void *data, Evas * e, Evas_Object * pObj,
+ void *event_pEvent)
{
- elm_object_focus_set(pObj, EINA_TRUE);
+ elm_object_focus_set(pObj, EINA_TRUE);
}
+
////////////////////////////////////////////////////////////
// Internal function
////////////////////////////////////////////////////////////
MP_FREE_STRING(szTitle);
}
-static void __mp_rename_view_rotate_cb(void *data, Evas_Object *obj, void *event_info)
+static void __mp_rename_view_rotate_cb(void *data, Evas_Object * obj,
+ void *event_info)
{
if (!g_pRenameHandle) {
VideoLogError("__mp_rename_view_rotate_cb IS null");
// External function
////////////////////////////////////////////////////////////
-Evas_Object *mp_rename_ctrl_show(void *pNaviFrameHandle, void *pUserData, mpRenameCtrlCbFunc pRenameCtrlCb, int nVideoItemIndex)
+Evas_Object *mp_rename_ctrl_show(void *pNaviFrameHandle, void *pUserData,
+ mpRenameCtrlCbFunc pRenameCtrlCb,
+ int nVideoItemIndex)
{
VideoLogInfo("");
mp_rename_ctrl_delete_handle();
- g_pRenameHandle = (stRenamePopup*)calloc(1, sizeof(stRenamePopup));
+ g_pRenameHandle = (stRenamePopup *) calloc(1, sizeof(stRenamePopup));
if (!g_pRenameHandle) {
VideoLogError("g_pRenameHandle is NULL");
return FALSE;
g_pRenameHandle->nVideoIndex = nVideoItemIndex;
g_pRenameHandle->bSetToEnd = TRUE;
- char *pVideoFile = mp_util_svc_get_video_url(g_pRenameHandle->nVideoIndex);
+ char *pVideoFile =
+ mp_util_svc_get_video_url(g_pRenameHandle->nVideoIndex);
char *szFileExt = mp_info_ctrl_get_file_extension(pVideoFile);
- //g_pRenameHandle->bPersonalType = mp_util_check_video_personal_status((const char*)pVideoFile);
- mp_widget_ctrl_disable_navi_handle_focus_except_item(g_pRenameHandle->pNaviFrameHandle, NULL);
+ mp_widget_ctrl_disable_navi_handle_focus_except_item(g_pRenameHandle->
+ pNaviFrameHandle,
+ NULL);
- evas_object_smart_callback_add((Evas_Object*)mp_util_get_main_window_handle(), "wm,rotation,changed", __mp_rename_view_rotate_cb, NULL);
+ evas_object_smart_callback_add((Evas_Object *)
+ mp_util_get_main_window_handle(),
+ "wm,rotation,changed",
+ __mp_rename_view_rotate_cb, NULL);
Evas_Object *pLayout = NULL;
- //mp_util_svc_set_update_db_cb_func(pRenameCtrlCb);
- char edj_path[1024] = {0};
+ char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
snprintf(edj_path, 1024, "%s%s/%s", path, "edje", VIDEO_CUSTOM_THEME);
free(path);
//Create popup
- g_pRenameHandle->pPopUpHandle = elm_popup_add(g_pRenameHandle->pNaviFrameHandle);
+ g_pRenameHandle->pPopUpHandle =
+ elm_popup_add(g_pRenameHandle->pNaviFrameHandle);
- //elm_object_style_set(g_pRenameHandle->pPopUpHandle, "no_effect");
- eext_object_event_callback_add(g_pRenameHandle->pPopUpHandle, EEXT_CALLBACK_BACK, __mp_rename_ctrl_cancel_btn_cb, pUserData);
+ eext_object_event_callback_add(g_pRenameHandle->pPopUpHandle,
+ EEXT_CALLBACK_BACK,
+ __mp_rename_ctrl_cancel_btn_cb,
+ pUserData);
- elm_object_part_text_set(g_pRenameHandle->pPopUpHandle, "title,text", VIDEOS_RENAMEPOP_HEADER_RENAME);
- evas_object_size_hint_weight_set(g_pRenameHandle->pPopUpHandle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- //evas_object_smart_callback_add(mp_util_get_main_conformat(), "virtualkeypad,state,on", __mp_rename_ctrl_keypad_on, g_pRenameHandle->pPopUpHandle);
- //evas_object_smart_callback_add(mp_util_get_main_conformat(), "virtualkeypad,state,off", __mp_rename_ctrl_keypad_off, g_pRenameHandle->pPopUpHandle);
+ elm_object_part_text_set(g_pRenameHandle->pPopUpHandle, "title,text",
+ VIDEOS_RENAMEPOP_HEADER_RENAME);
+ evas_object_size_hint_weight_set(g_pRenameHandle->pPopUpHandle,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
pLayout = elm_layout_add(g_pRenameHandle->pPopUpHandle);
elm_layout_file_set(pLayout, edj_path, "pv.popup.entry");
elm_entry_cnp_mode_set(en, ELM_CNP_MODE_PLAINTEXT);
elm_entry_input_panel_layout_set(en, ELM_INPUT_PANEL_LAYOUT_NORMAL);
elm_entry_editable_set(en, TRUE);
- elm_entry_input_panel_return_key_type_set(en, ELM_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT);
+ elm_entry_input_panel_return_key_type_set(en,
+ ELM_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT);
elm_entry_input_panel_return_key_disabled_set(en, EINA_FALSE);
elm_entry_prediction_allow_set(en, EINA_TRUE);
g_pRenameHandle->pEntryLayout = pLayout;
static Elm_Entry_Filter_Limit_Size limit_filter_data;
limit_filter_data.max_char_count = VIDEO_FILE_SEARCH_CHAR_LEN_MAX;
limit_filter_data.max_byte_count = 0;
- elm_entry_markup_filter_append(en, elm_entry_filter_limit_size, &limit_filter_data);
-
- evas_object_smart_callback_add(en, "maxlength,reached", __mp_rename_ctrl_entry_max_len_cb, pUserData);
- evas_object_smart_callback_add(en, "activated", __mp_rename_ctrl_entry_activate_cb, pUserData);
- evas_object_smart_callback_add(en, "changed", __mp_rename_ctrl_entry_changed_cb, pUserData);
- evas_object_smart_callback_add(en, "preedit,changed", __mp_rename_ctrl_entry_changed_cb, pUserData);
- evas_object_smart_callback_add(en, "clicked", __mp_rename_ctrl_entry_clicked_cb, pUserData);
- evas_object_smart_callback_add(en, "longpressed", __mp_rename_ctrl_entry_long_pressed_cb, pUserData);
- evas_object_event_callback_add(en, EVAS_CALLBACK_SHOW, __mp_entry_show_cb, pUserData);
+ elm_entry_markup_filter_append(en, elm_entry_filter_limit_size,
+ &limit_filter_data);
+
+ evas_object_smart_callback_add(en, "maxlength,reached",
+ __mp_rename_ctrl_entry_max_len_cb,
+ pUserData);
+ evas_object_smart_callback_add(en, "activated",
+ __mp_rename_ctrl_entry_activate_cb,
+ pUserData);
+ evas_object_smart_callback_add(en, "changed",
+ __mp_rename_ctrl_entry_changed_cb,
+ pUserData);
+ evas_object_smart_callback_add(en, "preedit,changed",
+ __mp_rename_ctrl_entry_changed_cb,
+ pUserData);
+ evas_object_smart_callback_add(en, "clicked",
+ __mp_rename_ctrl_entry_clicked_cb,
+ pUserData);
+ evas_object_smart_callback_add(en, "longpressed",
+ __mp_rename_ctrl_entry_long_pressed_cb,
+ pUserData);
+ evas_object_event_callback_add(en, EVAS_CALLBACK_SHOW,
+ __mp_entry_show_cb, pUserData);
__mp_rename_ctrl_set_save_file_name();
MP_FREE_STRING(g_pRenameHandle->szOldName);
g_pRenameHandle->szOldName = g_strdup(g_pRenameHandle->szSaveFileName);
- char *pNameUtf8 = elm_entry_utf8_to_markup(g_pRenameHandle->szSaveFileName);
+ char *pNameUtf8 =
+ elm_entry_utf8_to_markup(g_pRenameHandle->szSaveFileName);
elm_entry_entry_set(en, pNameUtf8);
MP_FREE_STRING(pNameUtf8);
elm_object_focus_set(en, EINA_TRUE);
g_pRenameHandle->pEntryClearBtn = elm_button_add(pLayout);
elm_object_style_set(g_pRenameHandle->pEntryClearBtn, "clear");
- elm_object_part_content_set(pLayout, "elm.swallow.end", g_pRenameHandle->pEntryClearBtn);
- elm_object_signal_callback_add(g_pRenameHandle->pEntryClearBtn, "elm,action,click", "", __mp_rename_ctrl_entry_clear_cb, (void*)en);
+ elm_object_part_content_set(pLayout, "elm.swallow.end",
+ g_pRenameHandle->pEntryClearBtn);
+ elm_object_signal_callback_add(g_pRenameHandle->pEntryClearBtn,
+ "elm,action,click", "",
+ __mp_rename_ctrl_entry_clear_cb,
+ (void *) en);
evas_object_show(g_pRenameHandle->pEntryClearBtn);
- g_pRenameHandle->pPopupCancelBtn = elm_button_add(g_pRenameHandle->pPopUpHandle);
- elm_object_style_set (g_pRenameHandle->pPopupCancelBtn, "popup");
- elm_object_domain_translatable_text_set(g_pRenameHandle->pPopupCancelBtn, VIDEOS_STRING, VIDEOS_COMMON_BUTTON_CANCEL_IDS);
- elm_object_part_content_set(g_pRenameHandle->pPopUpHandle, "button1", g_pRenameHandle->pPopupCancelBtn);
- evas_object_smart_callback_add(g_pRenameHandle->pPopupCancelBtn, "clicked", __mp_rename_ctrl_cancel_btn_cb, pUserData);
-
- g_pRenameHandle->pPopupOkBtn = elm_button_add(g_pRenameHandle->pPopUpHandle);
- elm_object_style_set (g_pRenameHandle->pPopupOkBtn, "popup");
- //elm_object_text_set(g_pRenameHandle->pPopupOkBtn, VIDEOS_RENAMEPOP_BUTTON_RENAME);
- elm_object_domain_translatable_text_set(g_pRenameHandle->pPopupOkBtn, VIDEOS_STRING, VIDEOS_COMMON_BUTTON_RENAME_IDS);
- elm_object_part_content_set(g_pRenameHandle->pPopUpHandle, "button2", g_pRenameHandle->pPopupOkBtn);
- evas_object_smart_callback_add(g_pRenameHandle->pPopupOkBtn, "clicked", __mp_rename_ctrl_ok_btn_cb, en);
+ g_pRenameHandle->pPopupCancelBtn =
+ elm_button_add(g_pRenameHandle->pPopUpHandle);
+ elm_object_style_set(g_pRenameHandle->pPopupCancelBtn, "popup");
+ elm_object_domain_translatable_text_set(g_pRenameHandle->
+ pPopupCancelBtn, VIDEOS_STRING,
+ VIDEOS_COMMON_BUTTON_CANCEL_IDS);
+ elm_object_part_content_set(g_pRenameHandle->pPopUpHandle, "button1",
+ g_pRenameHandle->pPopupCancelBtn);
+ evas_object_smart_callback_add(g_pRenameHandle->pPopupCancelBtn,
+ "clicked",
+ __mp_rename_ctrl_cancel_btn_cb,
+ pUserData);
+
+ g_pRenameHandle->pPopupOkBtn =
+ elm_button_add(g_pRenameHandle->pPopUpHandle);
+ elm_object_style_set(g_pRenameHandle->pPopupOkBtn, "popup");
+ elm_object_domain_translatable_text_set(g_pRenameHandle->pPopupOkBtn,
+ VIDEOS_STRING,
+ VIDEOS_COMMON_BUTTON_RENAME_IDS);
+ elm_object_part_content_set(g_pRenameHandle->pPopUpHandle, "button2",
+ g_pRenameHandle->pPopupOkBtn);
+ evas_object_smart_callback_add(g_pRenameHandle->pPopupOkBtn, "clicked",
+ __mp_rename_ctrl_ok_btn_cb, en);
elm_object_disabled_set(g_pRenameHandle->pPopupOkBtn, EINA_TRUE);
evas_object_show(g_pRenameHandle->pPopUpHandle);
bool mp_rename_ctrl_is_top_view()
{
- if (!g_pRenameHandle)
- {
+ if (!g_pRenameHandle) {
VideoLogInfo("RenamePopUp is not shown");
return FALSE;
}
void mp_rename_ctrl_set_focus()
{
- if (!g_pRenameHandle)
- {
+ if (!g_pRenameHandle) {
VideoLogInfo("RenamePopUp is not shown");
return;
}
VideoLogInfo("");
elm_object_focus_set(g_pRenameHandle->pEntry, EINA_TRUE);
}
-void mp_rename_ctrl_focus_out_cb(void) {
- if (g_pRenameHandle->pPopUpHandle)
- {
- eext_object_event_callback_del(g_pRenameHandle->pPopUpHandle, EEXT_CALLBACK_BACK, __mp_rename_ctrl_cancel_btn_cb);
+
+void mp_rename_ctrl_focus_out_cb(void)
+{
+
+ if (!g_pRenameHandle) {
+ VideoLogInfo("RenamePopUp is not shown");
+ return;
}
- if (g_pRenameHandle->pPopUpHandle)
- {
- evas_object_smart_callback_del(g_pRenameHandle->pPopupCancelBtn, "clicked", __mp_rename_ctrl_cancel_btn_cb);
+ if (g_pRenameHandle->pPopUpHandle) {
+ eext_object_event_callback_del(g_pRenameHandle->pPopUpHandle,
+ EEXT_CALLBACK_BACK,
+ __mp_rename_ctrl_cancel_btn_cb);
+ }
+
+ if (g_pRenameHandle->pPopUpHandle) {
+ evas_object_smart_callback_del(g_pRenameHandle->pPopupCancelBtn,
+ "clicked",
+ __mp_rename_ctrl_cancel_btn_cb);
}
MP_DEL_OBJ(g_pRenameHandle->pPopupOkBtn);
MP_DEL_OBJ(g_pRenameHandle->pPopupCancelBtn);
VideoLogError("g_pRenameHandle is NULL");
return;
}
- if (g_pRenameHandle->pPopUpHandle)
- {
- eext_object_event_callback_del(g_pRenameHandle->pPopUpHandle, EEXT_CALLBACK_BACK, __mp_rename_ctrl_cancel_btn_cb);
+ if (g_pRenameHandle->pPopUpHandle) {
+ eext_object_event_callback_del(g_pRenameHandle->pPopUpHandle,
+ EEXT_CALLBACK_BACK,
+ __mp_rename_ctrl_cancel_btn_cb);
}
- if (g_pRenameHandle->pPopUpHandle)
- {
- evas_object_smart_callback_del(g_pRenameHandle->pPopupCancelBtn, "clicked", __mp_rename_ctrl_cancel_btn_cb);
+ if (g_pRenameHandle->pPopUpHandle) {
+ evas_object_smart_callback_del(g_pRenameHandle->pPopupCancelBtn,
+ "clicked",
+ __mp_rename_ctrl_cancel_btn_cb);
}
- if (g_pRenameHandle->pPopupOkBtn)
- {
- evas_object_smart_callback_del(g_pRenameHandle->pPopupOkBtn, "clicked", __mp_rename_ctrl_ok_btn_cb);
+ if (g_pRenameHandle->pPopupOkBtn) {
+ evas_object_smart_callback_del(g_pRenameHandle->pPopupOkBtn,
+ "clicked",
+ __mp_rename_ctrl_ok_btn_cb);
}
- mp_widget_ctrl_enable_navi_handle_focus(g_pRenameHandle->pNaviFrameHandle);
+ mp_widget_ctrl_enable_navi_handle_focus(g_pRenameHandle->
+ pNaviFrameHandle);
MP_DEL_IDLER(g_pRenameHandle->pSetLineEndIdler);
MP_DEL_OBJ(g_pRenameHandle->pPopupOkBtn);
MP_DEL_OBJ(g_pRenameHandle->pPopupCancelBtn);
MP_FREE_STRING(g_pRenameHandle->szSaveFileName);
MP_FREE_STRING(g_pRenameHandle->szOldName);
MP_FREE_STRING(g_pRenameHandle->szTempName);
- //evas_object_smart_callback_del(mp_util_get_main_conformat(), "virtualkeypad,state,on", __mp_rename_ctrl_popup_sip_on_cb);
- //evas_object_smart_callback_del(mp_util_get_main_conformat(), "virtualkeypad,state,off", __mp_rename_ctrl_popup_sip_off_cb);
MP_FREE_STRING(g_pRenameHandle);
}
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
#include <glib.h>
static st_list_view_ctr *g_list_view_data = NULL;
static void __mp_view_ctrl_btn_asc_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo);
+ Evas_Object * pObject,
+ void *pEventInfo);
void mp_view_ctrl_set_type(MpListItemType nViewType)
{
}
if (MP_LIST_VIEW_NONE >= nViewType || nViewType >= MP_LIST_VIEW_MAX) {
- VideoLogWarning
- ("[WARNING] Value of View as type is not matched.");
+ VideoLogWarning("[WARNING] Value of View as type is not matched.");
nViewType = MP_LIST_VIEW_ALL;
}
g_list_view_data->nCurrViewType = nViewType;
- int nRet =
- preference_set_int(PREF_MP_VIDEO_CONTENT_DISPLAYER_TYPE_KEY,
- g_list_view_data->nCurrViewType);
+ int nRet = preference_set_int(PREF_MP_VIDEO_CONTENT_DISPLAYER_TYPE_KEY,
+ g_list_view_data->nCurrViewType);
if (nRet) {
VideoLogWarning
- ("[WARNING] Fail to set value about list view type.");
+ ("[WARNING] Fail to set value about list view type.");
}
}
st_list_view_ctr *pLVData = (st_list_view_ctr *) pUserData;
if (pLVData->pLVPopUpHandle) {
eext_object_event_callback_del(pLVData->pLVPopUpHandle,
- EEXT_CALLBACK_BACK,
- __mp_view_ctrl_btn_asc_cb);
+ EEXT_CALLBACK_BACK,
+ __mp_view_ctrl_btn_asc_cb);
evas_object_smart_callback_del(pLVData->pLVPopUpHandle,
- "block,clicked",
- __mp_view_ctrl_btn_asc_cb);
+ "block,clicked",
+ __mp_view_ctrl_btn_asc_cb);
}
MP_DEL_ITC(pLVData->lv_Itc);
MP_DEL_OBJ(pLVData->pLVGroupRadio);
}
static void __mp_view_ctrl_btn_asc_cb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+ Evas_Object * pObject,
+ void *pEventInfo)
{
VideoLogInfo("");
<privilege>http://tizen.org/privilege/appmanager.launch</privilege>
<privilege>http://tizen.org/privilege/content.write</privilege>
<privilege>http://tizen.org/privilege/display</privilege>
+ <privilege>http://tizen.org/privilege/internet</privilege>
</privileges>
</manifest>
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 __VPP_DOWNLOAD_H__
/* downloader handle */
-typedef void *VppDownloadHandle;
+typedef void *VppDownloadHandle;
/**
* @brief Enumerations of download state
*/
-typedef enum
-{
- VPP_DOWNLOAD_STATE_AGENT_ERROR = -2, /**< agent error */
- VPP_DOWNLOAD_STATE_APP_ERROR = -1, /**< application error */
- VPP_DOWNLOAD_STATE_NONE = 0, /**< download_state_e : DOWNLOAD_STATE_NONE */
- VPP_DOWNLOAD_STATE_READY, /**< download_state_e : DOWNLOAD_STATE_READY */
- VPP_DOWNLOAD_STATE_QUEUED, /**< download_state_e : DOWNLOAD_STATE_QUEUED */
- VPP_DOWNLOAD_STATE_DOWNLOADING, /**< download_state_e : DOWNLOAD_STATE_DOWNLOADING */
- VPP_DOWNLOAD_STATE_PAUSED, /**< download_state_e : DOWNLOAD_STATE_PAUSED */
- VPP_DOWNLOAD_STATE_COMPLETED, /**< download_state_e : DOWNLOAD_STATE_COMPLETED */
- VPP_DOWNLOAD_STATE_FAILED, /**< download_state_e : DOWNLOAD_STATE_FAILED */
- VPP_DOWNLOAD_STATE_CANCELED, /**< download_state_e : DOWNLOAD_STATE_CANCELED */
+typedef enum {
+ VPP_DOWNLOAD_STATE_AGENT_ERROR = -2, /**< agent error */
+ VPP_DOWNLOAD_STATE_APP_ERROR = -1, /**< application error */
+ VPP_DOWNLOAD_STATE_NONE = 0, /**< download_state_e : DOWNLOAD_STATE_NONE */
+ VPP_DOWNLOAD_STATE_READY, /**< download_state_e : DOWNLOAD_STATE_READY */
+ VPP_DOWNLOAD_STATE_QUEUED, /**< download_state_e : DOWNLOAD_STATE_QUEUED */
+ VPP_DOWNLOAD_STATE_DOWNLOADING, /**< download_state_e : DOWNLOAD_STATE_DOWNLOADING */
+ VPP_DOWNLOAD_STATE_PAUSED, /**< download_state_e : DOWNLOAD_STATE_PAUSED */
+ VPP_DOWNLOAD_STATE_COMPLETED, /**< download_state_e : DOWNLOAD_STATE_COMPLETED */
+ VPP_DOWNLOAD_STATE_FAILED, /**< download_state_e : DOWNLOAD_STATE_FAILED */
+ VPP_DOWNLOAD_STATE_CANCELED, /**< download_state_e : DOWNLOAD_STATE_CANCELED */
} VppDownloadState;
/**
* @brief Enumerations of download item type
*/
-typedef enum
-{
- VPP_DOWNLOAD_ITEM_TYPE_NONE = 0, /**< NONE */
+typedef enum {
+ VPP_DOWNLOAD_ITEM_TYPE_NONE = 0, /**< NONE */
VPP_DOWNLOAD_ITEM_TYPE_VIDEO_FILE, /**< video file */
VPP_DOWNLOAD_ITEM_TYPE_VIDEO_CAPTION_FILE, /**< store video caption file */
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- VPP_DOWNLOAD_ITEM_TYPE_THUMBNAIL_IMAGE, /* product thumbnail image */
- VPP_DOWNLOAD_ITEM_TYPE_LARGE_POSTER_IMAGE, /* product large poster image */
- VPP_DOWNLOAD_ITEM_TYPE_CATEGORY_IMAGE, /* category thumbnail image */
- VPP_DOWNLOAD_ITEM_TYPE_RATING_IMAGE, /* user rating image */
- VPP_DOWNLOAD_ITEM_TYPE_CAPION_FILE, /* caption file */
+ VPP_DOWNLOAD_ITEM_TYPE_THUMBNAIL_IMAGE, /* product thumbnail image */
+ VPP_DOWNLOAD_ITEM_TYPE_LARGE_POSTER_IMAGE, /* product large poster image */
+ VPP_DOWNLOAD_ITEM_TYPE_CATEGORY_IMAGE, /* category thumbnail image */
+ VPP_DOWNLOAD_ITEM_TYPE_RATING_IMAGE, /* user rating image */
+ VPP_DOWNLOAD_ITEM_TYPE_CAPION_FILE, /* caption file */
} VppDownloadItemType;
/* downloader callback */
-typedef void (*vpp_dl_progress_cb) ( VppDownloadHandle pHandle, unsigned long long received, unsigned long long total, void *userData );
-typedef void (*vpp_dl_state_changed_cb) ( VppDownloadHandle pHandle, VppDownloadState eState, const char *pPath, void *userData );
+typedef void (*vpp_dl_progress_cb) (VppDownloadHandle pHandle,
+ unsigned long long received,
+ unsigned long long total,
+ void *userData);
+typedef void (*vpp_dl_state_changed_cb) (VppDownloadHandle pHandle,
+ VppDownloadState eState,
+ const char *pPath,
+ void *userData);
// download callback structure
-typedef struct
-{
- vpp_dl_progress_cb progressCb;
- vpp_dl_state_changed_cb stateChangedCb;
-}VppDownloadCallback;
+typedef struct {
+ vpp_dl_progress_cb progressCb;
+ vpp_dl_state_changed_cb stateChangedCb;
+} VppDownloadCallback;
#ifdef _cplusplus
-extern "C"
-{
+extern "C" {
#endif
-VppDownloadHandle VppDownloadCreateItem( const char *pUrl, const char *pDstFolder, const char *pDstName, VppDownloadItemType eType, VppDownloadCallback cb, void *userData );
-VppDownloadHandle VppDownloadCreateItemById( int nId, const char *pUrl, const char *pDstFolder, const char *pDstName, VppDownloadItemType eType, VppDownloadCallback cb, void *userData );
+ VppDownloadHandle VppDownloadCreateItem(const char *pUrl,
+ const char *pDstFolder,
+ const char *pDstName,
+ VppDownloadItemType eType,
+ VppDownloadCallback cb,
+ void *userData);
+ VppDownloadHandle VppDownloadCreateItemById(int nId, const char *pUrl,
+ const char *pDstFolder,
+ const char *pDstName,
+ VppDownloadItemType eType,
+ VppDownloadCallback cb,
+ void *userData);
-void VppDownloadDestroyItem( VppDownloadHandle pHandle );
-void VppDownloadDestroyItemById( int nId );
-void VppDownloadClearItem( VppDownloadHandle pHandle );
+ void VppDownloadDestroyItem(VppDownloadHandle pHandle);
+ void VppDownloadDestroyItemById(int nId);
+ void VppDownloadClearItem(VppDownloadHandle pHandle);
-bool VppDownloadStartVideoStoreVideoItem( VppDownloadHandle pHandle, void *pOnGoingServiceData, void*pCompleteServiceData ); // pServiceData is app control. It is service extra data at quickpanel service.
+ bool VppDownloadStartVideoStoreVideoItem(VppDownloadHandle pHandle, void *pOnGoingServiceData, void *pCompleteServiceData); // pServiceData is app control. It is service extra data at quickpanel service.
-bool VppDownloadSetCb( VppDownloadHandle pHandle, VppDownloadCallback cb, void *userData );
-bool VppDownloadUnsetCb( VppDownloadHandle pHandle );
+ bool VppDownloadSetCb(VppDownloadHandle pHandle,
+ VppDownloadCallback cb, void *userData);
+ bool VppDownloadUnsetCb(VppDownloadHandle pHandle);
-bool VppDownloadRequestAppend( VppDownloadHandle pHandle );
-bool VppDownloadRequestPrepend( VppDownloadHandle pHandle );
+ bool VppDownloadRequestAppend(VppDownloadHandle pHandle);
+ bool VppDownloadRequestPrepend(VppDownloadHandle pHandle);
-bool VppDownloadPause( VppDownloadHandle pHandle );
-bool VppDownloadResume( VppDownloadHandle pHandle );
+ bool VppDownloadPause(VppDownloadHandle pHandle);
+ bool VppDownloadResume(VppDownloadHandle pHandle);
-bool VppDownloadCancel( VppDownloadHandle pHandle );
+ bool VppDownloadCancel(VppDownloadHandle pHandle);
-bool VppDownloadStoreVideoRestore( VppDownloadHandle pHandle );
+ bool VppDownloadStoreVideoRestore(VppDownloadHandle pHandle);
-VppDownloadState VppDownloadGetState( VppDownloadHandle pHandle );
-VppDownloadState VppDownloadGetStateById( int nDownloadId );
+ VppDownloadState VppDownloadGetState(VppDownloadHandle pHandle);
+ VppDownloadState VppDownloadGetStateById(int nDownloadId);
-char *VppDownloadGetDownloadedFilePath( VppDownloadHandle pHandle );
-int VppDownloadGetDownloadId( VppDownloadHandle pHandle );
+ char *VppDownloadGetDownloadedFilePath(VppDownloadHandle pHandle);
+ int VppDownloadGetDownloadId(VppDownloadHandle pHandle);
-bool VppDownloadSetNotificationAppControl( VppDownloadHandle pHandle, void *pData );
-void* VppDownloadGetNotificationAppControl( VppDownloadHandle pHandle );
+ bool VppDownloadSetNotificationAppControl(VppDownloadHandle pHandle,
+ void *pData);
+ void *VppDownloadGetNotificationAppControl(VppDownloadHandle pHandle);
-void VppDownloadResetUserData(void *pDataItem);
+ void VppDownloadResetUserData(void *pDataItem);
#ifdef _cplusplus
}
#endif
-
-
-#endif // __VPP_DOWNLOAD_H__
-
+#endif // __VPP_DOWNLOAD_H__
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <Ecore.h>
// download item
typedef struct {
- int id; /* downloader id */
+ int id; /* downloader id */
- char *pDownloadUrl; /* download url */
- char *pDstFolder; /* destination path */
- char *pDstName; /* destination path */
+ char *pDownloadUrl; /* download url */
+ char *pDstFolder; /* destination path */
+ char *pDstName; /* destination path */
- char *pTempPath; /* tepmdownload path */
- char *pEtag; /* eTag */
+ char *pTempPath; /* tepmdownload path */
+ char *pEtag; /* eTag */
- VppDownloadItemType eType; /* download item type */
+ VppDownloadItemType eType; /* download item type */
- vpp_dl_progress_cb progressCb; /* download progress callback */
- vpp_dl_state_changed_cb stateChangedCb; /* download state changed callback */
+ vpp_dl_progress_cb progressCb; /* download progress callback */
+ vpp_dl_state_changed_cb stateChangedCb; /* download state changed callback */
- bool bDownloading; /* downloading state */
+ bool bDownloading; /* downloading state */
- bool bSetNoti; /* quick pannel download view state. default FALSE */
+ bool bSetNoti; /* quick pannel download view state. default FALSE */
- Ecore_Pipe *pDownloadPipe; /* internal pipe */
+ Ecore_Pipe *pDownloadPipe; /* internal pipe */
- void *pUserdata; /* user data */
+ void *pUserdata; /* user data */
} __VppDownloadItem;
// download list
typedef struct {
- Ecore_Timer *downloadTimer; /* internal timer */
+ Ecore_Timer *downloadTimer; /* internal timer */
- int currentDownloadingCount; /* downloading item count */
+ int currentDownloadingCount; /* downloading item count */
- Eina_List *downloadList; /* download item list */
+ Eina_List *downloadList; /* download item list */
} __VppDownloadListData;
/* download pipe data */
typedef struct {
- __VppDownloadItem *pItem; /* download item */
- unsigned long long received; /* received file size from progress callback*/
- VppDownloadCbType eCbType; /* pipe callback type */
- VppDownloadState eState; /* downloader state */
+ __VppDownloadItem *pItem; /* download item */
+ unsigned long long received; /* received file size from progress callback */
+ VppDownloadCbType eCbType; /* pipe callback type */
+ VppDownloadState eState; /* downloader state */
} VppDownloadPipeData;
///////////////////////////////////////////////////////////////////////////////////////////
-// local functions proto types
+// local functions proto types
///////////////////////////////////////////////////////////////////////////////////////////
void __VppDownloadPrintErr(download_error_e err);
void __VppDownloadListInitialize();
void __VppDestoryDownloadListDestory();
-bool __VppDownloadCreate(__VppDownloadItem *pItem);
-bool __VppDownloadStart(__VppDownloadItem *pItem, bool bResume);
+bool __VppDownloadCreate(__VppDownloadItem * pItem);
+bool __VppDownloadStart(__VppDownloadItem * pItem, bool bResume);
-static void __VppDownloadStateChangedCb(int download_id, download_state_e state, void *user_data);
-static void __VppDownloadProgressCb(int download_id, unsigned long long received, void *user_data);
+static void __VppDownloadStateChangedCb(int download_id,
+ download_state_e state,
+ void *user_data);
+static void __VppDownloadProgressCb(int download_id,
+ unsigned long long received,
+ void *user_data);
unsigned int __VppDownloadListCount();
-bool __VppDownloadListAdd(__VppDownloadItem *pItem, bool bAppend);
-void __VppDownloadListRemove(__VppDownloadItem *pItem);
+bool __VppDownloadListAdd(__VppDownloadItem * pItem, bool bAppend);
+void __VppDownloadListRemove(__VppDownloadItem * pItem);
void __VppDownloadListNextTrigger();
void __VppDownloadStartTimer();
-static void __VppDownloadPipeCb(void *data, void *pdata, unsigned int nbyte);
+static void __VppDownloadPipeCb(void *data, void *pdata,
+ unsigned int nbyte);
static Eina_Bool __VppDownloadTimerCb(void *data);
///////////////////////////////////////////////////////////////////////////////////////////
-// download api
+// download api
///////////////////////////////////////////////////////////////////////////////////////////
VppDownloadHandle
-VppDownloadCreateItem(const char *pUrl, const char *pDstFolder, const char *pDstName, VppDownloadItemType eType, VppDownloadCallback cb, void *userData)
+VppDownloadCreateItem(const char *pUrl, const char *pDstFolder,
+ const char *pDstName, VppDownloadItemType eType,
+ VppDownloadCallback cb, void *userData)
{
- __VppDownloadItem* pItem = NULL;
+ __VppDownloadItem *pItem = NULL;
if (pUrl == NULL) {
VideoLogError("pUrl == NULL!!!");
return NULL;
}
- pItem = calloc(1, sizeof(__VppDownloadItem));
+ pItem = calloc(1, sizeof(__VppDownloadItem));
if (pItem == NULL) {
VideoLogError("pItem calloc fail!!!");
return NULL;
}
- pItem->pDownloadUrl = strdup(pUrl);
- pItem->pDstFolder = strdup(pDstFolder);
- pItem->eType = eType;
- pItem->progressCb = cb.progressCb;
- pItem->stateChangedCb = cb.stateChangedCb;
- pItem->pUserdata = userData;
- pItem->bSetNoti = TRUE;
+ pItem->pDownloadUrl = strdup(pUrl);
+ pItem->pDstFolder = strdup(pDstFolder);
+ pItem->eType = eType;
+ pItem->progressCb = cb.progressCb;
+ pItem->stateChangedCb = cb.stateChangedCb;
+ pItem->pUserdata = userData;
+ pItem->bSetNoti = TRUE;
if (pDstName != NULL) {
pItem->pDstName = strdup(pDstName);
}
- if (eType == VPP_DOWNLOAD_ITEM_TYPE_VIDEO_FILE || eType == VPP_DOWNLOAD_ITEM_TYPE_STORE_VIDEO_FILE) {
- pItem->bSetNoti = TRUE;
- } else if (eType >= VPP_DOWNLOAD_ITEM_TYPE_VIDEO_INDEX_FILE && eType <= VPP_DOWNLOAD_ITEM_TYPE_RATING_IMAGE) {
- pItem->bSetNoti = FALSE;
+ if (eType == VPP_DOWNLOAD_ITEM_TYPE_VIDEO_FILE
+ || eType == VPP_DOWNLOAD_ITEM_TYPE_STORE_VIDEO_FILE) {
+ pItem->bSetNoti = TRUE;
+ } else if (eType >= VPP_DOWNLOAD_ITEM_TYPE_VIDEO_INDEX_FILE
+ && eType <= VPP_DOWNLOAD_ITEM_TYPE_RATING_IMAGE) {
+ pItem->bSetNoti = FALSE;
} else {
VideoLogError("eType error : [%d]", eType);
}
- pItem->pDownloadPipe = ecore_pipe_add(__VppDownloadPipeCb, (const void*)pItem);
+ pItem->pDownloadPipe =
+ ecore_pipe_add(__VppDownloadPipeCb, (const void *) pItem);
- return (VppDownloadHandle)pItem;
+ return (VppDownloadHandle) pItem;
}
VppDownloadHandle
-VppDownloadCreateItemById(int nId, const char *pUrl, const char *pDstFolder, const char *pDstName, VppDownloadItemType eType, VppDownloadCallback cb, void *userData)
+VppDownloadCreateItemById(int nId, const char *pUrl,
+ const char *pDstFolder, const char *pDstName,
+ VppDownloadItemType eType,
+ VppDownloadCallback cb, void *userData)
{
- __VppDownloadItem* pItem = NULL;
+ __VppDownloadItem *pItem = NULL;
if (nId <= 0) {
VideoLogError("nId error : [%d]!!!", nId);
}
- pItem = VppDownloadCreateItem(pUrl, pDstFolder, pDstName, eType, cb, userData);
+ pItem =
+ VppDownloadCreateItem(pUrl, pDstFolder, pDstName, eType, cb,
+ userData);
if (pItem == NULL) {
VideoLogError("VppDownloadCreateItem fail!!!");
return NULL;
}
- pItem->id = nId;
+ pItem->id = nId;
- if (VppDownloadSetCb((VppDownloadHandle)pItem, cb, pItem->pUserdata) == FALSE) {
+ if (VppDownloadSetCb((VppDownloadHandle) pItem, cb, pItem->pUserdata)
+ == FALSE) {
VideoLogError("VppDownloadSetCb error");
- VppDownloadDestroyItem((VppDownloadHandle)pItem);
+ VppDownloadDestroyItem((VppDownloadHandle) pItem);
return NULL;
}
- return (VppDownloadHandle)pItem;
+ return (VppDownloadHandle) pItem;
}
-void
-VppDownloadDestroyItem(VppDownloadHandle pHandle)
+void VppDownloadDestroyItem(VppDownloadHandle pHandle)
{
- __VppDownloadItem* pItem = (__VppDownloadItem*)pHandle;
- download_error_e error = DOWNLOAD_ERROR_NONE;
- char *pPath = NULL;
+ __VppDownloadItem *pItem = (__VppDownloadItem *) pHandle;
+ download_error_e error = DOWNLOAD_ERROR_NONE;
+ char *pPath = NULL;
if (pHandle == NULL) {
VideoLogError("pHandle == NULL");
if (pItem->pDownloadPipe != NULL) {
ecore_pipe_del(pItem->pDownloadPipe);
- pItem->pDownloadPipe = NULL;
+ pItem->pDownloadPipe = NULL;
}
- pPath = VppDownloadGetDownloadedFilePath(pHandle);
+ pPath = VppDownloadGetDownloadedFilePath(pHandle);
if (pItem->pDownloadUrl != NULL) {
free(pItem->pDownloadUrl);
- pItem->pDownloadUrl = NULL;
+ pItem->pDownloadUrl = NULL;
}
if (pItem->pDstFolder != NULL) {
free(pItem->pDstFolder);
- pItem->pDstFolder = NULL;
+ pItem->pDstFolder = NULL;
}
if (pItem->pDstName != NULL) {
free(pItem->pDstName);
- pItem->pDstName = NULL;
+ pItem->pDstName = NULL;
}
if (pItem->pTempPath != NULL) {
free(pItem->pTempPath);
- pItem->pTempPath = NULL;
+ pItem->pTempPath = NULL;
}
if (pItem->pEtag != NULL) {
free(pItem->pEtag);
- pItem->pEtag = NULL;
+ pItem->pEtag = NULL;
}
if (pItem->id > 0) {
VppDownloadUnsetCb(pItem);
- VppDownloadState state = VppDownloadGetState(pItem);
+ VppDownloadState state = VppDownloadGetState(pItem);
- /*
- if (state != VPP_DOWNLOAD_STATE_AGENT_ERROR && state != VPP_DOWNLOAD_STATE_APP_ERROR)
- {
- if (state >= VPP_DOWNLOAD_STATE_READY && state <= VPP_DOWNLOAD_STATE_PAUSED)
- {
- VppDownloadCancel(pItem);
- }
- }
- */
if (state != VPP_DOWNLOAD_STATE_COMPLETED) {
- if (pPath != NULL && vp_file_exists((const char*)pPath) == EINA_TRUE) {
- vp_file_unlink((const char*)pPath);
+ if (pPath != NULL
+ && vp_file_exists((const char *) pPath) == EINA_TRUE) {
+ vp_file_unlink((const char *) pPath);
}
}
- error = download_set_notification_type(pItem->id, DOWNLOAD_NOTIFICATION_TYPE_NONE);
+ error =
+ download_set_notification_type(pItem->id,
+ DOWNLOAD_NOTIFICATION_TYPE_NONE);
if (error != DOWNLOAD_ERROR_NONE) {
__VppDownloadPrintErr(error);
}
- error = download_destroy(pItem->id);
+ error = download_destroy(pItem->id);
if (error != DOWNLOAD_ERROR_NONE) {
__VppDownloadPrintErr(error);
}
}
- if (pItem->eType < VPP_DOWNLOAD_ITEM_TYPE_STORE_VIDEO_FILE || pItem->eType > VPP_DOWNLOAD_ITEM_TYPE_VIDEO_CAPTION_FILE) {
+ if (pItem->eType < VPP_DOWNLOAD_ITEM_TYPE_STORE_VIDEO_FILE
+ || pItem->eType > VPP_DOWNLOAD_ITEM_TYPE_VIDEO_CAPTION_FILE) {
__VppDownloadListRemove(pHandle);
}
if (pPath != NULL) {
free(pPath);
- pPath = NULL;
+ pPath = NULL;
}
free(pItem);
- pItem = NULL;
+ pItem = NULL;
}
-void
-VppDownloadDestroyItemById(int nId)
+void VppDownloadDestroyItemById(int nId)
{
- download_error_e error = DOWNLOAD_ERROR_NONE;
+ download_error_e error = DOWNLOAD_ERROR_NONE;
- error = download_destroy(nId);
+ error = download_destroy(nId);
if (error != DOWNLOAD_ERROR_NONE) {
__VppDownloadPrintErr(error);
}
}
-void
-VppDownloadClearItem(VppDownloadHandle pHandle)
+void VppDownloadClearItem(VppDownloadHandle pHandle)
{
- __VppDownloadItem* pItem = (__VppDownloadItem*)pHandle;
-// download_error_e error = DOWNLOAD_ERROR_NONE;
+ __VppDownloadItem *pItem = (__VppDownloadItem *) pHandle;
if (pHandle == NULL) {
VideoLogError("pHandle == NULL");
if (pItem->pDownloadPipe != NULL) {
ecore_pipe_del(pItem->pDownloadPipe);
- pItem->pDownloadPipe = NULL;
+ pItem->pDownloadPipe = NULL;
}
if (pItem->pDownloadUrl != NULL) {
free(pItem->pDownloadUrl);
- pItem->pDownloadUrl = NULL;
+ pItem->pDownloadUrl = NULL;
}
if (pItem->pDstFolder != NULL) {
free(pItem->pDstFolder);
- pItem->pDstFolder = NULL;
+ pItem->pDstFolder = NULL;
}
if (pItem->pDstName != NULL) {
free(pItem->pDstName);
- pItem->pDstName = NULL;
+ pItem->pDstName = NULL;
}
if (pItem->id > 0) {
}
free(pItem);
- pItem = NULL;
+ pItem = NULL;
}
bool
-VppDownloadStartVideoStoreVideoItem(VppDownloadHandle pHandle, void *pOnGoingServiceData, void *pCompleteServiceData)
+VppDownloadStartVideoStoreVideoItem(VppDownloadHandle pHandle,
+ void *pOnGoingServiceData,
+ void *pCompleteServiceData)
{
- __VppDownloadItem* pItem = (__VppDownloadItem*)pHandle;
+ __VppDownloadItem *pItem = (__VppDownloadItem *) pHandle;
if (pHandle == NULL) {
VideoLogError("pHandle == NULL");
}
if (pOnGoingServiceData != NULL) {
- int error = 0;
+ int error = 0;
- error = download_set_notification_app_control(pItem->id, DOWNLOAD_NOTIFICATION_APP_CONTROL_TYPE_ONGOING, (app_control_h)pOnGoingServiceData);
+ error =
+ download_set_notification_app_control(pItem->id,
+ DOWNLOAD_NOTIFICATION_APP_CONTROL_TYPE_ONGOING,
+ (app_control_h)
+ pOnGoingServiceData);
if (error != DOWNLOAD_ERROR_NONE) {
VideoLogError("download_get_downloaded_file_path error");
__VppDownloadPrintErr(error);
}
if (pCompleteServiceData != NULL) {
- int error = 0;
+ int error = 0;
- error = download_set_notification_app_control(pItem->id, DOWNLOAD_NOTIFICATION_APP_CONTROL_TYPE_COMPLETE, (app_control_h)pCompleteServiceData);
+ error =
+ download_set_notification_app_control(pItem->id,
+ DOWNLOAD_NOTIFICATION_APP_CONTROL_TYPE_COMPLETE,
+ (app_control_h)
+ pCompleteServiceData);
if (error != DOWNLOAD_ERROR_NONE) {
VideoLogError("download_get_downloaded_file_path error");
__VppDownloadPrintErr(error);
}
}
- if (__VppDownloadStart((__VppDownloadItem*)pHandle, FALSE) == FALSE) {
+ if (__VppDownloadStart((__VppDownloadItem *) pHandle, FALSE) == FALSE) {
VideoLogError("fail __VppDownloadStart!!!");
return FALSE;
}
bool
-VppDownloadSetCb(VppDownloadHandle pHandle, VppDownloadCallback cb, void *userData)
+VppDownloadSetCb(VppDownloadHandle pHandle, VppDownloadCallback cb,
+ void *userData)
{
- __VppDownloadItem* pItem = (__VppDownloadItem*)pHandle;
+ __VppDownloadItem *pItem = (__VppDownloadItem *) pHandle;
- download_error_e error = DOWNLOAD_ERROR_NONE;
+ download_error_e error = DOWNLOAD_ERROR_NONE;
if (pHandle == NULL) {
VideoLogError("pHandle == NULL");
VppDownloadUnsetCb(pHandle);
- pItem->pUserdata = userData;
+ pItem->pUserdata = userData;
if (cb.progressCb != NULL) {
- pItem->progressCb = cb.progressCb;
+ pItem->progressCb = cb.progressCb;
if (pItem->id > 0) {
- error = download_set_progress_cb(pItem->id, __VppDownloadProgressCb, pItem);
+ error =
+ download_set_progress_cb(pItem->id,
+ __VppDownloadProgressCb, pItem);
if (error != DOWNLOAD_ERROR_NONE) {
__VppDownloadPrintErr(error);
}
}
if (cb.stateChangedCb != NULL) {
- pItem->stateChangedCb = cb.stateChangedCb;
+ pItem->stateChangedCb = cb.stateChangedCb;
if (pItem->id > 0) {
- error = download_set_state_changed_cb(pItem->id, __VppDownloadStateChangedCb, pItem);
+ error =
+ download_set_state_changed_cb(pItem->id,
+ __VppDownloadStateChangedCb,
+ pItem);
if (error != DOWNLOAD_ERROR_NONE) {
__VppDownloadPrintErr(error);
}
}
-bool
-VppDownloadUnsetCb(VppDownloadHandle pHandle)
+bool VppDownloadUnsetCb(VppDownloadHandle pHandle)
{
- __VppDownloadItem* pItem = (__VppDownloadItem*)pHandle;
+ __VppDownloadItem *pItem = (__VppDownloadItem *) pHandle;
- download_error_e error = DOWNLOAD_ERROR_NONE;
+ download_error_e error = DOWNLOAD_ERROR_NONE;
if (pHandle == NULL) {
VideoLogError("pHandle == NULL");
}
if (pItem->id > 0) {
- if (pItem->progressCb != NULL) {
- error = download_unset_progress_cb(pItem->id);
+ if (pItem->progressCb != NULL) {
+ error = download_unset_progress_cb(pItem->id);
if (error != DOWNLOAD_ERROR_NONE) {
__VppDownloadPrintErr(error);
}
}
- if (pItem->stateChangedCb != NULL) {
- error = download_unset_state_changed_cb(pItem->id);
+ if (pItem->stateChangedCb != NULL) {
+ error = download_unset_state_changed_cb(pItem->id);
if (error != DOWNLOAD_ERROR_NONE) {
__VppDownloadPrintErr(error);
}
}
}
- pItem->progressCb = NULL;
- pItem->stateChangedCb = NULL;
- pItem->pUserdata = NULL;
+ pItem->progressCb = NULL;
+ pItem->stateChangedCb = NULL;
+ pItem->pUserdata = NULL;
if (error != DOWNLOAD_ERROR_NONE) {
return FALSE;
}
-bool
-VppDownloadRequestAppend(VppDownloadHandle pHandle)
+bool VppDownloadRequestAppend(VppDownloadHandle pHandle)
{
- return __VppDownloadListAdd((__VppDownloadItem*)pHandle, TRUE);
+ return __VppDownloadListAdd((__VppDownloadItem *) pHandle, TRUE);
}
-bool
-VppDownloadRequestPrepend(VppDownloadHandle pHandle)
+bool VppDownloadRequestPrepend(VppDownloadHandle pHandle)
{
- return __VppDownloadListAdd((__VppDownloadItem*)pHandle, FALSE);
+ return __VppDownloadListAdd((__VppDownloadItem *) pHandle, FALSE);
}
-bool
-VppDownloadPause(VppDownloadHandle pHandle)
+bool VppDownloadPause(VppDownloadHandle pHandle)
{
- __VppDownloadItem* pItem = (__VppDownloadItem*)pHandle;
+ __VppDownloadItem *pItem = (__VppDownloadItem *) pHandle;
if (pHandle == NULL) {
VideoLogError("pHandle == NULL");
return FALSE;
}
- download_error_e error = DOWNLOAD_ERROR_NONE;
+ download_error_e error = DOWNLOAD_ERROR_NONE;
- error = download_pause(pItem->id);
+ error = download_pause(pItem->id);
if (error != DOWNLOAD_ERROR_NONE) {
__VppDownloadPrintErr(error);
}
-bool
-VppDownloadResume(VppDownloadHandle pHandle)
+bool VppDownloadResume(VppDownloadHandle pHandle)
{
- return __VppDownloadStart((__VppDownloadItem*)pHandle, TRUE);
+ return __VppDownloadStart((__VppDownloadItem *) pHandle, TRUE);
}
-bool
-VppDownloadCancel(VppDownloadHandle pHandle)
+bool VppDownloadCancel(VppDownloadHandle pHandle)
{
- __VppDownloadItem* pItem = (__VppDownloadItem*)pHandle;
+ __VppDownloadItem *pItem = (__VppDownloadItem *) pHandle;
if (pHandle == NULL) {
VideoLogError("pHandle == NULL");
return FALSE;
}
- download_error_e error = DOWNLOAD_ERROR_NONE;
+ download_error_e error = DOWNLOAD_ERROR_NONE;
- error = download_cancel(pItem->id);
+ error = download_cancel(pItem->id);
if (error != DOWNLOAD_ERROR_NONE) {
__VppDownloadPrintErr(error);
}
-bool
-VppDownloadStoreVideoRestore(VppDownloadHandle pHandle)
+bool VppDownloadStoreVideoRestore(VppDownloadHandle pHandle)
{
- __VppDownloadItem* pItem = (__VppDownloadItem*)pHandle;
+ __VppDownloadItem *pItem = (__VppDownloadItem *) pHandle;
- unsigned long long lFileSize = 0;
+ unsigned long long lFileSize = 0;
- int nRet = 0;
- char szTemp[32] = {0,};
+ int nRet = 0;
+ char szTemp[32] = { 0, };
if (pHandle == NULL) {
VideoLogError("pHandle == NULL");
return FALSE;
}
- nRet = download_set_temp_file_path(pItem->id, pItem->pTempPath);
+ nRet = download_set_temp_file_path(pItem->id, pItem->pTempPath);
if (nRet != DOWNLOAD_ERROR_NONE) {
VideoLogError("download_set_temp_file_path failed!!!");
__VppDownloadPrintErr(nRet);
return FALSE;
}
- nRet = download_add_http_header_field(pItem->id, "If-Range", pItem->pEtag);
+ nRet =
+ download_add_http_header_field(pItem->id, "If-Range",
+ pItem->pEtag);
if (nRet != DOWNLOAD_ERROR_NONE) {
VideoLogError("download_add_http_header_field failed!!!");
__VppDownloadPrintErr(nRet);
return FALSE;
}
- lFileSize = (unsigned long long)vp_file_size((const char*)pItem->pTempPath);
+ lFileSize =
+ (unsigned long long) vp_file_size((const char *) pItem->pTempPath);
snprintf(szTemp, sizeof(szTemp), "bytes=%llu-", lFileSize);
- nRet = download_add_http_header_field(pItem->id, "Range", szTemp);
+ nRet = download_add_http_header_field(pItem->id, "Range", szTemp);
if (nRet != DOWNLOAD_ERROR_NONE) {
VideoLogError("download_add_http_header_field failed!!!");
__VppDownloadPrintErr(nRet);
return FALSE;
}
- nRet = download_start(pItem->id);
+ nRet = download_start(pItem->id);
if (nRet != DOWNLOAD_ERROR_NONE) {
VideoLogError("download_start failed!!!");
__VppDownloadPrintErr(nRet);
}
-VppDownloadState
-VppDownloadGetState(VppDownloadHandle pHandle)
+VppDownloadState VppDownloadGetState(VppDownloadHandle pHandle)
{
- __VppDownloadItem* pItem = (__VppDownloadItem*)pHandle;
+ __VppDownloadItem *pItem = (__VppDownloadItem *) pHandle;
if (pHandle == NULL) {
VideoLogError("pHandle == NULL");
return VPP_DOWNLOAD_STATE_APP_ERROR;
}
- download_error_e error = DOWNLOAD_ERROR_NONE;
- download_state_e state = DOWNLOAD_STATE_NONE;
+ download_error_e error = DOWNLOAD_ERROR_NONE;
+ download_state_e state = DOWNLOAD_STATE_NONE;
- error = download_get_state(pItem->id, &state);
+ error = download_get_state(pItem->id, &state);
if (error != DOWNLOAD_ERROR_NONE) {
__VppDownloadPrintErr(error);
return VPP_DOWNLOAD_STATE_AGENT_ERROR;
}
- return (VppDownloadState)state;
+ return (VppDownloadState) state;
}
-VppDownloadState
-VppDownloadGetStateById(int nDownloadId)
+VppDownloadState VppDownloadGetStateById(int nDownloadId)
{
if (nDownloadId <= 0) {
VideoLogError("id error: [%d]", nDownloadId);
return VPP_DOWNLOAD_STATE_APP_ERROR;
}
- download_error_e error = DOWNLOAD_ERROR_NONE;
- download_state_e state = DOWNLOAD_STATE_NONE;
+ download_error_e error = DOWNLOAD_ERROR_NONE;
+ download_state_e state = DOWNLOAD_STATE_NONE;
- error = download_get_state(nDownloadId, &state);
+ error = download_get_state(nDownloadId, &state);
if (error != DOWNLOAD_ERROR_NONE) {
__VppDownloadPrintErr(error);
return VPP_DOWNLOAD_STATE_AGENT_ERROR;
}
- return (VppDownloadState)state;
+ return (VppDownloadState) state;
}
-char*
-VppDownloadGetDownloadedFilePath(VppDownloadHandle pHandle)
+char *VppDownloadGetDownloadedFilePath(VppDownloadHandle pHandle)
{
if (pHandle == NULL) {
VideoLogError("pHandle == NULL");
return NULL;
}
- __VppDownloadItem* pItem = (__VppDownloadItem*)pHandle;
+ __VppDownloadItem *pItem = (__VppDownloadItem *) pHandle;
- download_error_e error = DOWNLOAD_ERROR_NONE;
+ download_error_e error = DOWNLOAD_ERROR_NONE;
- char *pPath = NULL;
- char sDestPath[PATH_MAX] = {0,};
+ char *pPath = NULL;
+ char sDestPath[PATH_MAX] = { 0, };
if (pItem->id <= 0) {
VideoLogWarning("id error: [%d]", pItem->id);
if (pItem->pDstFolder != NULL && pItem->pDstName != NULL) {
if (pItem->pDstFolder[strlen(pItem->pDstFolder) - 1] == '/') {
- snprintf(sDestPath, PATH_MAX, "%s%s", pItem->pDstFolder, pItem->pDstName);
+ snprintf(sDestPath, PATH_MAX, "%s%s", pItem->pDstFolder,
+ pItem->pDstName);
} else {
- snprintf(sDestPath, PATH_MAX, "%s/%s", pItem->pDstFolder, pItem->pDstName);
+ snprintf(sDestPath, PATH_MAX, "%s/%s", pItem->pDstFolder,
+ pItem->pDstName);
}
- VideoSecureLogDebug("Path : [%s]:%s,%s,%d", sDestPath, pItem->pDstFolder[strlen(pItem->pDstFolder)], pItem->pDstFolder, strlen(pItem->pDstFolder));
+ VideoSecureLogDebug("Path : [%s]:%s,%s,%d", sDestPath,
+ pItem->pDstFolder[strlen(pItem->pDstFolder)],
+ pItem->pDstFolder, strlen(pItem->pDstFolder));
return strdup(sDestPath);
} else {
- error = download_get_downloaded_file_path(pItem->id, &pPath);
+ error = download_get_downloaded_file_path(pItem->id, &pPath);
if (error != DOWNLOAD_ERROR_NONE) {
VideoLogError("download_get_downloaded_file_path error");
__VppDownloadPrintErr(error);
if (pPath != NULL) {
free(pPath);
- pPath = NULL;
+ pPath = NULL;
}
}
}
-int
-VppDownloadGetDownloadId(VppDownloadHandle pHandle)
+int VppDownloadGetDownloadId(VppDownloadHandle pHandle)
{
if (pHandle == NULL) {
VideoLogError("pHandle == NULL ");
return 0;
}
- __VppDownloadItem* pItem = (__VppDownloadItem*)pHandle;
+ __VppDownloadItem *pItem = (__VppDownloadItem *) pHandle;
return pItem->id;
}
bool
-VppDownloadSetNotificationAppControl(VppDownloadHandle pHandle, void *pData)
+VppDownloadSetNotificationAppControl(VppDownloadHandle pHandle,
+ void *pData)
{
- download_error_e error = DOWNLOAD_ERROR_NONE;
+ download_error_e error = DOWNLOAD_ERROR_NONE;
if (pHandle == NULL) {
VideoLogError("pHandle == NULL ");
return FALSE;
}
- __VppDownloadItem* pItem = (__VppDownloadItem*)pHandle;
+ __VppDownloadItem *pItem = (__VppDownloadItem *) pHandle;
- error = download_set_notification_app_control(pItem->id, DOWNLOAD_NOTIFICATION_APP_CONTROL_TYPE_ONGOING, (app_control_h)pData);
+ error =
+ download_set_notification_app_control(pItem->id,
+ DOWNLOAD_NOTIFICATION_APP_CONTROL_TYPE_ONGOING,
+ (app_control_h) pData);
if (error != DOWNLOAD_ERROR_NONE) {
VideoLogError("download_get_downloaded_file_path error");
__VppDownloadPrintErr(error);
}
-void*
-VppDownloadGetNotificationAppControl(VppDownloadHandle pHandle)
+void *VppDownloadGetNotificationAppControl(VppDownloadHandle pHandle)
{
- download_error_e error = DOWNLOAD_ERROR_NONE;
- app_control_h *b = NULL;
+ download_error_e error = DOWNLOAD_ERROR_NONE;
+ app_control_h *b = NULL;
if (pHandle == NULL) {
VideoLogError("pHandle == NULL ");
return NULL;
}
- __VppDownloadItem* pItem = (__VppDownloadItem*)pHandle;
+ __VppDownloadItem *pItem = (__VppDownloadItem *) pHandle;
- error = download_get_notification_app_control(pItem->id, DOWNLOAD_NOTIFICATION_APP_CONTROL_TYPE_ONGOING, b);
+ error =
+ download_get_notification_app_control(pItem->id,
+ DOWNLOAD_NOTIFICATION_APP_CONTROL_TYPE_ONGOING,
+ b);
if (error != DOWNLOAD_ERROR_NONE) {
VideoLogError("download_get_downloaded_file_path error");
__VppDownloadPrintErr(error);
return NULL;
}
- return (void*)b;
+ return (void *) b;
}
///////////////////////////////////////////////////////////////////////////////////////////
-// local function implementations
+// local function implementations
///////////////////////////////////////////////////////////////////////////////////////////
-void
-__VppDownloadPrintErr(download_error_e err)
+void __VppDownloadPrintErr(download_error_e err)
{
switch (err) {
- case DOWNLOAD_ERROR_NONE: {
- VideoLogError("err == DOWNLOAD_ERROR_NONE");
- }
- break;
- case DOWNLOAD_ERROR_INVALID_PARAMETER: {
- VideoLogError("err == DOWNLOAD_ERROR_INVALID_PARAMETER");
- }
- break;
- case DOWNLOAD_ERROR_OUT_OF_MEMORY: {
- VideoLogError("err == DOWNLOAD_ERROR_OUT_OF_MEMORY");
- }
- break;
- case DOWNLOAD_ERROR_NETWORK_UNREACHABLE: {
- VideoLogError("err == DOWNLOAD_ERROR_NETWORK_UNREACHABLE");
- }
- break;
- case DOWNLOAD_ERROR_CONNECTION_TIMED_OUT: {
- VideoLogError("err == DOWNLOAD_ERROR_CONNECTION_TIMED_OUT");
- }
- break;
- case DOWNLOAD_ERROR_NO_SPACE: {
- VideoLogError("err == DOWNLOAD_ERROR_NO_SPACE");
- }
- break;
- case DOWNLOAD_ERROR_FIELD_NOT_FOUND: {
- VideoLogError("err == DOWNLOAD_ERROR_FIELD_NOT_FOUND");
- }
- break;
- case DOWNLOAD_ERROR_INVALID_STATE: {
- VideoLogError("err == DOWNLOAD_ERROR_INVALID_STATE");
- }
- break;
- case DOWNLOAD_ERROR_CONNECTION_FAILED: {
- VideoLogError("err == DOWNLOAD_ERROR_CONNECTION_FAILED");
- }
- break;
- case DOWNLOAD_ERROR_INVALID_URL: {
- VideoLogError("err == DOWNLOAD_ERROR_INVALID_URL");
- }
- break;
- case DOWNLOAD_ERROR_INVALID_DESTINATION: {
- VideoLogError("err == DOWNLOAD_ERROR_INVALID_DESTINATION");
- }
- break;
- case DOWNLOAD_ERROR_TOO_MANY_DOWNLOADS: {
- VideoLogError("err == DOWNLOAD_ERROR_TOO_MANY_DOWNLOADS");
- }
- break;
- case DOWNLOAD_ERROR_QUEUE_FULL: {
- VideoLogError("err == DOWNLOAD_ERROR_QUEUE_FULL");
- }
- break;
- case DOWNLOAD_ERROR_ALREADY_COMPLETED: {
- VideoLogError("err == DOWNLOAD_ERROR_ALREADY_COMPLETED");
- }
- break;
- case DOWNLOAD_ERROR_FILE_ALREADY_EXISTS: {
- VideoLogError("err == DOWNLOAD_ERROR_FILE_ALREADY_EXISTS");
- }
- break;
- case DOWNLOAD_ERROR_TOO_MANY_REDIRECTS: {
- VideoLogError("err == DOWNLOAD_ERROR_TOO_MANY_REDIRECTS");
- }
- break;
- case DOWNLOAD_ERROR_UNHANDLED_HTTP_CODE: {
- VideoLogError("err == DOWNLOAD_ERROR_UNHANDLED_HTTP_CODE");
- }
- break;
- case DOWNLOAD_ERROR_NO_DATA: {
- VideoLogError("err == DOWNLOAD_ERROR_NO_DATA");
- }
- break;
- case DOWNLOAD_ERROR_IO_ERROR: {
- VideoLogError("err == DOWNLOAD_ERROR_IO_ERROR");
- }
- break;
- default: {
- VideoLogError("UNKNOW err == [%d]", err);
- }
- break;
+ case DOWNLOAD_ERROR_NONE:{
+ VideoLogError("err == DOWNLOAD_ERROR_NONE");
+ }
+ break;
+ case DOWNLOAD_ERROR_INVALID_PARAMETER:{
+ VideoLogError("err == DOWNLOAD_ERROR_INVALID_PARAMETER");
+ }
+ break;
+ case DOWNLOAD_ERROR_OUT_OF_MEMORY:{
+ VideoLogError("err == DOWNLOAD_ERROR_OUT_OF_MEMORY");
+ }
+ break;
+ case DOWNLOAD_ERROR_NETWORK_UNREACHABLE:{
+ VideoLogError("err == DOWNLOAD_ERROR_NETWORK_UNREACHABLE");
+ }
+ break;
+ case DOWNLOAD_ERROR_CONNECTION_TIMED_OUT:{
+ VideoLogError("err == DOWNLOAD_ERROR_CONNECTION_TIMED_OUT");
+ }
+ break;
+ case DOWNLOAD_ERROR_NO_SPACE:{
+ VideoLogError("err == DOWNLOAD_ERROR_NO_SPACE");
+ }
+ break;
+ case DOWNLOAD_ERROR_FIELD_NOT_FOUND:{
+ VideoLogError("err == DOWNLOAD_ERROR_FIELD_NOT_FOUND");
+ }
+ break;
+ case DOWNLOAD_ERROR_INVALID_STATE:{
+ VideoLogError("err == DOWNLOAD_ERROR_INVALID_STATE");
+ }
+ break;
+ case DOWNLOAD_ERROR_CONNECTION_FAILED:{
+ VideoLogError("err == DOWNLOAD_ERROR_CONNECTION_FAILED");
+ }
+ break;
+ case DOWNLOAD_ERROR_INVALID_URL:{
+ VideoLogError("err == DOWNLOAD_ERROR_INVALID_URL");
+ }
+ break;
+ case DOWNLOAD_ERROR_INVALID_DESTINATION:{
+ VideoLogError("err == DOWNLOAD_ERROR_INVALID_DESTINATION");
+ }
+ break;
+ case DOWNLOAD_ERROR_TOO_MANY_DOWNLOADS:{
+ VideoLogError("err == DOWNLOAD_ERROR_TOO_MANY_DOWNLOADS");
+ }
+ break;
+ case DOWNLOAD_ERROR_QUEUE_FULL:{
+ VideoLogError("err == DOWNLOAD_ERROR_QUEUE_FULL");
+ }
+ break;
+ case DOWNLOAD_ERROR_ALREADY_COMPLETED:{
+ VideoLogError("err == DOWNLOAD_ERROR_ALREADY_COMPLETED");
+ }
+ break;
+ case DOWNLOAD_ERROR_FILE_ALREADY_EXISTS:{
+ VideoLogError("err == DOWNLOAD_ERROR_FILE_ALREADY_EXISTS");
+ }
+ break;
+ case DOWNLOAD_ERROR_TOO_MANY_REDIRECTS:{
+ VideoLogError("err == DOWNLOAD_ERROR_TOO_MANY_REDIRECTS");
+ }
+ break;
+ case DOWNLOAD_ERROR_UNHANDLED_HTTP_CODE:{
+ VideoLogError("err == DOWNLOAD_ERROR_UNHANDLED_HTTP_CODE");
+ }
+ break;
+ case DOWNLOAD_ERROR_NO_DATA:{
+ VideoLogError("err == DOWNLOAD_ERROR_NO_DATA");
+ }
+ break;
+ case DOWNLOAD_ERROR_IO_ERROR:{
+ VideoLogError("err == DOWNLOAD_ERROR_IO_ERROR");
+ }
+ break;
+ default:{
+ VideoLogError("UNKNOW err == [%d]", err);
+ }
+ break;
}
}
-void
-__VppDownloadListInitialize()
+void __VppDownloadListInitialize()
{
if (g_download_list != NULL) {
__VppDestoryDownloadListDestory();
}
- g_download_list = calloc(1, sizeof(__VppDownloadListData));
+ g_download_list = calloc(1, sizeof(__VppDownloadListData));
}
-void
-__VppDestoryDownloadListDestory()
+void __VppDestoryDownloadListDestory()
{
if (g_download_list == NULL) {
VideoLogError("g_download_list == NULL!!!");
if (g_download_list->downloadTimer != NULL) {
ecore_timer_del(g_download_list->downloadTimer);
- g_download_list->downloadTimer = NULL;
+ g_download_list->downloadTimer = NULL;
}
if (g_download_list->downloadList != NULL) {
if (__VppDownloadListCount() > 0) {
- VideoLogError("list count error[%d]!!!. some data are not destoryed!!!", __VppDownloadListCount());
+ VideoLogError
+ ("list count error[%d]!!!. some data are not destoryed!!!",
+ __VppDownloadListCount());
}
- Eina_List *l;
- __VppDownloadItem *pItem;
+ Eina_List *l;
+ __VppDownloadItem *pItem;
EINA_LIST_FOREACH(g_download_list->downloadList, l, pItem) {
if (pItem != NULL) {
VideoLogError("list item is not freed!!!");
- VideoSecureLogError("list item type[%d], url[%s], pDstFolder[%s], pDstName[%s]!!!", pItem->eType, pItem->pDownloadUrl, pItem->pDstFolder, pItem->pDstName);
+ VideoSecureLogError
+ ("list item type[%d], url[%s], pDstFolder[%s], pDstName[%s]!!!",
+ pItem->eType, pItem->pDownloadUrl, pItem->pDstFolder,
+ pItem->pDstName);
VppDownloadDestroyItem(pItem);
}
}
eina_list_free(g_download_list->downloadList);
- g_download_list->downloadList = NULL;
+ g_download_list->downloadList = NULL;
}
free(g_download_list);
- g_download_list = NULL;
+ g_download_list = NULL;
}
-bool
-__VppDownloadCreate(__VppDownloadItem* pItem)
+bool __VppDownloadCreate(__VppDownloadItem * pItem)
{
- download_error_e error = DOWNLOAD_ERROR_NONE;
+ download_error_e error = DOWNLOAD_ERROR_NONE;
- error = download_create(&(pItem->id));
+ error = download_create(&(pItem->id));
if (error != DOWNLOAD_ERROR_NONE) {
VideoLogError("download_create error");
goto ERROR_HANDLE;
}
- error = download_set_url(pItem->id, (const char*)pItem->pDownloadUrl);
+ error =
+ download_set_url(pItem->id, (const char *) pItem->pDownloadUrl);
if (error != DOWNLOAD_ERROR_NONE) {
VideoLogError("download_set_url error");
goto ERROR_HANDLE;
}
- error = download_set_destination(pItem->id, (const char*)(pItem->pDstFolder));
+ error =
+ download_set_destination(pItem->id,
+ (const char *) (pItem->pDstFolder));
if (error != DOWNLOAD_ERROR_NONE) {
VideoLogError("download_set_destination error");
goto ERROR_HANDLE;
}
if (pItem->pDstName != NULL) {
- char szDestName[PATH_MAX] = {0,};
+ char szDestName[PATH_MAX] = { 0, };
- if (pItem->eType != VPP_DOWNLOAD_ITEM_TYPE_VIDEO_FILE && pItem->eType != VPP_DOWNLOAD_ITEM_TYPE_STORE_VIDEO_FILE) {
- snprintf(szDestName, PATH_MAX, "%s%s", pItem->pDstName, ".temp");
+ if (pItem->eType != VPP_DOWNLOAD_ITEM_TYPE_VIDEO_FILE
+ && pItem->eType != VPP_DOWNLOAD_ITEM_TYPE_STORE_VIDEO_FILE) {
+ snprintf(szDestName, PATH_MAX, "%s%s", pItem->pDstName,
+ ".temp");
} else {
int dstlength = strlen(pItem->pDstName);
if (dstlength + 1 <= PATH_MAX) {
}
}
- error = download_set_file_name(pItem->id, (const char*)szDestName);
+ error =
+ download_set_file_name(pItem->id, (const char *) szDestName);
if (error != DOWNLOAD_ERROR_NONE) {
VideoLogError("download_set_file_name error");
goto ERROR_HANDLE;
}
if (pItem->bSetNoti == TRUE) {
- error = download_set_notification_type(pItem->id, DOWNLOAD_NOTIFICATION_TYPE_ALL);
+ error =
+ download_set_notification_type(pItem->id,
+ DOWNLOAD_NOTIFICATION_TYPE_ALL);
} else {
- error = download_set_notification_type(pItem->id, DOWNLOAD_NOTIFICATION_TYPE_NONE);
+ error =
+ download_set_notification_type(pItem->id,
+ DOWNLOAD_NOTIFICATION_TYPE_NONE);
}
if (error != DOWNLOAD_ERROR_NONE) {
goto ERROR_HANDLE;
}
- VppDownloadCallback cb = {0,};
- cb.progressCb = pItem->progressCb;
- cb.stateChangedCb = pItem->stateChangedCb;
+ VppDownloadCallback cb = { 0, };
+ cb.progressCb = pItem->progressCb;
+ cb.stateChangedCb = pItem->stateChangedCb;
- if (VppDownloadSetCb((VppDownloadHandle)pItem, cb, pItem->pUserdata) == FALSE) {
+ if (VppDownloadSetCb((VppDownloadHandle) pItem, cb, pItem->pUserdata)
+ == FALSE) {
VideoLogError("VppDownloadSetCb error");
- VppDownloadDestroyItem((VppDownloadHandle)pItem);
+ VppDownloadDestroyItem((VppDownloadHandle) pItem);
return FALSE;
}
return TRUE;
-ERROR_HANDLE:
+ ERROR_HANDLE:
__VppDownloadPrintErr(error);
if (pItem->id > 0) {
- error = download_destroy(pItem->id);
+ error = download_destroy(pItem->id);
if (error != DOWNLOAD_ERROR_NONE) {
VideoLogError("download_destroy error");
__VppDownloadPrintErr(error);
}
- pItem->id = 0;
+ pItem->id = 0;
}
- //VppDownloadDestroyItem((VppDownloadHandle)pItem);
return FALSE;
}
-bool
-__VppDownloadStart(__VppDownloadItem* pItem, bool bResume)
+bool __VppDownloadStart(__VppDownloadItem * pItem, bool bResume)
{
if (pItem == NULL) {
VideoLogError("pItem == NULL!!!");
VideoLogDebug("download resume!!!");
}
- download_error_e error = DOWNLOAD_ERROR_NONE;
+ download_error_e error = DOWNLOAD_ERROR_NONE;
if (pItem->eType == VPP_DOWNLOAD_ITEM_TYPE_STORE_VIDEO_FILE) {
- error = download_set_auto_download(pItem->id, TRUE);
+ error = download_set_auto_download(pItem->id, TRUE);
if (error != DOWNLOAD_ERROR_NONE) {
VideoLogError("download_set_auto_download error!!!");
__VppDownloadPrintErr(error);
static void
-__VppDownloadStateChangedCb(int download_id, download_state_e state, void *user_data)
+__VppDownloadStateChangedCb(int download_id, download_state_e state,
+ void *user_data)
{
- __VppDownloadItem *pItem = (__VppDownloadItem*)user_data;
+ __VppDownloadItem *pItem = (__VppDownloadItem *) user_data;
VideoLogDebug("state : [%d]", state);
return;
}
- if (pItem->eType == VPP_DOWNLOAD_ITEM_TYPE_STORE_VIDEO_FILE && state == DOWNLOAD_STATE_DOWNLOADING) {
- int nRet = 0;
+ if (pItem->eType == VPP_DOWNLOAD_ITEM_TYPE_STORE_VIDEO_FILE
+ && state == DOWNLOAD_STATE_DOWNLOADING) {
+ int nRet = 0;
if (pItem->pTempPath != NULL) {
free(pItem->pTempPath);
- pItem->pTempPath = NULL;
+ pItem->pTempPath = NULL;
}
- nRet = download_get_temp_path(pItem->id, &pItem->pTempPath);
+ nRet = download_get_temp_path(pItem->id, &pItem->pTempPath);
if (nRet != DOWNLOAD_ERROR_NONE) {
VideoLogError("download_get_temp_path failed!!!");
- __VppDownloadPrintErr((download_error_e)nRet);
+ __VppDownloadPrintErr((download_error_e) nRet);
}
if (pItem->pEtag != NULL) {
free(pItem->pEtag);
- pItem->pEtag = NULL;
+ pItem->pEtag = NULL;
}
- nRet = download_get_etag(pItem->id, &pItem->pEtag);
+ nRet = download_get_etag(pItem->id, &pItem->pEtag);
if (nRet != DOWNLOAD_ERROR_NONE) {
VideoLogError("download_get_temp_path failed!!!");
- __VppDownloadPrintErr((download_error_e)nRet);
+ __VppDownloadPrintErr((download_error_e) nRet);
}
}
- if (state >= DOWNLOAD_STATE_COMPLETED && state <= DOWNLOAD_STATE_CANCELED) {
+ if (state >= DOWNLOAD_STATE_COMPLETED
+ && state <= DOWNLOAD_STATE_CANCELED) {
if (pItem->bDownloading == TRUE) {
- pItem->bDownloading = FALSE;
+ pItem->bDownloading = FALSE;
- if (pItem->eType < VPP_DOWNLOAD_ITEM_TYPE_STORE_VIDEO_FILE || pItem->eType > VPP_DOWNLOAD_ITEM_TYPE_VIDEO_CAPTION_FILE) {
+ if (pItem->eType < VPP_DOWNLOAD_ITEM_TYPE_STORE_VIDEO_FILE
+ || pItem->eType >
+ VPP_DOWNLOAD_ITEM_TYPE_VIDEO_CAPTION_FILE) {
--(g_download_list->currentDownloadingCount);
}
}
}
- VppDownloadPipeData pipeData = {0,};
+ VppDownloadPipeData pipeData = { 0, };
- pipeData.eCbType = VPP_DOWNLOAD_CB_TYPE_STATE_CHANGED;
- pipeData.eState = (VppDownloadState)state;
- pipeData.pItem = pItem;
+ pipeData.eCbType = VPP_DOWNLOAD_CB_TYPE_STATE_CHANGED;
+ pipeData.eState = (VppDownloadState) state;
+ pipeData.pItem = pItem;
- ecore_pipe_write(pItem->pDownloadPipe, &pipeData, sizeof(VppDownloadPipeData));
+ ecore_pipe_write(pItem->pDownloadPipe, &pipeData,
+ sizeof(VppDownloadPipeData));
}
static void
-__VppDownloadProgressCb(int download_id, unsigned long long received, void *user_data)
+__VppDownloadProgressCb(int download_id, unsigned long long received,
+ void *user_data)
{
- __VppDownloadItem *pItem = (__VppDownloadItem*)user_data;
+ __VppDownloadItem *pItem = (__VppDownloadItem *) user_data;
- VppDownloadPipeData pipeData = {0,};
+ VppDownloadPipeData pipeData = { 0, };
if (user_data == NULL) {
VideoLogError("user_data == NULL!!!");
return;
}
- pipeData.eCbType = VPP_DOWNLOAD_CB_TYPE_PROGRESS;
- pipeData.eState = VPP_DOWNLOAD_STATE_DOWNLOADING;
- pipeData.pItem = (__VppDownloadItem*)user_data;
- pipeData.received = received;
+ pipeData.eCbType = VPP_DOWNLOAD_CB_TYPE_PROGRESS;
+ pipeData.eState = VPP_DOWNLOAD_STATE_DOWNLOADING;
+ pipeData.pItem = (__VppDownloadItem *) user_data;
+ pipeData.received = received;
- ecore_pipe_write(pItem->pDownloadPipe, &pipeData, sizeof(VppDownloadPipeData));
+ ecore_pipe_write(pItem->pDownloadPipe, &pipeData,
+ sizeof(VppDownloadPipeData));
}
-unsigned int
-__VppDownloadListCount()
+unsigned int __VppDownloadListCount()
{
if (g_download_list != NULL && g_download_list->downloadList != NULL) {
if (g_download_list->downloadList->accounting != NULL) {
}
-bool
-__VppDownloadListAdd(__VppDownloadItem *pItem, bool bAppend)
+bool __VppDownloadListAdd(__VppDownloadItem * pItem, bool bAppend)
{
if (pItem == NULL) {
VideoLogError("pItem == NULL!!!");
}
if (bAppend == TRUE) {
- g_download_list->downloadList = eina_list_append(g_download_list->downloadList, (void*)pItem);
+ g_download_list->downloadList =
+ eina_list_append(g_download_list->downloadList,
+ (void *) pItem);
if (g_download_list->downloadList == NULL) {
VideoLogError("eina_list_append faile !!!");
return FALSE;
}
} else {
- g_download_list->downloadList = eina_list_prepend(g_download_list->downloadList, (void*)pItem);
+ g_download_list->downloadList =
+ eina_list_prepend(g_download_list->downloadList,
+ (void *) pItem);
if (g_download_list->downloadList == NULL) {
VideoLogError("eina_list_prepend faile !!!");
}
-void
-__VppDownloadListRemove(__VppDownloadItem *pItem)
+void __VppDownloadListRemove(__VppDownloadItem * pItem)
{
if (pItem == NULL) {
VideoLogError("pItem == NULL!!!");
return;
}
- g_download_list->downloadList = eina_list_remove(g_download_list->downloadList, (void*)pItem);
+ g_download_list->downloadList =
+ eina_list_remove(g_download_list->downloadList, (void *) pItem);
if (__VppDownloadListCount() <= 0) {
__VppDestoryDownloadListDestory();
}
-void
-__VppDownloadListNextTrigger()
+void __VppDownloadListNextTrigger()
{
if (g_download_list == NULL) {
VideoLogError("g_download_list == NULL!!!");
return;
}
- Eina_List *l;
- __VppDownloadItem *pItem;
+ Eina_List *l;
+ __VppDownloadItem *pItem;
EINA_LIST_FOREACH(g_download_list->downloadList, l, pItem) {
if (pItem == NULL) {
}
}
- VppDownloadState eState = VppDownloadGetState((VppDownloadHandle)pItem);
+ VppDownloadState eState =
+ VppDownloadGetState((VppDownloadHandle) pItem);
VideoLogDebug("eState : [%d]", eState);
if (eState == VPP_DOWNLOAD_STATE_PAUSED) {
pItem->bDownloading = TRUE;
++(g_download_list->currentDownloadingCount);
} else {
- VideoSecureLogError("__VppDownloadStart faile : [%s : %s]!!!", pItem->pDstFolder, pItem->pDstName);
+ VideoSecureLogError
+ ("__VppDownloadStart faile : [%s : %s]!!!",
+ pItem->pDstFolder, pItem->pDstName);
__VppDownloadStartTimer();
return;
}
}
-void
-__VppDownloadStartTimer()
+void __VppDownloadStartTimer()
{
if (g_download_list == NULL) {
VideoLogError("g_download_list == NULL!!!");
if (g_download_list->downloadTimer != NULL) {
ecore_timer_del(g_download_list->downloadTimer);
- g_download_list->downloadTimer = NULL;
+ g_download_list->downloadTimer = NULL;
}
- g_download_list->downloadTimer = ecore_timer_add(1.0, __VppDownloadTimerCb, g_download_list);
+ g_download_list->downloadTimer =
+ ecore_timer_add(1.0, __VppDownloadTimerCb, g_download_list);
}
static void
__VppDownloadPipeCb(void *data, void *pdata, unsigned int nbyte)
{
- VppDownloadPipeData *pPipeData = NULL;
- __VppDownloadItem *pItem = NULL;
+ VppDownloadPipeData *pPipeData = NULL;
+ __VppDownloadItem *pItem = NULL;
if (pdata == NULL) {
VideoLogError("pdata == NULL!!!");
return;
}
- pPipeData = (VppDownloadPipeData*)pdata;;
- pItem = pPipeData->pItem;
+ pPipeData = (VppDownloadPipeData *) pdata;;
+ pItem = pPipeData->pItem;
if (pItem == NULL) {
VideoLogError("pItem == NULL!!!");
}
if (pPipeData->eCbType == VPP_DOWNLOAD_CB_TYPE_STATE_CHANGED) {
- char* pDstPath = VppDownloadGetDownloadedFilePath((VppDownloadHandle)pItem);
+ char *pDstPath =
+ VppDownloadGetDownloadedFilePath((VppDownloadHandle) pItem);
if (pPipeData->eState == VPP_DOWNLOAD_STATE_COMPLETED) {
- char* pTempDstPath = NULL;
- int error = 0;
+ char *pTempDstPath = NULL;
+ int error = 0;
- error = download_get_downloaded_file_path(pItem->id, &pTempDstPath);
+ error =
+ download_get_downloaded_file_path(pItem->id,
+ &pTempDstPath);
if (error != DOWNLOAD_ERROR_NONE) {
VideoLogError("download_get_downloaded_file_path error");
- __VppDownloadPrintErr((download_error_e)error);
+ __VppDownloadPrintErr((download_error_e) error);
} else {
if (pTempDstPath != NULL && pDstPath != NULL) {
if (strcmp(pTempDstPath, pDstPath) != 0) {
- if (vp_file_exists((const char*)pDstPath) == EINA_TRUE) {
- vp_file_unlink((const char*)pDstPath);
+ if (vp_file_exists((const char *) pDstPath) ==
+ EINA_TRUE) {
+ vp_file_unlink((const char *) pDstPath);
}
- if (vp_file_mv(pTempDstPath, pDstPath) != EINA_TRUE) {
- VideoSecureLogError("vp_file_mv failed!!! src : [%s], dst : [%s]", pTempDstPath, pDstPath);
+ if (vp_file_mv(pTempDstPath, pDstPath) !=
+ EINA_TRUE) {
+ VideoSecureLogError
+ ("vp_file_mv failed!!! src : [%s], dst : [%s]",
+ pTempDstPath, pDstPath);
}
}
}
if (pTempDstPath != NULL) {
free(pTempDstPath);
- pTempDstPath = NULL;
+ pTempDstPath = NULL;
}
}
if (pItem->stateChangedCb != NULL) {
- pItem->stateChangedCb((VppDownloadHandle)pItem, pPipeData->eState, (const char*)pDstPath, pItem->pUserdata);
+ pItem->stateChangedCb((VppDownloadHandle) pItem,
+ pPipeData->eState,
+ (const char *) pDstPath,
+ pItem->pUserdata);
}
if (pDstPath != NULL) {
free(pDstPath);
- pDstPath = NULL;
+ pDstPath = NULL;
}
} else {
if (pItem->progressCb != NULL) {
- unsigned long long contentTotalSize = 0;
- download_error_e error = download_get_content_size(pItem->id, &contentTotalSize);
+ unsigned long long contentTotalSize = 0;
+ download_error_e error =
+ download_get_content_size(pItem->id, &contentTotalSize);
if (error != DOWNLOAD_ERROR_NONE) {
VideoLogError("download_get_content_size error");
__VppDownloadPrintErr(error);
return;
}
- pItem->progressCb((VppDownloadHandle)pItem, pPipeData->received, contentTotalSize, pItem->pUserdata);
+ pItem->progressCb((VppDownloadHandle) pItem,
+ pPipeData->received, contentTotalSize,
+ pItem->pUserdata);
}
}
}
-static Eina_Bool
-__VppDownloadTimerCb(void *data)
+static Eina_Bool __VppDownloadTimerCb(void *data)
{
if (g_download_list == NULL) {
goto TIMER_CB_RETURN;
__VppDownloadListNextTrigger();
-TIMER_CB_RETURN:
+ TIMER_CB_RETURN:
if (g_download_list != NULL) {
- g_download_list->downloadTimer = NULL;
+ g_download_list->downloadTimer = NULL;
}
return ECORE_CALLBACK_CANCEL;
void VppDownloadResetUserData(void *pDataItem)
{
- __VppDownloadItem *pItem = (__VppDownloadItem*)pDataItem;
+ __VppDownloadItem *pItem = (__VppDownloadItem *) pDataItem;
pItem->pUserdata = NULL;
}
-
-
+++ /dev/null
-# Appendix\r
+++ /dev/null
-# Add inputs and outputs from these tool invocations to the build variables
-
-C_DEPS +=
-
-SYSROOT := $(SBI_SYSROOT)
-
-ROOTSTRAP_INCS := $(addprefix -I $(SYSROOT)/,$(PLATFORM_INCS_EX))
-EFL_INCS :=
-
-RS_LIBRARIES := $(addprefix -l,$(RS_LIBRARIES_EX))
-
-PLATFORM_INCS := $(ROOTSTRAP_INCS) $(EFL_INCS) \
- -I"$(SDK_PATH)/library"
-
+++ /dev/null
-
-DEBUG_OP = -g3
-CPP_DEBUG_OP =
-
-OPTIMIZATION_OP = -O0
-CPP_OPTIMIZATION_OP =
-
-COMPILE_FLAGS = $(DEBUG_OP) $(OPTIMIZATION_OP) -Wall -c -fmessage-length=0 -fPIC
-
-CPP_COMPILE_FLAGS = $(CPP_DEBUG_OP) $(CPP_OPTIMIZATION_OP)
-
-LINK_FLAGS = -shared -Wl,--no-undefined
-
-AR_FLAGS =
-
-EDC_COMPILE_FLAGS =
\ No newline at end of file
+++ /dev/null
-BUILD_SCRIPT_VERSION := 1.0.7
-
-all : app_build
-
-clean : app_clean
-
-version : make_version
-
-
-BSLASH := \\#
-BSLASH2SLASH = $(subst $(BSLASH),/,$(1))
-REMOVE_TAIL = $(patsubst %/,%,$(1))
-
-PROJ_ROOT := $(call BSLASH2SLASH,$(PROJPATH))
-
--include $(PROJ_ROOT)/project_def.prop
--include basedef.mk
--include tooldef.mk
--include flags.mk
--include prepost.mk
-
-APPTYPE := $(type)
-
-OBJ_OUTPUT := $(call BSLASH2SLASH,$(OUTPUT_DIR)/objs)
-
-OS_NAME = $(shell $(UNAME))
-
-#LOWER_APPNAME := $(shell echo translit($(APPNAME),[A-Z],[a-z])|$(M4))
-LOWER_APPNAME := $(shell echo $(APPNAME)|$(TR) [A-Z] [a-z])
-
-ifeq ($(strip $(APPTYPE)),app)
-APPFILE := $(OUTPUT_DIR)/$(LOWER_APPNAME)
-endif
-ifeq ($(strip $(APPTYPE)),staticLib)
-APPFILE := $(OUTPUT_DIR)/lib$(LOWER_APPNAME).a
-endif
-ifeq ($(strip $(APPTYPE)),sharedLib)
-APPFILE := $(OUTPUT_DIR)/lib$(LOWER_APPNAME).so
-endif
-
-ifneq ($(strip $(PLATFORM_INCS)),)
-PLATFORM_INCS_FILE := $(OBJ_OUTPUT)/platform_incs_file.inc
-endif
-
-FIND_FILES = $(shell $(FIND) $(PROJ_ROOT)/$(dir $(1)) -type f -name $(notdir $(1)) -printf '$(dir $(1))%P ')
-
-NORMAL_SRCS := $(filter-out %*.c %*.cpp,$(USER_SRCS))
-WIDLCARD_SRCS := $(filter %*.c %*.cpp,$(USER_SRCS))
-ALL_SRCS := $(NORMAL_SRCS) $(foreach var,$(WIDLCARD_SRCS),$(call FIND_FILES,$(var)))
-
-C_SRCS := $(filter %.c,$(ALL_SRCS))
-CPP_SRCS := $(filter %.cpp,$(ALL_SRCS))
-
-USER_EDCS := $(subst $(BSLASH),/,$(USER_EDCS))
-NORMAL_EDCS := $(filter-out %*.edc,$(USER_EDCS))
-WIDLCARD_EDCS := $(filter %*.edc,$(USER_EDCS))
-EDCS := $(NORMAL_EDCS) $(foreach var,$(WIDLCARD_EDCS),$(call FIND_FILES,$(var)))
-
-NORMAL_POS := $(filter-out %*.po,$(USER_POS))
-WIDLCARD_POS := $(filter %*.po,$(USER_POS))
-POS := $(NORMAL_POS) $(foreach var,$(WIDLCARD_POS),$(call FIND_FILES,$(var)))
-
-LIBPATHS := $(addprefix -L$(PROJ_ROOT)/,$(USER_LIB_DIRS)) \
- $(addprefix -L,$(USER_LIB_DIRS_ABS))
-LIBS += $(addprefix -l,$(USER_LIBS))
-UOBJS := $(addprefix $(PROJ_ROOT)/,$(USER_OBJS)) \
- $(USER_OBJS_ABS)
-
-M_OPT = -MMD -MP -MF"$(@:%.o=%.d)"
-
-FUNC_C2O = $(patsubst %.c,$(OBJ_OUTPUT)/%.o,$(1))
-FUNC_CPP2O = $(patsubst %.cpp,$(OBJ_OUTPUT)/%.o,$(1))
-FUNC_EDC2EDJ = $(patsubst %.edc,$(OUTPUT_DIR)/%.edj,$(1))
-FUNC_PO2MO = $(patsubst %.po,$(OUTPUT_DIR)/res/locale/%/LC_MESSAGES/$(LOWER_APPNAME).mo,$(notdir $(1)))
-
-
-C_OBJS := $(call FUNC_C2O,$(C_SRCS))
-CPP_OBJS := $(call FUNC_CPP2O,$(CPP_SRCS))
-OBJS := $(C_OBJS) $(CPP_OBJS)
-EDJ_FILES := $(call FUNC_EDC2EDJ,$(EDCS))
-MO_FILES := $(call FUNC_PO2MO,$(POS))
-DEPS := $(OBJS:.o=.d)
-
-
-ifneq ($(strip $(DEPS)),)
--include $(DEPS)
-endif
-
-ifeq ($(strip $(APPTYPE)),app)
-$(APPFILE) : $(OBJS) $(UOBJS)
- @echo ' Building target: $@'
- @echo ' Invoking: C/C++ Linker'
- @$(MKDIR) $(MKDIR_OP) $(subst $(BSLASH),/,$(@D))
- $(CXX) -o "$(APPFILE)" $(OBJS) $(UOBJS) $(LIBPATHS) -Xlinker --as-needed $(LIBS) $(LINK_FLAGS) $(TC_LINKER_MISC) $(RS_LINKER_MISC) -pie -lpthread -Xlinker -rpath="/home/developer/sdk_tools/lib" --sysroot="$(SYSROOT)" -Xlinker --version-script="$(PROJ_PATH)/.exportMap" -L"$(SBI_SYSROOT)/usr/lib" $(RS_LIBRARIES) -Xlinker -rpath="/opt/usr/apps/$(APPID)/lib" -Werror-implicit-function-declaration
- @echo ' Finished building target: $@'
-endif
-ifeq ($(strip $(APPTYPE)),staticLib)
-$(APPFILE) : $(OBJS) $(UOBJS)
- @echo ' Building target: $@'
- @echo ' Invoking: Archive utility'
- @$(MKDIR) $(MKDIR_OP) $(subst $(BSLASH),/,$(@D))
- $(AR) -r "$(APPFILE)" $(OBJS) $(UOBJS) $(AR_FLAGS)
- @echo ' Finished building target: $@'
-endif
-ifeq ($(strip $(APPTYPE)),sharedLib)
-$(APPFILE) : $(OBJS) $(UOBJS)
- @echo ' Building target: $@'
- @echo ' Invoking: C/C++ Linker'
- @$(MKDIR) $(MKDIR_OP) $(subst $(BSLASH),/,$(@D))
- $(CXX) -o "$(APPFILE)" $(OBJS) $(UOBJS) $(LIBPATHS) -Xlinker --as-needed $(LIBS) $(LINK_FLAGS) $(TC_LINKER_MISC) $(RS_LINKER_MISC) -shared -lpthread --sysroot="$(SYSROOT)" -L"$(SYSROOT)/usr/lib" $(RS_LIBRARIES)
- @echo ' Finished building target: $@'
-endif
-
-
-ifneq ($(strip $(C_SRCS)),)
-CDEFS += $(addprefix -D,$(USER_DEFS))
-CDEFS += $(addprefix -U,$(USER_UNDEFS))
-
-INCS := $(addprefix -I$(PROJ_ROOT)/,$(USER_INC_DIRS)) \
- $(addprefix -I,$(USER_INC_DIRS_ABS)) \
- $(addprefix -include$(PROJ_ROOT)/,$(USER_INC_FILES)) \
- $(addprefix -include,$(USER_INC_FILES_ABS))
-
-$(C_OBJS) : $(OBJ_OUTPUT)/%.o : $(PROJ_ROOT)/%.c $(PLATFORM_INCS_FILE)
- @echo ' Building file: $<'
- @echo ' Invoking: C Compiler'
- @$(MKDIR) $(MKDIR_OP) $(subst $(BSLASH),/,$(@D))
-ifeq ($(strip $(APPTYPE)),sharedLib)
- $(CC) -c $< -o $@ $(CDEFS) $(INCS) -I"pch" $(COMPILE_FLAGS) $(TC_COMPILER_MISC) $(RS_COMPILER_MISC) -fPIC --sysroot="$(SYSROOT)" -Werror-implicit-function-declaration $(M_OPT) @$(PLATFORM_INCS_FILE)
-else
- $(CC) -c $< -o $@ $(CDEFS) $(INCS) -I"pch" $(COMPILE_FLAGS) $(TC_COMPILER_MISC) $(RS_COMPILER_MISC) -fPIE --sysroot="$(SYSROOT)" -Werror-implicit-function-declaration $(M_OPT) @$(PLATFORM_INCS_FILE)
-endif
- @echo ' Finished building: $<'
-endif
-
-ifneq ($(strip $(CPP_SRCS)),)
-CPPDEFS += $(addprefix -D,$(USER_CPP_DEFS))
-CPPDEFS += $(addprefix -U,$(USER_CPP_UNDEFS))
-
-CPP_INCS := $(addprefix -I$(PROJ_ROOT)/,$(USER_CPP_INC_DIRS)) \
- $(addprefix -I,$(USER_CPP_INC_DIRS_ABS)) \
- $(addprefix -include$(PROJ_ROOT)/,$(USER_CPP_INC_FILES)) \
- $(addprefix -include,$(USER_CPP_INC_FILES_ABS))
-
-$(CPP_OBJS) : $(OBJ_OUTPUT)/%.o : $(PROJ_ROOT)/%.cpp $(PLATFORM_INCS_FILE)
- @echo ' Building file: $<'
- @echo ' Invoking: C++ Compiler'
- @$(MKDIR) $(MKDIR_OP) $(subst $(BSLASH),/,$(@D))
-ifeq ($(strip $(APPTYPE)),sharedLib)
- $(CXX) -c $< -o $@ $(CPPDEFS) $(CPP_INCS) -I"pch" $(CPP_COMPILE_FLAGS) $(TC_COMPILER_MISC) $(RS_COMPILER_MISC) -fPIC --sysroot="$(SYSROOT)" -Werror-implicit-function-declaration $(M_OPT) @$(PLATFORM_INCS_FILE)
-else
- $(CXX) -c $< -o $@ $(CPPDEFS) $(CPP_INCS) -I"pch" $(CPP_COMPILE_FLAGS) $(TC_COMPILER_MISC) $(RS_COMPILER_MISC) -fPIE --sysroot="$(SYSROOT)" -Werror-implicit-function-declaration $(M_OPT) @$(PLATFORM_INCS_FILE)
-endif
- @echo ' Finished building: $<'
-endif
-
-
-$(OBJ_OUTPUT) :
- @echo ' Building directory: $@'
- @$(MKDIR) $(MKDIR_OP) $(OBJ_OUTPUT)
-
-preproc : $(OBJ_OUTPUT)
-ifneq ($(strip $(PREBUILD_COMMAND)),)
-ifneq ($(strip $(PREBUILD_DESC)),)
- @echo $(PREBUILD_DESC)
-endif
- @echo $(shell $(PREBUILD_COMMAND))
-endif
-
-
-postproc :
-ifneq ($(strip $(POSTBUILD_COMMAND)),)
-ifneq ($(strip $(POSTBUILD_DESC)),)
- @echo $(POSTBUILD_DESC)
-endif
- @echo $(shell $(POSTBUILD_COMMAND))
-endif
-
-ifneq ($(strip $(PLATFORM_INCS)),)
-$(PLATFORM_INCS_FILE) : $(OBJ_OUTPUT)
- @echo ' Building inc file: $@'
-ifneq ($(findstring Linux,$(OS_NAME)),)
- @echo $(PLATFORM_INCS) > $@
-else
-ifneq ($(findstring 3.82,$(MAKE_VERSION)),)
- $(file > $@,$(PLATFORM_INCS))
-else
- @echo $(PLATFORM_INCS) > $@
-endif
-endif
-endif
-
-ALL_EDJ_FILES :=
-
-define EDJ_PROC
-ALL_EDCS := $$(subst $(BSLASH),/,$$($(2)))
-NORMAL_EDCS := $$(filter-out %*.edc,$$(ALL_EDCS))
-WIDLCARD_EDCS := $$(filter %*.edc,$$(ALL_EDCS))
-EDCS := $$(NORMAL_EDCS) $$(foreach var_edc,$$(WIDLCARD_EDCS),$$(call FIND_FILES,$$(var_edc)))
-
-ifneq ($$(strip $$(EDCS)),)
-EDJ_FILES := $$(call FUNC_EDC2EDJ,$$(EDCS))
-
-ALL_EDJ_FILES += $$(EDJ_FILES)
-
-EDC_$(1)_COMPILER_FLAGS := -id "$$(SDK_TOOLPATH)/enventor/share/enventor/images"
-EDC_$(1)_COMPILER_FLAGS += -sd "$$(SDK_TOOLPATH)/enventor/share/enventor/sounds"
-EDC_$(1)_COMPILER_FLAGS += -fd "$$(SDK_TOOLPATH)/enventor/share/enventor/fonts"
-
-ifneq ($$(strip $(3)),)
-EDC_$(1)_COMPILER_FLAGS += $$(addprefix -id $$(PROJ_PATH)/,$$($(3)))
-endif
-ifneq ($$(strip $(4)),)
-EDC_$(1)_COMPILER_FLAGS += $$(addprefix -id ,$$($(4)))
-endif
-ifneq ($$(strip $(5)),)
-EDC_$(1)_COMPILER_FLAGS += $$(addprefix -sd $$(PROJ_PATH)/,$$($(5)))
-endif
-ifneq ($$(strip $(6)),)
-EDC_$(1)_COMPILER_FLAGS += $$(addprefix -sd ,$$($(6)))
-endif
-ifneq ($$(strip $(7)),)
-EDC_$(1)_COMPILER_FLAGS += $$(addprefix -fd $$(PROJ_PATH)/,$$($(7)))
-endif
-ifneq ($$(strip $(8)),)
-EDC_$(1)_COMPILER_FLAGS += $$(addprefix -fd ,$$($(8)))
-endif
-
-$$(EDJ_FILES) : $$(OUTPUT_DIR)/%.edj : $$(PROJ_ROOT)/%.edc
- @echo ' Building file: $$<'
- @echo ' Invoking: EDC Resource Compiler'
- @$$(MKDIR) $$(MKDIR_OP) $$(subst $$(BSLASH),/,$$(@D))
- $$(EDJE_CC) $$(EDC_$(1)_COMPILER_FLAGS) $$(CDEFS) "$$<" "$$@"
- @echo ' Finished building: $$<'
-endif
-endef
-
-# Global EDCs
-ifneq ($(strip $(USER_EDCS)),)
-$(eval $(call EDJ_PROC,,USER_EDCS,USER_EDCS_IMAGE_DIRS,USER_EDCS_IMAGE_DIRS_ABS,USER_EDCS_SOUND_DIRS,USER_EDCS_SOUND_DIRS_ABS,USER_EDCS_FONT_DIRS,USER_EDCS_FONT_DIRS_ABS))
-endif
-
-# Individual EDCs
-ifneq ($(strip $(USER_EXT_EDC_KEYS)),)
-$(foreach var,$(USER_EXT_EDC_KEYS),$(eval $(call EDJ_PROC,$(var),USER_EXT_$(var)_EDCS,USER_EXT_$(var)_EDCS_IMAGE_DIRS,USER_EXT_$(var)_EDCS_IMAGE_DIRS_ABS,USER_EXT_$(var)_EDCS_SOUND_DIRS,USER_EXT_$(var)_EDCS_SOUND_DIRS_ABS,USER_EXT_$(var)_EDCS_FONT_DIRS,USER_EXT_$(var)_EDCS_FONT_DIRS_ABS)))
-endif
-
-
-ifneq ($(strip $(POS)),)
-define MO_RULE
-$(call FUNC_PO2MO,$(1)) : $(PROJ_ROOT)/$(1)
- @echo ' Building file: $$<'
- @echo ' Invoking: msgfmt String Formatter'
- @$$(MKDIR) $$(MKDIR_OP) $$(subst $$(BSLASH),/,$$(@D))
- $$(MSGFMT) -o $$@ $$<
- @echo ' Finished building: $$<'
-endef
-
-$(foreach var,$(POS),$(eval $(call MO_RULE,$(var))))
-endif
-
-
-secondary-outputs : $(ALL_EDJ_FILES) $(MO_FILES)
-
--include appendix.mk
-
-
-app_build : preproc $(APPFILE) secondary-outputs postproc
-
-app_clean :
- rm -f "$(APPFILE)"
- rm -rf "$(OUTPUT_DIR)"
-
-make_version :
- @echo $(BUILD_SCRIPT_VERSION)
+++ /dev/null
-# Add pre/post build process
-
-PREBUILD_COMMAND =
-PREBUILD_DESC =
-
-POSTBUILD_COMMAND =
-POSTBUILD_DESC =
+++ /dev/null
-# Add inputs and outputs from these tool invocations to the build variables
-
-ifeq ($(strip $(BUILD_CONFIG)),)
-BUILD_CONFIG = Debug
-endif
-
-ifeq ($(strip $(OUTPUT_DIR)),)
-OUTPUT_DIR := $(PROJPATH)/$(BUILD_CONFIG)
-endif
-
-
-ifneq ($(strip $(MKDIR_BIN)),)
-MKDIR = $(MKDIR_BIN)
-MKDIR_OP = -p
-else
-MKDIR = mkdir
-MKDIR_OP = -p
-endif
-
-ifneq ($(strip $(UNAME_BIN)),)
-UNAME = $(UNAME_BIN)
-else
-UNAME = uname
-endif
-
-ifneq ($(strip $(M4_BIN)),)
-M4 = $(M4_BIN)
-else
-M4 = m4
-endif
-
-ifneq ($(strip $(TR_BIN)),)
-TR = $(TR_BIN)
-else
-TR = tr
-endif
-
-ifneq ($(strip $(FIND_BIN)),)
-FIND = $(FIND_BIN)
-else
-FIND = find
-endif
-
-ifneq ($(strip $(GREP_BIN)),)
-GREP = $(GREP_BIN)
-else
-GREP = grep
-endif
-
-ifneq ($(strip $(EDJE_CC_BIN)),)
-EDJE_CC = $(EDJE_CC_BIN)
-else
-EDJE_CC = edje_cc
-endif
-
-ifneq ($(strip $(MSGFMT_BIN)),)
-MSGFMT = $(MSGFMT_BIN)
-else
-MSGFMT = msgfmt
-endif
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 __VP_SERVICE_PARSER__
#include <glib.h>
#include <Eina.h>
#include <app.h>
-//#include <Ecore_X.h>
-typedef enum
-{
- VP_LAUNCH_TYPE_NONE = 0,
+typedef enum {
+ VP_LAUNCH_TYPE_NONE = 0,
VP_LAUNCH_TYPE_STORE,
VP_LAUNCH_TYPE_LIST,
VP_LAUNCH_TYPE_SIMPLE,
VP_LAUNCH_TYPE_IMAGE_VIEWER_TRIM,
VP_LAUNCH_TYPE_MULTI_PATH,
VP_LAUNCH_TYPE_MAX,
-}VpLaunchType;
+} VpLaunchType;
-typedef enum
-{
- VP_VIDEO_SORT_TYPE_BY_NONE = 0,
+typedef enum {
+ VP_VIDEO_SORT_TYPE_BY_NONE = 0,
VP_VIDEO_SORT_TYPE_BY_NAME_DESC,
VP_VIDEO_SORT_TYPE_BY_NAME_ASC,
VP_VIDEO_SORT_TYPE_BY_DATE_ASC,
VP_VIDEO_SORT_TYPE_BY_MAX,
-}VpVideoSortType;
+} VpVideoSortType;
-typedef enum
-{
- VP_VIDEO_PLAY_LIST_TYPE_NONE = 0,
+typedef enum {
+ VP_VIDEO_PLAY_LIST_TYPE_NONE = 0,
VP_VIDEO_PLAY_LIST_TYPE_FOLDER,
VP_VIDEO_PLAY_LIST_TYPE_ALL_FOLDER_GALLERY,
VP_VIDEO_PLAY_LIST_TYPE_TAG_GALLERY,
VP_VIDEO_PLAY_LIST_TYPE_FAVORITE,
VP_VIDEO_PLAY_LIST_TYPE_MAX,
-}VpVideoPlayListType;
+} VpVideoPlayListType;
-typedef struct
-{
- VpLaunchType eLaunchType; // launch type
+typedef struct {
+ VpLaunchType eLaunchType; // launch type
- VpVideoSortType eSortType; // only use gallery, image viewer and my files(?)
- VpVideoPlayListType eListType; // only use gallery, image viewer and my files(?)
-#if 0//Tizen3.0 Build error
- Ecore_X_Window nParentXID;
+ VpVideoSortType eSortType; // only use gallery, image viewer and my files(?)
+ VpVideoPlayListType eListType; // only use gallery, image viewer and my files(?)
+#if 0 //Tizen3.0 Build error
+ Ecore_X_Window nParentXID;
#else
- unsigned int nParentXID;
+ unsigned int nParentXID;
#endif
- Eina_Bool bLaunchMultiWindow; // launch multi winodw
- Eina_Bool bStreaming; // launch streaming
- Eina_Bool bStoreDownload;
- double dStoreDL_FileSize;
- int nStorePlayedTime;
- Eina_Bool bStopAfterRepeat;
+ Eina_Bool bLaunchMultiWindow; // launch multi winodw
+ Eina_Bool bStreaming; // launch streaming
+ Eina_Bool bStoreDownload;
+ double dStoreDL_FileSize;
+ int nStorePlayedTime;
+ Eina_Bool bStopAfterRepeat;
- char *pMediaUri; // play file path or url
- char *szMediaTitle; // media file title
- char *szDeviceID;
- char *szAutoPlay;
- char *szDMRID;
- char *szCookie;
- char *szProxy;
+ char *pMediaUri; // play file path or url
+ char *szMediaTitle; // media file title
+ char *szDeviceID;
+ char *szAutoPlay;
+ char *szDMRID;
+ char *szCookie;
+ char *szProxy;
- char **szMultiPath;
- int nMultiPath;
+ char **szMultiPath;
+ int nMultiPath;
- char **szMultiTitle;
- int nMultiTitle;
+ char **szMultiTitle;
+ int nMultiTitle;
- char **szIsSameAP; // Samsung link : remote / local content,
- int nSameAP;
+ char **szIsSameAP; // Samsung link : remote / local content,
+ int nSameAP;
- char **szMultiSubTitle;
- int nMultiSubTitle;
+ char **szMultiSubTitle;
+ int nMultiSubTitle;
- char **szMultiPosition;
- int nMultiPosition;
+ char **szMultiPosition;
+ int nMultiPosition;
- char **szMultiDuration;
- int nMultiDuration;
+ char **szMultiDuration;
+ int nMultiDuration;
- char *pStoreOrderId;
- char *pStoreServerId;
- char *pStoreAppId;
- char *pStoreMvId;
-}VpServiceData;
+ char *pStoreOrderId;
+ char *pStoreServerId;
+ char *pStoreAppId;
+ char *pStoreMvId;
+} VpServiceData;
#ifdef _cplusplus
-extern "C"
-{
+extern "C" {
#endif
-Eina_Bool VpServiceParserGetServiceData( app_control_h pAppSvcHandle, VpServiceData *pReceiveData );
-void VpServiceParserDestroyServiceData( VpServiceData *pServiceData );
+ Eina_Bool VpServiceParserGetServiceData(app_control_h pAppSvcHandle,
+ VpServiceData * pReceiveData);
+ void VpServiceParserDestroyServiceData(VpServiceData * pServiceData);
#ifdef _cplusplus
}
#endif
-
-
-#endif //__VP_SERVICE_PARSER__
-
+#endif //__VP_SERVICE_PARSER__
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 __VP_MAIN__
/**
* @struct Video player App data
*/
-typedef struct
-{
- VpServiceData *pServiceData;
- bool bPause;
- void *pPlayView;
+typedef struct {
+ VpServiceData *pServiceData;
+ bool bPause;
+ void *pPlayView;
Ecore_Idler *pAppSvcIdler;
//////////////////////////////////////
// for multi window
- char *pValStartup;
- char *pValLayout;
+ char *pValStartup;
+ char *pValLayout;
- bool bIsRelaunch;
+ bool bIsRelaunch;
//////////////////////////////////////
-}VpAppData;
-
+} VpAppData;
-#endif //__VP_MAIN__
+#endif //__VP_MAIN__
<privilege>http://tizen.org/privilege/appmanager.launch</privilege>
<privilege>http://tizen.org/privilege/content.write</privilege>
<privilege>http://tizen.org/privilege/display</privilege>
+ <privilege>http://tizen.org/privilege/internet</privilege>
</privileges>
</manifest>
# User Includes
## C Compiler
-USER_INC_DIRS = include include/serviceParser
-USER_INC_DIRS_ABS = $(workspace_loc)/include $(workspace_loc)/playview/include $(workspace_loc)/common/include $(workspace_loc)/include/common $(workspace_loc)/include/feature $(workspace_loc)/include/view $(workspace_loc)/include/viewMgr $(workspace_loc)/include/widget $(workspace_loc)/playview/src/include $(workspace_loc)/playview/src/core/include $(workspace_loc)/playview/src/common/include $(workspace_loc)/playview/src/feature/include $(workspace_loc)/playview/src/view/include $(workspace_loc)/playview/src/widget/include $(workspace_loc)/common/src/include
+USER_INC_DIRS = include include/serviceParser $(workspace_loc)/include $(workspace_loc)/playview/include $(workspace_loc)/common/include $(workspace_loc)/include/common $(workspace_loc)/include/feature $(workspace_loc)/include/view $(workspace_loc)/include/viewMgr $(workspace_loc)/include/widget $(workspace_loc)/playview/src/include $(workspace_loc)/playview/src/core/include $(workspace_loc)/playview/src/common/include $(workspace_loc)/playview/src/feature/include $(workspace_loc)/playview/src/view/include $(workspace_loc)/playview/src/widget/include $(workspace_loc)/common/src/include
+USER_INC_DIRS_ABS = include include/serviceParser $(workspace_loc)/include $(workspace_loc)/playview/include $(workspace_loc)/common/include $(workspace_loc)/include/common $(workspace_loc)/include/feature $(workspace_loc)/include/view $(workspace_loc)/include/viewMgr $(workspace_loc)/include/widget $(workspace_loc)/playview/src/include $(workspace_loc)/playview/src/core/include $(workspace_loc)/playview/src/common/include $(workspace_loc)/playview/src/feature/include $(workspace_loc)/playview/src/view/include $(workspace_loc)/playview/src/widget/include $(workspace_loc)/common/src/include
USER_INC_FILES =
USER_INC_FILES_ABS =
## C++ Compiler
USER_LIB_DIRS_ABS =
# EDC Resource Path
-USER_EDCS_IMAGE_DIRS = edje/images
-USER_EDCS_IMAGE_DIRS_ABS = $(workspace_loc)/playview/res/edje/images
+USER_EDCS_IMAGE_DIRS = edje/images $(workspace_loc)/playview/res/edje/images
+USER_EDCS_IMAGE_DIRS_ABS =
USER_EDCS_SOUND_DIRS = edje/sounds
USER_EDCS_SOUND_DIRS_ABS =
USER_EDCS_FONT_DIRS = edje/fonts
USER_EXT_EDC_KEYS = EDC0
USER_EXT_EDC0_EDCS = res/edje/pv-trim-control.edc res/edje/pv-custom-winset.edc res/edje/custom/pv-custom-image.edc res/edje/pv-sensor-popup.edc res/edje/custom/pv-custom-define.edc res/edje/pv-bookmark-item.edc res/edje/pv-normal-control.edc res/edje/pv-normal-top-control.edc res/edje/pv-tag-buddy.edc res/edje/pv-volume.edc res/edje/pv-progressbar.edc res/edje/pv-macro.edc res/edje/pv-multi-main.edc res/edje/pv-trim-main.edc res/edje/pv-colorselector.edc res/edje/pv-lockscreenmini.edc res/edje/pv-minicontroller.edc res/edje/pv-brightness-popup.edc res/edje/pv-speed-popup.edc res/edje/pv-tag-preview.edc res/edje/pv-zoom-guide.edc res/edje/pv-normal-main.edc res/edje/pv-popup.edc res/edje/pv-gesture.edc res/edje/pv-trim-top-control.edc res/edje/pv-subtitle.edc res/edje/pv-subtitle-color-popup.edc res/edje/pv-volume-popup.edc res/edje/pv-image.edc res/edje/pv-resource.edc res/edje/pv-normal-function.edc res/edje/pv-chapter-main-new.edc res/edje/pv-trim-item.edc res/edje/pv-bookmark.edc
-USER_EXT_EDC0_EDCS_IMAGE_DIRS = edje/images
-USER_EXT_EDC0_EDCS_IMAGE_DIRS_ABS = $(workspace_loc)/playview/res/edje/images
+USER_EXT_EDC0_EDCS_IMAGE_DIRS = edje/images $(workspace_loc)/playview/res/edje/images
+USER_EXT_EDC0_EDCS_IMAGE_DIRS_ABS = edje/images $(workspace_loc)/playview/res/edje/images
USER_EXT_EDC0_EDCS_SOUND_DIRS = edje/sounds
USER_EXT_EDC0_EDCS_SOUND_DIRS_ABS =
-USER_EXT_EDC0_EDCS_FONT_DIRS = edje/fonts
+USER_EXT_EDC0_EDCS_FONT_DIRS = edje/fonts
USER_EXT_EDC0_EDCS_FONT_DIRS_ABS =
# Resource Filter
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "معاينة الترجمات (التسميات التوضيحية)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "فشل التوصيل."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "وضع التكرار"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Altyazılara bax (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Əlaqə mümkün olmadı."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Təkrarlama rejimi"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Преглед на субтитрите (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Неуспешно свързване."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Режим на повтаряне"
msgstr "Tancar aplicació?"
msgid "IDS_VIDEO_SK_CANCEL_ABB"
-msgstr "Canc"
+msgstr "Cancel·lar"
msgid "IDS_VIDEO_OPT_STOP_AFTER_ALL_ABB"
msgstr "Aturar després tot"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Previsualitzar subtítols (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Error de connexió"
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Mode Repetició"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Náhled titulků (skryté)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Připojení se nezdařilo."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Režim opakování"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Vis eks. på undertekster (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Forbindelsen\nmislykkedes."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Gentagelsestilstand"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Untertitel-Vorschau (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Verbindung fehlgeschlagen"
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Wiederholungsmodus"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Προεπισκόπηση υποτίτλων (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Αποτυχία σύνδεσης. Επανάληψη;"
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Λειτ. επανάληψης"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Preview subtitles (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Connection failed."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Repeat mode"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Preview subtitles (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Connection failed."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Repeat mode"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Preview subtitles (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Connection failed."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Repeat mode"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Previsualizar subtítulos (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Error de conexión"
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Modo Repetición"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Vista prev. de subtítulos (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Error de conexión."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Modo repetir"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Eelvaate subt. (peittiitrid)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Ühendamine nurjus."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Kordusrežiim"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Aurreikusi azpitituluak (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Konektatzerakoan errorea"
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Errepikatze modua"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Esikatsele tekstitys (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Yhdistäminen epäonnistui."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Toistotila"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Aperçu des sous-titres"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Échec de connexion au réseau."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Mode répéter"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Aperçu des sous-titres"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Échec de connexion réseau."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Mode répéter"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Réamhamharc ar fhotheidil (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Theip ar nascadh."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Modh athdhéanta"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Previsualizar subtítulos (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Erro na conexión"
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Modo de repetición"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "पूर्वावलोकन उपशीर्षक (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "कनेक्शन विफल।"
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "दोहराव मोड"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Pregled titlova (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Spajanje neuspješno."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Ponavljanje"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Feliratok megj. (hangfelirat)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Kapcsolódás sikertelen."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Ismétlési mód"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Նախադիտել ենթագրեր (ԹԵ)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Միացումը ձախողվեց:"
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Կրկնման ռեժիմ"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Forskoðun skjátexta"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Tenging brást."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Endurtekning"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Sottotitoli anteprima (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Errore connessione."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Modo ripetizione"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "字幕(CC)をプレビュー"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "接続に失敗しました。"
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "リピートモード"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "იხილეთ ტიტრები (სუბტიტრები)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "ვერ დაუკავშირდა."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "გამეორების რეჟიმი"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Алд.ала қарап шығу субт-і (ЖТ)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Қосылу үзіліп кетті"
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Қайталау режимі"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "자막(CC) 미리보기"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "연결하지 못하였습니다."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "반복 모드"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Žr. subtitrus (užd. antraštė)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Prisijungti nepavyko."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Kartojimo režimas"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Priekšskatīt subtitrus (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Savienojums neizdevās."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Atkārtošanas režīms"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Прегледај титли (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Неуспешно поврзување."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Режим на повторување"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Forhåndsvis undertekster (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Kunne ikke koble til."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Gjentakelsesmodus"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Ondertiteling weergeven"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Verbinding mislukt."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Herhaalstand"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Podgląd napisów (kodowane)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Błąd łączenia"
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Tryb powtarzania"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Visualização de legendas (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Falha de conexão."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Modo de repetição"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Pré-visualizar legendas (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Falha na ligação."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Modo de repetição"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Examin. subtitrări (complexe)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Conexiune nereuşită"
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Mod repetare"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Просмотреть субтитры"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Сбой при подключении."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Режим повтора"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Ukážka titulkov (skryté tit.)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Pripojenie sa nepodarilo."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Režim opakovania"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Predogled podnapisov (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Povezava ni uspela."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Način ponavljanja"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Pregled titlova"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Neuspešno povezivanje."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Režim ponavljanja"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Förhandsgranska textning (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Anslutningsfel."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Upprepning"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Altyazıları (CC) önizleme"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Bağlantı başarısız."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Tekrar modu"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Поп. перегл. субтитрів (копія)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Збій з'єднання."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Режим повторювання"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "Subtitr dast/ko‘rish (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "Ulanib bo‘lmadi."
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "Takrorlash rejimi"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "预览字幕 (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "连接失败"
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "重复模式"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "預覽字幕 (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "連接失敗"
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "重複模式"
msgid "IDS_VIDEO_NPBODY_PREVIEW_SUBTITLES_HCC_ABB"
msgstr "預覽字幕 (CC)"
+msgid "IDS_COM_POP_CONNECTION_FAILED"
+msgstr "連線失敗"
+
msgid "IDS_VIDEO_OPT_REPEAT_MODE_ABB"
msgstr "重複模式"
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <string.h>
#define VP_VIDEO_TITLE_KEY "title"
-#define VP_VIDEO_DATA_SUBTITLE "slink/subtitle"
-#define VP_VIDEO_DATA_POSITION "slink/position"
-#define VP_VIDEO_DATA_TITLE "slink/title"
-#define VP_VIDEO_DATA_DURATION "slink/duration"
+#define VP_VIDEO_DATA_SUBTITLE "slink/subtitle"
+#define VP_VIDEO_DATA_POSITION "slink/position"
+#define VP_VIDEO_DATA_TITLE "slink/title"
+#define VP_VIDEO_DATA_DURATION "slink/duration"
-#define VP_DEFAULT_VIDEO_ITEM_URL_STR "/opt/usr/media/Videos/Color.mp4"
+#define VP_DEFAULT_VIDEO_ITEM_URL_STR "/opt/usr/media/Videos/Color.mp4"
#define VP_VIDEO_FILE_PREFIX "file://"
//////////////////////////////////////////////////////////////////////////////////////////////////////
static char *__VpServiceParserGetMediaUri(app_control_h pAppSvcHandle);
-static bool __VpServiceParserGetMultiAppControl(app_control_h pAppSvcHandle, const char *key, char ***szArrayVal, int *nLength);
-
-static VpLaunchType __VpServiceParserGetLaunchType(app_control_h pAppSvcHandle);
-static Eina_Bool __VpServiceParserGetLaunchMultiWindow(app_control_h pAppSvcHandle);
-static Eina_Bool __VpServiceParserGetStoreDownloadMode(app_control_h pAppSvcHandle);
-static double __VpServiceParserGetStoreDownloadFileSize(app_control_h pAppSvcHandle);
-static int __VpServiceParserGetStoreDownloadPlayedTime(app_control_h pAppSvcHandle);
-static Eina_Bool __VpServiceParserGetRepeatMode(app_control_h pAppSvcHandle);
-static void __VpServiceParserGetStoreOrderInfo(app_control_h pAppSvcHandle, VpServiceData *pReceiveData);
+static bool __VpServiceParserGetMultiAppControl(app_control_h
+ pAppSvcHandle,
+ const char *key,
+ char ***szArrayVal,
+ int *nLength);
+
+static VpLaunchType __VpServiceParserGetLaunchType(app_control_h
+ pAppSvcHandle);
+static Eina_Bool __VpServiceParserGetLaunchMultiWindow(app_control_h
+ pAppSvcHandle);
+static Eina_Bool __VpServiceParserGetStoreDownloadMode(app_control_h
+ pAppSvcHandle);
+static double __VpServiceParserGetStoreDownloadFileSize(app_control_h
+ pAppSvcHandle);
+static int __VpServiceParserGetStoreDownloadPlayedTime(app_control_h
+ pAppSvcHandle);
+static Eina_Bool __VpServiceParserGetRepeatMode(app_control_h
+ pAppSvcHandle);
+static void __VpServiceParserGetStoreOrderInfo(app_control_h pAppSvcHandle,
+ VpServiceData *
+ pReceiveData);
static Eina_Bool __VpServiceParserGetStreamingLaunch(char *pUri);
static char *__VpServiceParserGetDeviceID(app_control_h pAppSvcHandle);
-static char *__VpServiceParserGetAutoPlaySetting(app_control_h pAppSvcHandle);
+static char *__VpServiceParserGetAutoPlaySetting(app_control_h
+ pAppSvcHandle);
static char *__VpServiceParserGetDMRID(app_control_h pAppSvcHandle);
static char *__VpServiceParserGetCookie(app_control_h pAppSvcHandle);
static char *__VpServiceParserGetProxy(app_control_h pAppSvcHandle);
static char *__VpServiceParserGetMediaTitle(app_control_h pAppSvcHandle);
-static Eina_Bool __VpServiceParserGetAUL(app_control_h pAppSvcHandle, char **dpUri);
-static Eina_Bool __VpServiceParserGetAppControl(app_control_h pAppSvcHandle, char **dpUri);
-static Eina_Bool __VpServiceParserGetWindowID(app_control_h pAppSvcHandle, unsigned int *nXID);
-static VpVideoSortType __VpServiceParserGetSortType(app_control_h pAppSvcHandle);
-static VpVideoPlayListType __VpServiceParserGetListType(app_control_h pAppSvcHandle);
+static Eina_Bool __VpServiceParserGetAUL(app_control_h pAppSvcHandle,
+ char **dpUri);
+static Eina_Bool __VpServiceParserGetAppControl(app_control_h
+ pAppSvcHandle,
+ char **dpUri);
+static Eina_Bool __VpServiceParserGetWindowID(app_control_h pAppSvcHandle,
+ unsigned int *nXID);
+static VpVideoSortType __VpServiceParserGetSortType(app_control_h
+ pAppSvcHandle);
+static VpVideoPlayListType __VpServiceParserGetListType(app_control_h
+ pAppSvcHandle);
static Eina_Bool __VpServiceParserCheckURL(char *szURL);
static Eina_Bool __VpServiceParserCheckFileIsExist(char *szFilePath);
//////////////////////////////////////////////////////////////////////////////////////////////////////
-Eina_Bool VpServiceParserGetServiceData(app_control_h pAppSvcHandle, VpServiceData *pReceiveData)
+Eina_Bool VpServiceParserGetServiceData(app_control_h pAppSvcHandle,
+ VpServiceData * pReceiveData)
{
if (pAppSvcHandle == NULL) {
VideoLogError("pAppSvcHandle == NULL!!!");
return EINA_FALSE;
}
- pReceiveData->pMediaUri = __VpServiceParserGetMediaUri(pAppSvcHandle);
- pReceiveData->szMediaTitle = __VpServiceParserGetMediaTitle(pAppSvcHandle);
- pReceiveData->eLaunchType = __VpServiceParserGetLaunchType(pAppSvcHandle);
- pReceiveData->bStoreDownload = __VpServiceParserGetStoreDownloadMode(pAppSvcHandle);
- pReceiveData->dStoreDL_FileSize = __VpServiceParserGetStoreDownloadFileSize(pAppSvcHandle);
- pReceiveData->nStorePlayedTime = 0;
- pReceiveData->bStopAfterRepeat = __VpServiceParserGetRepeatMode(pAppSvcHandle);
+ pReceiveData->pMediaUri = __VpServiceParserGetMediaUri(pAppSvcHandle);
+ pReceiveData->szMediaTitle =
+ __VpServiceParserGetMediaTitle(pAppSvcHandle);
+ pReceiveData->eLaunchType =
+ __VpServiceParserGetLaunchType(pAppSvcHandle);
+ pReceiveData->bStoreDownload =
+ __VpServiceParserGetStoreDownloadMode(pAppSvcHandle);
+ pReceiveData->dStoreDL_FileSize =
+ __VpServiceParserGetStoreDownloadFileSize(pAppSvcHandle);
+ pReceiveData->nStorePlayedTime = 0;
+ pReceiveData->bStopAfterRepeat =
+ __VpServiceParserGetRepeatMode(pAppSvcHandle);
if (pReceiveData->bStoreDownload) {
- pReceiveData->nStorePlayedTime = __VpServiceParserGetStoreDownloadPlayedTime(pAppSvcHandle);
+ pReceiveData->nStorePlayedTime =
+ __VpServiceParserGetStoreDownloadPlayedTime(pAppSvcHandle);
__VpServiceParserGetStoreOrderInfo(pAppSvcHandle, pReceiveData);
}
if (__VpServiceParserCheckURL(pReceiveData->pMediaUri) == EINA_FALSE) {
- if (__VpServiceParserGetMultiAppControl(pAppSvcHandle, APP_CONTROL_DATA_PATH, &pReceiveData->szMultiPath, &(pReceiveData->nMultiPath))) {
+ if (__VpServiceParserGetMultiAppControl
+ (pAppSvcHandle, APP_CONTROL_DATA_PATH,
+ &pReceiveData->szMultiPath, &(pReceiveData->nMultiPath))) {
pReceiveData->eLaunchType = VP_LAUNCH_TYPE_MULTI_PATH;
- __VpServiceParserGetMultiAppControl(pAppSvcHandle, VP_VIDEO_DATA_TITLE, &pReceiveData->szMultiTitle, &(pReceiveData->nMultiTitle));
- __VpServiceParserGetMultiAppControl(pAppSvcHandle, VP_VIDEO_DATA_SUBTITLE, &pReceiveData->szMultiSubTitle, &(pReceiveData->nMultiSubTitle));
- __VpServiceParserGetMultiAppControl(pAppSvcHandle, VP_VIDEO_DATA_POSITION, &pReceiveData->szMultiPosition, &(pReceiveData->nMultiPosition));
- __VpServiceParserGetMultiAppControl(pAppSvcHandle, VP_VIDEO_DATA_DURATION, &pReceiveData->szMultiDuration, &(pReceiveData->nMultiDuration));
+ __VpServiceParserGetMultiAppControl(pAppSvcHandle,
+ VP_VIDEO_DATA_TITLE,
+ &pReceiveData->
+ szMultiTitle,
+ &(pReceiveData->
+ nMultiTitle));
+ __VpServiceParserGetMultiAppControl(pAppSvcHandle,
+ VP_VIDEO_DATA_SUBTITLE,
+ &pReceiveData->
+ szMultiSubTitle,
+ &(pReceiveData->
+ nMultiSubTitle));
+ __VpServiceParserGetMultiAppControl(pAppSvcHandle,
+ VP_VIDEO_DATA_POSITION,
+ &pReceiveData->
+ szMultiPosition,
+ &(pReceiveData->
+ nMultiPosition));
+ __VpServiceParserGetMultiAppControl(pAppSvcHandle,
+ VP_VIDEO_DATA_DURATION,
+ &pReceiveData->
+ szMultiDuration,
+ &(pReceiveData->
+ nMultiDuration));
} else {
- preference_get_string(PREF_VP_PREVIEW_URL_VIDEOS, &(pReceiveData->pMediaUri));
- if (__VpServiceParserCheckFileIsExist(pReceiveData->pMediaUri) == EINA_FALSE) {
+ preference_get_string(PREF_VP_PREVIEW_URL_VIDEOS,
+ &(pReceiveData->pMediaUri));
+ if (__VpServiceParserCheckFileIsExist(pReceiveData->pMediaUri)
+ == EINA_FALSE) {
preference_set_string(PREF_VP_PREVIEW_URL_VIDEOS, "");
VideoSecureLogError(" == %s ==", pReceiveData->pMediaUri);
if (pReceiveData->pMediaUri) {
free(pReceiveData->pMediaUri);
pReceiveData->pMediaUri = NULL;
}
- preference_get_string(PREF_VP_PREVIEW_URL_RECORDS, &(pReceiveData->pMediaUri));
- if (__VpServiceParserCheckFileIsExist(pReceiveData->pMediaUri) == EINA_FALSE) {
+ preference_get_string(PREF_VP_PREVIEW_URL_RECORDS,
+ &(pReceiveData->pMediaUri));
+ if (__VpServiceParserCheckFileIsExist
+ (pReceiveData->pMediaUri) == EINA_FALSE) {
preference_set_string(PREF_VP_PREVIEW_URL_RECORDS, "");
- VideoSecureLogError(" == %s ==", pReceiveData->pMediaUri);
+ VideoSecureLogError(" == %s ==",
+ pReceiveData->pMediaUri);
if (pReceiveData->pMediaUri) {
free(pReceiveData->pMediaUri);
pReceiveData->pMediaUri = NULL;
}
- vp_media_content_util_get_first_video(&pReceiveData->pMediaUri);
- VideoSecureLogError(" == %s ==", pReceiveData->pMediaUri);
- if (__VpServiceParserCheckFileIsExist(pReceiveData->pMediaUri) == EINA_FALSE) {
- pReceiveData->pMediaUri = strdup(VP_DEFAULT_VIDEO_ITEM_URL_STR);
- VideoSecureLogError(" == %s ==", pReceiveData->pMediaUri);
+ vp_media_content_util_get_first_video(&pReceiveData->
+ pMediaUri);
+ VideoSecureLogError(" == %s ==",
+ pReceiveData->pMediaUri);
+ if (__VpServiceParserCheckFileIsExist
+ (pReceiveData->pMediaUri) == EINA_FALSE) {
+ pReceiveData->pMediaUri =
+ strdup(VP_DEFAULT_VIDEO_ITEM_URL_STR);
+ VideoSecureLogError(" == %s ==",
+ pReceiveData->pMediaUri);
}
}
}
}
pReceiveData->nParentXID = 0;
- __VpServiceParserGetWindowID(pAppSvcHandle, &(pReceiveData->nParentXID));
+ __VpServiceParserGetWindowID(pAppSvcHandle,
+ &(pReceiveData->nParentXID));
- pReceiveData->bLaunchMultiWindow = __VpServiceParserGetLaunchMultiWindow(pAppSvcHandle);
+ pReceiveData->bLaunchMultiWindow =
+ __VpServiceParserGetLaunchMultiWindow(pAppSvcHandle);
if (pReceiveData->pMediaUri != NULL) {
- pReceiveData->bStreaming = __VpServiceParserGetStreamingLaunch(pReceiveData->pMediaUri);
+ pReceiveData->bStreaming =
+ __VpServiceParserGetStreamingLaunch(pReceiveData->pMediaUri);
}
if (pReceiveData->bStreaming) {
- pReceiveData->szDeviceID = __VpServiceParserGetDeviceID(pAppSvcHandle);
+ pReceiveData->szDeviceID =
+ __VpServiceParserGetDeviceID(pAppSvcHandle);
pReceiveData->szCookie = __VpServiceParserGetCookie(pAppSvcHandle);
pReceiveData->szProxy = __VpServiceParserGetProxy(pAppSvcHandle);
}
pReceiveData->szDMRID = __VpServiceParserGetDMRID(pAppSvcHandle);
if (pReceiveData->eLaunchType >= VP_LAUNCH_TYPE_GALLERY) {
- pReceiveData->eSortType = __VpServiceParserGetSortType(pAppSvcHandle);
- pReceiveData->eListType = __VpServiceParserGetListType(pAppSvcHandle);
+ pReceiveData->eSortType =
+ __VpServiceParserGetSortType(pAppSvcHandle);
+ pReceiveData->eListType =
+ __VpServiceParserGetListType(pAppSvcHandle);
} else if (pReceiveData->eLaunchType == VP_LAUNCH_TYPE_LIST) {
- pReceiveData->eListType = __VpServiceParserGetListType(pAppSvcHandle);
+ pReceiveData->eListType =
+ __VpServiceParserGetListType(pAppSvcHandle);
} else {
- pReceiveData->eSortType = VP_VIDEO_SORT_TYPE_BY_NONE;
- pReceiveData->eListType = VP_VIDEO_PLAY_LIST_TYPE_NONE;
+ pReceiveData->eSortType = VP_VIDEO_SORT_TYPE_BY_NONE;
+ pReceiveData->eListType = VP_VIDEO_PLAY_LIST_TYPE_NONE;
}
- pReceiveData->szAutoPlay = __VpServiceParserGetAutoPlaySetting(pAppSvcHandle);
+ pReceiveData->szAutoPlay =
+ __VpServiceParserGetAutoPlaySetting(pAppSvcHandle);
return EINA_TRUE;
}
-void VpServiceParserDestroyServiceData(VpServiceData *pServiceData)
+void VpServiceParserDestroyServiceData(VpServiceData * pServiceData)
{
if (pServiceData == NULL) {
VideoLogError("pServiceData == NULL!!!");
if (pServiceData->pMediaUri != NULL) {
free(pServiceData->pMediaUri);
- pServiceData->pMediaUri = NULL;
+ pServiceData->pMediaUri = NULL;
}
if (pServiceData->szMediaTitle != NULL) {
}
free(pServiceData);
- pServiceData = NULL;
+ pServiceData = NULL;
}
char *pUri = NULL;
if (__VpServiceParserGetAUL(pAppSvcHandle, &pUri) == EINA_FALSE) {
- if (__VpServiceParserGetAppControl(pAppSvcHandle, &pUri) == EINA_FALSE) {
+ if (__VpServiceParserGetAppControl(pAppSvcHandle, &pUri) ==
+ EINA_FALSE) {
VideoLogInfo("No exist URI path.");
return NULL;
}
}
if (strstr(pUri, VP_VIDEO_FILE_PREFIX)) {
- char *szURL = calloc(1, strlen(pUri) - strlen(VP_VIDEO_FILE_PREFIX) + 1);
+ char *szURL =
+ calloc(1, strlen(pUri) - strlen(VP_VIDEO_FILE_PREFIX) + 1);
if (szURL == NULL) {
VideoLogError("szURL == NULL!!!");
return NULL;
}
- snprintf(szURL, strlen(pUri) - strlen(VP_VIDEO_FILE_PREFIX) + 1, "%s", pUri + strlen(VP_VIDEO_FILE_PREFIX));
+ snprintf(szURL, strlen(pUri) - strlen(VP_VIDEO_FILE_PREFIX) + 1,
+ "%s", pUri + strlen(VP_VIDEO_FILE_PREFIX));
if (pUri) {
free(pUri);
pUri = NULL;
}
-static bool __VpServiceParserGetMultiAppControl(app_control_h pAppSvcHandle, const char *key, char ***szArrayVal, int *nLength)
+static bool __VpServiceParserGetMultiAppControl(app_control_h
+ pAppSvcHandle,
+ const char *key,
+ char ***szArrayVal,
+ int *nLength)
{
if (pAppSvcHandle == NULL) {
VideoLogError("pAppSvcHandle == NULL!!!");
int nRet = APP_CONTROL_ERROR_NONE;
int nLen = 0;
- nRet = app_control_get_extra_data_array(pAppSvcHandle, key, szArrayVal, &nLen);
+ nRet =
+ app_control_get_extra_data_array(pAppSvcHandle, key, szArrayVal,
+ &nLen);
if (nRet != APP_CONTROL_ERROR_NONE) {
- VideoLogError("app_control_get_extra_data_array is fail [0x%x]", nRet);
+ VideoLogError("app_control_get_extra_data_array is fail [0x%x]",
+ nRet);
return FALSE;
}
}
-static VpLaunchType __VpServiceParserGetLaunchType(app_control_h pAppSvcHandle)
+static VpLaunchType __VpServiceParserGetLaunchType(app_control_h
+ pAppSvcHandle)
{
if (pAppSvcHandle == NULL) {
VideoLogError("pAppSvcHandle == NULL!!!");
return VP_LAUNCH_TYPE_NONE;
}
- char* pLaunchingByOtherApp = NULL;
- char* pLaunchMode = NULL;
- VpLaunchType eLaunchType = VP_LAUNCH_TYPE_NONE;
+ char *pLaunchingByOtherApp = NULL;
+ char *pLaunchMode = NULL;
+ VpLaunchType eLaunchType = VP_LAUNCH_TYPE_NONE;
- if (app_control_get_extra_data(pAppSvcHandle, "View Mode", &pLaunchMode) == APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, "View Mode",
+ &pLaunchMode) == APP_CONTROL_ERROR_NONE) {
if (pLaunchMode != NULL) {
if (strncmp(pLaunchMode, "EMAIL", strlen(pLaunchMode)) == 0) {
eLaunchType = VP_LAUNCH_TYPE_EMAIL;
}
}
- if (app_control_get_extra_data(pAppSvcHandle, VP_VIDEO_LAUNCHED_BY_APP_KEY, &pLaunchingByOtherApp) != APP_CONTROL_ERROR_NONE) {
- VideoLogWarning("No exist Service handle key of MP_VIDEO_LAUNCHED_BY_APP_KEY");
- eLaunchType = VP_LAUNCH_TYPE_NONE;
+ if (app_control_get_extra_data
+ (pAppSvcHandle, VP_VIDEO_LAUNCHED_BY_APP_KEY,
+ &pLaunchingByOtherApp) != APP_CONTROL_ERROR_NONE) {
+ VideoLogWarning
+ ("No exist Service handle key of MP_VIDEO_LAUNCHED_BY_APP_KEY");
+ eLaunchType = VP_LAUNCH_TYPE_NONE;
goto RESULT_RETURN;
}
} else if (strcmp(pLaunchingByOtherApp, "list") == 0) {
eLaunchType = VP_LAUNCH_TYPE_LIST;
} else if (strcmp(pLaunchingByOtherApp, "image_viewer") == 0) {
- char *pEditMode = NULL;
+ char *pEditMode = NULL;
- if (app_control_get_extra_data(pAppSvcHandle, VP_VIDEO_EDIT_MODE_KEY, &pEditMode) != APP_CONTROL_ERROR_NONE) {
- eLaunchType = VP_LAUNCH_TYPE_IMAGE_VIEWER;
+ if (app_control_get_extra_data
+ (pAppSvcHandle, VP_VIDEO_EDIT_MODE_KEY,
+ &pEditMode) != APP_CONTROL_ERROR_NONE) {
+ eLaunchType = VP_LAUNCH_TYPE_IMAGE_VIEWER;
if (pEditMode != NULL) {
free(pEditMode);
} else {
if (pEditMode != NULL) {
if (strcmp(pEditMode, "trim") == 0) {
- eLaunchType = VP_LAUNCH_TYPE_IMAGE_VIEWER_TRIM;
+ eLaunchType = VP_LAUNCH_TYPE_IMAGE_VIEWER_TRIM;
} else {
- eLaunchType = VP_LAUNCH_TYPE_IMAGE_VIEWER;
+ eLaunchType = VP_LAUNCH_TYPE_IMAGE_VIEWER;
}
free(pEditMode);
- pEditMode = NULL;
+ pEditMode = NULL;
} else {
- eLaunchType = VP_LAUNCH_TYPE_IMAGE_VIEWER;
+ eLaunchType = VP_LAUNCH_TYPE_IMAGE_VIEWER;
}
}
} else if (strcmp(pLaunchingByOtherApp, "email") == 0) {
}
-RESULT_RETURN:
+ RESULT_RETURN:
if (pLaunchingByOtherApp != NULL) {
free(pLaunchingByOtherApp);
pLaunchingByOtherApp = NULL;
}
-static Eina_Bool __VpServiceParserGetLaunchMultiWindow(app_control_h pAppSvcHandle)
+static Eina_Bool __VpServiceParserGetLaunchMultiWindow(app_control_h
+ pAppSvcHandle)
{
if (pAppSvcHandle == NULL) {
VideoLogError("pAppSvcHandle == NULL!!!");
return EINA_FALSE;
}
- Eina_Bool bMultiWindow = EINA_FALSE;
- char *pMultiWindowType = NULL;
+ Eina_Bool bMultiWindow = EINA_FALSE;
+ char *pMultiWindowType = NULL;
- if (app_control_get_extra_data(pAppSvcHandle, VP_VIDEO_MULTI_WIN_TYPE_KEY, &pMultiWindowType) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, VP_VIDEO_MULTI_WIN_TYPE_KEY,
+ &pMultiWindowType) != APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist multi window type token.");
- bMultiWindow = EINA_FALSE;
+ bMultiWindow = EINA_FALSE;
}
if (pMultiWindowType != NULL) {
if (strcmp(pMultiWindowType, VP_VIDEO_MULTI_WIN_ON_VALUE) == 0) {
- bMultiWindow = EINA_TRUE;
+ bMultiWindow = EINA_TRUE;
}
free(pMultiWindowType);
- pMultiWindowType = NULL;
+ pMultiWindowType = NULL;
}
return bMultiWindow;
-static Eina_Bool __VpServiceParserGetStoreDownloadMode(app_control_h pAppSvcHandle)
+static Eina_Bool __VpServiceParserGetStoreDownloadMode(app_control_h
+ pAppSvcHandle)
{
if (pAppSvcHandle == NULL) {
VideoLogError("pAppSvcHandle == NULL!!!");
return EINA_FALSE;
}
- Eina_Bool bStoreDownload = EINA_FALSE;
- char *pStoreDownloadValue = NULL;
+ Eina_Bool bStoreDownload = EINA_FALSE;
+ char *pStoreDownloadValue = NULL;
- if (app_control_get_extra_data(pAppSvcHandle, VP_VIDEO_STORE_DOWNLOAD, &pStoreDownloadValue) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, VP_VIDEO_STORE_DOWNLOAD,
+ &pStoreDownloadValue) != APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist store download type");
- bStoreDownload = EINA_FALSE;
+ bStoreDownload = EINA_FALSE;
}
if (pStoreDownloadValue != NULL) {
- if (strcmp(pStoreDownloadValue, VP_VIDEO_STORE_DOWNLOAD_ON_VALUE) == 0) {
- bStoreDownload = EINA_TRUE;
+ if (strcmp(pStoreDownloadValue, VP_VIDEO_STORE_DOWNLOAD_ON_VALUE)
+ == 0) {
+ bStoreDownload = EINA_TRUE;
}
free(pStoreDownloadValue);
- pStoreDownloadValue = NULL;
+ pStoreDownloadValue = NULL;
}
return bStoreDownload;
}
-static double __VpServiceParserGetStoreDownloadFileSize(app_control_h pAppSvcHandle)
+static double __VpServiceParserGetStoreDownloadFileSize(app_control_h
+ pAppSvcHandle)
{
if (pAppSvcHandle == NULL) {
VideoLogError("pAppSvcHandle == NULL!!!");
return EINA_FALSE;
}
- char *pStoreDownloadFileSize = NULL;
- double dFileSize = 0;
+ char *pStoreDownloadFileSize = NULL;
+ double dFileSize = 0;
- if (app_control_get_extra_data(pAppSvcHandle, VP_VIDEO_STORE_DOWNLOAD_FILE_SIZE, &pStoreDownloadFileSize) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, VP_VIDEO_STORE_DOWNLOAD_FILE_SIZE,
+ &pStoreDownloadFileSize) != APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist store download file size");
}
dFileSize = atof(pStoreDownloadFileSize);
VideoLogInfo("dFileSize : %f", dFileSize);
free(pStoreDownloadFileSize);
- pStoreDownloadFileSize = NULL;
+ pStoreDownloadFileSize = NULL;
}
return dFileSize;
}
-static int __VpServiceParserGetStoreDownloadPlayedTime(app_control_h pAppSvcHandle)
+static int __VpServiceParserGetStoreDownloadPlayedTime(app_control_h
+ pAppSvcHandle)
{
if (pAppSvcHandle == NULL) {
VideoLogError("pAppSvcHandle == NULL!!!");
int nPlayedTime = 0;
char *pPlayedTime = NULL;
- if (app_control_get_extra_data(pAppSvcHandle, VP_VIDEO_STORE_DOWNLOAD_PLAYED_TIME, &pPlayedTime) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, VP_VIDEO_STORE_DOWNLOAD_PLAYED_TIME,
+ &pPlayedTime) != APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist multi window type token.");
}
if (pPlayedTime != NULL) {
nPlayedTime = atoi(pPlayedTime);
free(pPlayedTime);
- pPlayedTime = NULL;
+ pPlayedTime = NULL;
}
return nPlayedTime;
}
-static Eina_Bool __VpServiceParserGetRepeatMode(app_control_h pAppSvcHandle)
+static Eina_Bool __VpServiceParserGetRepeatMode(app_control_h
+ pAppSvcHandle)
{
if (pAppSvcHandle == NULL) {
VideoLogError("pAppSvcHandle == NULL!!!");
return EINA_FALSE;
}
- Eina_Bool bRepeatMode = EINA_FALSE;
- char *pRepeatModeValue = NULL;
+ Eina_Bool bRepeatMode = EINA_FALSE;
+ char *pRepeatModeValue = NULL;
- if (app_control_get_extra_data(pAppSvcHandle, VP_VIDEO_APP_CONTROL_REPEAT_MODE, &pRepeatModeValue) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, VP_VIDEO_APP_CONTROL_REPEAT_MODE,
+ &pRepeatModeValue) != APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist repeat mode value");
- bRepeatMode = EINA_FALSE;
+ bRepeatMode = EINA_FALSE;
}
if (pRepeatModeValue != NULL) {
- if (strcmp(pRepeatModeValue, VP_VIDEO_APP_CONTROL_REPEAT_VALUE_STOP_AFTER_ALL) == 0) {
- bRepeatMode = EINA_TRUE;
+ if (strcmp
+ (pRepeatModeValue,
+ VP_VIDEO_APP_CONTROL_REPEAT_VALUE_STOP_AFTER_ALL) == 0) {
+ bRepeatMode = EINA_TRUE;
}
free(pRepeatModeValue);
- pRepeatModeValue = NULL;
+ pRepeatModeValue = NULL;
}
return bRepeatMode;
}
-static void __VpServiceParserGetStoreOrderInfo(app_control_h pAppSvcHandle, VpServiceData *pReceiveData)
+static void __VpServiceParserGetStoreOrderInfo(app_control_h pAppSvcHandle,
+ VpServiceData *
+ pReceiveData)
{
if (pAppSvcHandle == NULL) {
VideoLogError("pAppSvcHandle == NULL!!!");
return;
}
- if (app_control_get_extra_data(pAppSvcHandle, VP_VIDEO_STORE_ORDER_ID, &pReceiveData->pStoreOrderId) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, VP_VIDEO_STORE_ORDER_ID,
+ &pReceiveData->pStoreOrderId) != APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist VP_VIDEO_STORE_ORDER_ID.");
goto NOT_EXISTED_INFO;
}
- if (app_control_get_extra_data(pAppSvcHandle, VP_VIDEO_STORE_APP_ID, &pReceiveData->pStoreAppId) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, VP_VIDEO_STORE_APP_ID,
+ &pReceiveData->pStoreAppId) != APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist VP_VIDEO_STORE_APP_ID.");
goto NOT_EXISTED_INFO;
}
- if (app_control_get_extra_data(pAppSvcHandle, VP_VIDEO_STORE_MV_ID, &pReceiveData->pStoreMvId) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, VP_VIDEO_STORE_MV_ID,
+ &pReceiveData->pStoreMvId) != APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist store_mv_id.");
goto NOT_EXISTED_INFO;
}
- if (app_control_get_extra_data(pAppSvcHandle, VP_VIDEO_STORE_SERVER_ID, &pReceiveData->pStoreServerId) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, VP_VIDEO_STORE_SERVER_ID,
+ &pReceiveData->pStoreServerId) != APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist VP_VIDEO_STORE_SERVER_ID.");
goto NOT_EXISTED_INFO;
}
return;
-NOT_EXISTED_INFO:
+ NOT_EXISTED_INFO:
if (pReceiveData->pStoreOrderId != NULL) {
free(pReceiveData->pStoreOrderId);
- pReceiveData->pStoreOrderId = NULL;
+ pReceiveData->pStoreOrderId = NULL;
}
if (pReceiveData->pStoreAppId != NULL) {
free(pReceiveData->pStoreAppId);
- pReceiveData->pStoreAppId = NULL;
+ pReceiveData->pStoreAppId = NULL;
}
if (pReceiveData->pStoreMvId != NULL) {
free(pReceiveData->pStoreMvId);
- pReceiveData->pStoreMvId = NULL;
+ pReceiveData->pStoreMvId = NULL;
}
if (pReceiveData->pStoreServerId != NULL) {
free(pReceiveData->pStoreServerId);
- pReceiveData->pStoreServerId = NULL;
+ pReceiveData->pStoreServerId = NULL;
}
return;
char *szDeviceID = NULL;
- if (app_control_get_extra_data(pAppSvcHandle, VP_VIDEO_DEVICE_ID_KEY, &szDeviceID) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, VP_VIDEO_DEVICE_ID_KEY,
+ &szDeviceID) != APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist buntle type.");
if (szDeviceID != NULL) {
free(szDeviceID);
- szDeviceID = NULL;
+ szDeviceID = NULL;
}
return NULL;
}
}
-static char *__VpServiceParserGetAutoPlaySetting(app_control_h pAppSvcHandle)
+static char *__VpServiceParserGetAutoPlaySetting(app_control_h
+ pAppSvcHandle)
{
if (pAppSvcHandle == NULL) {
VideoLogError("pAppSvcHandle == NULL!!!");
char *AutoSetting = NULL;
- if (app_control_get_extra_data(pAppSvcHandle, "auto_play_setting", &AutoSetting) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, "auto_play_setting",
+ &AutoSetting) != APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist buntle type.");
if (!AutoSetting) {
free(AutoSetting);
- AutoSetting = NULL;
+ AutoSetting = NULL;
}
return NULL;
}
char *szDMRID = NULL;
- if (app_control_get_extra_data(pAppSvcHandle, VP_VIDEO_DMR_ID_KEY, &szDMRID) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, VP_VIDEO_DMR_ID_KEY,
+ &szDMRID) != APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist buntle type.");
if (szDMRID != NULL) {
free(szDMRID);
- szDMRID = NULL;
+ szDMRID = NULL;
}
return NULL;
}
char *szCookie = NULL;
- if (app_control_get_extra_data(pAppSvcHandle, VP_VIDEO_COOKIE_KEY, &szCookie) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, VP_VIDEO_COOKIE_KEY,
+ &szCookie) != APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist buntle type.");
if (szCookie != NULL) {
free(szCookie);
- szCookie = NULL;
+ szCookie = NULL;
}
return NULL;
}
char *szProxy = NULL;
- if (app_control_get_extra_data(pAppSvcHandle, VP_VIDEO_PROXY_KEY, &szProxy) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, VP_VIDEO_PROXY_KEY,
+ &szProxy) != APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist buntle type.");
if (szProxy != NULL) {
free(szProxy);
- szProxy = NULL;
+ szProxy = NULL;
}
return NULL;
}
char *szMediaTitle = NULL;
- if (app_control_get_extra_data(pAppSvcHandle, VP_VIDEO_TITLE_KEY, &szMediaTitle) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, VP_VIDEO_TITLE_KEY,
+ &szMediaTitle) != APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist app_control_h type.");
if (szMediaTitle != NULL) {
free(szMediaTitle);
- szMediaTitle = NULL;
+ szMediaTitle = NULL;
}
return NULL;
}
}
-static Eina_Bool __VpServiceParserGetAUL(app_control_h pAppSvcHandle, char **dpUri)
+static Eina_Bool __VpServiceParserGetAUL(app_control_h pAppSvcHandle,
+ char **dpUri)
{
if (pAppSvcHandle == NULL) {
VideoLogError("pAppSvcHandle == NULL!!!");
return EINA_FALSE;
}
- if (app_control_get_uri(pAppSvcHandle, dpUri) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_uri(pAppSvcHandle, dpUri) !=
+ APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist uri");
if (*dpUri != NULL) {
free(*dpUri);
- *dpUri = NULL;
+ *dpUri = NULL;
}
return EINA_FALSE;
return EINA_FALSE;
}
-static Eina_Bool __VpServiceParserGetAppControl(app_control_h pAppSvcHandle, char **dpUri)
+static Eina_Bool __VpServiceParserGetAppControl(app_control_h
+ pAppSvcHandle,
+ char **dpUri)
{
if (pAppSvcHandle == NULL) {
VideoLogError("pAppSvcHandle == NULL!!!");
return EINA_FALSE;
}
- if (app_control_get_extra_data(pAppSvcHandle, VP_VIDEO_URI_PATH_KEY, dpUri) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, VP_VIDEO_URI_PATH_KEY,
+ dpUri) != APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist buntle type.");
if (*dpUri != NULL) {
free(*dpUri);
- *dpUri = NULL;
+ *dpUri = NULL;
}
return EINA_FALSE;
return EINA_FALSE;
}
-static Eina_Bool __VpServiceParserGetWindowID(app_control_h pAppSvcHandle, unsigned int *nXID)
+static Eina_Bool __VpServiceParserGetWindowID(app_control_h pAppSvcHandle,
+ unsigned int *nXID)
{
if (pAppSvcHandle == NULL) {
VideoLogError("pAppSvcHandle == NULL!!!");
}
#if 0
char *szValue = NULL;
- if (app_control_get_extra_data(pAppSvcHandle, VP_VIDEO_EXIT_ON_BACK, &szValue) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, VP_VIDEO_EXIT_ON_BACK,
+ &szValue) != APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist buntle type.");
if (szValue != NULL) {
free(szValue);
- szValue = NULL;
+ szValue = NULL;
}
return EINA_FALSE;
return EINA_TRUE;
}
-static VpVideoSortType __VpServiceParserGetSortType(app_control_h pAppSvcHandle)
+static VpVideoSortType __VpServiceParserGetSortType(app_control_h
+ pAppSvcHandle)
{
if (pAppSvcHandle == NULL) {
VideoLogError("pAppSvcHandle == NULL!!!");
return VP_VIDEO_SORT_TYPE_BY_NONE;
}
- VpVideoSortType eSortType = VP_VIDEO_SORT_TYPE_BY_NONE;
- char *pSortType = NULL;
+ VpVideoSortType eSortType = VP_VIDEO_SORT_TYPE_BY_NONE;
+ char *pSortType = NULL;
- if (app_control_get_extra_data(pAppSvcHandle, VP_VIDEO_SORT_TYPE_KEY, &pSortType) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, VP_VIDEO_SORT_TYPE_KEY,
+ &pSortType) != APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist gallery list sort order type!!!");
- eSortType = VP_VIDEO_SORT_TYPE_BY_NONE;
+ eSortType = VP_VIDEO_SORT_TYPE_BY_NONE;
goto RESULT_RETURN;
}
if (pSortType == NULL) {
VideoLogInfo("pSortType == NULL!!!");
- eSortType = VP_VIDEO_SORT_TYPE_BY_NONE;
+ eSortType = VP_VIDEO_SORT_TYPE_BY_NONE;
goto RESULT_RETURN;
}
}
-RESULT_RETURN:
+ RESULT_RETURN:
if (pSortType != NULL) {
free(pSortType);
- pSortType = NULL;
+ pSortType = NULL;
}
return eSortType;
}
-static VpVideoPlayListType __VpServiceParserGetListType(app_control_h pAppSvcHandle)
+static VpVideoPlayListType __VpServiceParserGetListType(app_control_h
+ pAppSvcHandle)
{
if (pAppSvcHandle == NULL) {
VideoLogError("pAppSvcHandle == NULL!!!");
VpVideoPlayListType ePlayType = VP_VIDEO_PLAY_LIST_TYPE_NONE;
char *pPlayType = NULL;
- if (app_control_get_extra_data(pAppSvcHandle, VP_VIDEO_LIST_TYPE_KEY, &pPlayType) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, VP_VIDEO_LIST_TYPE_KEY,
+ &pPlayType) != APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist gallery play list type!!!");
- ePlayType = VP_VIDEO_PLAY_LIST_TYPE_NONE;
+ ePlayType = VP_VIDEO_PLAY_LIST_TYPE_NONE;
goto RESULT_RETURN;
}
if (pPlayType == NULL) {
VideoLogInfo("pPlayType == NULL!!!");
- pPlayType = VP_VIDEO_PLAY_LIST_TYPE_NONE;
+ pPlayType = VP_VIDEO_PLAY_LIST_TYPE_NONE;
goto RESULT_RETURN;
}
ePlayType = VP_VIDEO_PLAY_LIST_TYPE_ALL_FOLDER_GALLERY;
} else if (!strcmp(pPlayType, "tag_video")) {
ePlayType = VP_VIDEO_PLAY_LIST_TYPE_TAG_GALLERY;
- } else if (!strcmp(pPlayType, "favorite")) {
+ } else if (!strcmp(pPlayType, "favorite")) {
ePlayType = VP_VIDEO_PLAY_LIST_TYPE_FAVORITE;
} else {
ePlayType = VP_VIDEO_PLAY_LIST_TYPE_NONE;
}
-RESULT_RETURN:
+ RESULT_RETURN:
if (pPlayType != NULL) {
free(pPlayType);
- pPlayType = NULL;
+ pPlayType = NULL;
}
return ePlayType;
return bIsExist;
}
-
-
-
-
/*
-* 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.
-*
-*/
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 <app.h>
-//#include <aul.h>
#include <system_settings.h>
#include "vp-main.h"
#include "vp-service-parser.h"
VideoLogError("pUserData is NULL");
return;
}
-// VpAppData *pAppData = (VpAppData*)pUserData;
-// pAppData->pPlayView = NULL;
-
- //elm_exit();
}
static bool __appCreate(void *pUserData)
return FALSE;
}
- char locale_path[1024] = {0};
+ char locale_path[1024] = { 0 };
char *path = app_get_resource_path();
if (path == NULL) {
return FALSE;
bindtextdomain("video-player", locale_path);
free(path);
- VpAppData *pAppData = (VpAppData*)pUserData;
+ VpAppData *pAppData = (VpAppData *) pUserData;
- pAppData->bPause = FALSE;
- pAppData->bIsRelaunch = FALSE;
+ pAppData->bPause = FALSE;
+ pAppData->bIsRelaunch = FALSE;
return TRUE;
}
static Eina_Bool __appControl_idler_cb(void *data)
{
- VpAppData *pAppData = (VpAppData*)data;
+ VpAppData *pAppData = (VpAppData *) data;
- VideoLogPerfS("============================== RESET =============================");
+ VideoLogPerfS
+ ("============================== RESET =============================");
video_play_launching_type_t nLaunchingType = VIDEO_PLAY_TYPE_OTHER;
video_play_mode_t nMode = VIDEO_PLAY_MODE_NORMAL_VIEW;
bool bIsRealize = FALSE;
if (vp_play_view_is_realize(pAppData->pPlayView, &bIsRealize)) {
- if (bPopupMode == FALSE && bIsRealize == FALSE && pAppData->bPause == FALSE) {
+ if (bPopupMode == FALSE && bIsRealize == FALSE
+ && pAppData->bPause == FALSE) {
VideoLogError("[ERR] Not Yet reailze");
return ECORE_CALLBACK_DONE;
}
}
if ((bPopupMode == TRUE && pAppData->pServiceData->szDMRID == NULL)
- || (g_strcmp0(pAppData->pValStartup, "2") == 0 && bIsRealize)) {// pAppData->values[0] == 2 for multi window; change video url only, don't destroy the player window.
+ || (g_strcmp0(pAppData->pValStartup, "2") == 0 && bIsRealize)) { // pAppData->values[0] == 2 for multi window; change video url only, don't destroy the player window.
char *szCurURL = NULL;
bool bVisible = FALSE;
- if (!vp_play_view_get_url(pAppData->pPlayView , &szCurURL)) {
+ if (!vp_play_view_get_url(pAppData->pPlayView, &szCurURL)) {
VideoLogError("vp_play_view_set_url is fail");
}
- if (!vp_play_view_get_visible_status(pAppData->pPlayView , &bVisible)) {
+ if (!vp_play_view_get_visible_status
+ (pAppData->pPlayView, &bVisible)) {
VideoLogError("vp_play_view_get_visible_status is fail");
}
req_uri = strdup(pAppData->pServiceData->pMediaUri);
} else if (nLaunchingType == VIDEO_PLAY_TYPE_MULTI_PATH) {
if (pAppData->pServiceData->szMultiPath[0] != NULL) {
- char *multi_path = strstr(pAppData->pServiceData->szMultiPath[0], "file://");
+ char *multi_path =
+ strstr(pAppData->pServiceData->szMultiPath[0],
+ "file://");
if (multi_path != NULL) {
req_uri = strdup(multi_path);
free(req_uri);
req_uri = NULL;
- Evas_Object *pWin = vp_play_view_get_main_window(pAppData->pPlayView);
+ Evas_Object *pWin =
+ vp_play_view_get_main_window(pAppData->pPlayView);
if (pWin) {
- if (nLaunchingType == VIDEO_PLAY_TYPE_MESSAGE || nLaunchingType == VIDEO_PLAY_TYPE_EMAIL) {
+ if (nLaunchingType == VIDEO_PLAY_TYPE_MESSAGE
+ || nLaunchingType == VIDEO_PLAY_TYPE_EMAIL) {
//if current mini mode, change it to full mode
- VideoLogWarning("from Message type and Email type. change mini mode to full mode");
- vp_play_view_change_style_minimode_to_fullmode(pAppData->pPlayView, nLaunchingType);
+ VideoLogWarning
+ ("from Message type and Email type. change mini mode to full mode");
+ vp_play_view_change_style_minimode_to_fullmode
+ (pAppData->pPlayView, nLaunchingType);
}
elm_win_activate(pWin);
}
VideoLogError("vp_play_view_unrealize is fail");
}
- if (!vp_play_view_set_url(pAppData->pPlayView , pAppData->pServiceData->pMediaUri)) {
+ if (!vp_play_view_set_url
+ (pAppData->pPlayView, pAppData->pServiceData->pMediaUri)) {
VideoLogError("vp_play_view_set_url is fail");
}
- vp_play_view_set_launching_mode(pAppData->pPlayView, nLaunchingType);
+ vp_play_view_set_launching_mode(pAppData->pPlayView,
+ nLaunchingType);
if (szCurURL) {
free(szCurURL);
szCurURL = NULL;
#ifdef _PERF_TEST_
vp_play_view_reset(pAppData->pPlayView, nMode);
#else
+ vp_play_view_reset_audio_only(pAppData->pPlayView);
vp_play_view_destroy(pAppData->pPlayView);
#endif
pAppData->pPlayView = NULL;
}
if (pAppData->pPlayView == NULL) {
- pAppData->pPlayView = vp_play_view_create(NULL, pAppData->pServiceData->nParentXID, nMode, nLaunchingType);
- if (pAppData->pPlayView == NULL) {
+ pAppData->pPlayView =
+ vp_play_view_create(NULL,
+ pAppData->pServiceData->nParentXID,
+ nMode, nLaunchingType);
+ if (pAppData->pPlayView == NULL) {
VideoLogError("vp_play_view_create is fail");
elm_exit();
return ECORE_CALLBACK_DONE;
}
- Evas_Object *pWin = NULL;
- pWin = vp_play_view_get_main_window(pAppData->pPlayView);
+ Evas_Object *pWin = NULL;
+ pWin = vp_play_view_get_main_window(pAppData->pPlayView);
evas_object_show(pWin);
elm_win_activate(pWin);
- if (!vp_play_view_set_callback(pAppData->pPlayView, VIDEO_PLAY_CB_TYPE_REALIZE, __vp_main_realize_cb)) {
+ if (!vp_play_view_set_callback
+ (pAppData->pPlayView, VIDEO_PLAY_CB_TYPE_REALIZE,
+ __vp_main_realize_cb)) {
VideoLogError("vp_play_view_set_callback is fail");
return ECORE_CALLBACK_DONE;
}
- if (!vp_play_view_set_callback(pAppData->pPlayView, VIDEO_PLAY_CB_TYPE_DESTORY, __vp_main_destroy_cb)) {
+ if (!vp_play_view_set_callback
+ (pAppData->pPlayView, VIDEO_PLAY_CB_TYPE_DESTORY,
+ __vp_main_destroy_cb)) {
VideoLogError("vp_play_view_set_callback is fail");
return ECORE_CALLBACK_DONE;
}
- if (!vp_play_view_set_user_data(pAppData->pPlayView, (void *)pAppData)) {
+ if (!vp_play_view_set_user_data
+ (pAppData->pPlayView, (void *) pAppData)) {
VideoLogError("vp_play_view_set_user_data is fail");
return ECORE_CALLBACK_DONE;
}
if (nLaunchingType == VIDEO_PLAY_TYPE_WEB) {
- if (!vp_play_view_set_cookie(pAppData->pPlayView, pAppData->pServiceData->szCookie)) {
+ if (!vp_play_view_set_cookie
+ (pAppData->pPlayView, pAppData->pServiceData->szCookie)) {
VideoLogError("vp_play_view_set_cookie is fail");
}
- if (!vp_play_view_set_proxy(pAppData->pPlayView, pAppData->pServiceData->szProxy)) {
+ if (!vp_play_view_set_proxy
+ (pAppData->pPlayView, pAppData->pServiceData->szProxy)) {
VideoLogError("vp_play_view_set_proxy is fail");
}
}
if (pAppData->pServiceData->szDMRID) {
VideoLogWarning("DMR ID : %s", pAppData->pServiceData->szDMRID);
- if (!vp_play_view_set_dmr_id(pAppData->pPlayView , pAppData->pServiceData->szDMRID)) {
+ if (!vp_play_view_set_dmr_id
+ (pAppData->pPlayView, pAppData->pServiceData->szDMRID)) {
VideoLogError("vp_play_view_set_dmr_id is fail");
}
}
- if (nLaunchingType == VIDEO_PLAY_TYPE_MULTI_PATH && pAppData->pServiceData->szMultiPath) {
+ if (nLaunchingType == VIDEO_PLAY_TYPE_MULTI_PATH
+ && pAppData->pServiceData->szMultiPath) {
int idx = 0;
- if (!vp_play_view_set_stop_after_repeat_mode(pAppData->pPlayView , pAppData->pServiceData->bStopAfterRepeat)) {
- VideoLogError("vp_play_view_set_stop_after_repeat_mode is fail");
+ if (!vp_play_view_set_stop_after_repeat_mode
+ (pAppData->pPlayView,
+ pAppData->pServiceData->bStopAfterRepeat)) {
+ VideoLogError
+ ("vp_play_view_set_stop_after_repeat_mode is fail");
}
for (idx = 0; idx < pAppData->pServiceData->nMultiPath; idx++) {
int nDuration = 0;
if (idx == 0) {
- if (!vp_play_view_set_url(pAppData->pPlayView , pAppData->pServiceData->szMultiPath[idx])) {
+ if (!vp_play_view_set_url
+ (pAppData->pPlayView,
+ pAppData->pServiceData->szMultiPath[idx])) {
VideoLogError("vp_play_view_set_url is fail");
}
}
if (pAppData->pServiceData->szMultiTitle) {
if (pAppData->pServiceData->szMultiTitle[idx]) {
- szTitle = pAppData->pServiceData->szMultiTitle[idx];
+ szTitle =
+ pAppData->pServiceData->szMultiTitle[idx];
}
}
if (pAppData->pServiceData->szMultiSubTitle) {
if (pAppData->pServiceData->szMultiSubTitle[idx]) {
- szSubtitle = pAppData->pServiceData->szMultiSubTitle[idx];
+ szSubtitle =
+ pAppData->pServiceData->szMultiSubTitle[idx];
}
}
if (pAppData->pServiceData->szMultiPosition) {
if (pAppData->pServiceData->szMultiPosition[idx]) {
- nPosition = atoi(pAppData->pServiceData->szMultiPosition[idx]);
+ nPosition =
+ atoi(pAppData->pServiceData->
+ szMultiPosition[idx]);
}
}
if (pAppData->pServiceData->szMultiDuration) {
if (pAppData->pServiceData->szMultiDuration[idx]) {
- nDuration = atoi(pAppData->pServiceData->szMultiDuration[idx]);
+ nDuration =
+ atoi(pAppData->pServiceData->
+ szMultiDuration[idx]);
}
}
vp_play_view_add_multi_path(pAppData->pPlayView,
- pAppData->pServiceData->szMultiPath[idx],
- szTitle,
- szSubtitle,
- nPosition,
- nDuration,
- FALSE);
+ pAppData->pServiceData->
+ szMultiPath[idx], szTitle,
+ szSubtitle, nPosition,
+ nDuration, FALSE);
}
}
} else {
int nPosition = 0;
if (pAppData->pServiceData->bStoreDownload) {
- nPosition = pAppData->pServiceData->nStorePlayedTime;
+ nPosition = pAppData->pServiceData->nStorePlayedTime;
}
- if (!vp_play_view_set_start_position(pAppData->pPlayView , nPosition)) {
+ if (!vp_play_view_set_start_position
+ (pAppData->pPlayView, nPosition)) {
VideoLogError("vp_play_view_set_start_position is fail");
}
- if (!vp_play_view_set_url(pAppData->pPlayView , pAppData->pServiceData->pMediaUri)) {
+ if (!vp_play_view_set_url
+ (pAppData->pPlayView, pAppData->pServiceData->pMediaUri)) {
VideoLogError("vp_play_view_set_url is fail");
}
- if (!vp_play_view_set_store_download_mode(pAppData->pPlayView , pAppData->pServiceData->bStoreDownload)) {
+ if (!vp_play_view_set_store_download_mode
+ (pAppData->pPlayView,
+ pAppData->pServiceData->bStoreDownload)) {
VideoLogError("vp_play_view_set_store_download_mode is fail");
}
- if (!vp_play_view_set_store_download_filesize(pAppData->pPlayView , pAppData->pServiceData->dStoreDL_FileSize)) {
- VideoLogError("vp_play_view_set_store_download_filesize is fail");
+ if (!vp_play_view_set_store_download_filesize
+ (pAppData->pPlayView,
+ pAppData->pServiceData->dStoreDL_FileSize)) {
+ VideoLogError
+ ("vp_play_view_set_store_download_filesize is fail");
}
- if (pAppData->pServiceData->bStoreDownload == EINA_TRUE && pAppData->pServiceData->pStoreOrderId != NULL) {
- if (!vp_play_view_set_store_order_info(pAppData->pPlayView ,
- pAppData->pServiceData->pStoreOrderId,
- pAppData->pServiceData->pStoreServerId,
- pAppData->pServiceData->pStoreAppId,
- pAppData->pServiceData->pStoreMvId)) {
+ if (pAppData->pServiceData->bStoreDownload == EINA_TRUE
+ && pAppData->pServiceData->pStoreOrderId != NULL) {
+ if (!vp_play_view_set_store_order_info
+ (pAppData->pPlayView,
+ pAppData->pServiceData->pStoreOrderId,
+ pAppData->pServiceData->pStoreServerId,
+ pAppData->pServiceData->pStoreAppId,
+ pAppData->pServiceData->pStoreMvId)) {
VideoLogError("vp_play_view_set_store_order_info is fail");
}
}
}
- if (pAppData->pServiceData->eListType == VP_VIDEO_PLAY_LIST_TYPE_FOLDER) {
- vp_play_view_set_list_mode(pAppData->pPlayView, VIDEO_PLAY_LIST_TYPE_FOLDER);
+ if (pAppData->pServiceData->eListType ==
+ VP_VIDEO_PLAY_LIST_TYPE_FOLDER) {
+ vp_play_view_set_list_mode(pAppData->pPlayView,
+ VIDEO_PLAY_LIST_TYPE_FOLDER);
} else {
- vp_play_view_set_list_mode(pAppData->pPlayView, VIDEO_PLAY_LIST_TYPE_ALL);
+ vp_play_view_set_list_mode(pAppData->pPlayView,
+ VIDEO_PLAY_LIST_TYPE_ALL);
}
if (pAppData->pServiceData->szDeviceID) {
- VideoLogWarning("Device ID : %s", pAppData->pServiceData->szDeviceID);
- if (!vp_play_view_set_device_id(pAppData->pPlayView , pAppData->pServiceData->szDeviceID)) {
+ VideoLogWarning("Device ID : %s",
+ pAppData->pServiceData->szDeviceID);
+ if (!vp_play_view_set_device_id
+ (pAppData->pPlayView, pAppData->pServiceData->szDeviceID)) {
VideoLogError("vp_play_view_set_device_id is fail");
}
}
- if (!vp_play_view_set_auto_play_setting(pAppData->pPlayView , pAppData->pServiceData->szAutoPlay)) {
- VideoLogError("vp_play_view_set_auto_play_setting is fail");
- }
+ if (!vp_play_view_set_auto_play_setting
+ (pAppData->pPlayView, pAppData->pServiceData->szAutoPlay)) {
+ VideoLogError("vp_play_view_set_auto_play_setting is fail");
+ }
if (pAppData->pServiceData->szMediaTitle) {
- VideoLogWarning("szMediaTitle : %s", pAppData->pServiceData->szMediaTitle);
- if (!vp_play_view_set_media_title(pAppData->pPlayView , pAppData->pServiceData->szMediaTitle)) {
+ VideoLogWarning("szMediaTitle : %s",
+ pAppData->pServiceData->szMediaTitle);
+ if (!vp_play_view_set_media_title
+ (pAppData->pPlayView, pAppData->pServiceData->szMediaTitle)) {
VideoLogError("vp_play_view_set_media_title is fail");
}
}
- if (!vp_play_view_set_relaunch_caller(pAppData->pPlayView, bRelaunchCaller)) {
+ if (!vp_play_view_set_relaunch_caller
+ (pAppData->pPlayView, bRelaunchCaller)) {
VideoLogError("vp_play_view_set_user_data is fail");
return ECORE_CALLBACK_DONE;
}
- VideoLogPerfE("============================== RESET =============================");
+ VideoLogPerfE
+ ("============================== RESET =============================");
if (pAppData->pAppSvcIdler) {
ecore_idler_del(pAppData->pAppSvcIdler);
return ECORE_CALLBACK_DONE;
}
-#if 0
-static int __raise_win(Window win)
-{
- XEvent xev;
- Window root;
- static Atom a_active_win;
-
- Display *d = XOpenDisplay(NULL);
-
- if (!a_active_win) {
- a_active_win = XInternAtom(d, "_NET_ACTIVE_WINDOW", False);
- }
-
- root = XDefaultRootWindow(d);
-
- xev.xclient.type = ClientMessage;
- xev.xclient.display = d;
- xev.xclient.window = win;
- xev.xclient.message_type = a_active_win;
- xev.xclient.format = 32;
- xev.xclient.data.l[0] = 1;
- xev.xclient.data.l[1] = CurrentTime;
- xev.xclient.data.l[2] = 0;
- xev.xclient.data.l[3] = 0;
- xev.xclient.data.l[4] = 0;
- XSendEvent(d, root, False,
- SubstructureRedirectMask | SubstructureNotifyMask, &xev);
-
- XCloseDisplay(d);
-
- return 0;
-}
-#endif
static void __appControl(app_control_h pAppSvcHandle, void *pUserData)
{
return;
}
- VpAppData *pAppData = (VpAppData*)pUserData;
+ VpAppData *pAppData = (VpAppData *) pUserData;
char *resume_check = NULL;
- if (app_control_get_extra_data(pAppSvcHandle, "startup_type", &resume_check) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_get_extra_data
+ (pAppSvcHandle, "startup_type",
+ &resume_check) != APP_CONTROL_ERROR_NONE) {
VideoLogInfo("No exist startup_type");
} else {
VideoLogInfo("temp_resume_check : %s", resume_check);
VideoLogInfo("do resume");
free(resume_check);
- VpAppData *pAppData = (VpAppData*)pUserData;
- Evas_Object *pWin = NULL;
+ VpAppData *pAppData = (VpAppData *) pUserData;
+ Evas_Object *pWin = NULL;
pWin = vp_play_view_get_main_window(pAppData->pPlayView);
if (pWin) {
- //__raise_win(elm_win_xwindow_get(pWin));
__appResume(pUserData);
return;
} else {
if (pAppData->pServiceData != NULL) {
VpServiceParserDestroyServiceData(pAppData->pServiceData);
- pAppData->pServiceData = NULL;
+ pAppData->pServiceData = NULL;
}
- pAppData->pServiceData = calloc(1, sizeof(VpServiceData));
+ pAppData->pServiceData = calloc(1, sizeof(VpServiceData));
- if (VpServiceParserGetServiceData(pAppSvcHandle, pAppData->pServiceData) == EINA_FALSE) {
+ if (VpServiceParserGetServiceData
+ (pAppSvcHandle, pAppData->pServiceData) == EINA_FALSE) {
VideoLogError("[ERR] VpServiceParserGetServiceData fail!!!");
if (pAppData->pServiceData != NULL) {
VpServiceParserDestroyServiceData(pAppData->pServiceData);
- pAppData->pServiceData = NULL;
+ pAppData->pServiceData = NULL;
}
return;
}
-
//////////////////////////////////////////////////////////////////////////////////////////////////////
// for sidesync
//////////////////////////////////////////////////////////////////////////////////////////////////////
if (pAppData->pServiceData->pMediaUri != NULL) {
- bool is_pss = FALSE;
+ bool is_pss = FALSE;
VideoSecureLogInfo("is_pss : [%d]", is_pss);
if (is_pss == TRUE) {
- VideoSecureLogInfo("ss-play: %s", pAppData->pServiceData->pMediaUri);
+ VideoSecureLogInfo("ss-play: %s",
+ pAppData->pServiceData->pMediaUri);
return;
}
}
#ifdef _PERF_TEST_
- pAppData->pAppSvcIdler = ecore_idler_add(__appControl_idler_cb, (void*)pAppData);
+ pAppData->pAppSvcIdler =
+ ecore_idler_add(__appControl_idler_cb, (void *) pAppData);
#else
- __appControl_idler_cb((void*)pAppData);
+ __appControl_idler_cb((void *) pAppData);
#endif
}
VideoLogWarning("== APP EXIT ==");
- VpAppData *pAppData = (VpAppData*)pUserData;
+ VpAppData *pAppData = (VpAppData *) pUserData;
if (pAppData->pServiceData != NULL) {
VpServiceParserDestroyServiceData(pAppData->pServiceData);
- pAppData->pServiceData = NULL;
+ pAppData->pServiceData = NULL;
}
if (pAppData->pPlayView) {
if (pAppData->pValStartup != NULL) {
free(pAppData->pValStartup);
- pAppData->pValStartup = NULL;
+ pAppData->pValStartup = NULL;
}
if (pAppData->pValLayout != NULL) {
free(pAppData->pValLayout);
- pAppData->pValLayout = NULL;
+ pAppData->pValLayout = NULL;
}
}
return;
}
- VpAppData *pAppData = (VpAppData*)pUserData;
+ VpAppData *pAppData = (VpAppData *) pUserData;
pAppData->bPause = TRUE;
#if 1
if (!vp_play_view_unrealize(pAppData->pPlayView)) {
VideoLogWarning("vp_play_view_unrealize is fail");
}
-
#else
if (!vp_play_view_get_popup_mode(pAppData->pPlayView, &bPopupMode)) {
VideoLogWarning("vp_play_view_get_popup_mode is fail");
return;
}
- VpAppData *pAppData = (VpAppData*)pUserData;
+ VpAppData *pAppData = (VpAppData *) pUserData;
pAppData->bPause = FALSE;
-#if 1
if (!vp_play_view_realize(pAppData->pPlayView)) {
VideoLogError("vp_play_view_realize is fail");
}
vp_play_view_live_stream_realize(pAppData->pPlayView);
-#else
- if (!vp_play_view_get_popup_mode(pAppData->pPlayView, &bPopupMode)) {
- VideoLogWarning("vp_play_view_get_popup_mode is fail");
- }
-
- if (bPopupMode == FALSE) {
- if (!vp_play_view_realize(pAppData->pPlayView)) {
- VideoLogError("vp_play_view_realize is fail");
- }
- }
-#endif
}
void vp_low_battery(app_event_info_h event_info, void *data)
{
- VpAppData *ad = (VpAppData *)data;
+ VpAppData *ad = (VpAppData *) data;
app_event_low_battery_status_e status = -1;
int ret = app_event_get_low_battery_status(event_info, &status);
if (ret == APP_ERROR_NONE) {
return;
}
-static void __appUpdateLanguage(app_event_info_h pEventInfo, void *pUserData)
+static void __appUpdateLanguage(app_event_info_h pEventInfo,
+ void *pUserData)
{
char *locale = NULL;
- int retcode = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &locale);
+ VpAppData *pAd = (VpAppData*) pUserData;
+ int retcode =
+ system_settings_get_value_string
+ (SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &locale);
if (retcode != SYSTEM_SETTINGS_ERROR_NONE) {
- VideoLogInfo("[ERR] failed to get updated language!!! [retcode = retcode]", retcode);
+ VideoLogInfo
+ ("[ERR] failed to get updated language!!! [retcode = retcode]",
+ retcode);
} else {
if (locale) {
elm_language_set(locale);
free(locale);
}
}
+
+ if (pAd) {
+ vp_play_view_handle_language_change(pAd->pPlayView);
+ }
}
+
EXPORT_API int main(int argc, char *argv[])
{
- VpAppData sAppData = {0,};
+ VpAppData sAppData = { 0, };
int nRet = -1;
ui_app_lifecycle_callback_s st_appEventService;
app_event_handler_h hLanguageChangedHandle;
app_event_handler_h hLowBatteryHandle;
- nRet = ui_app_add_event_handler(&hLanguageChangedHandle, APP_EVENT_LANGUAGE_CHANGED, __appUpdateLanguage, (void*)&sAppData);
+ nRet =
+ ui_app_add_event_handler(&hLanguageChangedHandle,
+ APP_EVENT_LANGUAGE_CHANGED,
+ __appUpdateLanguage, (void *) &sAppData);
if (nRet != APP_ERROR_NONE) {
- VideoLogError("APP_EVENT_LANGUAGE_CHANGED ui_app_add_event_handler failed : [%d]!!!", nRet);
+ VideoLogError
+ ("APP_EVENT_LANGUAGE_CHANGED ui_app_add_event_handler failed : [%d]!!!",
+ nRet);
return -1;
}
- nRet = ui_app_add_event_handler(&hLowBatteryHandle, APP_EVENT_LOW_BATTERY, vp_low_battery, (void*)&sAppData);
+ nRet =
+ ui_app_add_event_handler(&hLowBatteryHandle, APP_EVENT_LOW_BATTERY,
+ vp_low_battery, (void *) &sAppData);
if (nRet != APP_ERROR_NONE) {
- VideoLogError("APP_EVENT_LOW_BATTERY ui_app_add_event_handler failed : [%d]!!!", nRet);
+ VideoLogError
+ ("APP_EVENT_LOW_BATTERY ui_app_add_event_handler failed : [%d]!!!",
+ nRet);
return -1;
}
- st_appEventService.create = __appCreate;
- st_appEventService.terminate = __appExit;
- st_appEventService.pause = __appPause;
- st_appEventService.resume = __appResume;
- st_appEventService.app_control = __appControl;
- //st_appEventService.low_memory = NULL;
- //st_appEventService.low_battery = NULL;
- //st_appEventService.device_orientation = NULL;
- //st_appEventService.language_changed = __appUpdateLanguage;
- //st_appEventService.region_format_changed = NULL;
- if (ui_app_main(argc, argv, &st_appEventService, &sAppData) != APP_ERROR_NONE) {
+ st_appEventService.create = __appCreate;
+ st_appEventService.terminate = __appExit;
+ st_appEventService.pause = __appPause;
+ st_appEventService.resume = __appResume;
+ st_appEventService.app_control = __appControl;
+
+ if (ui_app_main(argc, argv, &st_appEventService, &sAppData) !=
+ APP_ERROR_NONE) {
return -1;
}
<mime name="video/ogg" />
<mime name="video/quicktime" />
<mime name="video/mp2t" />
+ <mime name="video/3gpp2" />
<mime name="application/sdp" />
</app-control>
</ui-application>
<privilege>http://tizen.org/privilege/externalstorage.appdata</privilege>
<privilege>http://tizen.org/privilege/telephony</privilege>
<privilege>http://tizen.org/privilege/volume.set</privilege>
+ <privilege>http://tizen.org/privilege/internet</privilege>
<privilege>http://tizen.org/privilege/display</privilege>
</privileges>
</manifest>