parent
42c387807f
commit
b92ed7f34f
@ -0,0 +1,4 @@ |
|||||||
|
idf_component_register(INCLUDE_DIRS "include") |
||||||
|
|
||||||
|
#target_compile_options(${COMPONENT_LIB} PRIVATE ${EXTRA_WARNINGS}) |
||||||
|
add_dependencies("${COMPONENT_LIB}" libmad) |
@ -1,29 +0,0 @@ |
|||||||
#pragma once |
|
||||||
|
|
||||||
#include <cstddef> |
|
||||||
#include <cstdint> |
|
||||||
|
|
||||||
#include "result.hpp" |
|
||||||
|
|
||||||
namespace codecs { |
|
||||||
|
|
||||||
enum CreateCodecError {}; |
|
||||||
|
|
||||||
auto CreateCodecForExtension(std::string extension) -> cpp::result<std::unique_ptr<ICodec>, CreateCodecError>; |
|
||||||
|
|
||||||
class ICodec { |
|
||||||
public: |
|
||||||
virtual ~ICodec() {} |
|
||||||
|
|
||||||
virtual auto CanHandleExtension(std::string extension) -> bool = 0; |
|
||||||
|
|
||||||
enum Error {}; |
|
||||||
|
|
||||||
virtual auto Process( |
|
||||||
uint8_t *input, |
|
||||||
std::size_t input_len, |
|
||||||
uint8_t *output, |
|
||||||
std::size_t output_length) -> cpp::result<size_t, Error> = 0; |
|
||||||
}; |
|
||||||
|
|
||||||
} // namespace codecs
|
|
Loading…
Reference in new issue