Bug 1259212 - Add VideoInfo::mFramerate - r?jwwang draft
authorGerald Squelart <gsquelart@mozilla.com>
Tue, 18 Oct 2016 18:05:51 +1100
changeset 428499 4b6c802a60cb3b53d6204c1bdfd271a64ba81510
parent 428498 5fa454a0d22605ca8c2c09ff7c99de33d371538f
child 428500 3d407ef4de42884acee02418a89ba6d1c5362967
push id33314
push usergsquelart@mozilla.com
push dateMon, 24 Oct 2016 02:23:32 +0000
reviewersjwwang
bugs1259212
milestone52.0a1
Bug 1259212 - Add VideoInfo::mFramerate - r?jwwang MozReview-Commit-ID: ljbhLyHcr8
dom/media/MediaInfo.h
--- a/dom/media/MediaInfo.h
+++ b/dom/media/MediaInfo.h
@@ -194,28 +194,30 @@ public:
   }
 
   explicit VideoInfo(const nsIntSize& aSize)
     : TrackInfo(kVideoTrack, NS_LITERAL_STRING("2"), NS_LITERAL_STRING("main"),
                 EmptyString(), EmptyString(), true, 2)
     , mDisplay(aSize)
     , mStereoMode(StereoMode::MONO)
     , mImage(aSize)
+    , mFramerate(0)
     , mCodecSpecificConfig(new MediaByteBuffer)
     , mExtraData(new MediaByteBuffer)
     , mRotation(kDegree_0)
     , mImageRect(nsIntRect(nsIntPoint(), aSize))
   {
   }
 
   VideoInfo(const VideoInfo& aOther)
     : TrackInfo(aOther)
     , mDisplay(aOther.mDisplay)
     , mStereoMode(aOther.mStereoMode)
     , mImage(aOther.mImage)
+    , mFramerate(aOther.mFramerate)
     , mCodecSpecificConfig(aOther.mCodecSpecificConfig)
     , mExtraData(aOther.mExtraData)
     , mRotation(aOther.mRotation)
     , mImageRect(aOther.mImageRect)
   {
   }
 
   bool IsValid() const override
@@ -293,16 +295,19 @@ public:
   nsIntSize mDisplay;
 
   // Indicates the frame layout for single track stereo videos.
   StereoMode mStereoMode;
 
   // Size of the decoded video's image.
   nsIntSize mImage;
 
+  // Framerate in Hz. 0 if unknown.
+  uint32_t mFramerate;
+
   RefPtr<MediaByteBuffer> mCodecSpecificConfig;
   RefPtr<MediaByteBuffer> mExtraData;
 
   // Describing how many degrees video frames should be rotated in clock-wise to
   // get correct view.
   Rotation mRotation;
 
 private: