summaryrefslogtreecommitdiff
path: root/src/audio/include/stream_info.hpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-07-31 09:41:49 +1000
committerjacqueline <me@jacqueline.id.au>2023-07-31 09:41:49 +1000
commit485eed28903a0bc23df9c1ced1417e35fd58c43c (patch)
treea363714c1b0f5074c48bea64f46a907b4aa45cfc /src/audio/include/stream_info.hpp
parent97bd3be892ce549dac8e0b9930607a282701653e (diff)
downloadtangara-fw-485eed28903a0bc23df9c1ced1417e35fd58c43c.tar.gz
use libtag duration where available
Diffstat (limited to 'src/audio/include/stream_info.hpp')
-rw-r--r--src/audio/include/stream_info.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/audio/include/stream_info.hpp b/src/audio/include/stream_info.hpp
index 77789c24..d48c39a8 100644
--- a/src/audio/include/stream_info.hpp
+++ b/src/audio/include/stream_info.hpp
@@ -42,6 +42,13 @@ class StreamInfo {
return total_length_bytes_;
}
+ auto total_length_seconds() -> std::optional<std::uint32_t>& {
+ return total_length_seconds_;
+ }
+ auto total_length_seconds() const -> std::optional<std::uint32_t> {
+ return total_length_seconds_;
+ }
+
struct Encoded {
// The codec that this stream is associated with.
codecs::StreamType type;
@@ -77,6 +84,7 @@ class StreamInfo {
private:
std::size_t bytes_in_stream_;
std::optional<std::uint32_t> total_length_bytes_;
+ std::optional<std::uint32_t> total_length_seconds_;
Format format_{};
};