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

Side by Side Diff: content/renderer/media/rtc_video_decoder_unittest.cc

Issue 1490333005: Don't require VDAs to return all PictureBuffers at once. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ...because trybots have feelings too. Created 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/location.h" 6 #include "base/location.h"
7 #include "base/single_thread_task_runner.h" 7 #include "base/single_thread_task_runner.h"
8 #include "base/synchronization/waitable_event.h" 8 #include "base/synchronization/waitable_event.h"
9 #include "base/thread_task_runner_handle.h" 9 #include "base/thread_task_runner_handle.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 supported_profile.min_resolution.SetSize(16, 16); 43 supported_profile.min_resolution.SetSize(16, 16);
44 supported_profile.max_resolution.SetSize(1920, 1088); 44 supported_profile.max_resolution.SetSize(1920, 1088);
45 supported_profile.profile = media::H264PROFILE_MAIN; 45 supported_profile.profile = media::H264PROFILE_MAIN;
46 supported_profiles_.push_back(supported_profile); 46 supported_profiles_.push_back(supported_profile);
47 supported_profile.profile = media::VP8PROFILE_ANY; 47 supported_profile.profile = media::VP8PROFILE_ANY;
48 supported_profiles_.push_back(supported_profile); 48 supported_profiles_.push_back(supported_profile);
49 49
50 EXPECT_CALL(*mock_gpu_factories_.get(), GetTaskRunner()) 50 EXPECT_CALL(*mock_gpu_factories_.get(), GetTaskRunner())
51 .WillRepeatedly(Return(vda_task_runner_)); 51 .WillRepeatedly(Return(vda_task_runner_));
52 EXPECT_CALL(*mock_gpu_factories_.get(), 52 EXPECT_CALL(*mock_gpu_factories_.get(),
53 GetVideoDecodeAcceleratorSupportedProfiles()) 53 GetVideoDecodeAcceleratorCapabilities())
54 .WillRepeatedly(Return(supported_profiles_)); 54 .WillRepeatedly(Return(supported_profiles_));
55 EXPECT_CALL(*mock_gpu_factories_.get(), DoCreateVideoDecodeAccelerator()) 55 EXPECT_CALL(*mock_gpu_factories_.get(), DoCreateVideoDecodeAccelerator())
56 .WillRepeatedly(Return(mock_vda_)); 56 .WillRepeatedly(Return(mock_vda_));
57 EXPECT_CALL(*mock_vda_, Initialize(_, _)) 57 EXPECT_CALL(*mock_vda_, Initialize(_, _))
58 .Times(1) 58 .Times(1)
59 .WillRepeatedly(Return(true)); 59 .WillRepeatedly(Return(true));
60 EXPECT_CALL(*mock_vda_, Destroy()).Times(1); 60 EXPECT_CALL(*mock_vda_, Destroy()).Times(1);
61 } 61 }
62 62
63 void TearDown() override { 63 void TearDown() override {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 236
237 EXPECT_FALSE(rtc_decoder_->IsFirstBufferAfterReset(RTCVideoDecoder::ID_LAST, 237 EXPECT_FALSE(rtc_decoder_->IsFirstBufferAfterReset(RTCVideoDecoder::ID_LAST,
238 RTCVideoDecoder::ID_LAST)); 238 RTCVideoDecoder::ID_LAST));
239 EXPECT_TRUE( 239 EXPECT_TRUE(
240 rtc_decoder_->IsFirstBufferAfterReset(0, RTCVideoDecoder::ID_LAST)); 240 rtc_decoder_->IsFirstBufferAfterReset(0, RTCVideoDecoder::ID_LAST));
241 EXPECT_FALSE( 241 EXPECT_FALSE(
242 rtc_decoder_->IsFirstBufferAfterReset(1, RTCVideoDecoder::ID_LAST)); 242 rtc_decoder_->IsFirstBufferAfterReset(1, RTCVideoDecoder::ID_LAST));
243 } 243 }
244 244
245 } // content 245 } // content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698