summaryrefslogtreecommitdiffstats
path: root/libavformat/hdsenc.c
Commit message (Collapse)AuthorAgeFilesLines
* avformat: migrate to AVFormatContext->urlMarton Balint2018-01-281-12/+12
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* Use the new AVIOContext destructor.Anton Khirnov2017-09-011-1/+1
| | | | | (cherry picked from commit 6f554521afdf7ab4edbfaa9536660a1dca946b19) Signed-off-by: James Almer <jamrial@gmail.com>
* hdsenc: Remove dead storeDerek Buitenhuis2017-07-141-1/+0
| | | | | | | This is apparently not supposed to error out anyway. Reviewed-by: Steven Liu <lq@onvideo.cn> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avformat/hdsenc: Pass flags to child contextMichael Niedermayer2016-04-111-0/+1
| | | | | | This is needed as the bitexact flag is not in the codecpar context, and thus not copied Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-7/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-231-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge commit '9f61abc8111c7c43f49ca012e957a108b9cc7610'Derek Buitenhuis2016-02-101-13/+11
|\ \ | |/ | | | | | | | | | | | | | | This also deprecates our old duplicated callbacks. * commit '9f61abc8111c7c43f49ca012e957a108b9cc7610': lavf: allow custom IO for all files Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavf: allow custom IO for all filesAnton Khirnov2016-01-241-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some (de)muxers open additional files beyond the main IO context. Currently, they call avio_open() directly, which prevents the caller from using custom IO for such streams. This commit adds callbacks to AVFormatContext that default to avio_open2()/avio_close(), but can be overridden by the caller. All muxers and demuxers using AVIO are switched to using those callbacks instead of calling avio_open()/avio_close() directly. (de)muxers that use the URLProtocol layer directly instead of AVIO remain unconverted for now. This should be fixed in later commits.
* | Update demuxers and protocols for protocol whitelist supportMichael Niedermayer2016-02-021-6/+7
| | | | | | | | | | Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat: use AV_OPT_TYPE_BOOL in a bunch of placesClément Bœsch2015-12-041-1/+1
| |
* | avformat/hdsenc: Change duration from single to to double precisionMichael Niedermayer2015-06-081-1/+1
| | | | | | | | | | | | This slightly improves precision Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/hdsenc: Remove redundant NULL pointer checksMichael Niedermayer2015-01-091-3/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/hdsenc: Simplify code by using avio_closep()Michael Niedermayer2015-01-081-4/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/hdsenc: Use av_freep() avoid leaving stale pointers in memoryMichael Niedermayer2014-12-161-6/+6
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '675ac56b7ee0f204963fde55295197c5df80aa91'Michael Niedermayer2014-11-271-10/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * commit '675ac56b7ee0f204963fde55295197c5df80aa91': Revert "lavf: Don't try to update files atomically with renames on windows" Conflicts: libavformat/dashenc.c libavformat/hdsenc.c libavformat/internal.h libavformat/smoothstreamingenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Revert "lavf: Don't try to update files atomically with renames on windows"Martin Storsjö2014-11-271-10/+6
| | | | | | | | | | | | | | | | | | This reverts commit b9d08c77a44390b0848c06f20bc0e9e951ba6a3c. After taking MoveFileEx into use, we can replace files with renames on windows as well. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'b9d08c77a44390b0848c06f20bc0e9e951ba6a3c'Michael Niedermayer2014-11-251-6/+10
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * commit 'b9d08c77a44390b0848c06f20bc0e9e951ba6a3c': lavf: Don't try to update files atomically with renames on windows Conflicts: libavformat/dashenc.c libavformat/hdsenc.c libavformat/internal.h libavformat/smoothstreamingenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: Don't try to update files atomically with renames on windowsMartin Storsjö2014-11-241-6/+10
| | | | | | | | | | | | | | | | | | On windows, rename(2) will fail if the target file exists. On unix this trick is used to make sure that people reading the file either will get the full previous file, or the full new version of the file, but no intermediate version. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '7fd10f66b722eccc2ada9128766d002f6d751f79'Michael Niedermayer2014-11-191-0/+1
|\ \ | |/ | | | | | | | | | | * commit '7fd10f66b722eccc2ada9128766d002f6d751f79': hdsenc: Clear the previous codec tag when setting up the chained muxer Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hdsenc: Clear the previous codec tag when setting up the chained muxerMartin Storsjö2014-11-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The chained flv muxer wants one set of tags - normally this set could be signaled via the AVOutputFormat codec_tag field (as smoothstreamingenc and dashenc do). hdsenc doesn't signal it, since the FLV codec tag arrays aren't exported from flvenc.c. This can lead to the caller keeping an original codec tag from the originating container here, which would then be a mismatch for the FLV muxer. Since we don't really care about what codec tag the caller might have set, just clear it and let the lavf muxer layer set the right one for the chained FLV muxer later instead. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'f918b8a2933a65020cbe490ec637d5485c11a692'Michael Niedermayer2014-11-191-1/+1
|\ \ | |/ | | | | | | | | | | * commit 'f918b8a2933a65020cbe490ec637d5485c11a692': hdsenc: Use the right filename in an error message Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hdsenc: Use the right filename in an error messageMartin Storsjö2014-11-191-1/+1
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/hdsenc: Read errno before av_log() as the callback from av_log() ↵Michael Niedermayer2014-10-251-1/+1
| | | | | | | | | | | | might affect errno Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: Print error message on failure of ff_rename()Michael Niedermayer2014-10-251-3/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '7785ce1c769369abf85b276148548a5510aabb5f'Michael Niedermayer2014-10-251-14/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * commit '7785ce1c769369abf85b276148548a5510aabb5f': lavf: replace rename() with ff_rename() Conflicts: libavformat/hdsenc.c libavformat/internal.h See: 95d2fc6a76f3e0a98329f1ca70f98e7c085f0abf Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: replace rename() with ff_rename()Luca Barbato2014-10-241-5/+5
| | | | | | | | | | | | | | | | | | The new function wraps errno so that its value is correctly reported when other functions overwrite it (eg. in case of logging). CC: libav-stable@libav.org Bug-Id: CID 1135748 Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '28816050e47b6dba430a52e429d21a864cffda8e'Michael Niedermayer2014-10-071-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | * commit '28816050e47b6dba430a52e429d21a864cffda8e': lavf: Set the stream time base hint properly for chained muxers Conflicts: libavformat/segment.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: Set the stream time base hint properly for chained muxersMartin Storsjö2014-10-061-0/+1
| | | | | | | | | | | | | | This avoids warnings about using the codec time base as time base hint. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '803e82276b3716bf6012ec69e8854dae14a4fd2b'Michael Niedermayer2014-09-081-7/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * commit '803e82276b3716bf6012ec69e8854dae14a4fd2b': libavformat: Check mkdir return error codes Conflicts: libavformat/hdsenc.c libavformat/smoothstreamingenc.c See: c89f8f80cc83622471eaf99e451e78df68475e19 See: a3886ea3c5947ca05bfe01b053d9ce2f9725d9eb Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * libavformat: Check mkdir return error codesMartin Storsjö2014-09-071-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the returned error codes were intentionally ignored (see fadd3a68213), to avoid aborting if the directory already existed. If the mkdir actually failed, this was caught when opening files within the directory fails anyway. By handling the error code here (but explicitly ignoring EEXIST), the error messages and return codes in these cases are more appropriate and less confusing. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/mux: support re-interleaving packets in ff_write_chained()Michael Niedermayer2014-07-241-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/hdsenc: Use av_mallocz_array()Michael Niedermayer2014-06-301-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/hdsenc: check mkdir() return codeMichael Niedermayer2014-01-311-1/+8
| | | | | | | | | | | | | | | | | | This also returns failure if the mkdir failure is not due to an already existing path. Fixed CID1135749 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '797f2a791397210ec1b591b326658805c5dbf104'Michael Niedermayer2013-12-141-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '797f2a791397210ec1b591b326658805c5dbf104': hdsenc: Check the init_file() return code hdsenc: Fix an off by one error in an array size check hdsenc: Avoid integer overflow Conflicts: libavformat/hdsenc.c See: 572965c9a6b8173d918dea392aadfee1d44d7f47 See: 3dbf9afe857d480993786bea0ede9dd9526776d2 See: 6722e564a82bac471d92b02550b5017c09b539ba Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hdsenc: Check the init_file() return codeMichael Niedermayer2013-12-141-1/+3
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * hdsenc: Fix an off by one error in an array size checkMichael Niedermayer2013-12-141-1/+1
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * hdsenc: Avoid integer overflowMichael Niedermayer2013-12-141-1/+1
| | | | | | | | | | | | Also remove a silly leftover pair of parentheses. Signed-off-by: Martin Storsjö <martin@martin.st>
* | libavformat/hdsenc: check init_file() return codeMichael Niedermayer2013-12-121-1/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/hdsenc: fix off by 1 error in array size checkMichael Niedermayer2013-12-111-1/+1
| | | | | | | | | | | | Fixes CID1135763, CID1135764 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/hdsenc: fix unintentional integer overflow in hds_write_packet()Michael Niedermayer2013-12-111-1/+1
| | | | | | | | | | | | Fixes CID1135762 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/hdsenc: Check rename() return valueMichael Niedermayer2013-12-111-3/+12
| | | | | | | | | | Fixes CID1135748 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-11-021-4/+4
|/ | | | | | | | | | | * qatar/master: Add an HDS live fragmenting muxer Conflicts: Changelog libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
* Add an HDS live fragmenting muxerMartin Storsjö2013-11-021-0/+589
HDS fragments basically are FLV fragments wrapped in an ISO media mdat atom. Signed-off-by: Martin Storsjö <martin@martin.st>
OpenPOWER on IntegriCloud