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

545 Commits

Author SHA1 Message Date
Stefano Sabatini
26513856d6 cmdutils: remove OPT_FUNC2
Make ff* tools only accept opt_* functions taking two arguments.

The distinction between functions with one and two arguments is quite
pointless. Simplify parse_options() code.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-28 09:40:19 -04:00
Michael Niedermayer
027264cb82 Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits)
  ARM: add ARMv6 optimised av_clip_uintp2
  ARM: remove volatile from asm statements in libavutil/intmath
  ARM: fix av_clipl_int32_arm()
  v4l: include avdevice.h
  ffserver: move close_connection() call to avoid a temporary string and copy.
  lavf: initialize demuxer private options.
  AVOptions: set string default values.
  lavdevice: mark v4l for removal on next major bump.
  swscale: fix compile on ppc.
  swscale: fix compile on x86-32.
  build: Remove generated .version file on distclean.
  configure: Add -D_GNU_SOURCE to CPPFLAGS on OS/2.
  doc: Drop hint at --enable-memalign-hack for MinGW, it is now autodetected.
  ffplay: Remove disabled code.
  Mark parameterless function declarations as 'void'.
  swscale: use av_clip_uint8() in yuv2yuv1_c().
  swscale: remove VOF/VOFW.
  swscale: split chroma buffers into separate U/V planes.
  swscale: replace formatConvBuffer[VOF] by allocated array.
  rgb2rgb: remove duplicate mmx/mmx2/3dnow/sse2 functions.
  ...

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-27 02:53:21 +02:00
Diego Biurrun
6c6c976fa9 ffplay: Remove disabled code. 2011-05-26 16:26:17 +02:00
Justin Ruggles
bc778a0cea Add support for request_sample_format in ffmpeg and ffplay. 2011-05-18 17:27:06 -04:00
Stefano Sabatini
3a7c977417 ffplay: remove audio_write_get_buf_size() forward declaration
Move up the definition of audio_write_get_buf_size(), so that it is
defined before it is used. Simplify.
(cherry picked from commit 8776f3d22e)
2011-05-16 14:13:03 -07:00
Michael Niedermayer
72153419b5 Merge remote branch 'qatar/master'
* qatar/master: (33 commits)
  rtpdec_qdm2: Don't try to parse data packet if no configuration is received
  ac3enc: put the counting of stereo rematrixing bits in the same place to make the code easier to understand.
  ac3enc: clean up count_frame_bits() and count_frame_bits_fixed()
  mpegvideo: make FF_DEBUG_DCT_COEFF output coeffs via av_log() instead of just via AVFrame.
  srtdec: make sure we don't write past the end of buffer
  wmaenc: improve channel count and bitrate error handling in encode_init()
  matroskaenc: make sure we don't produce invalid file with no codec ID
  matroskadec: check that pointers were initialized before accessing them
  lavf: fix function name in compute_pkt_fields2 av_dlog message
  lavf: fix av_find_best_stream when providing a wanted stream.
  lavf: fix av_find_best_stream when decoder_ret is given and using a related stream.
  ffmpeg: factorize quality calculation
  tiff: add support for SamplesPerPixel tag in tiff_decode_tag()
  tiff: Prefer enum TiffCompr over int for TiffContext.compr.
  mov: Support edit list atom version 1.
  configure: Enable libpostproc automatically if GPL code is enabled.
  Cosmetics: fix prototypes in oggdec
  oggdec: fix memleak with continuous streams.
  matroskaenc: add missing new line in av_log() call
  dnxhdenc: add AVClass in private context.
  ...

swscale changes largely rewritten by me or replaced by baptsites due to lots of bugs in ronalds code.
Above code is also just in case its not obvios to a large extended duplicates that where cherry picked
from ffmpeg.

Conflicts:
	configure
	ffmpeg.c
	libavformat/matroskaenc.c
	libavutil/pixfmt.h
	libswscale/ppc/swscale_template.c
	libswscale/swscale.c
	libswscale/swscale_template.c
	libswscale/utils.c
	libswscale/x86/swscale_template.c
	tests/fate/h264.mak
	tests/ref/lavfi/pixdesc_le
	tests/ref/lavfi/pixfmts_copy_le
	tests/ref/lavfi/pixfmts_null_le
	tests/ref/lavfi/pixfmts_scale_le
	tests/ref/lavfi/pixfmts_vflip_le

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-13 04:40:40 +02:00
Diego Biurrun
046f081b46 configure: Do not unconditionally add -D_POSIX_C_SOURCE to CPPFLAGS.
Adding _POSIX_C_SOURCE to CPPFLAGS globally produces all sorts of problems
since it causes certain system functions to be hidden on some (BSD) systems.
The solution is to only add the flag on systems that really require it, i.e.
glibc-based ones.

