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

Side by Side Diff: chromecast/media/cma/test/mock_frame_consumer.cc

Issue 609383004: Chromecast: adds test frame-segmenter code to support CMA unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cma-decrypt-context
Patch Set: address damien's comments Created 6 years, 2 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 unified diff | Download patch
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 "chromecast/media/cma/base/mock_frame_consumer.h" 5 #include "chromecast/media/cma/test/mock_frame_consumer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "chromecast/media/cma/base/coded_frame_provider.h" 11 #include "chromecast/media/cma/base/coded_frame_provider.h"
12 #include "chromecast/media/cma/base/decoder_buffer_base.h" 12 #include "chromecast/media/cma/base/decoder_buffer_base.h"
13 #include "chromecast/media/cma/base/frame_generator_for_test.h" 13 #include "chromecast/media/cma/test/frame_generator_for_test.h"
14 #include "media/base/video_decoder_config.h" 14 #include "media/base/video_decoder_config.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 namespace chromecast { 17 namespace chromecast {
18 namespace media { 18 namespace media {
19 19
20 MockFrameConsumer::MockFrameConsumer( 20 MockFrameConsumer::MockFrameConsumer(
21 CodedFrameProvider* coded_frame_provider) 21 CodedFrameProvider* coded_frame_provider)
22 : coded_frame_provider_(coded_frame_provider), 22 : coded_frame_provider_(coded_frame_provider),
23 pattern_idx_(0), 23 pattern_idx_(0),
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 } 108 }
109 109
110 void MockFrameConsumer::OnFlushCompleted() { 110 void MockFrameConsumer::OnFlushCompleted() {
111 EXPECT_EQ(frame_generator_->RemainingFrameCount(), 0); 111 EXPECT_EQ(frame_generator_->RemainingFrameCount(), 0);
112 done_cb_.Run(); 112 done_cb_.Run();
113 } 113 }
114 114
115 } // namespace media 115 } // namespace media
116 } // namespace chromecast 116 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698