本文整理汇总了Java中org.kurento.module.chroma.ChromaFilter类的典型用法代码示例。如果您正苦于以下问题:Java ChromaFilter类的具体用法?Java ChromaFilter怎么用?Java ChromaFilter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ChromaFilter类属于org.kurento.module.chroma包,在下文中一共展示了ChromaFilter类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: connectWithMediaProcessing
import org.kurento.module.chroma.ChromaFilter; //导入依赖的package包/类
private void connectWithMediaProcessing(WebRtcEndpoint inputEndpoint,
WebRtcEndpoint outputEndpoint) {
switch (mediaProcessingType) {
case ENCODER:
Filter filter = new GStreamerFilter.Builder(mp, "capsfilter caps=video/x-raw")
.withFilterType(FilterType.VIDEO).build();
inputEndpoint.connect(filter);
filter.connect(outputEndpoint);
log.debug("Pipeline: WebRtcEndpoint -> GStreamerFilter -> WebRtcEndpoint");
break;
case FILTER:
case FACEOVERLAY:
filter = new FaceOverlayFilter.Builder(mp).build();
inputEndpoint.connect(filter);
filter.connect(outputEndpoint);
log.debug("Pipeline: WebRtcEndpoint -> FaceOverlayFilter -> WebRtcEndpoint");
break;
case ZBAR:
filter = new ZBarFilter.Builder(mp).build();
inputEndpoint.connect(filter);
filter.connect(outputEndpoint);
log.debug("Pipeline: WebRtcEndpoint -> ZBarFilter -> WebRtcEndpoint");
break;
case IMAGEOVERLAY:
filter = new ImageOverlayFilter.Builder(mp).build();
inputEndpoint.connect(filter);
filter.connect(outputEndpoint);
log.debug("Pipeline: WebRtcEndpoint -> ImageOverlayFilter -> WebRtcEndpoint");
break;
case PLATEDETECTOR:
filter = new PlateDetectorFilter.Builder(mp).build();
inputEndpoint.connect(filter);
filter.connect(outputEndpoint);
log.debug("Pipeline: WebRtcEndpoint -> PlateDetectorFilter -> WebRtcEndpoint");
break;
case CROWDDETECTOR:
List<RegionOfInterest> rois = getDummyRois();
filter = new CrowdDetectorFilter.Builder(mp, rois).build();
inputEndpoint.connect(filter);
filter.connect(outputEndpoint);
log.debug("Pipeline: WebRtcEndpoint -> CrowdDetectorFilter -> WebRtcEndpoint");
break;
case CHROMA:
filter = new ChromaFilter.Builder(mp, new WindowParam(0, 0, 640, 480)).build();
inputEndpoint.connect(filter);
filter.connect(outputEndpoint);
log.debug("Pipeline: WebRtcEndpoint -> ChromaFilter -> WebRtcEndpoint");
break;
case NONE:
default:
inputEndpoint.connect(outputEndpoint);
log.debug("Pipeline: WebRtcEndpoint -> WebRtcEndpoint");
break;
}
}