From a417fef1fdadd084fa130e873b1292fa947e85c1 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Fri, 5 Oct 2012 01:58:27 -0500 Subject: [PATCH] Made the Timeline class inherit from FileReaderBase, which means the Timeline is really just a fancy ready class now. Also, added new unit tests for the Clip and Timeline classes. --- include/Timeline.h | 33 +++++++++++++++++----- src/Main.cpp | 4 ++- src/Timeline.cpp | 12 ++++---- tests/CMakeLists.txt | 4 ++- tests/Clip_Tests.cpp | 61 ++++++++++++++++++++++++++++++++++++++++ tests/Timeline_Tests.cpp | 46 ++++++++++++++++++++++++++++++ 6 files changed, 146 insertions(+), 14 deletions(-) create mode 100644 tests/Clip_Tests.cpp create mode 100644 tests/Timeline_Tests.cpp diff --git a/include/Timeline.h b/include/Timeline.h index cda127b3..2b3ce921 100644 --- a/include/Timeline.h +++ b/include/Timeline.h @@ -7,6 +7,8 @@ * \author Copyright (c) 2011 Jonathan Thomas */ +#include "FileReaderBase.h" +#include "Frame.h" #include "KeyFrame.h" using namespace std; @@ -22,21 +24,38 @@ namespace openshot { * video output will be rendered. It has a collection of layers and clips, that arrange, * sequence, and generate the final video output. */ - class Timeline { + class Timeline : public FileReaderBase { private: - int canvas_width; ///