| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef PPAPI_PROXY_VIDEO_FRAME_RESOURCE_H_ |
| 6 #define PPAPI_PROXY_VIDEO_FRAME_RESOURCE_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" |
| 10 #include "ppapi/proxy/ppapi_proxy_export.h" |
| 11 #include "ppapi/shared_impl/resource.h" |
| 12 #include "ppapi/shared_impl/video_frame.h" |
| 13 #include "ppapi/thunk/ppb_video_frame_api.h" |
| 14 |
| 15 namespace ppapi { |
| 16 namespace proxy { |
| 17 |
| 18 class MediaStreamVideoTrackResource; |
| 19 |
| 20 class PPAPI_PROXY_EXPORT VideoFrameResource : public Resource, |
| 21 public thunk::PPB_VideoFrame_API { |
| 22 public: |
| 23 VideoFrameResource(PP_Instance instance, |
| 24 VideoFrame* frame); |
| 25 |
| 26 virtual ~VideoFrameResource(); |
| 27 |
| 28 // PluginResource implementation. |
| 29 virtual thunk::PPB_VideoFrame_API* AsPPB_VideoFrame_API() OVERRIDE; |
| 30 |
| 31 // PPB_VideoFrame_API implementation. |
| 32 virtual PP_TimeDelta GetTimestamp() OVERRIDE; |
| 33 virtual void SetTimestamp(PP_TimeDelta timestamp) OVERRIDE; |
| 34 virtual PP_VideoFrame_Format GetFormat() OVERRIDE; |
| 35 virtual PP_Bool GetSize(PP_Size* size) OVERRIDE; |
| 36 virtual void* GetDataBuffer() OVERRIDE; |
| 37 virtual uint32_t GetDataBufferSize() OVERRIDE; |
| 38 |
| 39 private: |
| 40 friend class MediaStreamVideoTrackResource; |
| 41 |
| 42 VideoFrame* video_frame() { return frame_; } |
| 43 void set_video_frame(VideoFrame* frame) { frame_ = frame; }; |
| 44 |
| 45 VideoFrame* frame_; |
| 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(VideoFrameResource); |
| 48 }; |
| 49 |
| 50 } // namespace proxy |
| 51 } // namespace ppapi |
| 52 |
| 53 #endif // PPAPI_PROXY_VIDEO_FRAME_RESOURCE_H_ |
| OLD | NEW |