From d4017394ba8868e5d44b5cc01a59c100cbaf953f Mon Sep 17 00:00:00 2001 From: deva Date: Wed, 25 May 2005 15:36:05 +0000 Subject: Added mpeg4 encoding to the encoders, controllable by the config file. --- src/mov_encoder.cc | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mov_encoder.cc b/src/mov_encoder.cc index 0a478fc..e052893 100644 --- a/src/mov_encoder.cc +++ b/src/mov_encoder.cc @@ -39,6 +39,9 @@ /* * $Log$ + * Revision 1.25 2005/05/25 15:36:05 deva + * Added mpeg4 encoding to the encoders, controllable by the config file. + * * Revision 1.24 2005/05/22 15:49:22 deva * Added multithreaded encoding support. * @@ -205,8 +208,27 @@ MovEncoder::MovEncoder(sem_t *r_sem, static const char profilename[] = "MIaV\0"; fame_par.profile = profilename; // profile name fame_par.total_frames = 0; // total number of frames - // fame_par.stats = NULL; // No need for statistics at the moment + if(strcmp(config->readString("encoding_codec")->c_str(), "mpeg4") == 0) { + + fprintf(stderr, "Using mpeg4 compression\n"); fflush(stderr); + fame_object_t *object; + + object = fame_get_object(fame_context, "profile/mpeg4/simple"); + if(object) fame_register(fame_context, "profile", object); + + } else if(strcmp(config->readString("encoding_codec")->c_str(), "mpeg1") == 0) { + + fprintf(stderr, "Using mpeg1 compression\n"); fflush(stderr); + fame_object_t *object; + + object = fame_get_object(fame_context, "profile/mpeg1"); + if(object) fame_register(fame_context, "profile", object); + + } else if(strcmp(config->readString("encoding_codec")->c_str(), "mpeg1") == 0) { + } else { + fprintf(stderr, "Using default (mpeg1) compression\n"); fflush(stderr); + } fame_init(fame_context, &fame_par, fame_buffer, FAME_BUFFER_SIZE); -- cgit v1.2.3