e_config,e_comp_wl_capture: Add configuration value for video capture. 91/221891/4
authorSeunghun Lee <shiin.lee@samsung.com>
Wed, 8 Jan 2020 06:46:28 +0000 (15:46 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 8 Jan 2020 09:08:09 +0000 (09:08 +0000)
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

src/bin/e_comp_wl_capture.c
src/bin/e_config.c
src/bin/e_config.h

index 36ab29658820d7669d0522d2fac34fc3482405ba..f51b9a0b382d185aee1629d35d089eb4af35fdcc 100644 (file)
@@ -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)
index b394cc920e15f25647fbcabfbf5e3a543dc9a15f..3892fe78192a369ae96257b1110c073d6f5da81e 100644 (file)
@@ -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);
index ba439068ce0699fc5601b67aa57e31f5f15c3ea9..b955b257b4707de30b8d163d3ede985d16ae6021 100644 (file)
@@ -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