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:
Jonathan Thomas
2016-09-16 17:43:26 -05:00
parent 33bba65cfd
commit 183b0714e2
9 changed files with 62 additions and 22 deletions

View File

@@ -227,13 +227,3 @@ void ReaderBase::SetJsonValue(Json::Value root) {
info.audio_timebase.den = root["audio_timebase"]["den"].asInt();
}
}
// Test method to draw a bitmap on a Qt QGraphicsScene
void ReaderBase::DrawFrameOnScene(string path, long _graphics_scene_address) {
// Get pixmap
QGraphicsScene *scene = reinterpret_cast<QGraphicsScene*>(_graphics_scene_address);
QGraphicsPixmapItem *item = new QGraphicsPixmapItem(QPixmap(QString(path.c_str())));
scene->addItem(item);
}