Changeset 105095 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- Jul 2, 2024 10:06:48 AM (7 months ago)
- Location:
- trunk/src/VBox/Main/include
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ConsoleImpl.h
r105006 r105095 205 205 int i_recordingStop(util::AutoWriteLock *pAutoLock = NULL); 206 206 int i_recordingCursorShapeChange(bool fVisible, bool fAlpha, uint32_t xHot, uint32_t yHot, uint32_t uWidth, uint32_t uHeight, const uint8_t *pu8Shape, uint32_t cbShape); 207 static DECLCALLBACK(void) s_recordingOnStateChangedCallback(RecordingContext *pCtx, RECORDINGSTS enmSts, uint32_t uScreen, int vrc, void *pvUser); 207 208 # ifdef VBOX_WITH_AUDIO_RECORDING 208 209 AudioVideoRec *i_recordingGetAudioDrv(void) const { return mRecording.mAudioRec; } -
trunk/src/VBox/Main/include/DisplayImpl.h
r105006 r105095 46 46 #ifdef VBOX_WITH_RECORDING 47 47 # include "RecordingInternals.h" 48 class RecordingContext; 48 49 #endif 49 50 … … 188 189 int i_recordingStart(void); 189 190 int i_recordingStop(void); 190 int i_recordingInvalidate( bool fForce = false);191 int i_recordingInvalidate(void); 191 192 int i_recordingScreenChanged(unsigned uScreenId, const DISPLAYFBINFO *pFBInfo); 192 int i_recordingScreenUpdate(unsigned uScreenId, PRECORDINGVIDEOFRAME pFrame); 193 int i_recordingScreenUpdate(unsigned uScreenId, uint8_t *pauFramebuffer, size_t cbFramebuffer, uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint32_t uBytesPerLine); 194 int i_recordingScreenUpdate(unsigned uScreenId, uint32_t x, uint32_t y, uint32_t w, uint32_t h); 193 195 int i_recordingCursorPositionChange(unsigned uScreenId, uint32_t fFlags, int32_t x, int32_t y); 194 196 #endif … … 414 416 415 417 #ifdef VBOX_WITH_RECORDING 416 /* Serializes access to video recording source bitmaps. */ 417 RTCRITSECT mVideoRecLock; 418 /** Array which defines which screens are being enabled for recording. */ 419 bool maRecordingEnabled[SchemaDefs::MaxGuestMonitors]; 418 /** Struct which holds information and state about (video) recording. */ 419 struct Recording 420 { 421 Recording() 422 : pCtx(NULL) { } 423 424 /** Recording context. Constant across lifetime. 425 * Might be NULL if not being used. */ 426 RecordingContext * const pCtx; 427 } Recording; 420 428 #endif 421 429 422 430 #ifdef VBOX_WITH_STATISTICS 431 /** Struct for keeping STAM values. */ 423 432 struct 424 433 { -
trunk/src/VBox/Main/include/Recording.h
r105006 r105095 71 71 72 72 /** 73 * Enumeration for a recording context state. 74 */ 75 enum RECORDINGSTS 76 { 77 /** Recording not initialized. */ 78 RECORDINGSTS_UNINITIALIZED = 0, 79 /** Recording was created. */ 80 RECORDINGSTS_CREATED = 1, 81 /** Recording was started. */ 82 RECORDINGSTS_STARTED = 2, 83 /** Recording was stopped. */ 84 RECORDINGSTS_STOPPED = 3, 85 /** Limit has been reached. */ 86 RECORDINGSTS_LIMIT_REACHED = 4, 87 /** Recording experienced an error. */ 88 RECORDINGSTS_FAILURE = 5, 89 /** The usual 32-bit hack. */ 90 RECORDINGSTS_32BIT_HACK = 0x7fffffff 91 }; 92 93 /** 73 94 * Class for managing a recording context. 74 95 */ 75 96 class RecordingContext 76 97 { 98 friend RecordingStream; 99 100 public: 101 102 /** Recording context callback table. */ 103 struct CALLBACKS 104 { 105 /** 106 * Recording state got changed. Optional. 107 * 108 * @param pCtx Recording context. 109 * @param enmSts New status. 110 * @param uScreen Screen ID. 111 * Set to UINT32_MAX if the limit of all streams was reached. 112 * @param vrc Result code of state change. 113 * @param pvUser User-supplied pointer. Might be NULL. 114 */ 115 DECLCALLBACKMEMBER(void, pfnStateChanged, (RecordingContext *pCtx, RECORDINGSTS enmSts, uint32_t uScreen, int vrc, void *pvUser)); 116 117 /** User-supplied pointer. Might be NULL. */ 118 void *pvUser; 119 }; 120 77 121 public: 78 122 … … 108 152 uint64_t GetCurrentPTS(void) const; 109 153 bool IsFeatureEnabled(RecordingFeature_T enmFeature); 154 bool IsFeatureEnabled(uint32_t uScreen, RecordingFeature_T enmFeature); 110 155 bool IsReady(void); 111 bool IsReady(uint32_t uScreen, uint64_t msTimestamp);112 156 bool IsStarted(void); 113 157 bool IsLimitReached(void); 114 158 bool IsLimitReached(uint32_t uScreen, uint64_t msTimestamp); 115 159 bool NeedsUpdate(uint32_t uScreen, uint64_t msTimestamp); 116 117 DECLCALLBACK(int) OnLimitReached(uint32_t uScreen, int vrc); 160 void SetCallbacks(RecordingContext::CALLBACKS *pCallbacks, void *pvUser); 118 161 119 162 /** The state mouse cursor state. … … 138 181 int unlock(void); 139 182 183 int onLimitReached(uint32_t uScreen, int vrc); 184 140 185 static DECLCALLBACK(int) threadMain(RTTHREAD hThreadSelf, void *pvUser); 141 186 … … 149 194 150 195 protected: 151 152 /**153 * Enumeration for a recording context state.154 */155 enum RECORDINGSTS156 {157 /** Context not initialized. */158 RECORDINGSTS_UNINITIALIZED = 0,159 /** Context was created. */160 RECORDINGSTS_CREATED = 1,161 /** Context was started. */162 RECORDINGSTS_STARTED = 2,163 /** The usual 32-bit hack. */164 RECORDINGSTS_32BIT_HACK = 0x7fffffff165 };166 196 167 197 /** Pointer to the console object. */ … … 171 201 /** The current state. */ 172 202 RECORDINGSTS m_enmState; 203 /** Callback table. */ 204 CALLBACKS m_Callbacks; 173 205 /** Critical section to serialize access. */ 174 206 RTCRITSECT m_CritSect; -
trunk/src/VBox/Main/include/RecordingInternals.h
r105006 r105095 101 101 /** Pixel format. */ 102 102 RECORDINGPIXELFMT enmPixelFmt; 103 /** Bytes per scan line (stride). */ 103 /** Bytes per scan line (stride). 104 * Note: Does not necessarily match \a uWidth * (\a uBPP / 8). */ 104 105 uint32_t uBytesPerLine; 105 106 } RECORDINGSURFACEINFO; … … 539 540 PRECORDINGVIDEOFRAME RecordingVideoFrameDup(PRECORDINGVIDEOFRAME pFrame); 540 541 void RecordingVideoFrameClear(PRECORDINGVIDEOFRAME pFrame); 541 int RecordingVideoFrameBlitRawAlpha(PRECORDINGVIDEOFRAME pFrame, uint32_t uDstX, uint32_t uDstY, const uint8_t *pu8Src, size_t cbSrc, uint32_t uSrcX, uint32_t uSrcY, uint32_t uSrcWidth, uint32_t uSrcHeight, uint32_t uSrcBytesPerLine, uint8_t uSrcBPP, RECORDINGPIXELFMT enmFmt); 542 int RecordingVideoFrameBlitRaw(PRECORDINGVIDEOFRAME pFrame, uint32_t uDstX, uint32_t uDstY, const uint8_t *pu8Src, size_t cbSrc, uint32_t uSrcX, uint32_t uSrcY, uint32_t uSrcWidth, uint32_t uSrcHeight, uint32_t uSrcBytesPerLine, uint8_t uSrcBPP, RECORDINGPIXELFMT enmFmt); 542 int RecordingVideoFrameBlitRawAlpha(PRECORDINGVIDEOFRAME pDstFrame, uint32_t uDstX, uint32_t uDstY, const uint8_t *pu8Src, size_t cbSrc, uint32_t uSrcX, uint32_t uSrcY, uint32_t uSrcWidth, uint32_t uSrcHeight, uint32_t uSrcBytesPerLine, uint8_t uSrcBPP, RECORDINGPIXELFMT enmFmt); 543 int RecordingVideoBlitRaw(uint8_t *pu8Dst, size_t cbDst, uint32_t uDstX, uint32_t uDstY, uint32_t uDstBytesPerLine, uint8_t uDstBPP, RECORDINGPIXELFMT enmDstFmt, const uint8_t *pu8Src, size_t cbSrc, uint32_t uSrcX, uint32_t uSrcY, uint32_t uSrcWidth, uint32_t uSrcHeight, uint32_t uSrcBytesPerLine, uint8_t uSrcBPP, RECORDINGPIXELFMT enmSrcFmt); 544 int RecordingVideoFrameBlitRaw(PRECORDINGVIDEOFRAME pDstFrame, uint32_t uDstX, uint32_t uDstY, const uint8_t *pu8Src, size_t cbSrc, uint32_t uSrcX, uint32_t uSrcY, uint32_t uSrcWidth, uint32_t uSrcHeight, uint32_t uSrcBytesPerLine, uint8_t uSrcBPP, RECORDINGPIXELFMT enmFmt); 543 545 int RecordingVideoFrameBlitFrame(PRECORDINGVIDEOFRAME pDstFrame, uint32_t uDstX, uint32_t uDstY, PRECORDINGVIDEOFRAME pSrcFrame, uint32_t uSrcX, uint32_t uSrcY, uint32_t uSrcWidth, uint32_t uSrcHeight); 544 546 -
trunk/src/VBox/Main/include/RecordingStream.h
r105006 r105095 144 144 145 145 bool IsLimitReached(uint64_t msTimestamp) const; 146 bool Is Ready(void) const;146 bool IsFeatureEnabled(RecordingFeature_T enmFeature) const; 147 147 bool NeedsUpdate(uint64_t msTimestamp) const; 148 148
Note:
See TracChangeset
for help on using the changeset viewer.