e_config,e_comp_wl_capture: Add configuration value for video capture. 13/221913/2
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:07:40 +0000 (09:07 +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: If4fbada8245c5e0e0862136ef6f4fe89f6bdb4d0

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

index 81b40faff1f82e7d1f102b84768e39942e969b84..ab8f92e8e7e423f27c909bce165b0247c10490b6 100644 (file)
@@ -1542,11 +1542,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