summaryrefslogtreecommitdiff
path: root/libavformat/rtmpproto.c
Commit message (Collapse)AuthorAge
* 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_CONST in the i64 union memberMartin Storsjö2012-09-04
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: support strict rtmp serversSamuel Pitoiset2012-08-22
| | | | | | | | 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>
* rtmp: Use int instead of ssize_tMartin Storsjö2012-08-16
| | | | | | | 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>
* rtmp: Add support for receiving incoming streamsJordi Ortiz2012-08-16
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Automatically compute the hash for SWFVerificationSamuel Pitoiset2012-08-15
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Add support for SWFVerificationSamuel Pitoiset2012-08-15
| | | | | | | | | 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>
* rtmp: Gracefully ignore _checkbw errors by tracking themSamuel Pitoiset2012-08-14
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Do not send _checkbw calls as notificationsSamuel Pitoiset2012-08-14
| | | | | | | | | | | | | | | | | | | | 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>
* rtmp: handle bytes read reportsLuca Barbato2012-08-13
| | | | | 0x03 (bytes read report) is a known type and should be safely ignored beside in debug situations.
* rtmp: split chunk_size var into in_chunk_size and out_chunk_sizeJordi Ortiz2012-08-11
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Factorize the code by adding find_tracked_methodSamuel Pitoiset2012-08-11
| | | | | | | Also fix the bytestream reader size parameter to take the offset into account. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Factorize the code by adding handle_invoke_errorSamuel Pitoiset2012-08-09
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rtmp: Factorize the code by adding handle_invoke_statusSamuel Pitoiset2012-08-09
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rtmp: Factorize the code by adding handle_invoke_resultSamuel Pitoiset2012-08-09
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rtmp: Add message trackingSamuel Pitoiset2012-08-09
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: send check_bw as notificationLuca Barbato2012-08-08
| | | | | | | Set the transactionId to 0 to signal the server a return _result/_error is not expected. Solves the problems experienced with strict rtmp servers.
* rtmp: Add a new option 'rtmp_subscribe'Samuel Pitoiset2012-08-07
| | | | | | | This option specifies the name of live stream to subscribe. Defaults to rtmp_playpath. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Add support for subscribing live streamsSamuel Pitoiset2012-08-07
| | | | | | | | 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>
* rtmp: Factorize simultaneous URLProtocol / AVClass declarations with a macroSamuel Pitoiset2012-08-07
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: do not warn about receiving metadata packetsSamuel Pitoiset2012-07-31
| | | | | | They are managed in get_packet() Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rtmp: Check the buffer length of ping packetsSamuel Pitoiset2012-07-26
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Allow having more unknown data at the end of a chunk size packet ↵Samuel Pitoiset2012-07-26
| | | | | | without failing Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Prevent reading outside of an allocate buffer when receiving server ↵Samuel Pitoiset2012-07-26
| | | | | | bandwidth packets Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Return an error when the client bandwidth is incorrectSamuel Pitoiset2012-07-25
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Return proper error code in handle_server_bwSamuel Pitoiset2012-07-25
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Return proper error code in handle_client_bwSamuel Pitoiset2012-07-25
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Return proper error codes in handle_chunk_sizeSamuel Pitoiset2012-07-25
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Factorize the code by adding handle_invokeSamuel Pitoiset2012-07-25
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Factorize the code by adding handle_chunk_sizeSamuel Pitoiset2012-07-25
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Factorize the code by adding handle_pingSamuel Pitoiset2012-07-25
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Factorize the code by adding handle_client_bwSamuel Pitoiset2012-07-25
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Factorize the code by adding handle_server_bwSamuel Pitoiset2012-07-25
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Add a new option 'rtmp_pageurl'Samuel Pitoiset2012-07-25
| | | | | | | This option specifies the URL of the web page in which the media was embedded. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Make the description of the rtmp_tcurl option more genericSamuel Pitoiset2012-07-25
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Move the CONFIG_ condition into the if conditionsSamuel Pitoiset2012-07-24
| | | | | | | | 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>
* RTMPTE protocol supportSamuel Pitoiset2012-07-23
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* RTMPE protocol supportSamuel Pitoiset2012-07-23
| | | | | | | | | | 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>
* rtmp: Add ff_rtmp_calc_digest_pos()Samuel Pitoiset2012-07-23
| | | | | | | This function is used for calculating digest position for RTMP handshake packets. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Rename rtmp_calc_digest to ff_rtmp_calc_digest and make it globalSamuel Pitoiset2012-07-23
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* RTMPTS protocol supportSamuel Pitoiset2012-07-17
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* RTMPS protocol supportSamuel Pitoiset2012-07-17
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Rename rtmphttp to ffrtmphttpSamuel Pitoiset2012-07-17
| | | | | | | The prefix makes it easier to distinguish the proper end-user protocols from the internal ones. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: rtmp_parse_result() add case for video and audio packets to avoid ↵Jordi Ortiz2012-07-16
| | | | | | undesired debug output. Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
* rtmp: Don't send every flv packet in a separate HTTP request in RTMPTSamuel Pitoiset2012-06-18
| | | | | | | | | | | Add a new option 'rtmp_flush_interval' that allows specifying the number of packets to write before sending it off as a HTTP request. This is mostly relevant for RTMPT - for plain RTMP, it only controls how often we check the socket for incoming packets, which shouldn't affect the performance in any noticeable way. Signed-off-by: Martin Storsjö <martin@martin.st>
* RTMPT protocol supportSamuel Pitoiset2012-06-17
| | | | | | | | | | This adds two protocols, but one of them is an internal implementation detail just used as an abstraction layer/generalization in the code. The RTMPT protocol implementation uses rtmphttp:// 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>
* rtmp: Read and handle incoming packets while writing dataSamuel Pitoiset2012-06-14
| | | | | | | | | | | This makes sure all incoming packets are read and handled (and reacted to) while sending an FLV stream over RTMP to a server. If there were enough incoming data to fill the TCP buffers, this could potentially make things block at unexpected places. For the upcoming RTMPT support, we need to consume all incoming data before we can send the next request. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Add a new option 'rtmp_buffer', for setting the client buffer timeSamuel Pitoiset2012-06-13
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Set the client buffer time to 3s instead of 0.26sSamuel Pitoiset2012-06-13
| | | | | | | | This factorizes existing code into a new function gen_buffer_time(), which generates the client buffer time message and sends it to the server. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Handle server bandwidth packetsSamuel Pitoiset2012-06-13
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>