VideoPlayer update (#2)

Reviewed-on: #2
spritebatch
cosmonaut 2023-06-07 21:22:43 +00:00
parent 0000450a81
commit 484bd7070c
4 changed files with 24 additions and 3 deletions

Binary file not shown.

View File

@ -5,6 +5,18 @@
<Message Text="Runtime ID: $(RuntimeIdentifier)" Importance="high"/> <Message Text="Runtime ID: $(RuntimeIdentifier)" Importance="high"/>
</Target> </Target>
<ItemGroup>
<Content Include="..\..\moonlibs\video_shaders\video_fullscreen.vert.refresh">
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\moonlibs\video_shaders\video_yuv2rgba.frag.refresh">
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))"> <ItemGroup Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))">
<Content Include="..\..\moonlibs\windows\FAudio.dll"> <Content Include="..\..\moonlibs\windows\FAudio.dll">
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link> <Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
@ -18,6 +30,10 @@
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link> <Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="..\..\moonlibs\windows\dav1dfile.dll">
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup> </ItemGroup>
<ItemGroup Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))"> <ItemGroup Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))">
<Content Include="..\..\moonlibs\lib64\libFAudio.*"> <Content Include="..\..\moonlibs\lib64\libFAudio.*">
@ -32,6 +48,10 @@
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link> <Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="..\..\moonlibs\windows\libdav1dfile.*">
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup> </ItemGroup>
<ItemGroup Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))"> <ItemGroup Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))">
<Content Include="..\..\moonlibs\osx\**\*.*" > <Content Include="..\..\moonlibs\osx\**\*.*" >

View File

@ -11,7 +11,7 @@ namespace MoonWorks.Test
private Buffer vertexBuffer; private Buffer vertexBuffer;
private Buffer indexBuffer; private Buffer indexBuffer;
private Video.Video video; private Video.VideoAV1 video;
private VideoPlayer videoPlayer; private VideoPlayer videoPlayer;
public VideoPlayerGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true) public VideoPlayerGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true)
@ -60,11 +60,12 @@ namespace MoonWorks.Test
GraphicsDevice.Wait(); GraphicsDevice.Wait();
// Load the video // Load the video
video = new Video.Video(TestUtils.GetVideoPath("hello.ogv")); video = new Video.VideoAV1(TestUtils.GetVideoPath("hello.obu"), 25);
// Play the video // Play the video
videoPlayer = new VideoPlayer(GraphicsDevice, AudioDevice); videoPlayer = new VideoPlayer(GraphicsDevice);
videoPlayer.Load(video); videoPlayer.Load(video);
videoPlayer.Loop = true;
videoPlayer.Play(); videoPlayer.Play();
} }