OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 void InitializeParser() { | 100 void InitializeParser() { |
101 parser_->Init( | 101 parser_->Init( |
102 base::Bind(&MP4StreamParserTest::InitF, base::Unretained(this)), | 102 base::Bind(&MP4StreamParserTest::InitF, base::Unretained(this)), |
103 base::Bind(&MP4StreamParserTest::NewConfigF, base::Unretained(this)), | 103 base::Bind(&MP4StreamParserTest::NewConfigF, base::Unretained(this)), |
104 base::Bind(&MP4StreamParserTest::NewBuffersF, base::Unretained(this)), | 104 base::Bind(&MP4StreamParserTest::NewBuffersF, base::Unretained(this)), |
105 base::Bind(&MP4StreamParserTest::NewBuffersF, base::Unretained(this)), | 105 base::Bind(&MP4StreamParserTest::NewBuffersF, base::Unretained(this)), |
106 base::Bind(&MP4StreamParserTest::KeyNeededF, base::Unretained(this)), | 106 base::Bind(&MP4StreamParserTest::KeyNeededF, base::Unretained(this)), |
107 base::Bind(&MP4StreamParserTest::NewSegmentF, base::Unretained(this)), | 107 base::Bind(&MP4StreamParserTest::NewSegmentF, base::Unretained(this)), |
108 base::Bind(&MP4StreamParserTest::EndOfSegmentF, | 108 base::Bind(&MP4StreamParserTest::EndOfSegmentF, |
109 base::Unretained(this))); | 109 base::Unretained(this)), |
| 110 LogCB()); |
110 } | 111 } |
111 | 112 |
112 bool ParseMP4File(const std::string& filename, int append_bytes) { | 113 bool ParseMP4File(const std::string& filename, int append_bytes) { |
113 InitializeParser(); | 114 InitializeParser(); |
114 | 115 |
115 scoped_refptr<DecoderBuffer> buffer = ReadTestDataFile(filename); | 116 scoped_refptr<DecoderBuffer> buffer = ReadTestDataFile(filename); |
116 EXPECT_TRUE(AppendDataInPieces(buffer->GetData(), | 117 EXPECT_TRUE(AppendDataInPieces(buffer->GetData(), |
117 buffer->GetDataSize(), | 118 buffer->GetDataSize(), |
118 append_bytes)); | 119 append_bytes)); |
119 return true; | 120 return true; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 EXPECT_TRUE(AppendDataInPieces(buffer->GetData(), | 162 EXPECT_TRUE(AppendDataInPieces(buffer->GetData(), |
162 buffer->GetDataSize(), | 163 buffer->GetDataSize(), |
163 512)); | 164 512)); |
164 } | 165 } |
165 | 166 |
166 // TODO(strobe): Create and test media which uses CENC auxiliary info stored | 167 // TODO(strobe): Create and test media which uses CENC auxiliary info stored |
167 // inside a private box | 168 // inside a private box |
168 | 169 |
169 } // namespace mp4 | 170 } // namespace mp4 |
170 } // namespace media | 171 } // namespace media |
OLD | NEW |