OLD | NEW |
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 Loading... |
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()), | 642 decoder_(new media::FFmpegVideoDecoder(base::MessageLoop::current() |
| 643 ->task_runner())), |
643 decode_cb_(base::Bind(&VideoFrameQualityValidator::DecodeDone, | 644 decode_cb_(base::Bind(&VideoFrameQualityValidator::DecodeDone, |
644 base::Unretained(this))), | 645 base::Unretained(this))), |
645 eos_decode_cb_(base::Bind(&VideoFrameQualityValidator::FlushDone, | 646 eos_decode_cb_(base::Bind(&VideoFrameQualityValidator::FlushDone, |
646 base::Unretained(this))), | 647 base::Unretained(this))), |
647 flush_complete_cb_(flush_complete_cb), | 648 flush_complete_cb_(flush_complete_cb), |
648 decode_error_cb_(decode_error_cb), | 649 decode_error_cb_(decode_error_cb), |
649 decoder_state_(UNINITIALIZED) { | 650 decoder_state_(UNINITIALIZED) { |
650 // Allow decoding of individual NALU. Entire frames are required by default. | 651 // Allow decoding of individual NALU. Entire frames are required by default. |
651 decoder_->set_decode_nalus(true); | 652 decoder_->set_decode_nalus(true); |
652 } | 653 } |
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1768 | 1769 |
1769 content::g_env = | 1770 content::g_env = |
1770 reinterpret_cast<content::VideoEncodeAcceleratorTestEnvironment*>( | 1771 reinterpret_cast<content::VideoEncodeAcceleratorTestEnvironment*>( |
1771 testing::AddGlobalTestEnvironment( | 1772 testing::AddGlobalTestEnvironment( |
1772 new content::VideoEncodeAcceleratorTestEnvironment( | 1773 new content::VideoEncodeAcceleratorTestEnvironment( |
1773 test_stream_data.Pass(), log_path, run_at_fps, | 1774 test_stream_data.Pass(), log_path, run_at_fps, |
1774 needs_encode_latency, verify_all_output))); | 1775 needs_encode_latency, verify_all_output))); |
1775 | 1776 |
1776 return RUN_ALL_TESTS(); | 1777 return RUN_ALL_TESTS(); |
1777 } | 1778 } |
OLD | NEW |