1 | /* $Id: RecordingScreenSettingsImpl.h 76487 2018-12-27 03:31:39Z vboxsync $ */
|
---|
2 |
|
---|
3 | /** @file
|
---|
4 | *
|
---|
5 | * VirtualBox COM class implementation - Recording settings of one virtual screen.
|
---|
6 | */
|
---|
7 |
|
---|
8 | /*
|
---|
9 | * Copyright (C) 2018 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 ____H_RecordingScreenSettings
|
---|
21 | #define ____H_RecordingScreenSettings
|
---|
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_EMPTY_CTOR_DTOR(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& data);
|
---|
47 | HRESULT init(RecordingSettings *aParent, RecordingScreenSettings *that);
|
---|
48 | HRESULT initCopy(RecordingSettings *aParent, RecordingScreenSettings *that);
|
---|
49 | void uninit();
|
---|
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();
|
---|
56 | void i_commit();
|
---|
57 | void i_copyFrom(RecordingScreenSettings *aThat);
|
---|
58 | void i_applyDefaults();
|
---|
59 |
|
---|
60 | private:
|
---|
61 |
|
---|
62 | // wrapped IRecordingScreenSettings methods
|
---|
63 | HRESULT isFeatureEnabled(RecordingFeature_T aFeature, BOOL *aEnabled);
|
---|
64 |
|
---|
65 | // wrapped IRecordingScreenSettings properties
|
---|
66 | HRESULT getId(ULONG *id);
|
---|
67 | HRESULT getEnabled(BOOL *enabled);
|
---|
68 | HRESULT setEnabled(BOOL enabled);
|
---|
69 | HRESULT getFeatures(ULONG *aFeatures);
|
---|
70 | HRESULT setFeatures(ULONG aFeatures);
|
---|
71 | HRESULT getDestination(RecordingDestination_T *aDestination);
|
---|
72 | HRESULT setDestination(RecordingDestination_T aDestination);
|
---|
73 |
|
---|
74 | HRESULT getFilename(com::Utf8Str &aFilename);
|
---|
75 | HRESULT setFilename(const com::Utf8Str &aFilename);
|
---|
76 | HRESULT getMaxTime(ULONG *aMaxTimeS);
|
---|
77 | HRESULT setMaxTime(ULONG aMaxTimeS);
|
---|
78 | HRESULT getMaxFileSize(ULONG *aMaxFileSizeMB);
|
---|
79 | HRESULT setMaxFileSize(ULONG aMaxFileSizeMB);
|
---|
80 | HRESULT getOptions(com::Utf8Str &aOptions);
|
---|
81 | HRESULT setOptions(const com::Utf8Str &aOptions);
|
---|
82 |
|
---|
83 | HRESULT getAudioCodec(RecordingAudioCodec_T *aCodec);
|
---|
84 | HRESULT setAudioCodec(RecordingAudioCodec_T aCodec);
|
---|
85 | HRESULT getAudioHz(ULONG *aHz);
|
---|
86 | HRESULT setAudioHz(ULONG aHz);
|
---|
87 | HRESULT getAudioBits(ULONG *aBits);
|
---|
88 | HRESULT setAudioBits(ULONG aBits);
|
---|
89 | HRESULT getAudioChannels(ULONG *aChannels);
|
---|
90 | HRESULT setAudioChannels(ULONG aChannels);
|
---|
91 |
|
---|
92 | HRESULT getVideoCodec(RecordingVideoCodec_T *aCodec);
|
---|
93 | HRESULT setVideoCodec(RecordingVideoCodec_T aCodec);
|
---|
94 | HRESULT getVideoWidth(ULONG *aVideoWidth);
|
---|
95 | HRESULT setVideoWidth(ULONG aVideoWidth);
|
---|
96 | HRESULT getVideoHeight(ULONG *aVideoHeight);
|
---|
97 | HRESULT setVideoHeight(ULONG aVideoHeight);
|
---|
98 | HRESULT getVideoRate(ULONG *aVideoRate);
|
---|
99 | HRESULT setVideoRate(ULONG aVideoRate);
|
---|
100 | HRESULT getVideoRateControlMode(RecordingVideoRateControlMode_T *aMode);
|
---|
101 | HRESULT setVideoRateControlMode(RecordingVideoRateControlMode_T aMode);
|
---|
102 | HRESULT getVideoFPS(ULONG *aVideoFPS);
|
---|
103 | HRESULT setVideoFPS(ULONG aVideoFPS);
|
---|
104 | HRESULT getVideoScalingMethod(RecordingVideoScalingMethod_T *aMode);
|
---|
105 | HRESULT setVideoScalingMethod(RecordingVideoScalingMethod_T aMode);
|
---|
106 |
|
---|
107 | private:
|
---|
108 |
|
---|
109 | // internal methods
|
---|
110 | int i_initInternal();
|
---|
111 |
|
---|
112 | private:
|
---|
113 |
|
---|
114 | static int i_parseOptionsString(const com::Utf8Str &strOptions, settings::RecordingScreenSettings &screenSettings);
|
---|
115 |
|
---|
116 | private:
|
---|
117 |
|
---|
118 | struct Data;
|
---|
119 | Data *m;
|
---|
120 | };
|
---|
121 |
|
---|
122 | #endif // ____H_RecordingScreenSettings
|
---|
123 |
|
---|