复合录制创建空视频

Composite recording creates empty video

这是我使用 java.but 创建复合视频录制的代码,它会创建空白视频。不播放 stream.why?

mp       = kurento.createMediaPipeline();

WebRtcEndpoint webRtcEPRed = new WebRtcEndpoint.Builder(mp).build();
WebRtcEndpoint webRtcEPGreen = new WebRtcEndpoint.Builder(mp).build();

Composite composite = new Composite.Builder(mp).build();
HubPort hubPort1 = new HubPort.Builder(composite).build();
HubPort hubPort2 = new HubPort.Builder(composite).build();
HubPort hubPort3 = new HubPort.Builder(composite).build();

RecorderEndpoint recorderEP =
    new RecorderEndpoint.Builder(mp, RECORDING_PATH + "twoside" + RECORDING_EXT).build();


webRtcEPRed.connect(hubPort1);
webRtcEPGreen.connect(hubPort2);

hubPort3.connect(recorderEP);

recorderEP.record();

我更改了我的代码如下,现在它工作正常

  // Media pipeline
    pipeline = kurento.createMediaPipeline();


    Composite composite = new Composite.Builder(pipeline).build();

    HubPort hubPort1 = new HubPort.Builder(composite).build();
    HubPort hubPort2 = new HubPort.Builder(composite).build();
    HubPort hubPort3 = new HubPort.Builder(composite).build();

    recorderEP =  new RecorderEndpoint.Builder(pipeline, RECORDING_PATH + "twosidess" + RECORDING_EXT).build();

    webRtcCaller.connect(webRtcCallee);
    webRtcCaller.connect(recorderEP);

    webRtcCaller.connect(hubPort1);
    webRtcCallee.connect(hubPort2);

    webRtcCallee.connect(webRtcCaller);

    hubPort3.connect(recorderEP);
    recorderEP.record();