OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 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 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 const VideoFormat& format) { | 1014 const VideoFormat& format) { |
1015 LOG(LS_VERBOSE) << "SetSendStreamFormat:" << ssrc << " -> " | 1015 LOG(LS_VERBOSE) << "SetSendStreamFormat:" << ssrc << " -> " |
1016 << format.ToString(); | 1016 << format.ToString(); |
1017 rtc::CritScope stream_lock(&stream_crit_); | 1017 rtc::CritScope stream_lock(&stream_crit_); |
1018 if (send_streams_.find(ssrc) == send_streams_.end()) { | 1018 if (send_streams_.find(ssrc) == send_streams_.end()) { |
1019 return false; | 1019 return false; |
1020 } | 1020 } |
1021 return send_streams_[ssrc]->SetVideoFormat(format); | 1021 return send_streams_[ssrc]->SetVideoFormat(format); |
1022 } | 1022 } |
1023 | 1023 |
1024 bool WebRtcVideoChannel2::SetRender(bool render) { | |
1025 // TODO(pbos): Implement. Or refactor away as it shouldn't be needed. | |
1026 LOG(LS_VERBOSE) << "SetRender: " << (render ? "true" : "false"); | |
1027 return true; | |
1028 } | |
1029 | |
1030 bool WebRtcVideoChannel2::SetSend(bool send) { | 1024 bool WebRtcVideoChannel2::SetSend(bool send) { |
1031 LOG(LS_VERBOSE) << "SetSend: " << (send ? "true" : "false"); | 1025 LOG(LS_VERBOSE) << "SetSend: " << (send ? "true" : "false"); |
1032 if (send && !send_codec_.IsSet()) { | 1026 if (send && !send_codec_.IsSet()) { |
1033 LOG(LS_ERROR) << "SetSend(true) called before setting codec."; | 1027 LOG(LS_ERROR) << "SetSend(true) called before setting codec."; |
1034 return false; | 1028 return false; |
1035 } | 1029 } |
1036 if (send) { | 1030 if (send) { |
1037 StartAllSendStreams(); | 1031 StartAllSendStreams(); |
1038 } else { | 1032 } else { |
1039 StopAllSendStreams(); | 1033 StopAllSendStreams(); |
(...skipping 1703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2743 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2737 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2744 } | 2738 } |
2745 } | 2739 } |
2746 | 2740 |
2747 return video_codecs; | 2741 return video_codecs; |
2748 } | 2742 } |
2749 | 2743 |
2750 } // namespace cricket | 2744 } // namespace cricket |
2751 | 2745 |
2752 #endif // HAVE_WEBRTC_VIDEO | 2746 #endif // HAVE_WEBRTC_VIDEO |
OLD | NEW |