Index: webrtc/video_engine/vie_channel_group.h |
diff --git a/webrtc/video_engine/vie_channel_group.h b/webrtc/video_engine/vie_channel_group.h |
index 374bd003330d214162d1aaa063b4640dc3993841..f2553d3b364a4d5d0f48e542ad812eef68633195 100644 |
--- a/webrtc/video_engine/vie_channel_group.h |
+++ b/webrtc/video_engine/vie_channel_group.h |
@@ -41,27 +41,20 @@ class ViEEncoder; |
class VieRemb; |
class VoEVideoSync; |
-typedef std::list<ViEChannel*> ChannelList; |
- |
// Channel group contains data common for several channels. All channels in the |
// group are assumed to send/receive data to the same end-point. |
class ChannelGroup : public BitrateObserver { |
public: |
explicit ChannelGroup(ProcessThread* process_thread); |
~ChannelGroup(); |
- bool CreateSendChannel(int channel_id, |
- Transport* transport, |
- SendStatisticsProxy* stats_proxy, |
- I420FrameCallback* pre_encode_callback, |
- int number_of_cores, |
- const VideoSendStream::Config& config); |
bool CreateReceiveChannel(int channel_id, |
Transport* transport, |
int number_of_cores, |
const VideoReceiveStream::Config& config); |
void DeleteChannel(int channel_id); |
ViEChannel* GetChannel(int channel_id) const; |
- ViEEncoder* GetEncoder(int channel_id) const; |
+ void AddEncoder(const std::vector<uint32_t>& ssrcs, ViEEncoder* encoder); |
+ void RemoveEncoder(ViEEncoder* encoder); |
void SetSyncInterface(VoEVideoSync* sync_interface); |
void SetBweBitrates(int min_bitrate_bps, |
int start_bitrate_bps, |
@@ -70,10 +63,15 @@ class ChannelGroup : public BitrateObserver { |
void SetChannelRembStatus(bool sender, bool receiver, ViEChannel* channel); |
BitrateController* GetBitrateController() const; |
- CallStats* GetCallStats() const; |
RemoteBitrateEstimator* GetRemoteBitrateEstimator() const; |
- EncoderStateFeedback* GetEncoderStateFeedback() const; |
+ CallStats* GetCallStats() const; |
int64_t GetPacerQueuingDelayMs() const; |
+ PacedSender* pacer() const { return pacer_.get(); } |
+ PacketRouter* packet_router() const { return packet_router_.get(); } |
+ BitrateAllocator* bitrate_allocator() const { |
+ return bitrate_allocator_.get(); } |
+ TransportFeedbackObserver* GetTransportFeedbackObserver(); |
+ RtcpIntraFrameObserver* GetRtcpIntraFrameObserver() const; |
// Implements BitrateObserver. |
void OnNetworkChanged(uint32_t target_bitrate_bps, |
@@ -82,12 +80,10 @@ class ChannelGroup : public BitrateObserver { |
private: |
typedef std::map<int, ViEChannel*> ChannelMap; |
- typedef std::map<int, ViEEncoder*> EncoderMap; |
bool CreateChannel(int channel_id, |
Transport* transport, |
int number_of_cores, |
- ViEEncoder* vie_encoder, |
size_t max_rtp_streams, |
bool sender, |
RemoteBitrateEstimator* bitrate_estimator, |
@@ -103,9 +99,9 @@ class ChannelGroup : public BitrateObserver { |
rtc::scoped_ptr<RemoteEstimatorProxy> remote_estimator_proxy_; |
rtc::scoped_ptr<EncoderStateFeedback> encoder_state_feedback_; |
ChannelMap channel_map_; |
- // Maps Channel id -> ViEEncoder. |
- mutable rtc::CriticalSection encoder_map_crit_; |
- EncoderMap vie_encoder_map_ GUARDED_BY(encoder_map_crit_); |
+ |
+ mutable rtc::CriticalSection encoder_crit_; |
+ std::vector<ViEEncoder*> encoders_ GUARDED_BY(encoder_crit_); |
// Registered at construct time and assumed to outlive this class. |
ProcessThread* const process_thread_; |