本文整理汇总了Java中org.kurento.client.KurentoClient.getServerManager方法的典型用法代码示例。如果您正苦于以下问题:Java KurentoClient.getServerManager方法的具体用法?Java KurentoClient.getServerManager怎么用?Java KurentoClient.getServerManager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kurento.client.KurentoClient
的用法示例。
在下文中一共展示了KurentoClient.getServerManager方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: crunchKms
import org.kurento.client.KurentoClient; //导入方法依赖的package包/类
private void crunchKms(KurentoClient kurentoClient) {
ServerManager serverManager = kurentoClient.getServerManager();
List<MediaPipeline> mediaPipelines = serverManager.getPipelines();
numPipelines.addSample(mediaPipelines.size());
for (MediaPipeline p : mediaPipelines) {
crunchPipeline(p);
}
}
示例2: createRoom
import org.kurento.client.KurentoClient; //导入方法依赖的package包/类
/**
* Creates a room if it doesn't already exist. The room's name will be indicated by the session
* info bean.
*
* @param kcSessionInfo bean that will be passed to the {@link KurentoClientProvider} in order
* to obtain the
* {@link KurentoClient} that will be used by the room
* @throws RoomException in case of error while creating the room
*/
public void createRoom(KurentoClientSessionInfo kcSessionInfo) throws RoomException {
String roomName = kcSessionInfo.getRoomName();
Room room = rooms.get(kcSessionInfo);
if (room != null) {
throw new RoomException(Code.ROOM_CANNOT_BE_CREATED_ERROR_CODE,
"Room '" + roomName + "' already exists");
}
KurentoClient kurentoClient = kcProvider.getKurentoClient(kcSessionInfo);
room = new Room(roomName, kurentoClient, roomHandler, kcProvider.destroyWhenUnused());
Room oldRoom = rooms.putIfAbsent(roomName, room);
if (oldRoom != null) {
log.warn("Room '{}' has just been created by another thread", roomName);
return;
// throw new RoomException(
// Code.ROOM_CANNOT_BE_CREATED_ERROR_CODE,
// "Room '"
// + roomName
// + "' already exists (has just been created by another thread)");
}
String kcName = "[NAME NOT AVAILABLE]";
if (kurentoClient.getServerManager() != null) {
kcName = kurentoClient.getServerManager().getName();
}
log.warn("No room '{}' exists yet. Created one " + "using KurentoClient '{}'.", roomName,
kcName);
}
示例3: readPipelineElements
import org.kurento.client.KurentoClient; //导入方法依赖的package包/类
@Test
public void readPipelineElements() throws IOException {
MediaPipeline pipeline = kurentoClient.createMediaPipeline();
new WebRtcEndpoint.Builder(pipeline).build();
KurentoClient otherKurentoClient = kms.createKurentoClient();
ServerManager serverManager = otherKurentoClient.getServerManager();
List<MediaPipeline> mediaPipelines = serverManager.getPipelines();
for (MediaObject o : mediaPipelines.get(0).getChildren()) {
if (o.getId().indexOf("WebRtcEndpoint") >= 0) {
WebRtcEndpoint webRtc = (WebRtcEndpoint) o;
assertThat(pipeline, is(webRtc.getParent()));
}
}
}