Changeset 65354 in vbox for trunk/src/VBox/Main/src-client/EbmlWriter.cpp
- Timestamp:
- Jan 17, 2017 5:06:17 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/EbmlWriter.cpp
r65353 r65354 346 346 , offCluster(0) 347 347 , fOpen(false) 348 , tsStart(0) 349 , tsEnd(0) { } 350 348 , tsStartMs(0) 349 , tsEndMs(0) { } 350 351 /** This cluster's ID. */ 351 352 uint64_t uID; 352 353 /** Absolute offset (in bytes) of current cluster. 353 354 * Needed for seeking info table. */ 354 355 uint64_t offCluster; 356 /** Whether this cluster element is opened currently. */ 355 357 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; 358 362 }; 359 363 … … 636 640 637 641 /* 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) 639 643 fClusterStart = true; 640 644 else 641 645 { 642 646 /* 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); 644 648 } 645 649 … … 663 667 /* Open a new cluster. */ 664 668 Cluster.fOpen = true; 665 Cluster.tsStart = tsPtsMs;669 Cluster.tsStartMs = tsPtsMs; 666 670 Cluster.offCluster = RTFileTell(m_Ebml.getFile()); 667 671 … … 669 673 670 674 m_Ebml.subStart(MkvElem_Cluster) 671 .serializeUnsignedInteger(MkvElem_Timecode, Cluster.tsStart );675 .serializeUnsignedInteger(MkvElem_Timecode, Cluster.tsStartMs); 672 676 673 677 /* Save a cue point if this is a keyframe. */ 674 678 if (fKeyframe) 675 679 { 676 WebMCueEntry cue(Cluster.tsStart , Cluster.offCluster);680 WebMCueEntry cue(Cluster.tsStartMs, Cluster.offCluster); 677 681 CurSeg.lstCues.push_back(cue); 678 682 } … … 719 723 720 724 /* 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) 722 726 fClusterStart = true; 723 727 else 724 728 { 725 729 /* 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); 727 731 } 728 732 … … 740 744 741 745 Cluster.fOpen = true; 742 Cluster.tsStart = tsPtsMs;746 Cluster.tsStartMs = tsPtsMs; 743 747 Cluster.offCluster = RTFileTell(m_Ebml.getFile()); 744 748 … … 746 750 747 751 m_Ebml.subStart(MkvElem_Cluster) 748 .serializeUnsignedInteger(MkvElem_Timecode, Cluster.tsStart );752 .serializeUnsignedInteger(MkvElem_Timecode, Cluster.tsStartMs); 749 753 } 750 754
Note:
See TracChangeset
for help on using the changeset viewer.