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

Unified Diff: webrtc/video_engine/vie_channel_group.h

Issue 1394243006: Move ownership of send ViEChannels and ViEEncoder to VideoSendStream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Removed header leftovers. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video_engine/vie_channel.cc ('k') | webrtc/video_engine/vie_channel_group.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « webrtc/video_engine/vie_channel.cc ('k') | webrtc/video_engine/vie_channel_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698