diff options
Diffstat (limited to 'src/codecs/include')
| -rw-r--r-- | src/codecs/include/codec.hpp | 4 | ||||
| -rw-r--r-- | src/codecs/include/mad.hpp | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/codecs/include/codec.hpp b/src/codecs/include/codec.hpp index 4b5ab47f..299b16e4 100644 --- a/src/codecs/include/codec.hpp +++ b/src/codecs/include/codec.hpp @@ -7,6 +7,7 @@ #pragma once #include <stdint.h> +#include <sys/_stdint.h> #include <cstddef> #include <cstdint> @@ -50,6 +51,9 @@ class ICodec { uint8_t num_channels; uint8_t bits_per_sample; uint32_t sample_rate_hz; + + std::optional<uint32_t> duration_seconds; + std::optional<uint32_t> bits_per_second; }; /* diff --git a/src/codecs/include/mad.hpp b/src/codecs/include/mad.hpp index d2643230..fbae560c 100644 --- a/src/codecs/include/mad.hpp +++ b/src/codecs/include/mad.hpp @@ -42,6 +42,8 @@ class MadMp3Decoder : public ICodec { -> Result<void> override; private: + auto GetVbrLength(const mad_header& header) -> std::optional<uint32_t>; + mad_stream stream_; mad_frame frame_; mad_synth synth_; |
