當前位置: 首頁>>代碼示例>>Java>>正文


Java IPlayItem類代碼示例

本文整理匯總了Java中org.red5.server.api.stream.IPlayItem的典型用法代碼示例。如果您正苦於以下問題:Java IPlayItem類的具體用法?Java IPlayItem怎麽用?Java IPlayItem使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IPlayItem類屬於org.red5.server.api.stream包,在下文中一共展示了IPlayItem類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: replace

import org.red5.server.api.stream.IPlayItem; //導入依賴的package包/類
/** {@inheritDoc} */
public boolean replace(IPlayItem oldItem, IPlayItem newItem) {
    boolean result = false;
    read.lock();
    try {
        int index = items.indexOf(oldItem);
        items.remove(index);
        items.set(index, newItem);
        result = true;
    } catch (Exception e) {

    } finally {
        read.unlock();
    }
    return result;
}
 
開發者ID:Red5,項目名稱:red5-server-common,代碼行數:17,代碼來源:PlaylistSubscriberStream.java

示例2: replace

import org.red5.server.api.stream.IPlayItem; //導入依賴的package包/類
/** {@inheritDoc} */
public boolean replace(IPlayItem oldItem, IPlayItem newItem) {
	boolean result = false;
	read.lock();
	try {
		int index = items.indexOf(oldItem);
		items.remove(index);
		items.set(index, newItem);
		result = true;
	} catch (Exception e) {

	} finally {
		read.unlock();
	}
	return result;
}
 
開發者ID:cwpenhale,項目名稱:red5-mobileconsole,代碼行數:17,代碼來源:PlaylistSubscriberStream.java

示例3: sendResetStatus

import org.red5.server.api.stream.IPlayItem; //導入依賴的package包/類
/**
 * Send reset status for item
 * 
 * @param item
 *            Playlist item
 */
private void sendResetStatus(IPlayItem item) {
    Status reset = new Status(StatusCodes.NS_PLAY_RESET);
    reset.setClientid(streamId);
    reset.setDetails(item.getName());
    reset.setDesciption(String.format("Playing and resetting %s.", item.getName()));

    doPushMessage(reset);
}
 
開發者ID:Red5,項目名稱:red5-server-common,代碼行數:15,代碼來源:PlayEngine.java

示例4: sendStartStatus

import org.red5.server.api.stream.IPlayItem; //導入依賴的package包/類
/**
 * Send playback start status notification
 * 
 * @param item
 *            Playlist item
 */
private void sendStartStatus(IPlayItem item) {
    Status start = new Status(StatusCodes.NS_PLAY_START);
    start.setClientid(streamId);
    start.setDetails(item.getName());
    start.setDesciption(String.format("Started playing %s.", item.getName()));

    doPushMessage(start);
}
 
開發者ID:Red5,項目名稱:red5-server-common,代碼行數:15,代碼來源:PlayEngine.java

示例5: sendStopStatus

import org.red5.server.api.stream.IPlayItem; //導入依賴的package包/類
/**
 * Send playback stoppage status notification
 * 
 * @param item
 *            Playlist item
 */
private void sendStopStatus(IPlayItem item) {
    Status stop = new Status(StatusCodes.NS_PLAY_STOP);
    stop.setClientid(streamId);
    stop.setDesciption(String.format("Stopped playing %s.", item.getName()));
    stop.setDetails(item.getName());

    doPushMessage(stop);
}
 
開發者ID:Red5,項目名稱:red5-server-common,代碼行數:15,代碼來源:PlayEngine.java

示例6: sendSeekStatus

import org.red5.server.api.stream.IPlayItem; //導入依賴的package包/類
/**
 * Send seek status notification
 * 
 * @param item
 *            Playlist item
 * @param position
 *            Seek position
 */
private void sendSeekStatus(IPlayItem item, int position) {
    Status seek = new Status(StatusCodes.NS_SEEK_NOTIFY);
    seek.setClientid(streamId);
    seek.setDetails(item.getName());
    seek.setDesciption(String.format("Seeking %d (stream ID: %d).", position, streamId));

    doPushMessage(seek);
}
 
開發者ID:Red5,項目名稱:red5-server-common,代碼行數:17,代碼來源:PlayEngine.java

示例7: sendPauseStatus

import org.red5.server.api.stream.IPlayItem; //導入依賴的package包/類
/**
 * Send pause status notification
 * 
 * @param item
 *            Playlist item
 */
private void sendPauseStatus(IPlayItem item) {
    Status pause = new Status(StatusCodes.NS_PAUSE_NOTIFY);
    pause.setClientid(streamId);
    pause.setDetails(item.getName());

    doPushMessage(pause);
}
 
開發者ID:Red5,項目名稱:red5-server-common,代碼行數:14,代碼來源:PlayEngine.java

示例8: sendResumeStatus

import org.red5.server.api.stream.IPlayItem; //導入依賴的package包/類
/**
 * Send resume status notification
 * 
 * @param item
 *            Playlist item
 */
