summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec.h
Commit message (Collapse)AuthorAge
* rtpdec: Increase the max size of the jitter buffer to 500 packetsMartin Storsjö2015-09-15
| | | | | | | | | | Since the actual max length of the jitter buffer is restricted by max_delay, this shouldn't harm the overall latency (assuming that max_delay is set properly), while allowing packet reordering with a larger number of packets (which may be required with high bitrate video). Signed-off-by: Martin Storsjö <martin@martin.st>
* 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: Free depacketizers if the init function failedMartin Storsjö2015-02-24
| | | | | | | | | | | | | | This is different from how it is handled in codecs/demuxers/muxers though (where the close function isn't called if the open function failed), but since the number of depacketizers that have an .init function is quite limited, this is easy to change. The main point is that if the init function failed, we shouldn't try to use that depacketizer at all - this makes sure that the parse function doesn't need to check for the things that were initialized in the init function. 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: Remove the now unused .alloc fieldMartin Storsjö2015-02-24
| | | | | | Always use the .priv_data_size field instead. 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: Allow allocating and freeing the private data without explicit functionsMartin Storsjö2015-02-24
| | | | | | This can reduce the amount of boilerplate in simple depacketizers. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Allow setting the need_parsing field in RTPDynamicProtocolHandlerMartin Storsjö2015-02-24
| | | | | | | | | | This allows getting rid of quite a bit of boilerplate in depacketizers. The default value (initializing need_parsing to 0, aka AVSTREAM_PARSE_NONE) is the same as it is initialized to by default in AVStream. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Change enc_name to a pointer instead of a fixed-size bufferMartin Storsjö2015-02-24
| | | | | | | This avoids allocating space for a too large buffer for all the name strings. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: pass an AVFormatContext to ff_parse_fmtp()Anton Khirnov2014-07-09
| | | | Use it for logging, instead of NULL or the stream codec context.
* lavf: do not export av_register_{rtp,rdt}_dynamic_payload_handlers from ↵Anton Khirnov2013-10-28
| | | | shared objects
* rtpproto: Move rtpproto specific function declarations to a separate headerMartin Storsjö2013-07-31
| | | | | | | Mixing these with the rtp depacketizer functions in rtpdec.h is no good. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Increase max rtp packet size to 8192Andrew Van Til2013-04-09
| | | | | | This fixes connecting to "Ceton InfiniTV4 PCIe & USB". Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Split mpegts parsing to a normal depacketizerMartin Storsjö2013-01-20
| | | | | | | This gets rid of a number of special cases from the common rtpdec code. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Support decryption of SRTP signalled via RFC 4568 (SDES)Martin Storsjö2013-01-15
| | | | | | | | | | | | | | This only takes care of decrypting incoming packets; the outgoing RTCP packets are not encrypted. This is enough for some use cases, and signalling crypto keys for use with outgoing RTCP packets doesn't fit as simply into the API. If the SDP demuxer is hooked up with custom IO, the return packets can be encrypted e.g. via the SRTP protocol. If the SRTP keys aren't available within the SDP, the decryption can be handled externally as well (when using custom IO). Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Make variables that should wrap unsignedMartin Storsjö2013-01-14
| | | | | | | This makes the behaviour defined when they wrap around. The value assigned to expected_prior was a uint32_t already. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Send a valid "delay since SR" value in the RTCP RR packetsMartin Storsjö2013-01-12
| | | | | | | | | | | Previously, we always signalled a zero time since the last RTCP SR, which is dubious. The code also suggested that this would be the difference in RTP NTP time units (32.32 fixed point), while it actually is in in 1/65536 second units. (RFC 3550 section 6.4.1) Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Support sending RTCP feedback packetsMartin Storsjö2013-01-08
| | | | | | | | | | | | | | | | | | | | | This sends NACK for missed packets and PLI (picture loss indication) if a depacketizer indicates that it needs a new keyframe, according to RFC 4585. This is only enabled if the SDP indicated that feedback is supported (via the AVPF or SAVPF profile names). The feedback packets are throttled to a certain maximum interval (currently 250 ms) to make sure the feedback packets don't eat up too much bandwidth (which might be counterproductive). The RFC specifies a more elaborate feedback packet scheduling. The feedback packets are currently sent independently from normal RTCP RR packets, which is not totally spec compliant, but works fine in the environments I've tested it in. (RFC 5506 allows this, but requires a SDP attribute for enabling it.) Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Store the dynamic payload handler in the rtpdec contextMartin Storsjö2013-01-08
| | | | | | | This allows calling other dynamic payload handler functions if needed. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Add support for depacketizing RTP data via custom IOMartin Storsjö2013-01-03
| | | | | | | | | | | | | | | | | | To use this, set sdpflags=custom_io to the sdp demuxer. During the avformat_open_input call, the SDP is read from the AVFormatContext AVIOContext (ctx->pb) - after the avformat_open_input call, during the av_read_frame() calls, the same ctx->pb is used for reading packets (and sending back RTCP RR packets). Normally, one would use this with a read-only AVIOContext for the SDP during the avformat_open_input call, then close that one and replace it with a read-write one for the packets after the avformat_open_input call has returned. This allows using the RTP depacketizers as "pure" demuxers, without having them tied to the libavformat network IO. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Move the URLContext used for RTCP RR out from the context, to a ↵Martin Storsjö2013-01-03
| | | | | | parameter 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: Cosmetic cleanup of the headerMartin Storsjö2012-12-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Get rid of a useless _s suffix on a struct nameMartin Storsjö2012-12-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec/enc: Remove outdated/useless/misleading commentsMartin Storsjö2012-12-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Improve some commentsMartin Storsjö2012-12-12
| | | | | | | The previous comment about the buffer was wildly inaccurate and misleading. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Remove unused context variablesMartin Storsjö2012-12-12
| | | | | | | These stem from back when both the rtp muxer and rtp depacketizing shared the same struct. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: factorize identical code used in several handlersAnton Khirnov2012-11-02
|
* Give all anonymously typedeffed structs in headers a nameDiego Biurrun2012-10-06
| | | | Anonymous structs cannot be forward declared and have no benefit.
* rtp: remove ff_rtp_get_rtcp_file_handle().Jordi Ortiz2012-08-17
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* rtpdec: Add an init function that can do custom codec context initializationMartin Storsjö2011-11-30
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: unwrap RTP timestamps for PTS calculationJohn Brooks2011-11-18
| | | | | | The timestamp field in RTPDemuxContext was unused before this. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Add ff_ prefix to all nonstatic symbolsMartin Storsjö2011-10-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: Rename the open/close functions to alloc/freeMartin Storsjö2011-04-24
| | | | | | | This avoids clashes if we internally want to override the global open function. Signed-off-by: Martin Storsjö <martin@martin.st>
* avio: make URLContext internal.Anton Khirnov2011-04-08
|
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Make RTPFirstDynamicPayloadHandler static to rtpdec.cDiego Elio Pettenò2011-01-25
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* rtpdec: Emit timestamps for packets before the first RTCP packet, tooMartin Storsjö2011-01-01
| | | | | | | | Emitted timestamps in each stream start from 0, for the first received RTP packet. Once an RTCP packet is received, that one is used for sync, emitting timestamps that fit seamlessly into the earlier ones. Originally committed as revision 26187 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Add functions for finding depacketizers by name or payload idMartin Storsjö2010-12-05
| | | | Originally committed as revision 25891 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Allow dynamic payload handlers to handle static payload types, tooMartin Storsjö2010-12-05
| | | | Originally committed as revision 25890 to svn://svn.ffmpeg.org/ffmpeg/trunk
* drop rtp_get_file_handles() which is not part of public API and not used anymoreAurelien Jacobs2010-10-23
| | | | Originally committed as revision 25556 to svn://svn.ffmpeg.org/ffmpeg/trunk
* drop rtp_get_local_port() which is not part of public API and not used anymoreAurelien Jacobs2010-10-23
| | | | Originally committed as revision 25555 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Reorder received RTP packets according to the seq numberMartin Storsjö2010-10-01
| | | | | | Reordering is enabled only when receiving over UDP. Originally committed as revision 25294 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtsp/rtpdec: Allow rtp_parse_packet to take ownership of the packet bufferMartin Storsjö2010-10-01
| | | | | | | Do the same change for ff_rdt_parse_packet, too, to keep the interfaces similar. Originally committed as revision 25289 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add rtp_get_rtcp_file_handle functionJosh Allmann2010-08-25
| | | | | | Patch by Josh Allmann, joshua dot allmann at gmail Originally committed as revision 24929 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move SPACE_CHARS back to libavformat/internal.hMartin Storsjö2010-07-16
| | | | | | It will be used by other parts of lavf now. This reverts svn rev 23846. Originally committed as revision 24265 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Allow depacketizers to specify that pkt->pts should be left as ↵Martin Storsjö2010-07-14
| | | | | | AV_NOPTS_VALUE Originally committed as revision 24234 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Add generic function for iterating over FMTP configuration linesJosh Allmann2010-06-28
| | | | | | | | This will be used for cleaning up code that is common among RTP depacketizers. Patch by Josh Allmann, joshua dot allmann at gmail Originally committed as revision 23847 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Move space_chars from avformat/internal to rtpdecJosh Allmann2010-06-28
| | | | | | Patch by Josh Allmann, joshua dot allmann at gmail Originally committed as revision 23846 to svn://svn.ffmpeg.org/ffmpeg/trunk