mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 1523412: compare GetStreamCaps return values against S_OK. r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D17872 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
107bda7f6a
commit
0d97afcc8d
@ -435,8 +435,7 @@ int32_t DeviceInfoDS::CreateCapabilityMap(const char* deviceUniqueIdUTF8)
|
||||
GUID preferedVideoFormat = FORMAT_VideoInfo;
|
||||
for (int32_t tmp = 0; tmp < count; ++tmp) {
|
||||
hr = streamConfig->GetStreamCaps(tmp, &pmt, reinterpret_cast<BYTE*>(&caps));
|
||||
// Bug 1181265 - perhaps a helper dll returns success with nullptr
|
||||
if (!FAILED(hr) && pmt) {
|
||||
if (hr == S_OK) {
|
||||
if (pmt->majortype == MEDIATYPE_Video &&
|
||||
pmt->formattype == FORMAT_VideoInfo2) {
|
||||
RTC_LOG(LS_INFO) << "Device support FORMAT_VideoInfo2";
|
||||
@ -465,7 +464,7 @@ int32_t DeviceInfoDS::CreateCapabilityMap(const char* deviceUniqueIdUTF8)
|
||||
|
||||
for (int32_t tmp = 0; tmp < count; ++tmp) {
|
||||
hr = streamConfig->GetStreamCaps(tmp, &pmt, reinterpret_cast<BYTE*>(&caps));
|
||||
if (FAILED(hr)) {
|
||||
if (hr != S_OK) {
|
||||
RTC_LOG(LS_INFO) << "Failed to GetStreamCaps";
|
||||
RELEASE_AND_CLEAR(videoControlConfig);
|
||||
RELEASE_AND_CLEAR(streamConfig);
|
||||
|
@ -234,7 +234,7 @@ int32_t VideoCaptureDS::SetCameraOutput(const VideoCaptureCapability& capability
|
||||
bool isDVCamera = false;
|
||||
hr = streamConfig->GetStreamCaps(windowsCapability.directShowCapabilityIndex,
|
||||
&pmt, reinterpret_cast<BYTE*>(&caps));
|
||||
if (!FAILED(hr)) {
|
||||
if (hr == S_OK) {
|
||||
if (pmt->formattype == FORMAT_VideoInfo2) {
|
||||
VIDEOINFOHEADER2* h = reinterpret_cast<VIDEOINFOHEADER2*>(pmt->pbFormat);
|
||||
if (capability.maxFPS > 0 && windowsCapability.supportFrameRateControl) {
|
||||
|
Loading…
Reference in New Issue
Block a user