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

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

Issue 1912613002: Revert "Reland: Tie kWebRtcH264WithOpenH264FFmpeg and kEnableWebRtcHWH264Encoding flags on Mac" (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « chrome/app/generated_resources.grd ('k') | content/renderer/media/rtc_video_encoder_factory.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/vt_video_encode_accelerator_mac.h" 5 #include "content/common/gpu/media/vt_video_encode_accelerator_mac.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/mac/mac_util.h"
10 #include "base/thread_task_runner_handle.h" 9 #include "base/thread_task_runner_handle.h"
11 #include "media/base/mac/coremedia_glue.h" 10 #include "media/base/mac/coremedia_glue.h"
12 #include "media/base/mac/corevideo_glue.h" 11 #include "media/base/mac/corevideo_glue.h"
13 #include "media/base/mac/video_frame_mac.h" 12 #include "media/base/mac/video_frame_mac.h"
14 13
15 namespace content { 14 namespace content {
16 15
17 namespace { 16 namespace {
18 17
19 // TODO(emircan): Check if we can find the actual system capabilities via 18 // TODO(emircan): Check if we can find the actual system capabilities via
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 DVLOG(3) << __FUNCTION__; 84 DVLOG(3) << __FUNCTION__;
86 DCHECK(thread_checker_.CalledOnValidThread()); 85 DCHECK(thread_checker_.CalledOnValidThread());
87 86
88 SupportedProfiles profiles; 87 SupportedProfiles profiles;
89 // Check if HW encoder is supported initially. 88 // Check if HW encoder is supported initially.
90 videotoolbox_glue_ = VideoToolboxGlue::Get(); 89 videotoolbox_glue_ = VideoToolboxGlue::Get();
91 if (!videotoolbox_glue_) { 90 if (!videotoolbox_glue_) {
92 DLOG(ERROR) << "Failed creating VideoToolbox glue."; 91 DLOG(ERROR) << "Failed creating VideoToolbox glue.";
93 return profiles; 92 return profiles;
94 } 93 }
95 if (!base::mac::IsOSMavericksOrLater()) {
96 DLOG(ERROR) << "VideoToolbox hardware encoder is supported on Mac OS 10.9 "
97 "and later.";
98 return profiles;
99 }
100 const bool rv = CreateCompressionSession( 94 const bool rv = CreateCompressionSession(
101 media::video_toolbox::DictionaryWithKeysAndValues(nullptr, nullptr, 0), 95 media::video_toolbox::DictionaryWithKeysAndValues(nullptr, nullptr, 0),
102 gfx::Size(kDefaultResolutionWidth, kDefaultResolutionHeight), true); 96 gfx::Size(kDefaultResolutionWidth, kDefaultResolutionHeight), true);
103 DestroyCompressionSession(); 97 DestroyCompressionSession();
104 if (!rv) { 98 if (!rv) {
105 VLOG(1) 99 VLOG(1)
106 << "Hardware encode acceleration is not available on this platform."; 100 << "Hardware encode acceleration is not available on this platform.";
107 return profiles; 101 return profiles;
108 } 102 }
109 103
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 (encoder_thread_.IsRunning() && 545 (encoder_thread_.IsRunning() &&
552 encoder_thread_task_runner_->BelongsToCurrentThread())); 546 encoder_thread_task_runner_->BelongsToCurrentThread()));
553 547
554 if (compression_session_) { 548 if (compression_session_) {
555 videotoolbox_glue_->VTCompressionSessionInvalidate(compression_session_); 549 videotoolbox_glue_->VTCompressionSessionInvalidate(compression_session_);
556 compression_session_.reset(); 550 compression_session_.reset();
557 } 551 }
558 } 552 }
559 553
560 } // namespace content 554 } // namespace content
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | content/renderer/media/rtc_video_encoder_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698