Chromium Code Reviews| Index: ppapi/proxy/media_stream_video_track_resource.h |
| diff --git a/ppapi/proxy/media_stream_video_track_resource.h b/ppapi/proxy/media_stream_video_track_resource.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..af3a9cea23e9e65609e243cd0802fbc60b357162 |
| --- /dev/null |
| +++ b/ppapi/proxy/media_stream_video_track_resource.h |
| @@ -0,0 +1,56 @@ |
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef PPAPI_PROXY_MEDIA_STREAM_VIDEO_TRACK_RESOURCE_H_ |
| +#define PPAPI_PROXY_MEDIA_STREAM_VIDEO_TRACK_RESOURCE_H_ |
| + |
| +#include "ppapi/proxy/media_stream_track_resource_base.h" |
| +#include "ppapi/proxy/ppapi_proxy_export.h" |
| +#include "ppapi/thunk/ppb_media_stream_video_track_api.h" |
| + |
| +namespace ppapi { |
| +namespace proxy { |
| + |
| +class PPAPI_PROXY_EXPORT MediaStreamVideoTrackResource |
| + : public MediaStreamTrackResourceBase, |
| + public ppapi::thunk::PPB_MediaStreamVideoTrack_API { |
|
yzshen1
2014/01/10 21:05:17
nit: ppapi:: is not needed.
Peng
2014/01/10 22:46:58
Done.
|
| + public: |
| + MediaStreamVideoTrackResource(Connection connection, |
| + PP_Instance instance, |
| + int pending_renderer_id, |
| + const std::string& id); |
| + |
| + virtual ~MediaStreamVideoTrackResource(); |
| + |
| + // Resource overrides: |
| + virtual thunk::PPB_MediaStreamVideoTrack_API* AsPPB_MediaStreamVideoTrack_API( |
| + ) OVERRIDE; |
|
bbudge
2014/01/10 22:57:06
It looks strange to split the ( and ) like this. H
Peng
2014/01/13 19:10:15
Done.
|
| + |
| + // PPB_MediaStreamVideoTrack_API overrides: |
| + virtual PP_Var GetId() OVERRIDE; |
| + virtual PP_Bool HasEnded() OVERRIDE; |
| + virtual int32_t Configure(uint32_t max_buffered_frames) OVERRIDE; |
| + virtual int32_t GetFrame( |
| + PP_Resource* frame, |
| + scoped_refptr<ppapi::TrackedCallback> callback) OVERRIDE; |
| + virtual int32_t RecycleFrame(PP_Resource frame) OVERRIDE; |
| + virtual void Close() OVERRIDE; |
| + |
| + // MediaStreamFrameBuffer::Delegate overrides: |
| + virtual void OnNewFrameEnqueued() OVERRIDE; |
| + |
| + private: |
| + PP_Resource GetVideoFrame(); |
| + |
| + PP_Resource* get_frame_output_; |
| + |
| + scoped_refptr<TrackedCallback> get_frame_callback_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoTrackResource); |
| +}; |
| + |
| +} // namespace proxy |
| +} // namespace ppapi |
| + |
| +#endif // PPAPI_PROXY_MEDIA_STREAM_VIDEO_TRACK_RESOURCE_H_ |