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


Java MMSH類代碼示例

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


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

示例1: getMediaPlayer

import net.sourceforge.servestream.transport.MMSH; //導入依賴的package包/類
/**
    * Detects the appropriate media player depending on the URI of 
    * a file.
    * @param uri path to a file.
    * @return a media player.
    */
private AbstractMediaPlayer getMediaPlayer(String uri) {
	if (uri.startsWith(HTTP.getProtocolName())) {
		return mNativeMediaPlayer;
	} else if (uri.startsWith(HTTPS.getProtocolName())) {
		return mNativeMediaPlayer;
	} else if (uri.startsWith(File.getProtocolName())) {
		return mNativeMediaPlayer;
	} else if (uri.startsWith(RTSP.getProtocolName())) {
		return mNativeMediaPlayer;
	} else if (uri.startsWith(MMS.getProtocolName())) {
		return getFFmpegPlayer();
	} else if (uri.startsWith(MMSH.getProtocolName())) {
		return getFFmpegPlayer();
	} else if (uri.startsWith(MMST.getProtocolName())) {
		return getFFmpegPlayer();
	} else {
		return mNativeMediaPlayer;
	}
}
 
開發者ID:wseemann,項目名稱:ServeStream,代碼行數:26,代碼來源:MultiPlayer.java

示例2: onContentTypeObtained

import net.sourceforge.servestream.transport.MMSH; //導入依賴的package包/類
@Override
public void onContentTypeObtained(String path, boolean useFFmpegPlayer, 
		String contentType) {
	if (contentType.equalsIgnoreCase("video/x-ms-asf") || 
			contentType.equalsIgnoreCase("application/vnd.ms-asf")) {
		path = path.replace(HTTP.getProtocolName(), MMSH.getProtocolName());
	} else if (contentType.equals("audio/aacp") ||
			contentType.equals("audio/3gpp") ||
			contentType.equals("audio/3gpp2")) {
		useFFmpegPlayer = true;
	}
	
	setDataSource(null, path, -1, false, useFFmpegPlayer, contentType);
}
 
開發者ID:wseemann,項目名稱:ServeStream,代碼行數:15,代碼來源:MultiPlayer.java

示例3: onContentTypeObtained

import net.sourceforge.servestream.transport.MMSH; //導入依賴的package包/類
@Override
public void onContentTypeObtained(String path, boolean isLocalFile,
		boolean useFFmpegPlayer, String contentType) {
	if (contentType.equalsIgnoreCase("video/x-ms-asf") || 
   		contentType.equalsIgnoreCase("application/vnd.ms-asf")) {
		path = path.replace(HTTP.getProtocolName(), MMSH.getProtocolName());
	}
	
	setDataSource(path, isLocalFile, useFFmpegPlayer, contentType);
}
 
開發者ID:abeluck,項目名稱:radioplayer,代碼行數:11,代碼來源:MultiPlayer.java

示例4: onContentTypeObtained

import net.sourceforge.servestream.transport.MMSH; //導入依賴的package包/類
@Override
public void onContentTypeObtained(String path, boolean useFFmpegPlayer, 
		String contentType) {
	if (contentType.equalsIgnoreCase("video/x-ms-asf") || 
   		contentType.equalsIgnoreCase("application/vnd.ms-asf")) {
		path = path.replace(HTTP.getProtocolName(), MMSH.getProtocolName());
	}
	
	setDataSource(null, path, -1, false, useFFmpegPlayer, contentType);
}
 
開發者ID:minstrelsy,項目名稱:servestream,代碼行數:11,代碼來源:MultiPlayer.java


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