From 74c97809b08c5f4c4159e101492e85de670db0da Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 16 May 2005 10:45:10 +0000 Subject: Added new entries to fame parameter struct (bitrate omongst other things) --- src/mov_encoder.cc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mov_encoder.cc b/src/mov_encoder.cc index cbf7993..ec59687 100644 --- a/src/mov_encoder.cc +++ b/src/mov_encoder.cc @@ -39,22 +39,22 @@ /* * $Log$ + * Revision 1.17 2005/05/16 10:45:10 deva + * Added new entries to fame parameter struct (bitrate omongst other things) + * * Revision 1.16 2005/05/09 19:54:15 deva * *** empty log message *** * * Revision 1.15 2005/05/09 16:40:20 deva - * * Added optimize yuv conversion code * * Revision 1.14 2005/05/07 10:56:18 deva * Changed print outs * * Revision 1.13 2005/05/07 10:25:34 deva - * * Removed ffmpeg code from img_encoder and corrected decoding errors in mov_encoder * * Revision 1.12 2005/05/05 20:41:38 deva - * * Removed the last pieces of ffmpeg... replaced it with libfame... * Not quite working yet, but all the major code is in place! * @@ -143,12 +143,15 @@ MovEncoder::MovEncoder(const char *filename) // to JPEG), whereas P and B frames are motion compressed, respectively // predicted from past reference (I or P) frame, or bidirectionally predicted // from past and future reference frame. - static const char coding[] = "I\0"; + static const char coding[] = "IPPPP\0"; fame_par.coding = coding; // quality is a percentage, which controls compression versus quality. fame_par.quality = 100; // FIXME: This should be in config file! + ///////////////////////////// + fame_par.bitrate = 0; /* video bitrate (0=VBR)*/ + // slices_per_frame is the number of frame slices per frame. More slices provide // better error recovery. There must be at least one slice per frame, and at most // height / 16 @@ -176,6 +179,11 @@ MovEncoder::MovEncoder(const char *filename) // current frame on standard error. fame_par.verbose = 0; + static const char profilename[] = "My Profile\0"; + fame_par.profile = profilename; /* profile name */ + fame_par.total_frames = 0; /* total number of frames */ + + fame_init(fame_context, &fame_par, fame_buffer, FAME_BUFFER_SIZE); } -- cgit v1.2.3