Changeset 75499 in vbox for trunk/src/VBox/Main
- Timestamp:
- Nov 16, 2018 1:23:14 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 126656
- Location:
- trunk/src/VBox/Main
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/VirtualBox.xidl
r75489 r75499 3169 3169 </attribute> 3170 3170 <attribute name="validityPeriodNotBefore" type="wstring" readonly="yes"> 3171 <desc>Certificate not valid before ISO time 3171 <desc>Certificate not valid before ISO timestamp.</desc> 3172 3172 </attribute> 3173 3173 <attribute name="validityPeriodNotAfter" type="wstring" readonly="yes"> 3174 <desc>Certificate not valid after ISO time 3174 <desc>Certificate not valid after ISO timestamp.</desc> 3175 3175 </attribute> 3176 3176 <attribute name="publicKeyAlgorithmOID" type="wstring" readonly="yes"> … … 4450 4450 <desc> 4451 4451 Get the list of the guest properties matching a set of patterns along 4452 with their values, time 4452 with their values, timestamps and flags and give responsibility for 4453 4453 managing properties to the console. 4454 4454 </desc> … … 4466 4466 <param name="timestamps" type="long long" dir="out" safearray="yes"> 4467 4467 <desc> 4468 The time 4468 The timestamps of the properties returned. The array entries match 4469 4469 the corresponding entries in the @a name array. 4470 4470 </desc> … … 5687 5687 <attribute name="lastStateChange" type="long long" readonly="yes"> 5688 5688 <desc> 5689 Time 5689 Timestamp of the last execution state change, 5690 5690 in milliseconds since 1970-01-01 UTC. 5691 5691 </desc> … … 8061 8061 <desc> 8062 8062 Return a list of the guest properties matching a set of patterns along 8063 with their values, time 8063 with their values, timestamps and flags. 8064 8064 </desc> 8065 8065 <param name="patterns" type="wstring" dir="in"> … … 8082 8082 <param name="timestamps" type="long long" dir="out" safearray="yes"> 8083 8083 <desc> 8084 The time 8084 The timestamps of the properties returned. The array entries match 8085 8085 the corresponding entries in the @a name array. 8086 8086 </desc> … … 10958 10958 <attribute name="lastUpdated" type="long long" readonly="yes"> 10959 10959 <desc> 10960 Time 10960 Timestamp of the last status update, 10961 10961 in milliseconds since 1970-01-01 UTC. 10962 10962 </desc> … … 14908 14908 <attribute name="timeStamp" type="long long" readonly="yes"> 14909 14909 <desc> 14910 Time 14910 Timestamp of the snapshot, in milliseconds since 1970-01-01 UTC. 14911 14911 </desc> 14912 14912 </attribute> … … 21128 21128 <desc> 21129 21129 Return a list of the guest properties matching a set of patterns along 21130 with their values, time 21130 with their values, timestamps and flags. 21131 21131 21132 21132 <result name="VBOX_E_INVALID_VM_STATE"> … … 21158 21158 <param name="timestamps" type="long long" dir="out" safearray="yes"> 21159 21159 <desc> 21160 The time 21160 The timestamps of the properties returned. The array entries match 21161 21161 the corresponding entries in the @a key array. 21162 21162 </desc> -
trunk/src/VBox/Main/include/Recording.h
r75488 r75499 59 59 uint32_t x, uint32_t y, uint32_t uPixelFormat, uint32_t uBPP, 60 60 uint32_t uBytesPerLine, uint32_t uSrcWidth, uint32_t uSrcHeight, 61 uint8_t *puSrcData, uint64_t uTimeStampMs);61 uint8_t *puSrcData, uint64_t msTimestamp); 62 62 public: 63 63 64 64 bool IsFeatureEnabled(RecordingFeature_T enmFeature); 65 65 bool IsReady(void) const; 66 bool IsReady(uint32_t uScreen, uint64_t uTimeStampMs);66 bool IsReady(uint32_t uScreen, uint64_t msTimestamp); 67 67 bool IsStarted(void); 68 68 bool IsLimitReached(void); 69 bool IsLimitReached(uint32_t uScreen, uint64_t uTimeStampMs);69 bool IsLimitReached(uint32_t uScreen, uint64_t msTimestamp); 70 70 71 71 DECLCALLBACK(int) OnLimitReached(uint32_t uScreen, int rc); -
trunk/src/VBox/Main/include/RecordingInternals.h
r75488 r75499 171 171 /** Number of references held of this block. */ 172 172 uint16_t cRefs; 173 /** The (absolute) time 174 uint64_t uTimeStampMs;173 /** The (absolute) timestamp (in ms, PTS) of this block. */ 174 uint64_t msTimestamp; 175 175 /** Opaque data block to the actual block data, depending on the block's type. */ 176 176 void *pvData; … … 182 182 typedef std::list<RecordingBlock *> RecordingBlockList; 183 183 184 #endif /* ____H_RECORDING_INTERNALS */ 184 #endif /* !____H_RECORDING_INTERNALS */ 185 -
trunk/src/VBox/Main/include/RecordingStream.h
r75488 r75499 122 122 int Process(RecordingBlockMap &mapBlocksCommon); 123 123 int SendVideoFrame(uint32_t x, uint32_t y, uint32_t uPixelFormat, uint32_t uBPP, uint32_t uBytesPerLine, 124 uint32_t uSrcWidth, uint32_t uSrcHeight, uint8_t *puSrcData, uint64_t uTimeStampMs);124 uint32_t uSrcWidth, uint32_t uSrcHeight, uint8_t *puSrcData, uint64_t msTimestamp); 125 125 126 126 const settings::RecordingScreenSettings &GetConfig(void) const; 127 127 uint16_t GetID(void) const { return this->uScreenID; }; 128 bool IsLimitReached(uint64_t uTimeStampMs) const;128 bool IsLimitReached(uint64_t msTimestamp) const; 129 129 bool IsReady(void) const; 130 130 … … 142 142 int initAudio(void); 143 143 144 bool isLimitReachedInternal(uint64_t uTimeStampMs) const;145 int iterateInternal(uint64_t uTimeStampMs);144 bool isLimitReachedInternal(uint64_t msTimestamp) const; 145 int iterateInternal(uint64_t msTimestamp); 146 146 147 147 #ifdef VBOX_WITH_LIBVPX 148 148 int initVideoVPX(void); 149 149 int uninitVideoVPX(void); 150 int writeVideoVPX(uint64_t uTimeStampMs, PRECORDINGVIDEOFRAME pFrame);150 int writeVideoVPX(uint64_t msTimestamp, PRECORDINGVIDEOFRAME pFrame); 151 151 #endif 152 152 void lock(void); … … 200 200 * This value is based on the configured FPS rate. */ 201 201 uint32_t uDelayMs; 202 /** Time 202 /** Timestamp (in ms) of the last video frame we encoded. */ 203 203 uint64_t uLastTimeStampMs; 204 204 /** Number of failed attempts to encode the current video frame in a row. */ … … 216 216 typedef std::vector <RecordingStream *> RecordingStreams; 217 217 218 #endif /* ____H_RECORDING_STREAM */219 218 #endif /* !____H_RECORDING_STREAM */ 219 -
trunk/src/VBox/Main/src-client/Recording.cpp
r75488 r75499 484 484 * @returns @c true if the specified screen is ready, @c false if not. 485 485 * @param uScreen Screen ID. 486 * @param uTimeStampMs Current timestamp (in ms). Currently not being used.487 */ 488 bool RecordingContext::IsReady(uint32_t uScreen, uint64_t uTimeStampMs)489 { 490 RT_NOREF( uTimeStampMs);486 * @param msTimestamp Current timestamp (in ms). Currently not being used. 487 */ 488 bool RecordingContext::IsReady(uint32_t uScreen, uint64_t msTimestamp) 489 { 490 RT_NOREF(msTimestamp); 491 491 492 492 lock(); … … 549 549 * @returns true if any limit has been reached. 550 550 * @param uScreen Screen ID. 551 * @param uTimeStampMsTimestamp (in ms) to check for.552 */ 553 bool RecordingContext::IsLimitReached(uint32_t uScreen, uint64_t uTimeStampMs)551 * @param msTimestamp Timestamp (in ms) to check for. 552 */ 553 bool RecordingContext::IsLimitReached(uint32_t uScreen, uint64_t msTimestamp) 554 554 { 555 555 lock(); … … 559 559 const RecordingStream *pStream = getStreamInternal(uScreen); 560 560 if ( !pStream 561 || pStream->IsLimitReached( uTimeStampMs))561 || pStream->IsLimitReached(msTimestamp)) 562 562 { 563 563 fLimitReached = true; … … 571 571 DECLCALLBACK(int) RecordingContext::OnLimitReached(uint32_t uScreen, int rc) 572 572 { 573 RT_NOREF(uScreen );573 RT_NOREF(uScreen, rc); 574 574 LogFlowThisFunc(("Stream %RU32 has reached its limit (%Rrc)\n", uScreen, rc)); 575 575 … … 594 594 * @param pvData Audio frame data to send. 595 595 * @param cbData Size (in bytes) of (encoded) audio frame data. 596 * @param uTimeStampMs Timestamp (in ms) of audio playback.597 */ 598 int RecordingContext::SendAudioFrame(const void *pvData, size_t cbData, uint64_t uTimeStampMs)596 * @param msTimestamp Timestamp (in ms) of audio playback. 597 */ 598 int RecordingContext::SendAudioFrame(const void *pvData, size_t cbData, uint64_t msTimestamp) 599 599 { 600 600 #ifdef VBOX_WITH_AUDIO_RECORDING … … 619 619 memcpy(pFrame->pvBuf, pvData, cbData); 620 620 621 pBlock->pvData 622 pBlock->cbData 623 pBlock->cRefs 624 pBlock-> uTimeStampMs = uTimeStampMs;621 pBlock->pvData = pFrame; 622 pBlock->cbData = sizeof(RECORDINGAUDIOFRAME) + cbData; 623 pBlock->cRefs = this->cStreamsEnabled; 624 pBlock->msTimestamp = msTimestamp; 625 625 626 626 int rc = RTCritSectEnter(&this->CritSect); … … 630 630 try 631 631 { 632 RecordingBlockMap::iterator itBlocks = this->mapBlocksCommon.find( uTimeStampMs);632 RecordingBlockMap::iterator itBlocks = this->mapBlocksCommon.find(msTimestamp); 633 633 if (itBlocks == this->mapBlocksCommon.end()) 634 634 { … … 636 636 pRecordingBlocks->List.push_back(pBlock); 637 637 638 this->mapBlocksCommon.insert(std::make_pair( uTimeStampMs, pRecordingBlocks));638 this->mapBlocksCommon.insert(std::make_pair(msTimestamp, pRecordingBlocks)); 639 639 } 640 640 else … … 655 655 return rc; 656 656 #else 657 RT_NOREF(pCtx, pvData, cbData, uTimeStampMs);657 RT_NOREF(pCtx, pvData, cbData, msTimestamp); 658 658 return VINF_SUCCESS; 659 659 #endif … … 676 676 * @param uSrcHeight Height of the video frame. 677 677 * @param puSrcData Pointer to video frame data. 678 * @param uTimeStampMs Timestamp (in ms).678 * @param msTimestamp Timestamp (in ms). 679 679 */ 680 680 int RecordingContext::SendVideoFrame(uint32_t uScreen, uint32_t x, uint32_t y, 681 681 uint32_t uPixelFormat, uint32_t uBPP, uint32_t uBytesPerLine, 682 682 uint32_t uSrcWidth, uint32_t uSrcHeight, uint8_t *puSrcData, 683 uint64_t uTimeStampMs)683 uint64_t msTimestamp) 684 684 { 685 685 AssertReturn(uSrcWidth, VERR_INVALID_PARAMETER); … … 700 700 } 701 701 702 rc = pStream->SendVideoFrame(x, y, uPixelFormat, uBPP, uBytesPerLine, uSrcWidth, uSrcHeight, puSrcData, uTimeStampMs);702 rc = pStream->SendVideoFrame(x, y, uPixelFormat, uBPP, uBytesPerLine, uSrcWidth, uSrcHeight, puSrcData, msTimestamp); 703 703 704 704 int rc2 = RTCritSectLeave(&this->CritSect); -
trunk/src/VBox/Main/src-client/RecordingStream.cpp
r75492 r75499 266 266 * 267 267 * @returns true if any limit has been reached. 268 * @param uTimeStampMsTimestamp (in ms) to check for.269 */ 270 bool RecordingStream::isLimitReachedInternal(uint64_t uTimeStampMs) const271 { 272 LogFlowThisFunc((" uTimeStampMs=%RU64, ulMaxTimeS=%RU32, tsStartMs=%RU64\n",273 uTimeStampMs, this->ScreenSettings.ulMaxTimeS, this->tsStartMs));268 * @param msTimestamp Timestamp (in ms) to check for. 269 */ 270 bool RecordingStream::isLimitReachedInternal(uint64_t msTimestamp) const 271 { 272 LogFlowThisFunc(("msTimestamp=%RU64, ulMaxTimeS=%RU32, tsStartMs=%RU64\n", 273 msTimestamp, this->ScreenSettings.ulMaxTimeS, this->tsStartMs)); 274 274 275 275 if ( this->ScreenSettings.ulMaxTimeS 276 && uTimeStampMs>= this->tsStartMs + (this->ScreenSettings.ulMaxTimeS * RT_MS_1SEC))276 && msTimestamp >= this->tsStartMs + (this->ScreenSettings.ulMaxTimeS * RT_MS_1SEC)) 277 277 { 278 278 LogRel(("Recording: Time limit for stream #%RU16 has been reached (%RU32s)\n", … … 311 311 * 312 312 * @returns IPRT status code. 313 * @param uTimeStampMsCurrent timestamp (in ms).314 */ 315 int RecordingStream::iterateInternal(uint64_t uTimeStampMs)313 * @param msTimestamp Current timestamp (in ms). 314 */ 315 int RecordingStream::iterateInternal(uint64_t msTimestamp) 316 316 { 317 317 if (!this->fEnabled) … … 320 320 int rc; 321 321 322 if (isLimitReachedInternal( uTimeStampMs))322 if (isLimitReachedInternal(msTimestamp)) 323 323 { 324 324 rc = VINF_RECORDING_LIMIT_REACHED; … … 352 352 * 353 353 * @returns true if any limit has been reached. 354 * @param uTimeStampMsTimestamp (in ms) to check for.355 */ 356 bool RecordingStream::IsLimitReached(uint64_t uTimeStampMs) const354 * @param msTimestamp Timestamp (in ms) to check for. 355 */ 356 bool RecordingStream::IsLimitReached(uint64_t msTimestamp) const 357 357 { 358 358 if (!IsReady()) 359 359 return true; 360 360 361 return isLimitReachedInternal( uTimeStampMs);361 return isLimitReachedInternal(msTimestamp); 362 362 } 363 363 … … 397 397 while (itStreamBlocks != Blocks.Map.end()) 398 398 { 399 const uint64_t uTimeStampMs= itStreamBlocks->first;400 RecordingBlocks *pBlocks= itStreamBlocks->second;399 uint64_t const msTimestamp = itStreamBlocks->first; 400 RecordingBlocks *pBlocks = itStreamBlocks->second; 401 401 402 402 AssertPtr(pBlocks); … … 419 419 if (RT_SUCCESS(rc2)) 420 420 { 421 rc2 = writeVideoVPX( uTimeStampMs, pVideoFrame);421 rc2 = writeVideoVPX(msTimestamp, pVideoFrame); 422 422 AssertRC(rc2); 423 423 if (RT_SUCCESS(rc)) … … 459 459 460 460 WebMWriter::BlockData_Opus blockData = { pAudioFrame->pvBuf, pAudioFrame->cbBuf, 461 pBlockCommon-> uTimeStampMs};461 pBlockCommon->msTimestamp }; 462 462 AssertPtr(this->File.pWEBM); 463 463 int rc2 = this->File.pWEBM->WriteBlock(this->uTrackAudio, &blockData, sizeof(blockData)); … … 519 519 * @param uSrcHeight Height (in pixels) of the video frame. 520 520 * @param puSrcData Actual pixel data of the video frame. 521 * @param uTimeStampMsTimestamp (in ms) as PTS.521 * @param msTimestamp Timestamp (in ms) as PTS. 522 522 */ 523 523 int RecordingStream::SendVideoFrame(uint32_t x, uint32_t y, uint32_t uPixelFormat, uint32_t uBPP, uint32_t uBytesPerLine, 524 uint32_t uSrcWidth, uint32_t uSrcHeight, uint8_t *puSrcData, uint64_t uTimeStampMs)524 uint32_t uSrcWidth, uint32_t uSrcHeight, uint8_t *puSrcData, uint64_t msTimestamp) 525 525 { 526 526 lock(); 527 527 528 LogFlowFunc((" uTimeStampMs=%RU64\n", uTimeStampMs));528 LogFlowFunc(("msTimestamp=%RU64\n", msTimestamp)); 529 529 530 530 PRECORDINGVIDEOFRAME pFrame = NULL; 531 531 532 int rc = iterateInternal( uTimeStampMs);532 int rc = iterateInternal(msTimestamp); 533 533 if (rc != VINF_SUCCESS) /* Can return VINF_RECORDING_LIMIT_REACHED. */ 534 534 { … … 539 539 do 540 540 { 541 if ( uTimeStampMs< this->Video.uLastTimeStampMs + this->Video.uDelayMs)541 if (msTimestamp < this->Video.uLastTimeStampMs + this->Video.uDelayMs) 542 542 { 543 543 rc = VINF_RECORDING_THROTTLED; /* Respect maximum frames per second. */ … … 545 545 } 546 546 547 this->Video.uLastTimeStampMs = uTimeStampMs;547 this->Video.uLastTimeStampMs = msTimestamp; 548 548 549 549 int xDiff = ((int)this->ScreenSettings.Video.ulWidth - (int)uSrcWidth) / 2; … … 718 718 pRecordingBlocks->List.push_back(pBlock); 719 719 720 Assert(this->Blocks.Map.find( uTimeStampMs) == this->Blocks.Map.end());721 this->Blocks.Map.insert(std::make_pair( uTimeStampMs, pRecordingBlocks));720 Assert(this->Blocks.Map.find(msTimestamp) == this->Blocks.Map.end()); 721 this->Blocks.Map.insert(std::make_pair(msTimestamp, pRecordingBlocks)); 722 722 } 723 723 catch (const std::exception &ex) … … 1155 1155 * 1156 1156 * @returns IPRT status code. 1157 * @param uTimeStampMsAbsolute timestamp (PTS) of frame (in ms) to encode.1157 * @param msTimestamp Absolute timestamp (PTS) of frame (in ms) to encode. 1158 1158 * @param pFrame Frame to encode and submit. 1159 1159 */ 1160 int RecordingStream::writeVideoVPX(uint64_t uTimeStampMs, PRECORDINGVIDEOFRAME pFrame)1160 int RecordingStream::writeVideoVPX(uint64_t msTimestamp, PRECORDINGVIDEOFRAME pFrame) 1161 1161 { 1162 1162 AssertPtrReturn(pFrame, VERR_INVALID_POINTER); … … 1166 1166 PRECORDINGVIDEOCODEC pCodec = &this->Video.Codec; 1167 1167 1168 /* Presentation Time 1169 vpx_codec_pts_t pts = uTimeStampMs;1168 /* Presentation TimeStamp (PTS). */ 1169 vpx_codec_pts_t pts = msTimestamp; 1170 1170 vpx_codec_err_t rcv = vpx_codec_encode(&pCodec->VPX.Ctx, 1171 1171 &pCodec->VPX.RawImage, 1172 pts /* Time 1172 pts /* Timestamp */, 1173 1173 this->Video.uDelayMs /* How long to show this frame */, 1174 1174 0 /* Flags */,
Note:
See TracChangeset
for help on using the changeset viewer.