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

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

Issue 2598313002: Use GetProfileName() for error logs in gpu_video_decode_accelerator.cc (Closed)
Patch Set: Use GetProfileName() to better explain logs displaying VideoCodecProfile. Created 3 years, 11 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/gpu/video_encode_accelerator_unittest.cc ('k') | no next file » | 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 "media/gpu/vt_video_encode_accelerator_mac.h" 5 #include "media/gpu/vt_video_encode_accelerator_mac.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "media/base/mac/video_frame_mac.h" 10 #include "media/base/mac/video_frame_mac.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 return profiles; 116 return profiles;
117 } 117 }
118 118
119 bool VTVideoEncodeAccelerator::Initialize(VideoPixelFormat format, 119 bool VTVideoEncodeAccelerator::Initialize(VideoPixelFormat format,
120 const gfx::Size& input_visible_size, 120 const gfx::Size& input_visible_size,
121 VideoCodecProfile output_profile, 121 VideoCodecProfile output_profile,
122 uint32_t initial_bitrate, 122 uint32_t initial_bitrate,
123 Client* client) { 123 Client* client) {
124 DVLOG(3) << __func__ << ": input_format=" << VideoPixelFormatToString(format) 124 DVLOG(3) << __func__ << ": input_format=" << VideoPixelFormatToString(format)
125 << ", input_visible_size=" << input_visible_size.ToString() 125 << ", input_visible_size=" << input_visible_size.ToString()
126 << ", output_profile=" << output_profile 126 << ", output_profile=" << GetProfileName(output_profile)
127 << ", initial_bitrate=" << initial_bitrate; 127 << ", initial_bitrate=" << initial_bitrate;
128 DCHECK(thread_checker_.CalledOnValidThread()); 128 DCHECK(thread_checker_.CalledOnValidThread());
129 DCHECK(client); 129 DCHECK(client);
130 130
131 if (PIXEL_FORMAT_I420 != format) { 131 if (PIXEL_FORMAT_I420 != format) {
132 DLOG(ERROR) << "Input format not supported= " 132 DLOG(ERROR) << "Input format not supported= "
133 << VideoPixelFormatToString(format); 133 << VideoPixelFormatToString(format);
134 return false; 134 return false;
135 } 135 }
136 if (H264PROFILE_BASELINE != output_profile) { 136 if (H264PROFILE_BASELINE != output_profile) {
137 DLOG(ERROR) << "Output profile not supported= " << output_profile; 137 DLOG(ERROR) << "Output profile not supported= "
138 << GetProfileName(output_profile);
138 return false; 139 return false;
139 } 140 }
140 141
141 client_ptr_factory_.reset(new base::WeakPtrFactory<Client>(client)); 142 client_ptr_factory_.reset(new base::WeakPtrFactory<Client>(client));
142 client_ = client_ptr_factory_->GetWeakPtr(); 143 client_ = client_ptr_factory_->GetWeakPtr();
143 input_visible_size_ = input_visible_size; 144 input_visible_size_ = input_visible_size;
144 frame_rate_ = kMaxFrameRateNumerator / kMaxFrameRateDenominator; 145 frame_rate_ = kMaxFrameRateNumerator / kMaxFrameRateDenominator;
145 initial_bitrate_ = initial_bitrate; 146 initial_bitrate_ = initial_bitrate;
146 bitstream_buffer_size_ = input_visible_size.GetArea(); 147 bitstream_buffer_size_ = input_visible_size.GetArea();
147 148
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 (encoder_thread_.IsRunning() && 550 (encoder_thread_.IsRunning() &&
550 encoder_thread_task_runner_->BelongsToCurrentThread())); 551 encoder_thread_task_runner_->BelongsToCurrentThread()));
551 552
552 if (compression_session_) { 553 if (compression_session_) {
553 VTCompressionSessionInvalidate(compression_session_); 554 VTCompressionSessionInvalidate(compression_session_);
554 compression_session_.reset(); 555 compression_session_.reset();
555 } 556 }
556 } 557 }
557 558
558 } // namespace media 559 } // namespace media
OLDNEW
« no previous file with comments | « media/gpu/video_encode_accelerator_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698