Commit 8396651c authored by wuchengli's avatar wuchengli Committed by Commit bot

Make V4L2VEA GetSupportedProfiles static.

VEA supported profiles are added to GPUInfo when GPU
process starts. But the video devices are not ready
yet at that time. We need a low risk way to fix this
in M39. Make V4L2VEA GetSupportedProfiles static so we
can merge it back to M39. This will be fixed later in
a proper way.

BUG=418762
TEST=Reboot on peach pit and run apprtc loopback.

Review URL: https://codereview.chromium.org/650183002

Cr-Commit-Position: refs/heads/master@{#299453}
parent a639a521
......@@ -165,6 +165,12 @@ void GpuVideoEncodeAccelerator::OnWillDestroyStub() {
// static
std::vector<media::VideoEncodeAccelerator::SupportedProfile>
GpuVideoEncodeAccelerator::GetSupportedProfiles() {
#if defined(OS_CHROMEOS) && defined(USE_X11) && defined(ARCH_CPU_ARMEL)
// This is a work-around for M39 because the video device is not ready at
// boot.
// TODO(wuchengli): remove this after http://crbug.com/418762 is fixed.
return V4L2VideoEncodeAccelerator::GetSupportedProfilesStatic();
#endif
scoped_ptr<media::VideoEncodeAccelerator> encoder = CreateEncoder();
if (!encoder)
return std::vector<media::VideoEncodeAccelerator::SupportedProfile>();
......
......@@ -282,6 +282,11 @@ void V4L2VideoEncodeAccelerator::Destroy() {
std::vector<media::VideoEncodeAccelerator::SupportedProfile>
V4L2VideoEncodeAccelerator::GetSupportedProfiles() {
return GetSupportedProfilesStatic();
}
std::vector<media::VideoEncodeAccelerator::SupportedProfile>
V4L2VideoEncodeAccelerator::GetSupportedProfilesStatic() {
std::vector<SupportedProfile> profiles;
SupportedProfile profile;
......
......@@ -45,6 +45,9 @@ class CONTENT_EXPORT V4L2VideoEncodeAccelerator
explicit V4L2VideoEncodeAccelerator(scoped_ptr<V4L2Device> device);
virtual ~V4L2VideoEncodeAccelerator();
static std::vector<media::VideoEncodeAccelerator::SupportedProfile>
GetSupportedProfilesStatic();
// media::VideoEncodeAccelerator implementation.
virtual std::vector<media::VideoEncodeAccelerator::SupportedProfile>
GetSupportedProfiles() override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment