1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ppapi/shared_impl/media_stream_video_track_shared.h"
7 #include "base/logging.h"
11 const int32_t kMaxWidth
= 4096;
12 const int32_t kMaxHeight
= 4096;
19 bool MediaStreamVideoTrackShared::VerifyAttributes(
20 const Attributes
& attributes
) {
21 if (attributes
.buffers
< 0)
23 if (attributes
.format
< PP_VIDEOFRAME_FORMAT_UNKNOWN
||
24 attributes
.format
> PP_VIDEOFRAME_FORMAT_LAST
) {
27 if (attributes
.width
< 0 ||
28 attributes
.width
> kMaxWidth
||
29 attributes
.width
& 0x3) {
32 if (attributes
.height
< 0 ||
33 attributes
.height
> kMaxHeight
||
34 attributes
.height
& 0x3) {