VirtualBox

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

Last change on this file since 95639 was 95639, checked in by vboxsync, 3 years ago

Recording: Settings handling fixes / overhaul. This adds the ability to handle per-screen settings, which can be different from the first screen (screen 0). Also fixed a couple of bugs regarding snapshot handling and persistence (committing, rolling back, ++) in that area. FE/VBoxManage now can also list the per-screen settings. Added some further @todos. bugref:9286

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.1 KB
Line 
1/* $Id: RecordingScreenSettingsImpl.h 95639 2022-07-14 08:30:45Z 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
62private:
63
64 // wrapped IRecordingScreenSettings methods
65 HRESULT isFeatureEnabled(RecordingFeature_T aFeature, BOOL *aEnabled);
66
67 // wrapped IRecordingScreenSettings properties
68 HRESULT getId(ULONG *id);
69 HRESULT getEnabled(BOOL *enabled);
70 HRESULT setEnabled(BOOL enabled);
71 HRESULT getFeatures(ULONG *aFeatures);
72 HRESULT setFeatures(ULONG aFeatures);
73 HRESULT getDestination(RecordingDestination_T *aDestination);
74 HRESULT setDestination(RecordingDestination_T aDestination);
75
76 HRESULT getFilename(com::Utf8Str &aFilename);
77 HRESULT setFilename(const com::Utf8Str &aFilename);
78 HRESULT getMaxTime(ULONG *aMaxTimeS);
79 HRESULT setMaxTime(ULONG aMaxTimeS);
80 HRESULT getMaxFileSize(ULONG *aMaxFileSizeMB);
81 HRESULT setMaxFileSize(ULONG aMaxFileSizeMB);
82 HRESULT getOptions(com::Utf8Str &aOptions);
83 HRESULT setOptions(const com::Utf8Str &aOptions);
84
85 HRESULT getAudioCodec(RecordingAudioCodec_T *aCodec);
86 HRESULT setAudioCodec(RecordingAudioCodec_T aCodec);
87 HRESULT getAudioHz(ULONG *aHz);
88 HRESULT setAudioHz(ULONG aHz);
89 HRESULT getAudioBits(ULONG *aBits);
90 HRESULT setAudioBits(ULONG aBits);
91 HRESULT getAudioChannels(ULONG *aChannels);
92 HRESULT setAudioChannels(ULONG aChannels);
93
94 HRESULT getVideoCodec(RecordingVideoCodec_T *aCodec);
95 HRESULT setVideoCodec(RecordingVideoCodec_T aCodec);
96 HRESULT getVideoWidth(ULONG *aVideoWidth);
97 HRESULT setVideoWidth(ULONG aVideoWidth);
98 HRESULT getVideoHeight(ULONG *aVideoHeight);
99 HRESULT setVideoHeight(ULONG aVideoHeight);
100 HRESULT getVideoRate(ULONG *aVideoRate);
101 HRESULT setVideoRate(ULONG aVideoRate);
102 HRESULT getVideoRateControlMode(RecordingVideoRateControlMode_T *aMode);
103 HRESULT setVideoRateControlMode(RecordingVideoRateControlMode_T aMode);
104 HRESULT getVideoFPS(ULONG *aVideoFPS);
105 HRESULT setVideoFPS(ULONG aVideoFPS);
106 HRESULT getVideoScalingMethod(RecordingVideoScalingMethod_T *aMode);
107 HRESULT setVideoScalingMethod(RecordingVideoScalingMethod_T aMode);
108
109private:
110
111 // internal methods
112 int i_initInternal();
113
114private:
115
116 static int i_parseOptionsString(const com::Utf8Str &strOptions, settings::RecordingScreenSettings &screenSettings);
117
118private:
119
120 struct Data;
121 Data *m;
122};
123
124#endif /* !MAIN_INCLUDED_RecordingScreenSettingsImpl_h */
125
Note: See TracBrowser for help on using the repository browser.

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