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

Side by Side Diff: webrtc/pc/channel.cc

Issue 1838413002: Combining SetVideoSend and SetSource into one method. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing comments and other minor things Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 1789 matching lines...) Expand 10 before | Expand all | Expand 10 after
1800 Deinit(); 1800 Deinit();
1801 } 1801 }
1802 1802
1803 bool VideoChannel::SetSink(uint32_t ssrc, 1803 bool VideoChannel::SetSink(uint32_t ssrc,
1804 rtc::VideoSinkInterface<VideoFrame>* sink) { 1804 rtc::VideoSinkInterface<VideoFrame>* sink) {
1805 worker_thread()->Invoke<void>( 1805 worker_thread()->Invoke<void>(
1806 Bind(&VideoMediaChannel::SetSink, media_channel(), ssrc, sink)); 1806 Bind(&VideoMediaChannel::SetSink, media_channel(), ssrc, sink));
1807 return true; 1807 return true;
1808 } 1808 }
1809 1809
1810 void VideoChannel::SetSource( 1810 bool VideoChannel::SetVideoSend(
1811 uint32_t ssrc, 1811 uint32_t ssrc,
1812 bool mute,
1813 const VideoOptions* options,
1812 rtc::VideoSourceInterface<cricket::VideoFrame>* source) { 1814 rtc::VideoSourceInterface<cricket::VideoFrame>* source) {
1813 worker_thread()->Invoke<void>(
1814 Bind(&VideoMediaChannel::SetSource, media_channel(), ssrc, source));
1815 }
1816
1817 bool VideoChannel::SetVideoSend(uint32_t ssrc,
1818 bool mute,
1819 const VideoOptions* options) {
1820 return InvokeOnWorker(Bind(&VideoMediaChannel::SetVideoSend, media_channel(), 1815 return InvokeOnWorker(Bind(&VideoMediaChannel::SetVideoSend, media_channel(),
1821 ssrc, mute, options)); 1816 ssrc, mute, options, source));
1822 } 1817 }
1823 1818
1824 webrtc::RtpParameters VideoChannel::GetRtpParameters(uint32_t ssrc) const { 1819 webrtc::RtpParameters VideoChannel::GetRtpParameters(uint32_t ssrc) const {
1825 return worker_thread()->Invoke<webrtc::RtpParameters>( 1820 return worker_thread()->Invoke<webrtc::RtpParameters>(
1826 Bind(&VideoChannel::GetRtpParameters_w, this, ssrc)); 1821 Bind(&VideoChannel::GetRtpParameters_w, this, ssrc));
1827 } 1822 }
1828 1823
1829 webrtc::RtpParameters VideoChannel::GetRtpParameters_w(uint32_t ssrc) const { 1824 webrtc::RtpParameters VideoChannel::GetRtpParameters_w(uint32_t ssrc) const {
1830 return media_channel()->GetRtpParameters(ssrc); 1825 return media_channel()->GetRtpParameters(ssrc);
1831 } 1826 }
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
2323 return data_channel_type_ == DCT_RTP && BaseChannel::ShouldSetupDtlsSrtp_n(); 2318 return data_channel_type_ == DCT_RTP && BaseChannel::ShouldSetupDtlsSrtp_n();
2324 } 2319 }
2325 2320
2326 void DataChannel::OnStreamClosedRemotely(uint32_t sid) { 2321 void DataChannel::OnStreamClosedRemotely(uint32_t sid) {
2327 rtc::TypedMessageData<uint32_t>* message = 2322 rtc::TypedMessageData<uint32_t>* message =
2328 new rtc::TypedMessageData<uint32_t>(sid); 2323 new rtc::TypedMessageData<uint32_t>(sid);
2329 signaling_thread()->Post(this, MSG_STREAMCLOSEDREMOTELY, message); 2324 signaling_thread()->Post(this, MSG_STREAMCLOSEDREMOTELY, message);
2330 } 2325 }
2331 2326
2332 } // namespace cricket 2327 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698