Commit bab583d8 authored by vaclav's avatar vaclav
Browse files

add sanity check for usage of RTP requests file

parent 09afd0f9
Loading
Loading
Loading
Loading
Loading
+26 −3
Original line number Diff line number Diff line
@@ -375,6 +375,28 @@ int main(
        }
    }

#ifdef FIX_FMSW_DEC
    /*------------------------------------------------------------------------------------------*
     * Open remote requests file for rtp packing (E-bytes)
     *------------------------------------------------------------------------------------------*/

    if ( arg.requestsFileName != NULL )
    {
        if ( !arg.rtpdumpOutput )
        {
            fprintf( stderr, "\nError: RTP requests file can be used with rtpdump output only.\n\n" );
            usage_enc();
            goto cleanup;
        }

        if ( ( error = RequestsFileReader_open( arg.requestsFileName, &requestsFileReader ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError: Can't open requests file %s \n\n", arg.requestsFileName );
            goto cleanup;
        }
    }
#endif

    /*------------------------------------------------------------------------------------------*
     * Handle Channel-aware mode
     *------------------------------------------------------------------------------------------*/
@@ -672,6 +694,7 @@ int main(
        }
    }

#ifndef FIX_FMSW_DEC
#ifdef FIX_1527_CMR_BITRATE_IDX
    /*------------------------------------------------------------------------------------------*
     * Open remote requests file for rtp packing (E-bytes)
@@ -685,7 +708,7 @@ int main(
        }
    }
#endif

#endif
    /*------------------------------------------------------------------------------------------*
     * Run the encoder
     *------------------------------------------------------------------------------------------*/
@@ -2212,11 +2235,11 @@ static void usage_enc( void )
    fprintf( stdout, "                      bitstream frames into TS26.253 Annex A IVAS RTP Payload Format packets and \n" );
    fprintf( stdout, "                      writes those to the output file. In EVS mono operating mode, TS26.445 Annex A.2.2 \n" );
    fprintf( stdout, "                      EVS RTP Payload Format is used. Optional N represents number of frames per RTP packet\n" );
    fprintf( stdout, "-scene_orientation  : Scene orientation trajectory file. Only used with rtpdump output.\n" );
    fprintf( stdout, "-device_orientation : Device orientation trajectory file. Only used with rtpdump output.\n" );
#ifdef FIX_1527_CMR_BITRATE_IDX
    fprintf( stdout, "-requests           : Remote requests file, Only used with rtpdump output.\n" );
#endif
    fprintf( stdout, "-scene_orientation  : Scene orientation trajectory file. Only used with rtpdump output.\n" );
    fprintf( stdout, "-device_orientation : Device orientation trajectory file. Only used with rtpdump output.\n" );

    fprintf( stdout, "\n" );

+1 −0
Original line number Diff line number Diff line
@@ -262,6 +262,7 @@ EVS mono is default, for IVAS choose one of the following: -stereo, -ism, -sba,
                      bitstream frames into TS26.253 Annex A IVAS RTP Payload Format packets and
                      writes those to the output file. In EVS mono operating mode, TS26.445 Annex A.2.2
                      EVS RTP Payload Format is used. Optional N represents number of frames per RTP packet
-requests           : Remote requests file, Only used with rtpdump output.
-scene_orientation  : Scene orientation trajectory file. Only used with rtpdump output.
-device_orientation : Device orientation trajectory file. Only used with rtpdump output.