OLD | NEW |
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 1708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1719 return true; | 1719 return true; |
1720 } | 1720 } |
1721 | 1721 |
1722 bool VideoChannel::SetVideoSend(uint32_t ssrc, | 1722 bool VideoChannel::SetVideoSend(uint32_t ssrc, |
1723 bool mute, | 1723 bool mute, |
1724 const VideoOptions* options) { | 1724 const VideoOptions* options) { |
1725 return InvokeOnWorker(Bind(&VideoMediaChannel::SetVideoSend, media_channel(), | 1725 return InvokeOnWorker(Bind(&VideoMediaChannel::SetVideoSend, media_channel(), |
1726 ssrc, mute, options)); | 1726 ssrc, mute, options)); |
1727 } | 1727 } |
1728 | 1728 |
| 1729 rtc::VideoSinkInterface<cricket::VideoFrame>* VideoChannel::GetSink( |
| 1730 uint32_t ssrc) { |
| 1731 return worker_thread()->Invoke<rtc::VideoSinkInterface<cricket::VideoFrame>*>( |
| 1732 Bind(&VideoMediaChannel::GetSink, media_channel(), ssrc)); |
| 1733 } |
| 1734 |
1729 void VideoChannel::ChangeState() { | 1735 void VideoChannel::ChangeState() { |
1730 // Send outgoing data if we're the active call, we have the remote content, | 1736 // Send outgoing data if we're the active call, we have the remote content, |
1731 // and we have had some form of connectivity. | 1737 // and we have had some form of connectivity. |
1732 bool send = IsReadyToSend(); | 1738 bool send = IsReadyToSend(); |
1733 if (!media_channel()->SetSend(send)) { | 1739 if (!media_channel()->SetSend(send)) { |
1734 LOG(LS_ERROR) << "Failed to SetSend on video channel"; | 1740 LOG(LS_ERROR) << "Failed to SetSend on video channel"; |
1735 // TODO(gangji): Report error back to server. | 1741 // TODO(gangji): Report error back to server. |
1736 } | 1742 } |
1737 | 1743 |
1738 LOG(LS_INFO) << "Changing video state, send=" << send; | 1744 LOG(LS_INFO) << "Changing video state, send=" << send; |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2318 return (data_channel_type_ == DCT_RTP) && BaseChannel::ShouldSetupDtlsSrtp(); | 2324 return (data_channel_type_ == DCT_RTP) && BaseChannel::ShouldSetupDtlsSrtp(); |
2319 } | 2325 } |
2320 | 2326 |
2321 void DataChannel::OnStreamClosedRemotely(uint32_t sid) { | 2327 void DataChannel::OnStreamClosedRemotely(uint32_t sid) { |
2322 rtc::TypedMessageData<uint32_t>* message = | 2328 rtc::TypedMessageData<uint32_t>* message = |
2323 new rtc::TypedMessageData<uint32_t>(sid); | 2329 new rtc::TypedMessageData<uint32_t>(sid); |
2324 signaling_thread()->Post(this, MSG_STREAMCLOSEDREMOTELY, message); | 2330 signaling_thread()->Post(this, MSG_STREAMCLOSEDREMOTELY, message); |
2325 } | 2331 } |
2326 | 2332 |
2327 } // namespace cricket | 2333 } // namespace cricket |
OLD | NEW |