当前位置: 首页>>代码示例>>Java>>正文


Java KurentoClient.getServerManager方法代码示例

本文整理汇总了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);
	}
}
 
开发者ID:lulop-k,项目名称:kms-monitoring-java,代码行数:9,代码来源:KmsMonitor.java

示例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);
}
 
开发者ID:Kurento,项目名称:kurento-room,代码行数:38,代码来源:RoomManager.java

示例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()));
    }
  }
}
 
开发者ID:Kurento,项目名称:kurento-java,代码行数:22,代码来源:ServerManagerTest.java


注:本文中的org.kurento.client.KurentoClient.getServerManager方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。