diff options
| author | karlf <[email protected]> | 2016-08-11 13:28:13 -0700 |
|---|---|---|
| committer | karlf <[email protected]> | 2016-08-11 13:28:13 -0700 |
| commit | 96eb96dfb613e4c745db6bd1f53a92fe7e2290fc (patch) | |
| tree | ad5f3ede5cbcd6b598677ce41bcf8318471bdd92 /AVStream/avscamera/sys/VideoHwSim.cpp | |
| parent | 687b274aa38fd05c8c26e3068932121876d7f745 (diff) | |
Updated for "Windows 10 Anniversary Update" (Version 1607)
Diffstat (limited to 'AVStream/avscamera/sys/VideoHwSim.cpp')
| -rw-r--r-- | AVStream/avscamera/sys/VideoHwSim.cpp | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/AVStream/avscamera/sys/VideoHwSim.cpp b/AVStream/avscamera/sys/VideoHwSim.cpp new file mode 100644 index 00000000..33b6de90 --- /dev/null +++ b/AVStream/avscamera/sys/VideoHwSim.cpp @@ -0,0 +1,66 @@ +/************************************************************************** + + A/V Stream Camera Sample + + Copyright (c) 2014, Microsoft Corporation. + + File: + + VideoHwSim.cpp + + Abstract: + + A fake h/w simulation for the video pin. Provides Video pin specific + metadata. + + History: + + created 5/28/2014 + +**************************************************************************/ + +#include "Common.h" + + +CVideoHardwareSimulation::CVideoHardwareSimulation( + _Inout_ CSensor *Sensor, + _In_ LONG PinID +) + : CHardwareSimulation( Sensor, PinID ) +{} + + +CVideoHardwareSimulation::~CVideoHardwareSimulation() +{} + +// +// Emit metadata here for video pin. +// +void +CVideoHardwareSimulation:: +EmitMetadata( + _Inout_ PKSSTREAM_HEADER pStreamHeader +) +{ + NT_ASSERT(pStreamHeader); + + // Add the normal frame info to the metadata + // Note: This call ensures the KSSTREAM_METADATA_INFO is properly initialized. + CHardwareSimulation::EmitMetadata( pStreamHeader ); + + if (0 != (pStreamHeader->OptionsFlags & KSSTREAM_HEADER_OPTIONSF_METADATA)) + { + CExtendedVidProcSetting FaceDetect; + m_Sensor->GetFaceDetection(&FaceDetect); + + if( FaceDetect.Flags & KSCAMERA_EXTENDEDPROP_FACEDETECTION_VIDEO ) + { + DBG_TRACE("VIDEO"); + EmitFaceMetadata( + pStreamHeader, + FaceDetect.GetULONG(), + FaceDetect.Flags & KSCAMERA_EXTENDEDPROP_FACEDETECTION_ADVANCED_MASK); + } + } +} + |
