summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSung-jae Park <nicesj.park@samsung.com>2014-11-13 13:46:07 +0900
committerSung-jae Park <nicesj.park@samsung.com>2014-11-13 13:52:46 +0900
commitfcc973c7678bdf140d9495b1c0e4addbe21d892f (patch)
treed4c7668cee4e6a26b2f95389bd00fe8604c865af
parent3d98601b57b34239223b58086eae751bd80c4e49 (diff)
downloadwidget-service-fcc973c7678bdf140d9495b1c0e4addbe21d892f.tar.gz
widget-service-fcc973c7678bdf140d9495b1c0e4addbe21d892f.tar.bz2
widget-service-fcc973c7678bdf140d9495b1c0e4addbe21d892f.zip
Add new conf for skipping first few frames
[model] Redwood,Kiran,B3(Wearable) [binary_type] AP [customer] Docomo/Orange/ATT/Open [issue#] N/A [problem] [cause] [solution] [team] HomeTF [request] [horizontal_expansion] Change-Id: Ic4323c1a92dc772a44f2810cd248321bce4086a9
-rw-r--r--include/dynamicbox_buffer.h1
-rw-r--r--include/dynamicbox_conf.h6
-rw-r--r--src/dynamicbox_conf.c17
3 files changed, 24 insertions, 0 deletions
diff --git a/include/dynamicbox_buffer.h b/include/dynamicbox_buffer.h
index 730cf0d..bf41c92 100644
--- a/include/dynamicbox_buffer.h
+++ b/include/dynamicbox_buffer.h
@@ -199,6 +199,7 @@ typedef struct dynamicbox_buffer {
int height;
int pixel_size;
int auto_align;
+ int frame_skip; /**< To skip the first few frames to prevent from unexpected buffer clear */
struct fb_info *fb;
diff --git a/include/dynamicbox_conf.h b/include/dynamicbox_conf.h
index 65dd83b..6d7c522 100644
--- a/include/dynamicbox_conf.h
+++ b/include/dynamicbox_conf.h
@@ -439,6 +439,11 @@ extern const double const dynamicbox_conf_event_filter(void);
*/
extern const int const dynamicbox_conf_slave_limit_to_ttl(void);
+/**
+ * @internal
+ */
+extern const int const dynamicbox_conf_frame_skip(void);
+
#define DYNAMICBOX_CONF_BASE_W dynamicbox_conf_base_width()
#define DYNAMICBOX_CONF_BASE_H dynamicbox_conf_base_height()
@@ -525,6 +530,7 @@ extern const int const dynamicbox_conf_slave_limit_to_ttl(void);
#define DYNAMICBOX_CONF_SLAVE_EVENT_BOOST_OFF dynamicbox_conf_slave_event_boost_off()
#define DYNAMICBOX_CONF_EVENT_FILTER dynamicbox_conf_event_filter()
#define DYNAMICBOX_CONF_SLAVE_LIMIT_TO_TTL dynamicbox_conf_slave_limit_to_ttl()
+#define DYNAMICBOX_CONF_FRAME_SKIP dynamicbox_conf_frame_skip()
#if !defined(VCONFKEY_MASTER_STARTED)
#define VCONFKEY_MASTER_STARTED "memory/data-provider-master/started"
diff --git a/src/dynamicbox_conf.c b/src/dynamicbox_conf.c
index 8ba534d..0d1ee12 100644
--- a/src/dynamicbox_conf.c
+++ b/src/dynamicbox_conf.c
@@ -194,6 +194,7 @@ struct dynamicbox_conf {
int slave_event_boost_off;
double event_filter;
int slave_limit_to_ttl;
+ int frame_skip;
};
static struct dynamicbox_conf s_conf;
@@ -204,6 +205,13 @@ static struct info {
.conf_loaded = 0,
};
+static void frame_skip_handler(char *buffer)
+{
+ if (sscanf(buffer, "%d", &s_conf.frame_skip) != 1) {
+ ErrPrint("Unable to get frame skip: %d\n", s_conf.frame_skip);
+ }
+}
+
static void slave_limit_to_ttl_handler(char *buffer)
{
s_conf.slave_limit_to_ttl = !strcasecmp(buffer, "true");
@@ -872,6 +880,10 @@ EAPI int dynamicbox_conf_load(void)
.name = "slave_limit_to_ttl",
.handler = slave_limit_to_ttl_handler,
},
+ {
+ .name = "frame_skip",
+ .handler = frame_skip_handler,
+ },
{
.name = NULL,
.handler = NULL,
@@ -1526,4 +1538,9 @@ EAPI const int const dynamicbox_conf_slave_limit_to_ttl(void)
return s_conf.slave_limit_to_ttl;
}
+EAPI const int const dynamicbox_conf_frame_skip(void)
+{
+ return s_conf.frame_skip;
+}
+
/* End of a file */