summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2015-06-12 20:52:01 +0000
committerjstebbins <[email protected]>2015-06-12 20:52:01 +0000
commit1be7a8e58feb0d26cac7067dcd289aec2aebb2e7 (patch)
tree07713faf52c6dd0dbf129ec35aecd217bf00b39e /test
parentf2b0998a8f4ef77d3ef791b64ad032c1bb8348ea (diff)
libhb: Allow log level changes and update checks *after* hb_init()
- In the CLI, this allows calling hb_init() before parsing args, which permits us to see any libhb log messages that are generated during option parsing. These messages were hidden before. - In the GUIs, this allows dynamic changes to log level. Previously an application restart was required. I have only updated the LinGui to take advantage of this. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7295 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'test')
-rw-r--r--test/test.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/test.c b/test/test.c
index 2748ea8b7..4d72283b9 100644
--- a/test/test.c
+++ b/test/test.c
@@ -257,6 +257,9 @@ int main( int argc, char ** argv )
hb_global_init();
hb_presets_builtin_update();
+ /* Init libhb */
+ h = hb_init(4, 0); // Show all logging until debug level is parsed
+
// Get utf8 command line if windows
get_argv_utf8(&argc, &argv);
@@ -267,11 +270,11 @@ int main( int argc, char ** argv )
return 1;
}
+ hb_log_level_set(h, debug);
+
/* Register our error handler */
hb_register_error_handler(&hb_cli_error_handler);
- /* Init libhb */
- h = hb_init( debug, update );
hb_dvd_set_dvdnav( dvdnav );
/* Show version */
@@ -281,6 +284,7 @@ int main( int argc, char ** argv )
/* Check for update */
if( update )
{
+ hb_update_poll(h);
if( ( build = hb_check_update( h, &version ) ) > -1 )
{
fprintf( stderr, "You are using an old version of "