~mbranton/libopenshot/alpha-channel-fix

« back to all changes in this revision

Viewing changes to src/ReaderBase.cpp

  • Committer: Jonathan Thomas
  • Date: 2016-09-16 22:43:26 UTC
  • Revision ID: jonathan@openshot.org-20160916224326-0ca2uhoj7bhd51ou
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...

Show diffs side-by-side

added added

removed removed

Lines of Context:
227
227
                        info.audio_timebase.den = root["audio_timebase"]["den"].asInt();
228
228
        }
229
229
}
230
 
 
231
 
// Test method to draw a bitmap on a Qt QGraphicsScene
232
 
void ReaderBase::DrawFrameOnScene(string path, long _graphics_scene_address) {
233
 
 
234
 
        // Get pixmap
235
 
        QGraphicsScene *scene = reinterpret_cast<QGraphicsScene*>(_graphics_scene_address);
236
 
        QGraphicsPixmapItem *item = new QGraphicsPixmapItem(QPixmap(QString(path.c_str())));
237
 
        scene->addItem(item);
238
 
 
239
 
}