Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: ppapi/proxy/audio_frame_resource.h

Issue 142023008: [PPAPI][MediaStream] Rename AudioFrame to AudioBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix review issues Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ppapi/ppapi_shared.gypi ('k') | ppapi/proxy/audio_frame_resource.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_AUDIO_FRAME_RESOURCE_H_ 5 #ifndef PPAPI_PROXY_AUDIO_FRAME_RESOURCE_H_
6 #define PPAPI_PROXY_AUDIO_FRAME_RESOURCE_H_ 6 #define PPAPI_PROXY_AUDIO_FRAME_RESOURCE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "ppapi/proxy/ppapi_proxy_export.h" 10 #include "ppapi/proxy/ppapi_proxy_export.h"
11 #include "ppapi/shared_impl/media_stream_frame.h"
12 #include "ppapi/shared_impl/resource.h" 11 #include "ppapi/shared_impl/resource.h"
13 #include "ppapi/thunk/ppb_audio_frame_api.h" 12 #include "ppapi/thunk/ppb_audio_frame_api.h"
14 13
15 namespace ppapi { 14 namespace ppapi {
15
16 union MediaStreamBuffer;
17
16 namespace proxy { 18 namespace proxy {
17 19
18 class PPAPI_PROXY_EXPORT AudioFrameResource : public Resource, 20 class PPAPI_PROXY_EXPORT AudioFrameResource : public Resource,
19 public thunk::PPB_AudioFrame_API { 21 public thunk::PPB_AudioFrame_API {
20 public: 22 public:
21 AudioFrameResource(PP_Instance instance, 23 AudioFrameResource(PP_Instance instance,
22 int32_t index, 24 int32_t index,
23 MediaStreamFrame* frame); 25 MediaStreamBuffer* buffer);
24 26
25 virtual ~AudioFrameResource(); 27 virtual ~AudioFrameResource();
26 28
27 // PluginResource overrides: 29 // PluginResource overrides:
28 virtual thunk::PPB_AudioFrame_API* AsPPB_AudioFrame_API() OVERRIDE; 30 virtual thunk::PPB_AudioFrame_API* AsPPB_AudioFrame_API() OVERRIDE;
29 31
30 // PPB_AudioFrame_API overrides: 32 // PPB_AudioFrame_API overrides:
31 virtual PP_TimeDelta GetTimestamp() OVERRIDE; 33 virtual PP_TimeDelta GetTimestamp() OVERRIDE;
32 virtual void SetTimestamp(PP_TimeDelta timestamp) OVERRIDE; 34 virtual void SetTimestamp(PP_TimeDelta timestamp) OVERRIDE;
33 virtual PP_AudioFrame_SampleRate GetSampleRate() OVERRIDE; 35 virtual PP_AudioFrame_SampleRate GetSampleRate() OVERRIDE;
34 virtual PP_AudioFrame_SampleSize GetSampleSize() OVERRIDE; 36 virtual PP_AudioFrame_SampleSize GetSampleSize() OVERRIDE;
35 virtual uint32_t GetNumberOfChannels() OVERRIDE; 37 virtual uint32_t GetNumberOfChannels() OVERRIDE;
36 virtual uint32_t GetNumberOfSamples() OVERRIDE; 38 virtual uint32_t GetNumberOfSamples() OVERRIDE;
37 virtual void* GetDataBuffer() OVERRIDE; 39 virtual void* GetDataBuffer() OVERRIDE;
38 virtual uint32_t GetDataBufferSize() OVERRIDE; 40 virtual uint32_t GetDataBufferSize() OVERRIDE;
39 virtual MediaStreamFrame* GetFrameBuffer(); 41 virtual MediaStreamBuffer* GetBuffer() OVERRIDE;
40 virtual int32_t GetFrameBufferIndex(); 42 virtual int32_t GetBufferIndex() OVERRIDE;
41 virtual void Invalidate(); 43 virtual void Invalidate() OVERRIDE;
42 44
43 // Frame index 45 // Frame index
44 int32_t index_; 46 int32_t index_;
45 47
46 MediaStreamFrame* frame_; 48 MediaStreamBuffer* buffer_;
47 49
48 DISALLOW_COPY_AND_ASSIGN(AudioFrameResource); 50 DISALLOW_COPY_AND_ASSIGN(AudioFrameResource);
49 }; 51 };
50 52
51 } // namespace proxy 53 } // namespace proxy
52 } // namespace ppapi 54 } // namespace ppapi
53 55
54 #endif // PPAPI_PROXY_AUDIO_FRAME_RESOURCE_H_ 56 #endif // PPAPI_PROXY_AUDIO_FRAME_RESOURCE_H_
OLDNEW
« no previous file with comments | « ppapi/ppapi_shared.gypi ('k') | ppapi/proxy/audio_frame_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698