本文整理匯總了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);
}