[FFmpeg-soc] [soc]: r5543 - in libavfilter/diffs: 01_ffplay_filters.diff 02_ffmpeg_filters.diff
stefano
subversion at mplayerhq.hu
Wed Dec 16 13:36:07 CET 2009
Author: stefano
Date: Wed Dec 16 13:36:07 2009
New Revision: 5543
Log:
Make ffmpeg and ffplay register all the filters during startup, rather
than only if the -vfilters option has been set.
This way it is possible to list all the registered filters with
-filters.
Modified:
libavfilter/diffs/01_ffplay_filters.diff
libavfilter/diffs/02_ffmpeg_filters.diff
Modified: libavfilter/diffs/01_ffplay_filters.diff
==============================================================================
--- libavfilter/diffs/01_ffplay_filters.diff Wed Dec 16 13:24:29 2009 (r5542)
+++ libavfilter/diffs/01_ffplay_filters.diff Wed Dec 16 13:36:07 2009 (r5543)
@@ -208,7 +208,7 @@ Index: ffplay.c
/* update the bitmap content */
SDL_UnlockYUVOverlay(vp->bmp);
-@@ -1316,54 +1387,273 @@
+@@ -1316,54 +1387,271 @@
return queue_picture(is, src_frame, pts);
}
@@ -407,8 +407,6 @@ Index: ffplay.c
+ AVFilterGraph *graph = av_mallocz(sizeof(AVFilterGraph));
+ graph->scale_sws_opts = av_strdup("sws_flags=bilinear");
+
-+ avfilter_register_all();
-+
+ if(!(filt_src = avfilter_open(&input_filter, "src"))) goto the_end;
+ if(!(filt_out = avfilter_open(&output_filter, "out"))) goto the_end;
+
@@ -513,7 +511,7 @@ Index: ffplay.c
av_free(frame);
return 0;
}
-@@ -2139,6 +2429,12 @@
+@@ -2139,6 +2427,12 @@
/* free all pictures */
for(i=0;i<VIDEO_PICTURE_QUEUE_SIZE; i++) {
vp = &is->pictq[i];
@@ -526,7 +524,7 @@ Index: ffplay.c
if (vp->bmp) {
SDL_FreeYUVOverlay(vp->bmp);
vp->bmp = NULL;
-@@ -2148,8 +2444,10 @@
+@@ -2148,8 +2442,10 @@
SDL_DestroyCond(is->pictq_cond);
SDL_DestroyMutex(is->subpq_mutex);
SDL_DestroyCond(is->subpq_cond);
@@ -537,7 +535,7 @@ Index: ffplay.c
av_free(is);
}
-@@ -2241,6 +2539,9 @@
+@@ -2241,6 +2537,9 @@
av_free(avcodec_opts[i]);
av_free(avformat_opts);
av_free(sws_opts);
@@ -547,7 +545,7 @@ Index: ffplay.c
if (show_status)
printf("\n");
SDL_Quit();
-@@ -2486,6 +2787,9 @@
+@@ -2486,6 +2785,9 @@
{ "ec", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&error_concealment}, "set error concealment options", "bit_mask" },
{ "sync", HAS_ARG | OPT_FUNC2 | OPT_EXPERT, {(void*)opt_sync}, "set audio-video sync. type (type=audio/video/ext)", "type" },
{ "threads", HAS_ARG | OPT_FUNC2 | OPT_EXPERT, {(void*)opt_thread_count}, "thread count", "count" },
@@ -557,7 +555,16 @@ Index: ffplay.c
{ "default", OPT_FUNC2 | HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {(void*)opt_default}, "generic catch all option", "" },
{ NULL, },
};
-@@ -2534,7 +2838,9 @@
+@@ -2528,13 +2830,18 @@
+ /* register all codecs, demux and protocols */
+ avcodec_register_all();
+ avdevice_register_all();
++#if CONFIG_AVFILTER
++ avfilter_register_all();
++#endif
+ av_register_all();
+
+ for(i=0; i<CODEC_TYPE_NB; i++){
avcodec_opts[i]= avcodec_alloc_context2(i);
}
avformat_opts = avformat_alloc_context();
Modified: libavfilter/diffs/02_ffmpeg_filters.diff
==============================================================================
--- libavfilter/diffs/02_ffmpeg_filters.diff Wed Dec 16 13:24:29 2009 (r5542)
+++ libavfilter/diffs/02_ffmpeg_filters.diff Wed Dec 16 13:36:07 2009 (r5543)
@@ -41,7 +41,7 @@ Index: ffmpeg.c
} AVInputStream;
typedef struct AVInputFile {
-@@ -314,6 +332,186 @@
+@@ -314,6 +332,184 @@
static struct termios oldtty;
#endif
@@ -123,8 +123,6 @@ Index: ffmpeg.c
+
+ filt_graph_all = av_mallocz(sizeof(AVFilterGraph));
+
-+ avfilter_register_all();
-+
+ if(!(ist->input_video_filter = avfilter_open(avfilter_get_by_name("buffer"), "src")))
+ return -1;
+ if(!(ist->out_video_filter = avfilter_open(&output_filter, "out")))
@@ -228,7 +226,7 @@ Index: ffmpeg.c
static void term_exit(void)
{
#if HAVE_TERMIOS_H
-@@ -454,6 +652,10 @@
+@@ -454,6 +650,10 @@
allocated_audio_buf_size= allocated_audio_out_size= 0;
av_free(samples);
@@ -239,7 +237,7 @@ Index: ffmpeg.c
if (received_sigterm) {
fprintf(stderr,
"Received signal %d: terminating.\n",
-@@ -883,7 +1085,9 @@
+@@ -883,7 +1083,9 @@
int *frame_size)
{
int nb_frames, i, ret;
@@ -249,7 +247,7 @@ Index: ffmpeg.c
AVFrame *final_picture, *formatted_picture, *resampling_dst, *padding_src;
AVFrame picture_crop_temp, picture_pad_temp;
AVCodecContext *enc, *dec;
-@@ -929,6 +1133,9 @@
+@@ -929,6 +1131,9 @@
if (nb_frames <= 0)
return;
@@ -259,7 +257,7 @@ Index: ffmpeg.c
if (ost->video_crop) {
if (av_picture_crop((AVPicture *)&picture_crop_temp, (AVPicture *)in_picture, dec->pix_fmt, ost->topBand, ost->leftBand) < 0) {
fprintf(stderr, "error cropping picture\n");
-@@ -940,6 +1147,7 @@
+@@ -940,6 +1145,7 @@
} else {
formatted_picture = in_picture;
}
@@ -267,7 +265,7 @@ Index: ffmpeg.c
final_picture = formatted_picture;
padding_src = formatted_picture;
-@@ -966,6 +1174,7 @@
+@@ -966,6 +1172,7 @@
av_exit(1);
}
@@ -275,7 +273,7 @@ Index: ffmpeg.c
if (ost->video_resample) {
padding_src = NULL;
final_picture = &ost->pict_tmp;
-@@ -1013,6 +1222,7 @@
+@@ -1013,6 +1220,7 @@
sws_scale(ost->img_resample_ctx, formatted_picture->data, formatted_picture->linesize,
0, ost->resample_height, resampling_dst->data, resampling_dst->linesize);
}
@@ -283,7 +281,7 @@ Index: ffmpeg.c
if (ost->video_pad) {
av_picture_pad((AVPicture*)final_picture, (AVPicture *)padding_src,
-@@ -1279,6 +1489,10 @@
+@@ -1279,6 +1487,10 @@
static unsigned int samples_size= 0;
AVSubtitle subtitle, *subtitle_to_free;
int got_subtitle;
@@ -294,7 +292,7 @@ Index: ffmpeg.c
AVPacket avpkt;
int bps = av_get_bits_per_sample_format(ist->st->codec->sample_fmt)>>3;
-@@ -1401,6 +1615,15 @@
+@@ -1401,6 +1613,15 @@
&buffer_to_free);
}
@@ -310,7 +308,7 @@ Index: ffmpeg.c
// preprocess audio (volume)
if (ist->st->codec->codec_type == CODEC_TYPE_AUDIO) {
if (audio_volume != 256) {
-@@ -1422,10 +1645,18 @@
+@@ -1422,10 +1643,18 @@
if (pts > now)
usleep(pts - now);
}
@@ -330,7 +328,7 @@ Index: ffmpeg.c
for(i=0;i<nb_ostreams;i++) {
int frame_size;
-@@ -1442,6 +1673,9 @@
+@@ -1442,6 +1671,9 @@
do_audio_out(os, ost, ist, data_buf, data_size);
break;
case CODEC_TYPE_VIDEO:
@@ -340,7 +338,7 @@ Index: ffmpeg.c
do_video_out(os, ost, ist, &picture, &frame_size);
if (vstats_filename && frame_size)
do_video_stats(os, ost, frame_size);
-@@ -1507,7 +1741,17 @@
+@@ -1507,7 +1739,17 @@
av_free_packet(&opkt);
}
}
@@ -358,7 +356,7 @@ Index: ffmpeg.c
av_free(buffer_to_free);
/* XXX: allocate the subtitles in the codec ? */
if (subtitle_to_free) {
-@@ -1961,9 +2205,10 @@
+@@ -1961,9 +2203,10 @@
av_exit(1);
}
@@ -370,7 +368,7 @@ Index: ffmpeg.c
codec->bits_per_raw_sample= 0;
}
ost->resample_height = icodec->height - (frame_topBand + frame_bottomBand);
-@@ -1971,6 +2216,13 @@
+@@ -1971,6 +2214,13 @@
ost->resample_pix_fmt= icodec->pix_fmt;
ost->encoding_needed = 1;
ist->decoding_needed = 1;
@@ -384,7 +382,7 @@ Index: ffmpeg.c
break;
case CODEC_TYPE_SUBTITLE:
ost->encoding_needed = 1;
-@@ -2357,6 +2609,12 @@
+@@ -2357,6 +2607,12 @@
avcodec_close(ist->st->codec);
}
}
@@ -397,7 +395,7 @@ Index: ffmpeg.c
/* finished ! */
ret = 0;
-@@ -3912,6 +4170,9 @@
+@@ -3912,6 +4168,9 @@
{ "psnr", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&do_psnr}, "calculate PSNR of compressed frames" },
{ "vstats", OPT_EXPERT | OPT_VIDEO, {(void*)&opt_vstats}, "dump video coding statistics to file" },
{ "vstats_file", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_vstats_file}, "dump video coding statistics to file", "file" },
@@ -407,3 +405,13 @@ Index: ffmpeg.c
{ "intra_matrix", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_intra_matrix}, "specify intra matrix coeffs", "matrix" },
{ "inter_matrix", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_inter_matrix}, "specify inter matrix coeffs", "matrix" },
{ "top", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_top_field_first}, "top=1/bottom=0/auto=-1 field first", "" },
+@@ -3972,6 +4231,9 @@
+
+ avcodec_register_all();
+ avdevice_register_all();
++#if CONFIG_AVFILTER
++ avfilter_register_all();
++#endif
+ av_register_all();
+
+ #if HAVE_ISATTY
More information about the FFmpeg-soc
mailing list