Clean up some tests.

This commit is contained in:
James Grogan 2022-12-01 10:52:48 +00:00
parent b17ba8b3a7
commit c102ebb6da
64 changed files with 615 additions and 541 deletions

View file

@ -2,24 +2,22 @@
#include "Image.h"
#include "FfmpegInterface.h"
#include "PngWriter.h"
#include <iostream>
#include "TestFramework.h"
TEST_CASE(TestVideoDecoder, "video")
{
auto video = Video::Create();
video->SetPath("/home/jmsgrogan/test.mp4");
video->SetPath(TestUtils::getTestDataDir() / "test.mp4");
FfmpegInterface decoder;
auto images = decoder.decodeToImages(video, 4);
std::cout << "Got " << std::to_string(images.size()) << std::endl;
PngWriter writer;
for(unsigned idx=0; idx<20; idx++)
{
auto filename = "test_out" + std::to_string(idx) + ".png";
writer.SetPath(filename);
writer.Write(images[idx]);
writer.setPath(filename);
writer.write(images[idx]);
}
}