本文整理汇总了Java中tv.danmaku.ijk.media.player.misc.ITrackInfo类的典型用法代码示例。如果您正苦于以下问题:Java ITrackInfo类的具体用法?Java ITrackInfo怎么用?Java ITrackInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ITrackInfo类属于tv.danmaku.ijk.media.player.misc包,在下文中一共展示了ITrackInfo类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildTrackType
import tv.danmaku.ijk.media.player.misc.ITrackInfo; //导入依赖的package包/类
private String buildTrackType(int type)
{
Context context = getContext();
switch (type)
{
case ITrackInfo.MEDIA_TRACK_TYPE_VIDEO:
return context.getString(R.string.TrackType_video);
case ITrackInfo.MEDIA_TRACK_TYPE_AUDIO:
return context.getString(R.string.TrackType_audio);
case ITrackInfo.MEDIA_TRACK_TYPE_SUBTITLE:
return context.getString(R.string.TrackType_subtitle);
case ITrackInfo.MEDIA_TRACK_TYPE_TIMEDTEXT:
return context.getString(R.string.TrackType_timedtext);
case ITrackInfo.MEDIA_TRACK_TYPE_METADATA:
return context.getString(R.string.TrackType_metadata);
case ITrackInfo.MEDIA_TRACK_TYPE_UNKNOWN:
default:
return context.getString(R.string.TrackType_unknown);
}
}
示例2: getTrackInfo
import tv.danmaku.ijk.media.player.misc.ITrackInfo; //导入依赖的package包/类
@Override
public IjkTrackInfo[] getTrackInfo() {
Bundle bundle = getMediaMeta();
if (bundle == null)
return null;
IjkMediaMeta mediaMeta = IjkMediaMeta.parse(bundle);
if (mediaMeta == null || mediaMeta.mStreams == null)
return null;
ArrayList<IjkTrackInfo> trackInfos = new ArrayList<IjkTrackInfo>();
for (IjkMediaMeta.IjkStreamMeta streamMeta: mediaMeta.mStreams) {
IjkTrackInfo trackInfo = new IjkTrackInfo(streamMeta);
if (streamMeta.mType.equalsIgnoreCase(IjkMediaMeta.IJKM_VAL_TYPE__VIDEO)) {
trackInfo.setTrackType(ITrackInfo.MEDIA_TRACK_TYPE_VIDEO);
} else if (streamMeta.mType.equalsIgnoreCase(IjkMediaMeta.IJKM_VAL_TYPE__AUDIO)) {
trackInfo.setTrackType(ITrackInfo.MEDIA_TRACK_TYPE_AUDIO);
}
trackInfos.add(trackInfo);
}
return trackInfos.toArray(new IjkTrackInfo[trackInfos.size()]);
}
示例3: buildTrackType
import tv.danmaku.ijk.media.player.misc.ITrackInfo; //导入依赖的package包/类
private String buildTrackType(int type) {
Context context = getContext();
switch (type) {
case ITrackInfo.MEDIA_TRACK_TYPE_VIDEO:
return context.getString(R.string.TrackType_video);
case ITrackInfo.MEDIA_TRACK_TYPE_AUDIO:
return context.getString(R.string.TrackType_audio);
case ITrackInfo.MEDIA_TRACK_TYPE_SUBTITLE:
return context.getString(R.string.TrackType_subtitle);
case ITrackInfo.MEDIA_TRACK_TYPE_TIMEDTEXT:
return context.getString(R.string.TrackType_timedtext);
case ITrackInfo.MEDIA_TRACK_TYPE_METADATA:
return context.getString(R.string.TrackType_metadata);
case ITrackInfo.MEDIA_TRACK_TYPE_UNKNOWN:
default:
return context.getString(R.string.TrackType_unknown);
}
}
示例4: getTrackInfo
import tv.danmaku.ijk.media.player.misc.ITrackInfo; //导入依赖的package包/类
@Override
public IjkTrackInfo[] getTrackInfo() {
Bundle bundle = getMediaMeta();
if (bundle == null)
return null;
IjkMediaMeta mediaMeta = IjkMediaMeta.parse(bundle);
if (mediaMeta == null || mediaMeta.mStreams == null)
return null;
ArrayList<IjkTrackInfo> trackInfos = new ArrayList<IjkTrackInfo>();
for (IjkMediaMeta.IjkStreamMeta streamMeta: mediaMeta.mStreams) {
IjkTrackInfo trackInfo = new IjkTrackInfo(streamMeta);
if (streamMeta.mType.equalsIgnoreCase(IjkMediaMeta.IJKM_VAL_TYPE__VIDEO)) {
trackInfo.setTrackType(ITrackInfo.MEDIA_TRACK_TYPE_VIDEO);
} else if (streamMeta.mType.equalsIgnoreCase(IjkMediaMeta.IJKM_VAL_TYPE__AUDIO)) {
trackInfo.setTrackType(ITrackInfo.MEDIA_TRACK_TYPE_AUDIO);
} else if (streamMeta.mType.equalsIgnoreCase(IjkMediaMeta.IJKM_VAL_TYPE__TIMEDTEXT)) {
trackInfo.setTrackType(ITrackInfo.MEDIA_TRACK_TYPE_TIMEDTEXT);
}
trackInfos.add(trackInfo);
}
return trackInfos.toArray(new IjkTrackInfo[trackInfos.size()]);
}
示例5: load
import tv.danmaku.ijk.media.player.misc.ITrackInfo; //导入依赖的package包/类
public void load(String fingerprint) {
if (TextUtils.isEmpty(fingerprint)) {
return;
}
GiraffePlayer player = PlayerManager.getInstance().getPlayerByFingerprint(fingerprint);
if (player == null) {
return;
}
dataIndex.clear();
data.clear();
this.fingerprint = fingerprint;
ITrackInfo[] tracks = player.getTrackInfo();
for (int i = 0; i < tracks.length; i++) {
ITrackInfo track = tracks[i];
int trackType = track.getTrackType();
if (trackType == ITrackInfo.MEDIA_TRACK_TYPE_AUDIO ||
trackType == ITrackInfo.MEDIA_TRACK_TYPE_VIDEO ||
trackType == ITrackInfo.MEDIA_TRACK_TYPE_SUBTITLE ||
trackType == ITrackInfo.MEDIA_TRACK_TYPE_TIMEDTEXT) {
TrackGroup trackGroup = dataIndex.get(trackType);
if (trackGroup == null) {
int selectedTrack = player.getSelectedTrack(trackType);
trackGroup = new TrackGroup(trackType, selectedTrack);
// if (trackType == ITrackInfo.MEDIA_TRACK_TYPE_AUDIO) {
// trackGroup.getTracks().add(TrackInfoWrapper.OFF(fingerprint,trackType));
// }
dataIndex.put(trackType, trackGroup);
data.add(trackGroup);
}
TrackInfoWrapper e = new TrackInfoWrapper(fingerprint, track, i, trackType);
trackGroup.getTracks().add(e);
}
}
notifyDataSetChanged();
}
示例6: getTrackTypeName
import tv.danmaku.ijk.media.player.misc.ITrackInfo; //导入依赖的package包/类
public int getTrackTypeName() {
if (trackType==ITrackInfo.MEDIA_TRACK_TYPE_AUDIO) {
return R.string.giraffe_player_track_type_audio;
} else if (trackType == ITrackInfo.MEDIA_TRACK_TYPE_VIDEO) {
return R.string.giraffe_player_track_type_video;
} else if (trackType == ITrackInfo.MEDIA_TRACK_TYPE_TIMEDTEXT) {
return R.string.giraffe_player_track_type_timed_text;
} else if (trackType == ITrackInfo.MEDIA_TRACK_TYPE_SUBTITLE) {
return R.string.giraffe_player_track_type_subtitle;
} else {
return R.string.giraffe_player_track_type_unknown;
}
}
示例7: getTrackInfo
import tv.danmaku.ijk.media.player.misc.ITrackInfo; //导入依赖的package包/类
@Override
public ITrackInfo[] getTrackInfo()
{
if (mVideoView == null)
return null;
return mVideoView.getTrackInfo();
}
示例8: setTrackHolder
import tv.danmaku.ijk.media.player.misc.ITrackInfo; //导入依赖的package包/类
public void setTrackHolder(ITrackHolder trackHolder)
{
clear();
mTrackHolder = trackHolder;
mTrackInfos = mTrackHolder.getTrackInfo();
if (mTrackInfos != null)
{
for (ITrackInfo trackInfo : mTrackInfos)
{
int index = getCount();
TrackItem item = new TrackItem(index, trackInfo);
add(item);
}
}
}
示例9: getTrackInfo
import tv.danmaku.ijk.media.player.misc.ITrackInfo; //导入依赖的package包/类
public ITrackInfo[] getTrackInfo()
{
if (mMediaPlayer == null)
return null;
return mMediaPlayer.getTrackInfo();
}
示例10: getSelectedTrack
import tv.danmaku.ijk.media.player.misc.ITrackInfo; //导入依赖的package包/类
public int getSelectedTrack(int trackType) {
switch (trackType) {
case ITrackInfo.MEDIA_TRACK_TYPE_VIDEO:
return (int)_getPropertyLong(FFP_PROP_INT64_SELECTED_VIDEO_STREAM, -1);
case ITrackInfo.MEDIA_TRACK_TYPE_AUDIO:
return (int)_getPropertyLong(FFP_PROP_INT64_SELECTED_AUDIO_STREAM, -1);
default:
return -1;
}
}
示例11: getSelectedTrack
import tv.danmaku.ijk.media.player.misc.ITrackInfo; //导入依赖的package包/类
public int getSelectedTrack(int trackType) {
switch (trackType) {
case ITrackInfo.MEDIA_TRACK_TYPE_VIDEO:
return (int)_getPropertyLong(FFP_PROP_INT64_SELECTED_VIDEO_STREAM, -1);
case ITrackInfo.MEDIA_TRACK_TYPE_AUDIO:
return (int)_getPropertyLong(FFP_PROP_INT64_SELECTED_AUDIO_STREAM, -1);
case ITrackInfo.MEDIA_TRACK_TYPE_TIMEDTEXT:
return (int)_getPropertyLong(FFP_PROP_INT64_SELECTED_TIMEDTEXT_STREAM, -1);
default:
return -1;
}
}
示例12: setTrackHolder
import tv.danmaku.ijk.media.player.misc.ITrackInfo; //导入依赖的package包/类
public void setTrackHolder(ITrackHolder trackHolder) {
clear();
mTrackHolder = trackHolder;
mTrackInfos = mTrackHolder.getTrackInfo();
if (mTrackInfos != null) {
for(ITrackInfo trackInfo: mTrackInfos) {
int index = getCount();
TrackItem item = new TrackItem(index, trackInfo);
add(item);
}
}
}