summaryrefslogtreecommitdiff
path: root/video_engine/vie_channel_manager.cc
diff options
context:
space:
mode:
authorsolenberg@webrtc.org <solenberg@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-05-27 16:02:56 +0000
committersolenberg@webrtc.org <solenberg@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-05-27 16:02:56 +0000
commitf40e9b6ea200906facbabf507d0ef15ceae61fa3 (patch)
tree5a1606d47285c0c54361494618522bb511d4bfe8 /video_engine/vie_channel_manager.cc
parenta93cbbf0c034d07912a7b5b65fb2a32b54903ccb (diff)
downloadwebrtc-f40e9b6ea200906facbabf507d0ef15ceae61fa3.tar.gz
- Created RemoteBitrateEstimator wrapper for use internally in (ViE) ChannelGroup.
- Changed implementation of SetReceiveAbsoluteSendTimeStatus API so the RBE instance is changed when at least one channel in a group has the extension enabled. BUG= R=mflodman@webrtc.org, stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1553005 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@4113 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'video_engine/vie_channel_manager.cc')
-rw-r--r--video_engine/vie_channel_manager.cc31
1 files changed, 30 insertions, 1 deletions
diff --git a/video_engine/vie_channel_manager.cc b/video_engine/vie_channel_manager.cc
index 6afa4ad2..3c121fe0 100644
--- a/video_engine/vie_channel_manager.cc
+++ b/video_engine/vie_channel_manager.cc
@@ -367,10 +367,39 @@ bool ViEChannelManager::SetRembStatus(int channel_id, bool sender,
return group->SetChannelRembStatus(channel_id, sender, receiver, channel);
}
+bool ViEChannelManager::SetReceiveAbsoluteSendTimeStatus(int channel_id,
+ bool enable,
+ int id) {
+ CriticalSectionScoped cs(channel_id_critsect_);
+ ViEChannel* channel = ViEChannelPtr(channel_id);
+ if (!channel) {
+ return false;
+ }
+ if (channel->SetReceiveAbsoluteSendTimeStatus(enable, id) != 0) {
+ return false;
+ }
+
+ // Enable absolute send time extension on the group if at least one of the
+ // channels use it.
+ ChannelGroup* group = FindGroup(channel_id);
+ assert(group);
+ bool any_enabled = false;
+ for (ChannelMap::const_iterator c_it = channel_map_.begin();
+ c_it != channel_map_.end(); ++c_it) {
+ if (group->HasChannel(c_it->first) &&
+ c_it->second->GetReceiveAbsoluteSendTimeStatus()) {
+ any_enabled = true;
+ break;
+ }
+ }
+ group->SetReceiveAbsoluteSendTimeStatus(any_enabled);
+ return true;
+}
+
void ViEChannelManager::UpdateSsrcs(int channel_id,
const std::list<unsigned int>& ssrcs) {
CriticalSectionScoped cs(channel_id_critsect_);
- ChannelGroup* channel_group = FindGroup(channel_id);
+ ChannelGroup* channel_group = FindGroup(channel_id);
if (channel_group == NULL) {
return;
}