summaryrefslogtreecommitdiff
path: root/libavdevice/v4l2.c
Commit message (Collapse)AuthorAge
* Combine deprecation guards where appropriateDiego Biurrun2016-05-13
| | | | Some code blocks use multiple bits of deprecated API.
* Reduce the scope of some variablesDiego Biurrun2016-05-11
| | | | | This avoids unused variable warnings after the next version bump. Also drop a trace level av_log() call that is in the way.
* lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, AVStream contains an embedded AVCodecContext instance, which is used by demuxers to export stream parameters to the caller and by muxers to receive stream parameters from the caller. It is also used internally as the codec context that is passed to parsers. In addition, it is also widely used by the callers as the decoding (when demuxer) or encoding (when muxing) context, though this has been officially discouraged since Libav 11. There are multiple important problems with this approach: - the fields in AVCodecContext are in general one of * stream parameters * codec options * codec state However, it's not clear which ones are which. It is consequently unclear which fields are a demuxer allowed to set or a muxer allowed to read. This leads to erratic behaviour depending on whether decoding or encoding is being performed or not (and whether it uses the AVStream embedded codec context). - various synchronization issues arising from the fact that the same context is used by several different APIs (muxers/demuxers, parsers, bitstream filters and encoders/decoders) simultaneously, with there being no clear rules for who can modify what and the different processes being typically delayed with respect to each other. - avformat_find_stream_info() making it necessary to support opening and closing a single codec context multiple times, thus complicating the semantics of freeing various allocated objects in the codec context. Those problems are resolved by replacing the AVStream embedded codec context with a newly added AVCodecParameters instance, which stores only the stream parameters exported by the demuxers or read by the muxers.
* avpacket: Replace av_free_packet with av_packet_unrefLuca Barbato2015-10-26
| | | | | | | `av_packet_unref` matches the AVFrame ref-counted API and can be used as a drop in replacement. Deprecate `av_free_packet`.
* Replace any remaining avpicture function with imgutilsVittorio Giovara2015-10-21
| | | | | | avpicture_get_size() -> av_image_get_buffer_size() Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: Drop deprecated destruct_packet related functionsVittorio Giovara2015-08-28
| | | | Deprecated in 10/2012.
* Deprecate avctx.coded_frameVittorio Giovara2015-07-20
| | | | | | | | | | | | | | | | | The rationale is that coded_frame was only used to communicate key_frame, pict_type and quality to the caller, as well as a few other random fields, in a non predictable, let alone consistent way. There was agreement that there was no use case for coded_frame, as it is a full-sized AVFrame container used for just 2-3 int-sized properties, which shouldn't even belong into the AVCodecContext in the first place. The appropriate AVPacket flag can be used instead of key_frame, while quality is exported with the new AVPacketSideData quality factor. There is no replacement for the other fields as they were unreliable, mishandled or just not used at all. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* v4l2: Add support for h264Luca Barbato2015-03-02
|
* v4l2: Use the codec descriptor facilityLuca Barbato2015-03-02
| | | | | The encoder or decoder might be disabled but the format would be supported for at least remuxing.
* v4l2: Unify one instance of reading/storing errnoMartin Storsjö2014-11-11
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* v4l2: Preserve errno valuesLuca Barbato2014-11-09
| | | | av_log usually resets it.
* v4l2: Use av_strerrorTristan Matthews2014-11-09
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* cosmetics: Write NULL pointer equality checks more compactlyGabriel Dume2014-08-15
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* libavdevice: use avpriv_open()Rémi Denis-Courmont2013-08-07
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* Disable deprecation warnings for cases where a replacement is availableDiego Biurrun2013-08-02
|
* silly typo fixesDiego Biurrun2013-05-03
|
* avpacket: use AVBuffer to allow refcounting the packets.Anton Khirnov2013-03-08
| | | | | | This will allow us to avoid copying the packets in many cases. This breaks ABI.
* v4l2: do not assert on a value received from outside of LibavAnton Khirnov2013-01-13
|
* v4l2: set the average framerate instead of codec timebase.Anton Khirnov2013-01-13
| | | | Codec timebase is supposed to be set by decoders only.
* v4l2: avoid pointless indirection.Anton Khirnov2013-01-13
| | | | | v4l2_read_header() does no cleanup, so it can return directly, without any need for goto.
* Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormatAnton Khirnov2012-10-08
|
* avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union memberMartin Storsjö2012-09-04
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union memberMartin Storsjö2012-09-04
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* Remove unnecessary inclusions of [sys/]time.hMans Rullgard2012-06-20
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* lavf: remove AVFormatParameters from AVFormatContext.read_header signatureAnton Khirnov2012-01-27
|
* v4l2: use C99 struct initializerLuca Barbato2012-01-10
| | | | Remove some unneeded memsets.
* v4l2: poll the file descriptorLuca Barbato2012-01-10
| | | | Instead of busy waiting use poll();
* v4l2: support compressed formatsLuca Barbato2012-01-10
| | | | Let pass the codec name to -pixel_format and introduce -input_format.
* v4l2: use V4L2_FMT_FLAG_EMULATED only if it is definedJanne Grunau2012-01-04
| | | | V4L2_FMT_FLAG_EMULATED was added in 2.6.32.
* v4l2: list available formatsLuca Barbato2012-01-04
| | | | Make use of the experimental framesize enumeration ioctl if available.
* v4l2: set the proper codec_tagLuca Barbato2012-01-04
| | | | Unbreak direct streamcopy.
* v4l2: refactor device_openLuca Barbato2012-01-04
| | | | Check capabilities directly in the function, further simplify the code.
* v4l2: simplify away io_methodLuca Barbato2012-01-04
| | | | Only mmap is supported.
* v4l2: cosmeticsLuca Barbato2012-01-04
|
* v4l2: uniform and format optionsLuca Barbato2012-01-04
|
* v4l2: do not force interlaced modeLuca Barbato2012-01-04
| | | | | Video4linux2 supports both interlaced and non-interlaced mode, do not ask for interlaced if not necessary.
* v4l2: remove unneded linux specific asm/types.h includeJanne Grunau2011-12-27
|
* lavf: make av_set_pts_info private.Anton Khirnov2011-11-30
| | | | It's supposed to be called only from (de)muxers.
* Replace all usage of strcasecmp/strncasecmpReimar Döffinger2011-11-06
| | | | | | | | | | | 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>
* lavf,lavd: replace av_new_stream->avformat_new_stream part I.Anton Khirnov2011-10-19
| | | | | Trivial replacements with sed are done in this commit: sed 's/av_new_stream(\([^)]*\), 0)/avformat_new_stream(\1, NULL)/'
* AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*Anton Khirnov2011-10-12
|
* Use explicit struct initializers for AVOutputFormat/AVInputFormat declarations.Diego Biurrun2011-09-24
|
* lavf,lavd: remove all usage of AVFormatParameters from demuxers.Anton Khirnov2011-08-15
| | | | | | AVFormatParameters are converted into corresponding private options in av_open_input_file/stream() compat wrappers, so accessing them from demuxers is redundant.
* lavdev: improve feedback in case of invalid frame rate/sizeStefano Sabatini2011-06-23
| | | | | | | | | | 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>
* v4l2: prefer "framerate_q" over "fps" in v4l2_set_parameters()Stefano Sabatini2011-06-23
| | | | | | | 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>
* v4l2: do not force NTSC as standardLuca Barbato2011-06-05
| | | | Setting a standard is meaningful only for analog capture devices.
* lavf,lavc: free avoptions in a generic way.Anton Khirnov2011-06-05
| | | | | | It's simpler and less error-prone. Fixes some memleaks along the way.
* fbdev,v4l2: remove some forgotten uses of AVFormatParameters.time_base.Anton Khirnov2011-06-04
|
* v4l2: remove one forgotten use of AVFormatParameters.pix_fmt.Anton Khirnov2011-06-02
|