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

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

Issue 1128023009: ppapi: define PPB_AudioEncoder API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bbudge's nits & api release bump Created 5 years, 3 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
OLDNEW
(Empty)
1 // Copyright 2015 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_AUDIO_ENCODER_RESOURCE_H_
6 #define PPAPI_PROXY_AUDIO_ENCODER_RESOURCE_H_
7
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/scoped_vector.h"
12 #include "ppapi/proxy/connection.h"
13 #include "ppapi/proxy/plugin_resource.h"
14 #include "ppapi/shared_impl/resource.h"
15 #include "ppapi/thunk/ppb_audio_encoder_api.h"
16
17 namespace ppapi {
18
19 class TrackedCallback;
20
21 namespace proxy {
22
23 class SerializedHandle;
24 class VideoFrameResource;
25
26 class PPAPI_PROXY_EXPORT AudioEncoderResource
27 : public PluginResource,
28 public thunk::PPB_AudioEncoder_API {
29 public:
30 AudioEncoderResource(Connection connection, PP_Instance instance);
31 ~AudioEncoderResource() override;
32
33 thunk::PPB_AudioEncoder_API* AsPPB_AudioEncoder_API() override;
34
35 private:
36 // PPB_AduioEncoder_API implementation.
37 int32_t GetSupportedProfiles(
38 const PP_ArrayOutput& output,
39 const scoped_refptr<TrackedCallback>& callback) override;
40 int32_t Initialize(uint32_t channels,
41 PP_AudioBuffer_SampleRate input_sample_rate,
42 PP_AudioBuffer_SampleSize input_sample_size,
43 PP_AudioProfile output_profile,
44 uint32_t initial_bitrate,
45 PP_HardwareAcceleration acceleration,
46 const scoped_refptr<TrackedCallback>& callback) override;
47 int32_t GetNumberOfSamples() override;
48 int32_t GetBuffer(PP_Resource* audio_buffer,
49 const scoped_refptr<TrackedCallback>& callback) override;
50 int32_t Encode(PP_Resource audio_buffer,
51 const scoped_refptr<TrackedCallback>& callback) override;
52 int32_t GetBitstreamBuffer(
53 PP_AudioBitstreamBuffer* bitstream_buffer,
54 const scoped_refptr<TrackedCallback>& callback) override;
55 void RecycleBitstreamBuffer(
56 const PP_AudioBitstreamBuffer* bitstream_buffer) override;
57 void RequestBitrateChange(uint32_t bitrate) override;
58 void Close() override;
59
60 DISALLOW_COPY_AND_ASSIGN(AudioEncoderResource);
61 };
62
63 } // namespace proxy
64 } // namespace ppapi
65
66 #endif // PPAPI_PROXY_AUDIO_ENCODER_RESOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698