summaryrefslogtreecommitdiff
path: root/libavformat/rtmpproto.c
Commit message (Collapse)AuthorAge
* 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>
* rtmp: Display a verbose message when an unknown packet type is receivedSamuel Pitoiset2012-06-13
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Tokenize the AMF connection parameters manually instead of using strtok_rMartin Storsjö2012-06-13
| | | | | | This fixes builds on platforms without strtok_r (windows). Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Fix a possible access to invalid memory location when the playpath is ↵Samuel Pitoiset2012-06-12
| | | | | | too short. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Do not send extension for flv filesSamuel Pitoiset2012-06-11
| | | | | | This fixes bugzilla bug #304. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: support connection parametersSamuel Pitoiset2012-06-11
| | | | | | | | | Allow using connection parameters in order to append arbitrary AMF data like "B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0" to the Connect message. You can pass these parameters through the -rtmp_conn option. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: fix url parsingLuca Barbato2012-05-25
| | | | | The application component can have a subcomponent to specify the application instance even if it doesn't have a ":" in the playpath.
* rtmp: Pass the proper return code in rtmp_handshakeSamuel Pitoiset2012-05-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Check return codes of net IO operationsSamuel Pitoiset2012-05-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Return a proper error code instead of -1Samuel Pitoiset2012-05-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Check malloc callsSamuel Pitoiset2012-05-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Check ff_rtmp_packet_create callsSamuel Pitoiset2012-05-24
| | | | | | | Check malloc calls used by ff_rtmp_packet_create, unify error handling and pass on error codes. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Don't assume path points to a string of nonzero lengthMartin Storsjö2012-05-17
| | | | | | | | | If using the new -rtmp_app and -rtmp_playpath parameters, one can in many cases set the main url to just rtmp://server/. If the trailing slash is omitted, path is a string of zero length, and using path+1 will end up reading uninitialized data. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Implement check bandwidth notification.Samuel Pitoiset2012-05-10
| | | | | | According to the behaviour of librtmp, it is recommended to send this message to the server after receiving the 'onBWDone' callback in order to do bandwidth checking and improve compatibility with some servers.
* rtmp: Support 'rtmp_swfurl', an option which specifies the URL of the SWF ↵Samuel Pitoiset2012-05-10
| | | | player.
* rtmp: Support 'rtmp_flashver', an option which overrides the version of the ↵Samuel Pitoiset2012-05-10
| | | | Flash plugin.
* rtmp: Support 'rtmp_tcurl', an option which overrides the URL of the target ↵Samuel Pitoiset2012-05-10
| | | | | | stream. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Support 'rtmp_live', an option which specifies if the media is a live ↵Samuel Pitoiset2012-05-08
| | | | | | stream. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Support 'rtmp_playpath', an option which overrides the stream identifierSamuel Pitoiset2012-04-16
| | | | | | | | | This option is the stream identifier to play or to publish. Sometimes the URL parser cannot determine the correct playpath automatically, so it must be given explicitly using this option (ie. -rtmp_playpath). Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Support 'rtmp_app', an option which overrides the name of applicationSamuel Pitoiset2012-04-16
| | | | | | | | This option is the name of application to connect on the RTMP server. Sometimes the URL parser cannot determine the app name automatically, so it must be given explicitly using this option (ie. -rtmp_app). Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: implement bandwidth notificationRaffaele Sena2012-04-03
| | | | | | Improve compatibility with some servers. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rtmp: update supported audio codecs valueSamuel Pitoiset2012-04-03
| | | | | | | | The audio codecs property is composed by all values except SUPPORT_SND_INTEL (0x0008) and SUPPORT_SND_UNUSED (0x0010) which are unused. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avio: Add an URLProtocol flag for indicating that a protocol uses networkMartin Storsjö2012-01-05
| | | | | | | This definition is in two files, since the definitions will move to the private header at the next bump. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavu: replace int/float punning functionsMans Rullgard2011-12-11
| | | | | | | | | | | | | | | | | | The existing functions defined in intfloat_readwrite.[ch] are both slow and incorrect (infinities are not handled). This introduces a new header with fast, inline conversion functions using direct union punning assuming an IEEE-754 system, an assumption already made throughout the code. The one use of Intel/Motorola extended 80-bit format is replaced by simpler code sufficient under the present constraints (positive normal values). The old functions are marked deprecated and retained for compatibility. Signed-off-by: Mans Rullgard <mans@mansr.com>
* rtmp: Use nb_invokes for all invoke commandsMartin Storsjö2011-12-07
| | | | | | | | | 704af3e29c3ddbc22ac5c8f40e5a0f860d53ac4c broke publishing of rtmp streams, at least publishing to Wowza servers. This changes all invoke commands to use nb_invokes. Signed-off-by: Martin Storsjö <martin@martin.st>
* proto: Realign struct initializersMartin Storsjö2011-12-01
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* proto: Use .priv_data_size to allocate the private contextMartin Storsjö2011-12-01
| | | | | | | | This simplifies the open functions by avoiding one function call that needs error checking, reducing the amount of extra bulk code. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Clean up properly if the handshake failedMartin Storsjö2011-12-01
| | | | | | This prevents memory leaks if this function returns an error. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: do not hardcode invoke numbersJosh Allmann2011-11-18
| | | | | | | | Note: FCPublish/FCUnpublish are adobe server specific and not described in the rtmp specification. Some servers might not cope with them at all. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avio: add support for passing options to protocols.Anton Khirnov2011-11-13
| | | | | Not used anywhere yet, support for passing options from avio_open() will follow.
* avio: Add an AVIOInterruptCB parameter to ffurl_open/ffurl_allocMartin Storsjö2011-11-13
| | | | | Change all uses of these function to pass the relevant callback on.
* rtmp: Make the input FLV parser handle data cut at any pointMartin Storsjö2011-09-22
| | | | | | | | | | | | | | This makes the RTMP writing code able to handle FLV data fed in arbitrarily small or large chunks, with multiple consecutive packets in one write call, or having the FLV packet header split over numerous write calls. When used in conjunction with the flv muxer, the AVIO buffer size still needs to be large enough to fit the initial metadata packet though, since the size of that packet is written with a seekback. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Don't blindly skip the 4 trailer bytes from the FLV packetsMartin Storsjö2011-09-20
| | | | | | | | | | | | | | | | If not enough bytes are available, keep track of them and skip them on next call. In practice, if these trailer bytes are written in a separate call, there is no other data written in this call, making it fall into the "FLV packet too small" case currently - working, but not as intended. This patch makes the code more robust, handling all cases except for having the FLV packet header split over multiple write calls. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Handle FLV packets written in more than one write callChiranjeevi Melam2011-09-20
| | | | | | | | | | If the FLV packet is larger than the AVIO buffer, a partial FLV packet will be flushed to the RTMP protocol. This commit handles the most common cases of FLV packets being written in more than one call. Signed-off-by: Martin Storsjö <martin@martin.st>
* Do not include intfloat_readwrite.h in avutil.hMans Rullgard2011-07-03
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Remove return statements following infinite loops without breakMans Rullgard2011-07-03
| | | | | | | These statements cannot be reached and are thus not needed. This removes a number of compiler warnings. Signed-off-by: Mans Rullgard <mans@mansr.com>
* rtmp: Don't try to do av_malloc(0)Martin Storsjö2011-05-25
| | | | | | | | | Some received packets can have size 0. The return value from av_malloc(0) may be NULL, which is ok if the size was 0. On OS X, however, the returned pointer is non-null but leads to crashes when trying to free it. Signed-off-by: Martin Storsjö <martin@martin.st>
* avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbolsStefano Sabatini2011-04-19
| | | | | | | | 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.
* lavf: remove FF_API_URL_CLASS cruft.Anton Khirnov2011-04-19
|
* lavf: use designated initializers for all protocolsAnton Khirnov2011-04-08
| | | | | This is more readable and makes it easier to reorder URLProtocol members.
* avio: AVIO_ prefixes for URL_ open flags.Anton Khirnov2011-04-07
|