当前位置: 首页>>代码示例>>Java>>正文


Java ITrackInfo类代码示例

本文整理汇总了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);
    }
}
 
开发者ID:Dreamxiaoxuan,项目名称:AndroidTvDemo,代码行数:21,代码来源:IjkVideoView.java

示例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()]);
}
 
开发者ID:Dreamxiaoxuan,项目名称:AndroidTvDemo,代码行数:24,代码来源:IjkMediaPlayer.java

示例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);
    }
}
 
开发者ID:bigjelly,项目名称:ShaddockVideoPlayer,代码行数:19,代码来源:IjkVideoView.java

示例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()]);
}
 
开发者ID:bigjelly,项目名称:ShaddockVideoPlayer,代码行数:26,代码来源:IjkMediaPlayer.java

示例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();
    }
 
开发者ID:tcking,项目名称:GiraffePlayer2,代码行数:37,代码来源:TracksAdapter.java

示例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;

    }
}
 
开发者ID:tcking,项目名称:GiraffePlayer2,代码行数:15,代码来源:TrackGroup.java

示例7: getTrackInfo

import tv.danmaku.ijk.media.player.misc.ITrackInfo; //导入依赖的package包/类
@Override
public ITrackInfo[] getTrackInfo()
{
    if (mVideoView == null)
        return null;
    
    return mVideoView.getTrackInfo();
}
 
开发者ID:Dreamxiaoxuan,项目名称:AndroidTvDemo,代码行数:9,代码来源:FullScreenVideoActivity.java

示例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);
        }
    }
}
 
开发者ID:Dreamxiaoxuan,项目名称:AndroidTvDemo,代码行数:16,代码来源:TracksFragment.java

示例9: getTrackInfo

import tv.danmaku.ijk.media.player.misc.ITrackInfo; //导入依赖的package包/类
public ITrackInfo[] getTrackInfo()
{
    if (mMediaPlayer == null)
        return null;
    
    return mMediaPlayer.getTrackInfo();
}
 
开发者ID:Dreamxiaoxuan,项目名称:AndroidTvDemo,代码行数:8,代码来源:IjkVideoView.java

示例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;
    }
}
 
开发者ID:Dreamxiaoxuan,项目名称:AndroidTvDemo,代码行数:11,代码来源:IjkMediaPlayer.java

示例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;
    }
}
 
开发者ID:bigjelly,项目名称:ShaddockVideoPlayer,代码行数:13,代码来源:IjkMediaPlayer.java

示例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);
        }
    }
}
 
开发者ID:Vbytes,项目名称:android-sample,代码行数:13,代码来源:TracksFragment.java


注:本文中的tv.danmaku.ijk.media.player.misc.ITrackInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。