Luca Barbato
8034130e06
rtp: set the payload type as stream id
...
Support multiple video/audio streams with different format in the
same session.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Martin Storsjö
f21d5c905d
rtsp: Avoid a cast when calling strtol
...
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>
12 years ago
Martin Storsjö
2f41eaa9c6
rtsp: Make sure the ret variable is initialized in ff_rtsp_fetch_packet
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
3f055f8f5f
rtsp: Allow setting the reordering buffer size via an AVOption
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Diego Biurrun
11d4e92ed9
avformat: Remove non-compiling and/or silly commented-out printf/av_log statements
12 years ago
Michael Niedermayer
28e88a24f6
rtsp: fix "warning: ret may be used uninitialized in this function"
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
0079232299
rtsp: kill a pointer type warning (void **) vs. (AVFormatContext **)
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Martin Storsjö
e6153f173a
avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
d58dd4b5b5
avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
124134e424
avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
125c6c0752
rtsp: Free the rtpdec context properly
...
The condition for calling the rtpdec cleanup was broken in
df8cf076c8
.
This fixes a memory leak.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Jordi Ortiz
e7993ece9b
rtsp.c: use ffurl_get_multi_file_handle() instead of ff_rtp_get_rtcp_file_handle()
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
1243c72251
rtsp: Support mpegts in raw udp packets
...
This is basically the same way as mpegts packets are parsed in
rtpdec.c.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
df8cf076c8
rtsp: Support receiving plain data over UDP without any RTP encapsulation
...
EvoStream Media Server can serve data in this format, and
VLC/live555 already supports it.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
13 years ago
Diego Biurrun
6774247a9d
avformat: Drop pointless "format" from container long names
13 years ago
Anton Khirnov
c4ef6a3e4b
Add missing libavutil/time.h includes.
13 years ago
Ronald S. Bultje
5354a904fe
rtsp: remove terminal comma in FF_RTP_FLAG_OPTS macro.
...
This makes usage of the macro look more natural when
used with array entries.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
13 years ago
Jordi Ortiz
a8ad6ffafe
rtsp: Add listen mode
...
This makes the RTSP demuxer act as a server, listening for an
incoming connection.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Jordi Ortiz
6e71c1202b
rtsp: Make rtsp_open_transport_ctx() non-static
...
This is required for the upcoming RTSP listen mode.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Jordi Ortiz
45b068580b
rtsp: Parse the mode=receive/record parameter in transport lines
...
We need to support the nonstandard mode=receive, for compatibility
with older libavformat clients.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Mans Rullgard
6501dcfb5e
Remove unnecessary inclusions of [sys/]time.h
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Martin Storsjö
bbc8038614
rtsp: Send mode=record instead of mode=receive
...
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>
13 years ago
Martin Storsjö
6099543ad4
rtsp: Check for dynamic payload handlers if no static payload mapping was found
...
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>
13 years ago
Martin Storsjö
68c813081b
rtpenc_chain: Return an error code instead of just a plain pointer
...
Also check the return value in sapenc.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Jordi Ortiz
fcd0298c05
rtsp: Add content-type message header parsing
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
13 years ago
Mans Rullgard
ddce7dabd2
rtsp: avoid const warnings from strtol() call
...
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>
13 years ago
Martin Storsjö
62c3c8ca78
rtsp: Don't use uninitialized data if there are no streams
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
456001486e
rtsp: Don't expose the MS-RTSP RTX data stream to the caller
...
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>
13 years ago
Diego Biurrun
a92be9b856
Replace memset(0) by zero initializations.
...
Also remove one pointless zero initialization in rangecoder.c.
13 years ago
Martin Storsjö
ccfa8aa26f
rtsp: Set the default delay to 0.1 s for the RTSP/SDP/RTP demuxers
...
This enables reordering of UDP packets by default, unless the caller
explicitly sets -max_delay 0.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
4fa57d524f
libavformat: Set the default for the max_delay option to -1
...
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>
13 years ago
Martin Storsjö
17934c1824
cosmetics: Align some AVInput/OutputFormat declarations
...
Also add missing trailing commas.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
2f96cc1fc4
rtsp: Retry authentication if failed due to being stale
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
705eeb5eca
rtsp: Fix a typo
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
6294d708b8
rtsp: Only set the ttl parameter if the server actually gave a value
...
Passing ttl=0 to the rtp/udp url contexts makes packets never
leave the host machine.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Tommy Winther
1a6b9a98ce
rtsp: Handle requests from server to client
...
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>
13 years ago
Martin Storsjö
c2ff63e3ac
rtpenc: Move the trailing comma into FF_RTP_FLAG_OPTS
...
This simplifies adding more flags to the macro.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
298a587f44
rtp: Factorize the check for distinguishing RTCP packets from RTP
...
The binary doesn't change after this patch.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
f3a094f2da
sdp: Ignore RTCP packets when autodetecting RTP streams
...
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>
13 years ago
Diego Biurrun
a846202343
rtsp: Remove some unused variables from ff_rtsp_connect().
13 years ago
Alex Converse
7181c4edee
cosmetics: Remove extra newlines at EOF
13 years ago
Anton Khirnov
adad5b88f8
lavf: remove disabled FF_API_RTSP_URL_OPTIONS cruft
13 years ago
Anton Khirnov
6e9651d106
lavf: remove AVFormatParameters from AVFormatContext.read_header signature
13 years ago
Dmitry Volyntsev
58f0978581
rtsp: Use a random offset for trying to open UDP ports for RTP
...
This avoids (for all practical cases) the issue of reusing
the same UDP port as for an earlier connection. If the remote
doesn't know the previous session was closed, he might keep
on sending packets to that port. If we always start off trying
to open the same UDP port, we might get those packets intermixed
with the new ones.
This is occasionally an issue when testing RTSP stuff with
DSS, perhaps also with other servers.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
dbb06b8c0d
rtsp: Allow specifying the UDP port range via AVOptions
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Dmitry Volyntsev
bc495bad3d
rtsp: Remove a leftover, currently pointless check
...
This check isn't relevant in the way the code currently works.
Also change a case of if (x == 0) into if (!x).
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Dmitry Volyntsev
4259d1eb99
fix rtp 916 issue, patch 2
...
Reviewed-by: Luca Abeni <lucabe72@email.it>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Dmitry Volyntsev
b29ec002bb
fix rtp 916 issue
...
Reviewed-by: Luca Abeni <lucabe72@email.it>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Jean First
4be386b318
rtsp: Fix compiler warning for uninitialized variable
...
This one won't ever be used uninitialized in practice, but
the compiler doesn't realize it.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago