config_h.set10('LOTTIE_DUMP_TREE_SUPPORT', true)
endif
+if get_option('tizen') == true
+ config_h.set10('TIZEN', true)
+endif
configure_file(
output: 'config.h',
type: 'boolean',
value: false,
description: 'Enable Generating CMake config files')
+
+option('tizen',
+ type: 'boolean',
+ value: true,
+ description: 'Enable prints tizen dlogs')
License: MIT and BSD and MPL-2.0
URL: http://www.tizen.org/
Source0: %{name}-%{version}.tar.gz
+BuildRequires: pkgconfig
BuildRequires: meson
BuildRequires: ninja
+BuildRequires: pkgconfig(dlog)
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
bool renderInProgress = mRenderInProgress.load();
if (renderInProgress) {
vCritical << "Already Rendering Scheduled for this Animation";
+ LOGE("Already Rendering Scheduled for this Animation\n");
return surface;
}
{
if (jsonData.empty()) {
vWarning << "jason data is empty";
+ LOGE("jason data is empty\n");
return nullptr;
}
{
if (jsonData.empty()) {
vWarning << "jason data is empty";
+ LOGE("jason data is empty\n");
return nullptr;
}
{
if (path.empty()) {
vWarning << "File path is empty";
+ LOGE("File path is empty\n");
return nullptr;
}
if (!f.is_open()) {
vCritical << "failed to open file = " << path.c_str();
+ LOGE("failed to open file = %s\n", path.c_str());
return {};
} else {
std::string content;
std::getline(f, content, '\0');
f.close();
- if (content.empty()) return {};
+ if (content.empty())
+ {
+ LOGE("failed : content is empty\n");
+ return {};
+ }
auto obj = internal::model::parse(const_cast<char *>(content.c_str()),
dirname(path));
+ if (!obj)
+ {
+ LOGE("failed : model of parse is null\n");
+ }
if (obj && cachePolicy) ModelCache::instance().add(path, obj);
if (!r_.IterativeParseNext<parseFlags>(ss_, *this)) {
vCritical << "Lottie file parsing error";
+ LOGE("Lottie file parsing error\n");
st_ = kError;
return false;
}
const char *type = GetString();
if (!type) {
vWarning << "No object type specified";
+ LOGE("No object type specified\n");
return nullptr;
}
if (0 == strcmp(type, "gr")) {
return parseReapeaterObject();
} else if (0 == strcmp(type, "mm")) {
vWarning << "Merge Path is not supported yet";
+ LOGE("Merge Path is not supported yet\n");
return nullptr;
} else {
#ifdef DEBUG_PARSER
}
vWarning << "Input data is not Lottie format!";
+ LOGE( "Input data is not Lottie format!\n");
return {};
}
rlottie_lib_dep += dependency('threads')
endif
+if get_option('tizen') == true
+ rlottie_lib_dep += dependency('dlog', required: true)
+endif
+
rlottie_lib = library('rlottie',
include_directories : inc,
version : meson.project_version(),
include_directories: inc,
link_with : rlottie_lib)
+
if (cc.get_id() == 'emscripten')
subdir('wasm')
#include "config.h"
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+#define LOG_TAG "LOTTIE"
+
+#ifdef TIZEN
+#include <dlog.h>
+#define LOGW(fmt, ...) dlog_print(DLOG_WARN, LOG_TAG, "[%s]" fmt, __func__, ##__VA_ARGS__)
+#define LOGE(fmt, ...) dlog_print(DLOG_ERROR, LOG_TAG, "[%s]" fmt, __func__, ##__VA_ARGS__)
+#else
+#define C_RED "\e[31m"
+#define C_YELLOW "\e[33m"
+#define C_END "\e[0m"
+#define LOGW(fmt, ...) printf(C_YELLOW "[" LOG_TAG "]" C_END "[%s]" fmt "\n", __func__, ##__VA_ARGS__)
+#define LOGE(fmt, ...) printf(C_RED "[" LOG_TAG "]" C_END "[%s]" fmt "\n", __func__, ##__VA_ARGS__)
+#endif
+
#ifdef LOTTIE_LOGGING_SUPPORT
#include <cstdint>
{
if (moduleLoad()) {
vWarning << "Failed to dlopen librlottie-image-loader library";
+ LOGE("Failed to dlopen librlottie-image-loader library\n");
return;
}
init();
if (!imageLoad)
+ {
vWarning << "Failed to find symbol lottie_image_load in "
"librlottie-image-loader library";
+ LOGW("Failed to find symbol lottie_image_load in librlottie-image-loader library\n");
+ }
+
if (!imageFree)
+ {
vWarning << "Failed to find symbol lottie_image_free in "
"librlottie-image-loader library";
+ LOGW("Failed to find symbol lottie_image_free in librlottie-image-loader library\n");
+ }
if (!imageFromData)
+ {
vWarning << "Failed to find symbol lottie_image_load_data in "
"librlottie-image-loader library";
+ LOGW("Failed to find symbol lottie_image_load_data in librlottie-image-loader library\n");
+ }
}
~Impl() { moduleFree(); }