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 "content/common/gpu/media/dxva_video_decode_accelerator.h" | 5 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" |
6 | 6 |
7 #if !defined(OS_WIN) | 7 #if !defined(OS_WIN) |
8 #error This file should only be built on Windows. | 8 #error This file should only be built on Windows. |
9 #endif // !defined(OS_WIN) | 9 #endif // !defined(OS_WIN) |
10 | 10 |
11 #include <ks.h> | 11 #include <ks.h> |
12 #include <codecapi.h> | 12 #include <codecapi.h> |
13 #include <mfapi.h> | 13 #include <mfapi.h> |
14 #include <mferror.h> | 14 #include <mferror.h> |
15 #include <wmcodecdsp.h> | 15 #include <wmcodecdsp.h> |
16 | 16 |
17 #include "base/bind.h" | 17 #include "base/bind.h" |
18 #include "base/callback.h" | 18 #include "base/callback.h" |
19 #include "base/command_line.h" | 19 #include "base/command_line.h" |
20 #include "base/debug/trace_event.h" | 20 #include "base/debug/trace_event.h" |
21 #include "base/logging.h" | 21 #include "base/logging.h" |
22 #include "base/memory/scoped_handle.h" | 22 #include "base/memory/scoped_handle.h" |
23 #include "base/memory/scoped_ptr.h" | 23 #include "base/memory/scoped_ptr.h" |
| 24 #include "base/memory/shared_memory.h" |
24 #include "base/message_loop.h" | 25 #include "base/message_loop.h" |
25 #include "base/process_util.h" | 26 #include "base/process_util.h" |
26 #include "base/shared_memory.h" | |
27 #include "media/video/video_decode_accelerator.h" | 27 #include "media/video/video_decode_accelerator.h" |
28 #include "ui/gl/gl_bindings.h" | 28 #include "ui/gl/gl_bindings.h" |
29 #include "ui/gl/gl_surface_egl.h" | 29 #include "ui/gl/gl_surface_egl.h" |
30 #include "ui/gl/gl_switches.h" | 30 #include "ui/gl/gl_switches.h" |
31 | 31 |
32 namespace content { | 32 namespace content { |
33 | 33 |
34 // We only request 5 picture buffers from the client which are used to hold the | 34 // We only request 5 picture buffers from the client which are used to hold the |
35 // decoded samples. These buffers are then reused when the client tells us that | 35 // decoded samples. These buffers are then reused when the client tells us that |
36 // it is done with the buffer. | 36 // it is done with the buffer. |
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1127 // Do some more investigation into whether it is possible to get the MFT | 1127 // Do some more investigation into whether it is possible to get the MFT |
1128 // decoder to emit an output packet for every input packet. | 1128 // decoder to emit an output packet for every input packet. |
1129 // http://code.google.com/p/chromium/issues/detail?id=108121 | 1129 // http://code.google.com/p/chromium/issues/detail?id=108121 |
1130 // http://code.google.com/p/chromium/issues/detail?id=150925 | 1130 // http://code.google.com/p/chromium/issues/detail?id=150925 |
1131 base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind( | 1131 base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind( |
1132 &DXVAVideoDecodeAccelerator::NotifyInputBufferRead, | 1132 &DXVAVideoDecodeAccelerator::NotifyInputBufferRead, |
1133 base::AsWeakPtr(this), input_buffer_id)); | 1133 base::AsWeakPtr(this), input_buffer_id)); |
1134 } | 1134 } |
1135 | 1135 |
1136 } // namespace content | 1136 } // namespace content |
OLD | NEW |