| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 PPAPI_PROXY_MEDIA_STREAM_VIDEO_TRACK_RESOURCE_H_ | 5 #ifndef PPAPI_PROXY_MEDIA_STREAM_VIDEO_TRACK_RESOURCE_H_ |
| 6 #define PPAPI_PROXY_MEDIA_STREAM_VIDEO_TRACK_RESOURCE_H_ | 6 #define PPAPI_PROXY_MEDIA_STREAM_VIDEO_TRACK_RESOURCE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 virtual PP_Bool HasEnded() OVERRIDE; | 37 virtual PP_Bool HasEnded() OVERRIDE; |
| 38 virtual int32_t Configure(const int32_t attrib_list[], | 38 virtual int32_t Configure(const int32_t attrib_list[], |
| 39 scoped_refptr<TrackedCallback> callback) OVERRIDE; | 39 scoped_refptr<TrackedCallback> callback) OVERRIDE; |
| 40 virtual int32_t GetAttrib(PP_MediaStreamVideoTrack_Attrib attrib, | 40 virtual int32_t GetAttrib(PP_MediaStreamVideoTrack_Attrib attrib, |
| 41 int32_t* value) OVERRIDE; | 41 int32_t* value) OVERRIDE; |
| 42 virtual int32_t GetFrame(PP_Resource* frame, | 42 virtual int32_t GetFrame(PP_Resource* frame, |
| 43 scoped_refptr<TrackedCallback> callback) OVERRIDE; | 43 scoped_refptr<TrackedCallback> callback) OVERRIDE; |
| 44 virtual int32_t RecycleFrame(PP_Resource frame) OVERRIDE; | 44 virtual int32_t RecycleFrame(PP_Resource frame) OVERRIDE; |
| 45 virtual void Close() OVERRIDE; | 45 virtual void Close() OVERRIDE; |
| 46 | 46 |
| 47 // MediaStreamFrameBuffer::Delegate overrides: | 47 // MediaStreamBufferManager::Delegate overrides: |
| 48 virtual void OnNewFrameEnqueued() OVERRIDE; | 48 virtual void OnNewBufferEnqueued() OVERRIDE; |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 PP_Resource GetVideoFrame(); | 51 PP_Resource GetVideoFrame(); |
| 52 | 52 |
| 53 void ReleaseFrames(); | 53 void ReleaseFrames(); |
| 54 | 54 |
| 55 // Allocated frame resources by |GetFrame()|. | 55 // Allocated frame resources by |GetFrame()|. |
| 56 typedef std::map<PP_Resource, scoped_refptr<VideoFrameResource> > FrameMap; | 56 typedef std::map<PP_Resource, scoped_refptr<VideoFrameResource> > FrameMap; |
| 57 FrameMap frames_; | 57 FrameMap frames_; |
| 58 | 58 |
| 59 PP_Resource* get_frame_output_; | 59 PP_Resource* get_frame_output_; |
| 60 | 60 |
| 61 scoped_refptr<TrackedCallback> get_frame_callback_; | 61 scoped_refptr<TrackedCallback> get_frame_callback_; |
| 62 | 62 |
| 63 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoTrackResource); | 63 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoTrackResource); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace proxy | 66 } // namespace proxy |
| 67 } // namespace ppapi | 67 } // namespace ppapi |
| 68 | 68 |
| 69 #endif // PPAPI_PROXY_MEDIA_STREAM_VIDEO_TRACK_RESOURCE_H_ | 69 #endif // PPAPI_PROXY_MEDIA_STREAM_VIDEO_TRACK_RESOURCE_H_ |
| OLD | NEW |