HubPort mixerPort1;
HubPort mixerPort2;
HubPort mixerPort3;
PlayerEndpoint player1;
PlayerEndpoint player2;
GStreamerFilter bn;
MediaPipelineFactory mpf = contentSession.getMediaPipelineFactory();
mediaPipeline = mpf.create();
contentSession.releaseOnTerminate(mediaPipeline);
player1 = mediaPipeline.newPlayerEndpoint(
VideoURLs.map.get("small-mp4")).build();
player2 = mediaPipeline.newPlayerEndpoint(
VideoURLs.map.get("small-mp4")).build();
bn = mediaPipeline.newGStreamerFilter("videobalance saturation=0.0")
.build();
mixer = mediaPipeline.newComposite().build();
mixerPort1 = mixer.newHubPort().build();
mixerPort2 = mixer.newHubPort().build();
mixerPort3 = mixer.newHubPort().build();
player2.connect(bn);
player1.connect(mixerPort1);
bn.connect(mixerPort2);
playersList = new ArrayList<PlayerConnection>();
PlayerConnection conection1 = new PlayerConnection(player1, mixerPort1);
PlayerConnection conection2 = new PlayerConnection(player2, mixerPort2);