OLD | NEW |
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // static | 107 // static |
108 std::vector<media::VideoEncodeAccelerator::SupportedProfile> | 108 std::vector<media::VideoEncodeAccelerator::SupportedProfile> |
109 VaapiVideoEncodeAccelerator::GetSupportedProfiles() { | 109 VaapiVideoEncodeAccelerator::GetSupportedProfiles() { |
110 std::vector<SupportedProfile> profiles; | 110 std::vector<SupportedProfile> profiles; |
111 | 111 |
112 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); | 112 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
113 if (!cmd_line->HasSwitch(switches::kEnableVaapiAcceleratedVideoEncode)) | 113 if (cmd_line->HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode)) |
114 return profiles; | 114 return profiles; |
115 | 115 |
116 SupportedProfile profile; | 116 SupportedProfile profile; |
117 profile.profile = media::H264PROFILE_MAIN; | 117 profile.profile = media::H264PROFILE_MAIN; |
118 profile.max_resolution.SetSize(1920, 1088); | 118 profile.max_resolution.SetSize(1920, 1088); |
119 profile.max_framerate.numerator = kDefaultFramerate; | 119 profile.max_framerate.numerator = kDefaultFramerate; |
120 profile.max_framerate.denominator = 1; | 120 profile.max_framerate.denominator = 1; |
121 profiles.push_back(profile); | 121 profiles.push_back(profile); |
122 | 122 |
123 // This is actually only constrained (see crbug.com/345569). | 123 // This is actually only constrained (see crbug.com/345569). |
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1062 } | 1062 } |
1063 | 1063 |
1064 VaapiVideoEncodeAccelerator::EncodeJob::EncodeJob() | 1064 VaapiVideoEncodeAccelerator::EncodeJob::EncodeJob() |
1065 : coded_buffer(VA_INVALID_ID), keyframe(false) { | 1065 : coded_buffer(VA_INVALID_ID), keyframe(false) { |
1066 } | 1066 } |
1067 | 1067 |
1068 VaapiVideoEncodeAccelerator::EncodeJob::~EncodeJob() { | 1068 VaapiVideoEncodeAccelerator::EncodeJob::~EncodeJob() { |
1069 } | 1069 } |
1070 | 1070 |
1071 } // namespace content | 1071 } // namespace content |
OLD | NEW |