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

Side by Side Diff: media/cast/sender/h264_vt_encoder_unittest.cc

Issue 2572883002: Convert USE_PROPRIETARY_CODECS to a buildflag header. (Closed)
Patch Set: Merge Created 4 years 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 | « media/blink/webcontentdecryptionmodulesession_impl.cc ('k') | media/cdm/aes_decryptor.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 2014 The Chromium Authors. All rights reserved. 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 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <queue> 7 #include <queue>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 12 matching lines...) Expand all
23 #include "media/base/media_util.h" 23 #include "media/base/media_util.h"
24 #include "media/cast/common/rtp_time.h" 24 #include "media/cast/common/rtp_time.h"
25 #include "media/cast/constants.h" 25 #include "media/cast/constants.h"
26 #include "media/cast/sender/h264_vt_encoder.h" 26 #include "media/cast/sender/h264_vt_encoder.h"
27 #include "media/cast/sender/video_frame_factory.h" 27 #include "media/cast/sender/video_frame_factory.h"
28 #include "media/cast/test/utility/default_config.h" 28 #include "media/cast/test/utility/default_config.h"
29 #include "media/cast/test/utility/video_utility.h" 29 #include "media/cast/test/utility/video_utility.h"
30 #include "media/ffmpeg/ffmpeg_common.h" 30 #include "media/ffmpeg/ffmpeg_common.h"
31 #include "media/filters/ffmpeg_glue.h" 31 #include "media/filters/ffmpeg_glue.h"
32 #include "media/filters/ffmpeg_video_decoder.h" 32 #include "media/filters/ffmpeg_video_decoder.h"
33 #include "media/media_features.h"
33 #include "testing/gtest/include/gtest/gtest.h" 34 #include "testing/gtest/include/gtest/gtest.h"
34 35
35 namespace { 36 namespace {
36 37
37 const int kVideoWidth = 1280; 38 const int kVideoWidth = 1280;
38 const int kVideoHeight = 720; 39 const int kVideoHeight = 720;
39 40
40 class MediaTestSuite : public base::TestSuite { 41 class MediaTestSuite : public base::TestSuite {
41 public: 42 public:
42 MediaTestSuite(int argc, char** argv) : TestSuite(argc, argv) {} 43 MediaTestSuite(int argc, char** argv) : TestSuite(argc, argv) {}
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 clock_->NowTicks()); 293 clock_->NowTicks());
293 EXPECT_TRUE(encoder_->EncodeVideoFrame(frame_, clock_->NowTicks(), cb)); 294 EXPECT_TRUE(encoder_->EncodeVideoFrame(frame_, clock_->NowTicks(), cb));
294 } 295 }
295 296
296 encoder_.reset(); 297 encoder_.reset();
297 base::RunLoop().RunUntilIdle(); 298 base::RunLoop().RunUntilIdle();
298 299
299 EXPECT_EQ(10, metadata_recorder->count_frames_delivered()); 300 EXPECT_EQ(10, metadata_recorder->count_frames_delivered());
300 } 301 }
301 302
302 #if defined(USE_PROPRIETARY_CODECS) 303 #if BUILDFLAG(USE_PROPRIETARY_CODECS)
303 // Failed on mac_chromium_rel_ng trybot. http://crbug.com/627260 304 // Failed on mac_chromium_rel_ng trybot. http://crbug.com/627260
304 TEST_F(H264VideoToolboxEncoderTest, DISABLED_CheckFramesAreDecodable) { 305 TEST_F(H264VideoToolboxEncoderTest, DISABLED_CheckFramesAreDecodable) {
305 VideoDecoderConfig config(kCodecH264, H264PROFILE_MAIN, frame_->format(), 306 VideoDecoderConfig config(kCodecH264, H264PROFILE_MAIN, frame_->format(),
306 COLOR_SPACE_UNSPECIFIED, frame_->coded_size(), 307 COLOR_SPACE_UNSPECIFIED, frame_->coded_size(),
307 frame_->visible_rect(), frame_->natural_size(), 308 frame_->visible_rect(), frame_->natural_size(),
308 EmptyExtraData(), Unencrypted()); 309 EmptyExtraData(), Unencrypted());
309 scoped_refptr<EndToEndFrameChecker> checker(new EndToEndFrameChecker(config)); 310 scoped_refptr<EndToEndFrameChecker> checker(new EndToEndFrameChecker(config));
310 311
311 VideoEncoder::FrameEncodedCallback cb = 312 VideoEncoder::FrameEncodedCallback cb =
312 base::Bind(&EndToEndFrameChecker::EncodeDone, checker.get()); 313 base::Bind(&EndToEndFrameChecker::EncodeDone, checker.get());
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 gfx::Size(kVideoWidth, kVideoHeight), base::TimeDelta())); 404 gfx::Size(kVideoWidth, kVideoHeight), base::TimeDelta()));
404 405
405 // After a power resume event, the factory should produce frames right away 406 // After a power resume event, the factory should produce frames right away
406 // because the encoder re-initializes on its own. 407 // because the encoder re-initializes on its own.
407 power_source_->GenerateResumeEvent(); 408 power_source_->GenerateResumeEvent();
408 CreateFrameAndMemsetPlane(video_frame_factory.get()); 409 CreateFrameAndMemsetPlane(video_frame_factory.get());
409 } 410 }
410 411
411 } // namespace cast 412 } // namespace cast
412 } // namespace media 413 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webcontentdecryptionmodulesession_impl.cc ('k') | media/cdm/aes_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698