]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fs_encode: err/logging on stderr
authorMathieu Rene <mrene@avgs.ca>
Tue, 12 Oct 2010 20:24:44 +0000 (16:24 -0400)
committerMathieu Rene <mrene@avgs.ca>
Tue, 12 Oct 2010 20:25:49 +0000 (16:25 -0400)
src/fs_encode.c

index 6704077dfa31c2189238adf79025cadb0c187a1f..15e6538ecf4726b273aa529781f11792dab9359d 100644 (file)
@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
        format++;
        
        if (switch_core_init(SCF_MINIMAL, verbose, &err) != SWITCH_STATUS_SUCCESS) {
-               printf("Cannot init core [%s]\n", err);
+               fprintf(stderr, "Cannot init core [%s]\n", err);
                goto end;
        }
        
@@ -128,24 +128,24 @@ int main(int argc, char *argv[])
        
        for (i = 0; i < extra_modules_count; i++) {
                if (switch_loadable_module_load_module((char *) SWITCH_GLOBAL_dirs.mod_dir, (char *) extra_modules[i], SWITCH_TRUE, &err) != SWITCH_STATUS_SUCCESS) {
-                       printf("Cannot init %s [%s]\n", extra_modules[i], err);
+                       fprintf(stderr, "Cannot init %s [%s]\n", extra_modules[i], err);
                        goto end;
                }
        }
        
        if (switch_loadable_module_load_module((char *) SWITCH_GLOBAL_dirs.mod_dir, (char *) "mod_sndfile", SWITCH_TRUE, &err) != SWITCH_STATUS_SUCCESS) {
-               printf("Cannot init mod_sndfile [%s]\n", err);
+               fprintf(stderr, "Cannot init mod_sndfile [%s]\n", err);
                goto end;
        }
        
        if (switch_loadable_module_load_module((char *) SWITCH_GLOBAL_dirs.mod_dir, (char *) "mod_native_file", SWITCH_TRUE, &err) != SWITCH_STATUS_SUCCESS) {
-               printf("Cannot init mod_native_file [%s]\n", err);
+               fprintf(stderr, "Cannot init mod_native_file [%s]\n", err);
                goto end;
        }
        
        switch_core_new_memory_pool(&pool);
        if (verbose) {
-               fprintf(stderr, "Opening file %s\n", input);    
+               fprintf(stderr, "Opening file %s\n", input);
        }
        if (switch_core_file_open(&fh_input, input, channels, rate, SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, NULL) != SWITCH_STATUS_SUCCESS) {
                fprintf(stderr, "Couldn't open %s\n", input);
@@ -175,7 +175,7 @@ int main(int argc, char *argv[])
        switch_assert(sizeof(buf) >= len * 2);
 
        if (verbose) {
-               printf("Frame size is %d\n", blocksize);        
+               fprintf(stderr, "Frame size is %d\n", blocksize);       
        }
        
        while (switch_core_file_read(&fh_input, buf, &len) == SWITCH_STATUS_SUCCESS) {