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

Side by Side Diff: media/base/test_helpers.cc

Issue 2872223002: media: Set ColorSpace on decoded frames in DecryptingVideoDecoder (Closed)
Patch Set: more fix and test Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | media/filters/decrypting_video_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 run_loop_->Quit(); 125 run_loop_->Quit();
126 } 126 }
127 127
128 static VideoDecoderConfig GetTestConfig(VideoCodec codec, 128 static VideoDecoderConfig GetTestConfig(VideoCodec codec,
129 gfx::Size coded_size, 129 gfx::Size coded_size,
130 bool is_encrypted) { 130 bool is_encrypted) {
131 gfx::Rect visible_rect(coded_size.width(), coded_size.height()); 131 gfx::Rect visible_rect(coded_size.width(), coded_size.height());
132 gfx::Size natural_size = coded_size; 132 gfx::Size natural_size = coded_size;
133 133
134 return VideoDecoderConfig( 134 return VideoDecoderConfig(
135 codec, VIDEO_CODEC_PROFILE_UNKNOWN, PIXEL_FORMAT_YV12, 135 codec, VIDEO_CODEC_PROFILE_UNKNOWN, PIXEL_FORMAT_YV12, COLOR_SPACE_JPEG,
136 COLOR_SPACE_UNSPECIFIED, coded_size, visible_rect, natural_size, 136 coded_size, visible_rect, natural_size, EmptyExtraData(),
137 EmptyExtraData(),
138 is_encrypted ? AesCtrEncryptionScheme() : Unencrypted()); 137 is_encrypted ? AesCtrEncryptionScheme() : Unencrypted());
139 } 138 }
140 139
141 static const gfx::Size kNormalSize(320, 240); 140 static const gfx::Size kNormalSize(320, 240);
142 static const gfx::Size kLargeSize(640, 480); 141 static const gfx::Size kLargeSize(640, 480);
143 142
144 // static 143 // static
145 VideoDecoderConfig TestVideoConfig::Invalid() { 144 VideoDecoderConfig TestVideoConfig::Invalid() {
146 return GetTestConfig(kUnknownVideoCodec, kNormalSize, false); 145 return GetTestConfig(kUnknownVideoCodec, kNormalSize, false);
147 } 146 }
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 int width = 0; 276 int width = 0;
278 int height = 0; 277 int height = 0;
279 bool success = pickle.ReadString(&header) && pickle.ReadInt(&width) && 278 bool success = pickle.ReadString(&header) && pickle.ReadInt(&width) &&
280 pickle.ReadInt(&height); 279 pickle.ReadInt(&height);
281 return (success && header == kFakeVideoBufferHeader && 280 return (success && header == kFakeVideoBufferHeader &&
282 width == config.coded_size().width() && 281 width == config.coded_size().width() &&
283 height == config.coded_size().height()); 282 height == config.coded_size().height());
284 } 283 }
285 284
286 } // namespace media 285 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/filters/decrypting_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698