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

Side by Side Diff: content/common/gpu/media/gpu_video_encode_accelerator.h

Issue 795633005: Add VDA supported profile to GPUInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ENCODE_ACCELERATOR_H_ 5 #ifndef CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ENCODE_ACCELERATOR_H_
6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ENCODE_ACCELERATOR_H_ 6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ENCODE_ACCELERATOR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 const gfx::Size& input_coded_size, 50 const gfx::Size& input_coded_size,
51 size_t output_buffer_size) override; 51 size_t output_buffer_size) override;
52 void BitstreamBufferReady(int32 bitstream_buffer_id, 52 void BitstreamBufferReady(int32 bitstream_buffer_id,
53 size_t payload_size, 53 size_t payload_size,
54 bool key_frame) override; 54 bool key_frame) override;
55 void NotifyError(media::VideoEncodeAccelerator::Error error) override; 55 void NotifyError(media::VideoEncodeAccelerator::Error error) override;
56 56
57 // GpuCommandBufferStub::DestructionObserver implementation. 57 // GpuCommandBufferStub::DestructionObserver implementation.
58 void OnWillDestroyStub() override; 58 void OnWillDestroyStub() override;
59 59
60 // Static query for supported profiles. This query calls the appropriate 60 // Static query for supported profiles. This query calls the appropriate
61 // platform-specific version. 61 // platform-specific version and stores supported encoder profiles in
62 static std::vector<gpu::VideoEncodeAcceleratorSupportedProfile> 62 // |supported_profiles|. |supported_profiles| would not have duplicate codec
63 GetSupportedProfiles(); 63 // profile.
64 static std::vector<gpu::VideoEncodeAcceleratorSupportedProfile> 64 static void GetSupportedProfiles(
65 ConvertMediaToGpuProfiles(const std::vector< 65 std::vector<gpu::VideoEncodeAcceleratorSupportedProfile>*
66 media::VideoEncodeAccelerator::SupportedProfile>& media_profiles); 66 supported_profiles);
67 67
68 private: 68 private:
69 typedef scoped_ptr<media::VideoEncodeAccelerator>(*CreateVEAFp)(); 69 typedef scoped_ptr<media::VideoEncodeAccelerator>(*CreateVEAFp)();
70 70
71 // Return a set of VEA Create function pointers applicable to the current 71 // Return a set of VEA Create function pointers applicable to the current
72 // platform. 72 // platform.
73 static std::vector<CreateVEAFp> CreateVEAFps(); 73 static std::vector<CreateVEAFp> CreateVEAFps();
74 static scoped_ptr<media::VideoEncodeAccelerator> CreateV4L2VEA(); 74 static scoped_ptr<media::VideoEncodeAccelerator> CreateV4L2VEA();
75 static scoped_ptr<media::VideoEncodeAccelerator> CreateVaapiVEA(); 75 static scoped_ptr<media::VideoEncodeAccelerator> CreateVaapiVEA();
76 static scoped_ptr<media::VideoEncodeAccelerator> CreateAndroidVEA(); 76 static scoped_ptr<media::VideoEncodeAccelerator> CreateAndroidVEA();
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 // Weak pointer for media::VideoFrames that refer back to |this|. 116 // Weak pointer for media::VideoFrames that refer back to |this|.
117 base::WeakPtrFactory<GpuVideoEncodeAccelerator> weak_this_factory_; 117 base::WeakPtrFactory<GpuVideoEncodeAccelerator> weak_this_factory_;
118 118
119 DISALLOW_COPY_AND_ASSIGN(GpuVideoEncodeAccelerator); 119 DISALLOW_COPY_AND_ASSIGN(GpuVideoEncodeAccelerator);
120 }; 120 };
121 121
122 } // namespace content 122 } // namespace content
123 123
124 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ENCODE_ACCELERATOR_H_ 124 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ENCODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698