@ -136,7 +136,7 @@ static Eina_List *_cur_event_list = NULL;
static int _cur_shot_id = 0 ;
static Eina_Bool _shot_needed = EINA_FALSE ;
static Eina_Bool _scan_objects = EINA_FALSE , _disable_shots = EINA_FALSE ;
static Eina_Bool _scan_objects = EINA_FALSE , _disable_shots = EINA_FALSE , _stabilize_shots = EINA_FALSE ;
static Eina_Debug_Session * _last_debug_session = NULL ;
static int _last_debug_src_cid = 0 ;
@ -567,11 +567,11 @@ _stabilization_timer_cb(void *data EINA_UNUSED)
static int need_more = STAB_MAX ;
EINA_LIST_FOREACH ( _evas_list , itr , e )
{
Exactness_Image * last_img = efl_key_data_get ( e , " _last_shot " ) ;
Exactness_Image * last_img = efl_key_data_get ( e , " _last_stab_s hot " ) ;
Exactness_Image * cur_img = _snapshot_shot_get ( e ) ;
if ( ! last_img | | exactness_image_compare ( last_img , cur_img , NULL ) ) need_more = STAB_MAX ;
exactness_image_free ( last_img ) ;
efl_key_data_set ( e , " _last_shot " , cur_img ) ;
efl_key_data_set ( e , " _last_stab_s hot " , cur_img ) ;
}
EINA_LIST_FOREACH ( _evas_list , itr , e )
{
@ -814,6 +814,18 @@ _src_open()
if ( act - > type = = EXACTNESS_ACTION_TAKE_SHOT ) break ;
_src_unit - > actions = eina_list_remove ( _src_unit - > actions , act ) ;
}
if ( _stabilize_shots )
{
EINA_LIST_FOREACH_SAFE ( _src_unit - > actions , itr , itr2 , act )
{
if ( act - > type = = EXACTNESS_ACTION_TAKE_SHOT )
{
Exactness_Action * act2 = calloc ( 1 , sizeof ( * act2 ) ) ;
act2 - > type = EXACTNESS_ACTION_STABILIZE ;
_src_unit - > actions = eina_list_prepend_relative ( _src_unit - > actions , act2 , act ) ;
}
}
}
}
else
{
@ -965,6 +977,7 @@ static const Ecore_Getopt optdesc = {
ECORE_GETOPT_STORE_TRUE ( 0 , " external-injection " , " Expect events injection via Eina debug channel. " ) ,
ECORE_GETOPT_STORE_TRUE ( 0 , " disable-screenshots " , " Disable screenshots. " ) ,
ECORE_GETOPT_STORE_STR ( ' f ' , " fonts-dir " , " Specify a directory of the fonts that should be used. " ) ,
ECORE_GETOPT_STORE_TRUE ( 0 , " stabilize-shots " , " Wait for the frames to be stable before taking the shots. " ) ,
ECORE_GETOPT_COUNT ( ' v ' , " verbose " , " Turn verbose messages on. " ) ,
ECORE_GETOPT_LICENSE ( ' L ' , " license " ) ,
@ -992,6 +1005,7 @@ int main(int argc, char **argv)
ECORE_GETOPT_VALUE_BOOL ( external_injection ) ,
ECORE_GETOPT_VALUE_BOOL ( _disable_shots ) ,
ECORE_GETOPT_VALUE_STR ( fonts_dir ) ,
ECORE_GETOPT_VALUE_BOOL ( _stabilize_shots ) ,
ECORE_GETOPT_VALUE_INT ( _verbose ) ,
ECORE_GETOPT_VALUE_BOOL ( want_quit ) ,