-
Notifications
You must be signed in to change notification settings - Fork 0
/
KEncoder.h
44 lines (35 loc) · 688 Bytes
/
KEncoder.h
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
#ifndef K_ENCODER_H_
#define K_ENCODER_H_
#include "getopt.h"
#include "InputParameter.h"
#include "KErrors.h"
#include "stdint.h"
extern "C"
{
#include "libavformat/avformat.h"
}
class KEncoder
{
public:
KEncoder();
~KEncoder();
KErrors configure(InputParameter *pParameter);
KErrors start();
private:
void readYUV420PToAVFrame();
void readYUVData(int color);
char* mInputFileName;
char* mOutputFileName;
int mBitRate;
int mFrameRate;
int mFrameCount;
int mWidth;
int mHeight;
FILE *pFileIn;
FILE *pFileOut;
AVCodec *mCodec;
AVCodecContext *mCodecCtx;
AVFrame *mFrame;
AVPacket mPacket;
};
#endif