This change makes BSD systems compile out-of-the-box without the need for
adding specific flags manually.  It also allows dropping a number of flags
set manually on a file-per-file basis, but were only present to work around
breakage introduced by the presence of _POSIX_C_SOURCE.

Also add _XOPEN_SOURCE to CPPFLAGS for glibc systems.  We use XSI extensions
in several places already, so it is preferable to define it globally instead
of littering source files with individual #defines only needed for glibc.
2011-05-12 11:41:59 +02:00
Benjamin Larsson
91199cfe55 ffplay: add a dummy option -i so that it is easy to switch between ffmpeg -i "file" and ffplay -i "file".
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-11 07:32:36 +02:00
Oskar Arvidsson
6e3ef511d7 Add the notion of pixel size in h264 related functions.
In high bit depth the pixels will not be stored in uint8_t like in the
normal case, but in uint16_t. The pixel size is thus 1 in normal bit
depth and 2 in high bit depth.

Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:33 -04:00
Michael Niedermayer
99119bdffe ffplay: fix null pointer read when codec unavilable.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 20:03:04 +02:00
Stefano Sabatini
566666caf3 lavfi: add libavfilter/avcodec.h and avfilter_copy_frame_props()
avfilter_copy_frame_props() avoids code duplication and increases
robustness.

The added files libavfilter/avcodec.[ch] are used for containing
utilities useful for gluing togheter libavfilter and libavcodec.
2011-05-07 12:03:49 +02:00
Michael Niedermayer
175714c0c3 ffplay: set CODEC_FLAG_EMU_EDGE earlier
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-05 15:35:54 +02:00
alexandru_mg3
b93e12fdf4 ffplay: fix memleak if avfilter is disabled 2011-05-05 01:42:53 +02:00
Michael Niedermayer
705c65208a ffplay: removed unused variable channels.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-04 23:33:59 +02:00
Stefano Sabatini
301183d9be replace deprecated av_get_pict_type_char() with av_get_picture_type_char() 2011-05-02 16:41:35 +02:00
Stefano Sabatini
6209669de4 Replace deprecated av_get_pict_type_char() with av_get_picture_type_char().
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-02 11:24:45 +02:00
Michael Niedermayer
c92a9d069e ffplay: demuxer specific options support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-02 02:58:09 +02:00
Stefano Sabatini
35fe66abbc lavfi: rename AVFilterBufferRefVideoProps.pixel_aspect to sample_aspect_ratio
Improve consistency with libavcodec.

This breaks libavfilter API/ABI.

The non-sequential 2.1.0 -> 2.4.0 bump is due to the mess previously
done with the lavfi minor number.
2011-05-01 13:10:18 +02:00
Stefano Sabatini
77e9dee8ae lavc: add a sample_aspect_ratio field to AVFrame
The sample aspect ratio is a per-frame property, so it makes sense to
define it in AVFrame rather than in the codec/stream context.
Simplify application-level sample aspect ratio information extraction,
and allow further simplifications.
2011-05-01 13:10:06 +02:00
Stefano Sabatini
1ba5727242 lavc: add a pkt_pos field to AVFrame
This is similar to what was done with pkt_pts. This simplifies the
operation of extracting the pos information from the AVPacket, and
allows further simplifications.
2011-05-01 13:09:58 +02:00
Diego Biurrun
045dd4b928 Replace some commented-out debug printf() / av_log() messages with av_dlog(). 2011-04-29 17:27:01 +02:00
Stefano Sabatini
c2606259de ffplay: move output_picture() code to queue_picture()
Move output_picture() code to queue_picture(), and remove it.
Simplify code path.
2011-04-27 11:31:10 +02:00
Stefano Sabatini
4a22ea4da1 ffplay: rename video_refresh_timer() to video_refresh()
The new name is shorter and less confusing.
2011-04-27 11:26:53 +02:00
Stefano Sabatini
8adf9bb2cb ffplay: rename decode_thread to read_thread, parse_tid to read_tid
The new names are less misleading and more reciprocally consistent.
2011-04-27 11:25:11 +02:00
Stefano Sabatini
1d6c82d405 ffplay: fix logic for selecting the show mode in case of missing video
Also automatically select the show mode only if not specified by the
user.

Fix trac issue #109.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-25 22:45:17 +02:00
Stefano Sabatini
54ad8e06f4 ffplay: name ShowMode enum
Help debugging with GDB, maybe cleaner/safer.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-25 22:45:12 +02:00
Stefano Sabatini
69f58958ce ffplay: avoid SIGFPE exception in SDL_DisplayYUVOverlay
In video_image_display(), fix exception occurring when the size of the
rectangle passed to SDL_DisplayYUVOverlay() is 0x0, which happens when
interactively resizing the SDL window.
This is done by forcing the minimum size to 1x1.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-24 23:10:26 +02:00
Michael Niedermayer
7b376b398a Merge remote branch 'qatar/master'
* qatar/master:
  Handle unicode file names on windows
  rtp: Rename the open/close functions to alloc/free
  Lowercase all ff* program names.
  Refer to ff* tools by their lowercase names.
