Reformat the WebRTC code base
Running clang-format with chromium's style guide. The goal is n-fold: * providing consistency and readability (that's what code guidelines are for) * preventing noise with presubmit checks and git cl format * building on the previous point: making it easier to automatically fix format issues * you name it Please consider using git-hyper-blame to ignore this commit. Bug: webrtc:9340 Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87 Reviewed-on: https://webrtc-review.googlesource.com/81185 Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23660}
This commit is contained in:
@ -11,11 +11,11 @@
|
||||
// ReleaseTest-API.cpp : Defines the entry point for the console application.
|
||||
//
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <ctype.h>
|
||||
#include <iostream>
|
||||
|
||||
/* include API */
|
||||
@ -24,10 +24,13 @@
|
||||
#include "rtc_base/format_macros.h"
|
||||
|
||||
/* Defines */
|
||||
#define SEED_FILE "randseed.txt" /* Used when running decoder on garbage data */
|
||||
#define MAX_FRAMESAMPLES 960 /* max number of samples per frame
|
||||
(= 60 ms frame & 16 kHz) or
|
||||
(= 30 ms frame & 32 kHz) */
|
||||
#define SEED_FILE \
|
||||
"randseed.txt" /* Used when running decoder on garbage data \
|
||||
*/
|
||||
#define MAX_FRAMESAMPLES \
|
||||
960 /* max number of samples per frame \
|
||||
(= 60 ms frame & 16 kHz) or \
|
||||
(= 30 ms frame & 32 kHz) */
|
||||
#define FRAMESAMPLES_10ms 160 /* number of samples per 10ms frame */
|
||||
#define SWBFRAMESAMPLES_10ms 320
|
||||
//#define FS 16000 /* sampling frequency (Hz) */
|
||||
@ -42,7 +45,7 @@ using namespace std;
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
char inname[100], outname[100], bottleneck_file[100], vadfile[100];
|
||||
FILE* inp, *outp, * f_bn = NULL, * vadp = NULL, *bandwidthp;
|
||||
FILE *inp, *outp, *f_bn = NULL, *vadp = NULL, *bandwidthp;
|
||||
int framecnt, endfile;
|
||||
|
||||
size_t i;
|
||||
@ -230,8 +233,10 @@ int main(int argc, char* argv[]) {
|
||||
rateBPS = atoi(argv[i + 1]);
|
||||
setControlBWE = 1;
|
||||
if ((rateBPS < 10000) || (rateBPS > 32000)) {
|
||||
printf("\n%d is not a initial rate. Valid values are in the range "
|
||||
"10000 to 32000.\n", rateBPS);
|
||||
printf(
|
||||
"\n%d is not a initial rate. Valid values are in the range "
|
||||
"10000 to 32000.\n",
|
||||
rateBPS);
|
||||
exit(0);
|
||||
}
|
||||
printf("New initial rate: %d\n", rateBPS);
|
||||
@ -242,8 +247,10 @@ int main(int argc, char* argv[]) {
|
||||
if (!strcmp("-FL", argv[i])) {
|
||||
framesize = atoi(argv[i + 1]);
|
||||
if ((framesize != 30) && (framesize != 60)) {
|
||||
printf("\n%d is not a valid frame length. Valid length are 30 and 60 "
|
||||
"msec.\n", framesize);
|
||||
printf(
|
||||
"\n%d is not a valid frame length. Valid length are 30 and 60 "
|
||||
"msec.\n",
|
||||
framesize);
|
||||
exit(0);
|
||||
}
|
||||
setControlBWE = 1;
|
||||
@ -277,8 +284,10 @@ int main(int argc, char* argv[]) {
|
||||
testNum = atoi(argv[i + 1]);
|
||||
printf("Fault test: %d\n", testNum);
|
||||
if (testNum < 1 || testNum > 10) {
|
||||
printf("\n%d is not a valid Fault Scenario number. Valid Fault "
|
||||
"Scenarios are numbered 1-10.\n", testNum);
|
||||
printf(
|
||||
"\n%d is not a valid Fault Scenario number. Valid Fault "
|
||||
"Scenarios are numbered 1-10.\n",
|
||||
testNum);
|
||||
exit(0);
|
||||
}
|
||||
i++;
|
||||
@ -336,8 +345,10 @@ int main(int argc, char* argv[]) {
|
||||
sscanf(argv[i], "%s", bottleneck_file);
|
||||
f_bn = fopen(bottleneck_file, "rb");
|
||||
if (f_bn == NULL) {
|
||||
printf("Error No value provided for BottleNeck and cannot read file "
|
||||
"%s.\n", bottleneck_file);
|
||||
printf(
|
||||
"Error No value provided for BottleNeck and cannot read file "
|
||||
"%s.\n",
|
||||
bottleneck_file);
|
||||
exit(0);
|
||||
} else {
|
||||
printf("reading bottleneck rates from file %s\n\n", bottleneck_file);
|
||||
@ -637,8 +648,8 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
|
||||
if (fwrite(streamDataTransCoding, sizeof(uint8_t),
|
||||
streamLenTransCoding, transcodingBitstream) !=
|
||||
streamLenTransCoding) {
|
||||
streamLenTransCoding,
|
||||
transcodingBitstream) != streamLenTransCoding) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -718,8 +729,7 @@ int main(int argc, char* argv[]) {
|
||||
fprintf(stderr, "Error in RED trans-coding\n");
|
||||
exit(0);
|
||||
}
|
||||
streamLenTransCoding =
|
||||
static_cast<size_t>(streamLenTransCoding_int);
|
||||
streamLenTransCoding = static_cast<size_t>(streamLenTransCoding_int);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user