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

Unified Diff: media/filters/source_buffer_stream_unittest.cc

Issue 17408005: Refactored DecoderBuffer to use unix_hacker_style naming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@localrefactor
Patch Set: Created 7 years, 6 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
Index: media/filters/source_buffer_stream_unittest.cc
diff --git a/media/filters/source_buffer_stream_unittest.cc b/media/filters/source_buffer_stream_unittest.cc
index e7a508c770a89bc88560b40f61f0ac8521acbc6b..4527aa7a074e244b3e7a57ec51fcec61051f93b7 100644
--- a/media/filters/source_buffer_stream_unittest.cc
+++ b/media/filters/source_buffer_stream_unittest.cc
@@ -176,8 +176,8 @@ class SourceBufferStreamTest : public testing::Test {
EXPECT_TRUE(buffer->IsKeyframe());
if (expected_data) {
- const uint8* actual_data = buffer->GetData();
- const int actual_size = buffer->GetDataSize();
+ const uint8* actual_data = buffer->get_data();
+ const int actual_size = buffer->get_data_size();
EXPECT_EQ(expected_size, actual_size);
for (int i = 0; i < std::min(actual_size, expected_size); i++) {
EXPECT_EQ(expected_data[i], actual_data[i]);
@@ -253,7 +253,7 @@ class SourceBufferStreamTest : public testing::Test {
int position = starting_position + i;
bool is_keyframe = position % keyframe_interval == 0;
scoped_refptr<StreamParserBuffer> buffer =
- StreamParserBuffer::CopyFrom(data, size, is_keyframe);
+ StreamParserBuffer::copy_from(data, size, is_keyframe);
base::TimeDelta timestamp = frame_duration_ * position;
if (i == 0)
@@ -273,7 +273,7 @@ class SourceBufferStreamTest : public testing::Test {
} else {
presentation_timestamp = timestamp - frame_duration_;
}
- buffer->SetTimestamp(presentation_timestamp);
+ buffer->set_timestamp(presentation_timestamp);
queue.push_back(buffer);
}
@@ -302,7 +302,7 @@ class SourceBufferStreamTest : public testing::Test {
// Create buffer.
scoped_refptr<StreamParserBuffer> buffer =
- StreamParserBuffer::CopyFrom(&kDataA, kDataSize, is_keyframe);
+ StreamParserBuffer::copy_from(&kDataA, kDataSize, is_keyframe);
base::TimeDelta timestamp =
base::TimeDelta::FromMilliseconds(time_in_ms);
buffer->SetDecodeTimestamp(timestamp);
@@ -1975,18 +1975,18 @@ TEST_F(SourceBufferStreamTest, PresentationTimestampIndependence) {
ASSERT_EQ(stream_->GetNextBuffer(&buffer), SourceBufferStream::kSuccess);
if (buffer->IsKeyframe()) {
- EXPECT_EQ(buffer->GetTimestamp(), buffer->GetDecodeTimestamp());
+ EXPECT_EQ(buffer->get_timestamp(), buffer->GetDecodeTimestamp());
last_keyframe_idx = i;
- last_keyframe_presentation_timestamp = buffer->GetTimestamp();
+ last_keyframe_presentation_timestamp = buffer->get_timestamp();
} else if (i == last_keyframe_idx + 1) {
ASSERT_NE(last_keyframe_idx, -1);
- last_p_frame_presentation_timestamp = buffer->GetTimestamp();
+ last_p_frame_presentation_timestamp = buffer->get_timestamp();
EXPECT_LT(last_keyframe_presentation_timestamp,
last_p_frame_presentation_timestamp);
} else {
- EXPECT_GT(buffer->GetTimestamp(), last_keyframe_presentation_timestamp);
- EXPECT_LT(buffer->GetTimestamp(), last_p_frame_presentation_timestamp);
- EXPECT_LT(buffer->GetTimestamp(), buffer->GetDecodeTimestamp());
+ EXPECT_GT(buffer->get_timestamp(), last_keyframe_presentation_timestamp);
+ EXPECT_LT(buffer->get_timestamp(), last_p_frame_presentation_timestamp);
+ EXPECT_LT(buffer->get_timestamp(), buffer->GetDecodeTimestamp());
}
}
}

Powered by Google App Engine
This is Rietveld 408576698