1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

637 Commits

Author SHA1 Message Date
Stefano Sabatini
347ecfdc63 ffplay: move assignment in else block in audio_decode_frame()
Avoid confusing and pointless double assignment of variable
resampled_data_size.
2012-06-29 23:15:45 +02:00
Stefano Sabatini
0d3ffde64f ffplay: split overly long line in audio_decode_frame() 2012-06-29 23:15:45 +02:00
Stefano Sabatini
4fd07b9366 ffplay: avoid useless NULL checks in swr_free()
swr_free() already checks for nullness, no need to add the check in
calling code.
2012-06-29 13:24:57 +02:00
Stefano Sabatini
4674718203 ffplay: fix wrong reference to function in audio_decode_frame() comment
The comment now references swr_convert(), rather than audio_convert(),
which was deprecated and/or dropped.
2012-06-29 13:24:43 +02:00
Stefano Sabatini
7877b50d18 ffplay: simplify code by using avfilter_unref_bufferp() 2012-06-28 22:27:05 +02:00
Stefano Sabatini
b0fdd3489a lavfi: deprecate av_buffersrc_buffer() function
Favor av_buffersrc_add_ref() instead, which is more powerful.
2012-06-28 22:27:05 +02:00
Stefano Sabatini
79a7451d06 ffplay: add configure_filtergraph() helper
Will help factorization with the pending -af patch, and add some checks
missing in the original code.
2012-06-26 11:42:51 +02:00
Stefano Sabatini
8dd0e87d7b lavfi: remove old video sink API
It was deprecated since a long time and removed after the 2->3 major
bump.
2012-06-26 11:40:08 +02:00
Stefano Sabatini
fec512a52c ffplay: give more meaningful names to the buffersink instances 2012-06-25 13:42:53 +02:00
Stefano Sabatini
43583fb85c lavfi/avcodec: deprecate avfilter_fill_frame_from_*_buffer_ref API
Deprecate functions:
avfilter_fill_frame_from_buffer_ref
avfilter_fill_frame_from_audio_buffer_ref
avfilter_fill_frame_from_video_buffer_ref

and schedule to drop them at the next API major bump.

The function avfilter_copy_buf_props() should be used instead.
2012-06-25 13:42:47 +02:00
Stefano Sabatini
39e019e8c1 ffplay: add cast to fix warning in configure_video_filters()
Fix warning:
ffplay.c:1578:40: warning: passing argument 5 of ‘avfilter_graph_create_filter’ discards ‘const’ qualifier from pointer target type [enabled by default]
libavfilter/avfiltergraph.h:84:5: note: expected ‘void *’ but argument is of type ‘const enum PixelFormat *’
2012-06-23 00:42:51 +02:00
Michael Niedermayer
e847f41285 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libspeexenc: add supported sample rates and channel layouts.
  Replace usleep() calls with av_usleep()
  lavu: add av_usleep() function
  utvideo: mark interlaced frames as such
  utvideo: Fix interlaced prediction for RGB utvideo.
  cosmetics: do not use full path for local headers
  lavu/file: include unistd.h only when available
  configure: check for unistd.h
  log: include unistd.h only when needed
  lavf: include libavutil/time.h instead of redeclaring av_gettime()

Conflicts:
	configure
	doc/APIchanges
	ffmpeg.c
	ffplay.c
	libavcodec/utvideo.c
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-22 22:34:02 +02:00
Michael Niedermayer
db83570875 ffplay: fix -vismv 1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
2012-06-17 21:36:58 +02:00
Stefano Sabatini
8f45c3141c ffplay: rename buffer source instance from "src" to "ffplay_buffer"
The new name is more descriptive.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-06-17 20:32:24 +02:00
Stefano Sabatini
251f398798 ffplay: use key=val syntax for the buffersrc args
Fix warning:
[src @ ...] Flat options syntax is deprecated, use key=value pairs.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-06-17 20:32:20 +02:00
Michael Niedermayer
15f8941108 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Avoid C99 variable declarations within for statements.
  rtmp: Read and handle incoming packets while writing data
  doc: document THREAD_TYPE fate variable
  rtpdec: Don't require frames to start with a Mode A packet
  avconv: don't try to free threads that were not initialized.

