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