Commit Graph

214 Commits

Author SHA1 Message Date
Luca Barbato
b8c310cb0a v4l2: support compressed formats
Let pass the codec name to -pixel_format and introduce -input_format.
2012-01-10 05:04:22 +01:00
Michael Niedermayer
7f83db3124 Merge remote-tracking branch 'qatar/master'
* qatar/master: (46 commits)
  mtv: Make sure audio_subsegments is not 0
  v4l2: use V4L2_FMT_FLAG_EMULATED only if it is defined
  avconv: add symbolic names for -vsync parameters
  flvdec: Fix compiler warning for uninitialized variables
  rtsp: Fix compiler warning for uninitialized variable
  ulti: convert to new bytestream API.
  swscale: Use standard multiple inclusion guards in ppc/ header files.
  Place some START_TIMER invocations in separate blocks.
  v4l2: list available formats
  v4l2: set the proper codec_tag
  v4l2: refactor device_open
  v4l2: simplify away io_method
  v4l2: cosmetics
  v4l2: uniform and format options
  v4l2: do not force interlaced mode
  avio: exit early in fill_buffer without read_packet
  vc1dec: fix invalid memory access for small video dimensions
  rv34: fix invalid memory access for small video dimensions
  rv34: joint coefficient decoding and dequantization
  avplay: Don't call avio_set_interrupt_cb(NULL)
  ...

Conflicts:
	Changelog
	avconv.c
	doc/APIchanges
	doc/indevs.texi
	libavcodec/adxenc.c
	libavcodec/dnxhdenc.c
	libavcodec/h264.c
	libavdevice/v4l2.c
	libavformat/flvdec.c
	libavformat/mtv.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-05 02:03:12 +01:00
Janne Grunau
f13a9ca906 v4l2: use V4L2_FMT_FLAG_EMULATED only if it is defined
V4L2_FMT_FLAG_EMULATED was added in 2.6.32.
2012-01-04 21:34:29 +01:00
Luca Barbato
a6a4793d04 v4l2: list available formats
Make use of the experimental framesize enumeration ioctl if available.
2012-01-04 13:10:20 +01:00
Luca Barbato
cd2bbad303 v4l2: set the proper codec_tag
Unbreak direct streamcopy.
2012-01-04 13:10:20 +01:00
Luca Barbato
eb89b4fc09 v4l2: refactor device_open
Check capabilities directly in the function, further simplify the code.
2012-01-04 13:10:20 +01:00
Luca Barbato
246007d370 v4l2: simplify away io_method
Only mmap is supported.
2012-01-04 13:10:20 +01:00
Luca Barbato
a896d7f45a v4l2: cosmetics 2012-01-04 13:10:20 +01:00
Luca Barbato
21aa6ae4fb v4l2: uniform and format options 2012-01-04 13:10:20 +01:00
Luca Barbato
af7123b2ad v4l2: do not force interlaced mode
Video4linux2 supports both interlaced and non-interlaced mode, do not
ask for interlaced if not necessary.
2012-01-04 13:10:20 +01:00
Janne Grunau
1adba23cec v4l2: remove unneded linux specific asm/types.h include 2011-12-27 16:07:58 +01:00
Tom Evans
ffa1f541b3 libavdevice: Fix v4l2 compilation under FreeBSD
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-15 21:48:03 +01:00
Michael Niedermayer
9d76cf0b18 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpdec: Templatize the code for different g726 bitrate variants
  rv40: move loop filter to rv34dsp context
  lavf: make av_set_pts_info private.
  rtpdec: Add support for G726 audio
  rtpdec: Add an init function that can do custom codec context initialization
  avconv: make copy_tb on by default.
  matroskadec: don't set codec timebase.
  rmdec: don't set codec timebase.
  avconv: compute next_pts from input packet duration when possible.
  lavf: estimate frame duration from r_frame_rate.
  avconv: update InputStream.pts in the streamcopy case.

Conflicts:
	avconv.c
	libavdevice/alsa-audio-dec.c
	libavdevice/bktr.c
	libavdevice/fbdev.c
	libavdevice/libdc1394.c
	libavdevice/oss_audio.c
	libavdevice/v4l.c
	libavdevice/v4l2.c
	libavdevice/vfwcap.c
	libavdevice/x11grab.c
	libavformat/au.c
	libavformat/eacdata.c
	libavformat/flvdec.c
	libavformat/mpegts.c
	libavformat/mxfenc.c
	libavformat/rtpdec_g726.c
	libavformat/wtv.c
	libavformat/xmv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-01 02:54:24 +01:00
