Browse Source

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  rtmp: Add a new option 'rtmp_buffer', for setting the client buffer time
  rtmp: Set the client buffer time to 3s instead of 0.26s
  rtmp: Handle server bandwidth packets
  rtmp: Display a verbose message when an unknown packet type is received
  lavfi/audio: use av_samples_copy() instead of custom code.
  configure: add all filters hardcoded into avconv to avconv_deps
  avfiltergraph: remove a redundant call to avfilter_get_by_name().
  lavfi: allow building without swscale.
  build: Do not delete tests/vsynth2 directory, which is no longer created.
  lavfi: replace AVFilterContext.input/output_count with nb_inputs/outputs
  lavfi: make AVFilterPad opaque after two major bumps.
  lavfi: add avfilter_pad_get_type() and avfilter_pad_get_name().
  lavfi: make avfilter_get_video_buffer() private on next bump.
  jack: update to new latency range API as the old one has been deprecated
  rtmp: Tokenize the AMF connection parameters manually instead of using strtok_r
  ppc: Rename H.264 optimization template file for consistency.
  lavfi: add channelsplit audio filter.
  golomb: check remaining bits during unary decoding in get_ur_golomb_jpegls()
  sws: fix planar RGB input conversions for 9/10/16 bpp.

Conflicts:
	Changelog
	configure
	doc/APIchanges
	ffmpeg.c
	libavcodec/golomb.h
	libavcodec/v210dec.h
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavfilter/asrc_anullsrc.c
	libavfilter/audio.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/avfiltergraph.c
	libavfilter/buffersrc.c
	libavfilter/formats.c
	libavfilter/version.h
	libavfilter/vf_frei0r.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/video.h
	libavfilter/vsrc_color.c
	libavformat/rtmpproto.c
	libswscale/input.c
	tests/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Michael Niedermayer 12 years ago
parent
commit
c7b9eab2be

+ 0 - 1
.gitignore

@@ -50,7 +50,6 @@ tests/rotozoom
 tests/tiny_psnr
 tests/videogen
 tests/vsynth1
-tests/vsynth2
 tools/aviocat
 tools/cws2fws
 tools/ffeval

+ 1 - 0
Changelog

@@ -5,6 +5,7 @@ version next:
 - INI and flat output in ffprobe
 - Scene detection in libavfilter
 - Indeo Audio decoder
+- channelsplit audio filter
 
 
 version 0.11:

+ 3 - 2
configure

@@ -1210,6 +1210,7 @@ HAVE_LIST="
     inet_aton
     inline_asm
     isatty
+    jack_port_get_latency_range
     kbhit
     ldbrx
     libdc1394_1
@@ -1730,7 +1731,6 @@ yadif_filter_deps="gpl"
 
 # libraries
 avdevice_deps="avcodec avformat"
-avfilter_deps="swscale"
 avformat_deps="avcodec"
 postproc_deps="gpl"
 
@@ -3354,7 +3354,8 @@ check_header soundcard.h
 
 enabled_any alsa_indev alsa_outdev && check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound
 
-enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack && check_func sem_timedwait
+enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack && check_func sem_timedwait &&
+    check_func jack_port_get_latency_range -ljack
 
 enabled_any sndio_indev sndio_outdev && check_lib2 sndio.h sio_open -lsndio
 

+ 9 - 0
doc/APIchanges

@@ -38,6 +38,15 @@ API changes, most recent first:
 2012-03-26 - a67d9cf - lavfi 2.66.100
   Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions.
 
+2012-xx-xx - xxxxxxx - lavfi 2.23.0 - avfilter.h
+  Add AVFilterContext.nb_inputs/outputs. Deprecate
+  AVFilterContext.input/output_count.
+
+2012-xx-xx - xxxxxxx - lavfi 2.22.0 - avfilter.h
+  Add avfilter_pad_get_type() and avfilter_pad_get_name(). Those
+  should now be used instead of accessing AVFilterPad members
+  directly.
+
 2012-xx-xx - xxxxxxx - lavu 51.32.0 - audioconvert.h
   Add av_get_channel_layout_channel_index(), av_get_channel_name()
   and av_channel_layout_extract_channel().

