Commit 80c3a982 authored by Ripinder Singh's avatar Ripinder Singh
Browse files

Issue 1540: Expose payload type in IVAS_RTP_PACK_UpdateHeader API

parent 1b307622
Loading
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1957,6 +1957,9 @@ static ivas_error initOnFirstGoodFrame(
        uint16_t rtpDecSeed = RANDOM_INITSEED_DEC;
        uint32_t ssrc = ( (uint32_t) IVAS_RTP_OwnRandom( &rtpDecSeed ) & 0x0000FFFF ) | ( (uint32_t) IVAS_RTP_OwnRandom( &rtpDecSeed ) << 16 );
        uint16_t seqNumInitVal = IVAS_RTP_OwnRandom( &rtpDecSeed );
#ifdef FIX_1540_EXPOSE_PT_IN_RTP_HEADER_API
        uint8_t payloadType = DEFAULT_IVAS_PAYLOAD_TYPE; /* Dynamic PT are in range [96, 127] */
#endif

        if ( ( error = IVAS_DEC_GetDelay( hIvasDec, delayNumSamples_temp, &delayTimeScale_temp ) ) != IVAS_ERR_OK )
        {
@@ -1993,7 +1996,11 @@ static ivas_error initOnFirstGoodFrame(


            /* Split Rendering RTPDump Output file */
#ifdef FIX_1540_EXPOSE_PT_IN_RTP_HEADER_API
            if ( ( error = IVAS_RTP_WRITER_Init( srRtp, arg.outputWavFilename, 1000 / ( IVAS_NUM_FRAMES_PER_SEC * splitRendCodecFrameSizeMs ), payloadType, ssrc, seqNumInitVal ) ) != IVAS_ERR_OK )
#else
            if ( ( error = IVAS_RTP_WRITER_Init( srRtp, arg.outputWavFilename, 1000 / ( IVAS_NUM_FRAMES_PER_SEC * splitRendCodecFrameSizeMs ), ssrc, seqNumInitVal ) ) != IVAS_ERR_OK )
#endif
            {
                fprintf( stderr, "\nError: Can't open SR output bitstream file for RTP output %s \n\n", arg.outputWavFilename );
                return error;
+7 −0
Original line number Diff line number Diff line
@@ -230,6 +230,9 @@ int main(
    uint16_t rtpEncSeed = RANDOM_INITSEED_ENC;
    uint32_t ssrc = ( (uint32_t) IVAS_RTP_OwnRandom( &rtpEncSeed ) & 0x0000FFFF ) | ( (uint32_t) IVAS_RTP_OwnRandom( &rtpEncSeed ) << 16 );
    uint16_t seqNumInitVal = IVAS_RTP_OwnRandom( &rtpEncSeed );
#ifdef FIX_1540_EXPOSE_PT_IN_RTP_HEADER_API
    uint8_t payloadType = DEFAULT_IVAS_PAYLOAD_TYPE; /* Dynamic PT are in range [96, 127] */
#endif

    /*------------------------------------------------------------------------------------------*
     * Parse command-line arguments
@@ -623,7 +626,11 @@ int main(

    if ( arg.rtpdumpOutput )
    {
#ifdef FIX_1540_EXPOSE_PT_IN_RTP_HEADER_API
        if ( ( error = IVAS_RTP_WRITER_Init( &ivasRtp, arg.outputBitstreamFilename, arg.numFramesPerPacket, payloadType, ssrc, seqNumInitVal ) ) != IVAS_ERR_OK )
#else
        if ( ( error = IVAS_RTP_WRITER_Init( &ivasRtp, arg.outputBitstreamFilename, arg.numFramesPerPacket, ssrc, seqNumInitVal ) ) != IVAS_ERR_OK )
#endif
        {
            fprintf( stderr, "\nError: Can't open output bitstream file for RTP output %s \n\n", arg.outputBitstreamFilename );
            goto cleanup;
+7 −0
Original line number Diff line number Diff line
@@ -340,6 +340,9 @@ int encoder_main(
    uint16_t rtpEncSeed = RANDOM_INITSEED_ENC;
    uint32_t ssrc = ( (uint32_t) IVAS_RTP_OwnRandom( &rtpEncSeed ) & 0x0000FFFF ) | ( (uint32_t) IVAS_RTP_OwnRandom( &rtpEncSeed ) << 16 );
    uint16_t seqNumInitVal = IVAS_RTP_OwnRandom( &rtpEncSeed );
#ifdef FIX_1540_EXPOSE_PT_IN_RTP_HEADER_API
    uint8_t payloadType = DEFAULT_IVAS_PAYLOAD_TYPE; /* Dynamic PT are in range [96, 127] */
#endif

    /*------------------------------------------------------------------------------------------*
     * Parse command-line arguments
@@ -731,7 +734,11 @@ int encoder_main(

    if ( arg.rtpdumpOutput && init_RtpWriter )
    {
#ifdef FIX_1540_EXPOSE_PT_IN_RTP_HEADER_API
        if ( ( error = IVAS_RTP_WRITER_Init( ivasRtp, arg.outputBitstreamFilename, arg.numFramesPerPacket, payloadType, ssrc, seqNumInitVal ) ) != IVAS_ERR_OK )
#else
        if ( ( error = IVAS_RTP_WRITER_Init( ivasRtp, arg.outputBitstreamFilename, arg.numFramesPerPacket, ssrc, seqNumInitVal ) ) != IVAS_ERR_OK )
#endif
        {
            fprintf( stderr, "\nError: Can't open output bitstream file for RTP output %s \n\n", arg.outputBitstreamFilename );
            goto cleanup;
+4 −0
Original line number Diff line number Diff line
@@ -66,6 +66,10 @@
#define IVAS_TIME_SCALE_MIN 50  /* min. time-scaling [%] */
#define IVAS_TIME_SCALE_MAX 150 /* max. time-scaling [%] */

#ifdef FIX_1540_EXPOSE_PT_IN_RTP_HEADER_API
/* RTP constants */
#define DEFAULT_IVAS_PAYLOAD_TYPE ( 96 )
#endif

/*----------------------------------------------------------------------------------*
 * Common API enum for output audio configurations
+1 −0
Original line number Diff line number Diff line
@@ -169,6 +169,7 @@
/* any switch which is non-be wrt. TS 26.258 V3.0 */

#define FIX_1543_MID_LSF_BITS                           /* VA: float issue 1543: Resolve "MSAN: use-of-uninitialized-value in lib_enc/lsf_enc.c:262:5 for EVS encoder" */
#define FIX_1540_EXPOSE_PT_IN_RTP_HEADER_API            /* Expose Payload Type setting in RTP Header */


/* ##################### End NON-BE switches ########################### */
Loading