forked from avTranscoder/avTranscoder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIEncoder.hpp
More file actions
47 lines (38 loc) · 1.19 KB
/
Copy pathIEncoder.hpp
File metadata and controls
47 lines (38 loc) · 1.19 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
40
41
42
43
44
45
46
47
#ifndef _AV_TRANSCODER_ESSENCE_STREAM_IENCODER_HPP_
#define _AV_TRANSCODER_ESSENCE_STREAM_IENCODER_HPP_
#include <AvTranscoder/frame/Frame.hpp>
#include <AvTranscoder/codec/ICodec.hpp>
#include <AvTranscoder/profile/ProfileLoader.hpp>
namespace avtranscoder
{
class AvExport IEncoder
{
public:
virtual ~IEncoder() {}
/**
* @brief Setup the encoder
* @param profile: set encoder parameters from the given profile
* @note Open the encoder.
*/
virtual void setupEncoder( const ProfileLoader::Profile& profile = ProfileLoader::Profile() ) = 0;
/**
* @brief Encode a new frame, and get coded frame
* @param sourceFrame frame need to be encoded
* @param codedFrame data of the coded frame if present (first frames can be delayed)
* @return status of encoding
*/
virtual bool encodeFrame( const Frame& sourceFrame, Frame& codedFrame ) = 0;
/**
* @brief Get delayed encoded frames
* @param codedFrame data of the coded frame if present (first frames can be delayed)
* @return status of encoding
*/
virtual bool encodeFrame( Frame& codedFrame ) = 0;
/**
* @brief Get codec used for encoding.
* @return a reference to the codec
*/
virtual ICodec& getCodec() = 0;
};
}
#endif