summaryrefslogtreecommitdiffstats
path: root/ppapi/shared_impl/media_stream_audio_track_shared.cc
blob: 4a9fdb7dcc05fe3ae9cc7f376bf4fa9f27665df6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ppapi/shared_impl/media_stream_audio_track_shared.h"

namespace ppapi {

// static
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;
}

}  // namespace ppapi