-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInputFile.h
More file actions
57 lines (50 loc) · 1.47 KB
/
InputFile.h
File metadata and controls
57 lines (50 loc) · 1.47 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
48
49
50
51
52
53
54
55
56
#pragma once
#include<utility>
#include<vector>
/*
定义一些常量.
也许我应该用 enum 来实现.
*/
constexpr short H264 = 0;
constexpr short H265 = 1;
constexpr short PASS2 = 0;
constexpr short CRF = 1;
constexpr short VBR = 2;
constexpr int CODED = 0;
constexpr int READY = 1;
constexpr int CODING = 2;
constexpr short MULTI_VALUE = -1;
/*
InputFile 类
对应列表中的项目, 存储文件名、转码参数等.
注: 这也用于暂存变量与预设的存储.
*/
class InputFile
{
private:
CString path,dir;
int vb, ab, format, code, crf;
short cut, acopy, vcopy, ready = READY;
std::pair<int, int> range;
public:
InputFile(CString path, int format, int code, int vb, int ab, bool vcopy, bool acopy);
InputFile(CString path, InputFile settings);
std::vector<CString> translate(CString outputPath = L"");
int setVideoBitrate(int vb);
int getVideoBitrate();
int setAudioBitrate(int ab);
int getStatus();
int setStatus(int status);
bool setCut(bool cut);
int setCode(int code);
int setFormat(int format);
bool setCopyVideoStream(bool vcopy);
bool setCopyAudioStream(bool acopy);
CString getPath();
std::vector<int> getData();
bool setData(std::vector<int> data, bool writeNegativeOne = true);
bool setData(InputFile data, bool writeNegativeOne = true, bool overrideCRFOrVB=false);
std::pair<int, int> setCutRange(int start, int end);
std::pair<int, int> setCutRange(std::pair<int, int> range);
std::vector<CString> getItemInfo();
};