13 #include <ajabase/network/network.h>
18 #if defined (AJALinux) || defined (AJAMac)
20 #include <sys/socket.h>
21 #include <netinet/in.h>
22 #include <arpa/inet.h>
25 #define RESET_MILLISECONDS 5
56 for (
int i=0; i < 2; i++)
68 firstAudioChannel = 0;
75 return !(*
this == other);
81 if ((localPort[0] == other.
localPort[0]) &&
85 (remoteIP[0] == other.
remoteIP[0]) &&
86 (remoteIP[1] == other.
remoteIP[1]) &&
113 numAudioChannels = 2;
119 return (!(*
this == other));
124 if ( (rxMatch == other.
rxMatch) &&
126 (destIP == other.
destIP) &&
129 (ssrc == other.
ssrc) &&
130 (vlan == other.
vlan) &&
159 _numRxChans = _numRx0Chans + _numRx1Chans;
160 _numTxChans = _numTx0Chans + _numTx1Chans;
162 _biDirectionalChannels =
false;
171 string ip, subnet, gateway;
173 addr.s_addr = (uint32_t)netConfig.
ipc_ip;
174 ip = AJANetwork::aja_inet_ntoa(addr);
176 subnet = AJANetwork::aja_inet_ntoa(addr);
178 gateway = AJANetwork::aja_inet_ntoa(addr);
186 string ip, subnet, gateway;
210 uint32_t addr = AJANetwork::aja_inet_addr(localIPAddress.c_str());
219 macAddressRegister++;
222 uint32_t boardHi = (macHi & 0xffff0000) >>16;
223 uint32_t boardLo = ((macHi & 0x0000ffff) << 16) + ((macLo & 0xffff0000) >> 16);
226 macAddressRegister++;
228 macAddressRegister++;
231 uint32_t boardHi2 = (macHi & 0xffff0000) >>16;
232 uint32_t boardLo2 = ((macHi & 0x0000ffff) << 16) + ((macLo & 0xffff0000) >> 16);
251 if (!rv)
return false;
270 localIPAddress = AJANetwork::aja_inet_ntoa(addr);
274 subnetMask = AJANetwork::aja_inet_ntoa(addr);
278 gateway = AJANetwork::aja_inet_ntoa(addr);
285 localIPAddress = AJANetwork::aja_inet_ntoa(addr);
289 subnetMask = AJANetwork::aja_inet_ntoa(addr);
293 gateway = AJANetwork::aja_inet_ntoa(addr);
341 uint32_t sourceIp = AJANetwork::aja_inet_addr(rxConfig.
sourceIP.c_str());
346 uint32_t destIp = AJANetwork::aja_inet_addr(rxConfig.
destIP.c_str());
505 uint32_t val = (num_samples << 8) + num_channels;
524 uint32_t val = ( (((uint32_t) fr) << 8) |
525 (((uint32_t) fg) << 4) |
556 uint32_t reg, reg2, value;
590 uint32_t depacketizerBaseAddr;
599 char * ip = AJANetwork::aja_inet_ntoa(in);
605 ip = AJANetwork::aja_inet_ntoa(in);
679 uint32_t srcIp, destIp;
684 uint8_t ip0 = (destIp & 0xff000000)>> 24;
685 if (ip0 >= 224 && ip0 <= 239)
740 enabled = (val & 0x01);
752 uint32_t depacketizerBaseAddr;
774 uint32_t depacketizerBaseAddr;
792 uint32_t val_lo, val_hi;
805 bytes = ((uint64_t)val_hi << 32) + val_lo;
830 uint32_t val_lo, val_hi;
843 bytes = ((uint64_t)val_hi << 32) + val_lo;
847 int CNTV2Config2110::LeastCommonMultiple(
int a,
int b)
887 bool interlaced =
false;
900 uint32_t width = fd.GetRasterWidth();
913 int componentsPerPixel;
914 int componentsPerUnit;
921 componentsPerPixel = 3;
922 componentsPerUnit = 3;
926 componentsPerPixel = 2;
927 componentsPerUnit = 4;
933 const int bitsPerComponent = 10;
934 const int pixelsPerClock = 1;
935 int activeLineLength = (width * componentsPerPixel * bitsPerComponent)/8;
937 int pixelGroup_root = LeastCommonMultiple((bitsPerComponent * componentsPerUnit), 8);
938 int pixelGroupSize = pixelGroup_root/8;
940 int bytesPerCycle = (pixelsPerClock * bitsPerComponent * componentsPerPixel)/8;
942 int lcm = LeastCommonMultiple(pixelGroupSize,bytesPerCycle);
943 int payloadLength_root = min(activeLineLength,1376)/lcm;
944 int payloadLength = payloadLength_root * lcm;
946 float pktsPerLine = ((float)activeLineLength)/((float)payloadLength);
947 int ipktsPerLine = (int)ceil(pktsPerLine);
949 int payloadLengthLast = activeLineLength - (payloadLength * (ipktsPerLine -1));
951 int ppp = (payloadLength/pixelGroupSize) * 2;
960 payloadLength = 0x0558;
961 payloadLengthLast = 0x03f0;
967 payloadLength = 0x0558;
968 payloadLengthLast = 0x0120;
975 payloadLength = 0x0558;
976 payloadLengthLast = 0x01b0;
1000 int ilace = (interlaced) ? 0x01 : 0x00;
1013 uint32_t plength = audioChans * samples * 3;
1016 uint32_t aselect = ((uint32_t)txConfig.
firstAudioChannel << 16 ) + (audioChans-1);
1017 aselect = (txConfig.
channel << 24) + aselect;
1067 uint32_t val = (txConfig.
tos << 8) | txConfig.
ttl;
1070 int index = (int)sfp;
1072 uint32_t destIp = AJANetwork::aja_inet_addr(txConfig.
remoteIP[index].c_str());
1086 if (!rv)
return false;
1100 uint32_t baseAddrPacketizer;
1164 int index = (int)sfp;
1174 txConfig.
ttl = val & 0xff;
1175 txConfig.
tos = (val & 0xff00) >> 8;
1181 char * ip = AJANetwork::aja_inet_ntoa(in);
1211 GenSDP(enableSfp1, enableSfp2, stream);
1218 if (enableSfp1 || enableSfp2)
1285 uint32_t val = ((uint32_t)
id[0] << 24) | ((uint32_t)
id[1] << 16) | ((uint32_t)
id[2] << 8) | ((uint32_t)
id[3] << 0);
1287 val = ((uint32_t)
id[4] << 24) | ((uint32_t)
id[5] << 16) | ((uint32_t)
id[6] << 8) | ((uint32_t)
id[7] << 0);
1384 enable = val & 0x01;
1413 enable = val & 0x10;
1442 forceReconfig =
true;
1444 forceReconfig =
false;
1451 uint32_t val = (disable) ? 1 : 0;
1475 disabled = (val == 1) ?
true :
false;
1514 uint32_t offset = 0;
1567 uint32_t basePacketizer = 0;
1579 return basePacketizer;
1609 uint32_t basePacketizer = 0;
1631 return basePacketizer;
1643 macAddressRegister += 2;
1646 macAddressRegister++;
1649 uint32_t alignedMACHi = macHi >> 16;
1650 uint32_t alignedMACLo = (macLo >> 16) | ( (macHi & 0xffff) << 16);
1652 uint32_t addr = AJANetwork::aja_inet_addr(localIPAddress.c_str());
1723 while (val &
BIT(1))
1770 uint32_t destIp = AJANetwork::aja_inet_addr(remoteIP.c_str());
1777 uint8_t ip0 = (destIp & 0xff000000)>> 24;
1778 if (ip0 >= 224 && ip0 <= 239)
1781 mac = destIp & 0x7fffff;
1783 macaddr.
mac[0] = 0x01;
1784 macaddr.
mac[1] = 0x00;
1785 macaddr.
mac[2] = 0x5e;
1786 macaddr.
mac[3] = mac >> 16;
1787 macaddr.
mac[4] = (mac & 0xffff) >> 8;
1788 macaddr.
mac[5] = mac & 0xff;
1800 struct in_addr addr;
1802 string gateIp = AJANetwork::aja_inet_ntoa(addr);
1816 istringstream ss(macAddr);
1821 getline (ss, token,
':');
1822 macaddr.
mac[i++] = (uint8_t)strtoul(token.c_str(),
NULL, 16);
1826 hi = macaddr.
mac[0] << 8;
1827 hi += macaddr.
mac[1];
1829 lo = macaddr.
mac[2] << 24;
1830 lo += macaddr.
mac[3] << 16;
1831 lo += macaddr.
mac[4] << 8;
1832 lo += macaddr.
mac[5];
1839 string localIPAddress, subnetMask, gateway;
1840 string preAmble =
"http://";
1841 string namePre =
"tx";
1862 default: namePost =
"";
break;
1865 return preAmble + localIPAddress +
"/" + namePre + namePost;
1870 GenSDP(enabledSfp1, enabledSfp2, stream,
false);
1874 string CNTV2Config2110::To_String(
int val)
1884 stringstream & sdp = txsdp;
1890 sdp <<
"v=0" << endl;
1896 sdp << To_String((
int)t);
1898 sdp <<
" 0 IN IP4 ";
1907 struct in_addr addr;
1909 string localIPAddress = AJANetwork::aja_inet_ntoa(addr);
1910 sdp << localIPAddress << endl;
1913 sdp <<
"s=AJA KonaIP 2110" << endl;
1916 sdp <<
"t=0 0" <<endl;
1923 snprintf(gmInfo,
sizeof(gmInfo),
"%02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X:%d",
1951 string filename =
"tx";
1968 default: filename +=
"";
break;
1977 const bool enableSfp2,
const NTV2Stream stream,
char *gmInfo)
1979 bool isDash7 = enableSfp1 && enableSfp2;
1982 sdp <<
"a=group:DUP 1 2" << endl;
1987 sdp <<
"a=mid:" << (isDash7?
"1":
"VID") << endl;
1992 sdp <<
"a=mid:" << (isDash7?
"2":
"VID") << endl;
2021 string rateString = rateToString(frate);
2039 sdp <<
"/" << To_String(config.
ttl) << endl;
2042 sdp <<
"a=source-filter: incl IN IP4 ";
2056 struct in_addr addr;
2058 string localIPAddress = AJANetwork::aja_inet_ntoa(addr);
2059 sdp <<
' ' << localIPAddress << endl;
2064 sdp <<
" raw/90000" << endl;
2070 sdp <<
" sampling=RGB; width=";
2072 sdp <<
" sampling=YCbCr-4:2:2; width=";
2074 sdp << To_String(width);
2076 sdp << To_String(height);
2077 sdp <<
"; exactframerate=";
2079 sdp <<
"; depth=10; TCS=SDR; colorimetry=";
2081 sdp <<
"; PM=2110GPM; SSN=ST2110-20:2017; TP=2110TPN; ";
2084 sdp <<
"interlace; ";
2088 sdp <<
"interlace segmented";
2093 sdp <<
"a=ts-refclk:ptp=IEEE1588-2008:" << gmInfo << endl;
2094 sdp <<
"a=mediaclk:direct=0" << endl;
2102 uint32_t quadSwapOut;
2108 sdp <<
"a=group:MULTI-2SI 1 2 3 4 " << endl;
2111 for (
int i=0; i<4; i++)
2113 if (quadSwapOut != 0)
2154 string rateString = rateToString(frate);
2172 sdp <<
"/" << To_String(config.
ttl) << endl;
2175 sdp <<
"a=source-filter: incl IN IP4 ";
2189 struct in_addr addr;
2191 string localIPAddress = AJANetwork::aja_inet_ntoa(addr);
2192 sdp <<
' ' << localIPAddress << endl;
2197 sdp <<
" raw/90000" << endl;
2202 sdp <<
" sampling=YCbCr-4:2:2; width=";
2203 sdp << To_String(width);
2205 sdp << To_String(height);
2206 sdp <<
"; exactframerate=";
2208 sdp <<
"; depth=10; TCS=SDR; colorimetry=";
2210 sdp <<
"; PM=2110GPM; SSN=ST2110-20:2017; TP=2110TPN; ";
2213 sdp <<
"interlace; ";
2217 sdp <<
"interlace segmented";
2222 sdp <<
"a=ts-refclk:ptp=IEEE1588-2008:" << gmInfo << endl;
2223 sdp <<
"a=mediaclk:direct=0" << endl;
2224 sdp <<
"a=mid:" << i+1 << endl;
2232 const bool enableSfp2,
const NTV2Stream stream,
char *gmInfo)
2234 bool isDash7 = enableSfp1 && enableSfp2;
2237 sdp <<
"a=group:DUP 1 2" << endl;
2242 sdp <<
"a=mid:" << (isDash7?
"1":
"VID") << endl;
2247 sdp <<
"a=mid:" << (isDash7?
"2":
"VID") << endl;
2274 sdp <<
"/" << To_String(config.
ttl) << endl;
2277 sdp <<
"a=source-filter: incl IN IP4 ";
2291 struct in_addr addr;
2293 string localIPAddress = AJANetwork::aja_inet_ntoa(addr);
2294 sdp <<
' ' << localIPAddress << endl;
2299 sdp <<
" L24/48000/";
2305 sdp <<
" channel-order=SMPTE2110.(";
2316 sdp <<
"SGRP,SGRP)";
2319 sdp <<
"SGRP,SGRP,SGRP)";
2322 sdp <<
"SGRP,SGRP,SGRP,SGRP)";
2329 sdp <<
"a=ptime:0.125" << endl;
2333 sdp <<
"a=ptime:1.000" << endl;
2336 sdp <<
"a=ts-refclk:ptp=IEEE1588-2008:" << gmInfo << endl;
2337 sdp <<
"a=mediaclk:direct=0" << endl;
2343 const bool enableSfp2,
const NTV2Stream stream,
char *gmInfo)
2345 bool isDash7 = enableSfp1 && enableSfp2;
2348 sdp <<
"a=group:DUP 1 2" << endl;
2353 sdp <<
"a=mid:" << (isDash7?
"1":
"VID") << endl;
2358 sdp <<
"a=mid:" << (isDash7?
"2":
"VID") << endl;
2384 sdp <<
"/" << To_String(config.
ttl) << endl;
2387 sdp <<
"a=source-filter: incl IN IP4 ";
2401 struct in_addr addr;
2403 string localIPAddress = AJANetwork::aja_inet_ntoa(addr);
2404 sdp <<
' ' << localIPAddress << endl;
2409 sdp <<
" smpte291/90000" << endl;
2412 sdp <<
"a=ts-refclk:ptp=IEEE1588-2008:" << gmInfo << endl;
2413 sdp <<
"a=mediaclk:direct=0" << endl;
2476 int CNTV2Config2110::getDescriptionValue(
int startLine,
string type,
string & value)
2478 for (
unsigned i(startLine); i < sdpLines.size(); i++)
2480 string line = sdpLines[i];
2481 size_t pos = line.find(type);
2482 if (pos != string::npos)
2484 value = line.substr(pos + type.size() + 1);
2491 string CNTV2Config2110::getVideoDescriptionValue(
string type)
2493 vector<string>::iterator it;
2494 for (it = tokens.begin(); it != tokens.end(); it++)
2497 size_t pos = line.find(type);
2498 if (pos != string::npos)
2500 line = line.substr(pos + type.size());
2501 line.erase(remove(line.begin(), line.end(),
';'), line.end());
2509 vector<string> CNTV2Config2110::split(
const char *str,
char delim)
2511 vector<string> result;
2514 const char *
begin = str;
2515 while(*str != delim && *str)
2519 result.push_back(
string(
begin, str));
2520 }
while (0 != *str++);
2533 sdp.erase(remove(sdp.begin(), sdp.end(),
'\r'), sdp.end());
2537 stringstream ss(sdp);
2540 while(getline(ss,to,
'\n'))
2542 sdpLines.push_back(to);
2550 index = getDescriptionValue(0,
"v=",value);
2558 index = getDescriptionValue(index,
"a=group",value);
2565 tokens =
split(value.c_str(),
' ');
2566 if (!((tokens.size() != 5) && (tokens[0] ==
"MULTI-2SI")))
2573 for (
int i=0; i<4; i++)
2575 uint32_t rxMatch = 0;
2580 index = getDescriptionValue(index,
"m=video",value);
2587 tokens =
split(value.c_str(),
' ');
2588 if ((tokens.size() >= 1) && !tokens[0].empty())
2593 if ((tokens.size() >= 3) && !tokens[2].empty())
2599 rv = getDescriptionValue(index,
"c=IN",value);
2602 tokens =
split(value.c_str(),
' ');
2603 if (tokens.size() >= 2)
2605 tokens =
split(tokens[1].c_str(),
'/');
2606 if ((tokens.size() >= 1) && !tokens[0].empty())
2615 rv = getDescriptionValue(index,
"a=source-filter:",value);
2618 tokens =
split(value.c_str(),
' ');
2619 if (tokens.size() >= 5 && !tokens[4].empty())
2626 rv = getDescriptionValue(index,
"a=rtpmap",value);
2629 tokens =
split(value.c_str(),
' ');
2630 if ((tokens.size() >= 1) && !tokens[0].empty())
2637 rv = getDescriptionValue(index,
"a=fmtp",value);
2640 tokens =
split(value.c_str(),
' ');
2641 string sampling = getVideoDescriptionValue(
"sampling=");
2642 if (sampling ==
"YCbCr-4:2:2")
2646 string width = getVideoDescriptionValue(
"width=");
2647 string height = getVideoDescriptionValue(
"height=");
2648 string rate = getVideoDescriptionValue(
"exactframerate=");
2649 bool interlace =
false;
2650 bool segmented =
false;
2651 vector<string>::iterator it;
2653 for (it = tokens.begin(); it != tokens.end(); it++)
2661 if (*it ==
"interlace")
2667 if (it->substr(0,10) ==
"interlace;")
2672 if (it->substr(0,11) ==
"interlace=1")
2677 if ((it->substr( 0, 9 ) ==
"segmented") && interlace)
2684 int w = atoi(width.c_str());
2685 int h = atoi(height.c_str());
2707 sdp.erase(remove(sdp.begin(), sdp.end(),
'\r'), sdp.end());
2711 stringstream ss(sdp);
2714 while(getline(ss,to,
'\n'))
2716 sdpLines.push_back(to);
2724 index = getDescriptionValue(0,
"v=",value);
2732 index = getDescriptionValue(index,
"o=",value);
2739 uint32_t rxMatch = 0;
2741 tokens =
split(value.c_str(),
' ');
2742 if ((tokens.size() >= 6) && (tokens[3] ==
"IN") && (tokens[4] ==
"IP4"))
2744 if (!tokens[5].empty())
2751 int rv = getDescriptionValue(0,
"c=IN",value);
2754 tokens =
split(value.c_str(),
' ');
2755 if (tokens.size() >= 2)
2757 tokens =
split(tokens[1].c_str(),
'/');
2758 if ((tokens.size() >= 1) && !tokens[0].empty())
2760 rxConfig.
destIP = tokens[0];
2766 index = getDescriptionValue(index,
"m=video",value);
2773 tokens =
split(value.c_str(),
' ');
2774 if ((tokens.size() >= 1) && !tokens[0].empty())
2776 rxConfig.
destPort = atoi(tokens[0].c_str());
2779 if ((tokens.size() >= 3) && !tokens[2].empty())
2785 rv = getDescriptionValue(index,
"c=IN",value);
2789 tokens =
split(value.c_str(),
' ');
2790 if (tokens.size() >= 2)
2792 tokens =
split(tokens[1].c_str(),
'/');
2793 if ((tokens.size() >= 1) && !tokens[0].empty())
2795 rxConfig.
destIP = tokens[0];
2802 rv = getDescriptionValue(index,
"a=source-filter:",value);
2805 tokens =
split(value.c_str(),
' ');
2806 if (tokens.size() >= 5 && !tokens[4].empty())
2813 rv = getDescriptionValue(index,
"a=rtpmap",value);
2816 tokens =
split(value.c_str(),
' ');
2817 if ((tokens.size() >= 1) && !tokens[0].empty())
2824 rv = getDescriptionValue(index,
"a=fmtp",value);
2827 tokens =
split(value.c_str(),
' ');
2828 string sampling = getVideoDescriptionValue(
"sampling=");
2829 if (sampling ==
"YCbCr-4:2:2")
2833 string width = getVideoDescriptionValue(
"width=");
2834 string height = getVideoDescriptionValue(
"height=");
2835 string rate = getVideoDescriptionValue(
"exactframerate=");
2836 bool interlace =
false;
2837 bool segmented =
false;
2838 vector<string>::iterator it;
2839 for (it = tokens.begin(); it != tokens.end(); it++)
2847 if (*it ==
"interlace")
2853 if (it->substr(0,10) ==
"interlace;")
2858 if (it->substr(0,11) ==
"interlace=1")
2863 if ((it->substr( 0, 9 ) ==
"segmented") && interlace)
2870 int w = atoi(width.c_str());
2871 int h = atoi(height.c_str());
2889 uint32_t rxMatch = 0;
2892 sdp.erase(remove(sdp.begin(), sdp.end(),
'\r'), sdp.end());
2897 stringstream ss(sdp);
2900 while(getline(ss,to,
'\n'))
2902 sdpLines.push_back(to);
2910 index = getDescriptionValue(0,
"v=",value);
2918 index = getDescriptionValue(index,
"o=",value);
2925 tokens =
split(value.c_str(),
' ');
2926 if ((tokens.size() >= 6) && (tokens[3] ==
"IN") && (tokens[4] ==
"IP4"))
2928 if (!tokens[5].empty())
2935 int rv = getDescriptionValue(0,
"c=IN",value);
2938 tokens =
split(value.c_str(),
' ');
2939 if (tokens.size() >= 2)
2941 tokens =
split(tokens[1].c_str(),
'/');
2942 if ((tokens.size() >= 1) && !tokens[0].empty())
2944 rxConfig.
destIP = tokens[0];
2951 index = getDescriptionValue(index,
"m=audio",value);
2959 tokens =
split(value.c_str(),
' ');
2960 if ((tokens.size() >= 1) && !tokens[0].empty())
2962 rxConfig.
destPort = atoi(tokens[0].c_str());
2966 if ((tokens.size() >= 3) && !tokens[2].empty())
2972 rv = getDescriptionValue(index,
"c=IN",value);
2976 tokens =
split(value.c_str(),
' ');
2977 if ((tokens.size() >= 2))
2979 tokens =
split(tokens[1].c_str(),
'/');
2980 if ((tokens.size() >= 1)&& !tokens[0].empty())
2982 rxConfig.
destIP = tokens[0];
2989 rv = getDescriptionValue(index,
"a=source-filter:",value);
2992 tokens =
split(value.c_str(),
' ');
2993 if (tokens.size() >= 5 && !tokens[4].empty())
3000 rv = getDescriptionValue(index,
"a=rtpmap",value);
3003 tokens =
split(value.c_str(),
' ');
3004 if ((tokens.size() >= 1)&& !tokens[0].empty())
3009 if ((tokens.size() >= 2))
3011 tokens =
split(tokens[1].c_str(),
'/');
3012 if ((tokens.size() >= 3) && !tokens[2].empty())
3019 rv = getDescriptionValue(index,
"a=ptime",value);
3022 tokens =
split(value.c_str(),
' ');
3023 if ((tokens.size() >= 1)&& !tokens[0].empty())
3025 tokens =
split(tokens[0].c_str(),
'.');
3026 if (tokens.size() >= 2)
3028 if ((atoi(tokens[0].c_str()) == 1) && (atoi(tokens[1].c_str()) == 0))
3030 else if ((atoi(tokens[0].c_str()) == 0) && (atoi(tokens[1].c_str()) == 125))
3050 sdp.erase(remove(sdp.begin(), sdp.end(),
'\r'), sdp.end());
3054 stringstream ss(sdp);
3057 while(getline(ss,to,
'\n'))
3059 sdpLines.push_back(to);
3067 index = getDescriptionValue(0,
"v=",value);
3075 index = getDescriptionValue(index,
"o=",value);
3082 uint32_t rxMatch = 0;
3084 tokens =
split(value.c_str(),
' ');
3085 if ((tokens.size() >= 6) && (tokens[3] ==
"IN") && (tokens[4] ==
"IP4"))
3087 if (!tokens[5].empty())
3094 int rv = getDescriptionValue(0,
"c=IN",value);
3097 tokens =
split(value.c_str(),
' ');
3098 if (tokens.size() >= 2)
3100 tokens =
split(tokens[1].c_str(),
'/');
3101 if ((tokens.size() >= 1) && !tokens[0].empty())
3103 rxConfig.
destIP = tokens[0];
3109 index = getDescriptionValue(index,
"m=video",value);
3116 tokens =
split(value.c_str(),
' ');
3117 if ((tokens.size() >= 1) && !tokens[0].empty())
3119 rxConfig.
destPort = atoi(tokens[0].c_str());
3122 if ((tokens.size() >= 3) && !tokens[2].empty())
3128 rv = getDescriptionValue(index,
"c=IN",value);
3132 tokens =
split(value.c_str(),
' ');
3133 if (tokens.size() >= 2)
3135 tokens =
split(tokens[1].c_str(),
'/');
3136 if ((tokens.size() >= 1) && !tokens[0].empty())
3138 rxConfig.
destIP = tokens[0];
3145 rv = getDescriptionValue(index,
"a=source-filter:",value);
3148 tokens =
split(value.c_str(),
' ');
3149 if (tokens.size() >= 5 && !tokens[4].empty())
3156 rv = getDescriptionValue(index,
"a=rtpmap",value);
3159 tokens =
split(value.c_str(),
' ');
3160 if ((tokens.size() >= 1) && !tokens[0].empty())
3172 std::string CNTV2Config2110::rateToString(
NTV2FrameRate rate)
3185 rateString =
"60000/1001";
3191 rateString =
"30000/1001";
3200 rateString =
"24000/1001";
3209 rateString =
"48000/1001";
3215 rateString =
"120000/1001";
3221 rateString =
"1500/1001";
3227 NTV2FrameRate CNTV2Config2110::stringToRate(std::string rateString)
3230 if (rateString ==
"60")
3232 else if (rateString ==
"60000/1001")
3234 else if (rateString ==
"30")
3236 else if (rateString ==
"30000/1001")
3238 else if (rateString ==
"25")
3240 else if (rateString ==
"24")
3242 else if (rateString ==
"24000/1001")
3244 else if (rateString ==
"50")
3246 else if (rateString ==
"48")
3248 else if (rateString ==
"48000/1001")
3250 else if (rateString ==
"120")
3252 else if (rateString ==
"120000/1001")
3254 else if (rateString ==
"15")
3256 else if (rateString ==
"1500/1001")
3311 enable = (val & bit);
3318 uint32_t samp = sampling;
3402 std::string &chassisId1, std::string &portId1)