OLD | NEW |
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 // The bulk of this file is support code; sorry about that. Here's an overview | 5 // The bulk of this file is support code; sorry about that. Here's an overview |
6 // to hopefully help readers of this code: | 6 // to hopefully help readers of this code: |
7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or | 7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or |
8 // Win/EGL. | 8 // Win/EGL. |
9 // - ClientState is an enum for the state of the decode client used by the test. | 9 // - ClientState is an enum for the state of the decode client used by the test. |
10 // - ClientStateNotification is a barrier abstraction that allows the test code | 10 // - ClientStateNotification is a barrier abstraction that allows the test code |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 base::WeakPtr<VideoDecodeAccelerator::Client> weak_client = AsWeakPtr(); | 549 base::WeakPtr<VideoDecodeAccelerator::Client> weak_client = AsWeakPtr(); |
550 if (throttling_client_) { | 550 if (throttling_client_) { |
551 client = throttling_client_.get(); | 551 client = throttling_client_.get(); |
552 weak_client = throttling_client_->AsWeakPtr(); | 552 weak_client = throttling_client_->AsWeakPtr(); |
553 } | 553 } |
554 #if defined(OS_WIN) | 554 #if defined(OS_WIN) |
555 decoder_.reset( | 555 decoder_.reset( |
556 new DXVAVideoDecodeAccelerator(base::Bind(&DoNothingReturnTrue))); | 556 new DXVAVideoDecodeAccelerator(base::Bind(&DoNothingReturnTrue))); |
557 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) | 557 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) |
558 | 558 |
559 scoped_ptr<V4L2Device> device = V4L2Device::Create(); | 559 scoped_ptr<V4L2Device> device = V4L2Device::Create( |
| 560 static_cast<EGLContext>(rendering_helper_->GetGLContext())); |
560 if (!device.get()) { | 561 if (!device.get()) { |
561 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); | 562 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); |
562 return; | 563 return; |
563 } | 564 } |
564 decoder_.reset(new V4L2VideoDecodeAccelerator( | 565 decoder_.reset(new V4L2VideoDecodeAccelerator( |
565 static_cast<EGLDisplay>(rendering_helper_->GetGLDisplay()), | 566 static_cast<EGLDisplay>(rendering_helper_->GetGLDisplay()), |
566 weak_client, | 567 weak_client, |
567 base::Bind(&DoNothingReturnTrue), | 568 base::Bind(&DoNothingReturnTrue), |
568 device.Pass(), | 569 device.Pass(), |
569 base::MessageLoopProxy::current())); | 570 base::MessageLoopProxy::current())); |
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1568 } | 1569 } |
1569 if (it->first == "v" || it->first == "vmodule") | 1570 if (it->first == "v" || it->first == "vmodule") |
1570 continue; | 1571 continue; |
1571 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 1572 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
1572 } | 1573 } |
1573 | 1574 |
1574 base::ShadowingAtExitManager at_exit_manager; | 1575 base::ShadowingAtExitManager at_exit_manager; |
1575 | 1576 |
1576 return RUN_ALL_TESTS(); | 1577 return RUN_ALL_TESTS(); |
1577 } | 1578 } |
OLD | NEW |