Commit cee330d0 authored by vaclav's avatar vaclav Committed by Manuel Jander
Browse files

accept RTPDUMP switches

parent 4014d62d
Loading
Loading
Loading
Loading
+54 −0
Original line number Diff line number Diff line
@@ -65,6 +65,12 @@ static
    int32_t frame = 0; /* Counter of frames */

#define RANDOM_INITSEED_DEC ( 0xFADE )
<<<<<<< HEAD
=======
#else
#define RANDOM_INITSEED_DEC ( 0xFEEDFADE )
#endif
>>>>>>> 526949b21 (accept RTPDUMP switches)

#ifdef DEBUGGING
#define MIN_NUM_BITS_ACTIVE_FRAME 56
@@ -133,6 +139,12 @@ typedef struct
    bool applyPiData;
    char *piOutputFilename;
    bool rtpOutSR;
<<<<<<< HEAD
=======
#ifdef FIX_1419_MONO_STEREO_UMX
    bool evsMode;
#endif
>>>>>>> 526949b21 (accept RTPDUMP switches)
    IVAS_ROOM_SIZE_T roomSize;

} DecArguments;
@@ -1379,6 +1391,10 @@ static bool parseCmdlIVAS_dec(
            arg->decMode = IVAS_DEC_MODE_EVS;
            i++;
        }
<<<<<<< HEAD
=======
#endif
>>>>>>> 526949b21 (accept RTPDUMP switches)
        else if ( strcmp( argv_to_upper, "-ROOM_SIZE" ) == 0 )
        {
            i++;
@@ -1721,6 +1737,17 @@ 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 );
<<<<<<< HEAD
=======
#else
        /* 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_DEC );
        uint32_t ssrc = ( (uint32_t) rand() & 0x0000FFFF ) | ( (uint32_t) rand() << 16 );
        uint16_t seqNumInitVal = (uint16_t) ( rand() & 0xFFFF );
#endif
>>>>>>> 526949b21 (accept RTPDUMP switches)

        if ( ( error = IVAS_DEC_GetDelay( hIvasDec, delayNumSamples_temp, &delayTimeScale_temp ) ) != IVAS_ERR_OK )
        {
@@ -3277,8 +3304,35 @@ static ivas_error decodeVoIP(
            /* Once good frame decoded, catch up */
            if ( decodedGoodFrame )
            {
<<<<<<< HEAD
                if ( ( error = initOnFirstGoodFrame( hIvasDec, arg, numInitialBadFrames, &nOutSamples, &vec_pos_len, delayNumSamples_orig, &delayNumSamples, &delayTimeScale,
                                                     &bsFormat, &afWriter, &masaWriter, ismWriters, &nOutChannels, &numObj, &srRtp, &splitRendWriter ) ) != IVAS_ERR_OK )
=======
#ifndef FIX_1119_SPLIT_RENDERING_VOIP
                SplitFileReadWrite *splitRendWriter = NULL;

#endif
                if ( ( error = initOnFirstGoodFrame( hIvasDec,
                                                     arg,
                                                     numInitialBadFrames,
                                                     &nOutSamples,
#ifdef FIX_1119_SPLIT_RENDERING_VOIP
                                                     &vec_pos_len,
#else
                                                     NULL,
#endif
                                                     delayNumSamples_orig,
                                                     &delayNumSamples,
                                                     &delayTimeScale,
                                                     &bsFormat,
                                                     &afWriter,
                                                     &masaWriter,
                                                     ismWriters,
                                                     &nOutChannels,
                                                     &numObj,
                                                     &srRtp,
                                                     &splitRendWriter ) ) != IVAS_ERR_OK )
>>>>>>> 526949b21 (accept RTPDUMP switches)
                {
                    goto cleanup;
                }