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

Side by Side Diff: content/common/gpu/media/video_encode_accelerator_unittest.cc

Issue 1456993004: media::FFmpegVideoDecoder: remove ctor param |task_runner| and use a ThreadChecker instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | content/renderer/pepper/video_decoder_shim.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <inttypes.h> 5 #include <inttypes.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 10
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 State decoder_state_; 632 State decoder_state_;
633 std::queue<scoped_refptr<media::VideoFrame>> original_frames_; 633 std::queue<scoped_refptr<media::VideoFrame>> original_frames_;
634 std::queue<scoped_refptr<media::DecoderBuffer>> decode_buffers_; 634 std::queue<scoped_refptr<media::DecoderBuffer>> decode_buffers_;
635 }; 635 };
636 636
637 VideoFrameQualityValidator::VideoFrameQualityValidator( 637 VideoFrameQualityValidator::VideoFrameQualityValidator(
638 const media::VideoCodecProfile profile, 638 const media::VideoCodecProfile profile,
639 const base::Closure& flush_complete_cb, 639 const base::Closure& flush_complete_cb,
640 const base::Closure& decode_error_cb) 640 const base::Closure& decode_error_cb)
641 : profile_(profile), 641 : profile_(profile),
642 decoder_(new media::FFmpegVideoDecoder(base::MessageLoop::current() 642 decoder_(new media::FFmpegVideoDecoder()),
643 ->task_runner())),
644 decode_cb_(base::Bind(&VideoFrameQualityValidator::DecodeDone, 643 decode_cb_(base::Bind(&VideoFrameQualityValidator::DecodeDone,
645 base::Unretained(this))), 644 base::Unretained(this))),
646 eos_decode_cb_(base::Bind(&VideoFrameQualityValidator::FlushDone, 645 eos_decode_cb_(base::Bind(&VideoFrameQualityValidator::FlushDone,
647 base::Unretained(this))), 646 base::Unretained(this))),
648 flush_complete_cb_(flush_complete_cb), 647 flush_complete_cb_(flush_complete_cb),
649 decode_error_cb_(decode_error_cb), 648 decode_error_cb_(decode_error_cb),
650 decoder_state_(UNINITIALIZED) { 649 decoder_state_(UNINITIALIZED) {
651 // Allow decoding of individual NALU. Entire frames are required by default. 650 // Allow decoding of individual NALU. Entire frames are required by default.
652 decoder_->set_decode_nalus(true); 651 decoder_->set_decode_nalus(true);
653 } 652 }
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1769 1768
1770 content::g_env = 1769 content::g_env =
1771 reinterpret_cast<content::VideoEncodeAcceleratorTestEnvironment*>( 1770 reinterpret_cast<content::VideoEncodeAcceleratorTestEnvironment*>(
1772 testing::AddGlobalTestEnvironment( 1771 testing::AddGlobalTestEnvironment(
1773 new content::VideoEncodeAcceleratorTestEnvironment( 1772 new content::VideoEncodeAcceleratorTestEnvironment(
1774 test_stream_data.Pass(), log_path, run_at_fps, 1773 test_stream_data.Pass(), log_path, run_at_fps,
1775 needs_encode_latency, verify_all_output))); 1774 needs_encode_latency, verify_all_output)));
1776 1775
1777 return RUN_ALL_TESTS(); 1776 return RUN_ALL_TESTS();
1778 } 1777 }
OLDNEW
« no previous file with comments | « no previous file | content/renderer/pepper/video_decoder_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698