Merge pull request #24 from Azure/user/pyeh/camera_adapter_fix

User/pyeh/camera adapter fix
This commit is contained in:
BenPYeh 2019-08-08 11:37:15 -07:00 коммит произвёл GitHub
Родитель cee9127e2b 8cf03dd2d7
Коммит 88289f848c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -169,7 +169,7 @@ CameraPnpInterfaceBind(
RETURN_HR_IF (E_UNEXPECTED, 0 != PnpAdapterInterface_Create(&interfaceParams, &adapterInterface))
RETURN_IF_FAILED(pIotPnp->Initialize(PnpAdapterInterface_GetPnpInterfaceClient(adapterInterface), nullptr /* cameraName.c_str() */));
RETURN_IF_FAILED(pIotPnp->Initialize(PnpAdapterInterface_GetPnpInterfaceClient(adapterInterface), cameraName.c_str() ));
RETURN_IF_FAILED (pIotPnp->StartTelemetryWorker());
RETURN_HR_IF (E_UNEXPECTED, 0 != PnpAdapterInterface_SetContext(adapterInterface, (void*)pIotPnp.get()));

Просмотреть файл

@ -86,10 +86,10 @@ CameraPnpDiscovery::InitializePnpDiscovery(
PNPMESSAGE_PROPERTIES* props = NULL;
RETURN_IF_FAILED (pjson->Initialize());
RETURN_IF_FAILED (pjson->AddFormatString("Identity", "camera-health-monitor"));
RETURN_IF_FAILED (pjson->AddFormatString("identity", "camera-health-monitor"));
RETURN_IF_FAILED (pmatchjson->Initialize());
RETURN_IF_FAILED (pmatchjson->AddFormatString("HardwareId", "UVC_Webcam_00"));
RETURN_IF_FAILED (pjson->AddObject("MatchParameters", pmatchjson->GetMessageW()));
RETURN_IF_FAILED (pmatchjson->AddFormatString("hardware_id", "UVC_Webcam_00"));
RETURN_IF_FAILED (pjson->AddObject("match_parameters", pmatchjson->GetMessageW()));
PnpMessage_CreateMessage(&payload);
PnpMessage_SetMessage(payload, pjson->GetMessageW());

Просмотреть файл

@ -34,6 +34,7 @@ CameraStatConsumer::CameraStatConsumer(
, m_hFlushThread(nullptr)
, m_fCoInit(false)
, m_fMfStartup(false)
, m_stats({ 0 })
{
ZeroMemory(m_buffer, sizeof(m_buffer));
ZeroMemory(&m_TraceLogfile, sizeof(m_TraceLogfile));