Add PDF writer.
This commit is contained in:
parent
c05b7b6315
commit
9c116b1efd
72 changed files with 1819 additions and 114 deletions
25
test/video/TestVideoDecoder.cpp
Normal file
25
test/video/TestVideoDecoder.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include "Video.h"
|
||||
#include "Image.h"
|
||||
#include "FfmpegInterface.h"
|
||||
#include "PngWriter.h"
|
||||
#include <iostream>
|
||||
|
||||
int main()
|
||||
{
|
||||
auto video = Video::Create();
|
||||
video->SetPath("/home/jmsgrogan/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]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue