src/integrationtests/java/com/aws/iot/integrationtests/edgeconnectorforkvs/videorecorder/VideoRecorderToggleAppPathTest.java [23:65]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private final String RTSP_URL =
            "rtspt://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov";
    private final String FILE_FOLDER = "/tmp/recorder_ut";
    private ByteArrayOutputStream rec1ByteOut1;
    private ByteArrayOutputStream rec1ByteOut2;
    private ByteArrayOutputStream rec2ByteOut1;
    private ByteArrayOutputStream rec2ByteOut2;
    private final int TEST_IDLE_INTERVAL = 5;
    private final int RECORDING_FILE_PREFIX_LEN = 8;

    @Getter
    @Setter
    private class RecorderTest {
        private VideoRecorder recorder;
        private String name;
        private ByteArrayOutputStream osCb;
        private ByteArrayOutputStream osOs;

        public RecorderTest(ByteArrayOutputStream cbOut, ByteArrayOutputStream osOut, String name) {
            final String filePrefix =
                    RandomStringUtils.randomAlphanumeric(RECORDING_FILE_PREFIX_LEN);
            final String filePathPrefix = FILE_FOLDER + "/" + filePrefix;

            this.name = name;
            this.osCb = cbOut;
            this.osOs = osOut;

            VideoRecorderBuilder builder = new VideoRecorderBuilder((rec, status, description) -> {
                System.out.println(name + "status changed: " + status + ", " + description);
                Assertions.assertNotEquals(RecorderStatus.FAILED, status);
            });

            builder.registerCamera(CameraType.RTSP, RTSP_URL);
            builder.registerFileSink(ContainerType.MATROSKA, filePathPrefix);
            builder.registerAppDataCallback(ContainerType.MATROSKA, (rec, bBuff) -> {
                byte[] array = new byte[bBuff.remaining()];
                bBuff.get(array);
                try {
                    this.osCb.write(array);
                } catch (IOException e) {
                    Assertions.fail();
                }
            });
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/integrationtests/java/com/aws/iot/integrationtests/edgeconnectorforkvs/videorecorder/VideoRecorderToggleSetAppPathTest.java [23:65]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private final String RTSP_URL =
            "rtspt://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov";
    private final String FILE_FOLDER = "/tmp/recorder_ut";
    private ByteArrayOutputStream rec1ByteOut1;
    private ByteArrayOutputStream rec1ByteOut2;
    private ByteArrayOutputStream rec2ByteOut1;
    private ByteArrayOutputStream rec2ByteOut2;
    private final int TEST_IDLE_INTERVAL = 5;
    private final int RECORDING_FILE_PREFIX_LEN = 8;

    @Getter
    @Setter
    private class RecorderTest {
        private VideoRecorder recorder;
        private String name;
        private ByteArrayOutputStream osCb;
        private ByteArrayOutputStream osOs;

        public RecorderTest(ByteArrayOutputStream cbOut, ByteArrayOutputStream osOut, String name) {
            final String filePrefix =
                    RandomStringUtils.randomAlphanumeric(RECORDING_FILE_PREFIX_LEN);
            final String filePathPrefix = FILE_FOLDER + "/" + filePrefix;

            this.name = name;
            this.osCb = cbOut;
            this.osOs = osOut;

            VideoRecorderBuilder builder = new VideoRecorderBuilder((rec, status, description) -> {
                System.out.println(name + "status changed: " + status + ", " + description);
                Assertions.assertNotEquals(RecorderStatus.FAILED, status);
            });

            builder.registerCamera(CameraType.RTSP, RTSP_URL);
            builder.registerFileSink(ContainerType.MATROSKA, filePathPrefix);
            builder.registerAppDataCallback(ContainerType.MATROSKA, (rec, bBuff) -> {
                byte[] array = new byte[bBuff.remaining()];
                bBuff.get(array);
                try {
                    this.osCb.write(array);
                } catch (IOException e) {
                    Assertions.fail();
                }
            });
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



