MCPcopy Create free account
hub / github.com/Haivision/srt / SrtFlagString

Method SrtFlagString

srtcore/handshake.cpp:298–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298std::string srt::SrtFlagString(int32_t flags)
299{
300#define LEN(arr) (sizeof (arr)/(sizeof ((arr)[0])))
301
302 std::string output;
303 static std::string namera[] = { "TSBPD-snd", "TSBPD-rcv", "haicrypt", "TLPktDrop", "NAKReport", "ReXmitFlag", "StreamAPI", "FilterCapable" };
304
305 size_t i = 0;
306 for (; i < LEN(namera); ++i)
307 {
308 if ((flags & 1) == 1)
309 {
310 output += "+" + namera[i] + " ";
311 }
312 else
313 {
314 output += "-" + namera[i] + " ";
315 }
316
317 flags >>= 1;
318 }
319
320#undef LEN
321
322 if (flags != 0)
323 {
324 output += "+unknown";
325 }
326
327 return output;
328}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected