Bug 1330918 - Set timestamp in VP8TrackEncoder GTest. r=jesup
authorAndreas Pehrson <pehrsons@gmail.com>
Thu, 19 Jan 2017 10:51:52 +0100
changeset 330141 a3538d0e7314f9dae25af9353b88dc06aa110fe6
parent 330140 49a053732072dcba2e556c74a67b58cd750fe073
child 330142 25ea6f3794c3fd7f40916e1ce11c9ca920388e3c
push id36243
push userpehrsons@gmail.com
push dateThu, 19 Jan 2017 16:33:47 +0000
treeherderautoland@a3538d0e7314 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1330918
milestone53.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 1330918 - Set timestamp in VP8TrackEncoder GTest. r=jesup MozReview-Commit-ID: 4LeR1iUZBgs
dom/media/gtest/TestVideoTrackEncoder.cpp
--- a/dom/media/gtest/TestVideoTrackEncoder.cpp
+++ b/dom/media/gtest/TestVideoTrackEncoder.cpp
@@ -260,23 +260,26 @@ TEST(VP8VideoTrackEncoder, FrameEncode)
   nsTArray<RefPtr<Image>> images;
   YUVBufferGenerator generator;
   generator.Init(mozilla::gfx::IntSize(640, 480));
   generator.Generate(images);
 
   // Put generated YUV frame into video segment.
   // Duration of each frame is 1 second.
   VideoSegment segment;
+  TimeStamp now = TimeStamp::Now();
   for (nsTArray<RefPtr<Image>>::size_type i = 0; i < images.Length(); i++)
   {
     RefPtr<Image> image = images[i];
     segment.AppendFrame(image.forget(),
                         mozilla::StreamTime(90000),
                         generator.GetSize(),
-                        PRINCIPAL_HANDLE_NONE);
+                        PRINCIPAL_HANDLE_NONE,
+                        false,
+                        now + TimeDuration::FromSeconds(i));
   }
 
   // track change notification.
   encoder.SetCurrentFrames(segment);
 
   // Pull Encoded Data back from encoder.
   EncodedFrameContainer container;
   EXPECT_TRUE(NS_SUCCEEDED(encoder.GetEncodedTrack(container)));