Anton Khirnov
c3f9ebf743 lavf: make av_set_pts_info private.
It's supposed to be called only from (de)muxers.
2011-11-30 20:34:45 +01:00
Clément Bœsch
2f0f9a87d0 Fix various if parenthesis misplacements. 2011-11-21 19:35:33 +01:00
Michael Niedermayer
5955c63c36 v4l2: fix uninitialized variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-08 01:20:35 +01:00
Reimar Döffinger
bb3244dee2 Replace all usage of strcasecmp/strncasecmp
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.

Instead use our own implementations that always treat the data
as ASCII.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-06 11:52:57 +02:00
Clément Bœsch
1054ab3595 v4l2: add libv4l2 support. 2011-11-05 15:19:36 +01:00
Reimar Döffinger
96949dafcc Replace all strcasecmp/strncasecmp usages.
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.
Instead use our own implementations that always treat the data
as ASCII.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-11-03 19:25:26 +01:00
Clément Bœsch
6921272b23 lavd: add v4l and v4l2 aliases. 2011-10-30 02:39:30 +02:00
Michael Niedermayer
d0492578c8 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  presets: rename presets directory
  lavc: make avcodec_get_context_defaults3 "officially" public
  lavf: replace av_new_stream->avformat_new_stream part II.
  lavf,lavd: replace av_new_stream->avformat_new_stream part I.
  lavf: add avformat_new_stream as a replacement for av_new_stream.
  Use correct scaling table for bwd-pred MVs in second B-field
  Ut Video decoder
  Makefile: change presets extension to .avpreset
  lavfi: add rgbtestsrc source, ported from MPlayer libmpcodecs
  lavfi: add testsrc source
  AVOptions: add documentation.
  presets: update libx264 ffpresets

Conflicts:
	Changelog
	doc/APIchanges
	doc/ffmpeg.texi
	ffpresets/libx264-ipod320.ffpreset
	ffpresets/libx264-ipod640.ffpreset
	ffserver.c
	libavcodec/avcodec.h
	libavcodec/options.c
	libavcodec/version.h
	libavdevice/libdc1394.c
	libavfilter/avfilter.h
	libavfilter/vsrc_testsrc.c
	libavformat/flvdec.c
	libavformat/riff.c
	libavformat/version.h
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-20 02:34:51 +02:00
Anton Khirnov
3b3bbdd3e6 lavf,lavd: replace av_new_stream->avformat_new_stream part I.
Trivial replacements with sed are done in this commit:
sed 's/av_new_stream(\([^)]*\), 0)/avformat_new_stream(\1, NULL)/'
2011-10-19 17:02:11 +02:00
Michael Niedermayer
f884ef00de Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits)
  tiffenc: initialize forgotten avctx.
  avplay: free the active audio packet at exit.
  avplay: free rdft data used for spectrogram analysis.
  log.h: make AVClass a named struct
  fix ac3 encoder documentation
  vc1: more prettyprinting cosmetics
  vc1: prettyprint some tables
  vc1: K&R formatting cosmetics
  AVOptions: bump minor and add APIchanges entry.
  cmdutils/avtools: simplify show_help() by using av_opt_child_class_next()
  AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*
  Remove all uses of deprecated AVOptions API.
  AVOptions: add av_opt_next, deprecate av_next_option.
  AVOptions: add functions for evaluating option strings.
  AVOptions: split get_number().
  AVOptions: add av_opt_get*, deprecate av_get*.
  AVOptions: add av_opt_set*().
  AVOptions: add new API for enumerating children.
  rv34: move inverse transform functions to DSP context
  flvenc: Write the right metadata entry count
  ...

Conflicts:
	avconv.c
	cmdutils.c
	doc/APIchanges
	ffplay.c
	ffprobe.c
	libavcodec/ac3dec.c
	libavcodec/h264.c
	libavcodec/libvpxenc.c
	libavcodec/libx264.c
	libavcodec/mpeg12enc.c
	libavcodec/options.c
	libavdevice/libdc1394.c
	libavdevice/v4l2.c
	libavfilter/vf_drawtext.c
	libavformat/flvdec.c
	libavformat/mpegtsenc.c
	libavformat/options.c
	libavutil/avutil.h
	libavutil/opt.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-13 06:00:03 +02:00
Anton Khirnov
145f741e11 AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_* 2011-10-12 16:51:16 +02:00
Michael Niedermayer
eae3cf06a5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  flvdec: Fix invalid pointer deferences when parsing index
  configure: disable hardware capabilities ELF section with suncc on Solaris x86
  Use explicit struct initializers for AVCodec declarations.
  Use explicit struct initializers for AVOutputFormat/AVInputFormat declarations.
  adpcmenc: Set bits_per_coded_sample
  adpcmenc: fix QT IMA ADPCM encoder
  adpcmdec: Fix QT IMA ADPCM decoder
  permit decoding of multichannel ADPCM_EA_XAS
  Fix input buffer size check in adpcm_ea decoder.
  fft: avoid a signed overflow
  mpegps: Handle buffer exhaustion when reading packets.

Conflicts:
	libavcodec/adpcm.c
	libavcodec/adpcmenc.c
	libavdevice/alsa-audio-enc.c
	libavformat/flvdec.c
	libavformat/mpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-24 22:39:52 +02:00
Diego Biurrun
30b4ee7901 Use explicit struct initializers for AVOutputFormat/AVInputFormat declarations. 2011-09-24 12:11:17 +02:00
Michael Niedermayer
1a34478b71 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Fix NASM include directive
  dsputil_mmx: Honor HAVE_AMD3DNOW
  lavf,lavd: remove all usage of AVFormatParameters from demuxers.
  jack: add 'channels' private option.
  VC-1: fix reading of custom PAR.
  Remove redundant and dubious video codec detection by its extradata
  mpeg12: remove repeat-field code disabled since May 2002
  patch checklist: suggest fate instead of regression tests
  Turn on resampling on sudden size change instead of bailing out during recode.
  avtools: reinitialise filter chain when input video stream changes dimensions

Conflicts:
	Makefile
	avconv.c
	doc/developer.texi
	ffplay.c
	libavcodec/x86/dsputil_mmx.c
	libavdevice/libdc1394.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-15 23:35:53 +02:00
Anton Khirnov
c14fe6bc99 lavf,lavd: remove all usage of AVFormatParameters from demuxers.
AVFormatParameters are converted into corresponding private options in
av_open_input_file/stream() compat wrappers, so accessing them from
demuxers is redundant.
2011-08-15 19:59:48 +02:00
Michael Niedermayer
686959e87e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  doxygen: Consistently use '@' instead of '\' for Doxygen markup.
  Use av_printf_format to check the usage of printf style functions
  Add av_printf_format, for marking printf style format strings and their parameters
  ARM: enable thumb for Cortex-M* CPUs
  nsvdec: Propagate error values instead of returning 0 in nsv_read_header().
  build: remove SRC_PATH_BARE variable
  build: move basic rules and variables to main Makefile
  build: move special targets to end of main Makefile
  lavdev: improve feedback in case of invalid frame rate/size
  vfwcap: prefer "framerate_q" over "fps" in vfw_read_header()
  v4l2: prefer "framerate_q" over "fps" in v4l2_set_parameters()
  fbdev: prefer "framerate_q" over "fps" in device context
  bktr: prefer "framerate" over "fps" for grab_read_header()
  ALSA: implement channel layout for playback.
  alsa: support unsigned variants of already supported signed formats.
  alsa: add support for more formats.
  ARM: allow building in Thumb2 mode

Conflicts:
	common.mak
	doc/APIchanges
	libavcodec/vdpau.h
	libavdevice/alsa-audio-common.c
	libavdevice/fbdev.c
	libavdevice/libdc1394.c
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-24 03:07:04 +02:00
Stefano Sabatini
41b68dce4d lavdev: improve feedback in case of invalid frame rate/size
Show the invalid string in the error message.

While at it also prefer "Could not" over "Couldn't", plain forms are
preferred over contractions (simplify readability, especially for non
English-savvy people).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-23 08:49:49 +02:00
Stefano Sabatini
e60068baeb v4l2: prefer "framerate_q" over "fps" in v4l2_set_parameters()
The variable is used for containing the parsed value of framerate,
using a lexically consistent name eases readability/understanding.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-23 08:49:49 +02:00
Stefano Sabatini
3251af9037 v4l2: set default standard to NULL
It was errouneously changed to "NTSC" by the recent merge commit.
2011-06-07 13:37:55 +02:00
Michael Niedermayer
f9569249c2 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Remove some unused scripts from tools/.
  Add x86 assembly for some 10-bit H.264 intra predict functions.
  v4l2: do not force NTSC as standard
  Skip tableprint.h during 'make checkheaders'.
  Remove unnecessary LIBAVFORMAT_BUILD #ifdef.
  Drop explicit filenames from @file Doxygen tags.
  Skip generated table headers during 'make checkheaders'.
  lavf,lavc: free avoptions in a generic way.
  AVOptions: add av_opt_free convenience function.
  tableprint: Restore mistakenly deleted common.h #include for FF_ARRAY_ELEMS.
  tiff: print log in case of unknown / unsupported tag.
  tiff: fix linesize for mono-white/black formats.
  Fix build of eval-test program
  configure: Document --enable-vaapi
  ac3enc: extract all exponents for the frame at once

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-06 03:33:58 +02:00
Luca Barbato
2c6fb9f032 v4l2: do not force NTSC as standard
Setting a standard is meaningful only for analog capture devices.
2011-06-05 14:20:56 -05:00
Anton Khirnov
367732832f lavf,lavc: free avoptions in a generic way.
It's simpler and less error-prone.

