Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-10-28Use ISO C printf conversion specifiers where appropriateDiego Biurrun
2016-10-28Adjust printf conversion specifiers to match variable signednessDiego Biurrun
2016-05-04cosmetics: Fix spelling mistakesVittorio Giovara
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-02-23lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov
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.
2015-04-19Replace av_dlog with normal av_log at trace levelVittorio Giovara
This applies to every library where performance is not critical.
2015-02-28rtpenc: Don't set max_frames_per_packet based on the packet frame size or ↵Martin Storsjö
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>
2015-02-28rtpenc: Skip redundant initializationMartin Storsjö
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28rtpenc: Always do the default initialization regardless of codecsMartin Storsjö
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>
2015-02-28rtpenc_xiph: Don't exclude headers from max_payload_sizeMartin Storsjö
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>
2015-02-28rtpenc: Write conditional statements on separate linesMartin Storsjö
Intentionally keeping some conditional statements on single lines in rtpenc_h263.c. Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28rtpenc_aac: Set a default value for max_frames_per_packet at initMartin Storsjö
This avoids having to conditionally set the default within the packetizer function. Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24rtpenc: Merge the h264 and hevc packetizersMartin Storsjö
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>
2014-12-19rtp: Initial H.261 supportThomas Volkert
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>
2014-12-19rtpenc: Avoid brittle switch fallthroughsMartin Storsjö
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>
2014-12-18rtpenc: Set the AVFMT_TS_NONSTRICT flagMartin Storsjö
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>
2014-12-18rtpenc: Set the timestamp properly when sending mpegts data, tooMartin Storsjö
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-09-25rtpenc: HEVC/H.265 supportThomas Volkert
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-08-15cosmetics: Write NULL pointer equality checks more compactlyGabriel Dume
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-06-18rtpenc: base max_frames_per_packet on avg_frame_rate, not codec timebaseAnton Khirnov
Fall back to 1 (which is what is used for most cases anyway) when the framerate is not set.
2013-11-01rtpenc: Add a rtpflag option for sending BYE packets when finishingMartin Storsjö
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-11-01rtpenc: Remove some superfluous parenthesesMartin Storsjö
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-31rtpenc: Simplify code by introducing a macro for rescaling NTP timestampsMartin Storsjö
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-16Remove commented-out debug #define cruftDiego Biurrun
2013-01-22rtpenc: Start the sequence numbers from a random offsetMartin Storsjö
Expose the current sequence number via an AVOption - this can be used both for setting the initial sequence number, or for querying the current number. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-16rtpenc: Allow including a SDES/CNAME block in RTCP SR packetsMartin Storsjö
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-14rtp: set the payload type as stream idLuca Barbato
Support multiple video/audio streams with different format in the same session. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-10-09rtp: Support packetization/depacketization of opusMartin Storsjö
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-09rtpenc_vp8: Update the packetizer to the latest spec versionMartin Storsjö
Tested to work with the gstreamer depacketizer. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-26rtpenc: Add support for packetizing speexDmitry Samonenko
This packetization scheme simply places the full packets into the RTP packet without any extra header bytes. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-23rtp: Packetization of JPEG (RFC 2435)Samuel Pitoiset
2012-09-05avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union memberMartin Storsjö
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-09rtpenc: Remove an av_abort() that depends on user-supplied dataMartin Storsjö
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-07Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov
2012-07-30avformat: Drop pointless "format" from container long namesDiego Biurrun
2012-07-21rtsp: remove terminal comma in FF_RTP_FLAG_OPTS macro.Ronald S. Bultje
This makes usage of the macro look more natural when used with array entries. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-06-18rtpenc: Support packetizing iLBCMartin Storsjö
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-17rtpenc: Fix memory leaks in the muxer open functionMartin Storsjö
Also return a proper error code in these cases. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-26rtpenc: Expose the ssrc as an avoptionMartin Storsjö
This allows the caller to set it, and allows the caller to query what it was set to. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-06cosmetics: Align muxer/demuxer declarationsMartin Storsjö
Also add missing trailing commas, break long codec_tag lines and add spaces in codec_tag declarations. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-20libavformat: Set the default for the max_delay option to -1Martin Storsjö
Make the muxers/demuxers that use the field handle the default -1 in the same way as 0. This allows distinguishing an intentionally set 0 from the default value where the user hasn't set it. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-19rtpenc: Use AVFormatContext.packet_size instead of a private optionMartin Storsjö
The private option has not been part of any release yet (and it is only of use in quite rare cases), so just remove it instead of keeping it with deprecation warnings. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-08rtpenc: Fix the AVRational used for av_rescale_q_rndMartin Storsjö
The current one has a zero denominator - this is what was intended in 14aecc50fae6. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-05rtpenc: use av_get_audio_frame_duration() for max_frames_per_packetJustin Ruggles
It is more reliable than AVCodecContext.frame_size for codecs with constant packet duration.
2012-03-01rtpenc: Use MB info side data for splitting H263 packets for RFC 2190Martin Storsjö
This makes the packetization spec compliant for cases where one single GOB doesn't fit into an RTP packet. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-29rtpenc: Fix setting the max packet sizeMartin Storsjö
This fixes cases where the user had specified one desired MTU via an option, and the protocol indicates another one. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-23rtpenc: Expose the max packet size via an avoptionMartin Storsjö
This allows opting for a lower MTU than what the AVIOContext indicated, and allows writing into outputs that don't indicate an MTU at all (such as plain files, which is useful for testing). This also allows querying for the MTU via the avoption. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-23rtpenc: Move max_packet_size to a context variableMartin Storsjö
This is in preparation for exposing this via an avoption. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-23rtpenc: Add an option for not sending RTCP packetsMartin Storsjö
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-23rtpenc: Add an error messageMartin Storsjö
Also return a proper error code. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-23rtpenc: Allow packetizing H263 according to the old RFC 2190Martin Storsjö
According to newer RFCs, this packetization scheme should only be used for interfacing with legacy systems. Implementing this packetization mode properly requires parsing the full H263 bitstream to find macroblock boundaries (and knowing their macroblock and gob numbers and motion vector predictors). This implementation tries to look for GOB headers (which can be inserted by using -ps <small number>), but if the GOBs aren't small enough to fit into the MTU, the packetizer blindly splits packets at any offset and claims it to be a GOB boundary (by using Mode A from the RFC). While not correct, this seems to work with some receivers. Signed-off-by: Martin Storsjö <martin@martin.st>