| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "media/base/test_helpers.h" | 5 #include "media/base/test_helpers.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 140 |
| 141 static const gfx::Size kNormalSize(320, 240); | 141 static const gfx::Size kNormalSize(320, 240); |
| 142 static const gfx::Size kLargeSize(640, 480); | 142 static const gfx::Size kLargeSize(640, 480); |
| 143 | 143 |
| 144 // static | 144 // static |
| 145 VideoDecoderConfig TestVideoConfig::Invalid() { | 145 VideoDecoderConfig TestVideoConfig::Invalid() { |
| 146 return GetTestConfig(kUnknownVideoCodec, kNormalSize, false); | 146 return GetTestConfig(kUnknownVideoCodec, kNormalSize, false); |
| 147 } | 147 } |
| 148 | 148 |
| 149 // static | 149 // static |
| 150 VideoDecoderConfig TestVideoConfig::Normal() { | 150 VideoDecoderConfig TestVideoConfig::Normal(VideoCodec codec) { |
| 151 return GetTestConfig(kCodecVP8, kNormalSize, false); | 151 return GetTestConfig(codec, kNormalSize, false); |
| 152 } | 152 } |
| 153 | 153 |
| 154 // static | 154 // static |
| 155 VideoDecoderConfig TestVideoConfig::NormalH264() { | 155 VideoDecoderConfig TestVideoConfig::NormalH264() { |
| 156 return GetTestConfig(kCodecH264, kNormalSize, false); | 156 return GetTestConfig(kCodecH264, kNormalSize, false); |
| 157 } | 157 } |
| 158 | 158 |
| 159 // static | 159 // static |
| 160 VideoDecoderConfig TestVideoConfig::NormalEncrypted() { | 160 VideoDecoderConfig TestVideoConfig::NormalEncrypted(VideoCodec codec) { |
| 161 return GetTestConfig(kCodecVP8, kNormalSize, true); | 161 return GetTestConfig(codec, kNormalSize, true); |
| 162 } | 162 } |
| 163 | 163 |
| 164 // static | 164 // static |
| 165 VideoDecoderConfig TestVideoConfig::Large() { | 165 VideoDecoderConfig TestVideoConfig::Large(VideoCodec codec) { |
| 166 return GetTestConfig(kCodecVP8, kLargeSize, false); | 166 return GetTestConfig(codec, kLargeSize, false); |
| 167 } | 167 } |
| 168 | 168 |
| 169 // static | 169 // static |
| 170 VideoDecoderConfig TestVideoConfig::LargeEncrypted() { | 170 VideoDecoderConfig TestVideoConfig::LargeEncrypted(VideoCodec codec) { |
| 171 return GetTestConfig(kCodecVP8, kLargeSize, true); | 171 return GetTestConfig(codec, kLargeSize, true); |
| 172 } | 172 } |
| 173 | 173 |
| 174 // static | 174 // static |
| 175 gfx::Size TestVideoConfig::NormalCodedSize() { | 175 gfx::Size TestVideoConfig::NormalCodedSize() { |
| 176 return kNormalSize; | 176 return kNormalSize; |
| 177 } | 177 } |
| 178 | 178 |
| 179 // static | 179 // static |
| 180 gfx::Size TestVideoConfig::LargeCodedSize() { | 180 gfx::Size TestVideoConfig::LargeCodedSize() { |
| 181 return kLargeSize; | 181 return kLargeSize; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 int width = 0; | 277 int width = 0; |
| 278 int height = 0; | 278 int height = 0; |
| 279 bool success = pickle.ReadString(&header) && pickle.ReadInt(&width) && | 279 bool success = pickle.ReadString(&header) && pickle.ReadInt(&width) && |
| 280 pickle.ReadInt(&height); | 280 pickle.ReadInt(&height); |
| 281 return (success && header == kFakeVideoBufferHeader && | 281 return (success && header == kFakeVideoBufferHeader && |
| 282 width == config.coded_size().width() && | 282 width == config.coded_size().width() && |
| 283 height == config.coded_size().height()); | 283 height == config.coded_size().height()); |
| 284 } | 284 } |
| 285 | 285 |
| 286 } // namespace media | 286 } // namespace media |
| OLD | NEW |