Fixes some memleaks along the way.
2011-06-05 15:01:36 +02:00
Michael Niedermayer
46eb300d01 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ARM: remove MULL inline asm
  mathops: use MUL64 macro where it forms part of other ops
  tty: factorise returning error codes.
  rawdec: add framerate private option.
  x11grab: add framerate private option.
  fbdev,v4l2: remove some forgotten uses of AVFormatParameters.time_base.
  bktr: don't error when AVFormatParameters.time_base isn't set.
  cmdutils: add missing const qualifier
  Skip headers not designed to work standalone during 'make checkheaders'.
  Add missing #includes to make headers self-contained.
  musepack: remove unnecessary #include from mpcdata.h
  musepack: remove extraneous mpcdata.h inclusions
  Fix error check in av_file_map()

Conflicts:
	cmdutils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-05 03:00:31 +02:00
Anton Khirnov
a3b15e411d fbdev,v4l2: remove some forgotten uses of AVFormatParameters.time_base. 2011-06-04 19:48:08 +02:00
Michael Niedermayer
99eb31e263 Merge remote-tracking branch 'qatar/master'
* qatar/master: (25 commits)
  Replace custom DEBUG preprocessor trickery by the standard one.
  vorbis: Remove non-compiling debug statement.
  vorbis: Remove pointless DEBUG #ifdef around debug output macros.
  cook: Remove non-compiling debug output.
  Remove pointless #ifdefs around function declarations in a header.
  Replace #ifdef + av_log() combinations by av_dlog().
  Replace custom debug output functions by av_dlog().
  cook: Remove unused debug functions.
  Remove stray extra arguments from av_dlog() invocations.
  targa: fix big-endian build
  v4l2: remove one forgotten use of AVFormatParameters.pix_fmt.
  vfwcap: add a framerate private option.
  v4l2: add a framerate private option.
  libdc1394: add a framerate private option.
  fbdev: add a framerate private option.
  bktr: add a framerate private option.
  oma: check avio_read() return value
  nutdec: remove unused variable
  Remove unused variables
  swscale: allocate larger buffer to handle altivec overreads.
  ...

