Browse Source

Merge branch 'v0.11'

Paul-Louis Ageneau 4 years ago
parent
commit
f76243fb38

+ 1 - 1
CMakeLists.txt

@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 3.7)
 project(libdatachannel
-	VERSION 0.11.8
+	VERSION 0.11.9
 	LANGUAGES CXX)
 set(PROJECT_DESCRIPTION "WebRTC Data Channels Library")
 

+ 1 - 12
src/impl/peerconnection.cpp

@@ -40,17 +40,6 @@
 
 using namespace std::placeholders;
 
-#if __clang__ && defined(__APPLE__)
-namespace {
-template <typename To, typename From>
-inline std::shared_ptr<To> reinterpret_pointer_cast(std::shared_ptr<From> const &ptr) noexcept {
-	return std::shared_ptr<To>(ptr, reinterpret_cast<To *>(ptr.get()));
-}
-} // namespace
-#else
-using std::reinterpret_pointer_cast;
-#endif
-
 namespace rtc::impl {
 
 static LogCounter COUNTER_MEDIA_TRUNCATED(plog::warning,
@@ -673,7 +662,7 @@ void PeerConnection::incomingTrack(Description::Media description) {
 void PeerConnection::openTracks() {
 #if RTC_ENABLE_MEDIA
 	if (auto transport = std::atomic_load(&mDtlsTransport)) {
-		auto srtpTransport = reinterpret_pointer_cast<DtlsSrtpTransport>(transport);
+		auto srtpTransport = std::dynamic_pointer_cast<DtlsSrtpTransport>(transport);
 		std::shared_lock lock(mTracksMutex); // read-only
 		for (auto it = mTracks.begin(); it != mTracks.end(); ++it)
 			if (auto track = it->second.lock())

+ 0 - 4
test/capi_connectivity.cpp

@@ -333,10 +333,6 @@ int test_capi_connectivity_main() {
 	deletePeer(peer2);
 	sleep(1);
 
-	// You may call rtcCleanup() when finished to free static resources
-	rtcCleanup();
-	sleep(1);
-
 	printf("Success\n");
 	return 0;
 

+ 0 - 4
test/capi_track.cpp

@@ -177,10 +177,6 @@ int test_capi_track_main() {
 	deletePeer(peer2);
 	sleep(1);
 
-	// You may call rtcCleanup() when finished to free static resources
-	rtcCleanup();
-	sleep(1);
-
 	printf("Success\n");
 	return 0;
 

+ 0 - 4
test/connectivity.cpp

@@ -239,9 +239,5 @@ void test_connectivity() {
 	pc2.close();
 	this_thread::sleep_for(1s);
 
-	// You may call rtc::Cleanup() when finished to free static resources
-	rtc::Cleanup();
-	this_thread::sleep_for(1s);
-
 	cout << "Success" << endl;
 }

+ 0 - 4
test/track.cpp

@@ -131,9 +131,5 @@ void test_track() {
 	pc2.close();
 	this_thread::sleep_for(1s);
 
-	// You may call rtc::Cleanup() when finished to free static resources
-	rtc::Cleanup();
-	this_thread::sleep_for(1s);
-
 	cout << "Success" << endl;
 }

+ 0 - 4
test/turn_connectivity.cpp

@@ -246,9 +246,5 @@ void test_turn_connectivity() {
 	pc2.close();
 	this_thread::sleep_for(1s);
 
-	// You may call rtc::Cleanup() when finished to free static resources
-	rtc::Cleanup();
-	this_thread::sleep_for(1s);
-
 	cout << "Success" << endl;
 }

+ 0 - 4
test/websocket.cpp

@@ -74,10 +74,6 @@ void test_websocket() {
 	ws.close();
 	this_thread::sleep_for(1s);
 
-	// You may call rtc::Cleanup() when finished to free static resources
-	rtc::Cleanup();
-	this_thread::sleep_for(1s);
-
 	cout << "Success" << endl;
 }