NOT Pulled  Replace more FFmpeg instances by Libav or ffmpeg.
  Replace `` by $() syntax in shell scripts.
  patcheck: Allow overiding grep program(s) through environment variables.
NOT Pulled  Remove stray libavcore and _g binary references.
  vorbis: Rename decoder/encoder files to follow general file naming scheme.
  aacenc: Fix whitespace after last commit.
  cook: Fix small typo in av_log_ask_for_sample message.
  aacenc: Finish 3GPP psymodel analysis for non mid/side cases.
  Remove RDFT dependency from AAC decoder.
  Add some debug log messages to AAC extradata
  Fix mov debug (u)int64_t format strings.
  bswap: use native types for av_bwap16().
  doc: FLV muxing is supported.
  applehttp: Handle AES-128 encrypted streams
  Add a protocol handler for AES CBC decryption with PKCS7 padding
  doc: Mention that DragonFly BSD requires __BSD_VISIBLE set

Conflicts:
	ffplay.c
	ffprobe.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-24 03:41:22 +02:00
Diego Biurrun
89b503b55f Lowercase all ff* program names. 2011-04-23 19:12:24 +02:00
Stefano Sabatini
539647c6ff ffplay: factorize code calling output_packet() in video_thread()
Slightly simplify.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-23 12:49:04 +02:00
Stefano Sabatini
c632a1c205 ffplay: remove reference to unused QETimer symbol
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-23 12:48:55 +02:00
Stefano Sabatini
ab7fdbab00 ffplay: rename stream_pause() to stream_toggle_pause()
The new name is less misleading, since the function will resume the
stream if it is currently paused.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-23 12:48:48 +02:00
Michael Niedermayer
efb5fa79f5 Merge remote branch 'qatar/master'
* qatar/master: (37 commits)
  In avcodec_open(), set return code to an error value only when an error occurs instead of unconditionally at the start of the function.
  lavc: remove reference to opt.h from Makefile.
  prefer avio_check() over url_exist()
  avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
  lavu: remove misc disabled cruft
  lavu: remove FF_API_OLD_IMAGE_NAMES cruft
