OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
102 virtual MediaStreamTrackInterface* FindVideoTrack( | 102 virtual MediaStreamTrackInterface* FindVideoTrack( |
103 const std::string& id) = 0; | 103 const std::string& id) = 0; |
104 | 104 |
105 protected: | 105 protected: |
106 // Dtor protected as objects shouldn't be deleted via this interface. | 106 // Dtor protected as objects shouldn't be deleted via this interface. |
107 ~StreamCollectionInterface() {} | 107 ~StreamCollectionInterface() {} |
108 }; | 108 }; |
109 | 109 |
110 class StatsObserver : public rtc::RefCountInterface { | 110 class StatsObserver : public rtc::RefCountInterface { |
111 public: | 111 public: |
112 virtual void OnComplete(const StatsReports& reports) = 0; | 112 // TODO(nisse, hbos): Old version, not passing ownership. Should |
113 // perhaps be deprecated, but since all of this is a legacy | |
114 // interface anyway, probably best to leave as is until this class | |
115 // can be deleted. | |
116 virtual void OnComplete(const StatsReports& reports) {} | |
117 virtual void OnCompleteReports(std::unique_ptr<StatsReports> reports) { | |
118 OnComplete(*reports.get()); | |
hbos
2016/12/15 13:39:40
nit: Just *reports works too
nisse-webrtc
2016/12/15 14:02:31
Done.
| |
119 } | |
113 | 120 |
114 protected: | 121 protected: |
115 virtual ~StatsObserver() {} | 122 virtual ~StatsObserver() {} |
116 }; | 123 }; |
117 | 124 |
118 class MetricsObserverInterface : public rtc::RefCountInterface { | 125 class MetricsObserverInterface : public rtc::RefCountInterface { |
119 public: | 126 public: |
120 | 127 |
121 // |type| is the type of the enum counter to be incremented. |counter| | 128 // |type| is the type of the enum counter to be incremented. |counter| |
122 // is the particular counter in that type. |counter_max| is the next sequence | 129 // is the particular counter in that type. |counter_max| is the next sequence |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
828 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 835 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
829 cricket::WebRtcVideoDecoderFactory* decoder_factory) { | 836 cricket::WebRtcVideoDecoderFactory* decoder_factory) { |
830 return CreatePeerConnectionFactory( | 837 return CreatePeerConnectionFactory( |
831 worker_and_network_thread, worker_and_network_thread, signaling_thread, | 838 worker_and_network_thread, worker_and_network_thread, signaling_thread, |
832 default_adm, encoder_factory, decoder_factory); | 839 default_adm, encoder_factory, decoder_factory); |
833 } | 840 } |
834 | 841 |
835 } // namespace webrtc | 842 } // namespace webrtc |
836 | 843 |
837 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ | 844 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ |
OLD | NEW |