diff options
author | Edward Hervey <edward.hervey@collabora.co.uk> | 2021-01-07 09:21:47 +0100 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2021-01-07 09:23:28 +0100 |
commit | 4e7f7871db7be4e6d7a43a68a7454b4c754299a5 (patch) | |
tree | a8fded9ad15c63fb06d65b08c69a6567ce8e9213 /ext | |
parent | 6c3522297364eb0c74a9d8746754d1c9e53b146e (diff) | |
download | gstreamer-plugins-bad-4e7f7871db7be4e6d7a43a68a7454b4c754299a5.tar.gz |
srt: Define options added in later revisions
Allows compiling the plugin against old headers.
For SRTO_BINDTODEVICE there's nothing we can do, since the value depends on
configuration options of the library. Nice.
Fixes build with libsrt < 1.4.2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1945>
Diffstat (limited to 'ext')
-rw-r--r-- | ext/srt/gstsrtobject.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/srt/gstsrtobject.c b/ext/srt/gstsrtobject.c index 873a70e9a..09c5e3360 100644 --- a/ext/srt/gstsrtobject.c +++ b/ext/srt/gstsrtobject.c @@ -45,6 +45,13 @@ GST_DEBUG_CATEGORY_EXTERN (gst_debug_srtobject); #define SRTSOCK_ERROR_DEBUG ("libsrt reported reject reason code %d", reason) #endif +/* Define options added in later revisions */ +#if SRT_VERSION_VALUE < 0x10402 +#define SRTO_DRIFTTRACER 37 +/* We can't define SRTO_BINDTODEVICE since it depends on configuration flags *sigh* */ +#define SRTO_RETRANSMITALGO 61 +#endif + #define ELEMENT_WARNING_SRTSOCK_ERROR(code, reason) \ GST_ELEMENT_WARNING (srtobject->element, RESOURCE, code, \ ("Error on SRT socket. Trying to reconnect."), SRTSOCK_ERROR_DEBUG) @@ -185,7 +192,9 @@ SrtOption srt_options[] = { {"enforcedencryption", SRTO_ENFORCEDENCRYPTION, G_TYPE_BOOLEAN}, {"ipv6only", SRTO_IPV6ONLY, G_TYPE_INT}, {"peeridletimeo", SRTO_PEERIDLETIMEO, G_TYPE_INT}, +#if SRT_VERSION_VALUE >= 0x10402 {"bindtodevice", SRTO_BINDTODEVICE, G_TYPE_STRING}, +#endif {"packetfilter", SRTO_PACKETFILTER, G_TYPE_STRING}, {"retransmitalgo", SRTO_RETRANSMITALGO, G_TYPE_INT}, {NULL} |