You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Added a new optimized constructor to some readers (FFmpegReader, QtImageReader, ImageReader) to not Open() in the constructor, which dramatically speeds up creating hundreds of Readers (i.e. when opening a project). This is really only useful when inflating the reader with Json right after you instantiate it...
This commit is contained in:
@@ -36,6 +36,15 @@ ImageReader::ImageReader(string path) throw(InvalidFile) : path(path), is_open(f
|
||||
Close();
|
||||
}
|
||||
|
||||
ImageReader::ImageReader(string path, bool inspect_reader) throw(InvalidFile) : path(path), is_open(false)
|
||||
{
|
||||
// Open and Close the reader, to populate it's attributes (such as height, width, etc...)
|
||||
if (inspect_reader) {
|
||||
Open();
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
// Open image file
|
||||
void ImageReader::Open() throw(InvalidFile)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user