| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 |
| 11 /* kenny.c - Main function for the iSAC coder */ | 11 /* kenny.c - Main function for the iSAC coder */ |
| 12 | 12 |
| 13 #include <stdio.h> | 13 #include <stdio.h> |
| 14 #include <stdlib.h> | 14 #include <stdlib.h> |
| 15 #include <string.h> | 15 #include <string.h> |
| 16 #include <time.h> | 16 #include <time.h> |
| 17 | 17 |
| 18 #ifdef WIN32 | 18 #ifdef WIN32 |
| 19 #include "windows.h" | 19 #include "windows.h" |
| 20 #ifndef CLOCKS_PER_SEC | |
| 21 #define CLOCKS_PER_SEC 1000 | 20 #define CLOCKS_PER_SEC 1000 |
| 22 #endif | 21 #endif |
| 23 #endif | |
| 24 | 22 |
| 25 #include <ctype.h> | 23 #include <ctype.h> |
| 26 #include <math.h> | 24 #include <math.h> |
| 27 | 25 |
| 28 /* include API */ | 26 /* include API */ |
| 29 #include "isac.h" | 27 #include "isac.h" |
| 30 #include "utility.h" | 28 #include "utility.h" |
| 31 #include "webrtc/base/format_macros.h" | 29 #include "webrtc/base/format_macros.h" |
| 32 //#include "commonDefs.h" | 30 //#include "commonDefs.h" |
| 33 | 31 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 if ((outp = fopen(outname, "wb")) == NULL) { | 211 if ((outp = fopen(outname, "wb")) == NULL) { |
| 214 printf(" iSAC: Cannot write file %s.\n", outname); | 212 printf(" iSAC: Cannot write file %s.\n", outname); |
| 215 exit(1); | 213 exit(1); |
| 216 } | 214 } |
| 217 | 215 |
| 218 #ifdef WIN32 | 216 #ifdef WIN32 |
| 219 _splitpath(outname, outDrive, outPath, outPrefix, outSuffix); | 217 _splitpath(outname, outDrive, outPath, outPrefix, outSuffix); |
| 220 _makepath(bitrateFileName, outDrive, outPath, "bitrate", ".txt"); | 218 _makepath(bitrateFileName, outDrive, outPath, "bitrate", ".txt"); |
| 221 | 219 |
| 222 bitrateFile = fopen(bitrateFileName, "a"); | 220 bitrateFile = fopen(bitrateFileName, "a"); |
| 223 fprintf(bitrateFile, "%% %s \n", inname); | 221 fprintf(bitrateFile, "% %%s \n", inname); |
| 224 #endif | 222 #endif |
| 225 | 223 |
| 226 printf("\n"); | 224 printf("\n"); |
| 227 printf("Input.................... %s\n", inname); | 225 printf("Input.................... %s\n", inname); |
| 228 printf("Output................... %s\n", outname); | 226 printf("Output................... %s\n", outname); |
| 229 printf("Encoding Mode............ %s\n", | 227 printf("Encoding Mode............ %s\n", |
| 230 (codingMode == 1) ? "Channel-Independent" : "Channel-Adaptive"); | 228 (codingMode == 1) ? "Channel-Independent" : "Channel-Adaptive"); |
| 231 printf("Bottleneck............... %d bits/sec\n", bottleneck); | 229 printf("Bottleneck............... %d bits/sec\n", bottleneck); |
| 232 printf("Packet-loss Percentage... %d\n", packetLossPercent); | 230 printf("Packet-loss Percentage... %d\n", packetLossPercent); |
| 233 printf("\n"); | 231 printf("\n"); |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 str->lastArrivalTime = 0; | 567 str->lastArrivalTime = 0; |
| 570 | 568 |
| 571 str->maxPayloadLB = 0; | 569 str->maxPayloadLB = 0; |
| 572 str->maxPayloadUB = 0; | 570 str->maxPayloadUB = 0; |
| 573 str->lbBytes = 0; | 571 str->lbBytes = 0; |
| 574 str->ubBytes = 0; | 572 str->ubBytes = 0; |
| 575 | 573 |
| 576 return 0; | 574 return 0; |
| 577 }; | 575 }; |
| 578 #endif | 576 #endif |
| OLD | NEW |