| 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_AUDIO_TRACK_RESOURCE_H_ | 5 #ifndef PPAPI_PROXY_MEDIA_STREAM_AUDIO_TRACK_RESOURCE_H_ |
| 6 #define PPAPI_PROXY_MEDIA_STREAM_AUDIO_TRACK_RESOURCE_H_ | 6 #define PPAPI_PROXY_MEDIA_STREAM_AUDIO_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 27 matching lines...) Expand all Loading... |
| 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_MediaStreamAudioTrack_Attrib attrib, | 40 virtual int32_t GetAttrib(PP_MediaStreamAudioTrack_Attrib attrib, |
| 41 int32_t* value) OVERRIDE; | 41 int32_t* value) OVERRIDE; |
| 42 virtual int32_t GetFrame( | 42 virtual int32_t GetFrame( |
| 43 PP_Resource* frame, | 43 PP_Resource* frame, |
| 44 scoped_refptr<TrackedCallback> callback) OVERRIDE; | 44 scoped_refptr<TrackedCallback> callback) OVERRIDE; |
| 45 virtual int32_t RecycleFrame(PP_Resource frame) OVERRIDE; | 45 virtual int32_t RecycleFrame(PP_Resource frame) OVERRIDE; |
| 46 virtual void Close() OVERRIDE; | 46 virtual void Close() OVERRIDE; |
| 47 | 47 |
| 48 // MediaStreamFrameBuffer::Delegate overrides: | 48 // MediaStreamBufferManager::Delegate overrides: |
| 49 virtual void OnNewFrameEnqueued() OVERRIDE; | 49 virtual void OnNewBufferEnqueued() OVERRIDE; |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 PP_Resource GetAudioFrame(); | 52 PP_Resource GetAudioFrame(); |
| 53 | 53 |
| 54 void ReleaseFrames(); | 54 void ReleaseFrames(); |
| 55 | 55 |
| 56 // Allocated frame resources by |GetFrame()|. | 56 // Allocated frame resources by |GetFrame()|. |
| 57 typedef std::map<PP_Resource, scoped_refptr<AudioFrameResource> > FrameMap; | 57 typedef std::map<PP_Resource, scoped_refptr<AudioFrameResource> > FrameMap; |
| 58 FrameMap frames_; | 58 FrameMap frames_; |
| 59 | 59 |
| 60 PP_Resource* get_frame_output_; | 60 PP_Resource* get_frame_output_; |
| 61 | 61 |
| 62 scoped_refptr<TrackedCallback> get_frame_callback_; | 62 scoped_refptr<TrackedCallback> get_frame_callback_; |
| 63 | 63 |
| 64 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioTrackResource); | 64 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioTrackResource); |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 } // namespace proxy | 67 } // namespace proxy |
| 68 } // namespace ppapi | 68 } // namespace ppapi |
| 69 | 69 |
| 70 #endif // PPAPI_PROXY_MEDIA_STREAM_AUDIO_TRACK_RESOURCE_H_ | 70 #endif // PPAPI_PROXY_MEDIA_STREAM_AUDIO_TRACK_RESOURCE_H_ |
| OLD | NEW |