summaryrefslogtreecommitdiffstats
path: root/libavformat/rtsp.c
Commit message (Collapse)AuthorAgeFilesLines
* rtsp: use strtoul to parse rtptime and seq values.Ilya2011-05-241-2/+2
| | | | | | | strtol could return negative values, leading to various error messages, mainly "non-monotonically increasing dts". Signed-off-by: Anton Khirnov <anton@khirnov.net>
* rtsp: Only do keepalive using GET_PARAMETER if the server supports itMartin Storsjö2011-05-111-0/+4
| | | | | | | | | | | | | | | | This is more like what VLC does. If the server doesn't mention supporting GET_PARAMETER in response to an OPTIONS request, VLC doesn't send any keepalive requests at all. After this patch, libavformat will still send OPTIONS keepalives if GET_PARAMETER isn't explicitly said to be supported. Some RTSP cameras don't support GET_PARAMETER, and will close the connection if this is sent as keepalive request (but support OPTIONS just fine, but probably don't need any keepalive at all). Some other cameras don't support using OPTIONS as keepalive, but require GET_PARAMETER instead. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: Rename the open/close functions to alloc/freeMartin Storsjö2011-04-241-3/+3
| | | | | | | This avoids clashes if we internally want to override the global open function. Signed-off-by: Martin Storsjö <martin@martin.st>
* avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbolsStefano Sabatini2011-04-191-8/+8
| | | | | | | | Make AVIO_FLAG_ access constants work as flags, and in particular fix the behavior of functions (such as avio_check()) which expect them to be flags rather than modes. This breaks API.
* avio: AVIO_ prefixes for URL_ open flags.Anton Khirnov2011-04-071-8/+8
|
* avio: make url_get_file_handle() internal.Anton Khirnov2011-04-041-4/+4
|
* avio: make url_close() internal.Anton Khirnov2011-04-041-5/+5
|
* avio: make url_write() internal.Anton Khirnov2011-04-041-2/+2
|
* avio: make url_read_complete() internal.Anton Khirnov2011-04-041-4/+4
|
* avio: make url_read() internal.Anton Khirnov2011-04-041-2/+2
|
* avio: make url_open() internal.Anton Khirnov2011-04-041-6/+6
|
* avio: make url_connect internal.Anton Khirnov2011-04-041-2/+2
|
* avio: make url_alloc internal.Anton Khirnov2011-04-041-2/+3
|
* avio: avio_ prefix for url_close_dyn_bufAnton Khirnov2011-04-031-1/+1
|
* rtsp: Specify unicast for TCP interleaved streams, tooMartin Storsjö2011-03-211-1/+1
| | | | | | | | | | According to the RFC, the default is multicast if nothing is specified, which doesn't make sense for TCP. According to a bug report, some Axis camera models give a "400 Bad Request" error if this is omitted. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-191-4/+4
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Use AVERROR_EXIT with url_interrupt_cb.Nicolas George2011-03-151-1/+1
| | | | | | | | | | | | | Functions interrupted by url_interrupt_cb should not be restarted. Therefore using AVERROR(EINTR) was wrong, as it did not allow to distinguish when the underlying system call was interrupted and actually needed to be restarted. This fixes roundup issues 2657 and 2659 (ffplay not exiting for streamed content). Signed-off-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: rename url_fopen/fclose -> avio_open/close.Anton Khirnov2011-02-231-1/+1
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* libavformat: Remove FF_NETERRNO()Martin Storsjö2011-02-231-2/+2
| | | | | | | | | | | | | | Map EAGAIN and EINTR from ff_neterrno to the normal AVERROR() error codes. Provide fallback definitions of other errno.h network errors, mapping them to the corresponding winsock errors. This eases catching these error codes in common code, without having to distinguish between FF_NETERRNO(EAGAIN) and AVERROR(EAGAIN). This fixes roundup issue 2614, unbreaking blocking network IO on windows. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: avio_ prefixes for get_* functionsAnton Khirnov2011-02-211-1/+1
| | | | | | | | | | | | | | In the name of consistency: get_byte -> avio_r8 get_<type> -> avio_r<type> get_buffer -> avio_read get_partial_buffer will be made private later get_strz is left out becase I want to change it later to return something useful. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: move init_put_byte() to a new private header and rename itAnton Khirnov2011-02-201-1/+2
| | | | | | | init_put_byte should never be used outside of lavf, since sizeof(AVIOContext) isn't part of public ABI. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: rename ByteIOContext to AVIOContext.Anton Khirnov2011-02-201-1/+1
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Replace remaining uses of parse_date with av_parse_time.Anton Khirnov2011-02-161-2/+3
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* rtsp: udp_read_packet returning 0 doesn't mean successMartin Storsjö2011-02-171-1/+1
| | | | | | | | If udp_read_packet returns 0, rtsp_st isn't set and we shouldn't treat it as a successfully received packet (which is counted and possibly triggers a RTCP receiver report). This fixes issue 2612.
* rtsp/rdt: Assign the RTSPStream index to AVStream->idMartin Storsjö2011-02-111-1/+1
| | | | | | | | | | | | This is used for mapping AVStreams back to their corresponding RTSPStream. Since d9c0510, the RTSPStream pointer isn't stored in AVStream->priv_data any longer, breaking this mapping from AVStreams to RTSPStreams. Also, we don't need to clear the priv_data in rdt cleanup any longer, since it isn't set to duplicate pointers. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Use avformat_free_context for cleaning up muxersMartin Storsjö2011-02-041-7/+1
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* libavformat: Use avcodec_copy_context for chained muxersMartin Storsjö2011-02-041-0/+2
| | | | | | | | | | | | | This avoids having the chained AVStream->codec point to the same AVCodecContext owned by the outer AVStream. The downside is that changes to the AVCodecContext made after calling av_write_header cannot be detected automatically within the chained muxer. This avoids having to manually unlink the chained AVStream->codec by setting it to null before freeing the chained muxer via generic freeing functions. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Free AVStream->info in chained muxersMartin Storsjö2011-02-031-0/+1
| | | | | | | This fixes memory leaks in the RTSP muxer and RTP hinting in the mov muxer present since SVN rev 25418. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rtsp: Don't store RTSPStream in AVStream->priv_dataMartin Storsjö2011-02-031-10/+6
| | | | | | | | | | | | | | | | For mpegts in RTP, there isn't a direct mapping between RTSPStreams and AVStreams, and the RTSPStream isn't ever stored in AVStream->priv_data, which was earlier leaked. The fix for this leak, in ea7f080749d68a431226ce196014da38761a0d82, lead to double frees for other, normal RTP streams. This patch avoids storing RTSPStreams in AVStream->priv_data, thus avoiding the double free. The RTSPStreams are always available via RTSPState->rtsp_streams anyway. Tested with MS-RTSP, RealRTSP, DSS and mpegts/RTP. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* Free the RTSPStreams in ff_rtsp_close_streamsLuca Barbato2011-02-011-0/+1
| | | | | | This plugs a small memory leak Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
* Replace dprintf with av_dlogLuca Barbato2011-01-291-5/+5
| | | | dprintf clashes with POSIX.1-2008
* rtsp: make ff_sdp_parse return value forwardedLuca Barbato2011-01-281-1/+2
| | | | | the sdp demuxer did not forward it at all while the rtsp demuxer assumed a single kind of error
* os: replace select with pollLuca Barbato2011-01-281-25/+30
| | | | | Select has limitations on the fd values it could accept and silently breaks when it is reached.
* Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.Diego Elio Pettenò2011-01-261-2/+2
| | | | | This also lists the objects from those two libraries as internal (by adding the ff_ prefix) so that they can then be hidden via linker scripts.
* Make ff_rtsp_send_cmd_with_content_async static to rtsp.c.Diego Elio Pettenò2011-01-251-5/+18
| | | | Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
* rtspdec: Retry with TCP if UDP failedMartin Storsjö2011-01-241-1/+3
| | | | Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
* rtsp: Use ff_rtsp_undo_setup in the cleanup code in ff_rtsp_make_requestMartin Storsjo2011-01-241-6/+1
| | | | Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
* rtsp: Split out a function undoing the setup made by ff_rtsp_make_setup_requestMartin Storsjo2011-01-241-22/+37
| | | | Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
* rtsp: Make make_setup_request a nonstatic functionMartin Storsjo2011-01-241-2/+2
| | | | Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
* rtsp: Properly fail if unable to open an input RTP portMartin Storsjö2011-01-091-0/+4
| | | | Originally committed as revision 26285 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtsp: Allow requesting of filtering of source packetsMartin Storsjö2011-01-061-3/+7
| | | | | | | | | | | | | | | | | If filtered, only packets from the right source address and port are received. To test, play back e.g. some mpeg4 video RTSP stream (where the video stream is the first stream in the presentation) over UDP. While receiving this stream, send another stream to the same port: ffmpeg -re -i <whatever> -vcodec mpeg4 -an -f rtp rtp://127.0.0.1:5000?localport=1234 Normally, the RTSP playback reports lots of errors at this point. If the RTSP stream has the ?filter_src option enabled, these interferring packets are ignored. Originally committed as revision 26246 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtsp: Parse RTP-Info headersMartin Storsjö2011-01-051-0/+59
| | | | Originally committed as revision 26236 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtsp: Store the Content-Base header value straight to the targetMartin Storsjö2011-01-021-2/+3
| | | | | | | This avoids having a large temporary buffer in the struct used for storing the rtsp reply headers. Originally committed as revision 26192 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtsp: Pass the method name to ff_rtsp_parse_lineMartin Storsjö2011-01-021-2/+2
| | | | Originally committed as revision 26191 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtsp: Pass RTSPState to ff_rtsp_parse_line, instead of HTTPAuthStateMartin Storsjö2011-01-021-6/+6
| | | | | | | | This allows ff_rtsp_parse_line to do more changes directly in RTSPState when parsing the reply, instead of having to store large amounts of temporary data in RTSPMessageHeader. Originally committed as revision 26190 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtsp: Add a method parameter to ff_rtsp_read_replyMartin Storsjö2011-01-021-3/+3
| | | | Originally committed as revision 26189 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtpdec: Emit timestamps for packets before the first RTCP packet, tooMartin Storsjö2011-01-011-2/+12
| | | | | | | | 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
* rtsp: Check if the rtp stream actually has an RTPDemuxContextMartin Storsjö2010-12-271-1/+4
| | | | | | | | For example MS-RTSP doesn't have RTPDemuxContexts for all streams. This fixes issue 2448. Originally committed as revision 26107 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtsp: Require the transport reply from the server to match the requestMartin Storsjö2010-12-231-5/+6
| | | | | | | | | This fixes a crash if we requested TCP interleaved transport, but the server replies with transport data for UDP. According to the RFC, the server isn't allowed to respond with another transport type than the one requested. Originally committed as revision 26077 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rtsp: Don't set the RTP time base from the sample rate if no sample rate is setMartin Storsjö2010-12-151-1/+2
| | | | | | | | | This also reverts SVN rev 26016, which incorrectly overwrote the time base with 90 kHz for all streams, regardless of what was set by the SDP parsing. The stream that triggered the fix in 26016 still works after this commit. Originally committed as revision 26022 to svn://svn.ffmpeg.org/ffmpeg/trunk
OpenPOWER on IntegriCloud