From a9531c86a433c8b7ae1f77ff0266c27c39eca7f4 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Fri, 10 Mar 2023 11:28:33 +1100 Subject: mostly single task pipeline --- src/codecs/include/codec.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/codecs/include') diff --git a/src/codecs/include/codec.hpp b/src/codecs/include/codec.hpp index 6897acf2..4595f877 100644 --- a/src/codecs/include/codec.hpp +++ b/src/codecs/include/codec.hpp @@ -10,6 +10,7 @@ #include "result.hpp" #include "span.hpp" +#include "types.hpp" namespace codecs { @@ -17,7 +18,7 @@ class ICodec { public: virtual ~ICodec() {} - virtual auto CanHandleFile(const std::string& path) -> bool = 0; + virtual auto CanHandleType(StreamType type) -> bool = 0; struct OutputFormat { uint8_t num_channels; @@ -31,7 +32,7 @@ class ICodec { virtual auto ResetForNewStream() -> void = 0; - virtual auto SetInput(cpp::span input) -> void = 0; + virtual auto SetInput(cpp::span input) -> void = 0; /* * Returns the codec's next read position within the input buffer. If the @@ -63,7 +64,7 @@ class ICodec { enum CreateCodecError { UNKNOWN_EXTENSION }; -auto CreateCodecForFile(const std::string& file) +auto CreateCodecForType(StreamType type) -> cpp::result, CreateCodecError>; } // namespace codecs -- cgit v1.2.3