NOT PULLED  lavu: remove FF_API_OLD_EVAL_NAMES cruft
  lavc: remove misc disabled cruft.
  lavc: remove the FF_API_INOFFICIAL cruft.
  lavc: remove the FF_API_SET_STRING_OLD cruft.
  lavc: remove the FF_API_USE_LPC cruft.
  lavc: remove the FF_API_SUBTITLE_OLD cruft.
  lavc: remove the FF_API_VIDEO_OLD cruft.
  lavc: remove the FF_API_AUDIO_OLD cruft.
  lavc: remove the FF_API_OPT_SHOW cruft.
  lavc: remove the FF_API_MM_FLAGS cruft.
  lavf: remove misc disabled cruft.
  lavf: remove FF_API_INDEX_BUILT cruft
  lavf: remove FF_API_URL_CLASS cruft.
  lavf: remove FF_API_SYMVER cruft
  ...

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-20 04:48:23 +02:00
Anton Khirnov
41d0eb1c81 lavc: remove the FF_API_SET_STRING_OLD cruft. 2011-04-19 18:41:00 +02:00
Stefano Sabatini
f521746b83 ffplay: implement -showmode option
The new option allows to select the starting show mode.
2011-04-13 10:06:27 +02:00
Stefano Sabatini
f8b8c694e9 ffplay: use symbolic constant values for show_audio
Also rename VideoState->show_audio to show_mode.
Improve readability.
2011-04-13 10:06:27 +02:00
Stefano Sabatini
8776f3d22e ffplay: remove audio_write_get_buf_size() forward declaration
Move up the definition of audio_write_get_buf_size(), so that it is
defined before it is used. Simplify.
2011-04-13 10:06:27 +02:00
Stefano Sabatini
a6f395d6c5 ffplay: avoid unnecessary intermediary struct in queue_picture()
When CONFIG_AVFILTER, use a AVFrame -> AVPicture cast rather than
explicitely copy the image information from AVFrame to a new
AVPicture.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-13 10:06:27 +02:00
Stefano Sabatini
c1d4bb5731 ffplay: remove unused field VideoState.dtg_active_format
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-13 10:06:27 +02:00
Carl Eugen Hoyos
05d33d8655 Fix compilation with --disable-avfilter. 2011-04-13 09:58:31 +02:00
Stefano Sabatini
df149f6ce8 ffplay: fix weird brace placement in video_image_display()
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-12 01:37:00 +02:00
Stefano Sabatini
3338be24e8 ffplay: rename output_picture2() to output_picture()
The "2" suffix is confusing.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-12 01:37:00 +02:00
Stefano Sabatini
1979d3b8a5 ffplay: remove useless intermediary variable dst_pix_fmt in queue_picture()
Simplify.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-12 01:37:00 +02:00
Stefano Sabatini
eef1696628 ffplay: avoid forward declaration for packet_queue_put()
Define the function before it is used. Simplify.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-12 01:37:00 +02:00
Stefano Sabatini
91b27e49d6 ffplay: compact expression in compute_mod()
Prefer "return X ? Y : Z" over "if (x) return Y; else return Z",
reduce line count.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-12 01:23:43 +02:00
Oskar Arvidsson
dc172ecc6e Add the notion of pixel size in h264 related functions.
In high bit depth the pixels will not be stored in uint8_t like in the
normal case, but in uint16_t. The pixel size is thus 1 in normal bit
depth and 2 in high bit depth.

Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-10 22:33:41 +02:00
Michael Niedermayer
c88caa522c Merge remote branch 'qatar/master'
* qatar/master:
  proto: include os_support.h in network.h
  matroskaenc: don't write an empty Cues element.
  lavc: add a FF_API_REQUEST_CHANNELS deprecation macro
  avio: move extern url_interrupt_cb declaration from avio.h to url.h
  avio: make av_register_protocol2 internal.
  avio: avio_ prefix for url_set_interrupt_cb.
  avio: AVIO_ prefixes for URL_ open flags.
  proto: introduce listen option in tcp
  doc: clarify configure features
  proto: factor ff_network_wait_fd and use it on udp

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-08 02:50:13 +02:00
Michael Niedermayer
f6d71b3942 ffplay: Set EMU_EDGE if dr1, this is an alternative fix for ticket40.
Idea borrowed from mplayer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-08 00:20:18 +02:00
Anton Khirnov
80c6e238b0 avio: avio_ prefix for url_set_interrupt_cb. 2011-04-07 18:11:24 +02:00
Michael Niedermayer
9f8008a981 move image check down in ffplay.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-07 01:48:47 +02:00
Michael Niedermayer
454fab721a Disable dr1 in ffplay for svq1 (fixes ticket40)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-06 23:46:37 +02:00
Michael Niedermayer
8bce71dff5 Check sizes a bit in ffplay, cant hurt.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-06 23:39:57 +02:00
Martin Storsjö
648c79624f ffplay: Don't assume ic->pb is non-null
This fixes crashes on exit when plaing some RealRTSP streams
(among other), e.g.
rtsp://dl.lib.brown.edu:554/areserves/1093545294660883.mp3.
These crashes have been present since 3e68b3ba7b.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-21 15:08:09 -04:00
Stefano Sabatini
c743a5e287 ffplay: add braces around union definition
Fix warning:
ffplay.c: At top level:
ffplay.c:3027: warning: missing braces around initializer
ffplay.c:3027: warning: (near initialization for ‘options[53].u’)
2011-03-19 17:30:35 +01:00
Stefano Sabatini
eb4d1cb90e ffplay: add existence check on ic->pb in decode_thread()
Fix crash if ic->pb is NULL and ic->pb->error is evaluated. This
happens for example with: ffplay photo.jpeg.
2011-03-19 17:30:35 +01:00
Mans Rullgard
2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Michael Niedermayer
6947b0c42e Merge remote-tracking branch 'newdev/master'
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-15 16:48:42 +01:00
Anton Khirnov
3e68b3ba7b avio: deprecate url_ferror
AVIOContext.error should be used directly instead.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-15 08:04:28 -04:00
Michael Niedermayer
0b82612d35 ffplay: Continue if the file was appended to.
This is a bit experimental

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-10 19:57:45 +01:00
Benjamin Larsson
76d4c1676f Add a dummy option -i to ffplay so that it is easy to switch between ffmpeg -i "file" and ffplay -i "file".
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-08 17:34:02 +01:00
Anton Khirnov
db44ea960d avio: avio_ prefix for url_fsize
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 76aa876e69)
2011-03-08 02:09:21 +01:00
Anton Khirnov
66e5b1df36 avio: deprecate url_feof
AVIOContext.eof_reached should be used directly instead.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 17:20:31 -05:00
Anton Khirnov
76aa876e69 avio: avio_ prefix for url_fsize
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 11:03:39 -05:00
Anton Khirnov
384c9c2fa7 avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit a2704c9712)
2011-03-05 02:29:31 +01:00
Anton Khirnov
a2704c9712 avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-04 11:26:57 -05:00
Anton Khirnov
0ebf475494 lavf: add av_ prefix to dump_format()
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 610219a598)
2011-02-18 19:52:28 +01:00
Anton Khirnov
610219a598 lavf: add av_ prefix to dump_format()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-16 23:39:56 +00:00
Reinhard Tartler
7ffe76e540 Merge libavcore into libavutil
Done to keep ABI compatible. Otherwise this is just silly
2011-02-16 23:00:30 +01:00
Reinhard Tartler
737eb5976f Merge libavcore into libavutil
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-02-15 16:18:21 +01:00
Stefano Sabatini
9d375bf5ec Remove disabled legacy code in ffplay.
The code was setting aspect ratio from the DTG active format, and was
present and disabled since the creation of ffplay.

