- Timestamp:
- Sep 23, 2019 10:47:05 PM (5 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua2/account.hpp
r6051 r6074 1799 1799 void presNotify(const PresNotifyParam &prm) PJSUA2_THROW(Error); 1800 1800 1801 #if !DEPRECATED_FOR_TICKET_2232 1801 1802 /** 1802 1803 * Warning: deprecated, use enumBuddies2() instead. This function is not … … 1808 1809 */ 1809 1810 const BuddyVector& enumBuddies() const PJSUA2_THROW(Error); 1811 #endif 1810 1812 1811 1813 /** … … 1816 1818 BuddyVector2 enumBuddies2() const PJSUA2_THROW(Error); 1817 1819 1820 #if !DEPRECATED_FOR_TICKET_2232 1818 1821 /** 1819 1822 * Warning: deprecated, use findBuddy2 instead. This function is not … … 1831 1834 Buddy* findBuddy(string uri, FindBuddyMatch *buddy_match = NULL) const 1832 1835 PJSUA2_THROW(Error); 1836 #endif 1833 1837 1834 1838 /** … … 1969 1973 pjsua_acc_id id; 1970 1974 string tmpReason; // for saving response's reason 1975 #if !DEPRECATED_FOR_TICKET_2232 1971 1976 BuddyVector buddyList; 1977 #endif 1972 1978 }; 1973 1979 -
pjproject/trunk/pjsip/include/pjsua2/config.hpp
r6026 r6074 48 48 #endif 49 49 50 /** 51 * Ticket #2189 described some lists of objects which is not thread safe. 52 * The ticket deprecated some APIs which uses those lists and introduce new one 53 * to replace them. This settings will disable the deprecated API all together. 54 * See also https://trac.pjsip.org/repos/ticket/2232 55 */ 56 #ifndef DEPRECATED_FOR_TICKET_2232 57 # define DEPRECATED_FOR_TICKET_2232 1 58 #endif 50 59 51 60 /* -
pjproject/trunk/pjsip/include/pjsua2/endpoint.hpp
r6051 r6074 1389 1389 unsigned mediaActivePorts() const; 1390 1390 1391 #if !DEPRECATED_FOR_TICKET_2232 1391 1392 /** 1392 1393 * Warning: deprecated, use mediaEnumPorts2() instead. This function is … … 1398 1399 */ 1399 1400 const AudioMediaVector &mediaEnumPorts() const PJSUA2_THROW(Error); 1401 #endif 1400 1402 1401 1403 /** … … 1431 1433 */ 1432 1434 1435 #if !DEPRECATED_FOR_TICKET_2232 1433 1436 /** 1434 1437 * Warning: deprecated, use codecEnum2() instead. This function is not … … 1440 1443 */ 1441 1444 const CodecInfoVector &codecEnum() PJSUA2_THROW(Error); 1445 #endif 1442 1446 1443 1447 /** … … 1482 1486 const CodecParam param) PJSUA2_THROW(Error); 1483 1487 1488 #if !DEPRECATED_FOR_TICKET_2232 1484 1489 /** 1485 1490 * Warning: deprecated, use videoCodecEnum2() instead. This function is … … 1491 1496 */ 1492 1497 const CodecInfoVector &videoCodecEnum() PJSUA2_THROW(Error); 1498 #endif 1493 1499 1494 1500 /** … … 1662 1668 static Endpoint *instance_; // static instance 1663 1669 LogWriter *writer; // Custom writer, if any 1664 AudioMediaVector mediaList;1665 1670 AudDevManager audioDevMgr; 1666 1671 VidDevManager videoDevMgr; 1672 #if !DEPRECATED_FOR_TICKET_2232 1667 1673 CodecInfoVector codecInfoList; 1668 1674 CodecInfoVector videoCodecInfoList; 1675 #endif 1669 1676 std::map<pj_thread_t*, pj_thread_desc*> threadDescMap; 1670 1677 pj_mutex_t *threadDescMutex; 1678 #if !DEPRECATED_FOR_TICKET_2232 1679 AudioMediaVector mediaList; 1671 1680 pj_mutex_t *mediaListMutex; 1681 #endif 1672 1682 1673 1683 /* Pending logging */ -
pjproject/trunk/pjsip/include/pjsua2/media.hpp
r6051 r6074 911 911 void setPlaybackDev(int playback_dev) const PJSUA2_THROW(Error); 912 912 913 #if !DEPRECATED_FOR_TICKET_2232 913 914 /** 914 915 * Warning: deprecated, use enumDev2 instead. This function is not … … 921 922 */ 922 923 const AudioDevInfoVector &enumDev() PJSUA2_THROW(Error); 924 #endif 923 925 924 926 /** … … 1466 1468 1467 1469 private: 1470 #if !DEPRECATED_FOR_TICKET_2232 1468 1471 AudioDevInfoVector audioDevList; 1472 #endif 1469 1473 AudioMedia *devMedia; 1470 1474 … … 2069 2073 VideoDevInfo getDevInfo(int dev_id) const PJSUA2_THROW(Error); 2070 2074 2075 #if !DEPRECATED_FOR_TICKET_2232 2071 2076 /** 2072 2077 * Warning: deprecated, use enumDev2() instead. This function is not … … 2078 2083 */ 2079 2084 const VideoDevInfoVector &enumDev() PJSUA2_THROW(Error); 2085 #endif 2080 2086 2081 2087 /** … … 2276 2282 2277 2283 private: 2284 #if !DEPRECATED_FOR_TICKET_2232 2278 2285 VideoDevInfoVector videoDevList; 2286 #endif 2279 2287 2280 2288 void clearVideoDevList(); -
pjproject/trunk/pjsip/src/pjsua2/account.cpp
r6068 r6074 968 968 { 969 969 if (isValid() && pjsua_get_state() < PJSUA_STATE_CLOSING) { 970 #if !DEPRECATED_FOR_TICKET_2232 970 971 // Cleanup buddies in the buddy list 971 972 while(buddyList.size() > 0) { … … 973 974 delete b; /* this will remove itself from the list */ 974 975 } 976 #endif 975 977 976 978 // This caused error message of "Error: cannot find Account.." … … 1065 1067 } 1066 1068 1069 #if !DEPRECATED_FOR_TICKET_2232 1067 1070 const BuddyVector& Account::enumBuddies() const PJSUA2_THROW(Error) 1068 1071 { 1069 1072 return buddyList; 1070 1073 } 1074 #endif 1071 1075 1072 1076 BuddyVector2 Account::enumBuddies2() const PJSUA2_THROW(Error) … … 1084 1088 } 1085 1089 1090 #if !DEPRECATED_FOR_TICKET_2232 1086 1091 Buddy* Account::findBuddy(string uri, FindBuddyMatch *buddy_match) const 1087 1092 PJSUA2_THROW(Error) … … 1098 1103 PJSUA2_RAISE_ERROR(PJ_ENOTFOUND); 1099 1104 } 1105 #endif 1100 1106 1101 1107 Buddy Account::findBuddy2(string uri) const PJSUA2_THROW(Error) … … 1117 1123 void Account::addBuddy(Buddy *buddy) 1118 1124 { 1125 #if !DEPRECATED_FOR_TICKET_2232 1119 1126 pj_assert(buddy); 1120 1127 1121 1128 buddyList.push_back(buddy); 1129 #else 1130 PJ_UNUSED_ARG(buddy); 1131 #endif 1122 1132 } 1123 1133 1124 1134 void Account::removeBuddy(Buddy *buddy) 1125 1135 { 1136 #if !DEPRECATED_FOR_TICKET_2232 1126 1137 pj_assert(buddy); 1127 1138 … … 1135 1146 1136 1147 pj_assert(!"Bug! Buddy to be removed is not in the buddy list!"); 1137 } 1148 #else 1149 PJ_UNUSED_ARG(buddy); 1150 #endif 1151 } -
pjproject/trunk/pjsip/src/pjsua2/endpoint.cpp
r6051 r6074 479 479 * Endpoint instance 480 480 */ 481 Endpoint::Endpoint() 482 : writer(NULL), threadDescMutex(NULL), mediaListMutex(NULL), 483 mainThreadOnly(false), mainThread(NULL), pendingJobSize(0) 481 Endpoint::Endpoint(): 482 #if !DEPRECATED_FOR_TICKET_2232 483 mediaListMutex(NULL), 484 #endif 485 writer(NULL), threadDescMutex(NULL), mainThreadOnly(false), 486 mainThread(NULL), pendingJobSize(0) 484 487 { 485 488 if (instance_) { … … 505 508 } 506 509 510 #if !DEPRECATED_FOR_TICKET_2232 507 511 clearCodecInfoList(codecInfoList); 508 512 clearCodecInfoList(videoCodecInfoList); 513 #endif 509 514 510 515 try { … … 1714 1719 &threadDescMutex) ); 1715 1720 1721 #if !DEPRECATED_FOR_TICKET_2232 1716 1722 PJSUA2_CHECK_EXPR( pj_mutex_create_recursive(pjsua_var.pool, "mediaList", 1717 1723 &mediaListMutex) ); 1724 #endif 1718 1725 } 1719 1726 … … 1783 1790 } 1784 1791 1792 #if !DEPRECATED_FOR_TICKET_2232 1785 1793 while(mediaList.size() > 0) { 1786 1794 AudioMedia *cur_media = mediaList[0]; … … 1792 1800 mediaListMutex = NULL; 1793 1801 } 1802 #endif 1794 1803 1795 1804 status = pjsua_destroy2(flags); … … 2047 2056 } 2048 2057 2058 #if !DEPRECATED_FOR_TICKET_2232 2049 2059 const AudioMediaVector &Endpoint::mediaEnumPorts() const PJSUA2_THROW(Error) 2050 2060 { 2051 2061 return mediaList; 2052 2062 } 2063 #endif 2053 2064 2054 2065 AudioMediaVector2 Endpoint::mediaEnumPorts2() const PJSUA2_THROW(Error) … … 2090 2101 void Endpoint::mediaAdd(AudioMedia &media) 2091 2102 { 2103 #if !DEPRECATED_FOR_TICKET_2232 2092 2104 /* mediaList serves mediaEnumPorts() only, once mediaEnumPorts() 2093 2105 * is removed, this function implementation should be no-op. … … 2102 2114 mediaList.push_back(&media); 2103 2115 pj_mutex_unlock(mediaListMutex); 2116 #else 2117 PJ_UNUSED_ARG(media); 2118 #endif 2104 2119 } 2105 2120 2106 2121 void Endpoint::mediaRemove(AudioMedia &media) 2107 2122 { 2123 #if !DEPRECATED_FOR_TICKET_2232 2108 2124 /* mediaList serves mediaEnumPorts() only, once mediaEnumPorts() 2109 2125 * is removed, this function implementation should be no-op. … … 2117 2133 mediaList.erase(it); 2118 2134 pj_mutex_unlock(mediaListMutex); 2135 #else 2136 PJ_UNUSED_ARG(media); 2137 #endif 2119 2138 } 2120 2139 … … 2142 2161 * Codec operations. 2143 2162 */ 2163 2164 #if !DEPRECATED_FOR_TICKET_2232 2144 2165 const CodecInfoVector &Endpoint::codecEnum() PJSUA2_THROW(Error) 2145 2166 { … … 2152 2173 return codecInfoList; 2153 2174 } 2175 #endif 2154 2176 2155 2177 CodecInfoVector2 Endpoint::codecEnum2() const PJSUA2_THROW(Error) … … 2220 2242 } 2221 2243 2244 #if !DEPRECATED_FOR_TICKET_2232 2222 2245 const CodecInfoVector &Endpoint::videoCodecEnum() PJSUA2_THROW(Error) 2223 2246 { … … 2232 2255 return videoCodecInfoList; 2233 2256 } 2257 #endif 2234 2258 2235 2259 CodecInfoVector2 Endpoint::videoCodecEnum2() const PJSUA2_THROW(Error) -
pjproject/trunk/pjsip/src/pjsua2/media.cpp
r6026 r6074 749 749 } 750 750 751 #if !DEPRECATED_FOR_TICKET_2232 751 752 const AudioDevInfoVector &AudDevManager::enumDev() PJSUA2_THROW(Error) 752 753 { … … 766 767 return audioDevList; 767 768 } 769 #endif 768 770 769 771 AudioDevInfoVector2 AudDevManager::enumDev2() const PJSUA2_THROW(Error) … … 1084 1086 void AudDevManager::clearAudioDevList() 1085 1087 { 1088 #if !DEPRECATED_FOR_TICKET_2232 1086 1089 for(unsigned i=0;i<audioDevList.size();++i) { 1087 1090 delete audioDevList[i]; 1088 1091 } 1089 1092 audioDevList.clear(); 1093 #endif 1090 1094 } 1091 1095 … … 1481 1485 } 1482 1486 1487 #if !DEPRECATED_FOR_TICKET_2232 1483 1488 const VideoDevInfoVector &VidDevManager::enumDev() PJSUA2_THROW(Error) 1484 1489 { … … 1500 1505 return videoDevList; 1501 1506 } 1507 #endif 1502 1508 1503 1509 VideoDevInfoVector2 VidDevManager::enumDev2() const PJSUA2_THROW(Error) … … 1666 1672 void VidDevManager::clearVideoDevList() 1667 1673 { 1668 #if PJSUA_HAS_VIDEO 1674 #if PJSUA_HAS_VIDEO && !DEPRECATED_FOR_TICKET_2232 1669 1675 for (unsigned i = 0;i<videoDevList.size();++i) { 1670 1676 delete videoDevList[i];
Note: See TracChangeset
for help on using the changeset viewer.