-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathVideoEncoder.hpp
More file actions
35 lines (26 loc) · 978 Bytes
/
VideoEncoder.hpp
File metadata and controls
35 lines (26 loc) · 978 Bytes
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
#ifndef _AV_TRANSCODER_ENCODER_VIDEO_ENCODER_HPP_
#define _AV_TRANSCODER_ENCODER_VIDEO_ENCODER_HPP_
#include <AvTranscoder/encoder/IEncoder.hpp>
#include <AvTranscoder/codec/VideoCodec.hpp>
#include <AvTranscoder/profile/ProfileLoader.hpp>
namespace avtranscoder
{
class AvExport VideoEncoder : public IEncoder
{
public:
VideoEncoder(const std::string& videoCodecName);
~VideoEncoder();
void setupVideoEncoder(const VideoFrameDesc& frameDesc,
const ProfileLoader::Profile& profile = ProfileLoader::Profile());
void setupEncoder(const ProfileLoader::Profile& profile = ProfileLoader::Profile());
bool encodeFrame(const IFrame& sourceFrame, CodedData& codedFrame);
bool encodeFrame(CodedData& codedFrame);
ICodec& getCodec() { return _codec; }
VideoCodec& getVideoCodec() { return _codec; }
private:
bool encode(const AVFrame* decodedData, AVPacket& encodedData);
private:
VideoCodec _codec;
};
}
#endif