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

Side by Side Diff: media/video/video_decode_accelerator.cc

Issue 1822983002: Support external buffer import in VDA interface and add a V4L2SVDA impl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « media/video/video_decode_accelerator.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « media/video/video_decode_accelerator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698