• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "cc/test/fake_video_frame_provider.h"
6 
7 namespace cc {
8 
FakeVideoFrameProvider()9 FakeVideoFrameProvider::FakeVideoFrameProvider()
10     : frame_(NULL), client_(NULL) {}
11 
~FakeVideoFrameProvider()12 FakeVideoFrameProvider::~FakeVideoFrameProvider() {
13   if (client_)
14     client_->StopUsingProvider();
15 }
16 
SetVideoFrameProviderClient(Client * client)17 void FakeVideoFrameProvider::SetVideoFrameProviderClient(Client* client) {
18   client_ = client;
19 }
20 
GetCurrentFrame()21 scoped_refptr<media::VideoFrame> FakeVideoFrameProvider::GetCurrentFrame() {
22   return frame_;
23 }
24 
25 }  // namespace cc
26