VirtualBox

source: vbox/trunk/src/VBox/Main/include/RecordingScreenSettingsImpl.h@ 95714

Last change on this file since 95714 was 95714, checked in by vboxsync, 2 years ago

Recording/Main: Object sharing fixes for the per-screen settings by using an internal refcount. This is needed as a peer object could share the same per-screen object when saving / committing settings. bugref:9286

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.2 KB
Line 
1/* $Id: RecordingScreenSettingsImpl.h 95714 2022-07-18 16:13:16Z 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
28class RecordingSettings;
29
30namespace settings
31{
32 struct RecordingScreenSettings;
33}
34
35class ATL_NO_VTABLE RecordingScreenSettings :
36 public RecordingScreenSettingsWrap
37{
38public:
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
66private:
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(ULONG *aFeatures);
76 HRESULT setFeatures(ULONG 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 getAudioHz(ULONG *aHz);
92 HRESULT setAudioHz(ULONG aHz);
93 HRESULT getAudioBits(ULONG *aBits);
94 HRESULT setAudioBits(ULONG aBits);
95 HRESULT getAudioChannels(ULONG *aChannels);
96 HRESULT setAudioChannels(ULONG aChannels);
97
98 HRESULT getVideoCodec(RecordingVideoCodec_T *aCodec);
99 HRESULT setVideoCodec(RecordingVideoCodec_T aCodec);
100 HRESULT getVideoWidth(ULONG *aVideoWidth);
101 HRESULT setVideoWidth(ULONG aVideoWidth);
102 HRESULT getVideoHeight(ULONG *aVideoHeight);
103 HRESULT setVideoHeight(ULONG aVideoHeight);
104 HRESULT getVideoRate(ULONG *aVideoRate);
105 HRESULT setVideoRate(ULONG aVideoRate);
106 HRESULT getVideoRateControlMode(RecordingVideoRateControlMode_T *aMode);
107 HRESULT setVideoRateControlMode(RecordingVideoRateControlMode_T aMode);
108 HRESULT getVideoFPS(ULONG *aVideoFPS);
109 HRESULT setVideoFPS(ULONG aVideoFPS);
110 HRESULT getVideoScalingMethod(RecordingVideoScalingMethod_T *aMode);
111 HRESULT setVideoScalingMethod(RecordingVideoScalingMethod_T aMode);
112
113private:
114
115 // internal methods
116 int i_initInternal();
117
118private:
119
120 static int i_parseOptionsString(const com::Utf8Str &strOptions, settings::RecordingScreenSettings &screenSettings);
121
122private:
123
124 struct Data;
125 Data *m;
126};
127
128#endif /* !MAIN_INCLUDED_RecordingScreenSettingsImpl_h */
129
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette