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

Side by Side Diff: cc/video_frame_provider.h

Issue 12086018: GTTF: Add missing virtual destructors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix & rebase Created 7 years, 10 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 | Annotate | Revision Log
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 #ifndef CC_VIDEO_FRAME_PROVIDER_H_ 5 #ifndef CC_VIDEO_FRAME_PROVIDER_H_
6 #define CC_VIDEO_FRAME_PROVIDER_H_ 6 #define CC_VIDEO_FRAME_PROVIDER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 9
10 namespace media { 10 namespace media {
11 class VideoFrame; 11 class VideoFrame;
12 } 12 }
13 13
14 namespace cc { 14 namespace cc {
15 15
16 // Threading notes: This class may be used in a multi threaded manner. 16 // Threading notes: This class may be used in a multi threaded manner.
17 // Specifically, the implementation may call getCurrentFrame() or 17 // Specifically, the implementation may call getCurrentFrame() or
18 // putCurrentFrame() from the compositor thread. If so, the caller is 18 // putCurrentFrame() from the compositor thread. If so, the caller is
19 // responsible for making sure Client::didReceiveFrame and 19 // responsible for making sure Client::didReceiveFrame and
20 // Client::didUpdateMatrix are only called from this same thread. 20 // Client::didUpdateMatrix are only called from this same thread.
21 class VideoFrameProvider { 21 class VideoFrameProvider {
22 public: 22 public:
23 virtual ~VideoFrameProvider() {} 23 virtual ~VideoFrameProvider() {}
24 24
25 class Client { 25 class Client {
26 public: 26 public:
27 virtual ~Client() { }
jamesr 2013/02/01 19:30:05 protected
28
27 // Provider will call this method to tell the client to stop using it. 29 // Provider will call this method to tell the client to stop using it.
28 // StopUsingProvider() may be called from any thread. The client should 30 // StopUsingProvider() may be called from any thread. The client should
29 // block until it has PutCurrentFrame() any outstanding frames. 31 // block until it has PutCurrentFrame() any outstanding frames.
30 virtual void StopUsingProvider() = 0; 32 virtual void StopUsingProvider() = 0;
31 33
32 // Notifies the provider's client that a call to GetCurrentFrame() will 34 // Notifies the provider's client that a call to GetCurrentFrame() will
33 // return new data. 35 // return new data.
34 virtual void DidReceiveFrame() = 0; 36 virtual void DidReceiveFrame() = 0;
35 37
36 // Notifies the provider's client of a new UV transform matrix to be used. 38 // Notifies the provider's client of a new UV transform matrix to be used.
(...skipping 13 matching lines...) Expand all
50 // This function releases the lock on the video frame. It should always be 52 // This function releases the lock on the video frame. It should always be
51 // called after GetCurrentFrame(). Frames passed into this method 53 // called after GetCurrentFrame(). Frames passed into this method
52 // should no longer be referenced after the call is made. Only the current 54 // should no longer be referenced after the call is made. Only the current
53 // provider client should call this function. 55 // provider client should call this function.
54 virtual void PutCurrentFrame(const scoped_refptr<media::VideoFrame>&) = 0; 56 virtual void PutCurrentFrame(const scoped_refptr<media::VideoFrame>&) = 0;
55 }; 57 };
56 58
57 } // namespace cc 59 } // namespace cc
58 60
59 #endif // CC_VIDEO_FRAME_PROVIDER_H_ 61 #endif // CC_VIDEO_FRAME_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698