146d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved.
246d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
346d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)// found in the LICENSE file.
446d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)
546d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)#include "ppapi/shared_impl/media_stream_audio_track_shared.h"
646d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)
746d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)namespace ppapi {
846d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)
946d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)// static
1046d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)bool MediaStreamAudioTrackShared::VerifyAttributes(
1146d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)    const Attributes& attributes) {
1246d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)  if (attributes.buffers < 0)
1346d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)    return false;
145f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)  if (!(attributes.duration == 0 ||
155f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)        (attributes.duration >= 10 && attributes.duration <= 10000)))
165f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)    return false;
1746d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)  return true;
1846d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)}
1946d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)
2046d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)}  // namespace ppapi
21