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

Side by Side Diff: content/common/gpu/media/vaapi_video_encode_accelerator.cc

Issue 668633002: Duplicate VideoEncodeAccelerator::SupportedProfile in gpu_info.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/common/gpu/media/vaapi_video_encode_accelerator.h" 5 #include "content/common/gpu/media/vaapi_video_encode_accelerator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 }; 97 };
98 98
99 struct VaapiVideoEncodeAccelerator::BitstreamBufferRef { 99 struct VaapiVideoEncodeAccelerator::BitstreamBufferRef {
100 BitstreamBufferRef(int32 id, scoped_ptr<base::SharedMemory> shm, size_t size) 100 BitstreamBufferRef(int32 id, scoped_ptr<base::SharedMemory> shm, size_t size)
101 : id(id), shm(shm.Pass()), size(size) {} 101 : id(id), shm(shm.Pass()), size(size) {}
102 const int32 id; 102 const int32 id;
103 const scoped_ptr<base::SharedMemory> shm; 103 const scoped_ptr<base::SharedMemory> shm;
104 const size_t size; 104 const size_t size;
105 }; 105 };
106 106
107 std::vector<media::VideoEncodeAccelerator::SupportedProfile> 107 std::vector<gpu::VideoEncodeAcceleratorSupportedProfile>
108 VaapiVideoEncodeAccelerator::GetSupportedProfiles() { 108 VaapiVideoEncodeAccelerator::GetSupportedProfiles() {
109 std::vector<SupportedProfile> profiles; 109 std::vector<gpu::VideoEncodeAcceleratorSupportedProfile> profiles;
110 110
111 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); 111 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
112 if (cmd_line->HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode)) 112 if (cmd_line->HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode))
113 return profiles; 113 return profiles;
114 114
115 std::vector<media::VideoCodecProfile> hw_profiles = 115 std::vector<media::VideoCodecProfile> hw_profiles =
116 VaapiWrapper::GetSupportedEncodeProfiles( 116 VaapiWrapper::GetSupportedEncodeProfiles(
117 x_display_, base::Bind(&base::DoNothing)); 117 x_display_, base::Bind(&base::DoNothing));
118 118
119 media::VideoEncodeAccelerator::SupportedProfile profile; 119 gpu::VideoEncodeAcceleratorSupportedProfile profile;
120 profile.max_resolution.SetSize(1920, 1088); 120 profile.max_resolution.SetSize(1920, 1088);
121 profile.max_framerate_numerator = kDefaultFramerate; 121 profile.max_framerate_numerator = kDefaultFramerate;
122 profile.max_framerate_denominator = 1; 122 profile.max_framerate_denominator = 1;
123 for (size_t i = 0; i < hw_profiles.size(); i++) { 123 for (size_t i = 0; i < hw_profiles.size(); i++) {
124 profile.profile = hw_profiles[i]; 124 profile.profile = hw_profiles[i];
125 profiles.push_back(profile); 125 profiles.push_back(profile);
126 } 126 }
127 return profiles; 127 return profiles;
128 } 128 }
129 129
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 } 1059 }
1060 1060
1061 VaapiVideoEncodeAccelerator::EncodeJob::EncodeJob() 1061 VaapiVideoEncodeAccelerator::EncodeJob::EncodeJob()
1062 : coded_buffer(VA_INVALID_ID), keyframe(false) { 1062 : coded_buffer(VA_INVALID_ID), keyframe(false) {
1063 } 1063 }
1064 1064
1065 VaapiVideoEncodeAccelerator::EncodeJob::~EncodeJob() { 1065 VaapiVideoEncodeAccelerator::EncodeJob::~EncodeJob() {
1066 } 1066 }
1067 1067
1068 } // namespace content 1068 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698