Conflicts:
	ffmpeg.c
	libavcodec/dca.c
	libavcodec/dirac.c
	libavcodec/error_resilience.c
	libavcodec/h264.c
	libavcodec/mpeg12.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/pthread.c
	libavcodec/rv10.c
	libavcodec/s302m.c
	libavcodec/shorten.c
	libavcodec/truemotion2.c
	libavcodec/utils.c
	libavdevice/dv1394.c
	libavdevice/fbdev.c
	libavdevice/libdc1394.c
	libavdevice/v4l2.c
	libavformat/4xm.c
	libavformat/apetag.c
	libavformat/asfdec.c
	libavformat/avidec.c
	libavformat/mmf.c
	libavformat/mpeg.c
	libavformat/mpegenc.c
	libavformat/mpegts.c
	libavformat/oggdec.c
	libavformat/oggparseogm.c
	libavformat/rl2.c
	libavformat/rmdec.c
	libavformat/rpl.c
	libavformat/rtpdec_latm.c
	libavformat/sauce.c
	libavformat/sol.c
	libswscale/utils.c
	tests/ref/vsynth1/error
	tests/ref/vsynth2/error

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-03 05:19:30 +02:00
Anton Khirnov
fefa67d536 v4l2: remove one forgotten use of AVFormatParameters.pix_fmt. 2011-06-02 21:52:15 +02:00
Anton Khirnov
c21324eeb6 v4l2: add a framerate private option. 2011-06-02 21:52:15 +02:00
Stefano Sabatini
7533a727f9 v4l2: rewrite code iterating the supported standards
Simplify/clarify the code logic and error reporting.
2011-05-30 09:08:42 +02:00
Stefano Sabatini
2d48515eb7 v4l2: perform minor style fixes 2011-05-30 09:08:42 +02:00
Stefano Sabatini
7b017086d4 v4l2: replace memset() with explicit struct initialization 2011-05-30 09:08:42 +02:00
Michael Niedermayer
5a35cef4b1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ARM: enable UAL syntax in asm.S
  v4l2: don't leak video standard string on error.
  swscale: Remove disabled code.
  avfilter: Surround function only used in debug mode by appropriate #ifdef.
  vf_crop: Replace #ifdef DEBUG + av_log() by av_dlog().
  build: remove BUILD_ROOT variable
  vp8: use av_clip_uintp2() where possible

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-30 01:29:11 +02:00
Anton Khirnov
7a70e01b26 v4l2: don't leak video standard string on error. 2011-05-29 15:10:35 +02:00
Michael Niedermayer
b8a43bc1b5 Merge remote-tracking branch 'qatar/master' into master
* qatar/master: (27 commits)
  ac3enc: fix LOCAL_ALIGNED usage in count_mantissa_bits()
  ac3dsp: do not use the ff_* prefix when referencing ff_ac3_bap_bits.
  ac3dsp: fix loop condition in ac3_update_bap_counts_c()
  ARM: unbreak build
  ac3enc: modify mantissa bit counting to keep bap counts for all values of bap instead of just 0 to 4.
  ac3enc: split mantissa bit counting into a separate function.
  ac3enc: store per-block/channel bap pointers by reference block in a 2D array rather than in the AC3Block struct.
  get_bits: add av_unused tag to cache variable
  sws: replace all long with int.
  ARM: aacdec: fix constraints on inline asm
  ARM: remove unnecessary volatile from inline asm
  ARM: add "cc" clobbers to inline asm where needed
  ARM: improve FASTDIV asm
  ac3enc: use LOCAL_ALIGNED macro
  APIchanges: fill in git hash for av_get_pix_fmt_name (0420bd7).
  lavu: add av_get_pix_fmt_name() convenience function
  cmdutils: remove OPT_FUNC2
  swscale: fix crash in bilinear scaling.
  vpxenc: add VP8E_SET_STATIC_THRESHOLD mapping
  webm: support stereo videos in matroska/webm muxer
  ...

Conflicts:
	Changelog
	cmdutils.c
	cmdutils.h
	doc/APIchanges
	doc/muxers.texi
	ffmpeg.c
	ffplay.c
	libavcodec/ac3enc.c
	libavcodec/ac3enc_float.c
	libavcodec/avcodec.h
	libavcodec/get_bits.h
	libavcodec/libvpxenc.c
	libavcodec/version.h
	libavdevice/libdc1394.c
	libavformat/matroskaenc.c
	libavutil/avutil.h
	libswscale/rgb2rgb.c
	libswscale/swscale.c
	libswscale/swscale_template.c
	libswscale/x86/swscale_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-29 03:34:35 +02:00
Stefano Sabatini
895e4de8d5 v4l2: create file @doxy from text in the copyright header 2011-05-28 21:18:09 +02:00
Stefano Sabatini
72c60f3ecd v4l2: remove pointless empty lines 2011-05-28 21:18:09 +02:00
Stefano Sabatini
af344a69f3 v4l2: set default standard to NULL
Avoid a failure with the default value of "NTSC". Not all drivers
support a standard.
2011-05-28 21:18:01 +02:00
Stefano Sabatini
f8f3f6c40b v4l2: use OFFSET macro when setting options
Improve readability.
2011-05-28 21:16:47 +02:00
Michael Niedermayer
8381ab1437 Merge remote-tracking branch 'qatar/master'
* qatar/master: (29 commits)
  ARM: disable ff_vector_fmul_vfp on VFPv3 systems
  ARM: check for VFPv3
  swscale: Remove unused variables in x86 code.
  doc: Drop DJGPP section, Libav now compiles out-of-the-box on FreeDOS.
  x86: Add appropriate ifdefs around certain AVX functions.
  cmdutils: use sws_freeContext() instead of av_freep().
  swscale: delay allocation of formatConvBuffer().
  swscale: fix build with --disable-swscale-alpha.
  movenc: Deprecate the global RTP hinting flag, use a private AVOption instead
  movenc: Add an AVClass for setting muxer specific options
  swscale: fix non-bitexact yuv2yuv[X2]() MMX/MMX2 functions.
  configure: report yasm/nasm presence properly
  tcp: make connect() timeout properly
  rawdec: factor video demuxer definitions into a macro.
  rtspdec: add initial_pause private option.
  lavf: deprecate AVFormatParameters.width/height.
  tty: add video_size private option.
  rawdec: add video_size private option.
  x11grab: add video_size private option.
  x11grab: factorize returning error codes.
  ...

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-27 23:48:22 +02:00
Anton Khirnov
d576bbf3eb v4l2: add a pixel_format private option. 2011-05-27 23:33:51 +02:00
Stefano Sabatini
6b899e16de lavdev: prefer the inclusion of avdevice.h over that of libavformat/avformat.h 2011-05-27 12:15:09 +02:00
Anton Khirnov
8fe7b6443f v4l2: add video_size private option. 2011-05-27 06:52:51 +02:00
Anton Khirnov
82b5aa0add v4l2: factorize returning error codes.
This will be useful in the following commit.
2011-05-27 06:52:51 +02:00
Michael Niedermayer
39e4206dc6 Merge remote-tracking branch 'qatar/master'
* qatar/master: (32 commits)
  doc: create separate section for audio encoders
  swscale: Remove orphaned, commented-out function declaration.
  swscale: Eliminate rgb24toyv12_c() duplication.
  Remove h263_msmpeg4 from MpegEncContext.
  APIchanges: Fill in git hash for fps_probe_size (30315a8)
  avformat: Add fpsprobesize as an AVOption.
  avoptions: Return explicitly NAN or {0,0} if the option isn't found
  rtmp: Reindent
  rtmp: Don't try to do av_malloc(0)
  tty: replace AVFormatParameters.sample_rate abuse with a private option.
  Fix end time of last chapter in compute_chapters_end
  ffmpeg: get rid of useless AVInputStream.nb_streams.
  ffmpeg: simplify managing input files and streams
  ffmpeg: purge redundant AVInputStream.index.
  lavf: deprecate AVFormatParameters.channel.
  libdc1394: add a private option for channel.
  dv1394: add a private option for channel.
  v4l2: reindent.
  v4l2: add a private option for channel.
  lavf: deprecate AVFormatParameters.standard.
  ...

