aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Gladstone <philipjsg@users.sourceforge.net>2005-05-06 03:21:04 +0000
committerPhilip Gladstone <philipjsg@users.sourceforge.net>2005-05-06 03:21:04 +0000
commit291fe90ae89a8847acbddb1a208e327d6572f5a7 (patch)
tree370cd592288a1f44e6ae472e14416d3d6cdd5b57
parent223321268fafab4b400ebc7e3a0eb6ad8747238e (diff)
downloadffmpeg-291fe90ae89a8847acbddb1a208e327d6572f5a7.tar.gz
Fill out some mandatory fields in the Codec structure. Also add fields in
the configuration to allow you to set Debug and Strict values. Originally committed as revision 4185 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffserver.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/ffserver.c b/ffserver.c
index f799514199..d3daaba1c8 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -3633,6 +3633,13 @@ static void add_codec(FFStream *stream, AVCodecContext *av)
av->qcompress = 0.5;
av->qblur = 0.5;
+ if (!av->nsse_weight)
+ av->nsse_weight = 8;
+
+ av->frame_skip_cmp = FF_CMP_DCTMAX;
+ av->me_method = ME_EPZS;
+ av->rc_buffer_aggressivity = 1.0;
+
if (!av->rc_eq)
av->rc_eq = "tex^qComp";
if (!av->i_quant_factor)
@@ -3644,6 +3651,11 @@ static void add_codec(FFStream *stream, AVCodecContext *av)
if (!av->rc_max_rate)
av->rc_max_rate = av->bit_rate * 2;
+ if (av->rc_max_rate && !av->rc_buffer_size) {
+ av->rc_buffer_size = av->rc_max_rate;
+ }
+
+
break;
default:
av_abort();
@@ -4066,10 +4078,20 @@ static int parse_ffconfig(const char *filename)
errors++;
}
}
+ } else if (!strcasecmp(cmd, "Debug")) {
+ if (stream) {
+ get_arg(arg, sizeof(arg), &p);
+ video_enc.debug = strtol(arg,0,0);
+ }
+ } else if (!strcasecmp(cmd, "Strict")) {
+ if (stream) {
+ get_arg(arg, sizeof(arg), &p);
+ video_enc.strict_std_compliance = atoi(arg);
+ }
} else if (!strcasecmp(cmd, "VideoBufferSize")) {
if (stream) {
get_arg(arg, sizeof(arg), &p);
- video_enc.rc_buffer_size = atoi(arg) * 1024;
+ video_enc.rc_buffer_size = atoi(arg) * 8*1024;
}
} else if (!strcasecmp(cmd, "VideoBitRateTolerance")) {
if (stream) {
@@ -4286,9 +4308,6 @@ static int parse_ffconfig(const char *filename)
if (video_id != CODEC_ID_NONE) {
video_enc.codec_type = CODEC_TYPE_VIDEO;
video_enc.codec_id = video_id;
- if (!video_enc.rc_buffer_size) {
- video_enc.rc_buffer_size = 40 * 1024;
- }
add_codec(stream, &video_enc);
}
}