diff --git a/src/modules/video_capture/main/interface/video_capture.h b/src/modules/video_capture/main/interface/video_capture.h index dfe143818..36fd0274d 100644 --- a/src/modules/video_capture/main/interface/video_capture.h +++ b/src/modules/video_capture/main/interface/video_capture.h @@ -72,7 +72,6 @@ class VideoCaptureModule: public RefCountedModule { WebRtc_UWord32 positionX, WebRtc_UWord32 positionY) = 0; - protected: virtual ~DeviceInfo() {} }; diff --git a/src/modules/video_capture/main/interface/video_capture_factory.h b/src/modules/video_capture/main/interface/video_capture_factory.h index 06c2fab5d..10a6afe40 100644 --- a/src/modules/video_capture/main/interface/video_capture_factory.h +++ b/src/modules/video_capture/main/interface/video_capture_factory.h @@ -35,7 +35,6 @@ class VideoCaptureFactory { static VideoCaptureModule::DeviceInfo* CreateDeviceInfo( const WebRtc_Word32 id); - static void DestroyDeviceInfo(VideoCaptureModule::DeviceInfo* deviceInfo); private: ~VideoCaptureFactory(); diff --git a/src/modules/video_capture/main/source/Android/device_info_android.cc b/src/modules/video_capture/main/source/Android/device_info_android.cc index 6c33c29e4..df4e3e263 100644 --- a/src/modules/video_capture/main/source/Android/device_info_android.cc +++ b/src/modules/video_capture/main/source/Android/device_info_android.cc @@ -35,17 +35,6 @@ VideoCaptureModule::DeviceInfo* VideoCaptureImpl::CreateDeviceInfo ( return deviceInfo; } -void VideoCaptureImpl::DestroyDeviceInfo( - VideoCaptureModule::DeviceInfo* deviceInfo) -{ - WEBRTC_TRACE(webrtc::kTraceModuleCall, webrtc::kTraceVideoCapture, -1, - "%s", __FUNCTION__); - - videocapturemodule::DeviceInfoAndroid* devInfo = - static_cast (deviceInfo); - delete devInfo; -} - DeviceInfoAndroid::DeviceInfoAndroid(const WebRtc_Word32 id) : DeviceInfoImpl(id) { diff --git a/src/modules/video_capture/main/source/Linux/device_info_linux.cc b/src/modules/video_capture/main/source/Linux/device_info_linux.cc index 013b8f905..2d14c54a5 100644 --- a/src/modules/video_capture/main/source/Linux/device_info_linux.cc +++ b/src/modules/video_capture/main/source/Linux/device_info_linux.cc @@ -43,14 +43,6 @@ VideoCaptureImpl::CreateDeviceInfo(const WebRtc_Word32 id) return deviceInfo; } -void VideoCaptureImpl::DestroyDeviceInfo(DeviceInfo* deviceInfo) -{ - videocapturemodule::DeviceInfoLinux* devInfo = - static_cast (deviceInfo); - delete devInfo; -} - - DeviceInfoLinux::DeviceInfoLinux(const WebRtc_Word32 id) : DeviceInfoImpl(id) { diff --git a/src/modules/video_capture/main/source/Windows/device_info_windows.cc b/src/modules/video_capture/main/source/Windows/device_info_windows.cc index 3fb10d4ec..cf87b0eaa 100644 --- a/src/modules/video_capture/main/source/Windows/device_info_windows.cc +++ b/src/modules/video_capture/main/source/Windows/device_info_windows.cc @@ -31,19 +31,12 @@ VideoCaptureModule::DeviceInfo* VideoCaptureImpl::CreateDeviceInfo( if (!dsInfo || dsInfo->Init() != 0) { - DestroyDeviceInfo(dsInfo); + delete dsInfo; dsInfo = NULL; } return dsInfo; } -void VideoCaptureImpl::DestroyDeviceInfo(DeviceInfo* deviceInfo) -{ - videocapturemodule::DeviceInfoWindows* impl = - static_cast (deviceInfo); - delete impl; -} - DeviceInfoWindows::DeviceInfoWindows(const WebRtc_Word32 id) : DeviceInfoImpl(id), _dsDevEnum(NULL), _dsMonikerDevEnum(NULL), _CoUninitializeIsRequired(true) diff --git a/src/modules/video_capture/main/source/video_capture_factory.cc b/src/modules/video_capture/main/source/video_capture_factory.cc index d4d0a0fb8..29c3fe2bf 100644 --- a/src/modules/video_capture/main/source/video_capture_factory.cc +++ b/src/modules/video_capture/main/source/video_capture_factory.cc @@ -29,9 +29,4 @@ VideoCaptureModule::DeviceInfo* VideoCaptureFactory::CreateDeviceInfo( return videocapturemodule::VideoCaptureImpl::CreateDeviceInfo(id); } -void VideoCaptureFactory::DestroyDeviceInfo( - VideoCaptureModule::DeviceInfo* deviceInfo) { - videocapturemodule::VideoCaptureImpl::DestroyDeviceInfo(deviceInfo); -} - } // namespace webrtc diff --git a/src/modules/video_capture/main/source/video_capture_impl.h b/src/modules/video_capture/main/source/video_capture_impl.h index b11e1de39..21251d489 100644 --- a/src/modules/video_capture/main/source/video_capture_impl.h +++ b/src/modules/video_capture/main/source/video_capture_impl.h @@ -49,7 +49,6 @@ public: VideoCaptureExternal*& externalCapture); static DeviceInfo* CreateDeviceInfo(const WebRtc_Word32 id); - static void DestroyDeviceInfo(DeviceInfo* deviceInfo); #ifdef WEBRTC_ANDROID static WebRtc_Word32 SetAndroidObjects(void* javaVM, void* javaContext); diff --git a/src/modules/video_capture/main/test/android/jni/video_capture_module_android_test_jni.cc b/src/modules/video_capture/main/test/android/jni/video_capture_module_android_test_jni.cc index 93bd776fa..ac2f6e158 100644 --- a/src/modules/video_capture/main/test/android/jni/video_capture_module_android_test_jni.cc +++ b/src/modules/video_capture/main/test/android/jni/video_capture_module_android_test_jni.cc @@ -140,7 +140,7 @@ Java_org_webrtc_capturemoduleandroidtest_VideoCaptureModuleTest_StopCapture( { if (jniData._videoCapture) { jniData._videoCapture->StopCapture(); - VideoCaptureModule::DestroyDeviceInfo(jniData._captureInfo); + delete jniData._captureInfo; VideoCaptureModule::Destroy(jniData._videoCapture); jniData._videoCapture = NULL; jniData._captureInfo = NULL; diff --git a/src/modules/video_capture/main/test/testAPI/testCameraEncoder.cpp b/src/modules/video_capture/main/test/testAPI/testCameraEncoder.cpp index d3f0db0aa..998d26594 100644 --- a/src/modules/video_capture/main/test/testAPI/testCameraEncoder.cpp +++ b/src/modules/video_capture/main/test/testAPI/testCameraEncoder.cpp @@ -42,7 +42,7 @@ testCameraEncoder::testCameraEncoder(void) testCameraEncoder::~testCameraEncoder(void) { - VideoCaptureModule::DestroyDeviceInfo(_captureInfo); + delete _captureInfo; #ifdef RENDER_PREVIEW if(_renderer) diff --git a/src/modules/video_capture/main/test/testAPI/testPlatformDependent.cpp b/src/modules/video_capture/main/test/testAPI/testPlatformDependent.cpp index 82e928d17..dd5cf09f7 100644 --- a/src/modules/video_capture/main/test/testAPI/testPlatformDependent.cpp +++ b/src/modules/video_capture/main/test/testAPI/testPlatformDependent.cpp @@ -49,7 +49,7 @@ testPlatformDependent::testPlatformDependent(void) : testPlatformDependent::~testPlatformDependent(void) { - VideoCaptureModule::DestroyDeviceInfo(_captureInfo); + delete _captureInfo; #ifdef RENDER_PREVIEW if (_renderer[0]) diff --git a/src/video_engine/main/source/vie_input_manager.cc b/src/video_engine/main/source/vie_input_manager.cc index f420ad65d..ebe239bd5 100644 --- a/src/video_engine/main/source/vie_input_manager.cc +++ b/src/video_engine/main/source/vie_input_manager.cc @@ -90,8 +90,7 @@ ViEInputManager::~ViEInputManager() #ifndef WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER if (_ptrCaptureDeviceInfo) { - VideoCaptureFactory::DestroyDeviceInfo( - _ptrCaptureDeviceInfo); + delete _ptrCaptureDeviceInfo; _ptrCaptureDeviceInfo = NULL; } #endif diff --git a/src/video_engine/main/test/AutoTest/source/tb_capture_device.cc b/src/video_engine/main/test/AutoTest/source/tb_capture_device.cc index 0cbbbfb76..3fe8bcdce 100644 --- a/src/video_engine/main/test/AutoTest/source/tb_capture_device.cc +++ b/src/video_engine/main/test/AutoTest/source/tb_capture_device.cc @@ -56,7 +56,7 @@ tbCaptureDevice::tbCaptureDevice(tbInterfaces& Engine, int& nrOfErrors) : break; } } - webrtc::VideoCaptureFactory::DestroyDeviceInfo(devInfo); + delete devInfo; numberOfErrors += ViETest::TestError( captureDeviceSet, "ERROR: %s at line %d - Could not set capture device", __FUNCTION__, __LINE__); diff --git a/src/video_engine/main/test/AutoTest/source/vie_autotest_base.cc b/src/video_engine/main/test/AutoTest/source/vie_autotest_base.cc index b3d83b803..d7649d46d 100644 --- a/src/video_engine/main/test/AutoTest/source/vie_autotest_base.cc +++ b/src/video_engine/main/test/AutoTest/source/vie_autotest_base.cc @@ -116,7 +116,7 @@ int ViEAutoTest::ViEBaseStandardTest() vcpm = NULL; } } - webrtc::VideoCaptureFactory::DestroyDeviceInfo(devInfo); + delete devInfo; numberOfErrors+= ViETest::TestError( captureDeviceSet, diff --git a/src/video_engine/main/test/AutoTest/source/vie_autotest_capture.cc b/src/video_engine/main/test/AutoTest/source/vie_autotest_capture.cc index a80d2f026..c6418569b 100644 --- a/src/video_engine/main/test/AutoTest/source/vie_autotest_capture.cc +++ b/src/video_engine/main/test/AutoTest/source/vie_autotest_capture.cc @@ -338,7 +338,7 @@ int ViEAutoTest::ViECaptureStandardTest() ViETest::Log(" "); return numberOfErrors; } - webrtc::VideoCaptureFactory::DestroyDeviceInfo(devInfo); + delete devInfo; ViETest::Log(" "); ViETest::Log(" ViECapture Standard Test PASSED!"); @@ -558,7 +558,7 @@ int ViEAutoTest::ViECaptureAPITest() numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); - webrtc::VideoCaptureFactory::DestroyDeviceInfo(devInfo); + delete devInfo; vcpm->Release(); //*************************************************************** diff --git a/third_party_mods/libjingle/source/talk/examples/peerconnection_client/conductor.cc b/third_party_mods/libjingle/source/talk/examples/peerconnection_client/conductor.cc index 6bf989779..22c99ab79 100644 --- a/third_party_mods/libjingle/source/talk/examples/peerconnection_client/conductor.cc +++ b/third_party_mods/libjingle/source/talk/examples/peerconnection_client/conductor.cc @@ -241,7 +241,7 @@ scoped_refptr Conductor::OpenVideoCaptureDevice() { if (video_device.get()) break; } - webrtc::VideoCaptureFactory::DestroyDeviceInfo(device_info); + delete device_info; return video_device; }