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

Unified Diff: ppapi/shared_impl/media_stream_audio_track_shared.cc

Issue 414643003: Support configuring the audio buffer duration in the Pepper MediaStream API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add clarifying comment about buffer size. Created 6 years, 5 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
Index: ppapi/shared_impl/media_stream_audio_track_shared.cc
diff --git a/ppapi/shared_impl/media_stream_audio_track_shared.cc b/ppapi/shared_impl/media_stream_audio_track_shared.cc
index ac649547d8c8bb32ac6248ef6de66033ef879641..4a9fdb7dcc05fe3ae9cc7f376bf4fa9f27665df6 100644
--- a/ppapi/shared_impl/media_stream_audio_track_shared.cc
+++ b/ppapi/shared_impl/media_stream_audio_track_shared.cc
@@ -11,6 +11,9 @@ bool MediaStreamAudioTrackShared::VerifyAttributes(
const Attributes& attributes) {
if (attributes.buffers < 0)
return false;
+ if (!(attributes.duration == 0 ||
+ (attributes.duration >= 10 && attributes.duration <= 10000)))
+ return false;
return true;
}

Powered by Google App Engine
This is Rietveld 408576698