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

Side by Side Diff: webrtc/video_engine/vie_channel_group.h

Issue 1411723002: Move ownership of receive ViEChannel to VideoReceiveStream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: pbos review Created 5 years, 2 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 | « webrtc/video/video_send_stream.cc ('k') | webrtc/video_engine/vie_channel_group.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 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 22 matching lines...) Expand all
33 class PacedSender; 33 class PacedSender;
34 class PacketRouter; 34 class PacketRouter;
35 class ProcessThread; 35 class ProcessThread;
36 class RemoteBitrateEstimator; 36 class RemoteBitrateEstimator;
37 class RemoteEstimatorProxy; 37 class RemoteEstimatorProxy;
38 class SendStatisticsProxy; 38 class SendStatisticsProxy;
39 class TransportFeedbackAdapter; 39 class TransportFeedbackAdapter;
40 class ViEChannel; 40 class ViEChannel;
41 class ViEEncoder; 41 class ViEEncoder;
42 class VieRemb; 42 class VieRemb;
43 class VoEVideoSync;
44 43
45 // Channel group contains data common for several channels. All channels in the 44 // Channel group contains data common for several channels. All channels in the
46 // group are assumed to send/receive data to the same end-point. 45 // group are assumed to send/receive data to the same end-point.
47 class ChannelGroup : public BitrateObserver { 46 class ChannelGroup : public BitrateObserver {
48 public: 47 public:
49 explicit ChannelGroup(ProcessThread* process_thread); 48 explicit ChannelGroup(ProcessThread* process_thread);
50 ~ChannelGroup(); 49 ~ChannelGroup();
51 bool CreateReceiveChannel(int channel_id,
52 Transport* transport,
53 int number_of_cores,
54 const VideoReceiveStream::Config& config);
55 void DeleteChannel(int channel_id);
56 ViEChannel* GetChannel(int channel_id) const;
57 void AddEncoder(const std::vector<uint32_t>& ssrcs, ViEEncoder* encoder); 50 void AddEncoder(const std::vector<uint32_t>& ssrcs, ViEEncoder* encoder);
58 void RemoveEncoder(ViEEncoder* encoder); 51 void RemoveEncoder(ViEEncoder* encoder);
59 void SetSyncInterface(VoEVideoSync* sync_interface);
60 void SetBweBitrates(int min_bitrate_bps, 52 void SetBweBitrates(int min_bitrate_bps,
61 int start_bitrate_bps, 53 int start_bitrate_bps,
62 int max_bitrate_bps); 54 int max_bitrate_bps);
63 55
64 void SetChannelRembStatus(bool sender, bool receiver, ViEChannel* channel); 56 void SetChannelRembStatus(bool sender, bool receiver, ViEChannel* channel);
65 57
66 void SignalNetworkState(NetworkState state); 58 void SignalNetworkState(NetworkState state);
67 59
68 BitrateController* GetBitrateController() const; 60 BitrateController* GetBitrateController() const;
69 RemoteBitrateEstimator* GetRemoteBitrateEstimator() const; 61 RemoteBitrateEstimator* GetRemoteBitrateEstimator(bool send_side_bwe) const;
70 CallStats* GetCallStats() const; 62 CallStats* GetCallStats() const;
71 int64_t GetPacerQueuingDelayMs() const; 63 int64_t GetPacerQueuingDelayMs() const;
72 PacedSender* pacer() const { return pacer_.get(); } 64 PacedSender* pacer() const { return pacer_.get(); }
73 PacketRouter* packet_router() const { return packet_router_.get(); } 65 PacketRouter* packet_router() const { return packet_router_.get(); }
74 BitrateAllocator* bitrate_allocator() const { 66 BitrateAllocator* bitrate_allocator() const {
75 return bitrate_allocator_.get(); } 67 return bitrate_allocator_.get(); }
76 TransportFeedbackObserver* GetTransportFeedbackObserver(); 68 TransportFeedbackObserver* GetTransportFeedbackObserver();
77 RtcpIntraFrameObserver* GetRtcpIntraFrameObserver() const; 69 RtcpIntraFrameObserver* GetRtcpIntraFrameObserver() const;
78 70
79 // Implements BitrateObserver. 71 // Implements BitrateObserver.
80 void OnNetworkChanged(uint32_t target_bitrate_bps, 72 void OnNetworkChanged(uint32_t target_bitrate_bps,
81 uint8_t fraction_loss, 73 uint8_t fraction_loss,
82 int64_t rtt) override; 74 int64_t rtt) override;
83 75
84 void OnSentPacket(const rtc::SentPacket& sent_packet); 76 void OnSentPacket(const rtc::SentPacket& sent_packet);
85 77
86 private: 78 private:
87 typedef std::map<int, ViEChannel*> ChannelMap;
88
89 bool CreateChannel(int channel_id,
90 Transport* transport,
91 int number_of_cores,
92 size_t max_rtp_streams,
93 bool sender,
94 RemoteBitrateEstimator* bitrate_estimator,
95 TransportFeedbackObserver* feedback_observer);
96 ViEChannel* PopChannel(int channel_id);
97
98 rtc::scoped_ptr<VieRemb> remb_; 79 rtc::scoped_ptr<VieRemb> remb_;
99 rtc::scoped_ptr<BitrateAllocator> bitrate_allocator_; 80 rtc::scoped_ptr<BitrateAllocator> bitrate_allocator_;
100 rtc::scoped_ptr<CallStats> call_stats_; 81 rtc::scoped_ptr<CallStats> call_stats_;
101 rtc::scoped_ptr<PacketRouter> packet_router_; 82 rtc::scoped_ptr<PacketRouter> packet_router_;
102 rtc::scoped_ptr<PacedSender> pacer_; 83 rtc::scoped_ptr<PacedSender> pacer_;
103 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; 84 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
104 rtc::scoped_ptr<RemoteEstimatorProxy> remote_estimator_proxy_; 85 rtc::scoped_ptr<RemoteEstimatorProxy> remote_estimator_proxy_;
105 rtc::scoped_ptr<EncoderStateFeedback> encoder_state_feedback_; 86 rtc::scoped_ptr<EncoderStateFeedback> encoder_state_feedback_;
106 ChannelMap channel_map_;
107 87
108 mutable rtc::CriticalSection encoder_crit_; 88 mutable rtc::CriticalSection encoder_crit_;
109 std::vector<ViEEncoder*> encoders_ GUARDED_BY(encoder_crit_); 89 std::vector<ViEEncoder*> encoders_ GUARDED_BY(encoder_crit_);
110 90
111 // Registered at construct time and assumed to outlive this class. 91 // Registered at construct time and assumed to outlive this class.
112 ProcessThread* const process_thread_; 92 ProcessThread* const process_thread_;
113 rtc::scoped_ptr<ProcessThread> pacer_thread_; 93 rtc::scoped_ptr<ProcessThread> pacer_thread_;
114 94
115 rtc::scoped_ptr<BitrateController> bitrate_controller_; 95 rtc::scoped_ptr<BitrateController> bitrate_controller_;
116 rtc::scoped_ptr<TransportFeedbackAdapter> transport_feedback_adapter_; 96 rtc::scoped_ptr<TransportFeedbackAdapter> transport_feedback_adapter_;
117 int min_bitrate_bps_; 97 int min_bitrate_bps_;
118 }; 98 };
119 99
120 } // namespace webrtc 100 } // namespace webrtc
121 101
122 #endif // WEBRTC_VIDEO_ENGINE_VIE_CHANNEL_GROUP_H_ 102 #endif // WEBRTC_VIDEO_ENGINE_VIE_CHANNEL_GROUP_H_
OLDNEW
« no previous file with comments | « webrtc/video/video_send_stream.cc ('k') | webrtc/video_engine/vie_channel_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698