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

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

Issue 11225045: Move a bunch of content\common code into the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 2 months 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 | Annotate | Revision Log
OLDNEW
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
(...skipping 12 matching lines...) Expand all
23 #include "base/memory/scoped_ptr.h" 23 #include "base/memory/scoped_ptr.h"
24 #include "base/message_loop.h" 24 #include "base/message_loop.h"
25 #include "base/process_util.h" 25 #include "base/process_util.h"
26 #include "base/shared_memory.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 "third_party/angle/include/EGL/egl.h" 28 #include "third_party/angle/include/EGL/egl.h"
29 #include "third_party/angle/include/EGL/eglext.h" 29 #include "third_party/angle/include/EGL/eglext.h"
30 #include "ui/gl/gl_bindings.h" 30 #include "ui/gl/gl_bindings.h"
31 #include "ui/gl/gl_surface.h" 31 #include "ui/gl/gl_surface.h"
32 32
33 namespace content {
34
33 // We only request 5 picture buffers from the client which are used to hold the 35 // We only request 5 picture buffers from the client which are used to hold the
34 // decoded samples. These buffers are then reused when the client tells us that 36 // decoded samples. These buffers are then reused when the client tells us that
35 // it is done with the buffer. 37 // it is done with the buffer.
36 static const int kNumPictureBuffers = 5; 38 static const int kNumPictureBuffers = 5;
37 39
38 bool DXVAVideoDecodeAccelerator::pre_sandbox_init_done_ = false; 40 bool DXVAVideoDecodeAccelerator::pre_sandbox_init_done_ = false;
39 uint32 DXVAVideoDecodeAccelerator::dev_manager_reset_token_ = 0; 41 uint32 DXVAVideoDecodeAccelerator::dev_manager_reset_token_ = 0;
40 IDirect3DDeviceManager9* DXVAVideoDecodeAccelerator::device_manager_ = NULL; 42 IDirect3DDeviceManager9* DXVAVideoDecodeAccelerator::device_manager_ = NULL;
41 IDirect3DDevice9Ex* DXVAVideoDecodeAccelerator::device_ = NULL; 43 IDirect3DDevice9Ex* DXVAVideoDecodeAccelerator::device_ = NULL;
42 IDirect3DQuery9* DXVAVideoDecodeAccelerator::query_ = NULL; 44 IDirect3DQuery9* DXVAVideoDecodeAccelerator::query_ = NULL;
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 DoDecode(); 1128 DoDecode();
1127 if (!pending_output_samples_.empty()) 1129 if (!pending_output_samples_.empty())
1128 return; 1130 return;
1129 } 1131 }
1130 1132
1131 MessageLoop::current()->PostTask(FROM_HERE, base::Bind( 1133 MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
1132 &DXVAVideoDecodeAccelerator::NotifyFlushDone, base::AsWeakPtr(this))); 1134 &DXVAVideoDecodeAccelerator::NotifyFlushDone, base::AsWeakPtr(this)));
1133 1135
1134 state_ = kNormal; 1136 state_ = kNormal;
1135 } 1137 }
1138
1139 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698