Search in sources :

Example 6 with RecorderCapability

use of com.aws.iot.edgeconnectorforkvs.videorecorder.model.RecorderCapability in project aws-iot-greengrass-edge-connector-for-kinesis-video-stream by awslabs.

the class RecorderBranchBaseUnitTest method getMuxerTest_getMuxerByType_nonNullValue.

@Test
public void getMuxerTest_getMuxerByType_nonNullValue() {
    willReturn(this.mockMuxer).given(this.mockGst).newElement(anyString());
    RecorderCapability cap = RecorderCapability.VIDEO_AUDIO;
    ContainerType type = ContainerType.MATROSKA;
    RecorderBranchTest testBranch = new RecorderBranchTest(cap);
    Assertions.assertNotNull(testBranch.getMuxer(type, true));
    Assertions.assertNotNull(testBranch.getMuxer(type, false));
}
Also used : RecorderCapability(com.aws.iot.edgeconnectorforkvs.videorecorder.model.RecorderCapability) ContainerType(com.aws.iot.edgeconnectorforkvs.videorecorder.model.ContainerType) Test(org.junit.jupiter.api.Test)

Example 7 with RecorderCapability

use of com.aws.iot.edgeconnectorforkvs.videorecorder.model.RecorderCapability in project aws-iot-greengrass-edge-connector-for-kinesis-video-stream by awslabs.

the class VideoRecorderBase method bindBranchToTees.

private void bindBranchToTees(boolean bindVideo, boolean bindAudio) {
    for (Map.Entry<String, RecorderBranchBase> branch : this.branches.entrySet()) {
        RecorderCapability branchCap = branch.getValue().getCapability();
        ArrayList<Element> videoArr = null;
        ArrayList<Element> audioArr = null;
        // bind teeVideos
        if (bindVideo && (branchCap == RecorderCapability.VIDEO_AUDIO || RecorderCapability.VIDEO_ONLY == branchCap)) {
            videoArr = this.teeVideos;
        }
        // bind teeAudios
        if (bindAudio && (branchCap == RecorderCapability.VIDEO_AUDIO || RecorderCapability.AUDIO_ONLY == branchCap)) {
            audioArr = this.teeAudios;
        }
        branch.getValue().bindPaths(videoArr, audioArr);
    }
}
Also used : RecorderCapability(com.aws.iot.edgeconnectorforkvs.videorecorder.model.RecorderCapability) Element(org.freedesktop.gstreamer.Element) HashMap(java.util.HashMap) Map(java.util.Map)

Aggregations

RecorderCapability (com.aws.iot.edgeconnectorforkvs.videorecorder.model.RecorderCapability)7 Test (org.junit.jupiter.api.Test)5 ContainerType (com.aws.iot.edgeconnectorforkvs.videorecorder.model.ContainerType)4 Element (org.freedesktop.gstreamer.Element)2 HashMap (java.util.HashMap)1 Map (java.util.Map)1 Pad (org.freedesktop.gstreamer.Pad)1