-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from jdibenes/pv_mrc
Support for Mixed Reality Capture
- Loading branch information
Showing
17 changed files
with
148 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
#include "custom_video_effect.h" | ||
|
||
using namespace winrt::Windows::Foundation::Collections; | ||
using namespace winrt::Windows::Media::Effects; | ||
|
||
MRCVideoEffect::MRCVideoEffect(MRCOptions const& options) | ||
{ | ||
m_propertySet.Insert(L"StreamType", winrt::box_value<uint32_t>(1)); | ||
m_propertySet.Insert(L"HologramCompositionEnabled", winrt::box_value<bool>(options.hologram_composition)); | ||
m_propertySet.Insert(L"RecordingIndicatorEnabled", winrt::box_value<bool>(options.recording_indicator)); | ||
m_propertySet.Insert(L"VideoStabilizationEnabled", winrt::box_value<bool>(options.video_stabilization)); | ||
m_propertySet.Insert(L"VideoStabilizationBufferLength", winrt::box_value<uint32_t>(options.video_stabilization_length)); | ||
m_propertySet.Insert(L"GlobalOpacityCoefficient", winrt::box_value<float>(options.global_opacity)); | ||
m_propertySet.Insert(L"BlankOnProtectedContent", winrt::box_value<bool>(options.blank_protected)); | ||
m_propertySet.Insert(L"ShowHiddenMesh", winrt::box_value<bool>(options.show_mesh)); | ||
m_propertySet.Insert(L"OutputSize", winrt::box_value(winrt::Windows::Foundation::Size(options.output_width, options.output_height))); | ||
m_propertySet.Insert(L"OutputSubtype", winrt::box_value(winrt::hstring(L"Nv12"))); | ||
m_propertySet.Insert(L"PreferredHologramPerspective", winrt::box_value<uint32_t>(options.hologram_perspective)); | ||
} | ||
|
||
IPropertySet MRCVideoEffect::Properties() | ||
{ | ||
return m_propertySet; | ||
} | ||
|
||
winrt::hstring MRCVideoEffect::ActivatableClassId() | ||
{ | ||
return L"Windows.Media.MixedRealityCapture.MixedRealityCaptureVideoEffect"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
#pragma once | ||
|
||
#include <winrt/Windows.Foundation.h> | ||
#include <winrt/Windows.Foundation.Collections.h> | ||
#include <winrt/Windows.Media.Effects.h> | ||
|
||
struct MRCOptions | ||
{ | ||
bool enable; | ||
bool hologram_composition; | ||
bool recording_indicator; | ||
bool video_stabilization; | ||
bool blank_protected; | ||
bool show_mesh; | ||
uint8_t _reserved[2]; | ||
float global_opacity; | ||
float output_width; | ||
float output_height; | ||
uint32_t video_stabilization_length; | ||
uint32_t hologram_perspective; | ||
}; | ||
|
||
struct MRCVideoEffect : winrt::implements<MRCVideoEffect, winrt::Windows::Media::Effects::IVideoEffectDefinition> | ||
{ | ||
winrt::Windows::Foundation::Collections::PropertySet m_propertySet; | ||
|
||
MRCVideoEffect(MRCOptions const& options); | ||
|
||
winrt::hstring ActivatableClassId(); | ||
winrt::Windows::Foundation::Collections::IPropertySet Properties(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters