mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
mfvideosrc: Don't error out when if we've found supported format
While retrieving supported formats by device, the last return might not be S_OK in case that it's not supported one by us (e.g., H264, JPEG or so). But if we've found at least one supported raw video format, we can keep going on. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1451>
This commit is contained in:
parent
14f6799f93
commit
37aeb91d54
1 changed files with 11 additions and 10 deletions
|
@ -260,38 +260,38 @@ GstWinRTMediaFrameSourceGroup::Fill
|
||||||
|
|
||||||
hr = source_group->get_Id(hstr_id.GetAddressOf());
|
hr = source_group->get_Id(hstr_id.GetAddressOf());
|
||||||
if (!gst_mf_result(hr))
|
if (!gst_mf_result(hr))
|
||||||
goto done;
|
goto error;
|
||||||
|
|
||||||
id_ = convert_hstring_to_string (&hstr_id);
|
id_ = convert_hstring_to_string (&hstr_id);
|
||||||
if (id_.empty()) {
|
if (id_.empty()) {
|
||||||
GST_WARNING ("Emptry source group id");
|
GST_WARNING ("Emptry source group id");
|
||||||
hr = E_FAIL;
|
hr = E_FAIL;
|
||||||
goto done;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = source_group->get_DisplayName (hstr_display_name.GetAddressOf());
|
hr = source_group->get_DisplayName (hstr_display_name.GetAddressOf());
|
||||||
if (!gst_mf_result (hr))
|
if (!gst_mf_result (hr))
|
||||||
goto done;
|
goto error;
|
||||||
|
|
||||||
display_name_ = convert_hstring_to_string (&hstr_display_name);
|
display_name_ = convert_hstring_to_string (&hstr_display_name);
|
||||||
if (display_name_.empty()) {
|
if (display_name_.empty()) {
|
||||||
GST_WARNING ("Empty display name");
|
GST_WARNING ("Empty display name");
|
||||||
hr = E_FAIL;
|
hr = E_FAIL;
|
||||||
goto done;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = source_group->get_SourceInfos (&info_list);
|
hr = source_group->get_SourceInfos (&info_list);
|
||||||
if (!gst_mf_result (hr))
|
if (!gst_mf_result (hr))
|
||||||
goto done;
|
goto error;
|
||||||
|
|
||||||
hr = info_list->get_Size (&count);
|
hr = info_list->get_Size (&count);
|
||||||
if (!gst_mf_result (hr))
|
if (!gst_mf_result (hr))
|
||||||
goto done;
|
goto error;
|
||||||
|
|
||||||
if (count == 0) {
|
if (count == 0) {
|
||||||
GST_WARNING ("No available source info");
|
GST_WARNING ("No available source info");
|
||||||
hr = E_FAIL;
|
hr = E_FAIL;
|
||||||
goto done;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
source_group_ = source_group;
|
source_group_ = source_group;
|
||||||
|
@ -370,15 +370,16 @@ GstWinRTMediaFrameSourceGroup::Fill
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
|
||||||
if (source_list_.empty()) {
|
if (source_list_.empty()) {
|
||||||
GST_WARNING ("No usable source infos");
|
GST_WARNING ("No usable source infos");
|
||||||
hr = E_FAIL;
|
hr = E_FAIL;
|
||||||
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gst_mf_result(hr))
|
return S_OK;
|
||||||
Release();
|
|
||||||
|
|
||||||
|
error:
|
||||||
|
Release ();
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue