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