summaryrefslogtreecommitdiff
path: root/libavformat/rtpenc.c
Commit message (Collapse)AuthorAge
* Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-21
|\ | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | rtpenc: packetizer for VP9 RTP payload format (draft v2)Thomas Volkert2016-06-13
| |
* | rtpenc: packetizer for VC-2 HQ RTP payload format (draft v1)Thomas Volkert2016-05-03
| |
* | 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.
* | avformat/rtpenc: Fix integer overflow in NTP_TO_RTP_FORMATBoris Nagels2016-03-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | RTCP synchronization packet was broken since commit in ffmpeg version > 2.8.3 (commit: e04b039b1528f4c7df5c2b93865651bfea168a19) Since this commit (2e814d0329aded98c811d0502839618f08642685) "rtpenc: Simplify code by introducing a macro for rescaling NTP timestamps", NTP_TO_RTP_FORMAT uses av_rescale_rnd() function to add the data to the packet. This causes an overflow in the av_rescale_rnd() function and it will return INT64_MIN. Causing the NTP stamp in the RTCP packet to have an invalid value. Github: Closes #182 Reverting commit '2e814d0329aded98c811d0502839618f08642685' solves the problem.
* | Revert "avformat/rtpenc: check av_packet_get_side_data() return, fix null ↵Michael Niedermayer2015-06-03
| | | | | | | | | | | | | | | | | | ptr dereference" This was simply wrong Found-by: Martin Storsjö This reverts commit 5d8e4f6da03c0342157e6ac7fab1a8ac3a87a8b0.
* | Merge commit '1a3eb042c704dea190c644def5b32c9cee8832b8'Michael Niedermayer2015-04-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1a3eb042c704dea190c644def5b32c9cee8832b8': Replace av_dlog with normal av_log at trace level Conflicts: ffplay.c libavdevice/fbdev_dec.c libavfilter/avfilter.c libavfilter/internal.h libavfilter/setpts.c libavfilter/src_movie.c libavfilter/vf_crop.c libavfilter/vf_drawtext.c libavfilter/vf_fieldorder.c libavformat/assdec.c libavformat/avidec.c libavformat/flvdec.c libavformat/http.c libavformat/ipmovie.c libavformat/isom.c libavformat/mov.c libavformat/mpegenc.c libavformat/mpegts.c libavformat/mpegtsenc.c libavformat/mux.c libavformat/mxfdec.c libavformat/nsvdec.c libavformat/oggdec.c libavformat/r3d.c libavformat/rtspdec.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace av_dlog with normal av_log at trace levelVittorio Giovara2015-04-19
| | | | | | | | This applies to every library where performance is not critical.
* | Merge commit '4f6cd883f06f7893a2b60a41e7a4f8ae633dac2f'Michael Niedermayer2015-03-01
|\| | | | | | | | | | | | | * commit '4f6cd883f06f7893a2b60a41e7a4f8ae633dac2f': rtpenc: Don't set max_frames_per_packet based on the packet frame size or frame rate Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc: Don't set max_frames_per_packet based on the packet frame size or ↵Martin Storsjö2015-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | frame rate Instead check the timestamps while muxing, to avoid buffering a too long timestamp range into one single packet. This makes the AMR and AAC packetization slightly less efficient, since we set a possibly unnecessarily high max_frames_per_packet. (These packetizers end up doing a memmove of the TOC bytes if sending a packet before max_frames_per_packet is achieved, and we end up setting max_frames_per_packet to a value that should be high enough for most uses.) All packetizers that use max_frames_per_packet now set it either to a default value, or to a value calculated based on other parameters, so none of them rely on the previous default setting. For iLBC, copy one frame at a time, to allow checking the timestamp range for each of them - basically doing potentially multiple loops to simplify the code instead of trying to calculate the number of frames to buffer while honoring s1->max_delay. This is in preparation for reducing the coupling between libavformat and libavcodec, by not having the muxers use the encoder field frame_size (which may not be available during e.g. stream copy). Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'd4c7fc02f9f59e721e76debf4a595df529707545'Michael Niedermayer2015-03-01
|\| | | | | | | | | | | | | * commit 'd4c7fc02f9f59e721e76debf4a595df529707545': rtpenc: Skip redundant initialization Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc: Skip redundant initializationMartin Storsjö2015-02-28
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'f8c01257f93ceda3e03bc4e540a51022d1e2bff2'Michael Niedermayer2015-03-01
|\| | | | | | | | | | | | | * commit 'f8c01257f93ceda3e03bc4e540a51022d1e2bff2': rtpenc: Always do the default initialization regardless of codecs Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc: Always do the default initialization regardless of codecsMartin Storsjö2015-02-28
| | | | | | | | | | | | | | | | This avoids having to jump to the defaultcase in the switch. Manually override the stream time base back to 90 kHz for the few audio codecs that don't use the sample rate as time base (mp2, mp3). Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '11edeaea3293c41ecf577a330422eabba35f76a2'Michael Niedermayer2015-03-01
|\| | | | | | | | | | | | | * commit '11edeaea3293c41ecf577a330422eabba35f76a2': rtpenc_xiph: Don't exclude headers from max_payload_size Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc_xiph: Don't exclude headers from max_payload_sizeMartin Storsjö2015-02-28
| | | | | | | | | | | | | | This makes things more consistent by using the variable in the same way as in all other packetizers. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '1fc64e2e07787bbca82a72c146588e850e6d098a'Michael Niedermayer2015-03-01
|\| | | | | | | | | | | | | * commit '1fc64e2e07787bbca82a72c146588e850e6d098a': rtpenc: Write conditional statements on separate lines Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc: Write conditional statements on separate linesMartin Storsjö2015-02-28
| | | | | | | | | | | | | | Intentionally keeping some conditional statements on single lines in rtpenc_h263.c. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '0662440b991361fdb5e732712d997a73e4692e34'Michael Niedermayer2015-03-01
|\| | | | | | | | | | | | | * commit '0662440b991361fdb5e732712d997a73e4692e34': rtpenc_aac: Set a default value for max_frames_per_packet at init Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc_aac: Set a default value for max_frames_per_packet at initMartin Storsjö2015-02-28
| | | | | | | | | | | | | | This avoids having to conditionally set the default within the packetizer function. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'c82bf15dca00f67a701d126e47ea9075fc9459cb'Michael Niedermayer2015-02-24
|\| | | | | | | | | | | | | | | | | | | * commit 'c82bf15dca00f67a701d126e47ea9075fc9459cb': rtpenc: Merge the h264 and hevc packetizers Conflicts: libavformat/rtpenc_hevc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc: Merge the h264 and hevc packetizersMartin Storsjö2015-02-24
| | | | | | | | | | | | | | | | | | | | | | They share a great deal of common structure; only a few minor bits in the headers differ. This also fixes an off-by-one in sending of the last fragment of large HEVC nals (where it previously sent len+2 bytes, even if it should have been len+RTP_HEVC_HEADERS_SIZE aka len+3). Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'a505c0d7373336a4cc5aa2022111c46bdd388b1f'Michael Niedermayer2014-12-19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a505c0d7373336a4cc5aa2022111c46bdd388b1f': rtp: Initial H.261 support Conflicts: Changelog libavformat/rtpdec_h261.c libavformat/rtpenc_h261.c libavformat/sdp.c libavformat/version.h See: 50a4d5cfc6749932347ee38c25b5040aea4b13a0 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtp: Initial H.261 supportThomas Volkert2014-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The packetizer only supports splitting at GOB headers - if such aren't available frequently enough, it splits at any random byte offset (not at a macroblock boundary either, which would be allowed by the spec) and sends a payload header pretend that it starts with a GOB header. As long as a receiver doesn't try to handle such cases cleverly but just drops broken frames, this shouldn't matter too much in practice. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'adc214e6797750285a5e62634b8521db521162ad'Michael Niedermayer2014-12-19
|\| | | | | | | | | | | | | * commit 'adc214e6797750285a5e62634b8521db521162ad': rtpenc: Avoid brittle switch fallthroughs Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc: Avoid brittle switch fallthroughsMartin Storsjö2014-12-18
| | | | | | | | | | | | | | | | | | Instead explicitly jump to the default case in the cases where it is wanted, and avoid fallthrough between different codecs, which could easily introduce bugs if people editing the code aren't careful. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '42181740a3972e17d0097d28fabc9a1a60322d47'Michael Niedermayer2014-12-18
|\| | | | | | | | | | | | | * commit '42181740a3972e17d0097d28fabc9a1a60322d47': rtpenc: Set the AVFMT_TS_NONSTRICT flag Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc: Set the AVFMT_TS_NONSTRICT flagMartin Storsjö2014-12-18
| | | | | | | | | | | | | | | | In particular, when packetizing mpegts into rtp, the input packet timestamp may come from more than one stream, which could cause multiple packets be written with the same timestamp. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '01f251c44d83eedc819625d2caac9ff9697a085d'Michael Niedermayer2014-12-18
|\| | | | | | | | | | | | | * commit '01f251c44d83eedc819625d2caac9ff9697a085d': rtpenc: Set the timestamp properly when sending mpegts data, too Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc: Set the timestamp properly when sending mpegts data, tooMartin Storsjö2014-12-18
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'ddf5fb71ee9c8b2d9a23c0f661a84896cd7050fc'Michael Niedermayer2014-09-25
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'ddf5fb71ee9c8b2d9a23c0f661a84896cd7050fc': rtpenc: HEVC/H.265 support Conflicts: Changelog libavformat/rtpenc.c libavformat/rtpenc_hevc.c libavformat/version.h See: 6821a5a4adcb40c458356e8bb90416dd8f5dd6b2 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc: HEVC/H.265 supportThomas Volkert2014-09-24
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | rtpenc: HEVC/H.265 supportThomas Volkert2014-09-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Add support for H.261 RTP payload format (RFC 4587)ThomasVolkert2014-08-24
| |
* | Merge commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39'Michael Niedermayer2014-08-15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39': cosmetics: Write NULL pointer equality checks more compactly Conflicts: cmdutils.c ffmpeg_opt.c ffplay.c libavcodec/dvbsub.c libavcodec/dvdsubdec.c libavcodec/dvdsubenc.c libavcodec/dxa.c libavcodec/libxvid_rc.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/rv10.c libavcodec/tiffenc.c libavcodec/utils.c libavcodec/vc1dec.c libavcodec/zmbv.c libavdevice/v4l2.c libavformat/matroskadec.c libavformat/movenc.c libavformat/sdp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Write NULL pointer equality checks more compactlyGabriel Dume2014-08-15
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit 'cfbdd7ffbd9fe14d110fd1bb89bf52f0f7bde016'Michael Niedermayer2014-06-18
|\| | | | | | | | | | | | | * commit 'cfbdd7ffbd9fe14d110fd1bb89bf52f0f7bde016': rtpenc: base max_frames_per_packet on avg_frame_rate, not codec timebase Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc: base max_frames_per_packet on avg_frame_rate, not codec timebaseAnton Khirnov2014-06-18
| | | | | | | | | | Fall back to 1 (which is what is used for most cases anyway) when the framerate is not set.
* | avformat/rtpenc: switch to AVFMT_FLAG_BITEXACTMichael Niedermayer2014-05-18
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: extracting NTP timestamp from RTCPFred Rothganger2014-03-12
| | | | | | | | | | | | | | | | For muxing, it accepts both 0 and AV_NOPTS_VALUE. For demuxing, it will present AV_NOPTS_VALUE when start_time_realtime is unknown. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/rtpenc: check av_packet_get_side_data() return, fix null ptr ↵Michael Niedermayer2013-12-13
| | | | | | | | | | | | | | | | dereference Fixes CID1035715 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '9ceed7af377cea6a430d63a2f5d5cf1afe0d4f05'Michael Niedermayer2013-11-01
|\| | | | | | | | | | | | | | | | | | | * commit '9ceed7af377cea6a430d63a2f5d5cf1afe0d4f05': rtpenc: Add a rtpflag option for sending BYE packets when finishing Conflicts: libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc: Add a rtpflag option for sending BYE packets when finishingMartin Storsjö2013-11-01
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'b264453de93999ea6f23e98014390af468f56146'Michael Niedermayer2013-11-01
|\| | | | | | | | | | | | | * commit 'b264453de93999ea6f23e98014390af468f56146': rtpenc: Remove some superfluous parentheses Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc: Remove some superfluous parenthesesMartin Storsjö2013-11-01
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '2e814d0329aded98c811d0502839618f08642685'Michael Niedermayer2013-08-01
|\| | | | | | | | | | | | | * commit '2e814d0329aded98c811d0502839618f08642685': rtpenc: Simplify code by introducing a macro for rescaling NTP timestamps Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc: Simplify code by introducing a macro for rescaling NTP timestampsMartin Storsjö2013-07-31
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'b3ea76624ad1baab0b6bcc13f3f856be2f958110'Michael Niedermayer2013-05-16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b3ea76624ad1baab0b6bcc13f3f856be2f958110': vf_aspect: use the name 's' for the pointer to the private context Remove commented-out debug #define cruft Conflicts: libavcodec/4xm.c libavcodec/dvdsubdec.c libavcodec/ituh263dec.c libavcodec/mpeg12.c libavfilter/avfilter.c libavfilter/vf_aspect.c libavfilter/vf_fieldorder.c libavformat/rtmpproto.c Merged-by: Michael Niedermayer <michaelni@gmx.at>