summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_h264.c
Commit message (Collapse)AuthorAge
* cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* rtpdec_h264: Use avpriv_report_missing_feature instead of a manual av_logMartin Storsjö2016-04-30
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Use AVERROR_PATCHWELCOME instead of AVERROR(ENOSYS) for ↵Martin Storsjö2016-04-30
| | | | | | unimplemented features Signed-off-by: Martin Storsjö <martin@martin.st>
* 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.
* lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* rtpdec: Rename the free method to closeMartin Storsjö2015-02-24
| | | | | | | | | Many of these functions were named foo_free_context, and since the functions no longer should free the context itself, only allocated elements within it, the previous naming was slightly misleading. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Don't free the payload context in the .free functionMartin Storsjö2015-02-24
| | | | | | | | | | | | | | This makes it more consistent with depacketizers that don't have any .free function at all, where the payload context is freed by the surrounding framework. Always free the context in the surrounding framework, having the individual depacketizers only free any data they've specifically allocated themselves. This is similar to how this works for demuxer/muxers/codecs - a component shouldn't free the priv_data that the framework has allocated for it. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Don't pass non-const pointers to fmtp attribute parsing functionsMartin Storsjö2015-02-24
| | | | | | | This makes it clear that the individual parsing functions can't touch the parsed out value. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Add const to string parameters in internal fmtp parsing functionsMartin Storsjö2015-02-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_hevc: Share the implementation of fragmented packets with h264Martin Storsjö2015-02-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_hevc: Share the implementation of parsing a=framesize with h264Martin Storsjö2015-02-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Get rid of all trivial .alloc/.free functionsMartin Storsjö2015-02-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Set need_parsing via a handler fieldMartin Storsjö2015-02-24
| | | | | | | This avoids implementing a full function just to set this one field. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Remove an unnecessary includeMartin Storsjö2015-02-24
| | | | | | Nothing in this file use any network functions. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Remove unnecessary struct paddingMartin Storsjö2015-02-24
| | | | | | | There's no point in adding padding in the allocation of a depacketizer specific context struct. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Add missing trailing commasMartin Storsjö2015-02-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_hevc: Skip 1 byte (DOND) instead of 2 (DONL) between aggregation unitsMartin Storsjö2015-02-23
| | | | | | | Only the first aggregation unit has 2 bytes (DONL) prepended, if such a field is in use. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Add a missing closing paren in a log messageMartin Storsjö2015-02-21
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Make reusable functions non-staticMartin Storsjö2015-02-21
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Fix nal type counting after refactoringMartin Storsjö2015-02-21
| | | | | | This fixes builds with -DDEBUG after f0a874799. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Prepare h264_handle_packet_stap_a for sharing with hevcMartin Storsjö2015-02-21
| | | | | | Add a parameter for skipping a number of bytes at the start of each nal. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Generalize parse_sprop_parameter_setsMartin Storsjö2015-02-21
| | | | | | | Don't write directly into an AVCodecContext, write into given pointers. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Move a leftover comment into h264_handle_packet_stap_aMartin Storsjö2015-02-20
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Remove an unnecessary checkMartin Storsjö2015-02-20
| | | | | | | | If src_len is too small for nal_size, we already print a warning above, and the next step is to check the while loop condition anyway, so this one serves no purpose. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Return immediately on errors in h264_handle_packet_stap_aMartin Storsjö2015-02-20
| | | | | | | Previously, errors were only logged but the code kept on trying, and never actually returning the error as a return value. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Make a parameter pointer constMartin Storsjö2015-02-20
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Use av_realloc instead of av_malloc+mempcyMartin Storsjö2015-02-20
| | | | | | This is similar to what was done for rtpdec_hevc in ced7238cd01. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Include the right header for AV_RB16Martin Storsjö2015-02-20
| | | | | | | Including libavcodec/get_bits.h is superfluous for AV_RB16 - nothing in this file uses any actual bitstream reader. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: h264: Drop the assertsLuca Barbato2015-02-15
|
* rtp: h264: Move FU-A NAL parsing to a functionLuca Barbato2015-02-15
|
* rtp: h264: Move STAP-A NAL parsing to a functionLuca Barbato2015-02-15
|
* rtp: h264: Move parse_sprop_parameter_sets parsing to a functionLuca Barbato2015-02-15
|
* rtp: h264: Move profile_level_id parsing to a functionLuca Barbato2015-02-15
|
* rtpdec: pass an AVFormatContext to ff_parse_fmtp()Anton Khirnov2014-07-09
| | | | Use it for logging, instead of NULL or the stream codec context.
* rtpdec_h264: Check the return value of functions doing allocationsMichael Niedermayer2013-12-14
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat: Add av_cold attributes to init functions missing themDiego Biurrun2013-05-05
|
* rtpdec: Move setting the parsing flags to the actual depacketizersMartin Storsjö2013-01-20
| | | | | | | This gets rid of almost all the codec specific details from the generic rtpdec code. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Pass the sequence number to depacketizersMartin Storsjö2012-12-21
| | | | | | This allows depacketizers to figure out if packets have been lost. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Don't set the pixel formatSamuel Pitoiset2012-08-28
| | | | | | | There is no need for this depacketizer to set the pixel format, the decoder can do that just fine. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Remove an unused includeMartin Storsjö2012-08-09
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* lavf: remove unnecessary inclusions of unistd.hMans Rullgard2012-06-20
| | | | | | These files do not use anything provided by unistd.h. Signed-off-by: Mans Rullgard <mans@mansr.com>
* rtpdec_h264: Add missing newlines to av_log callsMartin Storsjö2012-05-05
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Free old extradata before clearing the pointerMartin Storsjö2012-05-05
| | | | | | | This avoids memory leaks if there actually was some extradata set before. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Reorder code blocksMartin Storsjö2012-05-05
| | | | | | This removes one level of indentation. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Make start_sequence a static const arrayMartin Storsjö2012-05-05
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Cleanup debug packet type countingMartin Storsjö2012-05-05
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Cosmetic cleanupMartin Storsjö2012-05-05
| | | | | | | Add/fix spacing, split long lines, align assignments where suitable. Signed-off-by: Diego Biurrun <diego@biurrun.de> Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Clean up commentsMartin Storsjö2012-05-05
| | | | | | | | | Split long comments, move long comments at the end of lines to separate lines above, fix vertical alignment, fix up comment style (unify trailing dots - comments had a mix of 2, 3 or 4 dots, where it would be just as good without them at all). Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Convert commented out code into setting an unused variableMartin Storsjö2012-05-05
| | | | | | | It is worth keeping instead of removing, in case reading this bit becomes necessary at some later point. Signed-off-by: Martin Storsjö <martin@martin.st>