mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +00:00
srt: Set latency property on SRT socket
This commit is contained in:
parent
177f1f95e1
commit
fa842f2156
1 changed files with 12 additions and 0 deletions
|
@ -162,6 +162,18 @@ gst_srt_object_set_common_params (SRTSOCKET sock, GstSRTObject * srtobject,
|
|||
}
|
||||
}
|
||||
|
||||
{
|
||||
int latency;
|
||||
|
||||
if (!gst_structure_get_int (srtobject->parameters, "latency", &latency))
|
||||
latency = GST_SRT_DEFAULT_LATENCY;
|
||||
if (srt_setsockopt (sock, 0, SRTO_LATENCY, &latency, sizeof (int))) {
|
||||
g_set_error (error, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_SETTINGS,
|
||||
"failed to set latency (reason: %s)", srt_getlasterror_str ());
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue