From 1b1cd78dd24d808e5a02c91cd81f6a659abc5b17 Mon Sep 17 00:00:00 2001 From: "mflodman@webrtc.org" Date: Thu, 28 Jun 2012 06:34:08 +0000 Subject: [PATCH] Made cpplint pass for vie_remb, vie_ref_count, vie_sender and vie_receiver. NOLINT is used for include guards. I took a shortcut for vie_ref_count, the class will be deleted very soon anyway. BUG=627 TEST=cpplint and compiles Review URL: https://webrtc-codereview.appspot.com/677008 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2452 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/video_engine/vie_receiver.cc | 12 ++++++------ src/video_engine/vie_receiver.h | 16 ++++++++-------- src/video_engine/vie_ref_count.cc | 10 +++++----- src/video_engine/vie_ref_count.h | 14 +++++++------- src/video_engine/vie_remb.cc | 4 ++-- src/video_engine/vie_remb.h | 9 +++++---- src/video_engine/vie_sender.cc | 9 +++++---- src/video_engine/vie_sender.h | 14 +++++++------- 8 files changed, 45 insertions(+), 43 deletions(-) diff --git a/src/video_engine/vie_receiver.cc b/src/video_engine/vie_receiver.cc index 3dba7991d6..955d3dc2ac 100644 --- a/src/video_engine/vie_receiver.cc +++ b/src/video_engine/vie_receiver.cc @@ -8,13 +8,13 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "vie_receiver.h" +#include "video_engine/vie_receiver.h" -#include "critical_section_wrapper.h" -#include "rtp_dump.h" -#include "rtp_rtcp.h" -#include "video_coding.h" -#include "trace.h" +#include "modules/rtp_rtcp/interface/rtp_rtcp.h" +#include "modules/utility/interface/rtp_dump.h" +#include "modules/video_coding/main/interface/video_coding.h" +#include "system_wrappers/interface/critical_section_wrapper.h" +#include "system_wrappers/interface/trace.h" namespace webrtc { diff --git a/src/video_engine/vie_receiver.h b/src/video_engine/vie_receiver.h index a36a6d0bf9..1537d98cff 100644 --- a/src/video_engine/vie_receiver.h +++ b/src/video_engine/vie_receiver.h @@ -8,17 +8,17 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_VIDEO_ENGINE_VIE_RECEIVER_H_ -#define WEBRTC_VIDEO_ENGINE_VIE_RECEIVER_H_ +#ifndef WEBRTC_VIDEO_ENGINE_VIE_RECEIVER_H_ // NOLINT +#define WEBRTC_VIDEO_ENGINE_VIE_RECEIVER_H_ // NOLINT #include -#include "engine_configurations.h" -#include "rtp_rtcp_defines.h" +#include "engine_configurations.h" // NOLINT +#include "modules/rtp_rtcp/interface/rtp_rtcp_defines.h" +#include "modules/udp_transport/interface/udp_transport.h" #include "system_wrappers/interface/scoped_ptr.h" -#include "typedefs.h" -#include "udp_transport.h" -#include "vie_defines.h" +#include "typedefs.h" // NOLINT +#include "video_engine/vie_defines.h" namespace webrtc { @@ -84,4 +84,4 @@ class ViEReceiver : public UdpTransportData, public RtpData { } // namespace webrt -#endif // WEBRTC_VIDEO_ENGINE_VIE_RECEIVER_H_ +#endif // WEBRTC_VIDEO_ENGINE_VIE_RECEIVER_H_ // NOLINT diff --git a/src/video_engine/vie_ref_count.cc b/src/video_engine/vie_ref_count.cc index 2ab285c8f2..3f7e45cfa9 100644 --- a/src/video_engine/vie_ref_count.cc +++ b/src/video_engine/vie_ref_count.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -8,9 +8,9 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "vie_ref_count.h" +#include "video_engine/vie_ref_count.h" -#include "critical_section_wrapper.h" +#include "system_wrappers/interface/critical_section_wrapper.h" namespace webrtc { @@ -22,13 +22,13 @@ ViERefCount::ViERefCount() ViERefCount::~ViERefCount() { } -ViERefCount& ViERefCount::operator++(int) { +ViERefCount& ViERefCount::operator++(int) { // NOLINT CriticalSectionScoped lock(crit_.get()); count_++; return *this; } -ViERefCount& ViERefCount::operator--(int) { +ViERefCount& ViERefCount::operator--(int) { // NOLINT CriticalSectionScoped lock(crit_.get()); count_--; return *this; diff --git a/src/video_engine/vie_ref_count.h b/src/video_engine/vie_ref_count.h index 65efe36d9f..15241d4e6e 100644 --- a/src/video_engine/vie_ref_count.h +++ b/src/video_engine/vie_ref_count.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -8,10 +8,10 @@ * be found in the AUTHORS file in the root of the source tree. */ -// TODO(mflodman) Use ref count class in system_wrappers. +// TODO(mflodman) Remove this class and use ref count class in system_wrappers. -#ifndef WEBRTC_VIDEO_ENGINE_VIE_REF_COUNT_H_ -#define WEBRTC_VIDEO_ENGINE_VIE_REF_COUNT_H_ +#ifndef WEBRTC_VIDEO_ENGINE_VIE_REF_COUNT_H_ // NOLINT +#define WEBRTC_VIDEO_ENGINE_VIE_REF_COUNT_H_ // NOLINT #include "system_wrappers/interface/scoped_ptr.h" @@ -24,8 +24,8 @@ class ViERefCount { ViERefCount(); ~ViERefCount(); - ViERefCount& operator++(int); - ViERefCount& operator--(int); + ViERefCount& operator++(int); // NOLINT + ViERefCount& operator--(int); // NOLINT void Reset(); int GetCount() const; @@ -37,4 +37,4 @@ class ViERefCount { } // namespace webrtc -#endif // WEBRTC_VIDEO_ENGINE_VIE_REF_COUNT_H_ +#endif // WEBRTC_VIDEO_ENGINE_VIE_REF_COUNT_H_ // NOLINT diff --git a/src/video_engine/vie_remb.cc b/src/video_engine/vie_remb.cc index 97e7ed685a..b8b6d074cf 100644 --- a/src/video_engine/vie_remb.cc +++ b/src/video_engine/vie_remb.cc @@ -103,7 +103,7 @@ void VieRemb::RemoveRembSender(RtpRtcp* rtp_rtcp) { bool VieRemb::InUse() const { CriticalSectionScoped cs(list_crit_.get()); - if(receive_modules_.empty() && rtcp_sender_.empty()) + if (receive_modules_.empty() && rtcp_sender_.empty()) return false; else return true; @@ -183,7 +183,7 @@ WebRtc_Word32 VieRemb::Process() { RtpRtcp* sender = NULL; if (!rtcp_sender_.empty()) { sender = rtcp_sender_.front(); - } else if (!receive_modules_.empty()){ + } else if (!receive_modules_.empty()) { sender = receive_modules_.front(); } last_send_bitrate_ = total_bitrate; diff --git a/src/video_engine/vie_remb.h b/src/video_engine/vie_remb.h index 45921065ad..de7c28fc80 100644 --- a/src/video_engine/vie_remb.h +++ b/src/video_engine/vie_remb.h @@ -15,11 +15,12 @@ // for a specified SSRC. -#ifndef WEBRTC_VIDEO_ENGINE_MAIN_SOURCE_VIE_REMB_H_ -#define WEBRTC_VIDEO_ENGINE_MAIN_SOURCE_VIE_REMB_H_ +#ifndef WEBRTC_VIDEO_ENGINE_MAIN_SOURCE_VIE_REMB_H_ // NOLINT +#define WEBRTC_VIDEO_ENGINE_MAIN_SOURCE_VIE_REMB_H_ // NOLINT #include #include +#include #include "modules/interface/module.h" #include "modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h" @@ -34,7 +35,7 @@ class RtpRtcp; class VieRemb : public RemoteBitrateObserver, public Module { public: - VieRemb(ProcessThread* process_thread); + explicit VieRemb(ProcessThread* process_thread); ~VieRemb(); // Called to add a receive channel to include in the REMB packet. @@ -88,4 +89,4 @@ class VieRemb : public RemoteBitrateObserver, public Module { } // namespace webrtc -#endif // WEBRTC_VIDEO_ENGINE_MAIN_SOURCE_VIE_REMB_H_ +#endif // WEBRTC_VIDEO_ENGINE_MAIN_SOURCE_VIE_REMB_H_ // NOLINT diff --git a/src/video_engine/vie_sender.cc b/src/video_engine/vie_sender.cc index ca88db971f..6f682c1746 100644 --- a/src/video_engine/vie_sender.cc +++ b/src/video_engine/vie_sender.cc @@ -8,12 +8,13 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include "video_engine/vie_sender.h" + #include -#include "critical_section_wrapper.h" -#include "rtp_dump.h" -#include "vie_sender.h" -#include "trace.h" +#include "modules/utility/interface/rtp_dump.h" +#include "system_wrappers/interface/critical_section_wrapper.h" +#include "system_wrappers/interface/trace.h" namespace webrtc { diff --git a/src/video_engine/vie_sender.h b/src/video_engine/vie_sender.h index 6c3a110603..db41bbafc5 100644 --- a/src/video_engine/vie_sender.h +++ b/src/video_engine/vie_sender.h @@ -11,14 +11,14 @@ // ViESender is responsible for encrypting, if enabled, packets and send to // network. -#ifndef WEBRTC_VIDEO_ENGINE_VIE_SENDER_H_ -#define WEBRTC_VIDEO_ENGINE_VIE_SENDER_H_ +#ifndef WEBRTC_VIDEO_ENGINE_VIE_SENDER_H_ // NOLINT +#define WEBRTC_VIDEO_ENGINE_VIE_SENDER_H_ // NOLINT -#include "common_types.h" -#include "engine_configurations.h" +#include "common_types.h" // NOLINT +#include "engine_configurations.h" // NOLINT #include "system_wrappers/interface/scoped_ptr.h" -#include "typedefs.h" -#include "vie_defines.h" +#include "typedefs.h" // NOLINT +#include "video_engine/vie_defines.h" namespace webrtc { @@ -61,4 +61,4 @@ class ViESender: public Transport { } // namespace webrtc -#endif // WEBRTC_VIDEO_ENGINE_VIE_SENDER_H_ +#endif // WEBRTC_VIDEO_ENGINE_VIE_SENDER_H_ // NOLINT