summaryrefslogtreecommitdiff
path: root/libavdevice/bktr.c
Commit message (Collapse)AuthorAge
* 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.
* bktr: Use av_strerror and propagate error codesHimangi Saraogi2015-02-15
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* avdevice: Give names to anonymously typedeffed structsDiego Biurrun2014-07-18
| | | | | Anonymous structs can cause trouble in header files, so try to avoid them altogether as a matter of good style.
* bktr: Changed a missed occurrance of open into avpriv_openMartin Storsjö2013-08-10
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* libavdevice: use avpriv_open()Rémi Denis-Courmont2013-08-07
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* bktr: Add missing includes for av_gettime()Martin Storsjö2013-03-23
| | | | | | | This is necessary after the old av_gettime in libavformat was dropped. Signed-off-by: Martin Storsjö <martin@martin.st>
* 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
|
* Replace memset(0) by zero initializations.Diego Biurrun2012-03-28
| | | | Also remove one pointless zero initialization in rangecoder.c.
* lavf: remove AVFormatParameters from AVFormatContext.read_header signatureAnton Khirnov2012-01-27
|
* cosmetics: drop some pointless parenthesesDiego Biurrun2012-01-07
|
* lavf: make av_set_pts_info private.Anton Khirnov2011-11-30
| | | | It's supposed to be called only from (de)muxers.
* Remove leftover includes of strings.hMartin Storsjö2011-11-06
| | | | 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>
* bktr: prefer "framerate" over "fps" for grab_read_header()Stefano Sabatini2011-06-23
| | | | | | | The variable is used for containing the parsed value of s1->framerate, using a lexically consistent name ease readability/understanding. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* 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.
* bktr: don't error when AVFormatParameters.time_base isn't set.Anton Khirnov2011-06-04
| | | | There's a private option for it now.
* bktr: get default framerate from video standard.Anton Khirnov2011-06-03
|
* bktr: add a framerate private option.Anton Khirnov2011-06-02
|
* bktr: add video_size private option.Anton Khirnov2011-05-27
|
* bktr: factorize returning error codes.Anton Khirnov2011-05-27
| | | | This will be useful in the following commit.
* lavf: deprecate AVFormatParameters.standard.Anton Khirnov2011-05-25
|
* bktr: add a private option for video standard.Anton Khirnov2011-05-25
|
* configure: Do not unconditionally add -D_POSIX_C_SOURCE to CPPFLAGS.Diego Biurrun2011-05-12
| | | | | | | | | | | | | | | | 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.
* libavdevice: Define _XOPEN_SOURCE for usleepMartin Storsjö2011-04-21
| | | | | | This hopefully fixes build failures on Dragonfly BSD. Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.Diego Elio Pettenò2011-01-26
| | | | | 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.
* Define AVMediaType enum, and use it instead of enum CodecType, whichStefano Sabatini2010-03-30
| | | | | | is deprecated and will be dropped at the next major bump. Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Revert removal of _NETBSD_SOURCE definition.Diego Biurrun2010-03-21
| | | | | | It is indeed necessary to compile on NetBSD. Originally committed as revision 22613 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Replace BSD-specific integer types by their POSIX equivalents.Diego Biurrun2010-03-12
| | | | | | | Mark bktr_init function as av_cold. Tested to work by Michael Kostylev on the NetBSD FATE box. Originally committed as revision 22487 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add _XOPEN_SOURCE=600 to CPPFLAGS on NetBSD.Diego Biurrun2010-03-12
| | | | | | | | | | | | This make NetBSD compile out of the box at the cost of a hack, but a locally contained one that is preferable to the one used in the wild. Currently the NetBSD FATE box adds -D_NETBSD_SOURCE to CPPFLAGS to work around broken system headers. Since it is unlikely for NetBSD to fix their headers, it is better to use a standard flag instead of a system-specific one. As a sideeffect, this allows getting rid of a local _NETBSD_SOURCE definition. Originally committed as revision 22486 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add _NETBSD_SOURCE definition to fix compilation on NetBSD.Jorge Acereda2010-03-03
| | | | | | | | | | NetBSD is unlikely to fix their headers and the FATE box passes it as -D_NETBSD_SOURCE on the command line anyway. In this case, it's better to keep the hack well-contained within this file. Closes issue 886. patch by Jorge Acereda, jacereda brainstorm es Originally committed as revision 22164 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix METEOR vs. BKTR typo, noticed by Steve O'Hara-Smith, steve sohara org.Diego Biurrun2009-09-22
| | | | Originally committed as revision 19965 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add missing strings.h include needed for strcasecmp.Reimar Döffinger2009-09-19
| | | | Originally committed as revision 19920 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: Remove pointless period after copyright statement non-sentences.Diego Biurrun2009-01-19
| | | | Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Change semantic of CONFIG_*, HAVE_* and ARCH_*.Aurelien Jacobs2009-01-13
| | | | | | They are now always defined to either 0 or 1. Originally committed as revision 16590 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Define _BSD_SOURCE in bktr.c, dev/ic/bt8xx.h needs the u_short etc. typedefs,Reimar Döffinger2008-12-13
| | | | | | which sys/types.h will not generate without this. Originally committed as revision 16089 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make long_names in lavf/lavdev optional depending on CONFIG_SMALL.Stefano Sabatini2008-06-03
| | | | | | | 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
* Use full path for #includes from another directory.Diego Biurrun2008-05-09
| | | | Originally committed as revision 13098 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove #ifdef HAVE_SYS_MMAN_H around sys/mman.h #include.Diego Biurrun2008-03-24
| | | | | | Without the #include compilation fails. Originally committed as revision 12568 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Only #include sys/mman.h if configure set HAVE_SYS_MMAN_H.Diego Biurrun2008-03-20
| | | | Originally committed as revision 12521 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Introduce libavdeviceLuca Abeni2007-11-22
Originally committed as revision 11077 to svn://svn.ffmpeg.org/ffmpeg/trunk