+ 25 - 0
doc/filters.texi

@@ -576,6 +576,31 @@ Maximum compensation in samples per second.
 
 @end table
 
+@section channelsplit
+Split each channel in input audio stream into a separate output stream.
+
+This filter accepts the following named parameters:
+@table @option
+@item channel_layout
+Channel layout of the input stream. Default is "stereo".
+@end table
+
+For example, assuming a stereo input MP3 file
+@example
+ffmpeg -i in.mp3 -filter_complex channelsplit out.mkv
+@end example
+will create an output Matroska file with two audio streams, one containing only
+the left channel and the other the right channel.
+
+To split a 5.1 WAV file into per-channel files
+@example
+ffmpeg -i in.wav -filter_complex
+'channelsplit=channel_layout=5.1[FL][FR][FC][LFE][SL][SR]'
+-map '[FL]' front_left.wav -map '[FR]' front_right.wav -map '[FC]'
+front_center.wav -map '[LFE]' lfe.wav -map '[SL]' side_left.wav -map '[SR]'
+side_right.wav
+@end example
+
 @section resample
 Convert the audio sample format, sample rate and channel layout. This filter is
 not meant to be used directly.

+ 3 - 0
doc/protocols.texi

@@ -228,6 +228,9 @@ Additionally, the following parameters can be set via command line options
 Name of application to connect on the RTMP server. This option
 overrides the parameter specified in the URI.
 
+@item rtmp_buffer
+Set the client buffer time in milliseconds. The default is 3000.
+
 @item rtmp_conn
 Extra arbitrary AMF connection parameters, parsed from a string,
 e.g. like @code{B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0}.

+ 8 - 6
ffmpeg.c

@@ -708,7 +708,7 @@ static FilterGraph *init_simple_filtergraph(InputStream *ist, OutputStream *ost)
 static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
 {
     InputStream *ist = NULL;
-    enum AVMediaType type = in->filter_ctx->input_pads[in->pad_idx].type;
+    enum AVMediaType type = avfilter_pad_get_type(in->filter_ctx->input_pads, in->pad_idx);
     int i;
 
     // TODO: support other filter types
@@ -978,7 +978,7 @@ static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter,
                                                                    \
     avio_printf(pb, "%s", ctx->filter->name);                      \
     if (nb_pads > 1)                                               \
-        avio_printf(pb, ":%s", pads[inout->pad_idx].name);         \
+        avio_printf(pb, ":%s", avfilter_pad_get_name(pads, inout->pad_idx));\
     avio_w8(pb, 0);                                                \
     avio_close_dyn_buf(pb, &f->name);                              \
 }
