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 #include "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 state_ = kInitialized; | 106 state_ = kInitialized; |
107 | 107 |
108 message_loop_->PostTask(FROM_HERE, base::Bind( | 108 message_loop_->PostTask(FROM_HERE, base::Bind( |
109 &Client::NotifyInitializeDone, client_)); | 109 &Client::NotifyInitializeDone, client_)); |
110 return true; | 110 return true; |
111 } | 111 } |
112 | 112 |
113 void VaapiVideoDecodeAccelerator::SubmitDecode( | 113 void VaapiVideoDecodeAccelerator::SubmitDecode( |
114 int32 output_id, | 114 int32 output_id, |
115 std::queue<VABufferID>* va_bufs_ptr, | 115 scoped_ptr<std::queue<VABufferID> > va_bufs, |
116 std::queue<VABufferID>* slice_bufs_ptr) { | 116 scoped_ptr<std::queue<VABufferID> > slice_bufs) { |
117 DCHECK_EQ(message_loop_, MessageLoop::current()); | 117 DCHECK_EQ(message_loop_, MessageLoop::current()); |
118 | 118 |
119 scoped_ptr<std::queue<VABufferID> > va_bufs(va_bufs_ptr); | |
120 scoped_ptr<std::queue<VABufferID> > slice_bufs(slice_bufs_ptr); | |
121 | |
122 TRACE_EVENT1("Video Decoder", "VAVDA::Decode", "output_id", output_id); | 119 TRACE_EVENT1("Video Decoder", "VAVDA::Decode", "output_id", output_id); |
123 | 120 |
124 // Handle Destroy() arriving while pictures are queued for output. | 121 // Handle Destroy() arriving while pictures are queued for output. |
125 if (!client_) | 122 if (!client_) |
126 return; | 123 return; |
127 | 124 |
128 RETURN_AND_NOTIFY_ON_FAILURE( | 125 RETURN_AND_NOTIFY_ON_FAILURE( |
129 decoder_.SubmitDecode(output_id, va_bufs.Pass(), slice_bufs.Pass()), | 126 decoder_.SubmitDecode(output_id, va_bufs.Pass(), slice_bufs.Pass()), |
130 "Failed putting picture to texture", | 127 "Failed putting picture to texture", |
131 PLATFORM_FAILURE, ); | 128 PLATFORM_FAILURE, ); |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 void VaapiVideoDecodeAccelerator::PreSandboxInitialization() { | 593 void VaapiVideoDecodeAccelerator::PreSandboxInitialization() { |
597 VaapiH264Decoder::PreSandboxInitialization(); | 594 VaapiH264Decoder::PreSandboxInitialization(); |
598 } | 595 } |
599 | 596 |
600 // static | 597 // static |
601 bool VaapiVideoDecodeAccelerator::PostSandboxInitialization() { | 598 bool VaapiVideoDecodeAccelerator::PostSandboxInitialization() { |
602 return VaapiH264Decoder::PostSandboxInitialization(); | 599 return VaapiH264Decoder::PostSandboxInitialization(); |
603 } | 600 } |
604 | 601 |
605 } // namespace content | 602 } // namespace content |
OLD | NEW |