Enable Media Foundation grabber on windows

This commit is contained in:
Paulchen Panther 2021-02-06 14:27:24 +01:00 committed by Paulchen Panther
parent a4b307e43c
commit 72226cd1de
3 changed files with 4 additions and 2 deletions

View File

@ -61,6 +61,7 @@ IF ( ${CMAKE_SYSTEM} MATCHES "Linux" )
SET ( DEFAULT_CEC ON ) SET ( DEFAULT_CEC ON )
ELSEIF ( WIN32 ) ELSEIF ( WIN32 )
SET ( DEFAULT_DX OFF ) SET ( DEFAULT_DX OFF )
SET ( DEFAULT_MF ON )
ELSE() ELSE()
SET ( DEFAULT_V4L2 OFF ) SET ( DEFAULT_V4L2 OFF )
SET ( DEFAULT_FB OFF ) SET ( DEFAULT_FB OFF )

View File

@ -55,7 +55,7 @@ $(document).ready(function () {
if (schema[key]) { if (schema[key]) {
var enumVals = []; var enumVals = [];
var enumTitelVals = []; var enumTitelVals = [];
var v4l2_properties = JSON.parse(JSON.stringify(window.serverInfo.grabbers.v4l2_properties)); var v4l2_properties = JSON.parse(JSON.stringify(window.serverInfo.grabbers.video_sources));
if (key == 'available_devices') { if (key == 'available_devices') {
for (var i = 0; i < v4l2_properties.length; i++) { for (var i = 0; i < v4l2_properties.length; i++) {
@ -66,6 +66,7 @@ $(document).ready(function () {
: enumTitelVals.push(v4l2_properties[i]['device']); : enumTitelVals.push(v4l2_properties[i]['device']);
} }
} else if (key == 'device_inputs') { } else if (key == 'device_inputs') {
return; // TODO Fix V4L2 WebUI
for (var i = 0; i < v4l2_properties.length; i++) { for (var i = 0; i < v4l2_properties.length; i++) {
if (v4l2_properties[i]['device'] == device) { if (v4l2_properties[i]['device'] == device) {
for (var index = 0; index < v4l2_properties[i]['device_inputs'].length; index++) { for (var index = 0; index < v4l2_properties[i]['device_inputs'].length; index++) {

View File

@ -191,7 +191,7 @@ HRESULT MFGrabber::init_device(QString deviceName, DeviceProperties props)
goto done; goto done;
} }
if(FAILED(deviceAttributes->SetString(MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_SYMBOLIC_LINK, (LPCWSTR)props.symlink.toStdString().c_str())) && _sourceReaderCB) if(FAILED(deviceAttributes->SetString(MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_SYMBOLIC_LINK, (LPCWSTR)props.symlink.utf16())) && _sourceReaderCB)
{ {
error = QString("IMFAttributes_SetString_MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_SYMBOLIC_LINK (%1)").arg(hr); error = QString("IMFAttributes_SetString_MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_SYMBOLIC_LINK (%1)").arg(hr);
goto done; goto done;