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);
109 numAudioChannels = 2;
115 return (!(*
this == other));
120 if ( (rxMatch == other.
rxMatch) &&
122 (destIP == other.
destIP) &&
125 (ssrc == other.
ssrc) &&
126 (vlan == other.
vlan) &&
155 _numRxChans = _numRx0Chans + _numRx1Chans;
156 _numTxChans = _numTx0Chans + _numTx1Chans;
158 _biDirectionalChannels =
false;
167 string ip, subnet, gateway;
169 addr.s_addr = (uint32_t)netConfig.
ipc_ip;
170 ip = AJANetwork::aja_inet_ntoa(addr);
172 subnet = AJANetwork::aja_inet_ntoa(addr);
174 gateway = AJANetwork::aja_inet_ntoa(addr);
182 string ip, subnet, gateway;
206 uint32_t addr = AJANetwork::aja_inet_addr(localIPAddress.c_str());
215 macAddressRegister++;
218 uint32_t boardHi = (macHi & 0xffff0000) >>16;
219 uint32_t boardLo = ((macHi & 0x0000ffff) << 16) + ((macLo & 0xffff0000) >> 16);
222 macAddressRegister++;
224 macAddressRegister++;
227 uint32_t boardHi2 = (macHi & 0xffff0000) >>16;
228 uint32_t boardLo2 = ((macHi & 0x0000ffff) << 16) + ((macLo & 0xffff0000) >> 16);
247 if (!rv)
return false;
266 localIPAddress = AJANetwork::aja_inet_ntoa(addr);
270 subnetMask = AJANetwork::aja_inet_ntoa(addr);
274 gateway = AJANetwork::aja_inet_ntoa(addr);
281 localIPAddress = AJANetwork::aja_inet_ntoa(addr);
285 subnetMask = AJANetwork::aja_inet_ntoa(addr);
289 gateway = AJANetwork::aja_inet_ntoa(addr);
337 uint32_t sourceIp = AJANetwork::aja_inet_addr(rxConfig.
sourceIP.c_str());
342 uint32_t destIp = AJANetwork::aja_inet_addr(rxConfig.
destIP.c_str());
501 uint32_t val = (num_samples << 8) + num_channels;
520 uint32_t val = ( (((uint32_t) fr) << 8) |
521 (((uint32_t) fg) << 4) |
552 uint32_t reg, reg2, value;
586 uint32_t depacketizerBaseAddr;
595 char * ip = AJANetwork::aja_inet_ntoa(in);
601 ip = AJANetwork::aja_inet_ntoa(in);
675 uint32_t srcIp, destIp;
680 uint8_t ip0 = (destIp & 0xff000000)>> 24;
681 if (ip0 >= 224 && ip0 <= 239)
736 enabled = (val & 0x01);
748 uint32_t depacketizerBaseAddr;
770 uint32_t depacketizerBaseAddr;
788 uint32_t val_lo, val_hi;
801 bytes = ((uint64_t)val_hi << 32) + val_lo;
826 uint32_t val_lo, val_hi;
839 bytes = ((uint64_t)val_hi << 32) + val_lo;
843 int CNTV2Config2110::LeastCommonMultiple(
int a,
int b)
883 bool interlaced =
false;
896 uint32_t width = fd.GetRasterWidth();
909 int componentsPerPixel;
910 int componentsPerUnit;
917 componentsPerPixel = 3;
918 componentsPerUnit = 3;
922 componentsPerPixel = 2;
923 componentsPerUnit = 4;
929 const int bitsPerComponent = 10;
930 const int pixelsPerClock = 1;
931 int activeLineLength = (width * componentsPerPixel * bitsPerComponent)/8;
933 int pixelGroup_root = LeastCommonMultiple((bitsPerComponent * componentsPerUnit), 8);
934 int pixelGroupSize = pixelGroup_root/8;
936 int bytesPerCycle = (pixelsPerClock * bitsPerComponent * componentsPerPixel)/8;
938 int lcm = LeastCommonMultiple(pixelGroupSize,bytesPerCycle);
939 int payloadLength_root = min(activeLineLength,1376)/lcm;
940 int payloadLength = payloadLength_root * lcm;
942 float pktsPerLine = ((float)activeLineLength)/((float)payloadLength);
943 int ipktsPerLine = (int)ceil(pktsPerLine);
945 int payloadLengthLast = activeLineLength - (payloadLength * (ipktsPerLine -1));
947 int ppp = (payloadLength/pixelGroupSize) * 2;
956 payloadLength = 0x0558;
957 payloadLengthLast = 0x03f0;
963 payloadLength = 0x0558;
964 payloadLengthLast = 0x0120;
971 payloadLength = 0x0558;
972 payloadLengthLast = 0x01b0;
996 int ilace = (interlaced) ? 0x01 : 0x00;
1009 uint32_t plength = audioChans * samples * 3;
1012 uint32_t aselect = ((uint32_t)txConfig.
firstAudioChannel << 16 ) + (audioChans-1);
1013 aselect = (txConfig.
channel << 24) + aselect;
1063 uint32_t val = (txConfig.
tos << 8) | txConfig.
ttl;
1066 int index = (int)sfp;
1068 uint32_t destIp = AJANetwork::aja_inet_addr(txConfig.
remoteIP[index].c_str());
1082 if (!rv)
return false;
1096 uint32_t baseAddrPacketizer;
1160 int index = (int)sfp;
1170 txConfig.
ttl = val & 0xff;
1171 txConfig.
tos = (val & 0xff00) >> 8;
1177 char * ip = AJANetwork::aja_inet_ntoa(in);
1207 GenSDP(enableSfp1, enableSfp2, stream);
1214 if (enableSfp1 || enableSfp2)
1281 uint32_t val = ((uint32_t)
id[0] << 24) | ((uint32_t)
id[1] << 16) | ((uint32_t)
id[2] << 8) | ((uint32_t)
id[3] << 0);
1283 val = ((uint32_t)
id[4] << 24) | ((uint32_t)
id[5] << 16) | ((uint32_t)
id[6] << 8) | ((uint32_t)
id[7] << 0);
1380 enable = val & 0x01;
1409 enable = val & 0x10;
1438 forceReconfig =
true;
1440 forceReconfig =
false;
1447 uint32_t val = (disable) ? 1 : 0;
1471 disabled = (val == 1) ?
true :
false;
1510 uint32_t offset = 0;
1563 uint32_t basePacketizer = 0;
1575 return basePacketizer;
1605 uint32_t basePacketizer = 0;
1627 return basePacketizer;
1639 macAddressRegister += 2;
1642 macAddressRegister++;
1645 uint32_t alignedMACHi = macHi >> 16;
1646 uint32_t alignedMACLo = (macLo >> 16) | ( (macHi & 0xffff) << 16);
1648 uint32_t addr = AJANetwork::aja_inet_addr(localIPAddress.c_str());
1719 while (val &
BIT(1))
1766 uint32_t destIp = AJANetwork::aja_inet_addr(remoteIP.c_str());
1773 uint8_t ip0 = (destIp & 0xff000000)>> 24;
1774 if (ip0 >= 224 && ip0 <= 239)
1777 mac = destIp & 0x7fffff;
1779 macaddr.
mac[0] = 0x01;
1780 macaddr.
mac[1] = 0x00;
1781 macaddr.
mac[2] = 0x5e;
1782 macaddr.
mac[3] = mac >> 16;
1783 macaddr.
mac[4] = (mac & 0xffff) >> 8;
1784 macaddr.
mac[5] = mac & 0xff;
1796 struct in_addr addr;
1798 string gateIp = AJANetwork::aja_inet_ntoa(addr);
1812 istringstream ss(macAddr);
1817 getline (ss, token,
':');
1818 macaddr.
mac[i++] = (uint8_t)strtoul(token.c_str(),
NULL, 16);
1822 hi = macaddr.
mac[0] << 8;
1823 hi += macaddr.
mac[1];
1825 lo = macaddr.
mac[2] << 24;
1826 lo += macaddr.
mac[3] << 16;
1827 lo += macaddr.
mac[4] << 8;
1828 lo += macaddr.
mac[5];
1835 string localIPAddress, subnetMask, gateway;
1836 string preAmble =
"http://";
1837 string namePre =
"tx";
1858 default: namePost =
"";
break;
1861 return preAmble + localIPAddress +
"/" + namePre + namePost;
1866 GenSDP(enabledSfp1, enabledSfp2, stream,
false);
1870 string CNTV2Config2110::To_String(
int val)
1880 stringstream & sdp = txsdp;
1886 sdp <<
"v=0" << endl;
1892 sdp << To_String((
int)t);
1894 sdp <<
" 0 IN IP4 ";
1903 struct in_addr addr;
1905 string localIPAddress = AJANetwork::aja_inet_ntoa(addr);
1906 sdp << localIPAddress << endl;
1909 sdp <<
"s=AJA KonaIP 2110" << endl;
1912 sdp <<
"t=0 0" <<endl;
1919 sprintf(gmInfo,
"%02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X:%d",
1947 string filename =
"tx";
1964 default: filename +=
"";
break;
1973 const bool enableSfp2,
const NTV2Stream stream,
char *gmInfo)
1975 bool isDash7 = enableSfp1 && enableSfp2;
1978 sdp <<
"a=group:DUP 1 2" << endl;
1983 sdp <<
"a=mid:" << (isDash7?
"1":
"VID") << endl;
1988 sdp <<
"a=mid:" << (isDash7?
"2":
"VID") << endl;
2017 string rateString = rateToString(frate);
2035 sdp <<
"/" << To_String(config.
ttl) << endl;
2038 sdp <<
"a=source-filter: incl IN IP4 ";
2052 struct in_addr addr;
2054 string localIPAddress = AJANetwork::aja_inet_ntoa(addr);
2055 sdp <<
' ' << localIPAddress << endl;
2060 sdp <<
" raw/90000" << endl;
2066 sdp <<
" sampling=RGB; width=";
2068 sdp <<
" sampling=YCbCr-4:2:2; width=";
2070 sdp << To_String(width);
2072 sdp << To_String(height);
2073 sdp <<
"; exactframerate=";
2075 sdp <<
"; depth=10; TCS=SDR; colorimetry=";
2077 sdp <<
"; PM=2110GPM; SSN=ST2110-20:2017; TP=2110TPN; ";
2080 sdp <<
"interlace; ";
2084 sdp <<
"interlace segmented";
2089 sdp <<
"a=ts-refclk:ptp=IEEE1588-2008:" << gmInfo << endl;
2090 sdp <<
"a=mediaclk:direct=0" << endl;
2098 uint32_t quadSwapOut;
2104 sdp <<
"a=group:MULTI-2SI 1 2 3 4 " << endl;
2107 for (
int i=0; i<4; i++)
2109 if (quadSwapOut != 0)
2150 string rateString = rateToString(frate);
2168 sdp <<
"/" << To_String(config.
ttl) << endl;
2171 sdp <<
"a=source-filter: incl IN IP4 ";
2185 struct in_addr addr;
2187 string localIPAddress = AJANetwork::aja_inet_ntoa(addr);
2188 sdp <<
' ' << localIPAddress << endl;
2193 sdp <<
" raw/90000" << endl;
2198 sdp <<
" sampling=YCbCr-4:2:2; width=";
2199 sdp << To_String(width);
2201 sdp << To_String(height);
2202 sdp <<
"; exactframerate=";
2204 sdp <<
"; depth=10; TCS=SDR; colorimetry=";
2206 sdp <<
"; PM=2110GPM; SSN=ST2110-20:2017; TP=2110TPN; ";
2209 sdp <<
"interlace; ";
2213 sdp <<
"interlace segmented";
2218 sdp <<
"a=ts-refclk:ptp=IEEE1588-2008:" << gmInfo << endl;
2219 sdp <<
"a=mediaclk:direct=0" << endl;
2220 sdp <<
"a=mid:" << i+1 << endl;
2228 const bool enableSfp2,
const NTV2Stream stream,
char *gmInfo)
2230 bool isDash7 = enableSfp1 && enableSfp2;
2233 sdp <<
"a=group:DUP 1 2" << endl;
2238 sdp <<
"a=mid:" << (isDash7?
"1":
"VID") << endl;
2243 sdp <<
"a=mid:" << (isDash7?
"2":
"VID") << endl;
2270 sdp <<
"/" << To_String(config.
ttl) << endl;
2273 sdp <<
"a=source-filter: incl IN IP4 ";
2287 struct in_addr addr;
2289 string localIPAddress = AJANetwork::aja_inet_ntoa(addr);
2290 sdp <<
' ' << localIPAddress << endl;
2295 sdp <<
" L24/48000/";
2301 sdp <<
" channel-order=SMPTE2110.(";
2312 sdp <<
"SGRP,SGRP)";
2315 sdp <<
"SGRP,SGRP,SGRP)";
2318 sdp <<
"SGRP,SGRP,SGRP,SGRP)";
2325 sdp <<
"a=ptime:0.125" << endl;
2329 sdp <<
"a=ptime:1.000" << endl;
2332 sdp <<
"a=ts-refclk:ptp=IEEE1588-2008:" << gmInfo << endl;
2333 sdp <<
"a=mediaclk:direct=0" << endl;
2339 const bool enableSfp2,
const NTV2Stream stream,
char *gmInfo)
2341 bool isDash7 = enableSfp1 && enableSfp2;
2344 sdp <<
"a=group:DUP 1 2" << endl;
2349 sdp <<
"a=mid:" << (isDash7?
"1":
"VID") << endl;
2354 sdp <<
"a=mid:" << (isDash7?
"2":
"VID") << endl;
2380 sdp <<
"/" << To_String(config.
ttl) << endl;
2383 sdp <<
"a=source-filter: incl IN IP4 ";
2397 struct in_addr addr;
2399 string localIPAddress = AJANetwork::aja_inet_ntoa(addr);
2400 sdp <<
' ' << localIPAddress << endl;
2405 sdp <<
" smpte291/90000" << endl;
2408 sdp <<
"a=ts-refclk:ptp=IEEE1588-2008:" << gmInfo << endl;
2409 sdp <<
"a=mediaclk:direct=0" << endl;
2472 int CNTV2Config2110::getDescriptionValue(
int startLine,
string type,
string & value)
2474 for (
unsigned i(startLine); i < sdpLines.size(); i++)
2476 string line = sdpLines[i];
2477 size_t pos = line.find(type);
2478 if (pos != string::npos)
2480 value = line.substr(pos + type.size() + 1);
2487 string CNTV2Config2110::getVideoDescriptionValue(
string type)
2489 vector<string>::iterator it;
2490 for (it = tokens.begin(); it != tokens.end(); it++)
2493 size_t pos = line.find(type);
2494 if (pos != string::npos)
2496 line = line.substr(pos + type.size());
2497 line.erase(remove(line.begin(), line.end(),
';'), line.end());
2505 vector<string> CNTV2Config2110::split(
const char *str,
char delim)
2507 vector<string> result;
2510 const char *
begin = str;
2511 while(*str != delim && *str)
2515 result.push_back(
string(
begin, str));
2516 }
while (0 != *str++);
2529 sdp.erase(remove(sdp.begin(), sdp.end(),
'\r'), sdp.end());
2533 stringstream ss(sdp);
2536 while(getline(ss,to,
'\n'))
2538 sdpLines.push_back(to);
2546 index = getDescriptionValue(0,
"v=",value);
2554 index = getDescriptionValue(index,
"a=group",value);
2561 tokens =
split(value.c_str(),
' ');
2562 if (!((tokens.size() != 5) && (tokens[0] ==
"MULTI-2SI")))
2569 for (
int i=0; i<4; i++)
2571 uint32_t rxMatch = 0;
2576 index = getDescriptionValue(index,
"m=video",value);
2583 tokens =
split(value.c_str(),
' ');
2584 if ((tokens.size() >= 1) && !tokens[0].empty())
2589 if ((tokens.size() >= 3) && !tokens[2].empty())
2595 rv = getDescriptionValue(index,
"c=IN",value);
2598 tokens =
split(value.c_str(),
' ');
2599 if (tokens.size() >= 2)
2601 tokens =
split(tokens[1].c_str(),
'/');
2602 if ((tokens.size() >= 1) && !tokens[0].empty())
2611 rv = getDescriptionValue(index,
"a=source-filter:",value);
2614 tokens =
split(value.c_str(),
' ');
2615 if (tokens.size() >= 5 && !tokens[4].empty())
2622 rv = getDescriptionValue(index,
"a=rtpmap",value);
2625 tokens =
split(value.c_str(),
' ');
2626 if ((tokens.size() >= 1) && !tokens[0].empty())
2633 rv = getDescriptionValue(index,
"a=fmtp",value);
2636 tokens =
split(value.c_str(),
' ');
2637 string sampling = getVideoDescriptionValue(
"sampling=");
2638 if (sampling ==
"YCbCr-4:2:2")
2642 string width = getVideoDescriptionValue(
"width=");
2643 string height = getVideoDescriptionValue(
"height=");
2644 string rate = getVideoDescriptionValue(
"exactframerate=");
2645 bool interlace =
false;
2646 bool segmented =
false;
2647 vector<string>::iterator it;
2649 for (it = tokens.begin(); it != tokens.end(); it++)
2657 if (*it ==
"interlace")
2663 if (it->substr(0,10) ==
"interlace;")
2668 if (it->substr(0,11) ==
"interlace=1")
2673 if ((it->substr( 0, 9 ) ==
"segmented") && interlace)
2680 int w = atoi(width.c_str());
2681 int h = atoi(height.c_str());
2703 sdp.erase(remove(sdp.begin(), sdp.end(),
'\r'), sdp.end());
2707 stringstream ss(sdp);
2710 while(getline(ss,to,
'\n'))
2712 sdpLines.push_back(to);
2720 index = getDescriptionValue(0,
"v=",value);
2728 index = getDescriptionValue(index,
"o=",value);
2735 uint32_t rxMatch = 0;
2737 tokens =
split(value.c_str(),
' ');
2738 if ((tokens.size() >= 6) && (tokens[3] ==
"IN") && (tokens[4] ==
"IP4"))
2740 if (!tokens[5].empty())
2747 int rv = getDescriptionValue(0,
"c=IN",value);
2750 tokens =
split(value.c_str(),
' ');
2751 if (tokens.size() >= 2)
2753 tokens =
split(tokens[1].c_str(),
'/');
2754 if ((tokens.size() >= 1) && !tokens[0].empty())
2756 rxConfig.
destIP = tokens[0];
2762 index = getDescriptionValue(index,
"m=video",value);
2769 tokens =
split(value.c_str(),
' ');
2770 if ((tokens.size() >= 1) && !tokens[0].empty())
2772 rxConfig.
destPort = atoi(tokens[0].c_str());
2775 if ((tokens.size() >= 3) && !tokens[2].empty())
2781 rv = getDescriptionValue(index,
"c=IN",value);
2785 tokens =
split(value.c_str(),
' ');
2786 if (tokens.size() >= 2)
2788 tokens =
split(tokens[1].c_str(),
'/');
2789 if ((tokens.size() >= 1) && !tokens[0].empty())
2791 rxConfig.
destIP = tokens[0];
2798 rv = getDescriptionValue(index,
"a=source-filter:",value);
2801 tokens =
split(value.c_str(),
' ');
2802 if (tokens.size() >= 5 && !tokens[4].empty())
2809 rv = getDescriptionValue(index,
"a=rtpmap",value);
2812 tokens =
split(value.c_str(),
' ');
2813 if ((tokens.size() >= 1) && !tokens[0].empty())
2820 rv = getDescriptionValue(index,
"a=fmtp",value);
2823 tokens =
split(value.c_str(),
' ');
2824 string sampling = getVideoDescriptionValue(
"sampling=");
2825 if (sampling ==
"YCbCr-4:2:2")
2829 string width = getVideoDescriptionValue(
"width=");
2830 string height = getVideoDescriptionValue(
"height=");
2831 string rate = getVideoDescriptionValue(
"exactframerate=");
2832 bool interlace =
false;
2833 bool segmented =
false;
2834 vector<string>::iterator it;
2835 for (it = tokens.begin(); it != tokens.end(); it++)
2843 if (*it ==
"interlace")
2849 if (it->substr(0,10) ==
"interlace;")
2854 if (it->substr(0,11) ==
"interlace=1")
2859 if ((it->substr( 0, 9 ) ==
"segmented") && interlace)
2866 int w = atoi(width.c_str());
2867 int h = atoi(height.c_str());
2885 uint32_t rxMatch = 0;
2888 sdp.erase(remove(sdp.begin(), sdp.end(),
'\r'), sdp.end());
2893 stringstream ss(sdp);
2896 while(getline(ss,to,
'\n'))
2898 sdpLines.push_back(to);
2906 index = getDescriptionValue(0,
"v=",value);
2914 index = getDescriptionValue(index,
"o=",value);
2921 tokens =
split(value.c_str(),
' ');
2922 if ((tokens.size() >= 6) && (tokens[3] ==
"IN") && (tokens[4] ==
"IP4"))
2924 if (!tokens[5].empty())
2931 int rv = getDescriptionValue(0,
"c=IN",value);
2934 tokens =
split(value.c_str(),
' ');
2935 if (tokens.size() >= 2)
2937 tokens =
split(tokens[1].c_str(),
'/');
2938 if ((tokens.size() >= 1) && !tokens[0].empty())
2940 rxConfig.
destIP = tokens[0];
2947 index = getDescriptionValue(index,
"m=audio",value);
2955 tokens =
split(value.c_str(),
' ');
2956 if ((tokens.size() >= 1) && !tokens[0].empty())
2958 rxConfig.
destPort = atoi(tokens[0].c_str());
2962 if ((tokens.size() >= 3) && !tokens[2].empty())
2968 rv = getDescriptionValue(index,
"c=IN",value);
2972 tokens =
split(value.c_str(),
' ');
2973 if ((tokens.size() >= 2))
2975 tokens =
split(tokens[1].c_str(),
'/');
2976 if ((tokens.size() >= 1)&& !tokens[0].empty())
2978 rxConfig.
destIP = tokens[0];
2985 rv = getDescriptionValue(index,
"a=source-filter:",value);
2988 tokens =
split(value.c_str(),
' ');
2989 if (tokens.size() >= 5 && !tokens[4].empty())
2996 rv = getDescriptionValue(index,
"a=rtpmap",value);
2999 tokens =
split(value.c_str(),
' ');
3000 if ((tokens.size() >= 1)&& !tokens[0].empty())
3005 if ((tokens.size() >= 2))
3007 tokens =
split(tokens[1].c_str(),
'/');
3008 if ((tokens.size() >= 3) && !tokens[2].empty())
3015 rv = getDescriptionValue(index,
"a=ptime",value);
3018 tokens =
split(value.c_str(),
' ');
3019 if ((tokens.size() >= 1)&& !tokens[0].empty())
3021 tokens =
split(tokens[0].c_str(),
'.');
3022 if (tokens.size() >= 2)
3024 if ((atoi(tokens[0].c_str()) == 1) && (atoi(tokens[1].c_str()) == 0))
3026 else if ((atoi(tokens[0].c_str()) == 0) && (atoi(tokens[1].c_str()) == 125))
3046 sdp.erase(remove(sdp.begin(), sdp.end(),
'\r'), sdp.end());
3050 stringstream ss(sdp);
3053 while(getline(ss,to,
'\n'))
3055 sdpLines.push_back(to);
3063 index = getDescriptionValue(0,
"v=",value);
3071 index = getDescriptionValue(index,
"o=",value);
3078 uint32_t rxMatch = 0;
3080 tokens =
split(value.c_str(),
' ');
3081 if ((tokens.size() >= 6) && (tokens[3] ==
"IN") && (tokens[4] ==
"IP4"))
3083 if (!tokens[5].empty())
3090 int rv = getDescriptionValue(0,
"c=IN",value);
3093 tokens =
split(value.c_str(),
' ');
3094 if (tokens.size() >= 2)
3096 tokens =
split(tokens[1].c_str(),
'/');
3097 if ((tokens.size() >= 1) && !tokens[0].empty())
3099 rxConfig.
destIP = tokens[0];
3105 index = getDescriptionValue(index,
"m=video",value);
3112 tokens =
split(value.c_str(),
' ');
3113 if ((tokens.size() >= 1) && !tokens[0].empty())
3115 rxConfig.
destPort = atoi(tokens[0].c_str());
3118 if ((tokens.size() >= 3) && !tokens[2].empty())
3124 rv = getDescriptionValue(index,
"c=IN",value);
3128 tokens =
split(value.c_str(),
' ');
3129 if (tokens.size() >= 2)
3131 tokens =
split(tokens[1].c_str(),
'/');
3132 if ((tokens.size() >= 1) && !tokens[0].empty())
3134 rxConfig.
destIP = tokens[0];
3141 rv = getDescriptionValue(index,
"a=source-filter:",value);
3144 tokens =
split(value.c_str(),
' ');
3145 if (tokens.size() >= 5 && !tokens[4].empty())
3152 rv = getDescriptionValue(index,
"a=rtpmap",value);
3155 tokens =
split(value.c_str(),
' ');
3156 if ((tokens.size() >= 1) && !tokens[0].empty())
3168 std::string CNTV2Config2110::rateToString(
NTV2FrameRate rate)
3181 rateString =
"60000/1001";
3187 rateString =
"30000/1001";
3196 rateString =
"24000/1001";
3205 rateString =
"48000/1001";
3211 rateString =
"120000/1001";
3217 rateString =
"1500/1001";
3223 NTV2FrameRate CNTV2Config2110::stringToRate(std::string rateString)
3226 if (rateString ==
"60")
3228 else if (rateString ==
"60000/1001")
3230 else if (rateString ==
"30")
3232 else if (rateString ==
"30000/1001")
3234 else if (rateString ==
"25")
3236 else if (rateString ==
"24")
3238 else if (rateString ==
"24000/1001")
3240 else if (rateString ==
"50")
3242 else if (rateString ==
"48")
3244 else if (rateString ==
"48000/1001")
3246 else if (rateString ==
"120")
3248 else if (rateString ==
"120000/1001")
3250 else if (rateString ==
"15")
3252 else if (rateString ==
"1500/1001")
3307 enable = (val & bit);
3314 uint32_t samp = sampling;
3398 std::string &chassisId1, std::string &portId1)