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

Side by Side Diff: content/renderer/media/rtc_video_encoder.cc

Issue 1875913002: Cleanup: Convert const char* kFoo to const char kFoo[]. (Closed) Base URL: https://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
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 "content/renderer/media/rtc_video_encoder.h" 5 #include "content/renderer/media/rtc_video_encoder.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 base::Bind(&RTCVideoEncoder::NotifyError, weak_encoder_, retval)); 470 base::Bind(&RTCVideoEncoder::NotifyError, weak_encoder_, retval));
471 } 471 }
472 } 472 }
473 473
474 RTCVideoEncoder::Impl::~Impl() { DCHECK(!video_encoder_); } 474 RTCVideoEncoder::Impl::~Impl() { DCHECK(!video_encoder_); }
475 475
476 void RTCVideoEncoder::Impl::LogAndNotifyError( 476 void RTCVideoEncoder::Impl::LogAndNotifyError(
477 const tracked_objects::Location& location, 477 const tracked_objects::Location& location,
478 const std::string& str, 478 const std::string& str,
479 media::VideoEncodeAccelerator::Error error) { 479 media::VideoEncodeAccelerator::Error error) {
480 static const char* kErrorNames[] = { 480 static const char* const kErrorNames[] = {
481 "kIllegalStateError", "kInvalidArgumentError", "kPlatformFailureError"}; 481 "kIllegalStateError", "kInvalidArgumentError", "kPlatformFailureError"};
482 static_assert( 482 static_assert(
483 arraysize(kErrorNames) == media::VideoEncodeAccelerator::kErrorMax + 1, 483 arraysize(kErrorNames) == media::VideoEncodeAccelerator::kErrorMax + 1,
484 "Different number of errors and textual descriptions"); 484 "Different number of errors and textual descriptions");
485 DLOG(ERROR) << location.ToString() << kErrorNames[error] << " - " << str; 485 DLOG(ERROR) << location.ToString() << kErrorNames[error] << " - " << str;
486 NotifyError(error); 486 NotifyError(error);
487 } 487 }
488 488
489 void RTCVideoEncoder::Impl::EncodeOneFrame() { 489 void RTCVideoEncoder::Impl::EncodeOneFrame() {
490 DVLOG(3) << "Impl::EncodeOneFrame()"; 490 DVLOG(3) << "Impl::EncodeOneFrame()";
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 UMA_HISTOGRAM_BOOLEAN("Media.RTCVideoEncoderInitEncodeSuccess", 806 UMA_HISTOGRAM_BOOLEAN("Media.RTCVideoEncoderInitEncodeSuccess",
807 init_retval == WEBRTC_VIDEO_CODEC_OK); 807 init_retval == WEBRTC_VIDEO_CODEC_OK);
808 if (init_retval == WEBRTC_VIDEO_CODEC_OK) { 808 if (init_retval == WEBRTC_VIDEO_CODEC_OK) {
809 UMA_HISTOGRAM_ENUMERATION("Media.RTCVideoEncoderProfile", 809 UMA_HISTOGRAM_ENUMERATION("Media.RTCVideoEncoderProfile",
810 profile, 810 profile,
811 media::VIDEO_CODEC_PROFILE_MAX + 1); 811 media::VIDEO_CODEC_PROFILE_MAX + 1);
812 } 812 }
813 } 813 }
814 814
815 } // namespace content 815 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_video_source.cc ('k') | content/renderer/media/webrtc/stun_field_trial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698