本文整理汇总了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;
}
}
示例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);
}
示例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);
}
示例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);
}