Michael Niedermayer
3a8b66af6c
rtmp_write_amf_data: remove dead code
...
Fixes CID732199
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
2f1b2ff934
rtmpproto: Fix an out of array write
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
5a75924dfd
rtmpproto: fix out of array write
...
Fixes CID732263
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Martin Storsjö
e002e3291e
Use the new aes/md5/sha/tree allocation functions
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
23e9e5c7d9
rtmpproto: reorder some expressions to fix compilation with clang without optimizations
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 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>
13 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>
13 years ago
Samuel Pitoiset
7011a42b1a
rtmp: support strict rtmp servers
...
In order to send or receive a stream FCPublish, FCSubscribe and _checkbw
are completely optional and often not implemented. releaseStream over a
non-existen stream might report an error instead of being silent.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
13 years ago
Martin Storsjö
cb5ab02a88
rtmp: Use int instead of ssize_t
...
Not all compilers support ssize_t (MSVC doesn't), and none of these
variables need to be larger than 32 bit.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Jordi Ortiz
e5f2731c73
rtmp: Add support for receiving incoming streams
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
93f257db6b
rtmp: Automatically compute the hash for SWFVerification
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
635ac8e1be
rtmp: Add support for SWFVerification
...
Specifies how the server verifies client SWF files before allowing the
files to connect to an application. Verifying SWF files is a security
measure that prevents someone from creating their own SWF files that can
attempt to stream your resources.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
fb7e78089b
rtmp: Gracefully ignore _checkbw errors by tracking them
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
8b6a5a7923
rtmp: Do not send _checkbw calls as notifications
...
The _checkbw calls were changed to use transactionId 0 in commit
82613564
so that servers would not return _result/_error about it.
While this is the strict interpretation of the spec, there are
servers that return _error about it, even if transactionId was 0.
The latest version of EvoStream Media Server (the commercial version
of crtmpserver) behaves properly as described, i.e. returning an
_error normally but not returning anything when using transactionId
0. The latest version of crtmpserver (right now at least) doesn't
behave like this though, it returns an error even if transactionId
was 0.
There are also other servers that return errors even if transactionId
is set to 0. Therefore set a proper transaction id so that the invoke
can be tracked and the error properly ignored instead.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Luca Barbato
fb96c1c5fe
rtmp: handle bytes read reports
...
0x03 (bytes read report) is a known type and should be safely ignored
beside in debug situations.
13 years ago
Jordi Ortiz
f5ce90f2de
rtmp: split chunk_size var into in_chunk_size and out_chunk_size
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
a8103503b3
rtmp: Factorize the code by adding find_tracked_method
...
Also fix the bytestream reader size parameter to take the
offset into account.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
3eebc1e174
rtmp: Factorize the code by adding handle_invoke_error
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
13 years ago
Samuel Pitoiset
71036a3a5e
rtmp: Factorize the code by adding handle_invoke_status
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
13 years ago
Samuel Pitoiset
5e6001db8f
rtmp: Factorize the code by adding handle_invoke_result
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
13 years ago
Samuel Pitoiset
f89584ca44
rtmp: Add message tracking
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Luca Barbato
82613564cf
rtmp: send check_bw as notification
...
Set the transactionId to 0 to signal the server a return _result/_error
is not expected.
Solves the problems experienced with strict rtmp servers.
13 years ago
Samuel Pitoiset
00cb52c65c
rtmp: Add a new option 'rtmp_subscribe'
...
This option specifies the name of live stream to subscribe.
Defaults to rtmp_playpath.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
f9e77c1762
rtmp: Add support for subscribing live streams
...
When streaming live streams using the Akamai, Edgecast or Limelight CDN,
players cannot simply connect to the live stream. Instead, they have to
subscribe to it, by sending an FC Subscribe call to the server.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
12127b65b0
rtmp: Factorize simultaneous URLProtocol / AVClass declarations with a macro
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
9c9c21eaa1
rtmp: do not warn about receiving metadata packets
...
They are managed in get_packet()
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
13 years ago
Samuel Pitoiset
8ea1459bc3
rtmp: Check the buffer length of ping packets
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
e49e6b6451
rtmp: Allow having more unknown data at the end of a chunk size packet without failing
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
2357f60687
rtmp: Prevent reading outside of an allocate buffer when receiving server bandwidth packets
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
abf77a247b
rtmp: Return an error when the client bandwidth is incorrect
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
be8f949219
rtmp: Return proper error code in handle_server_bw
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
088a82bb33
rtmp: Return proper error code in handle_client_bw
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
e7ea6883bf
rtmp: Return proper error codes in handle_chunk_size
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
6d1c9945dd
rtmp: Factorize the code by adding handle_invoke
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
7be2a7d8ff
rtmp: Factorize the code by adding handle_chunk_size
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
0ffd5161c4
rtmp: Factorize the code by adding handle_ping
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
912ecc9a19
rtmp: Factorize the code by adding handle_client_bw
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
9b498148ca
rtmp: Factorize the code by adding handle_server_bw
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
758377a2b7
rtmp: Add a new option 'rtmp_pageurl'
...
This option specifies the URL of the web page in which the media
was embedded.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
63ffa154e9
rtmp: Make the description of the rtmp_tcurl option more generic
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
f7bfb126cd
rtmp: Move the CONFIG_ condition into the if conditions
...
This makes sure these calls are removed by dead code elimination
even if optimization is disabled. This fixes building without
crypto libraries without optimization.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Michael Niedermayer
dc31b84cbf
rtmpproto: fix compilation without optimizations
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Samuel Pitoiset
08cd95e8a3
RTMPTE protocol support
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
acd554c103
RTMPE protocol support
...
This adds two protocols, but one of them is an internal implementation
detail just used as an abstraction layer/generalization in the code. The
RTMPE protocol implementation uses ffrtmpcrypt:// as an alternative to the
tcp:// protocol. This allows moving most of the lower level logic out
from the higher level generic rtmp code.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
0e31088b6c
rtmp: Add ff_rtmp_calc_digest_pos()
...
This function is used for calculating digest position for RTMP handshake
packets.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
3505d5574e
rtmp: Rename rtmp_calc_digest to ff_rtmp_calc_digest and make it global
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
86991ce2dd
RTMPTS protocol support
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
6aedabc9b6
RTMPS protocol support
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
775c4d3625
rtmp: Rename rtmphttp to ffrtmphttp
...
The prefix makes it easier to distinguish the proper end-user
protocols from the internal ones.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Jordi Ortiz
08e087ccf7
rtmp: rtmp_parse_result() add case for video and audio packets to avoid undesired debug output.
...
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
13 years ago