From 4e7f7871db7be4e6d7a43a68a7454b4c754299a5 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 7 Jan 2021 09:21:47 +0100 Subject: 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: --- ext/srt/gstsrtobject.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ext') 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} -- cgit v1.2.1