aboutsummaryrefslogtreecommitdiff
path: root/src/playback.h
blob: 363a360c5ed566c5e0ee9898adf0bedc384d7e3c (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
28
29
#pragma once
#include <filesystem>
#include <memory>
#include <string>
#include <vector>

namespace backend {
    struct label;
}

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 std::vector<backend::label>& labels) 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;
            void release() const;

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