Conflicts:
	doc/fate.texi
	ffplay.c
	libavdevice/dv1394.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-15 00:14:21 +02:00
Marton Balint
143a5390bf ffplay: fix return value of get_video_frame if avcodec_decode_video fails
Signed-off-by: Marton Balint <cus@passwd.hu>
2012-06-09 19:45:10 +02:00
Michael Niedermayer
cb819338d1 ffplay: reset AVFrame to defaults before decoding each new frame.
This fixes: ffplay -f lavfi -i cellauto
This was a regression since factorizing the filter code with ffmpeg.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
2012-06-08 21:32:10 +02:00
Michael Niedermayer
349b65eee2 ffplay: check return code of avcodec_decode_video2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
2012-06-08 21:32:10 +02:00
Marton Balint
5fdcfdf237 ffplay: fix build if avfilter is disabled
Signed-off-by: Marton Balint <cus@passwd.hu>
2012-06-07 01:22:00 +02:00
Marton Balint
a78bc6f78c ffplay: fix frame_delay calculation in new avfilter code
Signed-off-by: Marton Balint <cus@passwd.hu>
2012-06-07 01:22:00 +02:00
Marton Balint
e85df18d74 ffplay: add support for changing pixel format
With the filtering code refactored, it was much easier to finally fix this.

Fixes ticket 123 and 238.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-06-07 01:22:00 +02:00
Marton Balint
cd947e9a2b ffplay: add missing filt_in assignment after video filter reconfigure
Fixes segfaults on changing resolution.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-06-07 01:22:00 +02:00
Marton Balint
0a501c756f ffplay: fix frame aspect ratio after qatar merge
Signed-off-by: Marton Balint <cus@passwd.hu>
2012-06-07 01:22:00 +02:00
Michael Niedermayer
c9651d4bee ffplay: fix use after free
reproduceable with:
ffmpeg -i tests/lena.pnm -pix_fmt pal8 -vcodec rawvideo -s 512x512 out.avi
valgrind ffplay_g out.avi

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
2012-06-07 01:21:52 +02:00
Marton Balint
1372c826de ffplay: use dummy video driver if display is disabled
Fixes ticket 1402.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-06-07 00:05:29 +02:00
Michael Niedermayer
ad60b3b181 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vorbis: Validate that the floor 1 X values contain no duplicates.
  avprobe: Identify codec probe failures rather than calling them unsupported codecs.
  avformat: Probe codecs at score 0 on buffer exhaustion conditions.
  avformat: Factorize codec probing.
  Indeo Audio decoder
  imc: make IMDCT support stereo output
  imc: move channel-specific data into separate context
  lavfi: remove request/poll and drawing functions from public API on next bump
  lavfi: make avfilter_insert_pad and pals private on next bump.
  lavfi: make formats API private on next bump.
  avplay: use buffersrc instead of custom input filter.
  avtools: move buffer management code from avconv to cmdutils.
  avconv: don't use InputStream in the buffer management code.
  avconv: fix exiting when max frames is reached.
  mpc8: fix maximum bands handling
  aacdec: Turn PS off when switching to stereo and turn it to implicit when switching to mono.

Conflicts:
	Changelog
	cmdutils.h
	ffmpeg.c
	ffplay.c
	ffprobe.c
	libavcodec/avcodec.h
	libavcodec/mpc8.c
	libavcodec/v210dec.h
	libavcodec/version.h
	libavcodec/vorbisdec.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/buffersrc.c
	libavfilter/formats.c
	libavfilter/src_movie.c
	libavfilter/vf_aspect.c
	libavfilter/vf_blackframe.c
	libavfilter/vf_boxblur.c
	libavfilter/vf_crop.c
	libavfilter/vf_cropdetect.c
	libavfilter/vf_delogo.c
	libavfilter/vf_drawbox.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_fifo.c
	libavfilter/vf_format.c
	libavfilter/vf_frei0r.c
	libavfilter/vf_gradfun.c
	libavfilter/vf_hflip.c
	libavfilter/vf_hqdn3d.c
	libavfilter/vf_libopencv.c
	libavfilter/vf_lut.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/vf_select.c
	libavfilter/vf_showinfo.c
	libavfilter/vf_transpose.c
	libavfilter/vf_unsharp.c
	libavfilter/vf_yadif.c
	libavfilter/vsrc_color.c
	libavfilter/vsrc_testsrc.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-06 01:08:33 +02:00
