Updated VideoPlayerWidget to play new IVideo data

Added optional padding to video frames because that's what VideoPlayerWidget expects.
Keeping the option to not use padding for other use-cases like converting frames to PNG.
This commit is contained in:
penev92
2021-09-22 01:58:33 +03:00
committed by Matthias Mailänder
parent ee29d0f9c7
commit c4ab7041b8
8 changed files with 47 additions and 21 deletions

View File

@@ -18,14 +18,14 @@ namespace OpenRA.Mods.Cnc.VideoLoaders
{
public class WsaLoader : IVideoLoader
{
public bool TryParseVideo(Stream s, out IVideo video)
public bool TryParseVideo(Stream s, bool useFramePadding, out IVideo video)
{
video = null;
if (!IsWsa(s))
return false;
video = new WsaReader(s);
video = new WsaReader(s, useFramePadding);
return true;
}