See thread:
Subject: [FFmpeg-devel] [PATCH] Cosmetics: adopt compact notation in
        disabled code.
Date: Sat, 12 Feb 2011 18:46:19 +0100

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit b7ec5cc401)
2011-02-14 23:58:21 +01:00
Stefano Sabatini
b7ec5cc401 Remove disabled legacy code in ffplay.
The code was setting aspect ratio from the DTG active format, and was
present and disabled since the creation of ffplay.

See thread:
Subject: [FFmpeg-devel] [PATCH] Cosmetics: adopt compact notation in
        disabled code.
Date: Sat, 12 Feb 2011 18:46:19 +0100

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-14 12:11:56 +00:00
Nicolas George
d6705a27d8 ffplay: stats: do not dereference NULL video
Also: cosmetic: split this overly long line
2011-02-11 18:59:52 +01:00
Alexander Strange
043d2ff267 Deprecate avcodec_thread_init()
As a side effect of the last commit, avcodec_open() now calls it automatically,
so there is no longer any need for clients to call it.
Instead they should set AVCodecContext.thread_count.

avcodec_thread_free() is deprecated, and will be removed from avcodec.h at the
next MAJOR libavcodec bump.

Rename the functions to ff_thread_init/free, since they are now internal.
Wrappers are provided to maintain API compatibility.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit c0b102ca03)
2011-02-11 02:54:08 +01:00
Alexander Strange
b38f008ea6 Frame-based multithreading framework using pthreads
See doc/multithreading.txt for details on use in codecs.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-11 02:53:58 +01:00
Alexander Strange
c0b102ca03 Deprecate avcodec_thread_init()
As a side effect of the last commit, avcodec_open() now calls it automatically,
so there is no longer any need for clients to call it.
Instead they should set AVCodecContext.thread_count.

avcodec_thread_free() is deprecated, and will be removed from avcodec.h at the
next MAJOR libavcodec bump.

Rename the functions to ff_thread_init/free, since they are now internal.
Wrappers are provided to maintain API compatibility.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-09 09:17:28 -05:00
Alexander Strange
37b00b47cb Frame-based multithreading framework using pthreads
See doc/multithreading.txt for details on use in codecs.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-09 09:17:28 -05:00
Nicolas George
76ad67cae7 Implement guessed_pts in avcodec_decode_video2
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-02-07 19:32:07 +01:00
Alexander Strange
fd0ae17aaf Adopt pkt_dts/pkt_pts in lavc clients
No behavior change; this makes DTS reliable with the next patch.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 6b47495397)
2011-02-06 20:31:45 +01:00
Stefano Sabatini
ab543afe47 Make avfilter_graph_free() free the graph.
Make avfilter_graph_free() free not only the internal structures, but
also the allocated graph, and set the graph pointer to NULL for
increased safety.

Simplify usage.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 4359288c56)
2011-02-06 20:31:42 +01:00
Alexander Strange
6b47495397 Adopt pkt_dts/pkt_pts in lavc clients
No behavior change; this makes DTS reliable with the next patch.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-05 16:37:43 -05:00
Stefano Sabatini
4359288c56 Make avfilter_graph_free() free the graph.
Make avfilter_graph_free() free not only the internal structures, but
also the allocated graph, and set the graph pointer to NULL for
increased safety.

