summaryrefslogtreecommitdiff
path: root/libavformat/avienc.c
Commit message (Collapse)AuthorAge
* avformat: Constify all muxer/demuxersAndreas Rheinhardt2021-04-27
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avienc: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avienc, wtvenc: Deduplicate codec tags listAndreas Rheinhardt2021-02-23
| | | | | | Also saves relocations. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/riffenc: indicate storage of flipped RGB bitmapsGyan Doshi2020-07-15
| | | | | | | | | | | | | Some legacy applications such as AVI2MVE expect raw RGB bitmaps to be stored bottom-up, whereas our RIFF BITMAPINFOHEADER assumes they are always stored top-down and thus write a negative value for height. This can prevent reading of these files. Option flipped_raw_rgb added to AVI and Matroska muxers which will write positive value for height when enabled. Note that the user has to flip the bitmaps beforehand using other means such as the vflip filter.
* avformat/avienc: Use AV_STRINGIFY for compile time constantAndreas Rheinhardt2020-03-14
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavformat/avienc: Check bits per sample for PAL8Michael Niedermayer2020-02-27
| | | | | | | Fixes: assertion failure Fixes: Ticket 8172 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: remove more unneeded avio_flush() callsMarton Balint2020-01-07
| | | | | | | | | | | | These instances are simply redundant or present because avio_flush() used to be required before doing a seekback. That is no longer the case, aviobuf code does the flush automatically on seek. This only affects code which is either disabled for streaming IO contexts or does no seekbacks after the flush, so this change should have no adverse effect on streaming. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat: remove avio_flush() calls from the end of write_header functionsMarton Balint2020-01-07
| | | | | | | | | | | | | | To make it consistent with other muxers. The user can still control the generic flushing behaviour after write_header (same way as after packets) using the -flush_packets option, the default typically means to flush unless a non-streamed file output is used. Therefore this change should have no adverse effect on streaming, even if it is assumed that the first packet has a clean buffer, so small seekbacks within the output buffer work even when the IO context is not seekable. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/avienc: Remove superfluous headerAndreas Rheinhardt2019-10-25
| | | | | | | | | 04d2540c added intreadwrite.h to avienc.c, although there was (and is) no need to do so. The inclusion seems to be a mistake as this commit added a AV_WL32 to avidec.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/avienc: add deinit functionJames Almer2019-10-21
| | | | | | | Fixes ticket #8302 Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avienc: fix fields-per-frame value for interlaced video streamsTobias Rapp2017-11-27
| | | | | | | | | | | | Writes one set of field framing information for progressive streams and two sets for interlaced streams. Fixes ticket #6383. Unfortunately the OpenDML v1.02 document is not very specific on what value to use for start_line when frame data is not coming from a capturing device, so this is just using 0/1 depending on the field order as a best-effort guess. Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* avformat/riff.h : remove unused function parameter "const AVCodecTag *tags" ↵Aleksandr Slobodeniuk2017-08-02
| | | | | | | of "void ff_put_bmp_header()" Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: remove obsolete commented-out DEBUG defineTobias Rapp2017-07-07
| | | | | Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* Merge commit '67deba8a416d818f3d95aef0aa916589090396e2'Clément Bœsch2017-03-31
|\ | | | | | | | | | | | | * commit '67deba8a416d818f3d95aef0aa916589090396e2': Use avpriv_report_missing_feature() where appropriate Merged-by: Clément Bœsch <cboesch@gopro.com>
| * Use avpriv_report_missing_feature() where appropriateDiego Biurrun2016-11-08
| |
* | Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'James Almer2017-03-21
|\| | | | | | | | | | | | | * commit '83548fe894cdb455cc127f754d09905b6d23c173': lavf: fix usage of AVIOContext.seekable Merged-by: James Almer <jamrial@gmail.com>
| * lavf: fix usage of AVIOContext.seekableAnton Khirnov2016-09-30
| | | | | | | | | | | | | | | | It is supposed to be a flag. The only currently defined value is AVIO_SEEKABLE_NORMAL, but other ones may be added in the future. However all the current lavf code treats this field as a bool (mainly for historical reasons). Change all those cases to properly check for AVIO_SEEKABLE_NORMAL.
* | avformat/avienc: add reserve_index_space optionTobias Rapp2017-01-31
| | | | | | | | | | | | | | | | | | | | Allows the user to reserve space for the ODML master index. A sufficient sized master index in the AVI header avoids storing follow-up master indexes within the 'movi' data later. If the option is omitted or zero the index size is estimated from output duration and bitrate. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* | avformat/avlanguage: make av_convert_lang_to() internalJames Almer2016-07-19
| | | | | | | | | | | | | | The header was never installed and the function is only used in libavformat Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/avienc: Fix memleaks on errorsMichael Niedermayer2016-05-22
| | | | | | | | | | | | Fixes CID1361951 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/avienc: Rename reshuffles return variable to ensure it is not mixed upMichael Niedermayer2016-05-22
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * 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.
* | lavf/avienc: Clear whole tag in avi_add_ientry()Mats Peterson2016-03-13
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/avienc: Add xxpc entries to indexMats Peterson2016-03-13
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/avienc: factor out avi_add_ientry()Mats Peterson2016-03-13
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/avienc: Palette changing code only concerns AV_PIX_FMT_PAL8Mats Peterson2016-03-08
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/avienc: Remove unneeded seekable testsMichael Niedermayer2016-03-06
| | | | | | | | | | Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/avienc: assert that bits_per_coded_sample is within the supported ↵Michael Niedermayer2016-03-05
| | | | | | | | | | | | range (out of array access otherwise) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/avienc: Add support for palette side dataMats Peterson2016-03-05
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/avienc: Fix assertion failure with 256 palette entriesMichael Niedermayer2016-02-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/avienc: Add palette after BITMAPINFOHEADERMats Peterson2016-02-21
| | | | | | | | | | | | | | lavf/riffenc: Write space for palette tests/ref/vsynth: Update 1 bpp files for pal8 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avienc: Remove unused variable 'ret'Reto Kromer2016-02-20
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Timothy Gu <timothygu99@gmail.com>
* | avformat/avienc: Store pal8 paletteMichael Niedermayer2016-02-19
| | | | | | | | | | | | | | This can be made more efficient, but first and the main goal of this change is to store it at all Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/avienc: Use avi_write_packet_internal() to store raw rgb in a more ↵Michael Niedermayer2016-02-18
| | | | | | | | | | | | spec compliant way Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/avienc: Split avi_write_packet_internal() outMichael Niedermayer2016-02-18
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/avienc: add muxer option "write_channel_mask"Tobias Rapp2015-09-12
| | | | | | | | | | | | | | Allow writing an empty channel mask into the wave format header. Useful if the input file contains an unknown channel layout. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Replace av_dlog with ff_dlog.Ronald S. Bultje2015-08-18
| | | | | | | | | | ff_dlog checks compilability, and is non-public. av_dlog is deprecated and no longer exists if FF_API_DLOG=0.
* | avformat/avienc: Correct possible dereference of nullRoman Savchenko2015-05-29
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/avienc: Avoid float usageMichael Niedermayer2015-05-23
| | | | | | | | | | | | reduces risk for rounding differences between platforms Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/avienc: Expand master ODML index when its end is reachedMichael Niedermayer2015-03-19
| | | | | | | | | | | | | | Fixes 256Gb limit Fixes Ticket4225 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/avienc: Fix wrongly placed commentMichael Niedermayer2015-03-19
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/avienc: factor out update_odml_entry()Michael Niedermayer2015-03-19
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/avienc: factor write_odml_master() outMichael Niedermayer2015-03-19
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | libavformat/avienc: Fix duration of audio segment in OpenDML master indexTobias Rapp2015-03-04
| | | | | | | | | | | | | | | | | | | | | | Fixes the duration field of the OpenDML master index "indx" chunk to contain the number of samples instead of the number of packets for (linear/PCM) audio streams. This matches the OpenDML V1.02 standard text which states that the duration field shall contain "time span in stream ticks". Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e'Michael Niedermayer2015-02-14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e': avformat: Don't anonymously typedef structs Conflicts: libavformat/adtsenc.c libavformat/aiffenc.c libavformat/avidec.c libavformat/gif.c libavformat/iff.c libavformat/img2dec.c libavformat/jvdec.c libavformat/matroskadec.c libavformat/udp.c libavformat/wtvdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Don't anonymously typedef structsDiego Biurrun2015-02-14
| |
* | avformat/avienc: write last frame durationMichael Niedermayer2014-11-19
| | | | | | | | | | | | Fixes small part of Ticket 3052 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/avienc: factor frame skip code outMichael Niedermayer2014-11-19
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | libavformat/avienc: Make unchanged function arguments constMichael Niedermayer2014-09-24
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>