From 485eed28903a0bc23df9c1ced1417e35fd58c43c Mon Sep 17 00:00:00 2001 From: jacqueline Date: Mon, 31 Jul 2023 09:41:49 +1000 Subject: use libtag duration where available --- src/audio/include/stream_info.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/audio/include/stream_info.hpp') 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& { + return total_length_seconds_; + } + auto total_length_seconds() const -> std::optional { + 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 total_length_bytes_; + std::optional total_length_seconds_; Format format_{}; }; -- cgit v1.2.3