forked from avTranscoder/avTranscoder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVideoGenerator.hpp
More file actions
39 lines (31 loc) · 1.35 KB
/
Copy pathVideoGenerator.hpp
File metadata and controls
39 lines (31 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef _AV_TRANSCODER_DECODER_VIDEO_GENERATOR_HPP_
#define _AV_TRANSCODER_DECODER_VIDEO_GENERATOR_HPP_
#include "IDecoder.hpp"
#include <AvTranscoder/codec/VideoCodec.hpp>
#include <AvTranscoder/transform/VideoTransform.hpp>
namespace avtranscoder
{
class AvExport VideoGenerator : public IDecoder
{
private:
VideoGenerator(const VideoGenerator& videoGenerator);
VideoGenerator& operator=(const VideoGenerator& videoGenerator);
public:
VideoGenerator(const VideoFrameDesc& frameDesc);
~VideoGenerator();
bool decodeNextFrame(IFrame& frameBuffer);
bool decodeNextFrame(IFrame& frameBuffer, const std::vector<size_t> channelIndexArray);
/**
* @brief Force to return this frame when calling the decoding methods.
* @param inputFrame: could have other properties than the given frame when decoding (will be converted).
* @see decodeNextFrame
*/
void setNextFrame(IFrame& inputFrame) { _inputFrame = &inputFrame; }
private:
IFrame* _inputFrame; ///< A frame given from outside (has link, no ownership)
VideoFrame* _blackImage; ///< The generated RGB black image (has ownership)
const VideoFrameDesc _frameDesc; ///< The description of the given frame buffer when decoding.
VideoTransform _videoTransform; ///< To transform data of the back image to the given Frame when decoding.
};
}
#endif