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

Side by Side Diff: talk/session/media/channelmanager.cc

Issue 1486123002: Return a copy of the supported RTP header extensions instead of a reference. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merge Created 5 years 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 unified diff | Download patch
« no previous file with comments | « talk/media/webrtc/webrtcvoiceengine_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2004 Google Inc. 3 * Copyright 2004 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 for (std::vector<AudioCodec>::const_iterator it = 150 for (std::vector<AudioCodec>::const_iterator it =
151 media_engine_->audio_codecs().begin(); 151 media_engine_->audio_codecs().begin();
152 it != media_engine_->audio_codecs().end(); ++it) { 152 it != media_engine_->audio_codecs().end(); ++it) {
153 codecs->push_back(*it); 153 codecs->push_back(*it);
154 } 154 }
155 } 155 }
156 156
157 void ChannelManager::GetSupportedAudioRtpHeaderExtensions( 157 void ChannelManager::GetSupportedAudioRtpHeaderExtensions(
158 RtpHeaderExtensions* ext) const { 158 RtpHeaderExtensions* ext) const {
159 *ext = media_engine_->audio_rtp_header_extensions(); 159 *ext = media_engine_->GetAudioCapabilities().header_extensions;
160 } 160 }
161 161
162 void ChannelManager::GetSupportedVideoCodecs( 162 void ChannelManager::GetSupportedVideoCodecs(
163 std::vector<VideoCodec>* codecs) const { 163 std::vector<VideoCodec>* codecs) const {
164 codecs->clear(); 164 codecs->clear();
165 165
166 std::vector<VideoCodec>::const_iterator it; 166 std::vector<VideoCodec>::const_iterator it;
167 for (it = media_engine_->video_codecs().begin(); 167 for (it = media_engine_->video_codecs().begin();
168 it != media_engine_->video_codecs().end(); ++it) { 168 it != media_engine_->video_codecs().end(); ++it) {
169 if (!enable_rtx_ && _stricmp(kRtxCodecName, it->name.c_str()) == 0) { 169 if (!enable_rtx_ && _stricmp(kRtxCodecName, it->name.c_str()) == 0) {
170 continue; 170 continue;
171 } 171 }
172 codecs->push_back(*it); 172 codecs->push_back(*it);
173 } 173 }
174 } 174 }
175 175
176 void ChannelManager::GetSupportedVideoRtpHeaderExtensions( 176 void ChannelManager::GetSupportedVideoRtpHeaderExtensions(
177 RtpHeaderExtensions* ext) const { 177 RtpHeaderExtensions* ext) const {
178 *ext = media_engine_->video_rtp_header_extensions(); 178 *ext = media_engine_->GetVideoCapabilities().header_extensions;
179 } 179 }
180 180
181 void ChannelManager::GetSupportedDataCodecs( 181 void ChannelManager::GetSupportedDataCodecs(
182 std::vector<DataCodec>* codecs) const { 182 std::vector<DataCodec>* codecs) const {
183 *codecs = data_media_engine_->data_codecs(); 183 *codecs = data_media_engine_->data_codecs();
184 } 184 }
185 185
186 bool ChannelManager::Init() { 186 bool ChannelManager::Init() {
187 ASSERT(!initialized_); 187 ASSERT(!initialized_);
188 if (initialized_) { 188 if (initialized_) {
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 return worker_thread_->Invoke<bool>( 619 return worker_thread_->Invoke<bool>(
620 Bind(&MediaEngineInterface::StartRtcEventLog, media_engine_.get(), file)); 620 Bind(&MediaEngineInterface::StartRtcEventLog, media_engine_.get(), file));
621 } 621 }
622 622
623 void ChannelManager::StopRtcEventLog() { 623 void ChannelManager::StopRtcEventLog() {
624 worker_thread_->Invoke<void>( 624 worker_thread_->Invoke<void>(
625 Bind(&MediaEngineInterface::StopRtcEventLog, media_engine_.get())); 625 Bind(&MediaEngineInterface::StopRtcEventLog, media_engine_.get()));
626 } 626 }
627 627
628 } // namespace cricket 628 } // namespace cricket
OLDNEW
« no previous file with comments | « talk/media/webrtc/webrtcvoiceengine_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698