Simplify usage.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-04 02:55:11 +00:00
Stefano Sabatini
8904a0f1ee ffplay: factorize code from video_thread() into configure_video_filters()
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 75ea596de1)
2011-02-04 03:08:09 +01:00
Stefano Sabatini
75ea596de1 ffplay: factorize code from video_thread() into configure_video_filters()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-02 12:09:46 +00:00
Stefano Sabatini
2fa1d7b3be In ffplay:get_video_frame(), use frame->pkt_pts rather than reordered_opaque.
AVCodecContext.reordered_opaque is deprecated for this specific use.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 2855080447)
2011-01-31 18:25:45 +01:00
Stefano Sabatini
97b925ea81 ffplay: in video_thread(), use av_dlog() for timestamp logging.
Disable logging of rescaled timestamps if DEBUG is not enabled.
Avoid debug log spamming with -loglevel debug.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 13156f40e1)
2011-01-31 18:25:45 +01:00
Stefano Sabatini
2855080447 In ffplay:get_video_frame(), use frame->pkt_pts rather than reordered_opaque.
AVCodecContext.reordered_opaque is deprecated for this specific use.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-30 19:02:19 +00:00
Stefano Sabatini
13156f40e1 ffplay: in video_thread(), use av_dlog() for timestamp logging.
Disable logging of rescaled timestamps if DEBUG is not enabled.
Avoid debug log spamming with -loglevel debug.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-30 17:52:01 +00:00
Stefano Sabatini
22f73157b7 Remove outdated and confusing comment.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit db2ddd3885)
2011-01-23 19:32:07 +01:00
Stefano Sabatini
db2ddd3885 Remove outdated and confusing comment.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-22 13:06:06 +00:00
Stefano Sabatini
d72858f89f Merge two if (got_picture) {} blocks in ffplay.c:get_video_frame(). 2011-01-17 22:31:11 +01:00
Stefano Sabatini
8f83a3b054 Remove outcommented fossil code. 2011-01-17 22:04:06 +01:00
Stefano Sabatini
199c18a784 Fix weird indent in get_video_frame().
Originally committed as revision 26390 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-16 17:26:00 +00:00
Stefano Sabatini
24d13ebc15 Reindent after the last commit.
Originally committed as revision 26372 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 17:21:12 +00:00
Stefano Sabatini
112c4b8796 In ffplay, do not open display if -nodisp is set.
Fixes issue 1017.

Originally committed as revision 26371 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 17:21:09 +00:00
Stefano Sabatini
d881a0e895 Cosmetics: fix weird indent.
Originally committed as revision 26350 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 01:28:00 +00:00
Michael Niedermayer
393cbb963b Add AVFrame.pkt_pts that contains the correctly reordered AVPacket.pts
Originally committed as revision 26260 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-07 23:07:24 +00:00
Nicolas George
be732b7089 Fix ffplay -an/-vn options that were swapped by r26105.
Originally committed as revision 26115 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-28 09:52:31 +00:00
Michael Niedermayer
0ccabeeaef Support filters and decoders that dont support negative linesizes.
This patch is based on work by stefano.

Originally committed as revision 26108 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-27 15:10:21 +00:00
Nicolas George
406f0f1bcf Use av_find_best_stream in ffplay.
Originally committed as revision 26105 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-27 09:08:36 +00:00
Stefano Sabatini
037be76e15 Add avfilter_graph_create_filter().
Originally committed as revision 25862 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-02 20:12:27 +00:00
Stefano Sabatini
5d6e4c160a Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enum
SampleFormat with AVSampleFormat.

Originally committed as revision 25730 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 11:04:40 +00:00
Stefano Sabatini
1e80a0eaa4 Remove graphparser.h header, move AVFilterInOut and
avfilter_graph_parse() declaration to libavfilter/avfiltergraph.h.

Simplify, and less confusing for the user.

Originally committed as revision 25705 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-07 22:56:29 +00:00
Stefano Sabatini
7313132bcc Rename AVFilterInOut field filter to filter_ctx, more semantically correct.
Originally committed as revision 25700 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-07 18:40:18 +00:00
Stefano Sabatini
97dd1e4a87 Rename avfilter_graph_destroy() to avfilter_graph_free().
The new name is shorter and more consistent with the rest of the API.

This change breaks libavfilter API/ABI.

Originally committed as revision 25674 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-04 20:34:24 +00:00
Stefano Sabatini
e15aeea656 Implement avfilter_graph_alloc().
Originally committed as revision 25673 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-04 20:34:19 +00:00
Stefano Sabatini
ba7d6e798e Remove usage of deprecated libavcodec/audioconvert.h functions.
Originally committed as revision 25668 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-03 20:19:34 +00:00
Stefano Sabatini
ff0652e503 Implement a common get_filtered_video_frame(), shared between ffplay.c
and ffmpeg.c.

Originally committed as revision 25520 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-18 13:57:11 +00:00
Stefano Sabatini
2a24df9357 Add avfilter_graph_config().
Originally committed as revision 25502 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-16 10:20:53 +00:00
Stefano Sabatini
f7ead94c69 Factorize definition of the output_filter defined in both ffplay.c and
ffmpeg.c.
Replace it with a more generic definition which can be shared.

Originally committed as revision 25453 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-12 18:40:26 +00:00
Stefano Sabatini
387b4ac993 Fix timebase handling at the begin and at the end of the ffplay video
filterchain.

Set timebase in the ffplay input, and make get_filtered_video_frame()
rescale the output frames PTSes according to their timebase.

Originally committed as revision 25450 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-12 18:40:16 +00:00
Stefano Sabatini
72ae4aa189 Do not pass an unused variable when initing filt_out. Less confusing.
Originally committed as revision 25448 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-12 13:47:29 +00:00
Michael Chinen
27d97fded3 Fix ffplay to keep calling av_read_frame even if EOF has been reached.
Patch by Michael Chinen, mchinen gmail

