OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 std::vector<DataCodec>::const_iterator iter; | 71 std::vector<DataCodec>::const_iterator iter; |
72 for (iter = codecs.begin(); iter != codecs.end(); ++iter) { | 72 for (iter = codecs.begin(); iter != codecs.end(); ++iter) { |
73 if (iter->name == name) { | 73 if (iter->name == name) { |
74 *codec_out = *iter; | 74 *codec_out = *iter; |
75 return true; | 75 return true; |
76 } | 76 } |
77 } | 77 } |
78 return false; | 78 return false; |
79 } | 79 } |
80 | 80 |
81 RtpDataMediaChannel::RtpDataMediaChannel(rtc::Timing* timing) { | 81 RtpDataMediaChannel::RtpDataMediaChannel(rtc::Timing* timing) |
| 82 : DataMediaChannel(MediaChannelOptions()) { |
82 Construct(timing); | 83 Construct(timing); |
83 } | 84 } |
84 | 85 |
85 RtpDataMediaChannel::RtpDataMediaChannel() { | 86 RtpDataMediaChannel::RtpDataMediaChannel() |
| 87 : DataMediaChannel(MediaChannelOptions()) { |
86 Construct(NULL); | 88 Construct(NULL); |
87 } | 89 } |
88 | 90 |
89 void RtpDataMediaChannel::Construct(rtc::Timing* timing) { | 91 void RtpDataMediaChannel::Construct(rtc::Timing* timing) { |
90 sending_ = false; | 92 sending_ = false; |
91 receiving_ = false; | 93 receiving_ = false; |
92 timing_ = timing; | 94 timing_ = timing; |
93 send_limiter_.reset(new rtc::RateLimiter(kDataMaxBandwidth / 8, 1.0)); | 95 send_limiter_.reset(new rtc::RateLimiter(kDataMaxBandwidth / 8, 1.0)); |
94 } | 96 } |
95 | 97 |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 | 363 |
362 MediaChannel::SendPacket(&packet, rtc::PacketOptions()); | 364 MediaChannel::SendPacket(&packet, rtc::PacketOptions()); |
363 send_limiter_->Use(packet_len, now); | 365 send_limiter_->Use(packet_len, now); |
364 if (result) { | 366 if (result) { |
365 *result = SDR_SUCCESS; | 367 *result = SDR_SUCCESS; |
366 } | 368 } |
367 return true; | 369 return true; |
368 } | 370 } |
369 | 371 |
370 } // namespace cricket | 372 } // namespace cricket |
OLD | NEW |