Bug 1037689 - Document MP4Sample timestamp units. r=ajones
authorRalph Giles <giles@mozilla.com>
Mon, 14 Jul 2014 14:19:00 -0700
changeset 216182 3a419b592089220260b1b98a8188a6a975611ff1
parent 216181 65a89b89cb1e623fa7f1ff3f5978c58acb1500de
child 216183 472e3405d85182be99fc4abdfb422c5c463b7221
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersajones
bugs1037689
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1037689 - Document MP4Sample timestamp units. r=ajones These look to be returning values in microseconds, already adjusted by the stream's internal timescale.
media/libstagefright/binding/include/mp4_demuxer/DecoderData.h
--- a/media/libstagefright/binding/include/mp4_demuxer/DecoderData.h
+++ b/media/libstagefright/binding/include/mp4_demuxer/DecoderData.h
@@ -69,28 +69,30 @@ public:
 
   mozilla::Vector<uint8_t> extra_data; // Unparsed AVCDecoderConfig payload.
   mozilla::Vector<uint8_t> annex_b;    // Parsed version for sample prepend.
 
   void Update(stagefright::sp<stagefright::MetaData>& aMetaData, const char* aMimeType);
   bool IsValid();
 };
 
+typedef int64_t Microseconds;
+
 class MP4Sample
 {
 public:
   MP4Sample();
   ~MP4Sample();
   void Update();
   void Pad(size_t aPaddingBytes);
 
   stagefright::MediaBuffer* mMediaBuffer;
 
-  int64_t composition_timestamp;
-  int64_t duration;
+  Microseconds composition_timestamp;
+  Microseconds duration;
   int64_t byte_offset;
   bool is_sync_point;
 
   uint8_t* data;
   size_t size;
 
   void Prepend(const uint8_t* aData, size_t aSize);