Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clip Refactor (move Timeline Drawing code to Clip) #571

Merged
merged 41 commits into from
Oct 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
5700b0a
- Refactoring all Timeline drawing code into the Clip class
jonoomph Aug 26, 2020
5a9d47a
Refactored the Settings::Instance()->MAX_WIDTH and Settings::Instance…
jonoomph Aug 26, 2020
453d55f
Fixed a bug with cropping logic on Clip (disabled it temporarily). I …
jonoomph Aug 27, 2020
f9a717e
Large refactor of Timeline, TimelineBase, ClipBase, and Clip, to allo…
jonoomph Oct 4, 2020
206578d
Fixing some regressions on image merging
jonoomph Oct 6, 2020
fb879a4
Merge branch 'develop' into clip-refactor-keyframes
jonoomph Oct 6, 2020
9eb859f
Initialize parent clip variable
jonoomph Oct 8, 2020
58cedb6
Implemented position remapper inside FrameMapper to fix audio noise w…
BrennoCaldato Oct 10, 2020
57b48f3
Initializing Clip info struct, and fixing clip cache settings
jonoomph Oct 13, 2020
1b670a7
Merge pull request #578 from OpenShot/audio_fix
jonoomph Oct 13, 2020
91945f0
Replacing audio fix implementation with ParentClip(), to access clip …
jonoomph Oct 13, 2020
9405982
Converting RGB8888 to ARGB32_Premultiplied (for performance reasons)
jonoomph Oct 13, 2020
6bd7fb7
Replacing ARGB32_Premultiplied with Format_RGBA8888_Premultiplied, wh…
jonoomph Oct 14, 2020
1eecda3
Fix alpha and mask effects, so they correctly multiply the alpha to a…
jonoomph Oct 14, 2020
1dfbb0e
Merge branch 'develop' into clip-refactor-keyframes
jonoomph Oct 16, 2020
f4d0d9d
Fixing some cpp_test complaints
jonoomph Oct 16, 2020
29107bc
Fixing some additional cpp_test complaints
jonoomph Oct 16, 2020
000c9d6
- Refactoring all Timeline drawing code into the Clip class
jonoomph Aug 26, 2020
eb328f1
Refactored the Settings::Instance()->MAX_WIDTH and Settings::Instance…
jonoomph Aug 26, 2020
6da4e8f
Fixed a bug with cropping logic on Clip (disabled it temporarily). I …
jonoomph Aug 27, 2020
8387b12
Large refactor of Timeline, TimelineBase, ClipBase, and Clip, to allo…
jonoomph Oct 4, 2020
b3ad76d
Fixing some regressions on image merging
jonoomph Oct 6, 2020
8d36b12
Initialize parent clip variable
jonoomph Oct 8, 2020
b936ea8
Initializing Clip info struct, and fixing clip cache settings
jonoomph Oct 13, 2020
a410941
Implemented position remapper inside FrameMapper to fix audio noise w…
BrennoCaldato Oct 10, 2020
ab49162
Replacing audio fix implementation with ParentClip(), to access clip …
jonoomph Oct 13, 2020
096c2c4
Converting RGB8888 to ARGB32_Premultiplied (for performance reasons)
jonoomph Oct 13, 2020
8e0c1b8
Replacing ARGB32_Premultiplied with Format_RGBA8888_Premultiplied, wh…
jonoomph Oct 14, 2020
d3d604c
Fix alpha and mask effects, so they correctly multiply the alpha to a…
jonoomph Oct 14, 2020
2f4aba4
Fixing some cpp_test complaints
jonoomph Oct 16, 2020
d2521bc
Fixing some additional cpp_test complaints
jonoomph Oct 16, 2020
f4ae897
Merge branch 'clip-refactor-keyframes' of https://github.com/OpenShot…
ferdnyc Oct 19, 2020
a1e44ed
Merge branch 'develop' into clip-refactor-keyframes
ferdnyc Oct 19, 2020
cf89891
Finish conflict resolution
ferdnyc Oct 19, 2020
7711113
Apply suggestions from code review
jonoomph Oct 20, 2020
18911be
Apply suggestions from code review
jonoomph Oct 20, 2020
e5d5d82
- Simplifying the FrameMapper Clip::AdjustFrameNumber method
jonoomph Oct 20, 2020
9495d1d
Removing invalid ICC sRGB color profile from these PNG used in unit t…
jonoomph Oct 23, 2020
bba1260
Added 2 FrameMapper unit tests which verify resampled audio data has …
jonoomph Oct 23, 2020
e556d0f
Added 2 new unit tests for Clip's with a Timeline associated with the…
jonoomph Oct 23, 2020
1723484
Improvement to video caching thread, to recover from the separation o…
jonoomph Oct 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions bindings/python/openshot.i
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
#include "KeyFrame.h"
#include "RendererBase.h"
#include "Settings.h"
#include "TimelineBase.h"
#include "Timeline.h"
#include "ZmqLogger.h"
#include "AudioDeviceInfo.h"
Expand Down Expand Up @@ -203,6 +204,7 @@
%include "KeyFrame.h"
%include "RendererBase.h"
%include "Settings.h"
%include "TimelineBase.h"
%include "Timeline.h"
%include "ZmqLogger.h"
%include "AudioDeviceInfo.h"
Expand Down
2 changes: 2 additions & 0 deletions bindings/ruby/openshot.i
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
#include "KeyFrame.h"
#include "RendererBase.h"
#include "Settings.h"
#include "TimelineBase.h"
#include "Timeline.h"
#include "ZmqLogger.h"
#include "AudioDeviceInfo.h"
Expand Down Expand Up @@ -189,6 +190,7 @@
%include "KeyFrame.h"
%include "RendererBase.h"
%include "Settings.h"
%include "TimelineBase.h"
%include "Timeline.h"
%include "ZmqLogger.h"
%include "AudioDeviceInfo.h"
Expand Down
Binary file modified examples/back.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/final-composite.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/front.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/front3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/interlaced.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/mask.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/mask2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/output-final.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ set(OPENSHOT_SOURCES
QtPlayer.cpp
QtTextReader.cpp
Settings.cpp
TimelineBase.cpp
Timeline.cpp)

# Video effects
Expand Down
2 changes: 1 addition & 1 deletion src/CacheDisk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ std::shared_ptr<Frame> CacheDisk::GetFrame(int64_t frame_number)
image->load(frame_path);

// Set pixel formatimage->
image = std::make_shared<QImage>(image->convertToFormat(QImage::Format_RGBA8888));
image = std::make_shared<QImage>(image->convertToFormat(QImage::Format_RGBA8888_Premultiplied));

// Create frame object
auto frame = std::make_shared<Frame>();
Expand Down
2 changes: 0 additions & 2 deletions src/ChunkReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,13 @@ std::shared_ptr<Frame> ChunkReader::GetFrame(int64_t requested_frame)
// Close existing reader (if needed)
if (local_reader)
{
std::cout << "Close READER" << std::endl;
// Close and delete old reader
local_reader->Close();
delete local_reader;
}

try
{
std::cout << "Load READER: " << chunk_video_path << std::endl;
// Load new FFmpegReader
local_reader = new FFmpegReader(chunk_video_path);
local_reader->Open(); // open reader
Expand Down
8 changes: 0 additions & 8 deletions src/ChunkWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,6 @@ void ChunkWriter::WriteFrame(std::shared_ptr<Frame> frame)
// Write the frames once it reaches the correct chunk size
if (frame_count % chunk_size == 0 && frame_count >= chunk_size)
{
std::cout << "Done with chunk" << std::endl;
std::cout << "frame_count: " << frame_count << std::endl;
std::cout << "chunk_size: " << chunk_size << std::endl;

// Pad an additional 12 frames
for (int z = 0; z<12; z++)
{
Expand Down Expand Up @@ -231,10 +227,6 @@ void ChunkWriter::Close()
// Write the frames once it reaches the correct chunk size
if (is_writing)
{
std::cout << "Final chunk" << std::endl;
std::cout << "frame_count: " << frame_count << std::endl;
std::cout << "chunk_size: " << chunk_size << std::endl;

// Pad an additional 12 frames
for (int z = 0; z<12; z++)
{
Expand Down