summaryrefslogtreecommitdiffstats
path: root/media/mp4
diff options
context:
space:
mode:
authortyoverby@chromium.org <tyoverby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-18 18:49:43 +0000
committertyoverby@chromium.org <tyoverby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-18 18:49:43 +0000
commit464f253b3f94b8833d83c03e721199f85e32f93d (patch)
tree0b59f5c47a130b6fc600a04bb4e3b0368cc45ef1 /media/mp4
parentbe7995f117df5ca5d4b60d918cd419aa08724e53 (diff)
downloadchromium_src-464f253b3f94b8833d83c03e721199f85e32f93d.zip
chromium_src-464f253b3f94b8833d83c03e721199f85e32f93d.tar.gz
chromium_src-464f253b3f94b8833d83c03e721199f85e32f93d.tar.bz2
TBR: dmichael
Refactored DecoderBuffer to use unix_hacker_style naming. DecoderBuffer went from having pure virtual methods to having concrete implementations. However, the style of the method name remained in UpperCamelCase. This patch renames the methods to fit with the unix_hacker_style that is used for concrete implementations. BUG=251986 Review URL: https://chromiumcodereview.appspot.com/17408005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212375 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/mp4')
-rw-r--r--media/mp4/mp4_stream_parser.cc6
-rw-r--r--media/mp4/mp4_stream_parser_unittest.cc32
2 files changed, 19 insertions, 19 deletions
diff --git a/media/mp4/mp4_stream_parser.cc b/media/mp4/mp4_stream_parser.cc
index 3d85509..56b340a 100644
--- a/media/mp4/mp4_stream_parser.cc
+++ b/media/mp4/mp4_stream_parser.cc
@@ -509,10 +509,10 @@ bool MP4StreamParser::EnqueueSample(BufferQueue* audio_buffers,
runs_->is_keyframe());
if (decrypt_config)
- stream_buf->SetDecryptConfig(decrypt_config.Pass());
+ stream_buf->set_decrypt_config(decrypt_config.Pass());
- stream_buf->SetDuration(runs_->duration());
- stream_buf->SetTimestamp(runs_->cts());
+ stream_buf->set_duration(runs_->duration());
+ stream_buf->set_timestamp(runs_->cts());
stream_buf->SetDecodeTimestamp(runs_->dts());
DVLOG(3) << "Pushing frame: aud=" << audio
diff --git a/media/mp4/mp4_stream_parser_unittest.cc b/media/mp4/mp4_stream_parser_unittest.cc
index c271a80..07697a5 100644
--- a/media/mp4/mp4_stream_parser_unittest.cc
+++ b/media/mp4/mp4_stream_parser_unittest.cc
@@ -75,9 +75,9 @@ class MP4StreamParserTest : public testing::Test {
for (StreamParser::BufferQueue::const_iterator buf = bufs.begin();
buf != bufs.end(); buf++) {
DVLOG(3) << " n=" << buf - bufs.begin()
- << ", size=" << (*buf)->GetDataSize()
- << ", dur=" << (*buf)->GetDuration().InMilliseconds();
- EXPECT_GE((*buf)->GetTimestamp(), segment_start_);
+ << ", size=" << (*buf)->data_size()
+ << ", dur=" << (*buf)->duration().InMilliseconds();
+ EXPECT_GE((*buf)->timestamp(), segment_start_);
}
return true;
}
@@ -131,8 +131,8 @@ class MP4StreamParserTest : public testing::Test {
InitializeParser();
scoped_refptr<DecoderBuffer> buffer = ReadTestDataFile(filename);
- EXPECT_TRUE(AppendDataInPieces(buffer->GetData(),
- buffer->GetDataSize(),
+ EXPECT_TRUE(AppendDataInPieces(buffer->data(),
+ buffer->data_size(),
append_bytes));
return true;
}
@@ -161,10 +161,10 @@ TEST_F(MP4StreamParserTest, TestFlush) {
scoped_refptr<DecoderBuffer> buffer =
ReadTestDataFile("bear-1280x720-av_frag.mp4");
- EXPECT_TRUE(AppendDataInPieces(buffer->GetData(), 65536, 512));
+ EXPECT_TRUE(AppendDataInPieces(buffer->data(), 65536, 512));
parser_->Flush();
- EXPECT_TRUE(AppendDataInPieces(buffer->GetData(),
- buffer->GetDataSize(),
+ EXPECT_TRUE(AppendDataInPieces(buffer->data(),
+ buffer->data_size(),
512));
}
@@ -173,11 +173,11 @@ TEST_F(MP4StreamParserTest, TestReinitialization) {
scoped_refptr<DecoderBuffer> buffer =
ReadTestDataFile("bear-1280x720-av_frag.mp4");
- EXPECT_TRUE(AppendDataInPieces(buffer->GetData(),
- buffer->GetDataSize(),
+ EXPECT_TRUE(AppendDataInPieces(buffer->data(),
+ buffer->data_size(),
512));
- EXPECT_TRUE(AppendDataInPieces(buffer->GetData(),
- buffer->GetDataSize(),
+ EXPECT_TRUE(AppendDataInPieces(buffer->data(),
+ buffer->data_size(),
512));
}
@@ -194,14 +194,14 @@ TEST_F(MP4StreamParserTest, TestNoMoovAfterFlush) {
scoped_refptr<DecoderBuffer> buffer =
ReadTestDataFile("bear-1280x720-av_frag.mp4");
- EXPECT_TRUE(AppendDataInPieces(buffer->GetData(),
- buffer->GetDataSize(),
+ EXPECT_TRUE(AppendDataInPieces(buffer->data(),
+ buffer->data_size(),
512));
parser_->Flush();
const int kFirstMoofOffset = 1307;
- EXPECT_TRUE(AppendDataInPieces(buffer->GetData() + kFirstMoofOffset,
- buffer->GetDataSize() - kFirstMoofOffset,
+ EXPECT_TRUE(AppendDataInPieces(buffer->data() + kFirstMoofOffset,
+ buffer->data_size() - kFirstMoofOffset,
512));
}