Conflicts:
	doc/APIchanges
	doc/encoders.texi
	ffmpeg.c
	libavdevice/alsa-audio.h
	libavformat/version.h
	libavutil/opt.c
	libswscale/rgb2rgb.h
	libswscale/rgb2rgb_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-26 03:28:22 +02:00
Anton Khirnov
d20576d01b lavf: deprecate AVFormatParameters.channel. 2011-05-25 15:55:47 +02:00
Anton Khirnov
3d2a418605 v4l2: reindent. 2011-05-25 15:55:47 +02:00
Anton Khirnov
a02fd06ab7 v4l2: add a private option for channel. 2011-05-25 15:55:47 +02:00
Anton Khirnov
fc68a8f703 lavf: deprecate AVFormatParameters.standard. 2011-05-25 15:55:47 +02:00
Anton Khirnov
b3da269211 v4l2: add a private option for video standard. 2011-05-25 15:55:46 +02: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
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
Diego Elio Pettenò
66355be3c3 Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.
This also lists the objects from those two libraries as internal (by adding
the ff_ prefix) so that they can then be hidden via linker scripts.
(cherry picked from commit c6610a216e)
2011-01-28 03:15:34 +01:00
Diego Elio Pettenò
c6610a216e Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.
This also lists the objects from those two libraries as internal (by adding
the ff_ prefix) so that they can then be hidden via linker scripts.
2011-01-26 22:10:09 +00:00
Stefano Sabatini
5d3d238f82 Factorize common code in v4l2_set_parameters().
Originally committed as revision 26225 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-05 14:15:13 +00:00
Stefano Sabatini
8621a37d9f In video4linux2, in the case the timebase value in ap is 0/0, read the
timebase value already set in the driver, and set it back in the codec
stream, rather than leaving the invalid value of 0/0.

In particular, fix ffmpeg grabbing timestamps when the timebase value
is not set through the CLI.

Originally committed as revision 26224 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-05 14:15:11 +00:00
Stefano Sabatini
bd7d9e45a4 In the video4linux2 output device, log an error description in case of
ioctl failure in mmap_release_buffer().

Originally committed as revision 26214 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-04 18:18:01 +00:00
José Miguel Gonçalves
70f77361d8 Allow to set the frame rate in v4l2 devices
Patch by José Miguel Gonçalves (jose DOT goncalves AT inov DOT pt)

Originally committed as revision 25159 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-23 09:16:05 +00:00
Stefano Sabatini
0105889358 Cosmetics: simplify layout of fmt_conversion_table, make it shorter
and more readable.

