-
Notifications
You must be signed in to change notification settings - Fork 4
/
Profile.h
180 lines (156 loc) · 7.42 KB
/
Profile.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
/** This file is part of The Standard Mpeg Encoder.
The Standard Mpeg Encoder is free software: you can redistribute it
and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
The Standard Mpeg Encoder is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with The Standard Mpeg Encoder.
If not, see <http://www.gnu.org/licenses/>.
**/
// Profile.h: interface for the CMPEGProfile class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_PROFILE_H__87AAFACA_50FA_4C48_BCCD_FF8006D1EC47__INCLUDED_)
#define AFX_PROFILE_H__87AAFACA_50FA_4C48_BCCD_FF8006D1EC47__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// change this to point at the same file in your install dirextory
#include "libraries/erdmpglib/erdmpglib.h"
class CMPEGProfile;
class CMPEGMultiplexProfile : public CUnknown, public IStandardMpegMultiplexerProfile
{
public:
DECLARE_IUNKNOWN
CMPEGMultiplexProfile();
virtual ~CMPEGMultiplexProfile();
// multiplex
STDMETHODIMP SetDeleteElementaryStreams(BOOL bDelete);
STDMETHODIMP GetDeleteElementaryStreams(BOOL * bDelete);
STDMETHODIMP SetMultiplexRate(long nRate);
STDMETHODIMP GetMultiplexRate(long * pnMux);
STDMETHODIMP SetMultiplexPacketSize(long nSize);
STDMETHODIMP GetMultiplexPacketSize(long * pnSize);
STDMETHODIMP SetMultiplexPreload(float fPreload);
STDMETHODIMP SetMultiplexMaxDelay(float fMaxDelay);
STDMETHODIMP GetMultiplexPreload(float * pfMaxDelay);
STDMETHODIMP SetMultiplexStreams(BOOL bMux);
STDMETHODIMP GetMultiplexStreams(BOOL * bMux);
STDMETHODIMP SetMultiplexFormat(SystemsOutputFormat format);
STDMETHODIMP GetMultiplexFormat(SystemsOutputFormat *format);
STDMETHODIMP AddMultiplexFile(BSTR strPath);
STDMETHODIMP SetOnFlyMultiplex(BOOL bOnFlyMultiplex);
STDMETHODIMP GetOnFlyMultiplex(BOOL * pbOnFlyMultiplex);
STDMETHODIMP SetMultiplexFrameBalance(BOOL bVal);
STDMETHODIMP SetMultiplexOnStop(BOOL bVal);
STDMETHODIMP GetMultiplexProgress(double* dProgress);
public:
EncodeParameters* m_pEncodeParameters;
};
class CMPEGProfile : public CUnknown,
public IStandardMpegEncoderProfile
{
public:
friend class CMPEGObj;
DECLARE_IUNKNOWN
CMPEGProfile();
virtual ~CMPEGProfile();
STDMETHODIMP SetAudioBitrateMin(long nBitrate);
STDMETHODIMP GetAudioBitrateMin(long * nBitrate);
STDMETHODIMP SetAudioBitrateMax(long nBitrate);
STDMETHODIMP GetAudioBitrateMax(long * nBitrate);
STDMETHODIMP ConfigureForSystemsFormat(SystemsOutputFormat systemsFormat, Constraint constraint);
STDMETHODIMP SaveProfile(BSTR strKey);
STDMETHODIMP LoadProfile(BSTR strKey);
STDMETHODIMP GetProfileName(BSTR* strName);
STDMETHODIMP GetHeight(long * pnHeight);
STDMETHODIMP SetHeight(long nHeight);
STDMETHODIMP SetFramerate(double fps);
STDMETHODIMP GetFramerate(double* fps);
STDMETHODIMP SetWidth(long nWidth);
STDMETHODIMP GetWidth(long* nWidth);
STDMETHODIMP SetVideoBitrate(long nBitrate);
STDMETHODIMP GetVideoBitrate(long * nBitrate);
STDMETHODIMP SetAudioBitrate(long nBitrate);
STDMETHODIMP GetAudioBitrate(long * nBitrate);
STDMETHODIMP SetVideoQuality(long nQualityPercent);
STDMETHODIMP GetVideoQuality(long * nQualityPercent);
STDMETHODIMP SetVideoVBRMode( BitrateMode vbrMode);
STDMETHODIMP GetVideoVBRMode(BitrateMode * pvbrMode);
STDMETHODIMP SetVideoVBVBufferSize( long vbvlen);
STDMETHODIMP GetVideoVBVBufferSize(long * vbvlen);
STDMETHODIMP SetAudioVBRMode( BitrateMode vbrMode);
STDMETHODIMP GetAudioVBRMode(BitrateMode * vbrMode);
STDMETHODIMP SetGOPStructure(BSTR strStructure);
STDMETHODIMP GetGOPStructure(BSTR* pstrStructure);
STDMETHODIMP SetAudioSampleRate(long nSampleRate); // Valid values are 44100, 48000, 32000 ONLY!
STDMETHODIMP GetAudioSampleRate(long * pnSampleRate);
STDMETHODIMP SetAudioChannels(long nChannelCount); // Valid values are 44100, 48000, 32000 ONLY!
STDMETHODIMP GetAudioChannels(long * pnChannelCount);
STDMETHODIMP SetAudioFlags(BOOL bErrorProtection, BOOL bOriginal, BOOL bCopyright, BOOL bPrivate);
STDMETHODIMP SetEncodeMode(EncodeMode nValue);
STDMETHODIMP GetEncodeMode(EncodeMode * pnValue);
STDMETHODIMP SetAudioFormat(AudioOutputFormat audioFormat);
STDMETHODIMP GetAudioFormat(AudioOutputFormat * audioFormat);
STDMETHODIMP SetVideoFormat(VideoOutputFormat audioFormat);
STDMETHODIMP GetVideoFormat(VideoOutputFormat * audioFormat);
STDMETHODIMP SetSystemsFormat(SystemsOutputFormat systemsFormat);
STDMETHODIMP GetSystemsFormat(SystemsOutputFormat * systemsFormat);
STDMETHODIMP SetAspectRatio(AspectRatio mode);
STDMETHODIMP GetAspectRatio(AspectRatio * pmode);
STDMETHODIMP SetProfileAndLevel(BSTR strProfileAndLevel);
STDMETHODIMP GetProfileAndLevel(BSTR * pstrProfileAndLevel);
STDMETHODIMP SetMotionSearchPrecision(long nVal);
STDMETHODIMP GetMotionSearchPrecision(long * nVal);
STDMETHODIMP SetDetectSceneChange(BOOL bVal);
STDMETHODIMP GetDetectSceneChange(BOOL * nVal);
STDMETHODIMP SetSceneChangeThreshold(float f);
STDMETHODIMP SetClosedGOP(BOOL bVal);
STDMETHODIMP GetClosedGOP(BOOL * nVal);
STDMETHODIMP SetOutputIntervalOfSequenceHeader(long nVal);
STDMETHODIMP GetOutputIntervalOfSequenceHeader(long * nVal);
STDMETHODIMP SetComments(BSTR strVal);
STDMETHODIMP SetInformation(BSTR strTitle, BSTR strAuthor, BSTR strCopyright);
STDMETHODIMP SetVideoQualityRange(long nMin, long nMax);
STDMETHODIMP SetQuantBias(long nIntra, long nInter);
STDMETHODIMP SetIDCT(long n);
STDMETHODIMP SetStrictGOP(BOOL bVal);
STDMETHODIMP SetGOPSize(long nGOPSize);
STDMETHODIMP GetGOPSize(long * nGOPSize);
STDMETHODIMP Set2PassLogFile(BSTR Path);
STDMETHODIMP SetBWVideo(BOOL bVal);
STDMETHODIMP SetQuantFactor(float fQuantFactor);
STDMETHODIMP GetQuantFactor(float * pfQuantFactor);
STDMETHODIMP SetVideoBitrateMin(long nBitrate);
STDMETHODIMP GetVideoBitrateMin(long * nBitrate);
STDMETHODIMP SetVideoBitrateMax(long nBitrate);
STDMETHODIMP GetVideoBitrateMax(long * nBitrate);
STDMETHODIMP SetConstraint(Constraint systemsConstraint);
STDMETHODIMP GetConstraint(Constraint * systemsConstraint);
STDMETHODIMP SetProfileName(BSTR strName);
STDMETHODIMP SetAutoSelectBitrate(BOOL bVal);
STDMETHODIMP GetAutoSelectBitrate(BOOL * pbVal);
STDMETHODIMP SetAutoSelectDimensions(BOOL bVal);
STDMETHODIMP GetAutoSelectDimensions(BOOL * pbVal);
STDMETHODIMP SetInterlaceMode(BOOL bPreProcessDeinterlace, BOOL bInterlacedOutputDCT, BOOL bInterlacedOutputME);
STDMETHODIMP GetInterlaceMode(BOOL * bPreProcessDeinterlace, BOOL * bInterlacedOutputDCT, BOOL * bInterlacedOutputME);
EncodeParameters& GetEncodeParameters() {
return m_EncodeParameters;
}
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void ** ppv);
CMPEGMultiplexProfile* GetMuxProfile() {return m_pMuxProfile;}
private:
BOOL IsFrameRateSupported(double dFPS);
void SetFixed(BOOL bFixed);
private:
CMPEGObj* m_pObj;
CMPEGMultiplexProfile* m_pMuxProfile;
CComBSTR m_strProfileName;
BOOL m_bFixed;
EncodeParameters m_EncodeParameters;
};
#endif // !defined(AFX_PROFILE_H__87AAFACA_50FA_4C48_BCCD_FF8006D1EC47__INCLUDED_)