Marton Balint
22505c188c ffplay: calculate audio diff threshold based on the actual settings
Signed-off-by: Marton Balint <cus@passwd.hu>
2012-06-02 21:56:08 +02:00
Marton Balint
0dad529201 ffplay: try more channel count combinations for SDL_OpenAudio
This should fix ticket 1384.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-06-02 21:55:58 +02:00
Marton Balint
7821264c26 ffplay: simplify audio_open, rename parameters to more explanatory names
Signed-off-by: Marton Balint <cus@passwd.hu>
2012-06-02 19:46:00 +02:00
Marton Balint
7342037973 ffplay: remove VideoState from audio_open
Signed-off-by: Marton Balint <cus@passwd.hu>
2012-06-02 19:46:00 +02:00
Marton Balint
e1248f5c52 ffplay: put audio parameters to their own struct
Signed-off-by: Marton Balint <cus@passwd.hu>
2012-06-02 19:46:00 +02:00
Marton Balint
03095d73a3 ffplay: put audio_open into a seperate function
Signed-off-by: Marton Balint <cus@passwd.hu>
2012-06-02 19:45:59 +02:00
Marton Balint
f1a75aa033 ffplay: remove VideoPicture pix_fmt and use frame pixel format instead
VideoPicture pixel format is set at allocation time, therefore it is not
reflecting the proper value.

Fixes files with changing pixel format in the avfilter disabled case.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-05-29 22:41:50 +02:00
Marton Balint
15751e3fdd ffplay: only request 4 or 6 channels from SDL, if SDL version is at least 1.2.8
Signed-off-by: Marton Balint <cus@passwd.hu>
2012-05-29 22:41:50 +02:00
Marton Balint
a6f51de3bf ffplay: add pause audio feature in the middle of a packet
Fixes ticket 215.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-05-29 22:41:50 +02:00
Marton Balint
d872e11300 ffplay: remove VideoPicture duration field
We are not using it.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-05-29 22:41:50 +02:00
Marton Balint
7315e40a24 ffplay: force exit when filter configuration fails
Switching to visualization instead of exiting ffplay is a bit more tricky, so
just exit for now.

Fixes ticket 38.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-05-24 23:48:52 +02:00
Marton Balint
8c9971c35e ffplay: fix stream cycling if audio decoding fails
Fixes ticket 1161.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-05-24 23:48:52 +02:00
Marton Balint
c2e8691c07 ffplay: flush codec buffers before freeing filters
We do this to ensure that input_get_buffer is not called from a
frame_worker_thread of a multithreaded decoder when we already freed the
filters.

Fixes occasional segfaults on video stream change.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-05-24 23:48:52 +02:00
Marton Balint
a687acbbf0 ffplay: dont destroy packet queues on stream change
This fixes occasional segfaults caused by lock request of the packet queue from
the reader thread.

Also don't allow to put frames into the queue when it's aborted, and don't try
to fill the queue with frames when it is aborted.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-05-24 23:48:51 +02:00
Michael Niedermayer
afe4d3bd54 ffplay: set base in dr1 allocation.
This matches the default non dr1 allocator

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-24 18:40:49 +02:00
Michael Niedermayer
4b5ff9b63e ffplay: Use input picture parameters in input_request_frame().
Fixes Ticket122

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-20 16:29:08 +02:00
Marton Balint
825ec16da9 ffplay: put aspect ratio info to the VideoPicture struct
Also use av_guess_sample_aspect_ratio for determining aspect ratio of the video
frame if not using avfilter.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-05-15 00:31:56 +02:00
Marton Balint
843509e264 ffplay: use AVFrame::width and height instead of using codec or filter settings
Codec values may not reflect the actual frame size, and it also enables us to
simplify code in the avfilter enabled and the avfilter disabled case.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-05-15 00:31:56 +02:00
Marton Balint
84087b243e ffplay: use stream sample_aspect_ratio if available in source frames
When we are using filter chains we have to set the aspect ratio of the source
to the best known value, we use the av_guess_sample_aspect_ratio function to
determine that.