Originally committed as revision 25108 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-12 19:44:45 +00:00
Stefano Sabatini
680861ca73 Cosmetics: apply minor style fixes.
Originally committed as revision 25106 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-11 16:44:10 +00:00
Stefano Sabatini
e16f217ceb Use new imgutils.h API names, fix deprecation warnings.
Originally committed as revision 25058 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-07 19:15:29 +00:00
Pete Eberlein
b4f81b7429 Add a mapping for the V4L2_PIX_FMT_NV12 format to PIX_FMT_NV12 for
video4linux2 devices. This is used by Sensoray Model 2253 cards.
Patch by Pete Eberlein (pete AT sensoray DOT com)

Originally committed as revision 24759 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-11 07:34:33 +00:00
Stefano Sabatini
6ce9b4310c Remove use of the deprecated function avcodec_check_dimensions(), use
av_check_image_size() instead.

Originally committed as revision 24711 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-06 09:37:04 +00:00
Stefano Sabatini
50f852186f Make device_open() store the VIDIOC_QUERYCAP ioctl errno, and in case
of failure return the stored value rather than the current errno,
which may be overwritten by a following call to close().

Originally committed as revision 23001 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-01 08:24:24 +00:00
Luca Abeni
b01dba14f3 Check the return value of device_try_init() immediately after calling such a
function. Avoids the following warning:
libavdevice/v4l2.c: In function ‘v4l2_read_header’:
libavdevice/v4l2.c:586: warning: ‘codec_id’ may be used uninitialized in this function

Originally committed as revision 22986 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-28 08:02:52 +00:00
Stefano Sabatini
6e25b78001 Fix weird brace placement.
Originally committed as revision 22982 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-27 22:45:27 +00:00
Luca Abeni
1ace15f58c Reduce the verbosity of the v4l2 input device
Originally committed as revision 22980 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-27 21:33:56 +00:00
Luca Abeni
4f54d924bc Simplify some output messages in the v4l2 input device
Originally committed as revision 22979 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-27 21:32:11 +00:00
Stefano Sabatini
932d775fa2 Implement v4l2 input size autodetection in v4l2_read_header().
Move check on frame size after the device is opened and after
device_try_init() is attempted. If the provided size value is 0x0,
perform a VIDIOC_G_FMT ioctl() on the device, which sets size to the
current settings.

Originally committed as revision 22971 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-26 22:07:15 +00:00
Stefano Sabatini
c57a8fefd9 Return meaningful error codes, rather than always -1.
Originally committed as revision 22966 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-26 19:40:15 +00:00
Stefano Sabatini
18225025ff Remove unnecessary width and height variables from v4l2_read_header().
Originally committed as revision 22963 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-25 18:47:40 +00:00
Stefano Sabatini
72415b2adb Define AVMediaType enum, and use it instead of enum CodecType, which
is deprecated and will be dropped at the next major bump.

Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-30 23:30:55 +00:00
Jai Menon
90d0379f5e Avoid using deprecated AVFormatParameters::[audio|video]_codec_id field.
Originally committed as revision 21511 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 15:45:21 +00:00
Reinhard Tartler
8040c3b250 Define device_try_init() as static in libavdevice/v4l2.c.
Patch by Reinhard Tartler (siretart AT tauware DOT de).

Originally committed as revision 21004 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-03 10:43:36 +00:00
Luca Abeni
3db77ccf38 Support compressed formats in the V4L2 input device.
Patch by klchxbec AT freenet DOT de.

Originally committed as revision 20858 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-14 10:34:31 +00:00
Luca Abeni
9eb6e9d9d3 Add support for V4L2 compressed formats in the table used for converting
between V4L2 formats and ffmpeg's formats/codecs.
Patch by klchxbec AT freenet DOT de.

Originally committed as revision 20857 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-14 10:33:24 +00:00
Luca Abeni
9202218e5d Use the correct type for the V4L2 format.
Originally committed as revision 20856 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-14 10:31:29 +00:00
Luca Abeni
158aa9f2db Return pkt->size in v4l2_read_packet().
mmap_read_frame() takes care of ensuring that the packet size
is correct.

Originally committed as revision 20855 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-14 10:30:37 +00:00
Luca Abeni
1c787b1043 Cast a __u64 variable to uint64_t so that it can be printed without warnings
Originally committed as revision 17325 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-15 14:32:09 +00:00
Luca Abeni
5449a787c9 If AVPacket->data == NULL, the packet does not contain any buffer to
be freed.
This fixes a double free on exit.

Originally committed as revision 16857 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-30 12:41:44 +00:00
Diego Biurrun
406792e7b0 cosmetics: Remove pointless period after copyright statement non-sentences.
Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-19 15:46:40 +00:00
Aurelien Jacobs
b250f9c66d Change semantic of CONFIG_*, HAVE_* and ARCH_*.
They are now always defined to either 0 or 1.

