Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Unified Diff: webrtc/modules/video_coding/video_packet_buffer_unittest.cc

Issue 2124943002: Added various timestamps to FrameObject. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Renamed |received_timestamp| to |received_time|. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/video_coding/packet_buffer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/video_packet_buffer_unittest.cc
diff --git a/webrtc/modules/video_coding/video_packet_buffer_unittest.cc b/webrtc/modules/video_coding/video_packet_buffer_unittest.cc
index 8c3f555dcbe6452ddcdc4987699686486965f94b..3952eb5d56ff3d7ccbb0329db9c135e592a4c9a0 100644
--- a/webrtc/modules/video_coding/video_packet_buffer_unittest.cc
+++ b/webrtc/modules/video_coding/video_packet_buffer_unittest.cc
@@ -14,11 +14,11 @@
#include <set>
#include <utility>
-#include "webrtc/modules/video_coding/frame_object.h"
-#include "webrtc/modules/video_coding/packet_buffer.h"
-
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/base/random.h"
+#include "webrtc/modules/video_coding/frame_object.h"
+#include "webrtc/modules/video_coding/packet_buffer.h"
+#include "webrtc/system_wrappers/include/clock.h"
namespace webrtc {
namespace video_coding {
@@ -28,7 +28,11 @@ class TestPacketBuffer : public ::testing::Test,
protected:
TestPacketBuffer()
: rand_(0x8739211),
- packet_buffer_(new PacketBuffer(kStartSize, kMaxSize, this)),
+ clock_(new SimulatedClock(0)),
+ packet_buffer_(new PacketBuffer(clock_.get(),
+ kStartSize,
+ kMaxSize,
+ this)),
frames_from_callback_(FrameComp()),
dummy_data_(new uint8_t[kDummyDataSize]()) {}
@@ -248,6 +252,7 @@ class TestPacketBuffer : public ::testing::Test,
const int kDummyDataSize = 4;
Random rand_;
+ std::unique_ptr<Clock> clock_;
std::unique_ptr<PacketBuffer> packet_buffer_;
struct FrameComp {
bool operator()(const std::pair<uint16_t, uint8_t> f1,
@@ -929,7 +934,7 @@ TEST_F(TestPacketBuffer, Vp8LayerSync) {
}
TEST_F(TestPacketBuffer, Vp8InsertLargeFrames) {
- packet_buffer_.reset(new PacketBuffer(1 << 3, 1 << 12, this));
+ packet_buffer_.reset(new PacketBuffer(clock_.get(), 1 << 3, 1 << 12, this));
uint16_t pid = Rand();
uint16_t seq_num = Rand();
« no previous file with comments | « webrtc/modules/video_coding/packet_buffer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698