From: Seunghun Lee Date: Wed, 8 Jan 2020 06:46:28 +0000 (+0900) Subject: e_config,e_comp_wl_capture: Add configuration value for video capture. X-Git-Tag: submit/tizen/20200114.081245~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1d54ecd9bdb103ae040ac5b05c20fc08b9dd5209;p=platform%2Fupstream%2Fenlightenment.git e_config,e_comp_wl_capture: Add configuration value for video capture. A variable 'save_video_buffer' is added for configuration of video capture feature. Some platform has to set it zero for disabling this feature. The reason for introducing this is as follow: On some platform, a video client doesn't present its image buffer, but present something like dummy buffer having meta information to display server. Thus, it doesn't make any sense to save this kind of buffer as an image file, and it can even cause crash like SIGSEGV. For this reason, this has to be disabled on such platform. Change-Id: I1b4cc97a41065f6fb8fb36bb42d500fd143ea97a --- diff --git a/src/bin/e_comp_wl_capture.c b/src/bin/e_comp_wl_capture.c index 36ab296588..f51b9a0b38 100644 --- a/src/bin/e_comp_wl_capture.c +++ b/src/bin/e_comp_wl_capture.c @@ -1546,11 +1546,14 @@ _e_capture_client_save(E_Capture_Client *ecc, } #ifdef ENABLE_VIDEO_CAPTURE - /* Don't iterate surface tree if it's video client. */ - if (!e_client_is_video(td->ec)) - e_client_surface_tree_foreach(ec, - _e_capture_client_surface_tree_foreach_cb, - td); + if (e_config->save_video_buffer) + { + /* Don't iterate surface tree if it's video client. */ + if (!e_client_is_video(td->ec)) + e_client_surface_tree_foreach(ec, + _e_capture_client_surface_tree_foreach_cb, + td); + } #endif if (!skip_child) diff --git a/src/bin/e_config.c b/src/bin/e_config.c index b394cc920e..3892fe7819 100644 --- a/src/bin/e_config.c +++ b/src/bin/e_config.c @@ -283,6 +283,7 @@ _e_config_edd_init(Eina_Bool old) E_CONFIG_VAL(D, T, conformant_ack_timeout, DOUBLE); E_CONFIG_VAL(D, T, calc_vis_without_effect, UCHAR); E_CONFIG_VAL(D, T, save_win_buffer, UCHAR); + E_CONFIG_VAL(D, T, save_video_buffer, UCHAR); E_CONFIG_VAL(D, T, hold_prev_win_img, UCHAR); E_CONFIG_VAL(D, T, indicator_plug_name, STR); E_CONFIG_VAL(D, T, launchscreen_without_timer, UCHAR); @@ -523,6 +524,7 @@ e_config_load(void) E_CONFIG_LIMIT(e_config->conformant_ack_timeout, 3.0, 100.0); E_CONFIG_LIMIT(e_config->calc_vis_without_effect, 0, 1); E_CONFIG_LIMIT(e_config->save_win_buffer, 0, 1); + E_CONFIG_LIMIT(e_config->save_video_buffer, 0, 1); E_CONFIG_LIMIT(e_config->hold_prev_win_img, 0, 1); E_CONFIG_LIMIT(e_config->launchscreen_without_timer, 0, 1); E_CONFIG_LIMIT(e_config->log_type, 0, 255); diff --git a/src/bin/e_config.h b/src/bin/e_config.h index ba439068ce..b955b257b4 100644 --- a/src/bin/e_config.h +++ b/src/bin/e_config.h @@ -186,6 +186,14 @@ struct _E_Config double conformant_ack_timeout; // not to wait conformant ack if timer expires Eina_Bool calc_vis_without_effect; // 0: none, 1: send visibility event to a client eventhough running effect due to performance issue. Eina_Bool save_win_buffer; + /* NOTE: + * On some platform, a video client doesn't present its image buffer, but + * present something like dummy buffer having meta information to display + * server. + * Thus, it doesn't make sense to save this kind of buffer as an image file, + * and it can even cause crash like SIGSEGV. + * For this reason, this has to be disabled on such platform. */ + Eina_Bool save_video_buffer; // 0: disable capturering video buffer, 1: enable, see 'e_comp_wl_capture.c' Eina_Bool hold_prev_win_img; const char *indicator_plug_name; // name of indicator ecore_evas_plug such as "elm_indicator" Eina_Bool launchscreen_without_timer; // 0: dismiss launchscreen when timer expires, 1: it doesn't use timer