Changeset 105266 in vbox for trunk/src/VBox/Main/include/Recording.h
- Timestamp:
- Jul 11, 2024 7:49:37 AM (11 months ago)
- svn:sync-xref-src-repo-rev:
- 163915
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/Recording.h
r105095 r105266 36 36 37 37 #include "RecordingStream.h" 38 #include "ProgressImpl.h" 38 39 39 40 class Console; … … 123 124 RecordingContext(); 124 125 125 RecordingContext(Console *ptrConsole, const settings::RecordingSettings &Settings);126 127 126 virtual ~RecordingContext(void); 128 127 … … 136 135 #endif 137 136 138 int Create(Console *pConsole, const settings::RecordingSettings &Settings );137 int Create(Console *pConsole, const settings::RecordingSettings &Settings, ComPtr<IProgress> &pProgress); 139 138 void Destroy(void); 140 139 141 140 int Start(void); 142 141 int Stop(void); 142 143 int SetError(int rc, const com::Utf8Str &strText); 143 144 144 145 int SendAudioFrame(const void *pvData, size_t cbData, uint64_t uTimestampMs); … … 167 168 protected: 168 169 169 int createInternal(Console *ptrConsole, const settings::RecordingSettings &Settings); 170 int createInternal(Console *ptrConsole, const settings::RecordingSettings &Settings, ComPtr<IProgress> &pProgress); 171 void reset(void); 170 172 int startInternal(void); 171 173 int stopInternal(void); … … 183 185 int onLimitReached(uint32_t uScreen, int vrc); 184 186 187 bool progressIsCanceled(void) const; 188 bool progressIsCompleted(void) const; 189 int progressCreate(const settings::RecordingSettings &Settings, ComObjPtr<Progress> &pProgress); 190 int progressNotifyComplete(HRESULT hrc = S_OK, IVirtualBoxErrorInfo *pErrorInfo = NULL); 191 int progressSet(uint32_t uOp, const Bstr &strDesc); 192 int progressSet(uint64_t msTimestamp); 193 185 194 static DECLCALLBACK(int) threadMain(RTTHREAD hThreadSelf, void *pvUser); 186 195 … … 191 200 int audioInit(const settings::RecordingScreenSettings &screenSettings); 192 201 193 static DECLCALLBACK(int) audioCodecWriteDataCallback(PRECORDINGCODEC pCodec, const void *pvData, size_t cbData, uint64_t msAbsPTS, uint32_t uFlags, void *pvUser); 202 protected: 203 204 static DECLCALLBACK(void) s_progressCancelCallback(void *pvUser); 205 206 static DECLCALLBACK(void) s_recordingStateChangedCallback(RecordingContext *pCtx, RECORDINGSTS enmSts, uint32_t uScreen, int vrc, void *pvUser); 207 208 static DECLCALLBACK(int) s_audioCodecWriteDataCallback(PRECORDINGCODEC pCodec, const void *pvData, size_t cbData, uint64_t msAbsPTS, uint32_t uFlags, void *pvUser); 194 209 195 210 protected: … … 207 222 /** Semaphore to signal the encoding worker thread. */ 208 223 RTSEMEVENT m_WaitEvent; 224 /** Current operation of progress. Set to 0 if not started yet, >= 1 if started. */ 225 ULONG m_ulCurOp; 226 /** Number of progress operations. Always >= 1. */ 227 ULONG m_cOps; 228 /** The progress object assigned to this context. 229 * Might be NULL if not being used. */ 230 const ComObjPtr<Progress> m_pProgress; 209 231 /** Shutdown indicator. */ 210 232 bool m_fShutdown; … … 236 258 * 237 259 * This avoids doing the (expensive) encoding + multiplexing work in other 238 * threads like EMT / audio async I/O. .260 * threads like EMT / audio async I/O. 239 261 * 240 262 * For now this only affects audio, e.g. all recording streams
Note:
See TracChangeset
for help on using the changeset viewer.