Java Code Examples for org.videolan.libvlc.Media#getMeta()

The following examples show how to use org.videolan.libvlc.Media#getMeta() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VideoGridFragment.java    From VCL-Android with Apache License 2.0 5 votes vote down vote up
private void setContextMenuItems(Menu menu, MediaWrapper mediaWrapper) {
    long lastTime = mediaWrapper.getTime();
    if (lastTime > 0)
        menu.findItem(R.id.video_list_play_from_start).setVisible(true);

    boolean hasInfo = false;
    final Media media = new Media(VLCInstance.get(), mediaWrapper.getUri());
    media.parse();
    if (media.getMeta(Media.Meta.Title) != null)
        hasInfo = true;
    media.release();
    menu.findItem(R.id.video_list_info).setVisible(hasInfo);
    menu.findItem(R.id.video_list_delete).setVisible(!AndroidUtil.isLolliPopOrLater() ||
            mediaWrapper.getLocation().startsWith("file://" + AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY));
}
 
Example 2
Source File: MediaWrapper.java    From OTTLivePlayer_vlc with MIT License 4 votes vote down vote up
private static String getMetaId(Media media, String defaultMeta, int id, boolean trim) {
    String meta = media.getMeta(id);
    return meta != null ? trim ? meta.trim() : meta : defaultMeta;
}
 
Example 3
Source File: MediaWrapper.java    From OTTLivePlayer_vlc with MIT License 4 votes vote down vote up
private static String getMetaId(Media media, String defaultMeta, int id, boolean trim) {
    String meta = media.getMeta(id);
    return meta != null ? trim ? meta.trim() : meta : defaultMeta;
}
 
Example 4
Source File: MediaWrapper.java    From VCL-Android with Apache License 2.0 4 votes vote down vote up
private static String getMetaId(Media media, int id, boolean trim) {
    String meta = media.getMeta(id);
    return meta != null ? trim ? meta.trim() : meta : null;
}