Originally committed as revision 25426 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-09 17:50:17 +00:00
Reimar Döffinger
a5c33faacc Add init and uninit functions to cmdutils, reduces code duplication
between ffmpeg and ffplay and avoids a valgrind error by freeing
avformat_opts->key.

Originally committed as revision 25309 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-02 08:44:33 +00:00
Michael Niedermayer
0093ebc20a User application side of Codec specific parameters.
Originally committed as revision 25266 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-29 23:06:51 +00:00
Alexander Strange
7a8bfa5d67 Extract timestamp correction code from ffplay.c to cmdutils.c
Originally committed as revision 25241 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-28 02:05:12 +00:00
Michael Niedermayer
6b6bca6443 Enable AV_LOG_SKIP_REPEATED to maintain previous behavior.
Originally committed as revision 25175 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-24 15:39:10 +00:00
Stefano Sabatini
f66eb58ec4 Make ffplay -h show the settable AVOptions.
Originally committed as revision 25167 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-24 00:51:43 +00:00
Stefano Sabatini
4afbcf46c9 Reindent.
Originally committed as revision 25068 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-07 21:23:59 +00:00
Stefano Sabatini
34017fd9b2 Move av_picture_data_copy() to libavcore, and rename it
av_image_copy().

Originally committed as revision 25067 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-07 21:23:55 +00:00
Dave Yeo
91880e4664 Add _XOPEN_SOURCE definition for usleep().
patch by Dave Yeo, daveryeo telus net

Originally committed as revision 24893 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-23 21:12:34 +00:00
Carl Eugen Hoyos
aa78a6d657 Mention lowres if SDL can't provide the needed resolution.
Originally committed as revision 24802 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-17 08:13:14 +00:00
Mike Scheutzow
cb036f905f Fix SDL crash on specific hardware.
Patch by Mike Scheutzow, mjs973 optonline net

Originally committed as revision 24801 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-17 07:47:44 +00:00
Mike Scheutzow
f7b8c81460 Move do_exit() up for upcoming patch.
Patch by Mike Scheutzow, mjs973 optonline net

Originally committed as revision 24800 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-17 07:46:09 +00:00
S.N. Hemanth Meenakshisundaram
c1db7bff66 Resize data and linesize in AVFilterBufferRef to 8.
This is required to make AVFilterBufferRef able to contain also audio
data, required by audio filtering integration.

Patch by S.N. Hemanth Meenakshisundaram smeen?ks@ucsd.ed?.

Originally committed as revision 24773 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-11 15:25:42 +00:00
Stefano Sabatini
84c0386960 Change avfilter_open() signature, from:
AVFilterContext *avfilter_open(AVFilter *filter, const char *inst_name);
to:
int avfilter_open(AVFilterContext **filter_ctx, AVFilter *filter, const char *inst_name);

This way it is possible to propagate an error code telling the reason
of the failure.

Originally committed as revision 24765 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-11 11:44:51 +00:00
S.N. Hemanth Meenakshisundaram
cc80caff52 Separate video specific BufferRef properties into VideoProps.
Define a new struct AVFilterBufferRefVideoProps and add a type field
to AVFilterBufferRef.

Video specific properties in AVFilterBufferRefVideoProps are now
referred to by *video pointer in AVFilterBufferRef.

Patch by S.N. Hemanth Meenakshisundaram smeenaks->ucsd.edu.

Originally committed as revision 24763 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-11 11:06:04 +00:00
S.N. Hemanth Meenakshisundaram
5d4890d73d Rename fields:
AVFilterLink.srcpic    ->  AVFilterLink.src_buf
AVFilterLink.cur_pic   ->  AVFilterLink.cur_buf
AVFilterLink.outpic    ->  AVFilterLink.out_buf

The new names are more generic and more consistent, since the struct
they contain, which was named AVFilterPicRef, has been renamed to
AVFilterBufferRef.

Patch by S.N. Hemanth Meenakshisundaram %smeenaks%ucsd%edu%.

Originally committed as revision 24732 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-07 01:15:34 +00:00
S.N. Hemanth Meenakshisundaram
7fce481a69 Rename functions and fields:
avfilter_(un)ref_pic       -> avfilter_(un)ref_buffer
avfilter_copy_picref_props -> avfilter_copy_buffer_ref_props
AVFilterBufferRef.pic      -> AVFilterBufferRef.buffer

They have been renamed to allow sharing with audio.

Patch by S.N. Hemanth Meenakshisundaram $smeenaks$ucsd$edu$.

Originally committed as revision 24731 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-07 01:15:27 +00:00
S.N. Hemanth Meenakshisundaram
ecc8dada37 Rename AVFilterPicRef to AVFilterBufferRef.
The struct is going to be used for storing audio buffer references as
well, and the new name is more generic.

Patch by S.N. Hemanth Meenakshisundaram @smeenaks@ucsd@edu@.

Originally committed as revision 24730 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-07 01:15:19 +00:00
S.N. Hemanth Meenakshisundaram
d54e0948e0 Move format from AVFilterBuffer to AVFilterPicRef.
Patch by S.N. Hemanth Meenakshisundaram |smeenaks|ucsd|edu|.

Originally committed as revision 24728 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-07 00:02:26 +00:00
Stefano Sabatini
126b638ea0 Deprecate av_parse_video_frame_size() and av_parse_video_frame_rate()
in favor of the newly added corresponding functions
av_parse_video_size() and av_parse_video_rate() defined in
libavcore/parseutils.h.

This change also adds a linking-time dependency of libavcodec and of
libavfilter on libavcore.

Originally committed as revision 24518 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-26 23:12:28 +00:00
Reimar Döffinger
e1d7c8831c Add avsubtitle_free function.
Originally committed as revision 24185 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-11 07:35:00 +00:00
Jai Menon
00f72577ad FFplay : Fix segfault when playing monoaural streams.
Originally committed as revision 24090 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-07 18:14:58 +00:00
Alexei Svitkine
066ce8c93d Implement -onkeydown and -onmousedown options for ffplay.
Patch by Alexei Svitkine cout << name << "." << surname << "@" << "gmail.com".

See thread:
Subject: [FFmpeg-devel] new command-line option for ffplay
Date: Wed, 23 Jun 2010 09:13:50 -0400

Originally committed as revision 24037 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-04 12:43:12 +00:00
Jai Menon
cfb7e6e6d5 FFplay : Copy all AVFrame fields from the reference picture to the
requested buffer.

Originally committed as revision 24032 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-03 21:20:32 +00:00
Stefano Sabatini
2b4abbd6f5 Move colorspace.h from libavcodec to libavutil.
Avoid a compile-time dependency of the pad filter on libavcodec.

Originally committed as revision 23940 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-01 18:49:44 +00:00
Måns Rullgård
7dbbf6a14a ffplay: remove VLA
Originally committed as revision 23892 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-29 22:41:20 +00:00
Michael Niedermayer
867ab7fb0a Fix pts reordering code.
This fixes a regression introduced when libavfilter support was added to ffplay.

Originally committed as revision 23343 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-27 00:31:45 +00:00
Jai Menon
12bd3c1f99 FFplay : Implement custom reget_buffer for the input filter.
Originally committed as revision 23287 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-24 14:19:44 +00:00
Jai Menon
e53ca636d9 Cosmetics : re-indent after last commit.
Originally committed as revision 23265 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-23 19:14:59 +00:00
Jai Menon
3635c07bd1 FFplay : Avoid manipulating NULL data pointers so that future checks
remain valid. This fixes segfaults for those cases where data copy to
this invalid pointer is attempted.

Originally committed as revision 23264 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-23 19:13:17 +00:00
François Revol
65929418f5 Avoid mixed declaration and code, fix C89 compatibility.
Patch by François Revol revol free fr.

Originally committed as revision 23143 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-15 17:34:45 +00:00
Baptiste Coudurier
09ed11e58c rename -vfilters cli option to -vf in ffplay as well
Originally committed as revision 23104 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-12 23:18:12 +00:00
Stefano Sabatini
3f073fa22c Fix auto-scaling.
Use the numeric value assigned to sws_flags for the sws_flags set in
the graph, rather than the string "bilinear", which is not even
parsable by the scale filter.

Originally committed as revision 23060 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-08 21:39:57 +00:00
Cyril Russo
9b157b0ccd Fix compilation error of ffmpeg and ffplay with --disable-avdevice.
Patch by Cyril Russo, stage D nexvision A laposte net

Originally committed as revision 22940 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-22 08:55:23 +00:00
Jai Menon
79f8b328cd ffplay : Add 's' to the list of supported commands.
Originally committed as revision 22823 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-09 17:52:34 +00:00
Robert Krüger
d834d63b0e Add -t option to ffplay.
Patch by Robert Krüger, krueger signal7 de

Originally committed as revision 22764 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-01 20:56:23 +00:00
Bobby Bingham
cf097cbc0b Cosmetics: indentation
Originally committed as revision 22756 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-01 06:41:27 +00:00
Bobby Bingham
c41c5b02d3 Don't create unnecessary refereces to pictures
Originally committed as revision 22755 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-01 06:41:25 +00:00
Bobby Bingham
dd0c789be7 Hook decoder up to libavfilter's direct rendering for ffplay
Originally committed as revision 22754 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-01 06:41:21 +00:00