Fixes ticket 1228.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-05-15 00:31:55 +02:00
Marton Balint
89080a0a5e ffplay: fix video_thread when no frame is returned in get_video_frame
Affects only ffplay build with avfilter disabled.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-05-15 00:31:55 +02:00
Michael Niedermayer
61930bd0d7 Merge remote-tracking branch 'qatar/master'
* qatar/master: (27 commits)
  libxvid: Give more suitable names to libxvid-related files.
  libxvid: Separate libxvid encoder from libxvid rate control code.
  jpeglsdec: Remove write-only variable in ff_jpegls_decode_lse().
  fate: cosmetics: lowercase some comments
  fate: Give more consistent names to some RealVideo/RealAudio tests.
  lavfi: add avfilter_get_audio_buffer_ref_from_arrays().
  lavfi: add extended_data to AVFilterBuffer.
  lavc: check that extended_data is properly set in avcodec_encode_audio2().
  lavc: pad last audio frame with silence when needed.
  samplefmt: add a function for filling a buffer with silence.
  samplefmt: add a function for copying audio samples.
  lavr: do not try to copy to uninitialized output audio data.
  lavr: make avresample_read() with NULL output discard samples.
  fate: split idroq audio and video into separate tests
  fate: improve dependencies
  fate: add convenient shorthands for ea-vp6, libavcodec, libavutil tests
  fate: split some combined tests into separate audio and video tests
  fate: fix dependencies for probe tests
  mips: intreadwrite: fix inline asm for gcc 4.8
  mips: intreadwrite: remove unnecessary inline asm
  ...

Conflicts:
	cmdutils.h
	configure
	doc/APIchanges
	doc/filters.texi
	ffmpeg.c
	ffplay.c
	libavcodec/internal.h
	libavcodec/jpeglsdec.c
	libavcodec/libschroedingerdec.c
	libavcodec/libxvid.c
	libavcodec/libxvid_rc.c
	libavcodec/utils.c
	libavcodec/version.h
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/buffersink.h
	tests/Makefile
	tests/fate/aac.mak
	tests/fate/audio.mak
	tests/fate/demux.mak
	tests/fate/ea.mak
	tests/fate/image.mak
	tests/fate/libavutil.mak
	tests/fate/lossless-audio.mak
	tests/fate/lossless-video.mak
	tests/fate/microsoft.mak
	tests/fate/qt.mak
	tests/fate/real.mak
	tests/fate/screen.mak
	tests/fate/video.mak
	tests/fate/voice.mak
	tests/fate/vqf.mak
	tests/ref/fate/ea-mad
	tests/ref/fate/ea-tqi

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-10 02:25:41 +02:00
Nicolas George
234e00259b ffplay: use AVFrame accessor. 2012-05-03 18:47:16 +02:00
Michael Niedermayer
75f847aa6b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avplay: use libavresample for sample format conversion and channel mixing
  Fix compilation with YASM/NASM without AVX support.
  WMAL: do not output last frame again if nothing was decoded in current packet
  WMAL: do not start decoding if frame does not end in current packet
  adpcm-thp: fix invalid array indexing
  ppc: add const where needed in scalarproduct_int16_altivec()
  ppc: remove shift parameter from scalarproduct_int16_altivec()
  ppc: dsputil: do unaligned block accesses correctly
  dvenc: do not call dsputil functions with stride not a multiple of 16
  APIchanges: fill in some dates and commit hashes

Conflicts:
	doc/APIchanges
	ffplay.c
	libavcodec/adpcm.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-01 22:06:55 +02:00