libpromeki 1.0.0-alpha
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
nvdecvideodecoder.h
Go to the documentation of this file.
1
8#pragma once
9
10
11#include <promeki/config.h>
12#if PROMEKI_ENABLE_NVDEC
13#include <promeki/namespace.h>
16#include <promeki/frame.h>
17#include <promeki/uniqueptr.h>
18
19#if PROMEKI_ENABLE_PROAV
20PROMEKI_NAMESPACE_BEGIN
21
84class NvdecVideoDecoder : public VideoDecoder {
85 public:
87 enum Codec {
88 Codec_H264,
89 Codec_HEVC
90 };
91
96 explicit NvdecVideoDecoder(Codec codec);
97
99 ~NvdecVideoDecoder() override;
100
106 static List<int> supportedOutputList();
107
128 static MediaIOAllocator::Ptr makeDeviceResidentAllocator();
129
130 void onConfigure(const MediaConfig &config) override;
131 Error submitFrame(const Frame &frame) override;
132 Frame receiveFrame() override;
133 Error flush() override;
134 Error reset() override;
135
136 private:
137 class Impl;
138 using ImplPtr = UniquePtr<Impl>;
139 ImplPtr _impl;
140 Codec _codec;
141};
142
143PROMEKI_NAMESPACE_END
144
145#endif // PROMEKI_ENABLE_NVDEC
146#endif // PROMEKI_ENABLE_PROAV