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

Side by Side Diff: media/gpu/ipc/service/gpu_video_encode_accelerator.cc

Issue 2668293002: VPX HW encode using MediaFoundation
Patch Set: adding all Created 3 years, 10 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/base/win/mf_helpers.h ('k') | media/gpu/media_foundation_video_encode_accelerator_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "media/gpu/ipc/service/gpu_video_encode_accelerator.h" 5 #include "media/gpu/ipc/service/gpu_video_encode_accelerator.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 vea_factory_functions.push_back(base::Bind(&CreateVaapiVEA)); 362 vea_factory_functions.push_back(base::Bind(&CreateVaapiVEA));
363 #endif 363 #endif
364 #if defined(OS_ANDROID) && BUILDFLAG(ENABLE_WEBRTC) 364 #if defined(OS_ANDROID) && BUILDFLAG(ENABLE_WEBRTC)
365 if (!gpu_preferences.disable_web_rtc_hw_encoding) 365 if (!gpu_preferences.disable_web_rtc_hw_encoding)
366 vea_factory_functions.push_back(base::Bind(&CreateAndroidVEA)); 366 vea_factory_functions.push_back(base::Bind(&CreateAndroidVEA));
367 #endif 367 #endif
368 #if defined(OS_MACOSX) 368 #if defined(OS_MACOSX)
369 vea_factory_functions.push_back(base::Bind(&CreateVTVEA)); 369 vea_factory_functions.push_back(base::Bind(&CreateVTVEA));
370 #endif 370 #endif
371 #if defined(OS_WIN) 371 #if defined(OS_WIN)
372 if (base::FeatureList::IsEnabled(kMediaFoundationH264Encoding)) 372 if (base::FeatureList::IsEnabled(kMediaFoundationH264Encoding) ||
373 base::FeatureList::IsEnabled(kMediaFoundationVPXEncoding))
373 vea_factory_functions.push_back(base::Bind(&CreateMediaFoundationVEA)); 374 vea_factory_functions.push_back(base::Bind(&CreateMediaFoundationVEA));
374 #endif 375 #endif
375 return vea_factory_functions; 376 return vea_factory_functions;
376 } 377 }
377 378
378 void GpuVideoEncodeAccelerator::OnFilterRemoved() { 379 void GpuVideoEncodeAccelerator::OnFilterRemoved() {
379 DVLOG(2) << __func__; 380 DVLOG(2) << __func__;
380 DCHECK(io_task_runner_->BelongsToCurrentThread()); 381 DCHECK(io_task_runner_->BelongsToCurrentThread());
381 382
382 // We're destroying; cancel all callbacks. 383 // We're destroying; cancel all callbacks.
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 DLOG(ERROR) << __func__ << " failed."; 537 DLOG(ERROR) << __func__ << " failed.";
537 } 538 }
538 } 539 }
539 540
540 bool GpuVideoEncodeAccelerator::CheckIfCalledOnCorrectThread() { 541 bool GpuVideoEncodeAccelerator::CheckIfCalledOnCorrectThread() {
541 return (filter_ && io_task_runner_->BelongsToCurrentThread()) || 542 return (filter_ && io_task_runner_->BelongsToCurrentThread()) ||
542 (!filter_ && main_task_runner_->BelongsToCurrentThread()); 543 (!filter_ && main_task_runner_->BelongsToCurrentThread());
543 } 544 }
544 545
545 } // namespace media 546 } // namespace media
OLDNEW
« no previous file with comments | « media/base/win/mf_helpers.h ('k') | media/gpu/media_foundation_video_encode_accelerator_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698