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

Side by Side Diff: media/mp4/mp4_stream_parser_unittest.cc

Issue 11471006: Log MediaSource parsing errors to the MediaLog so they can appear in chrome:media-internals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit. Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/mp4/mp4_stream_parser.cc ('k') | media/mp4/track_run_iterator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « media/mp4/mp4_stream_parser.cc ('k') | media/mp4/track_run_iterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698