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

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: Based on pbos, stefan feedback. 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
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..eece22f4eeab606b396735a096ae2573df7b4211 100644
--- a/webrtc/video_engine/vie_channel_group.h
+++ b/webrtc/video_engine/vie_channel_group.h
@@ -61,7 +61,8 @@ class ChannelGroup : public BitrateObserver {
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 +71,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 +88,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 +107,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_;

Powered by Google App Engine
This is Rietveld 408576698