Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 61 int bottleneck, /* excluding headers; bits/s */ | 61 int bottleneck, /* excluding headers; bits/s */ |
| 62 BottleNeckModel* BN_data) { | 62 BottleNeckModel* BN_data) { |
| 63 const int HeaderSize = 35; | 63 const int HeaderSize = 35; |
| 64 int HeaderRate; | 64 int HeaderRate; |
| 65 | 65 |
| 66 HeaderRate = HeaderSize * 8 * FS / current_framesamples; /* bits/s */ | 66 HeaderRate = HeaderSize * 8 * FS / current_framesamples; /* bits/s */ |
| 67 | 67 |
| 68 /* everything in samples */ | 68 /* everything in samples */ |
| 69 BN_data->sample_count = BN_data->sample_count + current_framesamples; | 69 BN_data->sample_count = BN_data->sample_count + current_framesamples; |
| 70 | 70 |
| 71 BN_data->arrival_time += | 71 » BN_data->arrival_time += (uint32_t) |
| 72 ((packet_size + HeaderSize) * 8 * FS) / (bottleneck + HeaderRate); | 72 (((packet_size + HeaderSize) * 8 * FS) / (bottleneck + HeaderRate)); |
| 73 BN_data->send_time += current_framesamples; | 73 » BN_data->send_time += current_framesamples; |
|
kwiberg-webrtc
2015/06/08 13:09:38
Tabs.
Peter Kasting
2015/06/08 20:44:29
Oops, this must have been a merge failure.
Peter Kasting
2015/06/10 01:09:54
Done.
| |
| 74 | 74 |
| 75 if (BN_data->arrival_time < BN_data->sample_count) | 75 if (BN_data->arrival_time < BN_data->sample_count) |
| 76 BN_data->arrival_time = BN_data->sample_count; | 76 BN_data->arrival_time = BN_data->sample_count; |
| 77 | 77 |
| 78 BN_data->rtp_number++; | 78 BN_data->rtp_number++; |
| 79 } | 79 } |
| 80 | 80 |
| 81 int main(int argc, char* argv[]) { | 81 int main(int argc, char* argv[]) { |
| 82 char inname[50], outname[50], bottleneck_file[50], bitfilename[60], | 82 char inname[50], outname[50], bottleneck_file[50], bitfilename[60], |
| 83 bitending[10] = "_bits.pcm"; | 83 bitending[10] = "_bits.pcm"; |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 626 fclose(outp); | 626 fclose(outp); |
| 627 | 627 |
| 628 WebRtcIsac_Free(ISAC_main_inst); | 628 WebRtcIsac_Free(ISAC_main_inst); |
| 629 WebRtcIsacfix_Free(ISACFIX_main_inst); | 629 WebRtcIsacfix_Free(ISACFIX_main_inst); |
| 630 | 630 |
| 631 // fclose(histfile); | 631 // fclose(histfile); |
| 632 // fclose(ratefile); | 632 // fclose(ratefile); |
| 633 | 633 |
| 634 return 0; | 634 return 0; |
| 635 } | 635 } |
| OLD | NEW |