Commit 3654d34a authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

clang format

parent 6d589ea2
Loading
Loading
Loading
Loading
Loading
+36 −6
Original line number Diff line number Diff line
@@ -116,6 +116,7 @@ typedef struct
    bool sceneDescriptionInput;
    IVAS_RENDER_FRAMESIZE render_framesize;
    int16_t numMandatoryCmdLineParams;
    bool help;
} CmdlnArgs;

typedef enum
@@ -134,6 +135,7 @@ typedef enum
    CmdLnOptionId_SplitRendBFIFile,
    CmdLnOptionId_framing,
    CmdLnOptionId_srParamsFile,
    CmdLnOptionId_help,
} CmdLnOptionId;

static const CmdLnParser_Option cliOptions[] = {
@@ -215,6 +217,12 @@ static const CmdLnParser_Option cliOptions[] = {
        .matchShort = "s",
        .description = "Path to the split rendering init params file",
    },
    {
        .id = CmdLnOptionId_help,
        .match = "help",
        .matchShort = "h",
        .description = "Show this help message and exit",
    },
};


@@ -481,6 +489,7 @@ static CmdlnArgs defaultArgs(

    args.render_framesize = IVAS_RENDER_FRAMESIZE_20MS;
    args.numMandatoryCmdLineParams = POST_REND_NUM_MANDATORY_CMD_LINE_PARAMS;
    args.help = false;

    return args;
}
@@ -621,6 +630,9 @@ static int16_t parseOption(
            }
            strncpy( args->srParamsFilePath, optionValues[0], POST_REND_MAX_CLI_ARG_LENGTH - 1 );
            break;
        case CmdLnOptionId_help:
            args->help = true;
            break;
        default:
            fprintf( stderr, "Error: Incorrect or invalid command-line usage!\n" );
            return -1;
@@ -642,6 +654,12 @@ static CmdlnArgs parseCmdlnArgs(
        exit( -1 ); /* Error printout handled by failing function */
    }

    if ( args.help )
    {
        CmdLnParser_printUsage( args.executableName, cliOptions, numCliOptions, args.numMandatoryCmdLineParams );
        exit( 0 );
    }

    if ( !checkRequiredArgs( args ) )
    {
        exit( -1 ); /* Error printout handled by failing function */
@@ -927,7 +945,6 @@ int main(

    convert_backslash( args.inputFilePath );
    convert_backslash( args.outputFilePath );
    convert_backslash( args.headRotationFilePath );
    convert_backslash( args.srParamsFilePath );

    /*------------------------------------------------------------------------------------------*
@@ -936,6 +953,7 @@ int main(

    if ( !isEmptyString( args.headRotationFilePath ) )
    {
        convert_backslash( args.headRotationFilePath );
        if ( RotationFileReader_open( args.headRotationFilePath, &headRotReader ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError opening file: %s\n", args.headRotationFilePath );
@@ -950,7 +968,11 @@ int main(
    if ( !isEmptyString( args.splitRendBFIFilePath ) )
    {
        convert_backslash( args.splitRendBFIFilePath );
        SplitRendBFIFileReader_open( args.splitRendBFIFilePath, &splitRendBFIReader );
        if ( SplitRendBFIFileReader_open(args.splitRendBFIFilePath, &splitRendBFIReader ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError opening file: %s\n", args.splitRendBFIFilePath );
            goto cleanup;
        }
    }

    /*------------------------------------------------------------------------------------------*
@@ -971,8 +993,16 @@ int main(
                                        &inFileSampleRate,
                                        &bitsBuffer.config.lc3plusHighRes );
        if ( error != IVAS_ERR_OK )
        {
            if (isEmptyString(args.inMetadataFilePaths[0]))
            {
                const CmdLnParser_Option *listOption = findOptionById( CmdLnOptionId_inputMetadata );
                fprintf( stderr, "\nError: Split rendering metadata file not specified, use option -%s/--%s.\n", listOption->matchShort, listOption->match );
            }
            else
            {
                fprintf( stderr, "\nError: Could not open split rendering metadata file %s!\n", args.inMetadataFilePaths[0] );
            }
            goto cleanup;
        }

@@ -1000,7 +1030,7 @@ int main(

        if ( ( error = IVAS_RTP_READER_Init( &srRTP, args.inputFilePath, NULL, false, NULL ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError in IVAS_RTP_READER_Init(): %d!\n", error );
            fprintf( stderr, "\nError in IVAS_RTP_READER_Init(), error code: %d!\n", error );
            goto cleanup;
        }
        audioReader = NULL;
+2 −2
Original line number Diff line number Diff line
@@ -552,11 +552,11 @@ ivas_error get_channel_config(
    }
    else if ( config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED )
    {
        strcpy( str, "BINAURAL_SPLIT_CODED" );
        strcpy( str, "Binaural: split-rendering mode using coded data" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    {
        strcpy( str, "Binaural_Split_PCM" );
        strcpy( str, "Binaural: split-rendering mode using raw PCM data" );
    }
    else if ( config == IVAS_AUDIO_CONFIG_EXTERNAL )
    {
+3 −4
Original line number Diff line number Diff line
@@ -179,8 +179,7 @@ static int16_t parseOpts(
    Option *opts,
    const int32_t numOpts,
    void *pOutputStruct,
    CmdLnParser_FnPtr_ParseOption parseOption 
)
    CmdLnParser_FnPtr_ParseOption parseOption )
{
    Option *currOpt = NULL;
    int32_t currOptIdx = 1;
+3 −3

File changed.

Contains only whitespace changes.