VirtualBox

Changeset 75499 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Nov 16, 2018 1:23:14 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
126656
Message:

Main/Recording: build fix. Time Stamp -> Timestamp; while at it also changing variables and members to use the 'ms' prefix to indicate milliseconds.

Location:
trunk/src/VBox/Main
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r75489 r75499  
    31693169    </attribute>
    31703170    <attribute name="validityPeriodNotBefore" type="wstring" readonly="yes">
    3171       <desc>Certificate not valid before ISO time stamp.</desc>
     3171      <desc>Certificate not valid before ISO timestamp.</desc>
    31723172    </attribute>
    31733173    <attribute name="validityPeriodNotAfter" type="wstring" readonly="yes">
    3174       <desc>Certificate not valid after ISO time stamp.</desc>
     3174      <desc>Certificate not valid after ISO timestamp.</desc>
    31753175    </attribute>
    31763176    <attribute name="publicKeyAlgorithmOID" type="wstring" readonly="yes">
     
    44504450      <desc>
    44514451        Get the list of the guest properties matching a set of patterns along
    4452         with their values, time stamps and flags and give responsibility for
     4452        with their values, timestamps and flags and give responsibility for
    44534453        managing properties to the console.
    44544454      </desc>
     
    44664466      <param name="timestamps" type="long long" dir="out" safearray="yes">
    44674467        <desc>
    4468           The time stamps of the properties returned. The array entries match
     4468          The timestamps of the properties returned. The array entries match
    44694469          the corresponding entries in the @a name array.
    44704470        </desc>
     
    56875687    <attribute name="lastStateChange" type="long long" readonly="yes">
    56885688      <desc>
    5689         Time stamp of the last execution state change,
     5689        Timestamp of the last execution state change,
    56905690        in milliseconds since 1970-01-01 UTC.
    56915691      </desc>
     
    80618061      <desc>
    80628062        Return a list of the guest properties matching a set of patterns along
    8063         with their values, time stamps and flags.
     8063        with their values, timestamps and flags.
    80648064      </desc>
    80658065      <param name="patterns" type="wstring" dir="in">
     
    80828082      <param name="timestamps" type="long long" dir="out" safearray="yes">
    80838083        <desc>
    8084           The time stamps of the properties returned. The array entries match
     8084          The timestamps of the properties returned. The array entries match
    80858085          the corresponding entries in the @a name array.
    80868086        </desc>
     
    1095810958    <attribute name="lastUpdated" type="long long" readonly="yes">
    1095910959      <desc>
    10960         Time stamp of the last status update,
     10960        Timestamp of the last status update,
    1096110961        in milliseconds since 1970-01-01 UTC.
    1096210962      </desc>
     
    1490814908    <attribute name="timeStamp" type="long long" readonly="yes">
    1490914909      <desc>
    14910         Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
     14910        Timestamp of the snapshot, in milliseconds since 1970-01-01 UTC.
    1491114911      </desc>
    1491214912    </attribute>
     
    2112821128      <desc>
    2112921129        Return a list of the guest properties matching a set of patterns along
    21130         with their values, time stamps and flags.
     21130        with their values, timestamps and flags.
    2113121131
    2113221132        <result name="VBOX_E_INVALID_VM_STATE">
     
    2115821158      <param name="timestamps" type="long long" dir="out" safearray="yes">
    2115921159        <desc>
    21160           The time stamps of the properties returned. The array entries match
     21160          The timestamps of the properties returned. The array entries match
    2116121161          the corresponding entries in the @a key array.
    2116221162        </desc>
  • trunk/src/VBox/Main/include/Recording.h

    r75488 r75499  
    5959                       uint32_t x, uint32_t y, uint32_t uPixelFormat, uint32_t uBPP,
    6060                       uint32_t uBytesPerLine, uint32_t uSrcWidth, uint32_t uSrcHeight,
    61                        uint8_t *puSrcData, uint64_t uTimeStampMs);
     61                       uint8_t *puSrcData, uint64_t msTimestamp);
    6262public:
    6363
    6464    bool IsFeatureEnabled(RecordingFeature_T enmFeature);
    6565    bool IsReady(void) const;
    66     bool IsReady(uint32_t uScreen, uint64_t uTimeStampMs);
     66    bool IsReady(uint32_t uScreen, uint64_t msTimestamp);
    6767    bool IsStarted(void);
    6868    bool IsLimitReached(void);
    69     bool IsLimitReached(uint32_t uScreen, uint64_t uTimeStampMs);
     69    bool IsLimitReached(uint32_t uScreen, uint64_t msTimestamp);
    7070
    7171    DECLCALLBACK(int) OnLimitReached(uint32_t uScreen, int rc);
  • trunk/src/VBox/Main/include/RecordingInternals.h

    r75488 r75499  
    171171    /** Number of references held of this block. */
    172172    uint16_t           cRefs;
    173     /** The (absolute) time stamp (in ms, PTS) of this block. */
    174     uint64_t           uTimeStampMs;
     173    /** The (absolute) timestamp (in ms, PTS) of this block. */
     174    uint64_t           msTimestamp;
    175175    /** Opaque data block to the actual block data, depending on the block's type. */
    176176    void              *pvData;
     
    182182typedef std::list<RecordingBlock *> RecordingBlockList;
    183183
    184 #endif /* ____H_RECORDING_INTERNALS */
     184#endif /* !____H_RECORDING_INTERNALS */
     185
  • trunk/src/VBox/Main/include/RecordingStream.h

    r75488 r75499  
    122122    int Process(RecordingBlockMap &mapBlocksCommon);
    123123    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);
    125125
    126126    const settings::RecordingScreenSettings &GetConfig(void) const;
    127127    uint16_t GetID(void) const { return this->uScreenID; };
    128     bool IsLimitReached(uint64_t uTimeStampMs) const;
     128    bool IsLimitReached(uint64_t msTimestamp) const;
    129129    bool IsReady(void) const;
    130130
     
    142142    int initAudio(void);
    143143
    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);
    146146
    147147#ifdef VBOX_WITH_LIBVPX
    148148    int initVideoVPX(void);
    149149    int uninitVideoVPX(void);
    150     int writeVideoVPX(uint64_t uTimeStampMs, PRECORDINGVIDEOFRAME pFrame);
     150    int writeVideoVPX(uint64_t msTimestamp, PRECORDINGVIDEOFRAME pFrame);
    151151#endif
    152152    void lock(void);
     
    200200         *  This value is based on the configured FPS rate. */
    201201        uint32_t            uDelayMs;
    202         /** Time stamp (in ms) of the last video frame we encoded. */
     202        /** Timestamp (in ms) of the last video frame we encoded. */
    203203        uint64_t            uLastTimeStampMs;
    204204        /** Number of failed attempts to encode the current video frame in a row. */
     
    216216typedef std::vector <RecordingStream *> RecordingStreams;
    217217
    218 #endif /* ____H_RECORDING_STREAM */
    219 
     218#endif /* !____H_RECORDING_STREAM */
     219
  • trunk/src/VBox/Main/src-client/Recording.cpp

    r75488 r75499  
    484484 * @returns @c true if the specified screen is ready, @c false if not.
    485485 * @param   uScreen             Screen ID.
    486  * @param   uTimeStampMs        Current time stamp (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 */
     488bool RecordingContext::IsReady(uint32_t uScreen, uint64_t msTimestamp)
     489{
     490    RT_NOREF(msTimestamp);
    491491
    492492    lock();
     
    549549 * @returns true if any limit has been reached.
    550550 * @param   uScreen             Screen ID.
    551  * @param   uTimeStampMs        Timestamp (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 */
     553bool RecordingContext::IsLimitReached(uint32_t uScreen, uint64_t msTimestamp)
    554554{
    555555    lock();
     
    559559    const RecordingStream *pStream = getStreamInternal(uScreen);
    560560    if (   !pStream
    561         || pStream->IsLimitReached(uTimeStampMs))
     561        || pStream->IsLimitReached(msTimestamp))
    562562    {
    563563        fLimitReached = true;
     
    571571DECLCALLBACK(int) RecordingContext::OnLimitReached(uint32_t uScreen, int rc)
    572572{
    573     RT_NOREF(uScreen);
     573    RT_NOREF(uScreen, rc);
    574574    LogFlowThisFunc(("Stream %RU32 has reached its limit (%Rrc)\n", uScreen, rc));
    575575
     
    594594 * @param   pvData              Audio frame data to send.
    595595 * @param   cbData              Size (in bytes) of (encoded) audio frame data.
    596  * @param   uTimeStampMs        Time stamp (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 */
     598int RecordingContext::SendAudioFrame(const void *pvData, size_t cbData, uint64_t msTimestamp)
    599599{
    600600#ifdef VBOX_WITH_AUDIO_RECORDING
     
    619619    memcpy(pFrame->pvBuf, pvData, cbData);
    620620
    621     pBlock->pvData       = pFrame;
    622     pBlock->cbData       = sizeof(RECORDINGAUDIOFRAME) + cbData;
    623     pBlock->cRefs        = this->cStreamsEnabled;
    624     pBlock->uTimeStampMs = uTimeStampMs;
     621    pBlock->pvData      = pFrame;
     622    pBlock->cbData      = sizeof(RECORDINGAUDIOFRAME) + cbData;
     623    pBlock->cRefs       = this->cStreamsEnabled;
     624    pBlock->msTimestamp = msTimestamp;
    625625
    626626    int rc = RTCritSectEnter(&this->CritSect);
     
    630630    try
    631631    {
    632         RecordingBlockMap::iterator itBlocks = this->mapBlocksCommon.find(uTimeStampMs);
     632        RecordingBlockMap::iterator itBlocks = this->mapBlocksCommon.find(msTimestamp);
    633633        if (itBlocks == this->mapBlocksCommon.end())
    634634        {
     
    636636            pRecordingBlocks->List.push_back(pBlock);
    637637
    638             this->mapBlocksCommon.insert(std::make_pair(uTimeStampMs, pRecordingBlocks));
     638            this->mapBlocksCommon.insert(std::make_pair(msTimestamp, pRecordingBlocks));
    639639        }
    640640        else
     
    655655    return rc;
    656656#else
    657     RT_NOREF(pCtx, pvData, cbData, uTimeStampMs);
     657    RT_NOREF(pCtx, pvData, cbData, msTimestamp);
    658658    return VINF_SUCCESS;
    659659#endif
     
    676676 * @param   uSrcHeight         Height of the video frame.
    677677 * @param   puSrcData          Pointer to video frame data.
    678  * @param   uTimeStampMs       Time stamp (in ms).
     678 * @param   msTimestamp        Timestamp (in ms).
    679679 */
    680680int RecordingContext::SendVideoFrame(uint32_t uScreen, uint32_t x, uint32_t y,
    681681                                     uint32_t uPixelFormat, uint32_t uBPP, uint32_t uBytesPerLine,
    682682                                     uint32_t uSrcWidth, uint32_t uSrcHeight, uint8_t *puSrcData,
    683                                      uint64_t uTimeStampMs)
     683                                     uint64_t msTimestamp)
    684684{
    685685    AssertReturn(uSrcWidth,  VERR_INVALID_PARAMETER);
     
    700700    }
    701701
    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);
    703703
    704704    int rc2 = RTCritSectLeave(&this->CritSect);
  • trunk/src/VBox/Main/src-client/RecordingStream.cpp

    r75492 r75499  
    266266 *
    267267 * @returns true if any limit has been reached.
    268  * @param   uTimeStampMs        Timestamp (in ms) to check for.
    269  */
    270 bool RecordingStream::isLimitReachedInternal(uint64_t uTimeStampMs) const
    271 {
    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 */
     270bool RecordingStream::isLimitReachedInternal(uint64_t msTimestamp) const
     271{
     272    LogFlowThisFunc(("msTimestamp=%RU64, ulMaxTimeS=%RU32, tsStartMs=%RU64\n",
     273                     msTimestamp, this->ScreenSettings.ulMaxTimeS, this->tsStartMs));
    274274
    275275    if (   this->ScreenSettings.ulMaxTimeS
    276         && uTimeStampMs >= this->tsStartMs + (this->ScreenSettings.ulMaxTimeS * RT_MS_1SEC))
     276        && msTimestamp >= this->tsStartMs + (this->ScreenSettings.ulMaxTimeS * RT_MS_1SEC))
    277277    {
    278278        LogRel(("Recording: Time limit for stream #%RU16 has been reached (%RU32s)\n",
     
    311311 *
    312312 * @returns IPRT status code.
    313  * @param   uTimeStampMs        Current timestamp (in ms).
    314  */
    315 int RecordingStream::iterateInternal(uint64_t uTimeStampMs)
     313 * @param   msTimestamp         Current timestamp (in ms).
     314 */
     315int RecordingStream::iterateInternal(uint64_t msTimestamp)
    316316{
    317317    if (!this->fEnabled)
     
    320320    int rc;
    321321
    322     if (isLimitReachedInternal(uTimeStampMs))
     322    if (isLimitReachedInternal(msTimestamp))
    323323    {
    324324        rc = VINF_RECORDING_LIMIT_REACHED;
     
    352352 *
    353353 * @returns true if any limit has been reached.
    354  * @param   uTimeStampMs        Timestamp (in ms) to check for.
    355  */
    356 bool RecordingStream::IsLimitReached(uint64_t uTimeStampMs) const
     354 * @param   msTimestamp         Timestamp (in ms) to check for.
     355 */
     356bool RecordingStream::IsLimitReached(uint64_t msTimestamp) const
    357357{
    358358    if (!IsReady())
    359359        return true;
    360360
    361     return isLimitReachedInternal(uTimeStampMs);
     361    return isLimitReachedInternal(msTimestamp);
    362362}
    363363
     
    397397    while (itStreamBlocks != Blocks.Map.end())
    398398    {
    399         const uint64_t         uTimeStampMs = itStreamBlocks->first;
    400               RecordingBlocks *pBlocks      = itStreamBlocks->second;
     399        uint64_t const   msTimestamp = itStreamBlocks->first;
     400        RecordingBlocks *pBlocks     = itStreamBlocks->second;
    401401
    402402        AssertPtr(pBlocks);
     
    419419                if (RT_SUCCESS(rc2))
    420420                {
    421                     rc2 = writeVideoVPX(uTimeStampMs, pVideoFrame);
     421                    rc2 = writeVideoVPX(msTimestamp, pVideoFrame);
    422422                    AssertRC(rc2);
    423423                    if (RT_SUCCESS(rc))
     
    459459
    460460                    WebMWriter::BlockData_Opus blockData = { pAudioFrame->pvBuf, pAudioFrame->cbBuf,
    461                                                              pBlockCommon->uTimeStampMs };
     461                                                             pBlockCommon->msTimestamp };
    462462                    AssertPtr(this->File.pWEBM);
    463463                    int rc2 = this->File.pWEBM->WriteBlock(this->uTrackAudio, &blockData, sizeof(blockData));
     
    519519 * @param   uSrcHeight          Height (in pixels) of the video frame.
    520520 * @param   puSrcData           Actual pixel data of the video frame.
    521  * @param   uTimeStampMs        Timestamp (in ms) as PTS.
     521 * @param   msTimestamp         Timestamp (in ms) as PTS.
    522522 */
    523523int 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)
    525525{
    526526    lock();
    527527
    528     LogFlowFunc(("uTimeStampMs=%RU64\n", uTimeStampMs));
     528    LogFlowFunc(("msTimestamp=%RU64\n", msTimestamp));
    529529
    530530    PRECORDINGVIDEOFRAME pFrame = NULL;
    531531
    532     int rc = iterateInternal(uTimeStampMs);
     532    int rc = iterateInternal(msTimestamp);
    533533    if (rc != VINF_SUCCESS) /* Can return VINF_RECORDING_LIMIT_REACHED. */
    534534    {
     
    539539    do
    540540    {
    541         if (uTimeStampMs < this->Video.uLastTimeStampMs + this->Video.uDelayMs)
     541        if (msTimestamp < this->Video.uLastTimeStampMs + this->Video.uDelayMs)
    542542        {
    543543            rc = VINF_RECORDING_THROTTLED; /* Respect maximum frames per second. */
     
    545545        }
    546546
    547         this->Video.uLastTimeStampMs = uTimeStampMs;
     547        this->Video.uLastTimeStampMs = msTimestamp;
    548548
    549549        int xDiff = ((int)this->ScreenSettings.Video.ulWidth - (int)uSrcWidth) / 2;
     
    718718                pRecordingBlocks->List.push_back(pBlock);
    719719
    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));
    722722            }
    723723            catch (const std::exception &ex)
     
    11551155 *
    11561156 * @returns IPRT status code.
    1157  * @param   uTimeStampMs        Absolute timestamp (PTS) of frame (in ms) to encode.
     1157 * @param   msTimestamp         Absolute timestamp (PTS) of frame (in ms) to encode.
    11581158 * @param   pFrame              Frame to encode and submit.
    11591159 */
    1160 int RecordingStream::writeVideoVPX(uint64_t uTimeStampMs, PRECORDINGVIDEOFRAME pFrame)
     1160int RecordingStream::writeVideoVPX(uint64_t msTimestamp, PRECORDINGVIDEOFRAME pFrame)
    11611161{
    11621162    AssertPtrReturn(pFrame, VERR_INVALID_POINTER);
     
    11661166    PRECORDINGVIDEOCODEC pCodec = &this->Video.Codec;
    11671167
    1168     /* Presentation Time Stamp (PTS). */
    1169     vpx_codec_pts_t pts = uTimeStampMs;
     1168    /* Presentation TimeStamp (PTS). */
     1169    vpx_codec_pts_t pts = msTimestamp;
    11701170    vpx_codec_err_t rcv = vpx_codec_encode(&pCodec->VPX.Ctx,
    11711171                                           &pCodec->VPX.RawImage,
    1172                                            pts                          /* Time stamp */,
     1172                                           pts                          /* Timestamp */,
    11731173                                           this->Video.uDelayMs         /* How long to show this frame */,
    11741174                                           0                            /* Flags */,
Note: See TracChangeset for help on using the changeset viewer.

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