2012-03-05 17:12:41 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef WEBRTC_VIDEO_ENGINE_VIE_CHANNEL_GROUP_H_
|
|
|
|
|
#define WEBRTC_VIDEO_ENGINE_VIE_CHANNEL_GROUP_H_
|
|
|
|
|
|
|
|
|
|
#include <set>
|
|
|
|
|
|
2012-09-21 13:20:21 +00:00
|
|
|
#include "modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
|
2012-03-05 17:12:41 +00:00
|
|
|
#include "system_wrappers/interface/scoped_ptr.h"
|
|
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
2012-04-27 05:25:53 +00:00
|
|
|
class BitrateController;
|
2012-11-26 12:40:15 +00:00
|
|
|
class CallStats;
|
2012-10-05 16:17:41 +00:00
|
|
|
class EncoderStateFeedback;
|
2012-06-26 10:47:04 +00:00
|
|
|
struct OverUseDetectorOptions;
|
2012-03-05 17:12:41 +00:00
|
|
|
class ProcessThread;
|
|
|
|
|
class ViEChannel;
|
|
|
|
|
class ViEEncoder;
|
|
|
|
|
class VieRemb;
|
|
|
|
|
|
|
|
|
|
// 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:
|
2012-06-26 10:47:04 +00:00
|
|
|
ChannelGroup(ProcessThread* process_thread,
|
2012-09-21 13:20:21 +00:00
|
|
|
const OverUseDetectorOptions& options,
|
|
|
|
|
RemoteBitrateEstimator::EstimationMode mode);
|
2012-03-05 17:12:41 +00:00
|
|
|
~ChannelGroup();
|
|
|
|
|
|
|
|
|
|
void AddChannel(int channel_id);
|
2012-06-07 08:10:14 +00:00
|
|
|
void RemoveChannel(int channel_id, unsigned int ssrc);
|
2012-03-05 17:12:41 +00:00
|
|
|
bool HasChannel(int channel_id);
|
|
|
|
|
bool Empty();
|
|
|
|
|
|
2013-04-22 12:41:57 +00:00
|
|
|
bool SetChannelRembStatus(int channel_id, bool sender, bool receiver,
|
|
|
|
|
ViEChannel* channel);
|
2012-03-05 17:12:41 +00:00
|
|
|
|
2012-05-11 11:08:54 +00:00
|
|
|
BitrateController* GetBitrateController();
|
2012-11-26 12:40:15 +00:00
|
|
|
CallStats* GetCallStats();
|
2012-06-07 08:10:14 +00:00
|
|
|
RemoteBitrateEstimator* GetRemoteBitrateEstimator();
|
2012-10-05 16:17:41 +00:00
|
|
|
EncoderStateFeedback* GetEncoderStateFeedback();
|
2012-04-27 05:25:53 +00:00
|
|
|
|
2012-03-05 17:12:41 +00:00
|
|
|
private:
|
|
|
|
|
typedef std::set<int> ChannelSet;
|
|
|
|
|
|
|
|
|
|
scoped_ptr<VieRemb> remb_;
|
2012-04-27 05:25:53 +00:00
|
|
|
scoped_ptr<BitrateController> bitrate_controller_;
|
2012-11-26 12:40:15 +00:00
|
|
|
scoped_ptr<CallStats> call_stats_;
|
2012-06-07 08:10:14 +00:00
|
|
|
scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
|
2012-10-05 16:17:41 +00:00
|
|
|
scoped_ptr<EncoderStateFeedback> encoder_state_feedback_;
|
2012-03-05 17:12:41 +00:00
|
|
|
ChannelSet channels_;
|
2012-11-26 12:40:15 +00:00
|
|
|
|
2013-04-22 12:41:57 +00:00
|
|
|
// Registered at construct time and assumed to outlive this class.
|
2012-11-26 12:40:15 +00:00
|
|
|
ProcessThread* process_thread_;
|
2012-03-05 17:12:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
|
|
|
|
#endif // WEBRTC_VIDEO_ENGINE_VIE_CHANNEL_GROUP_H_
|