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

Unified Diff: ppapi/thunk/ppb_audio_frame_thunk.cc

Issue 140783004: [PPAPI] Pepper MediaStream API audio track implementation and example. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/thunk/ppb_audio_frame_api.h ('k') | ppapi/thunk/ppb_media_stream_audio_track_thunk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_audio_frame_thunk.cc
diff --git a/ppapi/thunk/ppb_audio_frame_thunk.cc b/ppapi/thunk/ppb_audio_frame_thunk.cc
index 18cfdc4cdf7907a10ac0a0aa77ca9787152b73cc..692af87612dfcf8849a3709c91f428a903c2fde3 100644
--- a/ppapi/thunk/ppb_audio_frame_thunk.cc
+++ b/ppapi/thunk/ppb_audio_frame_thunk.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// From ppb_audio_frame.idl modified Wed Jan 22 09:11:35 2014.
+// From ppb_audio_frame.idl modified Thu Jan 23 15:09:57 2014.
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/ppb_audio_frame.h"
@@ -38,6 +38,14 @@ void SetTimestamp(PP_Resource frame, PP_TimeDelta timestamp) {
enter.object()->SetTimestamp(timestamp);
}
+PP_AudioFrame_SampleRate GetSampleRate(PP_Resource frame) {
+ VLOG(4) << "PPB_AudioFrame::GetSampleRate()";
+ EnterResource<PPB_AudioFrame_API> enter(frame, true);
+ if (enter.failed())
+ return PP_AUDIOFRAME_SAMPLERATE_UNKNOWN;
+ return enter.object()->GetSampleRate();
+}
+
PP_AudioFrame_SampleSize GetSampleSize(PP_Resource frame) {
VLOG(4) << "PPB_AudioFrame::GetSampleSize()";
EnterResource<PPB_AudioFrame_API> enter(frame, true);
@@ -82,6 +90,7 @@ const PPB_AudioFrame_0_1 g_ppb_audioframe_thunk_0_1 = {
&IsAudioFrame,
&GetTimestamp,
&SetTimestamp,
+ &GetSampleRate,
&GetSampleSize,
&GetNumberOfChannels,
&GetNumberOfSamples,
« no previous file with comments | « ppapi/thunk/ppb_audio_frame_api.h ('k') | ppapi/thunk/ppb_media_stream_audio_track_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698