diff options
| author | ailurux <ailuruxx@gmail.com> | 2023-07-08 12:58:07 +1000 |
|---|---|---|
| committer | ailurux <ailuruxx@gmail.com> | 2023-07-08 12:58:07 +1000 |
| commit | 3de310f6e4c170c4c4bfb789cb07ca10e5ab17b8 (patch) | |
| tree | 0d13d6efa758b8c029a35c73405529dcadde3788 /src/audio/include/stream_info.hpp | |
| parent | daa3013836d619d920db3a9dc1f9cc988047a4b4 (diff) | |
| parent | 8f8bc1f088b389a683735d626cbce9adb1f6dc17 (diff) | |
| download | tangara-fw-3de310f6e4c170c4c4bfb789cb07ca10e5ab17b8.tar.gz | |
Merge branch 'main' of git.sr.ht:~jacqueline/tangara-fw
Diffstat (limited to 'src/audio/include/stream_info.hpp')
| -rw-r--r-- | src/audio/include/stream_info.hpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/audio/include/stream_info.hpp b/src/audio/include/stream_info.hpp index 4db3e5fd..69bf3c4b 100644 --- a/src/audio/include/stream_info.hpp +++ b/src/audio/include/stream_info.hpp @@ -30,13 +30,16 @@ struct StreamInfo { bool is_consumer_finished = true; - // - std::optional<uint32_t> seek_to_seconds{}; + std::optional<std::uint32_t> duration_seconds; + + std::optional<std::uint32_t> seek_to_seconds{}; struct Encoded { // The codec that this stream is associated with. codecs::StreamType type; + std::optional<std::size_t> duration_bytes; + bool operator==(const Encoded&) const = default; }; @@ -95,6 +98,8 @@ class OutputStream { bool prepare(const StreamInfo::Format& new_format); + void set_duration(std::size_t); + const StreamInfo& info() const; cpp::span<std::byte> data() const; |
