diff --git a/openbr/plugins/frames.cpp b/openbr/plugins/frames.cpp index 440d36f..18d7b94 100644 --- a/openbr/plugins/frames.cpp +++ b/openbr/plugins/frames.cpp @@ -58,35 +58,21 @@ BR_REGISTER(Transform, AggregateFrames) * * For a video with m frames, DropFrames will pass on m/n frames. */ -class DropFrames : public TimeVaryingTransform +class DropFrames : public UntrainableMetaTransform { Q_OBJECT Q_PROPERTY(int n READ get_n WRITE set_n RESET reset_n STORED false) BR_PROPERTY(int, n, 1) -public: - DropFrames() : TimeVaryingTransform(false) {} - -private: - void train(const TemplateList &data) - { - (void) data; - } - - void projectUpdate(const Template &src, Template &dst) + void project(const TemplateList &src, TemplateList &dst) const { - if (src.file.get("FrameNumber") % n != 0) return; + if (src.first().file.get("FrameNumber") % n != 0) return; dst = src; } - void store(QDataStream &stream) const - { - (void) stream; - } - - void load(QDataStream &stream) + void project(const Template &src, Template &dst) const { - (void) stream; + (void) src; (void) dst; qFatal("shouldn't be here"); } };