Commit a123e576 authored by James Almer's avatar James Almer

Merge commit 'a2fc8dba'

* commit 'a2fc8dba':
  Add Haivision SRT protocol
Merged-by: 's avatarJames Almer <jamrial@gmail.com>
parents a959e38f a2fc8dba
......@@ -51,6 +51,7 @@ version <next>:
- AV1 Support through libaom
- E-AC-3 dependent frames support
- bitstream filter for extracting E-AC-3 core
- Haivision SRT protocol via libsrt
version 3.4:
......
......@@ -257,6 +257,7 @@ External library support:
--enable-libsnappy enable Snappy compression, needed for hap encoding [no]
--enable-libsoxr enable Include libsoxr resampling [no]
--enable-libspeex enable Speex de/encoding via libspeex [no]
--enable-libsrt enable Haivision SRT protocol via libsrt [no]
--enable-libssh enable SFTP protocol via libssh [no]
--enable-libtesseract enable Tesseract, needed for ocr filter [no]
--enable-libtheora enable Theora encoding via libtheora [no]
......@@ -1705,6 +1706,7 @@ EXTERNAL_LIBRARY_LIST="
libsnappy
libsoxr
libspeex
libsrt
libssh
libtesseract
libtheora
......@@ -3246,6 +3248,8 @@ libssh_protocol_deps="libssh"
libtls_conflict="openssl gnutls"
mmsh_protocol_select="http_protocol"
mmst_protocol_select="network"
libsrt_protocol_deps="libsrt"
libsrt_protocol_select="network"
rtmp_protocol_conflict="librtmp_protocol"
rtmp_protocol_select="tcp_protocol"
rtmp_protocol_suggest="zlib"
......@@ -6021,6 +6025,7 @@ enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnap
enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr
enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init
enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
enabled libsrt && require_pkg_config libsrt "srt >= 1.2.0" srt/srt.h srt_socket
enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
enabled libtls && require_pkg_config libtls libtls tls.h tls_configure
......
......@@ -1155,6 +1155,146 @@ If set to any value, listen for an incoming connection. Outgoing connection is d
Set the maximum number of streams. By default no limit is set.
@end table
@section srt
Haivision Secure Reliable Transport Protocol via libsrt.
The supported syntax for a SRT URL is:
@example
srt://@var{hostname}:@var{port}[?@var{options}]
@end example
@var{options} contains a list of &-separated options of the form
@var{key}=@var{val}.
or
@example
@var{options} srt://@var{hostname}:@var{port}
@end example
@var{options} contains a list of '-@var{key} @var{val}'
options.
This protocol accepts the following options.
@table @option
@item connect_timeout
Connection timeout; SRT cannot connect for RTT > 1500 msec
(2 handshake exchanges) with the default connect timeout of
3 seconds. This option applies to the caller and rendezvous
connection modes. The connect timeout is 10 times the value
set for the rendezvous mode (which can be used as a
workaround for this connection problem with earlier versions).
@item ffs=@var{bytes}
Flight Flag Size (Window Size), in bytes. FFS is actually an
internal parameter and you should set it to not less than
@option{recv_buffer_size} and @option{mss}. The default value
is relatively large, therefore unless you set a very large receiver buffer,
you do not need to change this option. Default value is 25600.
@item inputbw=@var{bytes/seconds}
Sender nominal input rate, in bytes per seconds. Used along with
@option{oheadbw}, when @option{maxbw} is set to relative (0), to
calculate maximum sending rate when recovery packets are sent
along with the main media stream:
@option{inputbw} * (100 + @option{oheadbw}) / 100
if @option{inputbw} is not set while @option{maxbw} is set to
relative (0), the actual input rate is evaluated inside
the library. Default value is 0.
@item iptos=@var{tos}
IP Type of Service. Applies to sender only. Default value is 0xB8.
@item ipttl=@var{ttl}
IP Time To Live. Applies to sender only. Default value is 64.
@item listen_timeout
Set socket listen timeout.
@item maxbw=@var{bytes/seconds}
Maximum sending bandwidth, in bytes per seconds.
-1 infinite (CSRTCC limit is 30mbps)
0 relative to input rate (see @option{inputbw})
>0 absolute limit value
Default value is 0 (relative)
@item mode=@var{caller|listener|rendezvous}
Connection mode.
@option{caller} opens client connection.
@option{listener} starts server to listen for incoming connections.
@option{rendezvous} use Rendez-Vous connection mode.
Default value is caller.
@item mss=@var{bytes}
Maximum Segment Size, in bytes. Used for buffer allocation
and rate calculation using a packet counter assuming fully
filled packets. The smallest MSS between the peers is
used. This is 1500 by default in the overall internet.
This is the maximum size of the UDP packet and can be
only decreased, unless you have some unusual dedicated
network settings. Default value is 1500.
@item nakreport=@var{1|0}
If set to 1, Receiver will send `UMSG_LOSSREPORT` messages
periodically until a lost packet is retransmitted or
intentionally dropped. Default value is 1.
@item oheadbw=@var{percents}
Recovery bandwidth overhead above input rate, in percents.
See @option{inputbw}. Default value is 25%.
@item passphrase=@var{string}
HaiCrypt Encryption/Decryption Passphrase string, length
from 10 to 79 characters. The passphrase is the shared
secret between the sender and the receiver. It is used
to generate the Key Encrypting Key using PBKDF2
(Password-Based Key Derivation Function). It is used
only if @option{pbkeylen} is non-zero. It is used on
the receiver only if the received data is encrypted.
The configured passphrase cannot be recovered (write-only).
@item pbkeylen=@var{bytes}
Sender encryption key length, in bytes.
Only can be set to 0, 16, 24 and 32.
Enable sender encryption if not 0.
Not required on receiver (set to 0),
key size obtained from sender in HaiCrypt handshake.
Default value is 0.
@item recv_buffer_size=@var{bytes}
Set receive buffer size, expressed in bytes.
@item send_buffer_size=@var{bytes}
Set send buffer size, expressed in bytes.
@item rw_timeout
Set raise error timeout for read/write optations.
This option is only relevant in read mode:
if no data arrived in more than this time
interval, raise error.
@item tlpktdrop=@var{1|0}
Too-late Packet Drop. When enabled on receiver, it skips
missing packets that have not been delivered in time and
delivers the following packets to the application when
their time-to-play has come. It also sends a fake ACK to
the sender. When enabled on sender and enabled on the
receiving peer, the sender drops the older packets that
have no chance of being delivered in time. It was
automatically enabled in the sender if the receiver
supports it.
@item tsbpddelay
Timestamp-based Packet Delivery Delay.
Used to absorb burst of missed packet retransmission.
@end table
For more information see: @url{https://github.com/Haivision/srt}.
@section srtp
Secure Real-time Transport Protocol.
......
......@@ -566,6 +566,7 @@ OBJS-$(CONFIG_LIBRTMPE_PROTOCOL) += librtmp.o
OBJS-$(CONFIG_LIBRTMPS_PROTOCOL) += librtmp.o
OBJS-$(CONFIG_LIBRTMPT_PROTOCOL) += librtmp.o
OBJS-$(CONFIG_LIBRTMPTE_PROTOCOL) += librtmp.o
OBJS-$(CONFIG_LIBSRT_PROTOCOL) += libsrt.o
OBJS-$(CONFIG_LIBSSH_PROTOCOL) += libssh.o
OBJS-$(CONFIG_LIBSMBCLIENT_PROTOCOL) += libsmbclient.o
......
This diff is collapsed.
......@@ -65,6 +65,7 @@ extern const URLProtocol ff_librtmpe_protocol;
extern const URLProtocol ff_librtmps_protocol;
extern const URLProtocol ff_librtmpt_protocol;
extern const URLProtocol ff_librtmpte_protocol;
extern const URLProtocol ff_libsrt_protocol;
extern const URLProtocol ff_libssh_protocol;
extern const URLProtocol ff_libsmbclient_protocol;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment