Loading apps/encoder_fmtsw.c +20 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,9 @@ #include "flp_debug.h" #endif #ifdef FIXED_RTP_SEQUENCE_NUM #define RANDOM_INITSEED_ENC ( 0xFEEDDEAF ) #endif #define WMC_TOOL_SKIP Loading Loading @@ -335,6 +338,15 @@ int encoder_main( /* IVAS_RTP ivasRtp = { 0 }; */ #endif #ifdef FIXED_RTP_SEQUENCE_NUM /* Ideally ssrc is negotiated via SDP and sequence number is radomized but we use fixed seed for random num generator for regression based tests. Any realtime application should implement this initialization seperately */ srand( RANDOM_INITSEED_ENC ); uint32_t ssrc = ( (uint32_t) rand() & 0x0000FFFF ) | ( (uint32_t) rand() << 16 ); uint16_t seqNumInitVal = (uint16_t) ( rand() & 0xFFFF ); #endif /*------------------------------------------------------------------------------------------* * Parse command-line arguments *------------------------------------------------------------------------------------------*/ Loading Loading @@ -730,7 +742,11 @@ int encoder_main( if ( arg.rtpdumpOutput && init_RtpWriter ) { #ifdef FIXED_RTP_SEQUENCE_NUM if ( ( error = IVAS_RTP_WRITER_Init( ivasRtp, arg.outputBitstreamFilename, arg.numFramesPerPacket, ssrc, seqNumInitVal ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_RTP_WRITER_Init( ivasRtp, arg.outputBitstreamFilename, arg.numFramesPerPacket ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError: Can't open output bitstream file for RTP output %s \n\n", arg.outputBitstreamFilename ); goto cleanup; Loading Loading @@ -976,7 +992,11 @@ int encoder_main( goto cleanup; } #ifdef RTP_S4_251135_CR26253_0016_REV1 if ( ( error = IVAS_RTP_WriteNextFrame( ivasRtp, au, NULL, numBits, isMono, forcePacket ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_RTP_WriteNextFrame( ivasRtp, au, numBits, isMono, forcePacket ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError %s while pushing audio frame to RTP pack\n", IVAS_ENC_GetErrorMessage( error ) ); goto cleanup; Loading Loading
apps/encoder_fmtsw.c +20 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,9 @@ #include "flp_debug.h" #endif #ifdef FIXED_RTP_SEQUENCE_NUM #define RANDOM_INITSEED_ENC ( 0xFEEDDEAF ) #endif #define WMC_TOOL_SKIP Loading Loading @@ -335,6 +338,15 @@ int encoder_main( /* IVAS_RTP ivasRtp = { 0 }; */ #endif #ifdef FIXED_RTP_SEQUENCE_NUM /* Ideally ssrc is negotiated via SDP and sequence number is radomized but we use fixed seed for random num generator for regression based tests. Any realtime application should implement this initialization seperately */ srand( RANDOM_INITSEED_ENC ); uint32_t ssrc = ( (uint32_t) rand() & 0x0000FFFF ) | ( (uint32_t) rand() << 16 ); uint16_t seqNumInitVal = (uint16_t) ( rand() & 0xFFFF ); #endif /*------------------------------------------------------------------------------------------* * Parse command-line arguments *------------------------------------------------------------------------------------------*/ Loading Loading @@ -730,7 +742,11 @@ int encoder_main( if ( arg.rtpdumpOutput && init_RtpWriter ) { #ifdef FIXED_RTP_SEQUENCE_NUM if ( ( error = IVAS_RTP_WRITER_Init( ivasRtp, arg.outputBitstreamFilename, arg.numFramesPerPacket, ssrc, seqNumInitVal ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_RTP_WRITER_Init( ivasRtp, arg.outputBitstreamFilename, arg.numFramesPerPacket ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError: Can't open output bitstream file for RTP output %s \n\n", arg.outputBitstreamFilename ); goto cleanup; Loading Loading @@ -976,7 +992,11 @@ int encoder_main( goto cleanup; } #ifdef RTP_S4_251135_CR26253_0016_REV1 if ( ( error = IVAS_RTP_WriteNextFrame( ivasRtp, au, NULL, numBits, isMono, forcePacket ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_RTP_WriteNextFrame( ivasRtp, au, numBits, isMono, forcePacket ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError %s while pushing audio frame to RTP pack\n", IVAS_ENC_GetErrorMessage( error ) ); goto cleanup; Loading