summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mov_encoder.cc24
1 files changed, 23 insertions, 1 deletions
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);