OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 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_MEDIA_STREAM_VIDEO_TRACK_RESOURCE_H_ |
| 6 #define PPAPI_PROXY_MEDIA_STREAM_VIDEO_TRACK_RESOURCE_H_ |
| 7 |
| 8 #include "ppapi/proxy/media_stream_track_resource_base.h" |
| 9 #include "ppapi/proxy/ppapi_proxy_export.h" |
| 10 #include "ppapi/thunk/ppb_media_stream_video_track_api.h" |
| 11 |
| 12 namespace ppapi { |
| 13 namespace proxy { |
| 14 |
| 15 class PPAPI_PROXY_EXPORT MediaStreamVideoTrackResource |
| 16 : public MediaStreamTrackResourceBase, |
| 17 public ppapi::thunk::PPB_MediaStreamVideoTrack_API { |
| 18 public: |
| 19 MediaStreamVideoTrackResource(Connection connection, |
| 20 PP_Instance instance, |
| 21 int pending_renderer_id, |
| 22 const std::string& id); |
| 23 |
| 24 virtual ~MediaStreamVideoTrackResource(); |
| 25 |
| 26 // Resource overrides: |
| 27 virtual thunk::PPB_MediaStreamVideoTrack_API* AsPPB_MediaStreamVideoTrack_API( |
| 28 ) OVERRIDE; |
| 29 |
| 30 // PPB_MediaStreamVideoTrack_API overrides: |
| 31 virtual PP_Var GetId() OVERRIDE; |
| 32 virtual PP_Bool HasEnded() OVERRIDE; |
| 33 virtual int32_t Configure(uint32_t max_buffered_frames) OVERRIDE; |
| 34 virtual int32_t GetFrame( |
| 35 PP_Resource* frame, |
| 36 const scoped_refptr<ppapi::TrackedCallback>& callback) OVERRIDE; |
| 37 virtual int32_t RecycleFrame(PP_Resource frame) OVERRIDE; |
| 38 virtual void Close() OVERRIDE; |
| 39 |
| 40 // MediaStreamFrameBuffer::Delegate overrides: |
| 41 virtual void OnNewFrameEnqueued() OVERRIDE; |
| 42 |
| 43 private: |
| 44 PP_Resource GetVideoFrame(); |
| 45 |
| 46 PP_Resource* get_frame_output_; |
| 47 |
| 48 scoped_refptr<TrackedCallback> get_frame_callback_; |
| 49 |
| 50 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoTrackResource); |
| 51 }; |
| 52 |
| 53 } // namespace proxy |
| 54 } // namespace ppapi |
| 55 |
| 56 #endif // PPAPI_PROXY_MEDIA_STREAM_VIDEO_TRACK_RESOURCE_H_ |
OLD | NEW |