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 { |
(...skipping 16 matching lines...) Expand all Loading... |
27 void VideoDecodeAccelerator::Client::NotifyCdmAttached(bool success) { | 27 void VideoDecodeAccelerator::Client::NotifyCdmAttached(bool success) { |
28 NOTREACHED() << "By default CDM is not supported."; | 28 NOTREACHED() << "By default CDM is not supported."; |
29 } | 29 } |
30 | 30 |
31 VideoDecodeAccelerator::~VideoDecodeAccelerator() {} | 31 VideoDecodeAccelerator::~VideoDecodeAccelerator() {} |
32 | 32 |
33 void VideoDecodeAccelerator::SetCdm(int cdm_id) { | 33 void VideoDecodeAccelerator::SetCdm(int cdm_id) { |
34 NOTREACHED() << "By default CDM is not supported."; | 34 NOTREACHED() << "By default CDM is not supported."; |
35 } | 35 } |
36 | 36 |
37 bool VideoDecodeAccelerator::CanDecodeOnIOThread() { | 37 bool VideoDecodeAccelerator::TryToSetupDecodeOnSeparateThread( |
38 // GPU process subclasses must override this. | 38 const base::WeakPtr<Client>& decode_client, |
39 LOG(FATAL) << "This should only get called in the GPU process"; | 39 const scoped_refptr<base::SingleThreadTaskRunner>& decode_task_runner) { |
| 40 // Implementations in the process that VDA runs in must override this. |
| 41 LOG(FATAL) << "This may only be called in the same process as VDA impl."; |
40 return false; // not reached | 42 return false; // not reached |
41 } | 43 } |
42 | 44 |
43 GLenum VideoDecodeAccelerator::GetSurfaceInternalFormat() const { | 45 GLenum VideoDecodeAccelerator::GetSurfaceInternalFormat() const { |
44 return GL_RGBA; | 46 return GL_RGBA; |
45 } | 47 } |
46 | 48 |
47 VideoDecodeAccelerator::SupportedProfile::SupportedProfile() | 49 VideoDecodeAccelerator::SupportedProfile::SupportedProfile() |
48 : profile(media::VIDEO_CODEC_PROFILE_UNKNOWN), encrypted_only(false) {} | 50 : profile(media::VIDEO_CODEC_PROFILE_UNKNOWN), encrypted_only(false) {} |
49 | 51 |
(...skipping 22 matching lines...) Expand all Loading... |
72 } // namespace media | 74 } // namespace media |
73 | 75 |
74 namespace std { | 76 namespace std { |
75 | 77 |
76 void default_delete<media::VideoDecodeAccelerator>::operator()( | 78 void default_delete<media::VideoDecodeAccelerator>::operator()( |
77 media::VideoDecodeAccelerator* vda) const { | 79 media::VideoDecodeAccelerator* vda) const { |
78 vda->Destroy(); | 80 vda->Destroy(); |
79 } | 81 } |
80 | 82 |
81 } // namespace std | 83 } // namespace std |
OLD | NEW |