Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Unified Diff: webrtc/modules/video_capture/device_info_impl.cc

Issue 2668693008: Delete VideoCaptureCapability::codecType and related logic. (Closed)
Patch Set: Attempt to fix DeviceInfoImpl::GetBestMatchedCapability. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/media/engine/webrtcvideocapturer.cc ('k') | webrtc/modules/video_capture/objc/device_info_objc.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « webrtc/media/engine/webrtcvideocapturer.cc ('k') | webrtc/modules/video_capture/objc/device_info_objc.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698