Commit Graph

1142 Commits

Author SHA1 Message Date
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
Carl Eugen Hoyos
3c483620c9 Cosmetics: Rename variable daemon as run_as_daemon.
daemon() is defined in unistd.h for BSD and Cygwin.
2011-04-22 18:49:44 +02:00
Michael Niedermayer
8772156be0 Merge remote branch 'qatar/master'
* qatar/master:
  APIChanges: document git revision for CODEC_CAP_SLICE_THREADS addition.
  Introduce slice threads flag.
  FATE: allow forcing thread-type when doing threaded fate runs.
  Use av_log_ask_for_sample() where appropriate.
  error: sort, pack, and align error code and string definitions
  The stabilization period after version bumps should be one month, not one week.
  applehttp: Expose the stream bitrate via metadata
  doc: Add some initial docs on the applehttp demuxer
  Provide a fallback version of the libm function trunc
  libavdevice: Define _XOPEN_SOURCE for usleep
  lavc: provide deprecated avcodec_thread_init until next major version
  lavc: provide the opt.h header until the next bump
  error: change AVERROR_EOF value
  error: remove AVERROR_NUMEXPECTED
  error: add error code AVERROR_OPTION_NOT_FOUND, and use it in opt.c

Conflicts:
	libavcodec/h264.c
	libavutil/error.c
	libavutil/error.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-22 03:54:30 +02:00
Stefano Sabatini
7046b63e69 ffmpeg: call pre_process_video_frame() only if decoding is needed
In output_packet(), move the pre_process_video_frame() call inside the
if (ist->decoding_needed) { } block. This way
pre_process_video_frame() is not called when stream-copy has been
selected.

Also simplify.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-21 12:08:42 +02:00
Stefano Sabatini
79157f400b error: remove AVERROR_NUMEXPECTED
AVERROR_NUMEXPECTED is used only in the image muxer and demuxer, and
has a too much specific meaning, which is better explained through a
log message. Thus it can be replaced by AVERROR(EINVAL).

This breaks API.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-21 07:10:16 +02:00
Baptiste Coudurier
2c18893a91 In libx264 wrapper, correctly support 2pass log filename option. 2011-04-20 15:46:40 -07: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
Stefano Sabatini
55815edca0 prefer avio_check() over url_exist()
The problem with url_exist() is that it tries to open a resource in
RDONLY mode. If the file is a FIFO and there is already a reading
client, the open() call will hang.

By using avio_check() with access mode of 0, the second reading
process will check if the file exists without attempting to open it,
thus avoiding the lock.

Fix issue #1663.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-19 19:48:07 +02:00
Stefano Sabatini
59d96941f0 avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
Make AVIO_FLAG_ access constants work as flags, and in particular fix
the behavior of functions (such as avio_check()) which expect them to
be flags rather than modes.

This breaks API.
2011-04-19 19:47:58 +02:00
Anton Khirnov
41d0eb1c81 lavc: remove the FF_API_SET_STRING_OLD cruft. 2011-04-19 18:41:00 +02:00
Anton Khirnov
761ad42968 lavf: remove FF_API_MAX_STREAMS cruft 2011-04-19 18:28:38 +02:00
Stefano Sabatini
c438c90756 ffmpeg: reformat resample condition code in transcode()
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-19 12:23:59 +02:00
Stefano Sabatini
0f230c53df ffmpeg: factorize resampling condition check in do_video_out()
Simplify and improve readability.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-19 12:23:59 +02:00
Stefano Sabatini
6a46aab49b ffmpeg: prefer "dec" over "ist->st->codec" in do_video_out() snippet
Simplify, ease readability.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-19 12:23:59 +02:00
Stefano Sabatini
dfc6f5ae90 ffmpeg: improve reporting if size/pixel format changes
Use av_log() rather than fprintf(stderr, ...), and show information
related to the previous size/pixel format configuration.

Consistent with the corresponding message issued in case of audio
configuration change.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-19 12:23:58 +02:00
Stefano Sabatini
58bc9ac5cb ffmpeg: remove unused fields AVOutputStream.original_width/height
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-19 12:23:58 +02:00
Stefano Sabatini
b0b83973d1 ffmpeg: remove unused variable padding_src in do_video_out()
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-19 12:23:47 +02:00
Michael Niedermayer
39aafa5ee9 ffmpeg:Daemon mode, add -d as first option to try it.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-19 01:54:58 +02:00
Michael Niedermayer
17ee7b5515 ffmpeg:Fix negative verbositiy
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-19 01:54:58 +02:00
Baptiste Coudurier
abf8342aa9 ffmpeg: fix -aspect cli option
Redesign the way -aspect option is handled. This is done by making
ffmpeg read the sample aspect ratio set in the corresponding input
stream by default, and overriding it using the value specified by
-aspect.

