Removed Framerate class, since its functionality is already represented in the Fraction class. Also, corrected a few unittests, and updated some documentation.

This commit is contained in:
Jonathan Thomas
2014-01-05 23:12:56 -06:00
parent f25f342825
commit e2f5ca8a69
20 changed files with 73 additions and 294 deletions

View File

@@ -30,13 +30,13 @@
using namespace openshot;
// Blank constructor for DummyReader, with default settings.
DummyReader::DummyReader() : fps(Framerate(24,1)), width(1280), height(720),
DummyReader::DummyReader() : fps(Fraction(24,1)), width(1280), height(720),
sample_rate(44100), channels(2), duration(30.0) {
}
// Constructor for DummyReader. Pass a framerate and samplerate.
DummyReader::DummyReader(Framerate fps, int width, int height, int sample_rate, int channels, float duration) :
DummyReader::DummyReader(Fraction fps, int width, int height, int sample_rate, int channels, float duration) :
fps(fps), width(width), height(height), sample_rate(sample_rate), channels(channels), duration(duration)
{
// Init FileInfo struct (clear all values)
@@ -69,10 +69,10 @@ void DummyReader::Open() throw(InvalidFile)
info.pixel_ratio.num = 1;
info.pixel_ratio.den = 1;
info.duration = duration;
info.fps.num = fps.GetFraction().num;
info.fps.den = fps.GetFraction().den;
info.video_timebase.num = fps.GetFraction().den;
info.video_timebase.den = fps.GetFraction().num;
info.fps.num = fps.num;
info.fps.den = fps.den;
info.video_timebase.num = fps.den;
info.video_timebase.den = fps.num;
info.video_length = round(info.duration * info.fps.ToDouble());
info.acodec = "raw";
info.channels = channels;