1 | /* $Id: RecordingScreenSettingsImpl.h 96407 2022-08-22 17:43:14Z vboxsync $ */
|
---|
2 |
|
---|
3 | /** @file
|
---|
4 | *
|
---|
5 | * VirtualBox COM class implementation - Recording settings of one virtual screen.
|
---|
6 | */
|
---|
7 |
|
---|
8 | /*
|
---|
9 | * Copyright (C) 2018-2022 Oracle and/or its affiliates.
|
---|
10 | *
|
---|
11 | * This file is part of VirtualBox base platform packages, as
|
---|
12 | * available from https://www.virtualbox.org.
|
---|
13 | *
|
---|
14 | * This program is free software; you can redistribute it and/or
|
---|
15 | * modify it under the terms of the GNU General Public License
|
---|
16 | * as published by the Free Software Foundation, in version 3 of the
|
---|
17 | * License.
|
---|
18 | *
|
---|
19 | * This program is distributed in the hope that it will be useful, but
|
---|
20 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
22 | * General Public License for more details.
|
---|
23 | *
|
---|
24 | * You should have received a copy of the GNU General Public License
|
---|
25 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
26 | *
|
---|
27 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
28 | */
|
---|
29 |
|
---|
30 | #ifndef MAIN_INCLUDED_RecordingScreenSettingsImpl_h
|
---|
31 | #define MAIN_INCLUDED_RecordingScreenSettingsImpl_h
|
---|
32 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
33 | # pragma once
|
---|
34 | #endif
|
---|
35 |
|
---|
36 | #include "RecordingScreenSettingsWrap.h"
|
---|
37 |
|
---|
38 | class RecordingSettings;
|
---|
39 |
|
---|
40 | namespace settings
|
---|
41 | {
|
---|
42 | struct RecordingScreenSettings;
|
---|
43 | }
|
---|
44 |
|
---|
45 | class ATL_NO_VTABLE RecordingScreenSettings :
|
---|
46 | public RecordingScreenSettingsWrap
|
---|
47 | {
|
---|
48 | public:
|
---|
49 |
|
---|
50 | DECLARE_COMMON_CLASS_METHODS(RecordingScreenSettings)
|
---|
51 |
|
---|
52 | HRESULT FinalConstruct();
|
---|
53 | void FinalRelease();
|
---|
54 |
|
---|
55 | // public initializer/uninitializer for internal purposes only
|
---|
56 | HRESULT init(RecordingSettings *aParent, uint32_t uScreenId, const settings::RecordingScreenSettings& aThat);
|
---|
57 | HRESULT init(RecordingSettings *aParent, RecordingScreenSettings *aThat);
|
---|
58 | HRESULT initCopy(RecordingSettings *aParent, RecordingScreenSettings *aThat);
|
---|
59 | void uninit(void);
|
---|
60 |
|
---|
61 | // public methods only for internal purposes
|
---|
62 | HRESULT i_loadSettings(const settings::RecordingScreenSettings &data);
|
---|
63 | HRESULT i_saveSettings(settings::RecordingScreenSettings &data);
|
---|
64 |
|
---|
65 | void i_rollback(void);
|
---|
66 | void i_commit(void);
|
---|
67 | void i_copyFrom(RecordingScreenSettings *aThat);
|
---|
68 | void i_applyDefaults(void);
|
---|
69 |
|
---|
70 | settings::RecordingScreenSettings &i_getData(void);
|
---|
71 |
|
---|
72 | int32_t i_reference(void);
|
---|
73 | int32_t i_release(void);
|
---|
74 | int32_t i_getReferences(void);
|
---|
75 |
|
---|
76 | private:
|
---|
77 |
|
---|
78 | // wrapped IRecordingScreenSettings methods
|
---|
79 | HRESULT isFeatureEnabled(RecordingFeature_T aFeature, BOOL *aEnabled);
|
---|
80 |
|
---|
81 | // wrapped IRecordingScreenSettings properties
|
---|
82 | HRESULT getId(ULONG *id);
|
---|
83 | HRESULT getEnabled(BOOL *enabled);
|
---|
84 | HRESULT setEnabled(BOOL enabled);
|
---|
85 | HRESULT getFeatures(std::vector<RecordingFeature_T> &aFeatures);
|
---|
86 | HRESULT setFeatures(const std::vector<RecordingFeature_T> &aFeatures);
|
---|
87 | HRESULT getDestination(RecordingDestination_T *aDestination);
|
---|
88 | HRESULT setDestination(RecordingDestination_T aDestination);
|
---|
89 |
|
---|
90 | HRESULT getFilename(com::Utf8Str &aFilename);
|
---|
91 | HRESULT setFilename(const com::Utf8Str &aFilename);
|
---|
92 | HRESULT getMaxTime(ULONG *aMaxTimeS);
|
---|
93 | HRESULT setMaxTime(ULONG aMaxTimeS);
|
---|
94 | HRESULT getMaxFileSize(ULONG *aMaxFileSizeMB);
|
---|
95 | HRESULT setMaxFileSize(ULONG aMaxFileSizeMB);
|
---|
96 | HRESULT getOptions(com::Utf8Str &aOptions);
|
---|
97 | HRESULT setOptions(const com::Utf8Str &aOptions);
|
---|
98 |
|
---|
99 | HRESULT getAudioCodec(RecordingAudioCodec_T *aCodec);
|
---|
100 | HRESULT setAudioCodec(RecordingAudioCodec_T aCodec);
|
---|
101 | HRESULT getAudioDeadline(RecordingCodecDeadline_T *aDeadline);
|
---|
102 | HRESULT setAudioDeadline(RecordingCodecDeadline_T aDeadline);
|
---|
103 | HRESULT getAudioRateControlMode(RecordingRateControlMode_T *aMode);
|
---|
104 | HRESULT setAudioRateControlMode(RecordingRateControlMode_T aMode);
|
---|
105 | HRESULT getAudioHz(ULONG *aHz);
|
---|
106 | HRESULT setAudioHz(ULONG aHz);
|
---|
107 | HRESULT getAudioBits(ULONG *aBits);
|
---|
108 | HRESULT setAudioBits(ULONG aBits);
|
---|
109 | HRESULT getAudioChannels(ULONG *aChannels);
|
---|
110 | HRESULT setAudioChannels(ULONG aChannels);
|
---|
111 |
|
---|
112 | HRESULT getVideoCodec(RecordingVideoCodec_T *aCodec);
|
---|
113 | HRESULT setVideoCodec(RecordingVideoCodec_T aCodec);
|
---|
114 | HRESULT getVideoDeadline(RecordingCodecDeadline_T *aDeadline);
|
---|
115 | HRESULT setVideoDeadline(RecordingCodecDeadline_T aDeadline);
|
---|
116 | HRESULT getVideoWidth(ULONG *aVideoWidth);
|
---|
117 | HRESULT setVideoWidth(ULONG aVideoWidth);
|
---|
118 | HRESULT getVideoHeight(ULONG *aVideoHeight);
|
---|
119 | HRESULT setVideoHeight(ULONG aVideoHeight);
|
---|
120 | HRESULT getVideoRate(ULONG *aVideoRate);
|
---|
121 | HRESULT setVideoRate(ULONG aVideoRate);
|
---|
122 | HRESULT getVideoRateControlMode(RecordingRateControlMode_T *aMode);
|
---|
123 | HRESULT setVideoRateControlMode(RecordingRateControlMode_T aMode);
|
---|
124 | HRESULT getVideoFPS(ULONG *aVideoFPS);
|
---|
125 | HRESULT setVideoFPS(ULONG aVideoFPS);
|
---|
126 | HRESULT getVideoScalingMode(RecordingVideoScalingMode_T *aMode);
|
---|
127 | HRESULT setVideoScalingMode(RecordingVideoScalingMode_T aMode);
|
---|
128 |
|
---|
129 | private:
|
---|
130 |
|
---|
131 | // internal methods
|
---|
132 | int i_initInternal();
|
---|
133 |
|
---|
134 | private:
|
---|
135 |
|
---|
136 | struct Data;
|
---|
137 | Data *m;
|
---|
138 | };
|
---|
139 |
|
---|
140 | #endif /* !MAIN_INCLUDED_RecordingScreenSettingsImpl_h */
|
---|
141 |
|
---|