If the output display aspect ratio is specified with -aspect, it is
set at the end of the filterchain, thus overriding the value set by
filters in the filterchain.

This implementation is more robust, since does not modify the
filterchain description (which was creating potential syntax errors).
2011-04-16 16:47:26 -07:00
Stefano Sabatini
bdf3d3bf9d ffmpeg: use parse_number_and_die() when it makes sense
Prefer parse_number_or_die() over atoi()/atol() parsing for the options:
-pass, -top, -vc, and -qscale.

Improve input validation.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-16 21:47:06 +02:00
Stefano Sabatini
5381823eb6 ffmpeg: rename configure_filters() to configure_video_filters()
Mostly useful for the audio-filters branch, to make more apparent the
distinction between configure_audio_filters() and
configure_video_filters().

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-11 00:14:55 +02:00
Lou Logan
f8de11cf7d Redefine sameq
I think the documentation of sameq is causing confusion and misuse of
this option.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-10 09:27:50 +02:00
Michael Niedermayer
d4d09329ee Merge remote branch 'qatar/master'
* qatar/master:
  lavf: bump minor and add an APIChanges entry for avformat cleanup
  lavf: get rid of ffm-specific stuff in avformat.h
Not pulled:  avio: deprecate av_protocol_next().
  avio: add a function for iterating though protocol names.
  lavf: rename a parameter of av_sdp_create from buff->buf
  lavf: rename avf_sdp_create to av_sdp_create.
  lavf: make av_guess_image2_codec internal
  avio: make URLProtocol internal.
  avio: make URLContext internal.
  lavf: mark av_pkt_dump(_log) for remove on $next+1 bump.
  lavf: use designated initializers for all protocols
  applehttp: don't use deprecated url_ functions.
  avio: move two ff_udp_* functions from avio_internal to url.h
  asfdec: remove a forgotten declaration of nonexistent function
  avio: deprecate the typedef for URLInterruptCB

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-09 03:17:07 +02:00
Anton Khirnov
3ee53dabcf lavf: get rid of ffm-specific stuff in avformat.h 2011-04-08 20:58:19 +02:00
Anton Khirnov
c3675dfe1e lavf: rename avf_sdp_create to av_sdp_create.
The new name is more consistent with the rest of the API.
2011-04-08 16:45:40 +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
Anton Khirnov
80c6e238b0 avio: avio_ prefix for url_set_interrupt_cb. 2011-04-07 18:11:24 +02:00
Anton Khirnov
f87b1b373a avio: AVIO_ prefixes for URL_ open flags. 2011-04-07 18:07:16 +02:00
Michael Niedermayer
6b1c886b65 Fix ticket20
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-06 23:21:44 +02:00
Michael Niedermayer
d6c858658f Revert "ffmpeg: fix aspect ratio setting"
This reverts commit d1eb50bb29.
Reason, it breaks fate
2011-04-06 03:01:25 +02:00
Michael Niedermayer
11d78415ca Merge remote branch 'qatar/master'
* qatar/master:
  psymodel: extend API to include PE and bit allocation.
  avio: always compile dyn_buf functions
  Remove unnecessary parameter from ff_thread_init() and fix behavior
  Revert "aac_latm_dec: use aac context and aac m4ac"
  configure: tell user if libva is enabled like the rest of external libs.
  Add silence support for AV_SAMPLE_FMT_U8.
  avio: make URL_PROTOCOL_FLAG_NESTED_SCHEME internal
  avio: deprecate av_url_read_seek
  avio: deprecate av_url_read_pause
  ac3enc: NEON optimised extract_exponents

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-06 02:59:49 +02:00
Michael Niedermayer
b5ef6f8eb4 Fix crash in ffmpeg.c with PIX_FMT_NONE
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-06 01:09:04 +02:00
Stefano Sabatini
d1eb50bb29 ffmpeg: fix aspect ratio setting
This is done by adding a setsar filter at the beginning of the
configured filterchain.

This implementation is more robust, since does not modify the
filterchain description (which was creating potential syntax errors),
but directly modifies the filterchain structure.

