Minor tweaks to video source frameworks
Fix the video source to close if file is open already and add a limit. Change-Id: I36ada4c609d027b6eaa9b447fe9ad4115532edc1
This commit is contained in:
@@ -57,6 +57,9 @@ class VideoSource {
|
||||
|
||||
// Get the current frame counter, starting at 0.
|
||||
virtual unsigned int frame() const = 0;
|
||||
|
||||
// Get the current file limit.
|
||||
virtual unsigned int limit() const = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -94,6 +97,8 @@ class DummyVideoSource : public VideoSource {
|
||||
|
||||
virtual unsigned int frame() const { return frame_; }
|
||||
|
||||
virtual unsigned int limit() const { return limit_; }
|
||||
|
||||
void SetSize(unsigned int width, unsigned int height) {
|
||||
if (width != width_ || height != height_) {
|
||||
vpx_img_free(img_);
|
||||
|
Reference in New Issue
Block a user