summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
Commit message (Collapse)AuthorAge
...
* 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>
* rtsp: Remove an outdated commentMartin Storsjö2013-01-12
| | | | | | | | It is unclear what the bug exactly was and if it ever was fixed, and we don't even support decoding via faad any longer. The comment has been present since d0deedcb in 2006. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Remove references to weirdly named variables in other filesMartin Storsjö2013-01-12
| | | | | | | | One of them is renamed now, but mentioning it by name serves no purpose here. The other table mentioned ceased to exist under that name in 4934884a1 in 2006. 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>
* rtsp: Respect max_delay for the reordering queue when using custom IOMartin Storsjö2013-01-08
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Recheck the reordering queue if getting a new packetMartin Storsjö2013-01-08
| | | | | | | | | | If we timed out and consumed a packet from the reordering queue, but didn't return a packet to the caller, recheck the queue status. Otherwise, we could end up in an infinite loop, trying to consume a queued packet that has already been consumed. CC: libav-stable@libav.org 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>
* rtp: set the payload type as stream idLuca Barbato2012-11-14
| | | | | | | Support multiple video/audio streams with different format in the same session. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rtsp: Avoid a cast when calling strtolMartin Storsjö2012-10-29
| | | | | | | | | This gets rid of this warning: libavformat/rtsp.c: In function ‘rtsp_parse_transport’: libavformat/rtsp.c:794: warning: cast discards qualifiers from pointer target type Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Make sure the ret variable is initialized in ff_rtsp_fetch_packetMartin Storsjö2012-10-20
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Allow setting the reordering buffer size via an AVOptionMartin Storsjö2012-10-18
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat: Remove non-compiling and/or silly commented-out printf/av_log ↵Diego Biurrun2012-10-01
| | | | statements
* avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union memberMartin Storsjö2012-09-04
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union memberMartin Storsjö2012-09-04
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union memberMartin Storsjö2012-09-04
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Free the rtpdec context properlyMartin Storsjö2012-08-27
| | | | | | | | | The condition for calling the rtpdec cleanup was broken in df8cf076c86. This fixes a memory leak. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp.c: use ffurl_get_multi_file_handle() instead of ↵Jordi Ortiz2012-08-17
| | | | | | ff_rtp_get_rtcp_file_handle() Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Support mpegts in raw udp packetsMartin Storsjö2012-08-09
| | | | | | | This is basically the same way as mpegts packets are parsed in rtpdec.c. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Support receiving plain data over UDP without any RTP encapsulationMartin Storsjö2012-08-09
| | | | | | | EvoStream Media Server can serve data in this format, and VLC/live555 already supports it. Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* avformat: Drop pointless "format" from container long namesDiego Biurrun2012-07-30
|
* Add missing libavutil/time.h includes.Anton Khirnov2012-07-28
|
* rtsp: remove terminal comma in FF_RTP_FLAG_OPTS macro.Ronald S. Bultje2012-07-21
| | | | | | | This makes usage of the macro look more natural when used with array entries. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* rtsp: Add listen modeJordi Ortiz2012-07-10
| | | | | | | This makes the RTSP demuxer act as a server, listening for an incoming connection. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Make rtsp_open_transport_ctx() non-staticJordi Ortiz2012-07-10
| | | | | | This is required for the upcoming RTSP listen mode. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Parse the mode=receive/record parameter in transport linesJordi Ortiz2012-07-10
| | | | | | | We need to support the nonstandard mode=receive, for compatibility with older libavformat clients. Signed-off-by: Martin Storsjö <martin@martin.st>
* Remove unnecessary inclusions of [sys/]time.hMans Rullgard2012-06-20
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* rtsp: Send mode=record instead of mode=receiveMartin Storsjö2012-06-18
| | | | | | | | | | This seems to be the correct mode to send, according to the original RTSP RFC, and matches the method RECORD which is sent later when starting to send data. Darwin Streaming Server works fine with either of them. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Check for dynamic payload handlers if no static payload mapping was foundMartin Storsjö2012-05-26
| | | | | | | Some systems abuse the static payload types 35 or 36 (which according to IANA are unassigned) for H264. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpenc_chain: Return an error code instead of just a plain pointerMartin Storsjö2012-05-26
| | | | | | Also check the return value in sapenc. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Add content-type message header parsingJordi Ortiz2012-05-08
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rtsp: avoid const warnings from strtol() callMans Rullgard2012-05-06
| | | | | | | | | The strtol() interface makes it difficult to use with const-qualified pointers. With this change, although the const is still lost, the compiler does not warn about it. Signed-off-by: Mans Rullgard <mans@mansr.com>
* rtsp: Don't use uninitialized data if there are no streamsMartin Storsjö2012-04-08
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Don't expose the MS-RTSP RTX data stream to the callerMartin Storsjö2012-04-08
| | | | | | | | This avoids exposing a dummy AVStream which won't get any data and which will make avformat_find_stream_info wait for info about this stream. Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace memset(0) by zero initializations.Diego Biurrun2012-03-28
| | | | Also remove one pointless zero initialization in rangecoder.c.
* rtsp: Set the default delay to 0.1 s for the RTSP/SDP/RTP demuxersMartin Storsjö2012-03-20
| | | | | | | This enables reordering of UDP packets by default, unless the caller explicitly sets -max_delay 0. Signed-off-by: Martin Storsjö <martin@martin.st>
* libavformat: Set the default for the max_delay option to -1Martin Storsjö2012-03-20
| | | | | | | | | | 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>
* cosmetics: Align some AVInput/OutputFormat declarationsMartin Storsjö2012-03-19
| | | | | | Also add missing trailing commas. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Retry authentication if failed due to being staleMartin Storsjö2012-03-13
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Fix a typoMartin Storsjö2012-03-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Only set the ttl parameter if the server actually gave a valueMartin Storsjö2012-03-09
| | | | | | | Passing ttl=0 to the rtp/udp url contexts makes packets never leave the host machine. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Handle requests from server to clientTommy Winther2012-02-27
| | | | | | | | | | | | This returns 200 OK for OPTIONS requests and 501 Not Implemented for all other requests. Even though this doesn't do much actual handling of the requests, it makes the code properly identify server requests as such, instead of interpreting it as a reply to the client's request as it did before. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpenc: Move the trailing comma into FF_RTP_FLAG_OPTSMartin Storsjö2012-02-23
| | | | | | This simplifies adding more flags to the macro. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: Factorize the check for distinguishing RTCP packets from RTPMartin Storsjö2012-02-16
| | | | | | The binary doesn't change after this patch. Signed-off-by: Martin Storsjö <martin@martin.st>
* sdp: Ignore RTCP packets when autodetecting RTP streamsMartin Storsjö2012-02-16
| | | | | | | | The rtp demuxer which listens for RTP packets and detects the RTP payload type will currently get confused if the first packet received is an RTCP packet. Thus ignore such packets. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Remove some unused variables from ff_rtsp_connect().Diego Biurrun2012-01-30
|
* cosmetics: Remove extra newlines at EOFAlex Converse2012-01-27
|
* lavf: remove disabled FF_API_RTSP_URL_OPTIONS cruftAnton Khirnov2012-01-27
|