OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "media/video/video_decode_accelerator.h" | 5 #include "media/video/video_decode_accelerator.h" |
6 | 6 |
7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 | 9 |
10 namespace media { | 10 namespace media { |
11 | 11 |
12 VideoDecodeAccelerator::~VideoDecodeAccelerator() {} | 12 VideoDecodeAccelerator::~VideoDecodeAccelerator() {} |
13 | 13 |
14 bool VideoDecodeAccelerator::CanDecodeOnIOThread() { | 14 bool VideoDecodeAccelerator::CanDecodeOnIOThread() { |
15 // GPU process subclasses must override this. | 15 // GPU process subclasses must override this. |
16 LOG(FATAL) << "This should only get called in the GPU process"; | 16 LOG(FATAL) << "This should only get called in the GPU process"; |
17 return false; // not reached | 17 return false; // not reached |
18 } | 18 } |
19 | 19 |
20 GLenum VideoDecodeAccelerator::GetSurfaceInternalFormat() const { | 20 GLenum VideoDecodeAccelerator::GetSurfaceInternalFormat() const { |
21 return GL_RGBA; | 21 return GL_RGBA; |
22 } | 22 } |
23 | 23 |
24 VideoDecodeAccelerator::SupportedProfile::SupportedProfile() | |
25 : profile(media::VIDEO_CODEC_PROFILE_UNKNOWN), | |
26 max_resolution(gfx::Size(0, 0)), | |
27 min_resolution(gfx::Size(0, 0)) { | |
xhwang
2015/03/26 16:21:48
nit: not needed; this is handled by the default ct
| |
28 } | |
29 | |
30 VideoDecodeAccelerator::SupportedProfile::~SupportedProfile() { | |
31 } | |
32 | |
24 } // namespace media | 33 } // namespace media |
25 | 34 |
26 namespace base { | 35 namespace base { |
27 | 36 |
28 void DefaultDeleter<media::VideoDecodeAccelerator>::operator()( | 37 void DefaultDeleter<media::VideoDecodeAccelerator>::operator()( |
29 void* video_decode_accelerator) const { | 38 void* video_decode_accelerator) const { |
30 static_cast<media::VideoDecodeAccelerator*>(video_decode_accelerator)-> | 39 static_cast<media::VideoDecodeAccelerator*>(video_decode_accelerator)-> |
31 Destroy(); | 40 Destroy(); |
32 } | 41 } |
33 | 42 |
34 } // namespace base | 43 } // namespace base |
35 | 44 |
36 | 45 |
OLD | NEW |