This also changes the ffmpeg -aspect behavior, as following filters in
the filterchain can change the DAR/SAR set by the inserted setsar
filter.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-05 15:33:38 +02:00
Alex Converse
14cf0fd2f5 Add silence support for AV_SAMPLE_FMT_U8.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-05 09:08:04 +02:00
Lou Logan
8af3167bb6 Redefine sameq
I think the documentation of sameq is causing confusion and misuse of
this option.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-05 03:21:36 +02:00
Peter Ross
100a6b7c77 ffmpeg: make 'bits_per_raw_sample' option more useful
Currently bits_per_raw_sample is exposed as an AVCodecContext option.
The option is not very useful, because ffmpeg 1) overwrites it with
a value from the upstream codec, or 2) it resets the value whenever
the video is resampled.

This patch adds the -bits_per_raw sample option to FFmpeg, and
caches the value like is done for the -pix_fmt option.

Example usage:
ffmpeg v210.avi -pix_fmt rgb48 -bits_per_raw_sample 10 out%d.dpx

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-04 00:35:58 +02:00
Michael Niedermayer
7d948dc424 Support changing pixel formats on avfilter input.
Fix issue2217
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-03 16:40:12 +02:00
Michael Niedermayer
b25d931a82 Fix stream mapping regression
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-02 16:15:16 +02:00
Michael Niedermayer
e7c7b0d000 Another aspect ratio fix try. This leaves the setdar addition at the end (preferred by people).
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-01 17:38:29 +02:00
Peter Ross
6408529b5d Increase ffmpeg video encoding buffer size to permit encoding of DPX images
The header generated by the DPX encoder is 1664 bytes.
2011-04-01 23:11:54 +11:00
Michael Niedermayer
859676dd42 Insert setdar at the begin of a filter chain instead the end.
This fixes -vf setsar

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-01 02:14:46 +02:00
Michael Niedermayer
8b8bf89e52 Revert "Do no modify terminal parameters using termios.h"
This reverts commit cb48e245e6.

Reason being we like pressing "q" to quit ffmpeg.

Conflicts:

	ffmpeg.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-31 00:22:29 +02:00
Stefano Sabatini
2ee85c0671 ffmpeg: warns the user when the selected pixel format is ignored 2011-03-27 15:53:45 +02:00
Stefano Sabatini
0c55c6d30e cmdutils: remove list_fmts(), simplify
The function was only used in opt_sample_fmt() for listing the sample
formats. Move list_fmts() functionality directly into
opt_sample_fmt().

Als fix the warning:
ffmpeg.c: In function ‘opt_audio_sample_fmt’:
ffmpeg.c:2877: warning: passing argument 1 of ‘list_fmts’ from incompatible pointer type
cmdutils.h:163: note: expected ‘void (*)(char *, int,  int)’ but argument is of type ‘char * (*)(char *, int,  enum AVSampleFormat)’
2011-03-26 14:40:30 +01:00
Michael Niedermayer
27ef7b1bcd Merge remote-tracking branch 'newdev/master'
* newdev/master:
  mov: set audio service type for AC-3 from bitstream mode in the 'dac3' atom.
  Get audio_service_type for AC-3 based on bitstream mode in the AC-3 parser and decoder, and vice-versa for the AC-3 encoder.
  Use audio_service_type to set stream disposition.
  Add APIchanges entry for audio_service_type.
  Add audio_service_type field to AVCodecContext for encoding and reporting of the service type in the audio bitstream.
  configure: in check_ld, place new -l flags before existing ones
  support @heading, @subheading, @subsubheading, and @subsubsection in texi2pod.pl
  doc: update build system documentation
  aacenc: indentation
  aacenc: fix the side calculation in search_for_ms
  vp8.c: rename EDGE_* to VP8_EDGE_*.

Conflicts:
	doc/APIchanges
	libavcodec/avcodec.h
	libavcodec/version.h
	libavcodec/vp8.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-26 03:06:30 +01:00
Justin Ruggles
34b47d7cbc Add audio_service_type field to AVCodecContext for encoding and reporting
of the service type in the audio bitstream.
2011-03-25 16:51:53 -04:00
Stefano Sabatini
4ffc79e7a0 ffmpeg: include conditionally the sws_flags variable
The variable is not used when libavfilter is enabled.
Fix the warning:
ffmpeg.c: At top level:
ffmpeg.c:242: warning: ‘sws_flags’ defined but not used
2011-03-25 18:42:51 +01:00
Michael Niedermayer
6dfb4ab8c8 Make multiple Ctrl-C capable to kill stuck protocols.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-25 02:26:49 +01:00