This repository has been archived by the owner on Feb 12, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Major rework to bump up the framerate.
Changed the interface between the Native and Managed, simplified the usage of the buffers.
- Loading branch information
Berthier Lemieux
committed
Apr 13, 2013
1 parent
f93eaf0
commit 10b339b
Showing
23 changed files
with
724 additions
and
236 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,114 @@ | ||
ipch/* | ||
Debug/* | ||
ARM/* | ||
*/Debug/* | ||
*/ARM/* | ||
*/ipch/* | ||
*/Generated Files/* | ||
*/Bin/* | ||
*/PerfLogs/* | ||
*/obj/* | ||
*.sdf | ||
*.bak | ||
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs) | ||
[Bb]in/ | ||
[Oo]bj/ | ||
|
||
# mstest test results | ||
TestResults | ||
|
||
## Ignore Visual Studio temporary files, build results, and | ||
## files generated by popular Visual Studio add-ons. | ||
|
||
# User-specific files | ||
*.suo | ||
*.opensdf | ||
*.user | ||
*.pfx | ||
*.sln.docstates | ||
|
||
# Build results | ||
[Dd]ebug/ | ||
[Rr]elease/ | ||
x64/ | ||
*_i.c | ||
*_p.c | ||
*.ilk | ||
*.meta | ||
*.obj | ||
*.pch | ||
*.pdb | ||
*.pgc | ||
*.pgd | ||
*.rsp | ||
*.sbr | ||
*.tlb | ||
*.tli | ||
*.tlh | ||
*.tmp | ||
*.log | ||
*.vspscc | ||
*.vssscc | ||
.builds | ||
|
||
# Visual C++ cache files | ||
ipch/ | ||
*.aps | ||
*.ncb | ||
*.opensdf | ||
*.sdf | ||
|
||
# Visual Studio profiler | ||
*.psess | ||
*.vsp | ||
*.vspx | ||
|
||
# Guidance Automation Toolkit | ||
*.gpState | ||
|
||
# ReSharper is a .NET coding add-in | ||
_ReSharper* | ||
|
||
# Mindbench SASS cache | ||
.sass-cache/ | ||
|
||
# NCrunch | ||
*.ncrunch* | ||
.*crunch*.local.xml | ||
|
||
# Installshield output folder | ||
[Ee]xpress | ||
|
||
# DocProject is a documentation generator add-in | ||
DocProject/buildhelp/ | ||
DocProject/Help/*.HxT | ||
DocProject/Help/*.HxC | ||
DocProject/Help/*.hhc | ||
DocProject/Help/*.hhk | ||
DocProject/Help/*.hhp | ||
DocProject/Help/Html2 | ||
DocProject/Help/html | ||
|
||
# Click-Once directory | ||
publish | ||
|
||
# Publish Web Output | ||
*.Publish.xml | ||
|
||
# NuGet Packages Directory | ||
packages | ||
|
||
# Windows Azure Build Output | ||
csx | ||
*.build.csdef | ||
|
||
# Windows Store app package directory | ||
AppPackages/ | ||
|
||
# Others | ||
sql | ||
TestResults | ||
[Tt]est[Rr]esult* | ||
*.Cache | ||
ClientBin | ||
[Ss]tyle[Cc]op.* | ||
~$* | ||
*.dbmdl | ||
Generated_Code #added for RIA/Silverlight projects | ||
|
||
# Backup & report files from converting an old project file to a newer | ||
# Visual Studio version. Backup files are not needed, because we have git ;-) | ||
_UpgradeReport_Files/ | ||
Backup*/ | ||
UpgradeLog*.XML | ||
|
||
# SQL Server files | ||
App_Data/*.mdf | ||
App_Data/*.ldf | ||
|
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,136 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup Label="ProjectConfigurations"> | ||
<ProjectConfiguration Include="Debug|Win32"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>Win32</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Debug|ARM"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>ARM</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|Win32"> | ||
<Configuration>Release</Configuration> | ||
<Platform>Win32</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|ARM"> | ||
<Configuration>Release</Configuration> | ||
<Platform>ARM</Platform> | ||
</ProjectConfiguration> | ||
</ItemGroup> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>{b54d292c-6154-413f-9c4c-d4a08cdb7edf}</ProjectGuid> | ||
<RootNamespace>CameraEffectInterface</RootNamespace> | ||
<DefaultLanguage>en-US</DefaultLanguage> | ||
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion> | ||
<WinMDAssembly>true</WinMDAssembly> | ||
<ProjectName>CameraEffectInterface</ProjectName> | ||
</PropertyGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | ||
<ConfigurationType>DynamicLibrary</ConfigurationType> | ||
<UseDebugLibraries>true</UseDebugLibraries> | ||
<PlatformToolset>v110_wp80</PlatformToolset> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration"> | ||
<ConfigurationType>DynamicLibrary</ConfigurationType> | ||
<UseDebugLibraries>true</UseDebugLibraries> | ||
<PlatformToolset>v110_wp80</PlatformToolset> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | ||
<ConfigurationType>DynamicLibrary</ConfigurationType> | ||
<UseDebugLibraries>false</UseDebugLibraries> | ||
<WholeProgramOptimization>true</WholeProgramOptimization> | ||
<PlatformToolset>v110_wp80</PlatformToolset> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration"> | ||
<ConfigurationType>DynamicLibrary</ConfigurationType> | ||
<UseDebugLibraries>false</UseDebugLibraries> | ||
<WholeProgramOptimization>true</WholeProgramOptimization> | ||
<PlatformToolset>v110_wp80</PlatformToolset> | ||
</PropertyGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
<ImportGroup Label="PropertySheets"> | ||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
</ImportGroup> | ||
<PropertyGroup Label="UserMacros" /> | ||
<PropertyGroup> | ||
<GenerateManifest>false</GenerateManifest> | ||
</PropertyGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
<ClCompile> | ||
<PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<PrecompiledHeader>Use</PrecompiledHeader> | ||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> | ||
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories> | ||
<CompileAsWinRT>true</CompileAsWinRT> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Console</SubSystem> | ||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> | ||
<IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> | ||
<GenerateWindowsMetadata>true</GenerateWindowsMetadata> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
<ClCompile> | ||
<PreprocessorDefinitions>_WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<PrecompiledHeader>Use</PrecompiledHeader> | ||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> | ||
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories> | ||
<CompileAsWinRT>true</CompileAsWinRT> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Console</SubSystem> | ||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> | ||
<IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> | ||
<GenerateWindowsMetadata>true</GenerateWindowsMetadata> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'"> | ||
<ClCompile> | ||
<PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<PrecompiledHeader>NotUsing</PrecompiledHeader> | ||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> | ||
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories> | ||
<CompileAsWinRT>true</CompileAsWinRT> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Console</SubSystem> | ||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> | ||
<IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> | ||
<GenerateWindowsMetadata>true</GenerateWindowsMetadata> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'"> | ||
<ClCompile> | ||
<PreprocessorDefinitions>_WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<PrecompiledHeader>Use</PrecompiledHeader> | ||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> | ||
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories> | ||
<CompileAsWinRT>true</CompileAsWinRT> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Console</SubSystem> | ||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> | ||
<IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> | ||
<GenerateWindowsMetadata>true</GenerateWindowsMetadata> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<ItemGroup> | ||
<Reference Include="platform.winmd"> | ||
<IsWinMDFile>true</IsWinMDFile> | ||
<Private>false</Private> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClInclude Include="ICameraEffect.h" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClCompile Include="ICameraEffect.cpp" /> | ||
</ItemGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsPhone\v$(TargetPlatformVersion)\Microsoft.Cpp.WindowsPhone.$(TargetPlatformVersion).targets" /> | ||
<ImportGroup Label="ExtensionTargets"> | ||
</ImportGroup> | ||
</Project> |
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,6 @@ | ||
// ICameraEffect.cpp | ||
#include "ICameraEffect.h" | ||
|
||
using namespace CameraEffectInterface; | ||
using namespace Platform; | ||
|
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,51 @@ | ||
#pragma once | ||
|
||
namespace CameraEffectInterface | ||
{ | ||
/// <summary> | ||
/// The ICameraEffect interface definition | ||
/// This interface can be implemented either from managed or from native code. | ||
/// </summary> | ||
|
||
public interface class ICameraEffect { | ||
|
||
/// <summary> | ||
/// The camera device, the effect will poll the preview frames from it | ||
/// </summary> | ||
property Windows::Phone::Media::Capture::PhotoCaptureDevice^ CaptureDevice | ||
{ | ||
void set( Windows::Phone::Media::Capture::PhotoCaptureDevice^ captureDevice); | ||
} | ||
|
||
/// <summary> | ||
/// The buffer where image data is written once the effect has been applied. | ||
/// </summary> | ||
property Windows::Storage::Streams::IBuffer^ OutputBuffer | ||
{ | ||
void set( Windows::Storage::Streams::IBuffer^ OutputBuffer ); | ||
} | ||
|
||
/// <summary> | ||
/// The dimensions of the output buffer | ||
/// </summary> | ||
property Windows::Foundation::Size OutputBufferSize | ||
{ | ||
void set( Windows::Foundation::Size outputBufferSize); | ||
} | ||
|
||
/// <summary> | ||
/// Get a frame from the camera and apply an effect on it | ||
/// </summary> | ||
/// <param name="processedBuffer">A buffer with the camera data with the effect applied</param> | ||
/// <returns>A task that completes when effect has been applied</returns> | ||
Windows::Foundation::IAsyncAction^ GetNewFrameAndApplyEffect(); | ||
|
||
|
||
/// <summary> | ||
/// Change the type of effect | ||
/// </summary> | ||
void ChangeEffectType(); | ||
|
||
}; | ||
|
||
} |
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,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<Filter Include="Resources"> | ||
<UniqueIdentifier>5fd0e509-b6ae-4f29-bd2a-4d2cc10f3aa0</UniqueIdentifier> | ||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> | ||
</Filter> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClCompile Include="ICameraEffect.cpp" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClInclude Include="ICameraEffect.h" /> | ||
</ItemGroup> | ||
</Project> |
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
Oops, something went wrong.