Changeset 75313 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- Nov 7, 2018 5:13:56 PM (6 years ago)
- Location:
- trunk/src/VBox/Main/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/CaptureScreenSettingsImpl.h
r75307 r75313 102 102 103 103 // internal methods 104 bool i_canChangeSettings();105 104 int i_getDefaultFileName(Utf8Str &strFile); 106 105 int i_initInternal(); -
trunk/src/VBox/Main/include/VideoRec.h
r75307 r75313 29 29 #include "VideoRecInternals.h" 30 30 #include "VideoRecStream.h" 31 32 #if 033 /**34 * Enumeration for definining a video / audio35 * profile setting.36 */37 typedef enum VIDEORECPROFILE38 {39 VIDEORECPROFILE_NONE = 0,40 VIDEORECPROFILE_LOW,41 VIDEORECPROFILE_MEDIUM,42 VIDEORECPROFILE_HIGH,43 VIDEORECPROFILE_BEST,44 VIDEORECPROFILE_REALTIME45 } VIDEORECPROFILE;46 47 /** Stores video recording features. */48 typedef uint32_t VIDEORECFEATURES;49 50 /** Video recording is disabled completely. */51 #define VIDEORECFEATURE_NONE 052 /** Capturing video is enabled. */53 #define VIDEORECFEATURE_VIDEO RT_BIT(0)54 /** Capturing audio is enabled. */55 #define VIDEORECFEATURE_AUDIO RT_BIT(1)56 57 /**58 * Structure for keeping a screen recording configuration.59 */60 typedef struct VIDEORECSCREENCFG61 {62 VIDEORECSCREENCFG(void)63 : enmDst(VIDEORECDEST_INVALID)64 , uMaxTimeS(0)65 {66 #ifdef VBOX_WITH_AUDIO_VIDEOREC67 RT_ZERO(Audio);68 #endif69 RT_ZERO(Video);70 }71 72 VIDEORECSCREENCFG& operator=(const VIDEORECSCREENCFG &that)73 {74 enmDst = that.enmDst;75 76 File.strName = that.File.strName;77 File.uMaxSizeMB = that.File.uMaxSizeMB;78 #ifdef VBOX_WITH_AUDIO_VIDEOREC79 Audio = that.Audio;80 #endif81 Video = that.Video;82 uMaxTimeS = that.uMaxTimeS;83 return *this;84 }85 86 unsigned long uScreenId;87 /** Destination where to write the stream to. */88 VIDEORECDEST enmDst;89 90 /**91 * Structure for keeping recording parameters if92 * destination is a file.93 */94 struct95 {96 /** File name (as absolute path). */97 com::Bstr strName;98 /** Maximum file size (in MB) to record. */99 uint32_t uMaxSizeMB;100 } File;101 102 #ifdef VBOX_WITH_AUDIO_VIDEOREC103 /**104 * Structure for keeping the audio recording parameters.105 */106 struct107 {108 /** Whether audio recording is enabled or not. */109 bool fEnabled;110 /** The device LUN the audio driver is attached / configured to. */111 unsigned uLUN;112 /** Hertz (Hz) rate. */113 uint16_t uHz;114 /** Bits per sample. */115 uint8_t cBits;116 /** Number of audio channels. */117 uint8_t cChannels;118 /** Audio profile which is being used. */119 VIDEORECPROFILE enmProfile;120 } Audio;121 #endif122 123 /**124 * Structure for keeping the video recording parameters.125 */126 struct127 {128 /** Whether video recording is enabled or not. */129 bool fEnabled;130 /** Target width (in pixels). */131 uint32_t uWidth;132 /** Target height (in pixels). */133 uint32_t uHeight;134 /** Target encoding rate. */135 uint32_t uRate;136 /** Target FPS. */137 uint32_t uFPS;138 139 #ifdef VBOX_WITH_LIBVPX140 union141 {142 struct143 {144 /** Encoder deadline. */145 unsigned int uEncoderDeadline;146 } VPX;147 } Codec;148 #endif149 150 } Video;151 152 /** Maximum time (in s) to record.153 * Specify 0 to disable this check. */154 uint32_t uMaxTimeS;155 } VIDEORECSCREENCFG, *PVIDEORECSCREENCFG;156 #endif157 31 158 32 class Console; … … 212 86 protected: 213 87 88 /** 89 * Enumeration for a recording context state. 90 */ 91 enum VIDEORECSTS 92 { 93 /** Context not initialized. */ 94 VIDEORECSTS_UNINITIALIZED = 0, 95 /** Context was created. */ 96 VIDEORECSTS_CREATED = 1, 97 /** Context was started. */ 98 VIDEORECSTS_STARTED = 2, 99 /** The usual 32-bit hack. */ 100 VIDEORECSTS_32BIT_HACK = 0x7fffffff 101 }; 102 214 103 /** Pointer to the console object. */ 215 104 Console *pConsole; … … 217 106 settings::CaptureSettings Settings; 218 107 /** The current state. */ 219 uint32_tenmState;108 VIDEORECSTS enmState; 220 109 /** Critical section to serialize access. */ 221 110 RTCRITSECT CritSect; 222 111 /** Semaphore to signal the encoding worker thread. */ 223 112 RTSEMEVENT WaitEvent; 224 /** Whether this context is in started state or not. */225 bool fStarted;226 113 /** Shutdown indicator. */ 227 114 bool fShutdown; -
trunk/src/VBox/Main/include/VideoRecStream.h
r75307 r75313 109 109 public: 110 110 111 CaptureStream( void);112 113 CaptureStream( uint32_t uScreen, const settings::CaptureScreenSettings &Settings);111 CaptureStream(CaptureContext *pCtx); 112 113 CaptureStream(CaptureContext *pCtx, uint32_t uScreen, const settings::CaptureScreenSettings &Settings); 114 114 115 115 virtual ~CaptureStream(void); … … 117 117 public: 118 118 119 int Init( uint32_t uScreen, const settings::CaptureScreenSettings &Settings);119 int Init(CaptureContext *pCtx, uint32_t uScreen, const settings::CaptureScreenSettings &Settings); 120 120 int Uninit(void); 121 121 … … 133 133 int close(void); 134 134 135 int initInternal( uint32_t uScreen, const settings::CaptureScreenSettings &Settings);135 int initInternal(CaptureContext *pCtx, uint32_t uScreen, const settings::CaptureScreenSettings &Settings); 136 136 int uninitInternal(void); 137 137 … … 153 153 protected: 154 154 155 /** 156 * Enumeration for a recording stream state. 157 */ 158 enum RECORDINGSTREAMSTATE 159 { 160 /** Stream not initialized. */ 161 RECORDINGSTREAMSTATE_UNINITIALIZED = 0, 162 /** Stream was initialized. */ 163 RECORDINGSTREAMSTATE_INITIALIZED = 1, 164 /** The usual 32-bit hack. */ 165 RECORDINGSTREAMSTATE_32BIT_HACK = 0x7fffffff 166 }; 167 155 168 /** Recording context this stream is associated to. */ 156 CaptureContext *pCtx; 169 CaptureContext *pCtx; 170 /** The current state. */ 171 RECORDINGSTREAMSTATE enmState; 157 172 struct 158 173 {
Note:
See TracChangeset
for help on using the changeset viewer.