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

Side by Side Diff: media/base/android/sdk_media_codec_bridge_unittest.cc

Issue 1982683002: Disable MediaCodecBrdigeTest on unsupported devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/android/sdk_media_codec_bridge.h" 5 #include "media/base/android/sdk_media_codec_bridge.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 kCodecOpus, 48000, 2, dummy_extra_data, sizeof(dummy_extra_data), -1, 0, 265 kCodecOpus, 48000, 2, dummy_extra_data, sizeof(dummy_extra_data), -1, 0,
266 false, nullptr)); 266 false, nullptr));
267 267
268 // Seek Preroll is < 0. 268 // Seek Preroll is < 0.
269 EXPECT_FALSE(media_codec->ConfigureAndStart( 269 EXPECT_FALSE(media_codec->ConfigureAndStart(
270 kCodecOpus, 48000, 2, dummy_extra_data, sizeof(dummy_extra_data), 0, -1, 270 kCodecOpus, 48000, 2, dummy_extra_data, sizeof(dummy_extra_data), 0, -1,
271 false, nullptr)); 271 false, nullptr));
272 } 272 }
273 273
274 TEST(SdkMediaCodecBridgeTest, PresentationTimestampsDoNotDecrease) { 274 TEST(SdkMediaCodecBridgeTest, PresentationTimestampsDoNotDecrease) {
275 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); 275 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE();
qinmin 2016/05/16 18:22:13 nit: remove this?
kraush 2016/05/17 14:49:17 Ah, good point, will do! :)
276 SKIP_TEST_IF_VP8_DECODER_IS_NOT_SUPPORTED();
276 277
277 std::unique_ptr<VideoCodecBridge> media_codec(VideoCodecBridge::CreateDecoder( 278 std::unique_ptr<VideoCodecBridge> media_codec(VideoCodecBridge::CreateDecoder(
278 kCodecVP8, false, gfx::Size(320, 240), nullptr, nullptr)); 279 kCodecVP8, false, gfx::Size(320, 240), nullptr, nullptr));
279 EXPECT_TRUE(media_codec.get()); 280 EXPECT_TRUE(media_codec.get());
280 scoped_refptr<DecoderBuffer> buffer = ReadTestDataFile("vp8-I-frame-320x240"); 281 scoped_refptr<DecoderBuffer> buffer = ReadTestDataFile("vp8-I-frame-320x240");
281 DecodeMediaFrame(media_codec.get(), buffer->data(), buffer->data_size(), 282 DecodeMediaFrame(media_codec.get(), buffer->data(), buffer->data_size(),
282 base::TimeDelta(), base::TimeDelta()); 283 base::TimeDelta(), base::TimeDelta());
283 284
284 // Simulate a seek to 10 seconds, and each chunk has 2 I-frames. 285 // Simulate a seek to 10 seconds, and each chunk has 2 I-frames.
285 std::vector<uint8_t> chunk(buffer->data(), 286 std::vector<uint8_t> chunk(buffer->data(),
(...skipping 13 matching lines...) Expand all
299 } 300 }
300 301
301 TEST(SdkMediaCodecBridgeTest, CreateUnsupportedCodec) { 302 TEST(SdkMediaCodecBridgeTest, CreateUnsupportedCodec) {
302 EXPECT_EQ(nullptr, AudioCodecBridge::Create(kUnknownAudioCodec)); 303 EXPECT_EQ(nullptr, AudioCodecBridge::Create(kUnknownAudioCodec));
303 EXPECT_EQ(nullptr, VideoCodecBridge::CreateDecoder(kUnknownVideoCodec, false, 304 EXPECT_EQ(nullptr, VideoCodecBridge::CreateDecoder(kUnknownVideoCodec, false,
304 gfx::Size(320, 240), 305 gfx::Size(320, 240),
305 nullptr, nullptr)); 306 nullptr, nullptr));
306 } 307 }
307 308
308 } // namespace media 309 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698