| 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 |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 numTransCodingBytes += streamLenTransCoding; | 655 numTransCodingBytes += streamLenTransCoding; |
| 656 } | 656 } |
| 657 } | 657 } |
| 658 } else { | 658 } else { |
| 659 break; | 659 break; |
| 660 } | 660 } |
| 661 | 661 |
| 662 if (stream_len < 0) { | 662 if (stream_len < 0) { |
| 663 /* exit if returned with error */ | 663 /* exit if returned with error */ |
| 664 errtype = WebRtcIsac_GetErrorCode(ISAC_main_inst); | 664 errtype = WebRtcIsac_GetErrorCode(ISAC_main_inst); |
| 665 printf("\n\nError in encoder: %d.\n\n", errtype); | 665 fprintf(stderr, "Error in encoder: %d.\n", errtype); |
| 666 cout << flush; | 666 cout << flush; |
| 667 exit(0); |
| 667 } | 668 } |
| 668 cur_framesmpls += samplesIn10Ms; | 669 cur_framesmpls += samplesIn10Ms; |
| 669 /* exit encoder loop if the encoder returned a bitstream */ | 670 /* exit encoder loop if the encoder returned a bitstream */ |
| 670 if (stream_len != 0) | 671 if (stream_len != 0) |
| 671 break; | 672 break; |
| 672 } | 673 } |
| 673 | 674 |
| 674 /* read next bottleneck rate */ | 675 /* read next bottleneck rate */ |
| 675 if (f_bn != NULL) { | 676 if (f_bn != NULL) { |
| 676 if (fscanf(f_bn, "%d", &bottleneck) == EOF) { | 677 if (fscanf(f_bn, "%d", &bottleneck) == EOF) { |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 933 fprintf(stderr, " transcoding rate %.0f kbps", | 934 fprintf(stderr, " transcoding rate %.0f kbps", |
| 934 (double)numTransCodingBytes * 8.0 * (sampFreqKHz) / totalsmpls); | 935 (double)numTransCodingBytes * 8.0 * (sampFreqKHz) / totalsmpls); |
| 935 } | 936 } |
| 936 | 937 |
| 937 fclose(inp); | 938 fclose(inp); |
| 938 fclose(outp); | 939 fclose(outp); |
| 939 WebRtcIsac_Free(ISAC_main_inst); | 940 WebRtcIsac_Free(ISAC_main_inst); |
| 940 | 941 |
| 941 exit(0); | 942 exit(0); |
| 942 } | 943 } |
| OLD | NEW |