private void sendResumeStatus(IPlayItem item) {
    Status resume = new Status(StatusCodes.NS_UNPAUSE_NOTIFY);
    resume.setClientid(streamId);
    resume.setDetails(item.getName());

    doPushMessage(resume);
}
 
開發者ID:Red5,項目名稱:red5-server-common,代碼行數:14,代碼來源:PlayEngine.java

示例9: sendPublishedStatus

import org.red5.server.api.stream.IPlayItem; //導入依賴的package包/類
/**
 * Send published status notification
 * 
 * @param item
 *            Playlist item
 */
private void sendPublishedStatus(IPlayItem item) {
    Status published = new Status(StatusCodes.NS_PLAY_PUBLISHNOTIFY);
    published.setClientid(streamId);
    published.setDetails(item.getName());

    doPushMessage(published);
}
 
開發者ID:Red5,項目名稱:red5-server-common,代碼行數:14,代碼來源:PlayEngine.java

示例10: sendUnpublishedStatus

import org.red5.server.api.stream.IPlayItem; //導入依賴的package包/類
/**
 * Send unpublished status notification
 * 
 * @param item
 *            Playlist item
 */
private void sendUnpublishedStatus(IPlayItem item) {
    Status unpublished = new Status(StatusCodes.NS_PLAY_UNPUBLISHNOTIFY);
    unpublished.setClientid(streamId);
    unpublished.setDetails(item.getName());

    doPushMessage(unpublished);
}
 
開發者ID:Red5,項目名稱:red5-server-common,代碼行數:14,代碼來源:PlayEngine.java

示例11: sendStreamNotFoundStatus

import org.red5.server.api.stream.IPlayItem; //導入依賴的package包/類
/**
 * Stream not found status notification
 * 
 * @param item
 *            Playlist item
 */
private void sendStreamNotFoundStatus(IPlayItem item) {
    Status notFound = new Status(StatusCodes.NS_PLAY_STREAMNOTFOUND);
    notFound.setClientid(streamId);
    notFound.setLevel(Status.ERROR);
    notFound.setDetails(item.getName());

    doPushMessage(notFound);
}
 
開發者ID:Red5,項目名稱:red5-server-common,代碼行數:15,代碼來源:PlayEngine.java

示例12: sendInsufficientBandwidthStatus

import org.red5.server.api.stream.IPlayItem; //導入依賴的package包/類
/**
 * Insufficient bandwidth notification
 * 
 * @param item
 *            Playlist item
 */
private void sendInsufficientBandwidthStatus(IPlayItem item) {
    Status insufficientBW = new Status(StatusCodes.NS_PLAY_INSUFFICIENT_BW);
    insufficientBW.setClientid(streamId);
    insufficientBW.setLevel(Status.WARNING);
    insufficientBW.setDetails(item.getName());
    insufficientBW.setDesciption("Data is playing behind the normal speed.");

    doPushMessage(insufficientBW);
}
 
開發者ID:Red5,項目名稱:red5-server-common,代碼行數:16,代碼來源:PlayEngine.java

示例13: sendVODInitCM

import org.red5.server.api.stream.IPlayItem; //導入依賴的package包/類
/**
 * Send VOD init control message
 * 
 * @param item
 *            Playlist item
 */
private void sendVODInitCM(IPlayItem item) {
    OOBControlMessage oobCtrlMsg = new OOBControlMessage();
    oobCtrlMsg.setTarget(IPassive.KEY);
    oobCtrlMsg.setServiceName("init");
    Map<String, Object> paramMap = new HashMap<String, Object>(1);
    paramMap.put("startTS", (int) item.getStart());
    oobCtrlMsg.setServiceParamMap(paramMap);
    msgInReference.get().sendOOBControlMessage(this, oobCtrlMsg);
}
 
開發者ID:Red5,項目名稱:red5-server-common,代碼行數:16,代碼來源:PlayEngine.java

示例14: addItem

import org.red5.server.api.stream.IPlayItem; //導入依賴的package包/類
/** {@inheritDoc} */
public void addItem(IPlayItem item) {
    write.lock();
    try {
        items.add(item);
    } finally {
        write.unlock();
    }
}
 
開發者ID:Red5,項目名稱:red5-server-common,代碼行數:10,代碼來源:PlaylistSubscriberStream.java

示例15: getItem

import org.red5.server.api.stream.IPlayItem; //導入依賴的package包/類
/** {@inheritDoc} */
public IPlayItem getItem(int index) {
    read.lock();
    try {
        return items.get(index);
    } catch (IndexOutOfBoundsException e) {
        return null;
    } finally {
        read.unlock();
    }
}
 
開發者ID:Red5,項目名稱:red5-server-common,代碼行數:12,代碼來源:PlaylistSubscriberStream.java


注:本文中的org.red5.server.api.stream.IPlayItem類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。