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

Side by Side Diff: ppapi/thunk/ppb_audio_encoder_thunk.cc

Issue 1412323002: ppapi: Support up to 32 subsamples in PP_EncryptedBlockInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 // From ppb_audio_encoder.idl modified Mon Sep 7 10:17:53 2015. 5 // From ppb_audio_encoder.idl modified Tue Sep 29 12:48:14 2015.
6 6
7 #include "ppapi/c/pp_completion_callback.h" 7 #include "ppapi/c/pp_completion_callback.h"
8 #include "ppapi/c/pp_errors.h" 8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/c/ppb_audio_encoder.h" 9 #include "ppapi/c/ppb_audio_encoder.h"
10 #include "ppapi/shared_impl/tracked_callback.h" 10 #include "ppapi/shared_impl/tracked_callback.h"
11 #include "ppapi/thunk/enter.h" 11 #include "ppapi/thunk/enter.h"
12 #include "ppapi/thunk/ppapi_thunk_export.h" 12 #include "ppapi/thunk/ppapi_thunk_export.h"
13 #include "ppapi/thunk/ppb_audio_encoder_api.h" 13 #include "ppapi/thunk/ppb_audio_encoder_api.h"
14 14
15 namespace ppapi { 15 namespace ppapi {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 PP_AudioBuffer_SampleRate input_sample_rate, 47 PP_AudioBuffer_SampleRate input_sample_rate,
48 PP_AudioBuffer_SampleSize input_sample_size, 48 PP_AudioBuffer_SampleSize input_sample_size,
49 PP_AudioProfile output_profile, 49 PP_AudioProfile output_profile,
50 uint32_t initial_bitrate, 50 uint32_t initial_bitrate,
51 PP_HardwareAcceleration acceleration, 51 PP_HardwareAcceleration acceleration,
52 struct PP_CompletionCallback callback) { 52 struct PP_CompletionCallback callback) {
53 VLOG(4) << "PPB_AudioEncoder::Initialize()"; 53 VLOG(4) << "PPB_AudioEncoder::Initialize()";
54 EnterResource<PPB_AudioEncoder_API> enter(audio_encoder, callback, true); 54 EnterResource<PPB_AudioEncoder_API> enter(audio_encoder, callback, true);
55 if (enter.failed()) 55 if (enter.failed())
56 return enter.retval(); 56 return enter.retval();
57 return enter.SetResult(enter.object()->Initialize(channels, 57 return enter.SetResult(enter.object()->Initialize(
58 input_sample_rate, 58 channels, input_sample_rate, input_sample_size, output_profile,
59 input_sample_size, 59 initial_bitrate, acceleration, enter.callback()));
60 output_profile,
61 initial_bitrate,
62 acceleration,
63 enter.callback()));
64 } 60 }
65 61
66 int32_t GetNumberOfSamples(PP_Resource audio_encoder) { 62 int32_t GetNumberOfSamples(PP_Resource audio_encoder) {
67 VLOG(4) << "PPB_AudioEncoder::GetNumberOfSamples()"; 63 VLOG(4) << "PPB_AudioEncoder::GetNumberOfSamples()";
68 EnterResource<PPB_AudioEncoder_API> enter(audio_encoder, true); 64 EnterResource<PPB_AudioEncoder_API> enter(audio_encoder, true);
69 if (enter.failed()) 65 if (enter.failed())
70 return enter.retval(); 66 return enter.retval();
71 return enter.object()->GetNumberOfSamples(); 67 return enter.object()->GetNumberOfSamples();
72 } 68 }
73 69
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 &Close}; 140 &Close};
145 141
146 } // namespace 142 } // namespace
147 143
148 PPAPI_THUNK_EXPORT const PPB_AudioEncoder_0_1* GetPPB_AudioEncoder_0_1_Thunk() { 144 PPAPI_THUNK_EXPORT const PPB_AudioEncoder_0_1* GetPPB_AudioEncoder_0_1_Thunk() {
149 return &g_ppb_audioencoder_thunk_0_1; 145 return &g_ppb_audioencoder_thunk_0_1;
150 } 146 }
151 147
152 } // namespace thunk 148 } // namespace thunk
153 } // namespace ppapi 149 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698