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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 void VideoDecodeAccelerator::SetCdm(int cdm_id) { | 34 void VideoDecodeAccelerator::SetCdm(int cdm_id) { |
35 NOTREACHED() << "By default CDM is not supported."; | 35 NOTREACHED() << "By default CDM is not supported."; |
36 } | 36 } |
37 | 37 |
38 bool VideoDecodeAccelerator::TryToSetupDecodeOnSeparateThread( | 38 bool VideoDecodeAccelerator::TryToSetupDecodeOnSeparateThread( |
39 const base::WeakPtr<Client>& decode_client, | 39 const base::WeakPtr<Client>& decode_client, |
40 const scoped_refptr<base::SingleThreadTaskRunner>& decode_task_runner) { | 40 const scoped_refptr<base::SingleThreadTaskRunner>& decode_task_runner) { |
41 // Implementations in the process that VDA runs in must override this. | 41 // Implementations in the process that VDA runs in must override this. |
42 LOG(FATAL) << "This may only be called in the same process as VDA impl."; | 42 LOG(FATAL) << "This may only be called in the same process as VDA impl."; |
43 return false; // not reached | 43 return false; |
| 44 } |
| 45 |
| 46 void VideoDecodeAccelerator::ImportBufferForPicture( |
| 47 int32_t picture_buffer_id, |
| 48 const std::vector<gfx::GpuMemoryBufferHandle>& gpu_memory_buffer_handles) { |
| 49 NOTREACHED() << "Buffer import not supported."; |
44 } | 50 } |
45 | 51 |
46 GLenum VideoDecodeAccelerator::GetSurfaceInternalFormat() const { | 52 GLenum VideoDecodeAccelerator::GetSurfaceInternalFormat() const { |
47 return GL_RGBA; | 53 return GL_RGBA; |
48 } | 54 } |
49 | 55 |
| 56 VideoPixelFormat VideoDecodeAccelerator::GetOutputFormat() const { |
| 57 return PIXEL_FORMAT_UNKNOWN; |
| 58 } |
| 59 |
50 VideoDecodeAccelerator::SupportedProfile::SupportedProfile() | 60 VideoDecodeAccelerator::SupportedProfile::SupportedProfile() |
51 : profile(media::VIDEO_CODEC_PROFILE_UNKNOWN), encrypted_only(false) {} | 61 : profile(media::VIDEO_CODEC_PROFILE_UNKNOWN), encrypted_only(false) {} |
52 | 62 |
53 VideoDecodeAccelerator::SupportedProfile::~SupportedProfile() {} | 63 VideoDecodeAccelerator::SupportedProfile::~SupportedProfile() {} |
54 | 64 |
55 VideoDecodeAccelerator::Capabilities::Capabilities() : flags(NO_FLAGS) {} | 65 VideoDecodeAccelerator::Capabilities::Capabilities() : flags(NO_FLAGS) {} |
56 | 66 |
57 VideoDecodeAccelerator::Capabilities::Capabilities(const Capabilities& other) = | 67 VideoDecodeAccelerator::Capabilities::Capabilities(const Capabilities& other) = |
58 default; | 68 default; |
59 | 69 |
(...skipping 15 matching lines...) Expand all Loading... |
75 } // namespace media | 85 } // namespace media |
76 | 86 |
77 namespace std { | 87 namespace std { |
78 | 88 |
79 void default_delete<media::VideoDecodeAccelerator>::operator()( | 89 void default_delete<media::VideoDecodeAccelerator>::operator()( |
80 media::VideoDecodeAccelerator* vda) const { | 90 media::VideoDecodeAccelerator* vda) const { |
81 vda->Destroy(); | 91 vda->Destroy(); |
82 } | 92 } |
83 | 93 |
84 } // namespace std | 94 } // namespace std |
OLD | NEW |