diff options
Diffstat (limited to 'src/mov_encoder.cc')
-rw-r--r-- | src/mov_encoder.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/mov_encoder.cc b/src/mov_encoder.cc index fff5600..3945040 100644 --- a/src/mov_encoder.cc +++ b/src/mov_encoder.cc @@ -39,6 +39,9 @@ /* * $Log$ + * Revision 1.28 2005/06/14 12:29:40 deva + * Incorporated the use of the Info object everywhere... also using the log functionality. + * * Revision 1.27 2005/06/09 11:00:03 deva * Added daemon code, and cleaned up using -Wall and -Werror * @@ -112,8 +115,11 @@ MovEncoder::MovEncoder(sem_t *r_sem, FrameVectorQueue *in, sem_t *in_sem, pthread_mutex_t *in_mutex, - FramePriorityQueue *out, sem_t *out_sem, pthread_mutex_t *out_mutex) + FramePriorityQueue *out, sem_t *out_sem, pthread_mutex_t *out_mutex, + Info *i) { + info = i; + // FIXME: Hmmm... should this be detected somewhere?! int w = 720; int h = 576; @@ -147,7 +153,7 @@ MovEncoder::MovEncoder(sem_t *r_sem, // can then be used for subsequent library calls.) fame_context = fame_open(); if(!fame_context) { - fprintf(stderr, "Unable to open FAME context, due to the following error: %s", strerror(errno)); + info->error("Unable to open FAME context, due to the following error: %s", strerror(errno)); return; } @@ -217,7 +223,7 @@ MovEncoder::MovEncoder(sem_t *r_sem, if(strcmp(config->readString("encoding_codec")->c_str(), "mpeg4") == 0) { - fprintf(stderr, "Using mpeg4 compression\n"); fflush(stderr); + info->info("Using mpeg4 compression."); fame_object_t *object; object = fame_get_object(fame_context, "profile/mpeg4/simple"); @@ -225,7 +231,7 @@ MovEncoder::MovEncoder(sem_t *r_sem, } else if(strcmp(config->readString("encoding_codec")->c_str(), "mpeg1") == 0) { - fprintf(stderr, "Using mpeg1 compression\n"); fflush(stderr); + info->info("Using mpeg1 compression."); fame_object_t *object; object = fame_get_object(fame_context, "profile/mpeg1"); @@ -233,7 +239,7 @@ MovEncoder::MovEncoder(sem_t *r_sem, } else if(strcmp(config->readString("encoding_codec")->c_str(), "mpeg1") == 0) { } else { - fprintf(stderr, "Using default (mpeg1) compression\n"); fflush(stderr); + info->info("Using default (mpeg1) compression."); } fame_init(fame_context, &fame_par, fame_buffer, FAME_BUFFER_SIZE); @@ -380,7 +386,7 @@ void MovEncoder::run() // Unlock input mutex if(!item) { - fprintf(stderr, "\t\t\t\tEmpty block detected.\n"); fflush(stderr); + info->warn("Empty block detected."); continue; } |