Enable the "unused variable" warning on Windows.
- Break out direct_show_base_classes to its own gyp file to have it treated as third party code. - Fix the resulting warnings (courtesy of Tommi). BUG= TEST=build on Windows (vie_auto_test currently failing at HEAD) Review URL: https://webrtc-codereview.appspot.com/489001 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2000 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
96b3017b33
commit
e713fd0eee
@ -46,13 +46,6 @@
|
||||
'build_libyuv%': 1,
|
||||
|
||||
'conditions': [
|
||||
['OS=="win"', {
|
||||
# TODO(andrew, perkj): does this need to be here?
|
||||
# Path needed to build Direct Show base classes on Windows.
|
||||
# The code is included in the Windows SDK.
|
||||
'direct_show_base_classes':
|
||||
'C:/Program Files/Microsoft SDKs/Windows/v7.1/Samples/multimedia/directshow/baseclasses/',
|
||||
}],
|
||||
['build_with_chromium==1', {
|
||||
# Exclude pulse audio on Chromium since its prerequisites don't require
|
||||
# pulse audio.
|
||||
@ -146,12 +139,15 @@
|
||||
'defines': [
|
||||
'WEBRTC_WIN',
|
||||
],
|
||||
# TODO(andrew): remove this block when possible.
|
||||
# TODO(andrew): enable all warnings when possible.
|
||||
# 4389: Signed/unsigned mismatch.
|
||||
# 4373: MSVC legacy warning for ignoring const / volatile in
|
||||
# signatures. TODO(phoglund): get rid of 4373 supression when
|
||||
# http://code.google.com/p/webrtc/issues/detail?id=261 is solved.
|
||||
'msvs_disabled_warnings': [4389, 4373],
|
||||
|
||||
# Re-enable some warnings that Chromium disables.
|
||||
'msvs_disabled_warnings!': [4189,],
|
||||
}],
|
||||
['OS=="android"', {
|
||||
'defines': [
|
||||
|
@ -1888,7 +1888,6 @@ WebRtc_Word32 AudioDeviceWindowsCore::PlayoutDeviceName(
|
||||
|
||||
CriticalSectionScoped lock(_critSect);
|
||||
|
||||
HRESULT hr(S_OK);
|
||||
WebRtc_Word32 ret(-1);
|
||||
WCHAR szDeviceName[MAX_PATH];
|
||||
const int bufferLen = sizeof(szDeviceName)/sizeof(szDeviceName)[0];
|
||||
@ -1969,7 +1968,6 @@ WebRtc_Word32 AudioDeviceWindowsCore::RecordingDeviceName(
|
||||
|
||||
CriticalSectionScoped lock(_critSect);
|
||||
|
||||
HRESULT hr(S_OK);
|
||||
WebRtc_Word32 ret(-1);
|
||||
WCHAR szDeviceName[MAX_PATH];
|
||||
const int bufferLen = sizeof(szDeviceName)/sizeof(szDeviceName)[0];
|
||||
@ -2786,7 +2784,6 @@ WebRtc_Word32 AudioDeviceWindowsCore::StartRecording()
|
||||
return 0;
|
||||
}
|
||||
|
||||
HRESULT hr = S_OK;
|
||||
{
|
||||
CriticalSectionScoped critScoped(_critSect);
|
||||
|
||||
@ -3037,7 +3034,6 @@ WebRtc_Word32 AudioDeviceWindowsCore::StartPlayout()
|
||||
return 0;
|
||||
}
|
||||
|
||||
HRESULT hr = S_OK;
|
||||
{
|
||||
CriticalSectionScoped critScoped(_critSect);
|
||||
|
||||
@ -3505,13 +3501,7 @@ DWORD AudioDeviceWindowsCore::DoRenderThread()
|
||||
WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "[REND] device period : %u (%3.2f ms)",
|
||||
(DWORD)devPeriod, (double)(devPeriod/10000.0));
|
||||
|
||||
// The Event Driven renderer will be woken up every defaultDevicePeriod hundred-nano-seconds.
|
||||
// Convert that time into a number of frames.
|
||||
//
|
||||
double devicePeriodInSeconds = devPeriod / (10000.0*1000.0);
|
||||
UINT32 devicePeriodInFrames = static_cast<UINT32>(_playSampleRate * devicePeriodInSeconds + 0.5);
|
||||
|
||||
// Derive inital rendering delay.
|
||||
// Derive initial rendering delay.
|
||||
// Example: 10*(960/480) + 15 = 20 + 15 = 35ms
|
||||
//
|
||||
int playout_delay = 10 * (bufferLength / _playBlockSize) +
|
||||
@ -3716,7 +3706,6 @@ Exit:
|
||||
|
||||
DWORD AudioDeviceWindowsCore::InitCaptureThreadPriority()
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
_hMmTask = NULL;
|
||||
|
||||
_SetThreadName(-1, "webrtc_core_audio_capture_thread");
|
||||
@ -3916,7 +3905,6 @@ DWORD AudioDeviceWindowsCore::DoCaptureThread()
|
||||
bool keepRecording = true;
|
||||
HANDLE waitArray[2] = {_hShutdownCaptureEvent, _hCaptureSamplesReadyEvent};
|
||||
HRESULT hr = S_OK;
|
||||
HANDLE hMmTask = NULL;
|
||||
|
||||
LARGE_INTEGER t1;
|
||||
LARGE_INTEGER t2;
|
||||
@ -3925,9 +3913,6 @@ DWORD AudioDeviceWindowsCore::DoCaptureThread()
|
||||
BYTE* syncBuffer = NULL;
|
||||
UINT32 syncBufIndex = 0;
|
||||
|
||||
WebRtc_UWord32 newMicLevel(0);
|
||||
WebRtc_UWord32 currentMicLevel(0);
|
||||
|
||||
_readSamples = 0;
|
||||
|
||||
// Initialize COM as MTA in this thread.
|
||||
|
@ -77,7 +77,6 @@ WebRtc_Word32 AudioDeviceUtilityWindows::Init()
|
||||
char os[STRING_MAX_SIZE];
|
||||
if (WideCharToMultiByte(CP_UTF8, 0, szOS, -1, os, STRING_MAX_SIZE, NULL, NULL) == 0)
|
||||
{
|
||||
DWORD err = GetLastError();
|
||||
strncpy(os, "Could not get OS info", STRING_MAX_SIZE);
|
||||
}
|
||||
// DEBUG_PRINTP("OS info: %s\n", os);
|
||||
|
@ -1161,7 +1161,6 @@ WebRtc_Word32 AudioMixerManager::SpeakerVolumeStepSize(WebRtc_UWord16& stepSize)
|
||||
}
|
||||
|
||||
const UINT mixerID(_outputMixerID);
|
||||
const DWORD dwControlID(_speakerState[_outputMixerID].dwVolumeControlID);
|
||||
MIXERCONTROL mixerControl;
|
||||
|
||||
// Retrieve one control line for a specified volume-control identifier
|
||||
|
@ -131,7 +131,6 @@ bool UdpSocket2ManagerWindows::Start()
|
||||
_pCrit->Enter();
|
||||
// Start worker threads.
|
||||
_stopped = false;
|
||||
WebRtc_Word32 i = 0;
|
||||
WebRtc_Word32 error = 0;
|
||||
ListItem* pItem = _workerThreadsList.First();
|
||||
UdpSocket2WorkerWindows* pWorker;
|
||||
|
@ -1302,7 +1302,7 @@ bool UdpSocket2Windows::NewOutstandingCall()
|
||||
{
|
||||
assert(_outstandingCallsDisabled.Value() == 0);
|
||||
|
||||
const WebRtc_Word32 outstandingCalls = ++_outstandingCalls;
|
||||
++_outstandingCalls;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -311,11 +311,10 @@ IBaseFilter * DeviceInfoWindows::GetDeviceFilter(
|
||||
{
|
||||
char tempDevicePathUTF8[256];
|
||||
tempDevicePathUTF8[0] = 0;
|
||||
const int compresult =
|
||||
WideCharToMultiByte(CP_UTF8, 0, varName.bstrVal, -1,
|
||||
tempDevicePathUTF8,
|
||||
sizeof(tempDevicePathUTF8), NULL,
|
||||
NULL);
|
||||
WideCharToMultiByte(CP_UTF8, 0, varName.bstrVal, -1,
|
||||
tempDevicePathUTF8,
|
||||
sizeof(tempDevicePathUTF8), NULL,
|
||||
NULL);
|
||||
if (strncmp(tempDevicePathUTF8,
|
||||
(const char*) deviceUniqueIdUTF8,
|
||||
deviceUniqueIdUTF8Length) == 0)
|
||||
@ -525,7 +524,6 @@ WebRtc_Word32 DeviceInfoWindows::CreateCapabilityMap(
|
||||
VideoCaptureCapabilityWindows* capability =
|
||||
new VideoCaptureCapabilityWindows();
|
||||
WebRtc_Word64 avgTimePerFrame = 0;
|
||||
bool interlaced = false;
|
||||
|
||||
if (pmt->formattype == FORMAT_VideoInfo)
|
||||
{
|
||||
|
@ -0,0 +1,109 @@
|
||||
# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
#
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file in the root of the source
|
||||
# tree. An additional intellectual property rights grant can be found
|
||||
# in the file PATENTS. All contributing project authors may
|
||||
# be found in the AUTHORS file in the root of the source tree.
|
||||
|
||||
# This target is broken out into its own gyp file in order to be treated as
|
||||
# third party code. (Since src/build/common.gypi is not included,
|
||||
# chromium_code is disabled).
|
||||
#
|
||||
# We can't place this in third_party/ because Chromium parses
|
||||
# video_capture.gypi and would fail to find it in the Chromium third_party/.
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'direct_show_base_classes',
|
||||
'type': 'static_library',
|
||||
'variables': {
|
||||
# Path needed to build the Direct Show base classes on Windows. The
|
||||
# code is included in the Windows SDK.
|
||||
'direct_show_dir':
|
||||
'C:/Program Files/Microsoft SDKs/Windows/v7.1/Samples/multimedia/directshow/baseclasses/',
|
||||
},
|
||||
'defines!': [
|
||||
'NOMINMAX',
|
||||
],
|
||||
'include_dirs': [
|
||||
'<(direct_show_dir)',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'<(direct_show_dir)',
|
||||
],
|
||||
},
|
||||
'sources': [
|
||||
'<(direct_show_dir)amextra.cpp',
|
||||
'<(direct_show_dir)amextra.h',
|
||||
'<(direct_show_dir)amfilter.cpp',
|
||||
'<(direct_show_dir)amfilter.h',
|
||||
'<(direct_show_dir)amvideo.cpp',
|
||||
'<(direct_show_dir)arithutil.cpp',
|
||||
'<(direct_show_dir)cache.h',
|
||||
'<(direct_show_dir)checkbmi.h',
|
||||
'<(direct_show_dir)combase.cpp',
|
||||
'<(direct_show_dir)combase.h',
|
||||
'<(direct_show_dir)cprop.cpp',
|
||||
'<(direct_show_dir)cprop.h',
|
||||
'<(direct_show_dir)ctlutil.cpp',
|
||||
'<(direct_show_dir)ctlutil.h',
|
||||
'<(direct_show_dir)ddmm.cpp',
|
||||
'<(direct_show_dir)ddmm.h',
|
||||
'<(direct_show_dir)dllentry.cpp',
|
||||
'<(direct_show_dir)dllsetup.cpp',
|
||||
'<(direct_show_dir)dllsetup.h',
|
||||
'<(direct_show_dir)dxmperf.h',
|
||||
'<(direct_show_dir)fourcc.h',
|
||||
'<(direct_show_dir)measure.h',
|
||||
'<(direct_show_dir)msgthrd.h',
|
||||
'<(direct_show_dir)mtype.cpp',
|
||||
'<(direct_show_dir)mtype.h',
|
||||
'<(direct_show_dir)outputq.cpp',
|
||||
'<(direct_show_dir)outputq.h',
|
||||
'<(direct_show_dir)perflog.cpp',
|
||||
'<(direct_show_dir)perflog.h',
|
||||
'<(direct_show_dir)perfstruct.h',
|
||||
'<(direct_show_dir)pstream.cpp',
|
||||
'<(direct_show_dir)pstream.h',
|
||||
'<(direct_show_dir)pullpin.cpp',
|
||||
'<(direct_show_dir)pullpin.h',
|
||||
'<(direct_show_dir)refclock.cpp',
|
||||
'<(direct_show_dir)refclock.h',
|
||||
'<(direct_show_dir)reftime.h',
|
||||
'<(direct_show_dir)renbase.cpp',
|
||||
'<(direct_show_dir)renbase.h',
|
||||
'<(direct_show_dir)schedule.cpp',
|
||||
'<(direct_show_dir)schedule.h',
|
||||
'<(direct_show_dir)seekpt.cpp',
|
||||
'<(direct_show_dir)seekpt.h',
|
||||
'<(direct_show_dir)source.cpp',
|
||||
'<(direct_show_dir)source.h',
|
||||
'<(direct_show_dir)streams.h',
|
||||
'<(direct_show_dir)strmctl.cpp',
|
||||
'<(direct_show_dir)strmctl.h',
|
||||
'<(direct_show_dir)sysclock.cpp',
|
||||
'<(direct_show_dir)sysclock.h',
|
||||
'<(direct_show_dir)transfrm.cpp',
|
||||
'<(direct_show_dir)transfrm.h',
|
||||
'<(direct_show_dir)transip.cpp',
|
||||
'<(direct_show_dir)transip.h',
|
||||
'<(direct_show_dir)videoctl.cpp',
|
||||
'<(direct_show_dir)videoctl.h',
|
||||
'<(direct_show_dir)vtrans.cpp',
|
||||
'<(direct_show_dir)vtrans.h',
|
||||
'<(direct_show_dir)winctrl.cpp',
|
||||
'<(direct_show_dir)winctrl.h',
|
||||
'<(direct_show_dir)winutil.cpp',
|
||||
'<(direct_show_dir)winutil.h',
|
||||
'<(direct_show_dir)wxdebug.cpp',
|
||||
'<(direct_show_dir)wxdebug.h',
|
||||
'<(direct_show_dir)wxlist.cpp',
|
||||
'<(direct_show_dir)wxlist.h',
|
||||
'<(direct_show_dir)wxutil.cpp',
|
||||
'<(direct_show_dir)wxutil.h',
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -40,7 +40,6 @@ IPin* GetInputPin(IBaseFilter* filter)
|
||||
// get first unconnected pin
|
||||
hr = pPinEnum->Reset(); // set to first pin
|
||||
|
||||
int count = 0;
|
||||
while (S_OK == pPinEnum->Next(1, &pin, NULL))
|
||||
{
|
||||
PIN_DIRECTION pPinDir;
|
||||
@ -72,7 +71,6 @@ IPin* GetOutputPin(IBaseFilter* filter, REFGUID Category)
|
||||
}
|
||||
// get first unconnected pin
|
||||
hr = pPinEnum->Reset(); // set to first pin
|
||||
int count = 0;
|
||||
while (S_OK == pPinEnum->Next(1, &pin, NULL))
|
||||
{
|
||||
PIN_DIRECTION pPinDir;
|
||||
|
@ -412,7 +412,6 @@ CaptureSinkFilter::GetPin(IN int Index)
|
||||
|
||||
STDMETHODIMP CaptureSinkFilter::Pause()
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
LockFilter();
|
||||
if (m_State == State_Stopped)
|
||||
{
|
||||
|
@ -62,8 +62,6 @@ VideoCaptureDS::~VideoCaptureDS()
|
||||
WebRtc_Word32 VideoCaptureDS::Init(const WebRtc_Word32 id,
|
||||
const char* deviceUniqueIdUTF8)
|
||||
{
|
||||
WebRtc_Word32 result = 0;
|
||||
|
||||
const WebRtc_Word32 nameLength =
|
||||
(WebRtc_Word32) strlen((char*) deviceUniqueIdUTF8);
|
||||
if (nameLength > kVideoCaptureUniqueNameLength)
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
#
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file in the root of the source
|
||||
@ -13,7 +13,7 @@
|
||||
'type': '<(library)',
|
||||
'dependencies': [
|
||||
'webrtc_utility',
|
||||
'<(webrtc_root)/common_video/common_video.gyp:webrtc_libyuv',
|
||||
'<(webrtc_root)/common_video/common_video.gyp:webrtc_libyuv',
|
||||
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
|
||||
],
|
||||
'include_dirs': [
|
||||
@ -91,12 +91,11 @@
|
||||
},
|
||||
}], # mac
|
||||
['OS=="win"', {
|
||||
'dependencies': [
|
||||
'<(webrtc_root)/modules/video_capture/main/source/Windows/direct_show_base_classes.gyp:direct_show_base_classes',
|
||||
],
|
||||
'include_dirs': [
|
||||
'Windows',
|
||||
'<(direct_show_base_classes)',
|
||||
],
|
||||
'defines!': [
|
||||
'NOMINMAX',
|
||||
],
|
||||
'sources': [
|
||||
'Windows/help_functions_windows.h',
|
||||
@ -109,74 +108,6 @@
|
||||
'Windows/video_capture_windows.cc',
|
||||
'Windows/device_info_windows.cc',
|
||||
'Windows/video_capture_factory_windows.cc',
|
||||
'<(direct_show_base_classes)amextra.cpp',
|
||||
'<(direct_show_base_classes)amextra.h',
|
||||
'<(direct_show_base_classes)amfilter.cpp',
|
||||
'<(direct_show_base_classes)amfilter.h',
|
||||
'<(direct_show_base_classes)amvideo.cpp',
|
||||
'<(direct_show_base_classes)arithutil.cpp',
|
||||
'<(direct_show_base_classes)cache.h',
|
||||
'<(direct_show_base_classes)checkbmi.h',
|
||||
'<(direct_show_base_classes)combase.cpp',
|
||||
'<(direct_show_base_classes)combase.h',
|
||||
'<(direct_show_base_classes)cprop.cpp',
|
||||
'<(direct_show_base_classes)cprop.h',
|
||||
'<(direct_show_base_classes)ctlutil.cpp',
|
||||
'<(direct_show_base_classes)ctlutil.h',
|
||||
'<(direct_show_base_classes)ddmm.cpp',
|
||||
'<(direct_show_base_classes)ddmm.h',
|
||||
'<(direct_show_base_classes)dllentry.cpp',
|
||||
'<(direct_show_base_classes)dllsetup.cpp',
|
||||
'<(direct_show_base_classes)dllsetup.h',
|
||||
'<(direct_show_base_classes)dxmperf.h',
|
||||
'<(direct_show_base_classes)fourcc.h',
|
||||
'<(direct_show_base_classes)measure.h',
|
||||
'<(direct_show_base_classes)msgthrd.h',
|
||||
'<(direct_show_base_classes)mtype.cpp',
|
||||
'<(direct_show_base_classes)mtype.h',
|
||||
'<(direct_show_base_classes)outputq.cpp',
|
||||
'<(direct_show_base_classes)outputq.h',
|
||||
'<(direct_show_base_classes)perflog.cpp',
|
||||
'<(direct_show_base_classes)perflog.h',
|
||||
'<(direct_show_base_classes)perfstruct.h',
|
||||
'<(direct_show_base_classes)pstream.cpp',
|
||||
'<(direct_show_base_classes)pstream.h',
|
||||
'<(direct_show_base_classes)pullpin.cpp',
|
||||
'<(direct_show_base_classes)pullpin.h',
|
||||
'<(direct_show_base_classes)refclock.cpp',
|
||||
'<(direct_show_base_classes)refclock.h',
|
||||
'<(direct_show_base_classes)reftime.h',
|
||||
'<(direct_show_base_classes)renbase.cpp',
|
||||
'<(direct_show_base_classes)renbase.h',
|
||||
'<(direct_show_base_classes)schedule.cpp',
|
||||
'<(direct_show_base_classes)schedule.h',
|
||||
'<(direct_show_base_classes)seekpt.cpp',
|
||||
'<(direct_show_base_classes)seekpt.h',
|
||||
'<(direct_show_base_classes)source.cpp',
|
||||
'<(direct_show_base_classes)source.h',
|
||||
'<(direct_show_base_classes)streams.h',
|
||||
'<(direct_show_base_classes)strmctl.cpp',
|
||||
'<(direct_show_base_classes)strmctl.h',
|
||||
'<(direct_show_base_classes)sysclock.cpp',
|
||||
'<(direct_show_base_classes)sysclock.h',
|
||||
'<(direct_show_base_classes)transfrm.cpp',
|
||||
'<(direct_show_base_classes)transfrm.h',
|
||||
'<(direct_show_base_classes)transip.cpp',
|
||||
'<(direct_show_base_classes)transip.h',
|
||||
'<(direct_show_base_classes)videoctl.cpp',
|
||||
'<(direct_show_base_classes)videoctl.h',
|
||||
'<(direct_show_base_classes)vtrans.cpp',
|
||||
'<(direct_show_base_classes)vtrans.h',
|
||||
'<(direct_show_base_classes)winctrl.cpp',
|
||||
'<(direct_show_base_classes)winctrl.h',
|
||||
'<(direct_show_base_classes)winutil.cpp',
|
||||
'<(direct_show_base_classes)winutil.h',
|
||||
'<(direct_show_base_classes)wxdebug.cpp',
|
||||
'<(direct_show_base_classes)wxdebug.h',
|
||||
'<(direct_show_base_classes)wxlist.cpp',
|
||||
'<(direct_show_base_classes)wxlist.h',
|
||||
'<(direct_show_base_classes)wxutil.cpp',
|
||||
'<(direct_show_base_classes)wxutil.h',
|
||||
],
|
||||
'msvs_settings': {
|
||||
'VCLibrarianTool': {
|
||||
|
@ -701,8 +701,6 @@ int VideoRenderDirect3D9::SetTransparentColor(LPDIRECT3DTEXTURE9 pTexture,
|
||||
|
||||
for (DWORD x = 0; x < width; x)
|
||||
{
|
||||
DWORD a = (DWORD) 0;
|
||||
|
||||
DWORD temp = ((DWORD*) lr.pBits)[dwOffset + x];
|
||||
if ((temp & 0x00FFFFFF)
|
||||
== transparentColorKey->dwColorSpaceLowValue)
|
||||
@ -844,7 +842,6 @@ WebRtc_Word32 VideoRenderDirect3D9::DeleteChannel(const WebRtc_UWord32 streamId)
|
||||
|
||||
std::map<int, D3D9Channel*>::iterator ddIt;
|
||||
ddIt = _d3dChannels.find(streamId & 0x0000ffff);
|
||||
D3D9Channel* ddobj = NULL;
|
||||
if (ddIt != _d3dChannels.end())
|
||||
{
|
||||
delete ddIt->second;
|
||||
|
@ -3024,7 +3024,6 @@ bool VideoRenderDirectDraw::RemoteRenderingProcess()
|
||||
{
|
||||
if (it->second)
|
||||
{
|
||||
int channel = it->first;
|
||||
_frameChanged = it->second->IsOffScreenSurfaceUpdated(this);
|
||||
}
|
||||
it++;
|
||||
|
@ -501,7 +501,6 @@ void VideoRenderWindowsImpl::LogOSAndHardwareDetails()
|
||||
|
||||
DWORD nInstanceCount = 0;
|
||||
DWORD nItem = 0;
|
||||
DWORD nCurCount = 0;
|
||||
|
||||
// Get the IDxDiagContainer object called "DxDiag_DisplayDevices".
|
||||
// This call may take some time while dxdiag gathers the info.
|
||||
@ -868,7 +867,6 @@ void VideoRenderWindowsImpl::CheckHWDriver(bool& badDriver,
|
||||
// Read the registry to check if HW acceleration is enabled or not.
|
||||
HKEY regKey;
|
||||
DWORD value = 0;
|
||||
DWORD valueLength = 4;
|
||||
|
||||
//Assume the best
|
||||
badDriver = false;
|
||||
@ -883,7 +881,6 @@ void VideoRenderWindowsImpl::CheckHWDriver(bool& badDriver,
|
||||
DWORD driverPathLen = 512;
|
||||
TCHAR driverPath[512];
|
||||
memset(driverPath, 0, driverPathLen * sizeof(TCHAR));
|
||||
DWORD dwType = REG_SZ;
|
||||
|
||||
long retVal = RegQueryValueEx(regKey, _T("\\Device\\Video0"), NULL,
|
||||
NULL, (BYTE*) driverPath, &driverPathLen);
|
||||
|
@ -163,10 +163,7 @@ int WebRtcCreateWindow(HWND &hwndMain,int winNum, int width, int height)
|
||||
NULL); // no window creation data
|
||||
|
||||
if (!hwndMain)
|
||||
{
|
||||
int error = GetLastError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Show the window using the flag specified by the program
|
||||
// that started the application, and send the application
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -128,10 +128,8 @@ static T* GetStaticInstance(CountOperation count_operation) {
|
||||
// local copy.
|
||||
T* new_instance = T::CreateInstance();
|
||||
if (1 == InterlockedIncrement(&instance_count)) {
|
||||
T* old_value = static_cast<T*> (InterlockedExchangePointer(
|
||||
reinterpret_cast<void* volatile*>(&instance), new_instance));
|
||||
assert(old_value == NULL);
|
||||
assert(instance);
|
||||
InterlockedExchangePointer(reinterpret_cast<void* volatile*>(&instance),
|
||||
new_instance);
|
||||
} else {
|
||||
InterlockedDecrement(&instance_count);
|
||||
if (new_instance) {
|
||||
|
@ -85,8 +85,7 @@ CpuWindows::CpuWindows()
|
||||
CpuWindows::~CpuWindows()
|
||||
{
|
||||
// All resources are reclaimed in StopPollingCpu().
|
||||
const bool success = StopPollingCpu();
|
||||
assert(success);
|
||||
StopPollingCpu();
|
||||
DeAllocateComplexDataTypes();
|
||||
}
|
||||
|
||||
@ -189,8 +188,7 @@ bool CpuWindows::ProcessImpl()
|
||||
CriticalSectionScoped cs(terminate_crit_);
|
||||
if (terminate_)
|
||||
{
|
||||
const bool success = Terminate();
|
||||
assert(success);
|
||||
Terminate();
|
||||
terminate_cond_->WakeAll();
|
||||
return false;
|
||||
}
|
||||
@ -220,10 +218,8 @@ bool CpuWindows::ProcessImpl()
|
||||
}
|
||||
|
||||
// UpdateCpuUsage() returns false if a single (or more) CPU read(s) failed.
|
||||
// Not a major problem if it happens but make sure it doesnt trigger in
|
||||
// debug.
|
||||
const bool success = UpdateCpuUsage();
|
||||
assert(success);
|
||||
// Not a major problem if it happens.
|
||||
UpdateCpuUsage();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -113,8 +113,6 @@ WebRtc_Word32 TraceWindows::AddDateTimeInfo(char* traceMessage) const
|
||||
|
||||
TCHAR szDateStr[20];
|
||||
TCHAR szTimeStr[20];
|
||||
TCHAR *pSzDateStr = szDateStr;
|
||||
TCHAR *pSzTimeStr = szTimeStr;
|
||||
|
||||
// Create date string (e.g. Apr 04 2002)
|
||||
GetDateFormat(LOCALE_SYSTEM_DEFAULT, 0, &sysTime, TEXT("MMM dd yyyy"),
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -74,10 +74,10 @@ BOOL CDXWindowsTestApp::InitInstance()
|
||||
}
|
||||
|
||||
{
|
||||
WindowsTestMainDlg dlg(_videoEngine,_voiceEngine);
|
||||
WindowsTestMainDlg dlg(_videoEngine,_voiceEngine);
|
||||
|
||||
m_pMainWnd = &dlg;
|
||||
int nResponse = dlg.DoModal();
|
||||
m_pMainWnd = &dlg;
|
||||
dlg.DoModal();
|
||||
}
|
||||
|
||||
vieBase->Release();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -78,10 +78,6 @@ int TbExternalTransport::SendPacket(int channel, const void *data, int len)
|
||||
sequenceNumber += (((unsigned char*) data)[3]);
|
||||
|
||||
|
||||
int marker=((unsigned char*)data)[1] & 0x80;
|
||||
unsigned int timestamp=((((unsigned char*)data)[4]) << 24) + ((((unsigned char*)data)[5])<<16) +((((unsigned char*)data)[6])<<8)+(((unsigned char*)data)[7]);
|
||||
|
||||
|
||||
// Packet loss
|
||||
int dropThis = rand() % 100;
|
||||
bool nacked=false;
|
||||
|
@ -181,10 +181,8 @@ int ViEAutoTestWindowManager::ViECreateWindow(HWND &hwndMain, int xPos,
|
||||
hinst, // instance handle
|
||||
NULL); // no window creation data
|
||||
|
||||
if (!hwndMain) {
|
||||
int error = GetLastError();
|
||||
if (!hwndMain)
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Show the window using the flag specified by the program
|
||||
// that started the application, and send the application
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -1215,8 +1215,7 @@ CWinTestDlg::~CWinTestDlg()
|
||||
if (_veRtpRtcpPtr) _veRtpRtcpPtr->Release();
|
||||
if (_vePtr)
|
||||
{
|
||||
bool ret = VoiceEngine::Delete(_vePtr);
|
||||
ASSERT(ret == true);
|
||||
VoiceEngine::Delete(_vePtr);
|
||||
}
|
||||
VoiceEngine::SetTraceFilter(kTraceNone);
|
||||
}
|
||||
@ -1416,7 +1415,6 @@ BOOL CWinTestDlg::OnInitDialog()
|
||||
float lVol(0.0);
|
||||
float rVol(0.0);
|
||||
int leftVol, rightVol;
|
||||
unsigned int volumePan(0);
|
||||
CSliderCtrl* slider(NULL);
|
||||
|
||||
_veVolumeControlPtr->GetOutputVolumePan(-1, lVol, rVol);
|
||||
@ -1777,9 +1775,6 @@ void CWinTestDlg::OnBnClickedButtonCreate1()
|
||||
GetDlgItem(IDC_CHECK_NS_1)->EnableWindow(TRUE);
|
||||
GetDlgItem(IDC_CHECK_FEC)->EnableWindow(TRUE);
|
||||
|
||||
bool enabled(false);
|
||||
bool includeCSRCs(false);
|
||||
|
||||
// Always set send codec to default codec <=> index 0.
|
||||
CodecInst codec;
|
||||
_veCodecPtr->GetCodec(0, codec);
|
||||
@ -1819,10 +1814,6 @@ void CWinTestDlg::OnBnClickedButtonCreate2()
|
||||
GetDlgItem(IDC_CHECK_CONFERENCE_2)->EnableWindow(TRUE);
|
||||
GetDlgItem(IDC_CHECK_ON_HOLD_2)->EnableWindow(TRUE);
|
||||
|
||||
bool enabled(false);
|
||||
bool includeCSRCs(false);
|
||||
|
||||
|
||||
// Always set send codec to default codec <=> index 0.
|
||||
CodecInst codec;
|
||||
_veCodecPtr->GetCodec(0, codec);
|
||||
@ -2478,7 +2469,6 @@ void CWinTestDlg::OnBnClickedCheckPlayFileOut2()
|
||||
|
||||
void CWinTestDlg::OnBnClickedCheckExtMediaIn1()
|
||||
{
|
||||
int ret(0);
|
||||
int channel = GetDlgItemInt(IDC_EDIT_1);
|
||||
CButton* buttonExtTrans = (CButton*)GetDlgItem(IDC_CHECK_EXT_MEDIA_IN_1);
|
||||
int check = buttonExtTrans->GetCheck();
|
||||
@ -2497,7 +2487,6 @@ void CWinTestDlg::OnBnClickedCheckExtMediaIn1()
|
||||
|
||||
void CWinTestDlg::OnBnClickedCheckExtMediaIn2()
|
||||
{
|
||||
int ret(0);
|
||||
int channel = GetDlgItemInt(IDC_EDIT_2);
|
||||
CButton* buttonExtTrans = (CButton*)GetDlgItem(IDC_CHECK_EXT_MEDIA_IN_2);
|
||||
int check = buttonExtTrans->GetCheck();
|
||||
@ -2516,7 +2505,6 @@ void CWinTestDlg::OnBnClickedCheckExtMediaIn2()
|
||||
|
||||
void CWinTestDlg::OnBnClickedCheckExtMediaOut1()
|
||||
{
|
||||
int ret(0);
|
||||
int channel = GetDlgItemInt(IDC_EDIT_1);
|
||||
CButton* buttonExtTrans = (CButton*)GetDlgItem(IDC_CHECK_EXT_MEDIA_OUT_1);
|
||||
int check = buttonExtTrans->GetCheck();
|
||||
@ -2535,7 +2523,6 @@ void CWinTestDlg::OnBnClickedCheckExtMediaOut1()
|
||||
|
||||
void CWinTestDlg::OnBnClickedCheckExtMediaOut2()
|
||||
{
|
||||
int ret(0);
|
||||
int channel = GetDlgItemInt(IDC_EDIT_2);
|
||||
CButton* buttonExtTrans = (CButton*)GetDlgItem(IDC_CHECK_EXT_MEDIA_OUT_2);
|
||||
int check = buttonExtTrans->GetCheck();
|
||||
@ -2951,7 +2938,6 @@ void CWinTestDlg::OnBnClickedCheckOnHold2()
|
||||
|
||||
void CWinTestDlg::OnBnClickedCheckDelayEstimate1()
|
||||
{
|
||||
int channel = GetDlgItemInt(IDC_EDIT_1);
|
||||
CButton* button = (CButton*)GetDlgItem(IDC_CHECK_DELAY_ESTIMATE_1);
|
||||
int check = button->GetCheck();
|
||||
const bool enable = (check == BST_CHECKED);
|
||||
@ -3112,7 +3098,6 @@ void CWinTestDlg::OnBnClickedCheckPlayFileIn()
|
||||
const char micFile[] = "../../test/data/voice_engine/audio_short16.pcm";
|
||||
// const char micFile[] = "../../test/data/voice_engine/audio_long16noise.pcm";
|
||||
|
||||
int ret(0);
|
||||
int channel(-1);
|
||||
CButton* buttonExtTrans = (CButton*)GetDlgItem(IDC_CHECK_PLAY_FILE_IN);
|
||||
int check = buttonExtTrans->GetCheck();
|
||||
|
Loading…
x
Reference in New Issue
Block a user