Reformat the WebRTC code base
Running clang-format with chromium's style guide.
The goal is n-fold:
* providing consistency and readability (that's what code guidelines are for)
* preventing noise with presubmit checks and git cl format
* building on the previous point: making it easier to automatically fix format issues
* you name it
Please consider using git-hyper-blame to ignore this commit.
Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
diff --git a/api/mediastreaminterface.h b/api/mediastreaminterface.h
index 195ecc6..38ae3fc 100644
--- a/api/mediastreaminterface.h
+++ b/api/mediastreaminterface.h
@@ -60,12 +60,7 @@
class MediaSourceInterface : public rtc::RefCountInterface,
public NotifierInterface {
public:
- enum SourceState {
- kInitializing,
- kLive,
- kEnded,
- kMuted
- };
+ enum SourceState { kInitializing, kLive, kEnded, kMuted };
virtual SourceState state() const = 0;
@@ -116,9 +111,8 @@
// on the worker thread via a VideoTrack. A custom implementation of a source
// can inherit AdaptedVideoTrackSource instead of directly implementing this
// interface.
-class VideoTrackSourceInterface
- : public MediaSourceInterface,
- public rtc::VideoSourceInterface<VideoFrame> {
+class VideoTrackSourceInterface : public MediaSourceInterface,
+ public rtc::VideoSourceInterface<VideoFrame> {
public:
struct Stats {
// Original size of captured frame, before video adaptation.
@@ -156,9 +150,8 @@
// PeerConnectionFactory::CreateVideoTrack can be used for creating a VideoTrack
// that ensures thread safety and that all methods are called on the right
// thread.
-class VideoTrackInterface
- : public MediaStreamTrackInterface,
- public rtc::VideoSourceInterface<VideoFrame> {
+class VideoTrackInterface : public MediaStreamTrackInterface,
+ public rtc::VideoSourceInterface<VideoFrame> {
public:
// Video track content hint, used to override the source is_screencast
// property.
@@ -276,7 +269,7 @@
public:
// TODO(deadbeef): Figure out if the following interface should be const or
// not.
- virtual AudioSourceInterface* GetSource() const = 0;
+ virtual AudioSourceInterface* GetSource() const = 0;
// Add/Remove a sink that will receive the audio data from the track.
virtual void AddSink(AudioTrackSinkInterface* sink) = 0;
@@ -297,10 +290,8 @@
~AudioTrackInterface() override = default;
};
-typedef std::vector<rtc::scoped_refptr<AudioTrackInterface> >
- AudioTrackVector;
-typedef std::vector<rtc::scoped_refptr<VideoTrackInterface> >
- VideoTrackVector;
+typedef std::vector<rtc::scoped_refptr<AudioTrackInterface> > AudioTrackVector;
+typedef std::vector<rtc::scoped_refptr<VideoTrackInterface> > VideoTrackVector;
// C++ version of https://www.w3.org/TR/mediacapture-streams/#mediastream.
//
@@ -317,10 +308,10 @@
virtual AudioTrackVector GetAudioTracks() = 0;
virtual VideoTrackVector GetVideoTracks() = 0;
- virtual rtc::scoped_refptr<AudioTrackInterface>
- FindAudioTrack(const std::string& track_id) = 0;
- virtual rtc::scoped_refptr<VideoTrackInterface>
- FindVideoTrack(const std::string& track_id) = 0;
+ virtual rtc::scoped_refptr<AudioTrackInterface> FindAudioTrack(
+ const std::string& track_id) = 0;
+ virtual rtc::scoped_refptr<VideoTrackInterface> FindVideoTrack(
+ const std::string& track_id) = 0;
virtual bool AddTrack(AudioTrackInterface* track) = 0;
virtual bool AddTrack(VideoTrackInterface* track) = 0;