From fcc973c7678bdf140d9495b1c0e4addbe21d892f Mon Sep 17 00:00:00 2001 From: Sung-jae Park Date: Thu, 13 Nov 2014 13:46:07 +0900 Subject: 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 --- include/dynamicbox_buffer.h | 1 + include/dynamicbox_conf.h | 6 ++++++ src/dynamicbox_conf.c | 17 +++++++++++++++++ 3 files changed, 24 insertions(+) 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 */ -- cgit v1.2.3