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

Side by Side Diff: media/formats/common/stream_parser_test_base.cc

Issue 712593003: Move key frame flag from StreamParserBuffer to DecoderBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits Created 6 years, 1 month 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
« no previous file with comments | « media/filters/video_frame_stream_unittest.cc ('k') | media/formats/mp2t/es_adapter_video.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "media/formats/common/stream_parser_test_base.h" 5 #include "media/formats/common/stream_parser_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "media/base/test_data_util.h" 8 #include "media/base/test_data_util.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace media { 11 namespace media {
12 12
13 static std::string BufferQueueToString( 13 static std::string BufferQueueToString(
14 const StreamParser::BufferQueue& buffers) { 14 const StreamParser::BufferQueue& buffers) {
15 std::stringstream ss; 15 std::stringstream ss;
16 16
17 ss << "{"; 17 ss << "{";
18 for (StreamParser::BufferQueue::const_iterator itr = buffers.begin(); 18 for (StreamParser::BufferQueue::const_iterator itr = buffers.begin();
19 itr != buffers.end(); 19 itr != buffers.end();
20 ++itr) { 20 ++itr) {
21 ss << " " << (*itr)->timestamp().InMilliseconds(); 21 ss << " " << (*itr)->timestamp().InMilliseconds();
22 if ((*itr)->IsKeyframe()) 22 if ((*itr)->is_key_frame())
23 ss << "K"; 23 ss << "K";
24 } 24 }
25 ss << " }"; 25 ss << " }";
26 26
27 return ss.str(); 27 return ss.str();
28 } 28 }
29 29
30 StreamParserTestBase::StreamParserTestBase( 30 StreamParserTestBase::StreamParserTestBase(
31 scoped_ptr<StreamParser> stream_parser) 31 scoped_ptr<StreamParser> stream_parser)
32 : parser_(stream_parser.Pass()) { 32 : parser_(stream_parser.Pass()) {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 DVLOG(1) << __FUNCTION__; 119 DVLOG(1) << __FUNCTION__;
120 results_stream_ << "NewSegment"; 120 results_stream_ << "NewSegment";
121 } 121 }
122 122
123 void StreamParserTestBase::OnEndOfSegment() { 123 void StreamParserTestBase::OnEndOfSegment() {
124 DVLOG(1) << __FUNCTION__; 124 DVLOG(1) << __FUNCTION__;
125 results_stream_ << "EndOfSegment"; 125 results_stream_ << "EndOfSegment";
126 } 126 }
127 127
128 } // namespace media 128 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/video_frame_stream_unittest.cc ('k') | media/formats/mp2t/es_adapter_video.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698