~mbranton/libopenshot/alpha-channel-fix

« back to all changes in this revision

Viewing changes to include/ReaderBase.h

  • 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:
116
116
                /// Display file information in the standard output stream (stdout)
117
117
                void DisplayInfo();
118
118
 
119
 
                /// Test method to draw a bitmap on a Qt QGraphicsScene
120
 
                void DrawFrameOnScene(string path, long _graphics_scene_address);
121
 
 
122
119
                /// Get the cache object used by this reader (note: not all readers use cache)
123
120
                virtual CacheBase* GetCache() = 0;
124
121
 
130
127
                /// @param[in] number The frame number that is requested.
131
128
                virtual tr1::shared_ptr<Frame> GetFrame(long int number) = 0;
132
129
 
133
 
            /// A thread safe version of GetFrame.
134
 
            //tr1::shared_ptr<Frame> GetFrameSafe(int number);
135
 
 
136
130
                /// Determine if reader is open or closed
137
131
                virtual bool IsOpen() = 0;
138
132
 
146
140
                virtual void SetJsonValue(Json::Value root) = 0; ///< Load Json::JsonValue into this object
147
141
 
148
142
                /// Set Max Image Size (used for performance optimization)
149
 
                void SetMaxSize(int width, int height) { max_width = width; max_height = height;  };
 
143
                void SetMaxSize(int width, int height) { max_width = width; max_height = height; };
150
144
 
151
145
                /// Open the reader (and start consuming resources, such as images or video files)
152
146
                virtual void Open() = 0;