reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
SdpMediaLine.cxx
Go to the documentation of this file.
1#include "SdpMediaLine.hxx"
2
3using namespace sdpcontainer;
4
6{
7 "NONE",
8 "UNKNOWN",
9 "AUDIO",
10 "VIDEO",
11 "TEXT",
12 "APPLICATION",
13 "MESSAGE"
14};
15
17{
18 "NONE",
19 "UNKNOWN",
20 "UDP",
21 "RTP/AVP",
22 "RTP/AVPF",
23 "RTP/SAVP",
24 "RTP/SAVPF",
25 "TCP",
26 "TCP/RTP/AVP",
27 "TCP/TLS",
28 "UDP/TLS",
29 "DCCP/TLS",
30 "DCCP/TLS/RTP/SAVP",
31 "UDP/TLS/RTP/SAVP",
32 "UDP/TLS/RTP/SAVPF",
33 "TCP/TLS/RTP/SAVP"
34};
35
37{
38 "NONE",
39 "CLEAR",
40 "BASE64",
41 "URI",
42 "PROMPT"
43};
44
46{
47 "NONE",
48 "SENDRECV",
49 "SENDONLY",
50 "RECVONLY",
51 "INACTIVE"
52};
53
55{
56 "NONE",
57 "PORTRAIT",
58 "LANDSCAPE",
59 "SEASCAPE"
60};
61
63{
64 "NONE",
65 "ACTIVE",
66 "PASSIVE",
67 "ACTPASS",
68 "HOLDCONN"
69};
70
72{
73 "NONE",
74 "NEW",
75 "EXISTING"
76};
77
79{
80 "NONE",
81 "AES_CM_128_HMAC_SHA1_80",
82 "AES_CM_128_HMAC_SHA1_32",
83 "F8_128_HMAC_SHA1_80",
84 "AES_CM_192_HMAC_SHA1_80",
85 "AES_CM_192_HMAC_SHA1_32",
86 "AES_CM_256_HMAC_SHA1_80",
87 "AES_CM_256_HMAC_SHA1_32",
88 "AEAD_AES_128_GCM",
89 "AEAD_AES_256_GCM"
90};
91
93{
94 "NONE",
95 "INLINE"
96};
97
99{
100 "NONE",
101 "FEC_SRTP",
102 "SRTP_FEC"
103};
104
106{
107 "NONE",
108 "SHA-1",
109 "SHA-224",
110 "SHA-256",
111 "SHA-384",
112 "SHA-512",
113 "MD5",
114 "MD2"
115};
116
118{
119 "NONE",
120 "MIKEY"
121};
122
124{
125 "NONE",
126 "QOS",
127};
128
130{
131 "MANDATORY",
132 "OPTIONAL",
133 "NONE",
134 "FAILURE",
135 "UNKNOWN"
136};
137
139{
140 "NONE",
141 "E2E",
142 "LOCAL",
143 "REMOTE"
144};
145
147{
148 "NONE",
149 "SEND",
150 "RECV",
151 "SENDRECV"
152};
153
158
161{
162 if (this == &rhs) // handle the assignment to self case
163 return *this;
164
165 // Assign values
166 mTag = rhs.mTag;
167 mSuite = rhs.mSuite;
168 mCryptoKeyParams = rhs.mCryptoKeyParams;
169 mSrtpKdr = rhs.mSrtpKdr;
170 mEncryptedSrtp = rhs.mEncryptedSrtp;
171 mEncryptedSrtcp = rhs.mEncryptedSrtcp;
172 mAuthenticatedSrtp = rhs.mAuthenticatedSrtp;
173 mSrtpFecOrder = rhs.mSrtpFecOrder;
174 mSrtpFecKey = rhs.mSrtpFecKey;
175 mSrtpWsh = rhs.mSrtpWsh;
176 mGenericSessionParams = rhs.mGenericSessionParams;
177
178 return *this;
179}
180
181
182// Constructor
184 mMediaType(SdpMediaLine::MEDIA_TYPE_NONE),
185 mTransportProtocolType(SdpMediaLine::PROTOCOL_TYPE_NONE),
186 mEncryptionMethod(SdpMediaLine::ENCRYPTION_METHOD_NONE),
188 mPacketTime(0),
189 mMaxPacketTime(0),
190 mOrientation(SdpMediaLine::ORIENTATION_TYPE_NONE),
191 mFrameRate(0),
192 mQuality(0),
193 mTcpSetupAttribute(SdpMediaLine::TCP_SETUP_ATTRIBUTE_NONE),
194 mTcpConnectionAttribute(SdpMediaLine::TCP_CONNECTION_ATTRIBUTE_NONE),
195 mFingerPrintHashFunction(SdpMediaLine::FINGERPRINT_HASH_FUNC_NONE),
196 mKeyManagementProtocol(SdpMediaLine::KEYMANAGEMENT_PROTOCOL_NONE),
197 mMaximumPacketRate(0),
198 mRtpCandidatePresent(false),
199 mRtcpCandidatePresent(false)
200{
201}
202
203// Copy constructor
208
209// Destructor
215
216// Assignment operator
219{
220 if (this == &rhs) // handle the assignment to self case
221 return *this;
222
223 // Assign values
224 mMediaType = rhs.mMediaType;
225 mMediaTypeString = rhs.mMediaTypeString;
226 mTransportProtocolType = rhs.mTransportProtocolType;
227 mTransportProtocolTypeString = rhs.mTransportProtocolTypeString;
228 mCodecs = rhs.mCodecs;
229 mTitle = rhs.mTitle;
230 mConnections = rhs.mConnections;
231 mRtcpConnections = rhs.mRtcpConnections;
232 mBandwidths = rhs.mBandwidths;
233 mEncryptionMethod = rhs.mEncryptionMethod;
234 mEncryptionKey = rhs.mEncryptionKey;
235 mDirection = rhs.mDirection;
236 mPacketTime = rhs.mPacketTime;
237 mMaxPacketTime = rhs.mMaxPacketTime;
238 mOrientation = rhs.mOrientation;
239 mDescriptionLanguage = rhs.mDescriptionLanguage;
240 mLanguage = rhs.mLanguage;
241 mFrameRate = rhs.mFrameRate;
242 mQuality = rhs.mQuality;
243 mTcpSetupAttribute = rhs.mTcpSetupAttribute;
244 mTcpConnectionAttribute = rhs.mTcpConnectionAttribute;
245 mCryptos = rhs.mCryptos;
246 mFingerPrintHashFunction = rhs.mFingerPrintHashFunction;
247 mFingerPrint = rhs.mFingerPrint;
248 mKeyManagementProtocol = rhs.mKeyManagementProtocol;
249 mKeyManagementData = rhs.mKeyManagementData;
250 mPreConditionCurrentStatus = rhs.mPreConditionCurrentStatus;
251 mPreConditionConfirmStatus = rhs.mPreConditionConfirmStatus;
252 mPreConditionDesiredStatus = rhs.mPreConditionDesiredStatus;
253 mMaximumPacketRate = rhs.mMaximumPacketRate;
254 mLabel = rhs.mLabel;
255 mIdentificationTag = rhs.mIdentificationTag;
256 mIceUserFrag = rhs.mIceUserFrag;
257 mIcePassword = rhs.mIcePassword;
258 mRemoteCandidates = rhs.mRemoteCandidates;
259 mCandidates = rhs.mCandidates;
260 mRtpCandidatePresent = rhs.mRtpCandidatePresent;
261 mRtcpCandidatePresent = rhs.mRtcpCandidatePresent;
262 mCandidatePairs = rhs.mCandidatePairs;
263 mPotentialMediaViews = rhs.mPotentialMediaViews;
264 mPotentialMediaViewString = rhs.mPotentialMediaViewString;
265
266 return *this;
267}
268
269void
271{
272 // Check if Candidate is in use (appears on m/c line or rtcp attributes)
273 // First check m/c line(s)
274 ConnectionList::iterator it = mConnections.begin();
275 for(;it != mConnections.end(); it++)
276 {
277 if(candidate.getPort() == it->getPort() &&
278 candidate.getConnectionAddress() == it->getAddress())
279 {
280 mRtpCandidatePresent = true;
281 candidate.setInUse(true);
282 break;
283 }
284 }
285
286 // Next check Rtcp Info
287 if(isRtcpEnabled())
288 {
289 it = mRtcpConnections.begin();
290 for(;it != mRtcpConnections.end(); it++)
291 {
292 if(candidate.getPort() == it->getPort() &&
293 candidate.getConnectionAddress() == it->getAddress())
294 {
295 mRtcpCandidatePresent = true;
296 candidate.setInUse(true);
297 break;
298 }
299 }
300 }
301
302 mCandidates.insert(candidate);
303}
304
305void
307 uint64_t priority, const char * connectionAddress, unsigned int port,
309 unsigned int relatedPort)
310{
312 addCandidate(t);
313}
314
317{
318 resip::Data dataType(type);
319
320 if(resip::isEqualNoCase("audio", dataType))
321 {
322 return MEDIA_TYPE_AUDIO;
323 }
324 else if(resip::isEqualNoCase("video", dataType))
325 {
326 return MEDIA_TYPE_VIDEO;
327 }
328 else if(resip::isEqualNoCase("text", dataType))
329 {
330 return MEDIA_TYPE_TEXT;
331 }
332 else if(resip::isEqualNoCase("application", dataType))
333 {
335 }
336 else if(resip::isEqualNoCase("message", dataType))
337 {
338 return MEDIA_TYPE_MESSAGE;
339 }
340 else
341 {
342 return MEDIA_TYPE_UNKNOWN;
343 }
344}
345
348{
349 resip::Data dataType(type);
350
352 {
353 return PROTOCOL_TYPE_UDP;
354 }
355 else if(resip::isEqualNoCase("RTP/AVP", dataType))
356 {
358 }
359 else if (resip::isEqualNoCase("RTP/AVPF", dataType))
360 {
362 }
363 else if(resip::isEqualNoCase("RTP/SAVP", dataType))
364 {
366 }
367 else if(resip::isEqualNoCase("RTP/SAVPF", dataType))
368 {
370 }
371 else if(resip::isEqualNoCase("TCP", dataType))
372 {
373 return PROTOCOL_TYPE_TCP;
374 }
375 else if(resip::isEqualNoCase("TCP/RTP/AVP", dataType))
376 {
378 }
379 else if(resip::isEqualNoCase("TCP/TLS", dataType))
380 {
382 }
383 else if(resip::isEqualNoCase("UDP/TLS", dataType))
384 {
386 }
387 else if(resip::isEqualNoCase("DCCP/TLS", dataType))
388 {
390 }
391 else if(resip::isEqualNoCase("DCCP/TLS/RTP/SAVP", dataType))
392 {
394 }
395 else if(resip::isEqualNoCase("UDP/TLS/RTP/SAVP", dataType))
396 {
398 }
399 else if (resip::isEqualNoCase("UDP/TLS/RTP/SAVPF", dataType))
400 {
402 }
403 else if(resip::isEqualNoCase("TCP/TLS/RTP/SAVP", dataType))
404 {
406 }
407 else
408 {
410 }
411}
412
415{
416 resip::Data dataType(type);
417
418 if(resip::isEqualNoCase("portrait", dataType))
419 {
421 }
422 else if(resip::isEqualNoCase("landscape", dataType))
423 {
425 }
426 else if(resip::isEqualNoCase("seascape", dataType))
427 {
429 }
430 else
431 {
433 }
434}
435
438{
440
441 if(resip::isEqualNoCase("active", dataType))
442 {
444 }
445 else if(resip::isEqualNoCase("passive", dataType))
446 {
448 }
449 else if(resip::isEqualNoCase("actpass", dataType))
450 {
452 }
453 else if(resip::isEqualNoCase("holdconn", dataType))
454 {
456 }
457 else
458 {
460 }
461}
462
465{
467
469 {
471 }
472 else if(resip::isEqualNoCase("existing", dataType))
473 {
475 }
476 else
477 {
479 }
480}
481
484{
485 resip::Data dataType(type);
486
487 if(resip::isEqualNoCase("AES_CM_128_HMAC_SHA1_80", dataType))
488 {
490 }
491 else if(resip::isEqualNoCase("AES_CM_128_HMAC_SHA1_32", dataType))
492 {
494 }
495 else if(resip::isEqualNoCase("F8_128_HMAC_SHA1_80", dataType))
496 {
498 }
499 // RFC6188 places the _CM after the Master Key length for some reason - accept both
500 else if (resip::isEqualNoCase("AES_CM_192_HMAC_SHA1_80", dataType) ||
501 resip::isEqualNoCase("AES_192_CM_HMAC_SHA1_80", dataType))
502 {
504 }
505 // RFC6188 places the _CM after the Master Key length for some reason - accept both
506 else if (resip::isEqualNoCase("AES_CM_192_HMAC_SHA1_32", dataType) ||
507 resip::isEqualNoCase("AES_192_CM_HMAC_SHA1_32", dataType))
508 {
510 }
511 // RFC6188 places the _CM after the Master Key length for some reason - accept both
512 else if (resip::isEqualNoCase("AES_CM_256_HMAC_SHA1_80", dataType) ||
513 resip::isEqualNoCase("AES_256_CM_HMAC_SHA1_80", dataType))
514 {
516 }
517 // RFC6188 places the _CM after the Master Key length for some reason - accept both
518 else if (resip::isEqualNoCase("AES_CM_256_HMAC_SHA1_32", dataType) ||
519 resip::isEqualNoCase("AES_256_CM_HMAC_SHA1_32", dataType))
520 {
522 }
523 else
524 {
526 }
527}
528
531{
532 resip::Data dataType(type);
533
534 if(resip::isEqualNoCase("inline", dataType))
535 {
537 }
538 else
539 {
541 }
542}
543
546{
547 resip::Data dataType(order);
548
549 if(resip::isEqualNoCase("FEC_SRTP", dataType))
550 {
552 }
553 else if(resip::isEqualNoCase("SRTP_FEC", dataType))
554 {
556 }
557 else
558 {
560 }
561}
562
565{
566 resip::Data dataType(type);
567
568 if(resip::isEqualNoCase("sha-1", dataType))
569 {
571 }
572 else if(resip::isEqualNoCase("sha-224", dataType))
573 {
575 }
576 else if(resip::isEqualNoCase("sha-256", dataType))
577 {
579 }
580 else if(resip::isEqualNoCase("sha-384", dataType))
581 {
583 }
584 else if(resip::isEqualNoCase("sha-512", dataType))
585 {
587 }
588 else if(resip::isEqualNoCase("md5", dataType))
589 {
591 }
592 else if(resip::isEqualNoCase("md2", dataType))
593 {
595 }
596 else
597 {
599 }
600}
601
604{
605 resip::Data dataType(type);
606
607 if(resip::isEqualNoCase("mikey", dataType))
608 {
610 }
611 else
612 {
614 }
615}
616
619{
620 resip::Data dataType(type);
621
623 {
625 }
626 else
627 {
629 }
630}
631
634{
635 resip::Data dataType(type);
636
638 {
640 }
641 else if(resip::isEqualNoCase("local", dataType))
642 {
644 }
645 else if(resip::isEqualNoCase("remote", dataType))
646 {
648 }
649 else
650 {
652 }
653}
654
657{
658 resip::Data dataType(type);
659
660 if(resip::isEqualNoCase("send", dataType))
661 {
663 }
664 else if(resip::isEqualNoCase("recv", dataType))
665 {
667 }
668 else if(resip::isEqualNoCase("sendrecv", dataType))
669 {
671 }
672 else
673 {
675 }
676}
677
680{
681 resip::Data dataType(type);
682
683 if(resip::isEqualNoCase("mandatory", dataType))
684 {
686 }
687 else if(resip::isEqualNoCase("optional", dataType))
688 {
690 }
691 else if(resip::isEqualNoCase("none", dataType))
692 {
694 }
695 else if(resip::isEqualNoCase("failure", dataType))
696 {
698 }
699 else if(resip::isEqualNoCase("unknown", dataType))
700 {
702 }
703 else
704 {
706 }
707}
708
711{
712 strm << "MediaLine:" << std::endl
713 << "Type: " << sdpMediaLine.mMediaTypeString << std::endl
714 << "TransportProtocol: " << sdpMediaLine.mTransportProtocolTypeString << std::endl;
715
716 SdpMediaLine::CodecList::const_iterator itCodec = sdpMediaLine.mCodecs.begin();
717 for(;itCodec != sdpMediaLine.mCodecs.end(); itCodec++)
718 {
719 strm << *itCodec;
720 }
721
722 strm << "Title: '" << sdpMediaLine.mTitle << "'" << std::endl;
723
724 SdpMediaLine::ConnectionList::const_iterator itConnection = sdpMediaLine.mConnections.begin();
725 for(;itConnection != sdpMediaLine.mConnections.end(); itConnection++)
726 {
727 strm << "Connection: netType=" << Sdp::SdpNetTypeString[itConnection->getNetType()]
728 << ", addrType=" << Sdp::SdpAddressTypeString[itConnection->getAddressType()]
729 << ", addr=" << itConnection->getAddress()
730 << ", port=" << itConnection->getPort()
731 << ", ttl=" << itConnection->getMulticastIpV4Ttl() << std::endl;
732 }
733
734 SdpMediaLine::ConnectionList::const_iterator itRtcpConnection = sdpMediaLine.mRtcpConnections.begin();
735 for(;itRtcpConnection != sdpMediaLine.mRtcpConnections.end(); itRtcpConnection++)
736 {
737 strm << "RTCP Connection: netType=" << Sdp::SdpNetTypeString[itRtcpConnection->getNetType()]
738 << ", addrType=" << Sdp::SdpAddressTypeString[itRtcpConnection->getAddressType()]
739 << ", addr=" << itRtcpConnection->getAddress()
740 << ", port=" << itRtcpConnection->getPort()
741 << ", ttl=" << itRtcpConnection->getMulticastIpV4Ttl() << std::endl;
742 }
743
744 Sdp::BandwidthList::const_iterator itBandwidth = sdpMediaLine.mBandwidths.begin();
745 for(;itBandwidth != sdpMediaLine.mBandwidths.end(); itBandwidth++)
746 {
747 strm << "Bandwidth: type=" << Sdp::SdpBandwidthTypeString[itBandwidth->getType()]
748 << ", bandwidth=" << itBandwidth->getBandwidth() << std::endl;
749 }
750
751 strm << "Encryption Key: method=" << SdpMediaLine::SdpEncryptionMethodString[sdpMediaLine.mEncryptionMethod]
752 << ", data='" << sdpMediaLine.mEncryptionKey << "'" << std::endl
753 << "Direction: " << SdpMediaLine::SdpDirectionTypeString[sdpMediaLine.mDirection] << std::endl
754 << "PacketTime: " << sdpMediaLine.mPacketTime << std::endl
755 << "MaxPacketTime: " << sdpMediaLine.mMaxPacketTime << std::endl
756 << "Orientation: " << SdpMediaLine::SdpOrientationTypeString[sdpMediaLine.mOrientation] << std::endl
757 << "DescriptionLanguage: '" << sdpMediaLine.mDescriptionLanguage << "'" << std::endl
758 << "Language: '" << sdpMediaLine.mLanguage << "'" << std::endl
759 << "FrameRate: " << sdpMediaLine.mFrameRate << std::endl
760 << "Quality: " << sdpMediaLine.mQuality << std::endl
761 << "TcpSetupAttrib: " << SdpMediaLine::SdpTcpSetupAttributeString[sdpMediaLine.mTcpSetupAttribute] << std::endl
762 << "TcpConnectionAttrib: " << SdpMediaLine::SdpTcpConnectionAttributeString[sdpMediaLine.mTcpConnectionAttribute] << std::endl;
763
764 SdpMediaLine::CryptoList::const_iterator itCrypto = sdpMediaLine.mCryptos.begin();
765 for(;itCrypto != sdpMediaLine.mCryptos.end(); itCrypto++)
766 {
767 strm << "Crypto: tag=" << itCrypto->getTag()
768 << ", suite=" << SdpMediaLine::SdpCryptoSuiteTypeString[itCrypto->getSuite()];
769
770 SdpMediaLine::SdpCrypto::CryptoKeyParamList::const_iterator itKeyParam = itCrypto->getCryptoKeyParams().begin();
771 for(;itKeyParam!=itCrypto->getCryptoKeyParams().end(); itKeyParam++)
772 {
773 strm << std::endl << " Key Param: method=" << SdpMediaLine::SdpCryptoKeyMethodString[itKeyParam->getKeyMethod()]
774 << ", key=" << itKeyParam->getKeyValue()
775 << ", srtpLifetime=" << itKeyParam->getSrtpLifetime()
776 << ", srtpMkiValue=" << itKeyParam->getSrtpMkiValue()
777 << ", srtpMkiLength=" << itKeyParam->getSrtpMkiLength();
778 }
779
780 strm << std::endl << " kdr=" << itCrypto->getSrtpKdr()
781 << ", encryptSrtp=" << itCrypto->getEncryptedSrtp()
782 << ", encryptSrtcp=" << itCrypto->getEncryptedSrtcp()
783 << ", authSrtp=" << itCrypto->getAuthenticatedSrtp()
784 << ", fecOrder=" << SdpMediaLine::SdpCryptoSrtpFecOrderTypeString[itCrypto->getSrtpFecOrder()]
785 << ", wsh=" << itCrypto->getSrtpWsh();
786 if(itCrypto->getSrtpFecKey().getKeyMethod() != SdpMediaLine::CRYPTO_KEY_METHOD_NONE)
787 {
788 strm << std::endl << " fecKeyMethod=" << SdpMediaLine::SdpCryptoKeyMethodString[itCrypto->getSrtpFecKey().getKeyMethod()]
789 << ", fecKey=" << itCrypto->getSrtpFecKey().getKeyValue()
790 << ", fecLifetime=" << itCrypto->getSrtpFecKey().getSrtpLifetime()
791 << ", fecMkiValue=" << itCrypto->getSrtpFecKey().getSrtpMkiValue()
792 << ", fecMkiLength=" << itCrypto->getSrtpFecKey().getSrtpMkiLength();
793 }
794
795 SdpMediaLine::SdpCrypto::GenericSessionParamList::const_iterator itSessParam = itCrypto->getGenericSessionParams().begin();
796 for(;itSessParam!=itCrypto->getGenericSessionParams().end(); itSessParam++)
797 {
798 strm << std::endl << " sessParam=" << *itSessParam;
799 }
800 strm << std::endl;
801 }
802
803 strm << "FingerPrint: type=" << SdpMediaLine::SdpFingerPrintHashFuncTypeString[sdpMediaLine.mFingerPrintHashFunction]
804 << ", '" << sdpMediaLine.mFingerPrint << "'" << std::endl
805 << "KeyManagement: type=" << SdpMediaLine::SdpKeyManagementProtocolTypeString[sdpMediaLine.mKeyManagementProtocol]
806 << ", '" << sdpMediaLine.mKeyManagementData << "'" << std::endl;
807
808 SdpMediaLine::SdpPreConditionList::const_iterator itCurrentStatus = sdpMediaLine.mPreConditionCurrentStatus.begin();
809 for(;itCurrentStatus != sdpMediaLine.mPreConditionCurrentStatus.end(); itCurrentStatus++)
810 {
811 strm << "PreConditionCurrentStatus: type=" << SdpMediaLine::SdpPreConditionTypeString[itCurrentStatus->getType()]
813 << ", direction=" << SdpMediaLine::SdpPreConditionDirectionTypeString[itCurrentStatus->getDirection()] << std::endl;
814 }
815
816 SdpMediaLine::SdpPreConditionList::const_iterator itConfirmStatus = sdpMediaLine.mPreConditionConfirmStatus.begin();
817 for(;itConfirmStatus != sdpMediaLine.mPreConditionConfirmStatus.end(); itConfirmStatus++)
818 {
819 strm << "PreConditionConfirmStatus: type=" << SdpMediaLine::SdpPreConditionTypeString[itConfirmStatus->getType()]
821 << ", direction=" << SdpMediaLine::SdpPreConditionDirectionTypeString[itConfirmStatus->getDirection()] << std::endl;
822 }
823
824 SdpMediaLine::SdpPreConditionDesiredStatusList::const_iterator itDesiredStatus = sdpMediaLine.mPreConditionDesiredStatus.begin();
825 for(;itDesiredStatus != sdpMediaLine.mPreConditionDesiredStatus.end(); itDesiredStatus++)
826 {
827 strm << "PreConditionDesiredStatus: type=" << SdpMediaLine::SdpPreConditionTypeString[itDesiredStatus->getType()]
828 << ", strength=" << SdpMediaLine::SdpPreConditionStrengthTypeString[itDesiredStatus->getStrength()]
830 << ", direction=" << SdpMediaLine::SdpPreConditionDirectionTypeString[itDesiredStatus->getDirection()] << std::endl;
831 }
832
833 strm << "MaximumPacketRate: " << sdpMediaLine.mMaximumPacketRate << std::endl
834 << "Label: '" << sdpMediaLine.mLabel << "'" << std::endl
835 << "IdentificationTag: '" << sdpMediaLine.mIdentificationTag << "'" << std::endl
836 << "IceUserFrag: '" << sdpMediaLine.mIceUserFrag << "'" << std::endl
837 << "IcePassword: '" << sdpMediaLine.mIcePassword << "'" << std::endl;
838
839 SdpMediaLine::SdpRemoteCandidateList::const_iterator itRemoteCandidate = sdpMediaLine.mRemoteCandidates.begin();
840 for(;itRemoteCandidate != sdpMediaLine.mRemoteCandidates.end(); itRemoteCandidate++)
841 {
842 strm << "Remote Candidate: componentId=" << itRemoteCandidate->getComponentId()
843 << ", addr=" << itRemoteCandidate->getConnectionAddress()
844 << ", port=" << itRemoteCandidate->getPort() << std::endl;
845 }
846
847 strm << "IceSupported: " << sdpMediaLine.isIceSupported() << std::endl;
848
849 SdpMediaLine::SdpCandidateList::const_iterator itCandidate = sdpMediaLine.mCandidates.begin();
850 for(;itCandidate != sdpMediaLine.mCandidates.end(); itCandidate++)
851 {
852 strm << *itCandidate;
853 }
854
855 SdpMediaLine::SdpCandidatePairList::const_iterator itCandidatePair = sdpMediaLine.mCandidatePairs.begin();
856 for(;itCandidatePair != sdpMediaLine.mCandidatePairs.end(); itCandidatePair++)
857 {
859 }
860
861 SdpMediaLine::SdpMediaLineList::const_iterator itPotentialMediaLine = sdpMediaLine.mPotentialMediaViews.begin();
862 for(;itPotentialMediaLine!=sdpMediaLine.mPotentialMediaViews.end();itPotentialMediaLine++)
863 {
864 strm << std::endl << "PotentialMediaView:" << std::endl << *itPotentialMediaLine;
865 }
866
867 strm << "PotentialMediaViewString: '" << sdpMediaLine.mPotentialMediaViewString << "'" << std::endl;
868
869 return strm;
870}
871
872
873/* ====================================================================
874
875 Copyright (c) 2026, SIP Spectrum, Inc. https://www.sipspectrum.com
876 Copyright (c) 2007-2008, Plantronics, Inc.
877 All rights reserved.
878
879 Redistribution and use in source and binary forms, with or without
880 modification, are permitted provided that the following conditions are
881 met:
882
883 1. Redistributions of source code must retain the above copyright
884 notice, this list of conditions and the following disclaimer.
885
886 2. Redistributions in binary form must reproduce the above copyright
887 notice, this list of conditions and the following disclaimer in the
888 documentation and/or other materials provided with the distribution.
889
890 3. Neither the name of Plantronics nor the names of its contributors
891 may be used to endorse or promote products derived from this
892 software without specific prior written permission.
893
894 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
895 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
896 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
897 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
898 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
899 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
900 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
901 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
902 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
903 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
904 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
905
906 ==================================================================== */
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
static SdpCryptoSrtpFecOrderType getSrtpFecOrderFromString(const char *order)
SdpCrypto & operator=(const SdpCrypto &rhs)
static const char * SdpPreConditionStrengthTypeString[]
static SdpCryptoSuiteType getCryptoSuiteTypeFromString(const char *type)
static SdpTcpSetupAttribute getTcpSetupAttributeFromString(const char *attrib)
static const char * SdpTcpSetupAttributeString[]
static const char * SdpPreConditionStatusTypeString[]
static SdpPreConditionStatusType getPreConditionStatusTypeFromString(const char *type)
SdpTransportProtocolType
Transport protocol identifiers for the SDP "m=" line (proto field).
static const char * SdpPreConditionTypeString[]
static const char * SdpOrientationTypeString[]
static SdpKeyManagementProtocolType getKeyManagementProtocolTypeFromString(const char *type)
const bool isRtcpEnabled() const
static SdpCryptoKeyMethod getCryptoKeyMethodFromString(const char *type)
static SdpTransportProtocolType getTransportProtocolTypeFromString(const char *type)
static const char * SdpFingerPrintHashFuncTypeString[]
static const char * SdpCryptoSuiteTypeString[]
static const char * SdpEncryptionMethodString[]
SdpMediaLine & operator=(const SdpMediaLine &rhs)
static SdpPreConditionType getPreConditionTypeFromString(const char *type)
static const char * SdpDirectionTypeString[]
static const char * SdpCryptoSrtpFecOrderTypeString[]
static SdpOrientationType getOrientationTypeFromString(const char *type)
static SdpFingerPrintHashFuncType getFingerPrintHashFuncTypeFromString(const char *type)
static SdpPreConditionDirectionType getPreConditionDirectionTypeFromString(const char *type)
static SdpTcpConnectionAttribute getTcpConnectionAttributeFromString(const char *attrib)
static const char * SdpTcpConnectionAttributeString[]
static const char * SdpCryptoKeyMethodString[]
void addCandidate(SdpCandidate &candidate)
static const char * SdpMediaTypeString[]
static SdpPreConditionStrengthType getPreConditionStrengthTypeFromString(const char *type)
static const char * SdpTransportProtocolTypeString[]
static const char * SdpPreConditionDirectionTypeString[]
static const char * SdpKeyManagementProtocolTypeString[]
static SdpMediaType getMediaTypeFromString(const char *type)
static const char * SdpBandwidthTypeString[]
Definition Sdp.hxx:49
static const char * SdpAddressTypeString[]
Definition Sdp.hxx:38
static const char * SdpNetTypeString[]
Definition Sdp.hxx:30
bool isEqualNoCase(const Data &left, const Data &right)
Definition Data.hxx:1116
EncodeStream & operator<<(EncodeStream &strm, const Sdp &)
Definition Sdp.cxx:304
#define EncodeStream
unsigned __int64 uint64_t
Definition stdint.h:95
void list()
Definition userAdmin.cxx:66