VirtualBox

Ignore:
Timestamp:
Jan 17, 2017 5:06:17 PM (8 years ago)
Author:
vboxsync
Message:

Renaming, docs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/EbmlWriter.cpp

    r65353 r65354  
    346346            , offCluster(0)
    347347            , fOpen(false)
    348             , tsStart(0)
    349             , tsEnd(0) { }
    350 
     348            , tsStartMs(0)
     349            , tsEndMs(0) { }
     350
     351        /** This cluster's ID. */
    351352        uint64_t      uID;
    352353        /** Absolute offset (in bytes) of current cluster.
    353354         *  Needed for seeking info table. */
    354355        uint64_t      offCluster;
     356        /** Whether this cluster element is opened currently. */
    355357        bool          fOpen;
    356         uint64_t      tsStart;
    357         uint64_t      tsEnd;
     358        /** Timestamp (in ms) when starting this  cluster. */
     359        uint64_t      tsStartMs;
     360        /** Timestamp (in ms) when this cluster ended. */
     361        uint64_t      tsEndMs;
    358362    };
    359363
     
    636640
    637641        /* Did we reach the maximum our timecode can hold? Use a new cluster then. */
    638         if (tsPtsMs - CurSeg.CurCluster.tsStart > m_uTimecodeMax)
     642        if (tsPtsMs - CurSeg.CurCluster.tsStartMs > m_uTimecodeMax)
    639643            fClusterStart = true;
    640644        else
    641645        {
    642646            /* Calculate the block's timecode, which is relative to the current cluster's starting timecode. */
    643             tsBlockMs = static_cast<uint16_t>(tsPtsMs - CurSeg.CurCluster.tsStart);
     647            tsBlockMs = static_cast<uint16_t>(tsPtsMs - CurSeg.CurCluster.tsStartMs);
    644648        }
    645649
     
    663667            /* Open a new cluster. */
    664668            Cluster.fOpen      = true;
    665             Cluster.tsStart    = tsPtsMs;
     669            Cluster.tsStartMs    = tsPtsMs;
    666670            Cluster.offCluster = RTFileTell(m_Ebml.getFile());
    667671
     
    669673
    670674            m_Ebml.subStart(MkvElem_Cluster)
    671                   .serializeUnsignedInteger(MkvElem_Timecode, Cluster.tsStart);
     675                  .serializeUnsignedInteger(MkvElem_Timecode, Cluster.tsStartMs);
    672676
    673677            /* Save a cue point if this is a keyframe. */
    674678            if (fKeyframe)
    675679            {
    676                 WebMCueEntry cue(Cluster.tsStart, Cluster.offCluster);
     680                WebMCueEntry cue(Cluster.tsStartMs, Cluster.offCluster);
    677681                CurSeg.lstCues.push_back(cue);
    678682            }
     
    719723
    720724        /* Did we reach the maximum our timecode can hold? Use a new cluster then. */
    721         if (tsPtsMs - Cluster.tsStart > m_uTimecodeMax)
     725        if (tsPtsMs - Cluster.tsStartMs > m_uTimecodeMax)
    722726            fClusterStart = true;
    723727        else
    724728        {
    725729            /* Calculate the block's timecode, which is relative to the Cluster timecode. */
    726             tsBlockMs = static_cast<uint16_t>(tsPtsMs - Cluster.tsStart);
     730            tsBlockMs = static_cast<uint16_t>(tsPtsMs - Cluster.tsStartMs);
    727731        }
    728732
     
    740744
    741745            Cluster.fOpen      = true;
    742             Cluster.tsStart    = tsPtsMs;
     746            Cluster.tsStartMs    = tsPtsMs;
    743747            Cluster.offCluster = RTFileTell(m_Ebml.getFile());
    744748
     
    746750
    747751            m_Ebml.subStart(MkvElem_Cluster)
    748                   .serializeUnsignedInteger(MkvElem_Timecode, Cluster.tsStart);
     752                  .serializeUnsignedInteger(MkvElem_Timecode, Cluster.tsStartMs);
    749753        }
    750754
Note: See TracChangeset for help on using the changeset viewer.

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