aboutsummaryrefslogtreecommitdiff
path: root/src/playback.h
blob: 3f6e67f688e627a30b97e119de387c84d0b421f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once
#include <filesystem>
#include <memory>
#include <string>

namespace backend {
    struct rect;
}

namespace frontend {
    struct playback_impl;
    class playback {
        public:
            playback(const std::filesystem::path& video, std::size_t frameCap=0);
            void display(const std::string& windowName, const backend::rect &r) const;
            bool seekFrame(std::size_t frameNum);
            std::size_t getFrame() const;
            bool seekTime(double time);
            double getTime() const;
            void interFrameSleep() const;
            std::size_t getMaxFrame() const;
            double getMaxTime() const;

        private:
            std::shared_ptr<playback_impl> data;
    };
}