Originally committed as revision 16590 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-13 23:44:16 +00:00
Luca Abeni
e7b987dc2f Remove the frame rate from struct video_data, and allow using a variable
frame rate for video4linux2 input

Originally committed as revision 16464 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-07 13:34:29 +00:00
Stefano Sabatini
5d91e92853 Use avcodec_check_dimensions() for checking the frame size validity.
The v4l.c check is moved after the eventual automatic size detection,
so the check in that case is performed on the new set values.

Originally committed as revision 16370 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-28 14:41:19 +00:00
Stefano Sabatini
df2a3f2714 Use more descriptive long_names for Video4Linux input devices.
Originally committed as revision 16322 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-26 11:23:50 +00:00
Aurelien Jacobs
37d3e0667a uses FF_ARRAY_ELEMS() where appropriate
Originally committed as revision 15662 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-10-21 21:40:24 +00:00
Jens Rosenboom
3d0d9a5e3b The v4l2 driver can silently change the pixel format in the
VIDIOC_S_FMT ioctl(). In this case, device_init() should fail so that
a different pixel format is tried.
Patch by Jens Rosenboom (jens DOT rosenboom AT eu DOT panasonic DOT com)

Originally committed as revision 15660 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-10-21 07:59:41 +00:00
Brad
1b6e8b734c V4L2 support for OpenBSD, patch by Brad, brad comstyle com
Originally committed as revision 15376 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-21 22:47:52 +00:00
Jean Delvare
92d04e765e Add support for the RGB32 pixel format in video4linux2 devices
Patch by Jean Delvare (khali AT linux-fr DOT org)

Originally committed as revision 15219 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-05 20:40:50 +00:00
Jean Delvare
97a290efcb Add support for the PIX_FMT_RGB555 and PIX_FMT_RGB565 pixel formats in
video4linux2 devices.
Patch by Jean Delvare (khali AT linux-fr DOT org)

Originally committed as revision 15218 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-05 20:36:42 +00:00
Michael Niedermayer
e9d4b8a533 Workaround bug in types.h that has typedef __u64 under #ifndef __STRICT_ANSI__.
Originally committed as revision 14852 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-19 21:20:39 +00:00
Aurelien Jacobs
ea452b54f0 strcasecmp() requires #include <strings.h>
Originally committed as revision 14728 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-13 17:22:53 +00:00
Stefano Sabatini
3241ec1d6f Cosmetics: make a v4l2 error message consistent with r14647.
Originally committed as revision 14664 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-08 18:14:21 +00:00
Stefano Sabatini
99423fa0ee Distinguish the error reporting for the cases of wrong size and wrong
timebase in the video4linux2 v4l2_read_header() function.

Originally committed as revision 14647 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-06 18:21:35 +00:00
Stefano Sabatini
deaab5fc32 Make v4l2_read_header() don't free a stream in case of failure when
reading its header. The stream will be freed later in
av_open_input_stream(). Fix a segmentation fault due to a double free
on the same pointer.

Originally committed as revision 14247 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-15 20:45:42 +00:00
Stefano Sabatini
bde15e74de Make long_names in lavf/lavdev optional depending on CONFIG_SMALL.
patch by Stefano Sabatini, stefano.sabatini-lala poste.it
along with some spelling/consistency fixes for the long names by me

Originally committed as revision 13649 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-06-03 16:20:54 +00:00
Carl Eugen Hoyos
eacced45c4 Replace some occurrences of -1 with PIX_FMT_NONE.
Fixes icc warning #188: enumerated type mixed with another type

Originally committed as revision 13130 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-11 22:28:43 +00:00
Diego Biurrun
245976da2a Use full path for #includes from another directory.
Originally committed as revision 13098 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-09 11:56:36 +00:00
Diego Biurrun
0e58bf670d Remove #ifdef HAVE_SYS_MMAN_H around sys/mman.h #include.
Without the #include compilation fails.

Originally committed as revision 12568 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-03-24 10:54:01 +00:00
Diego Biurrun
b00675499c Only #include sys/mman.h if configure set HAVE_SYS_MMAN_H.
Originally committed as revision 12521 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-03-20 19:07:24 +00:00
Michel Bardiaux
48f7e1aeee Clarify the error message when video width, height, or framerate are not
specified.
Patch by Michel Bardiaux (mbardiaux AT mediaxim DOT be)

Originally committed as revision 11551 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-01-17 16:27:26 +00:00
Luca Abeni
c721d803cb Introduce libavdevice
Originally committed as revision 11077 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-11-22 16:10:02 +00:00