diff --git a/src/DummyReader.cpp b/src/DummyReader.cpp index 426ac402..109f588c 100644 --- a/src/DummyReader.cpp +++ b/src/DummyReader.cpp @@ -41,6 +41,9 @@ void DummyReader::Open() throw(InvalidFile) info.video_timebase.num = fps.GetFraction().den; info.video_timebase.den = fps.GetFraction().num; info.video_length = round(info.duration * info.fps.ToDouble()); + info.acodec = "raw"; + info.channels = channels; + info.sample_rate = sample_rate; // Calculate the DAR (display aspect ratio) Fraction size(info.width * info.pixel_ratio.num, info.height * info.pixel_ratio.den); diff --git a/src/FrameMapper.cpp b/src/FrameMapper.cpp index ad6810b6..d53fd2d6 100644 --- a/src/FrameMapper.cpp +++ b/src/FrameMapper.cpp @@ -74,9 +74,13 @@ void FrameMapper::Init() fields.clear(); frames.clear(); - // Loop through all fields in the original video file + // Calculate # of fields to map int frame = 1; - int number_of_fields = info.video_length * 2; + int number_of_fields = reader->info.video_length * 2; +// if (reader->info.video_length * 2 > number_of_fields) +// number_of_fields = reader->info.video_length * 2; + + // Loop through all fields in the original video file for (int field = 1; field <= number_of_fields; field++) { diff --git a/src/Main.cpp b/src/Main.cpp index 375b709b..3fd624db 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -16,6 +16,17 @@ void FrameReady(int number) int main() { + // Create a reader + DummyReader r1(Framerate(24,1), 720, 480, 22000, 2, 5.0); + + // Map frames + FrameMapper mapping(&r1, Framerate(60, 1), PULLDOWN_CLASSIC); + mapping.PrintMapping(); + + return 0; + + + // Create timeline Timeline t(640, 360, Framerate(24,1));