@@ -988,7 +988,7 @@ static int configure_output_filter(FilterGraph *fg, OutputFilter *ofilter, AVFil
     av_freep(&ofilter->name);
     DESCRIBE_FILTER_LINK(ofilter, out, 0);
 
-    switch (out->filter_ctx->output_pads[out->pad_idx].type) {
+    switch (avfilter_pad_get_type(out->filter_ctx->output_pads, out->pad_idx)) {
     case AVMEDIA_TYPE_VIDEO: return configure_output_video_filter(fg, ofilter, out);
     case AVMEDIA_TYPE_AUDIO: return configure_output_audio_filter(fg, ofilter, out);
     default: av_assert0(0);
@@ -1132,7 +1132,7 @@ static int configure_input_filter(FilterGraph *fg, InputFilter *ifilter,
     av_freep(&ifilter->name);
     DESCRIBE_FILTER_LINK(ifilter, in, 1);
 
-    switch (in->filter_ctx->input_pads[in->pad_idx].type) {
+    switch (avfilter_pad_get_type(in->filter_ctx->input_pads, in->pad_idx)) {
     case AVMEDIA_TYPE_VIDEO: return configure_input_video_filter(fg, ifilter, in);
     case AVMEDIA_TYPE_AUDIO: return configure_input_audio_filter(fg, ifilter, in);
     default: av_assert0(0);
@@ -4899,7 +4899,8 @@ static void init_output_filter(OutputFilter *ofilter, OptionsContext *o,
 {
     OutputStream *ost;
 
-    switch (ofilter->out_tmp->filter_ctx->output_pads[ofilter->out_tmp->pad_idx].type) {
+    switch (avfilter_pad_get_type(ofilter->out_tmp->filter_ctx->output_pads,
+                                  ofilter->out_tmp->pad_idx)) {
     case AVMEDIA_TYPE_VIDEO: ost = new_video_stream(o, oc, -1); break;
     case AVMEDIA_TYPE_AUDIO: ost = new_audio_stream(o, oc, -1); break;
     default:
@@ -4961,7 +4962,8 @@ static void opt_output_file(void *optctx, const char *filename)
             if (!ofilter->out_tmp || ofilter->out_tmp->name)
                 continue;
 
-            switch (ofilter->out_tmp->filter_ctx->output_pads[ofilter->out_tmp->pad_idx].type) {
+            switch (avfilter_pad_get_type(ofilter->out_tmp->filter_ctx->output_pads,
+                                          ofilter->out_tmp->pad_idx)) {
             case AVMEDIA_TYPE_VIDEO:    o->video_disable    = 1; break;
             case AVMEDIA_TYPE_AUDIO:    o->audio_disable    = 1; break;
             case AVMEDIA_TYPE_SUBTITLE: o->subtitle_disable = 1; break;

+ 2 - 2
libavcodec/ppc/h264_altivec.c

@@ -39,7 +39,7 @@
 #define PREFIX_h264_qpel16_v_lowpass_num       altivec_put_h264_qpel16_v_lowpass_num
 #define PREFIX_h264_qpel16_hv_lowpass_altivec  put_h264_qpel16_hv_lowpass_altivec
 #define PREFIX_h264_qpel16_hv_lowpass_num      altivec_put_h264_qpel16_hv_lowpass_num
-#include "h264_template_altivec.c"
+#include "h264_altivec_template.c"
 #undef OP_U8_ALTIVEC
 #undef PREFIX_h264_chroma_mc8_altivec
 #undef PREFIX_h264_chroma_mc8_num
@@ -59,7 +59,7 @@
 #define PREFIX_h264_qpel16_v_lowpass_num       altivec_avg_h264_qpel16_v_lowpass_num
 #define PREFIX_h264_qpel16_hv_lowpass_altivec  avg_h264_qpel16_hv_lowpass_altivec
 #define PREFIX_h264_qpel16_hv_lowpass_num      altivec_avg_h264_qpel16_hv_lowpass_num
-#include "h264_template_altivec.c"
+#include "h264_altivec_template.c"
 #undef OP_U8_ALTIVEC
 #undef PREFIX_h264_chroma_mc8_altivec
 #undef PREFIX_h264_chroma_mc8_num

+ 0 - 0
libavcodec/ppc/h264_template_altivec.c → libavcodec/ppc/h264_altivec_template.c


+ 2 - 2
libavcodec/ppc/vc1dsp_altivec.c

@@ -325,13 +325,13 @@ static void vc1_inv_trans_8x4_altivec(uint8_t *dest, int stride, DCTELEM *block)
 
 #define OP_U8_ALTIVEC                          PUT_OP_U8_ALTIVEC
 #define PREFIX_no_rnd_vc1_chroma_mc8_altivec   put_no_rnd_vc1_chroma_mc8_altivec
-#include "h264_template_altivec.c"
+#include "h264_altivec_template.c"
 #undef OP_U8_ALTIVEC
 #undef PREFIX_no_rnd_vc1_chroma_mc8_altivec
 
 #define OP_U8_ALTIVEC                          AVG_OP_U8_ALTIVEC
 #define PREFIX_no_rnd_vc1_chroma_mc8_altivec   avg_no_rnd_vc1_chroma_mc8_altivec
-#include "h264_template_altivec.c"
+#include "h264_altivec_template.c"
 #undef OP_U8_ALTIVEC
 #undef PREFIX_no_rnd_vc1_chroma_mc8_altivec
 

Some files were not shown because too many files changed in this diff