| Index: webrtc/modules/video_capture/device_info_impl.cc
|
| diff --git a/webrtc/modules/video_capture/device_info_impl.cc b/webrtc/modules/video_capture/device_info_impl.cc
|
| index e2caeaa58fddd4413d9bed854a6d0d655bb2f10d..472db49d3f5d17d6257a248d8bb37546a9328fc5 100644
|
| --- a/webrtc/modules/video_capture/device_info_impl.cc
|
| +++ b/webrtc/modules/video_capture/device_info_impl.cc
|
| @@ -154,7 +154,6 @@ int32_t DeviceInfoImpl::GetBestMatchedCapability(
|
| int32_t bestHeight = 0;
|
| int32_t bestFrameRate = 0;
|
| RawVideoType bestRawType = kVideoUnknown;
|
| - webrtc::VideoCodecType bestCodecType = webrtc::kVideoCodecUnknown;
|
|
|
| const int32_t numberOfCapabilies =
|
| static_cast<int32_t>(_captureCapabilities.size());
|
| @@ -201,7 +200,6 @@ int32_t DeviceInfoImpl::GetBestMatchedCapability(
|
| || capability.rawType == kVideoYUY2
|
| || capability.rawType == kVideoYV12))
|
| {
|
| - bestCodecType = capability.codecType;
|
| bestRawType = capability.rawType;
|
| bestformatIndex = tmp;
|
| }
|
| @@ -210,54 +208,36 @@ int32_t DeviceInfoImpl::GetBestMatchedCapability(
|
| && capability.width == requested.width
|
| && capability.maxFPS >= requested.maxFPS)
|
| {
|
| - if (capability.codecType == requested.codecType
|
| - && bestCodecType != requested.codecType)
|
| - {
|
| - bestCodecType = capability.codecType;
|
| - bestformatIndex = tmp;
|
| - }
|
| + bestformatIndex = tmp;
|
| }
|
| }
|
| else // Better frame rate
|
| {
|
| - if (requested.codecType == capability.codecType)
|
| - {
|
| -
|
| - bestWidth = capability.width;
|
| - bestHeight = capability.height;
|
| - bestFrameRate = capability.maxFPS;
|
| - bestCodecType = capability.codecType;
|
| - bestRawType = capability.rawType;
|
| - bestformatIndex = tmp;
|
| - }
|
| + bestWidth = capability.width;
|
| + bestHeight = capability.height;
|
| + bestFrameRate = capability.maxFPS;
|
| + bestRawType = capability.rawType;
|
| + bestformatIndex = tmp;
|
| }
|
| }
|
| }
|
| else // Better width than previously
|
| {
|
| - if (requested.codecType == capability.codecType)
|
| - {
|
| - bestWidth = capability.width;
|
| - bestHeight = capability.height;
|
| - bestFrameRate = capability.maxFPS;
|
| - bestCodecType = capability.codecType;
|
| - bestRawType = capability.rawType;
|
| - bestformatIndex = tmp;
|
| - }
|
| + bestWidth = capability.width;
|
| + bestHeight = capability.height;
|
| + bestFrameRate = capability.maxFPS;
|
| + bestRawType = capability.rawType;
|
| + bestformatIndex = tmp;
|
| }
|
| }// else width no good
|
| }
|
| else // Better height
|
| {
|
| - if (requested.codecType == capability.codecType)
|
| - {
|
| - bestWidth = capability.width;
|
| - bestHeight = capability.height;
|
| - bestFrameRate = capability.maxFPS;
|
| - bestCodecType = capability.codecType;
|
| - bestRawType = capability.rawType;
|
| - bestformatIndex = tmp;
|
| - }
|
| + bestWidth = capability.width;
|
| + bestHeight = capability.height;
|
| + bestFrameRate = capability.maxFPS;
|
| + bestRawType = capability.rawType;
|
| + bestformatIndex = tmp;
|
| }
|
| }// else height not good
|
| }//end for
|
|
|