OSDN Git Service

Merge branch 'master' of git://git.videolan.org/ffmpeg
authoryukihane <yukihane.feather@gmail.com>
Mon, 1 Aug 2011 14:03:44 +0000 (23:03 +0900)
committeryukihane <yukihane.feather@gmail.com>
Mon, 1 Aug 2011 14:03:44 +0000 (23:03 +0900)
Conflicts:
libavfilter/Makefile

1  2 
ffmpeg.c
libavfilter/Makefile
libavfilter/allfilters.c

diff --cc ffmpeg.c
+++ b/ffmpeg.c
@@@ -50,8 -52,8 +52,9 @@@
  # include "libavfilter/avcodec.h"
  # include "libavfilter/avfilter.h"
  # include "libavfilter/avfiltergraph.h"
+ # include "libavfilter/vsink_buffer.h"
  # include "libavfilter/vsrc_buffer.h"
 +# include "libavfilter/avtool.h"
  #endif
  
  #if HAVE_SYS_RESOURCE_H
@@@ -2306,8 -2352,20 +2353,21 @@@ static int transcode(AVFormatContext **
                  ost->encoding_needed = 1;
                  ist->decoding_needed = 1;
  
+                 if (!ost->frame_rate.num)
+                     ost->frame_rate = ist->st->r_frame_rate.num ? ist->st->r_frame_rate : (AVRational){25,1};
+                 if (ost->enc && ost->enc->supported_framerates && !force_fps) {
+                     int idx = av_find_nearest_q_idx(ost->frame_rate, ost->enc->supported_framerates);
+                     ost->frame_rate = ost->enc->supported_framerates[idx];
+                 }
+                 codec->time_base = (AVRational){ost->frame_rate.den, ost->frame_rate.num};
+                 if(   av_q2d(codec->time_base) < 0.001 && video_sync_method
+                    && (video_sync_method==1 || (video_sync_method<0 && !(os->oformat->flags & AVFMT_VARIABLE_FPS)))){
+                     av_log(os, AV_LOG_WARNING, "Frame rate very high for a muxer not effciciently supporting it.\n"
+                                                "Please consider specifiying a lower framerate, a different muxer or -vsync 2\n");
+                 }
  #if CONFIG_AVFILTER
 +                tool_registerInfo(is, recording_time);
                  if (configure_video_filters(ist, ost)) {
                      fprintf(stderr, "Error opening filters!\n");
                      exit(1);
@@@ -128,8 -134,8 +134,11 @@@ OBJS-$(CONFIG_MP_FILTER) += libmpcodecs
  OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/vf_yvu9.o
  OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/pullup.o
  
++OBJS-$(CONFIG_VHEXT_FILTER)                  += avtool.o
++OBJS-$(CONFIG_VHEXT_FILTER)                  += vf_vhext.o
++
  
- -include $(SUBDIR)$(ARCH)/Makefile
+ -include $(SRC_PATH)/$(SUBDIR)$(ARCH)/Makefile
  
  DIRS = x86 libmpcodecs
  
@@@ -78,8 -85,9 +85,11 @@@ void avfilter_register_all(void
      REGISTER_FILTER (FREI0R,      frei0r_src,  vsrc);
      REGISTER_FILTER (MOVIE,       movie,       vsrc);
      REGISTER_FILTER (NULLSRC,     nullsrc,     vsrc);
+     REGISTER_FILTER (RGBTESTSRC,  rgbtestsrc,  vsrc);
+     REGISTER_FILTER (TESTSRC,     testsrc,     vsrc);
  
+     REGISTER_FILTER (BUFFER,      buffersink,  vsink);
      REGISTER_FILTER (NULLSINK,    nullsink,    vsink);
 +
 +    REGISTER_FILTER (VHEXT,       vhext,       vf);
  }