当前位置: 首页>>代码示例>>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;未经允许,请勿转载。