• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ApicFrame类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.google.android.exoplayer2.metadata.id3.ApicFrame的典型用法代码示例。如果您正苦于以下问题:Java ApicFrame类的具体用法?Java ApicFrame怎么用?Java ApicFrame使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ApicFrame类属于com.google.android.exoplayer2.metadata.id3包,在下文中一共展示了ApicFrame类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: parseCoverArt

import com.google.android.exoplayer2.metadata.id3.ApicFrame; //导入依赖的package包/类
private static ApicFrame parseCoverArt(ParsableByteArray data) {
  int atomSize = data.readInt();
  int atomType = data.readInt();
  if (atomType == Atom.TYPE_data) {
    int fullVersionInt = data.readInt();
    int flags = Atom.parseFullAtomFlags(fullVersionInt);
    String mimeType = flags == 13 ? "image/jpeg" : flags == 14 ? "image/png" : null;
    if (mimeType == null) {
      Log.w(TAG, "Unrecognized cover art flags: " + flags);
      return null;
    }
    data.skipBytes(4); // empty (4)
    byte[] pictureData = new byte[atomSize - 16];
    data.readBytes(pictureData, 0, pictureData.length);
    return new ApicFrame(mimeType, null, 3 /* Cover (front) */, pictureData);
  }
  Log.w(TAG, "Failed to parse cover art attribute");
  return null;
}
 
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:20,代码来源:MetadataUtil.java


示例2: setArtworkFromMetadata

import com.google.android.exoplayer2.metadata.id3.ApicFrame; //导入依赖的package包/类
private boolean setArtworkFromMetadata(Metadata metadata) {
    for (int i = 0; i < metadata.length(); i++) {
        Metadata.Entry metadataEntry = metadata.get(i);
        if (metadataEntry instanceof ApicFrame) {
            byte[] bitmapData = ((ApicFrame) metadataEntry).pictureData;
            Bitmap bitmap = BitmapFactory.decodeByteArray(bitmapData, 0, bitmapData.length);
            return setArtworkFromBitmap(bitmap);
        }
    }
    return false;
}
 
开发者ID:yangchaojiang,项目名称:yjPlay,代码行数:12,代码来源:SimpleExoPlayerView.java


示例3: printMetadata

import com.google.android.exoplayer2.metadata.id3.ApicFrame; //导入依赖的package包/类
private void printMetadata(Metadata metadata, String prefix) {
  for (int i = 0; i < metadata.length(); i++) {
    Metadata.Entry entry = metadata.get(i);
    if (entry instanceof TextInformationFrame) {
      TextInformationFrame textInformationFrame = (TextInformationFrame) entry;
      Log.d(TAG, prefix + String.format("%s: value=%s", textInformationFrame.id,
          textInformationFrame.value));
    } else if (entry instanceof UrlLinkFrame) {
      UrlLinkFrame urlLinkFrame = (UrlLinkFrame) entry;
      Log.d(TAG, prefix + String.format("%s: url=%s", urlLinkFrame.id, urlLinkFrame.url));
    } else if (entry instanceof PrivFrame) {
      PrivFrame privFrame = (PrivFrame) entry;
      Log.d(TAG, prefix + String.format("%s: owner=%s", privFrame.id, privFrame.owner));
    } else if (entry instanceof GeobFrame) {
      GeobFrame geobFrame = (GeobFrame) entry;
      Log.d(TAG, prefix + String.format("%s: mimeType=%s, filename=%s, description=%s",
          geobFrame.id, geobFrame.mimeType, geobFrame.filename, geobFrame.description));
    } else if (entry instanceof ApicFrame) {
      ApicFrame apicFrame = (ApicFrame) entry;
      Log.d(TAG, prefix + String.format("%s: mimeType=%s, description=%s",
          apicFrame.id, apicFrame.mimeType, apicFrame.description));
    } else if (entry instanceof CommentFrame) {
      CommentFrame commentFrame = (CommentFrame) entry;
      Log.d(TAG, prefix + String.format("%s: language=%s, description=%s", commentFrame.id,
          commentFrame.language, commentFrame.description));
    } else if (entry instanceof Id3Frame) {
      Id3Frame id3Frame = (Id3Frame) entry;
      Log.d(TAG, prefix + String.format("%s", id3Frame.id));
    } else if (entry instanceof EventMessage) {
      EventMessage eventMessage = (EventMessage) entry;
      Log.d(TAG, prefix + String.format("EMSG: scheme=%s, id=%d, value=%s",
          eventMessage.schemeIdUri, eventMessage.id, eventMessage.value));
    }
  }
}
 
开发者ID:Tubitv,项目名称:TubiPlayer,代码行数:36,代码来源:EventLogger.java


示例4: printMetadata

import com.google.android.exoplayer2.metadata.id3.ApicFrame; //导入依赖的package包/类
private void printMetadata(Metadata metadata, String prefix) {
  for (int i = 0; i < metadata.length(); i++) {
    Metadata.Entry entry = metadata.get(i);
    if (entry instanceof TextInformationFrame) {
      TextInformationFrame textInformationFrame = (TextInformationFrame) entry;
      Log.d(TAG, prefix + String.format("%s: value=%s", textInformationFrame.id,
              textInformationFrame.value));
    } else if (entry instanceof UrlLinkFrame) {
      UrlLinkFrame urlLinkFrame = (UrlLinkFrame) entry;
      Log.d(TAG, prefix + String.format("%s: url=%s", urlLinkFrame.id, urlLinkFrame.url));
    } else if (entry instanceof PrivFrame) {
      PrivFrame privFrame = (PrivFrame) entry;
      Log.d(TAG, prefix + String.format("%s: owner=%s", privFrame.id, privFrame.owner));
    } else if (entry instanceof GeobFrame) {
      GeobFrame geobFrame = (GeobFrame) entry;
      Log.d(TAG, prefix + String.format("%s: mimeType=%s, filename=%s, description=%s",
              geobFrame.id, geobFrame.mimeType, geobFrame.filename, geobFrame.description));
    } else if (entry instanceof ApicFrame) {
      ApicFrame apicFrame = (ApicFrame) entry;
      Log.d(TAG, prefix + String.format("%s: mimeType=%s, description=%s",
              apicFrame.id, apicFrame.mimeType, apicFrame.description));
    } else if (entry instanceof CommentFrame) {
      CommentFrame commentFrame = (CommentFrame) entry;
      Log.d(TAG, prefix + String.format("%s: language=%s, description=%s", commentFrame.id,
              commentFrame.language, commentFrame.description));
    } else if (entry instanceof Id3Frame) {
      Id3Frame id3Frame = (Id3Frame) entry;
      Log.d(TAG, prefix + String.format("%s", id3Frame.id));
    } else if (entry instanceof EventMessage) {
      EventMessage eventMessage = (EventMessage) entry;
      Log.d(TAG, prefix + String.format("EMSG: scheme=%s, id=%d, value=%s",
              eventMessage.schemeIdUri, eventMessage.id, eventMessage.value));
    }
  }
}
 
开发者ID:CarGuo,项目名称:GSYVideoPlayer,代码行数:36,代码来源:EventLogger.java


示例5: printMetadata

import com.google.android.exoplayer2.metadata.id3.ApicFrame; //导入依赖的package包/类
private void printMetadata(Metadata metadata, String prefix) {
    for (int i = 0; i < metadata.length(); i++) {
        Metadata.Entry entry = metadata.get(i);
        if (entry instanceof TextInformationFrame) {
            TextInformationFrame textInformationFrame = (TextInformationFrame) entry;
            Log.d(TAG, prefix + String.format("%s: value=%s", textInformationFrame.id,
                    textInformationFrame.value));
        } else if (entry instanceof UrlLinkFrame) {
            UrlLinkFrame urlLinkFrame = (UrlLinkFrame) entry;
            Log.d(TAG, prefix + String.format("%s: url=%s", urlLinkFrame.id, urlLinkFrame.url));
        } else if (entry instanceof PrivFrame) {
            PrivFrame privFrame = (PrivFrame) entry;
            Log.d(TAG, prefix + String.format("%s: owner=%s", privFrame.id, privFrame.owner));
        } else if (entry instanceof GeobFrame) {
            GeobFrame geobFrame = (GeobFrame) entry;
            Log.d(TAG, prefix + String.format("%s: mimeType=%s, filename=%s, description=%s",
                    geobFrame.id, geobFrame.mimeType, geobFrame.filename, geobFrame.description));
        } else if (entry instanceof ApicFrame) {
            ApicFrame apicFrame = (ApicFrame) entry;
            Log.d(TAG, prefix + String.format("%s: mimeType=%s, description=%s",
                    apicFrame.id, apicFrame.mimeType, apicFrame.description));
        } else if (entry instanceof CommentFrame) {
            CommentFrame commentFrame = (CommentFrame) entry;
            Log.d(TAG, prefix + String.format("%s: language=%s, description=%s", commentFrame.id,
                    commentFrame.language, commentFrame.description));
        } else if (entry instanceof Id3Frame) {
            Id3Frame id3Frame = (Id3Frame) entry;
            Log.d(TAG, prefix + String.format("%s", id3Frame.id));
        } else if (entry instanceof EventMessage) {
            EventMessage eventMessage = (EventMessage) entry;
            Log.d(TAG, prefix + String.format("EMSG: scheme=%s, id=%d, value=%s",
                    eventMessage.schemeIdUri, eventMessage.id, eventMessage.value));
        }
    }
}
 
开发者ID:huyongli,项目名称:TigerVideo,代码行数:36,代码来源:EventLogger.java


示例6: setArtworkFromMetadata

import com.google.android.exoplayer2.metadata.id3.ApicFrame; //导入依赖的package包/类
private boolean setArtworkFromMetadata(Metadata metadata) {
  for (int i = 0; i < metadata.length(); i++) {
    Metadata.Entry metadataEntry = metadata.get(i);
    if (metadataEntry instanceof ApicFrame) {
      byte[] bitmapData = ((ApicFrame) metadataEntry).pictureData;
      Bitmap bitmap = BitmapFactory.decodeByteArray(bitmapData, 0, bitmapData.length);
      return setArtworkFromBitmap(bitmap);
    }
  }
  return false;
}
 
开发者ID:jcodeing,项目名称:K-Sonic,代码行数:12,代码来源:SimpleExoPlayerView.java


示例7: onMetadata

import com.google.android.exoplayer2.metadata.id3.ApicFrame; //导入依赖的package包/类
@Override
public void onMetadata(List<Id3Frame> id3Frames) {
    for (Id3Frame id3Frame : id3Frames) {
        if (id3Frame instanceof TxxxFrame) {
            TxxxFrame txxxFrame = (TxxxFrame) id3Frame;
            Log.i(TAG, String.format("ID3 TimedMetadata %s: description=%s, value=%s", txxxFrame.id,
                    txxxFrame.description, txxxFrame.value));
        } else if (id3Frame instanceof PrivFrame) {
            PrivFrame privFrame = (PrivFrame) id3Frame;
            Log.i(TAG, String.format("ID3 TimedMetadata %s: owner=%s", privFrame.id, privFrame.owner));
        } else if (id3Frame instanceof GeobFrame) {
            GeobFrame geobFrame = (GeobFrame) id3Frame;
            Log.i(TAG, String.format("ID3 TimedMetadata %s: mimeType=%s, filename=%s, description=%s",
                    geobFrame.id, geobFrame.mimeType, geobFrame.filename, geobFrame.description));
        } else if (id3Frame instanceof ApicFrame) {
            ApicFrame apicFrame = (ApicFrame) id3Frame;
            Log.i(TAG, String.format("ID3 TimedMetadata %s: mimeType=%s, description=%s",
                    apicFrame.id, apicFrame.mimeType, apicFrame.description));
        } else if (id3Frame instanceof TextInformationFrame) {
            TextInformationFrame textInformationFrame = (TextInformationFrame) id3Frame;
            Log.i(TAG, String.format("ID3 TimedMetadata %s: description=%s", textInformationFrame.id,
                    textInformationFrame.description));
        } else {
            Log.i(TAG, String.format("ID3 TimedMetadata %s", id3Frame.id));
        }
    }
}
 
开发者ID:AndroidTips,项目名称:MDVideo,代码行数:28,代码来源:EventLogger.java


示例8: onMetadata

import com.google.android.exoplayer2.metadata.id3.ApicFrame; //导入依赖的package包/类
@Override
public void onMetadata(List<Id3Frame> id3Frames) {
  for (Id3Frame id3Frame : id3Frames) {
    if (id3Frame instanceof TxxxFrame) {
      TxxxFrame txxxFrame = (TxxxFrame) id3Frame;
      Log.i(TAG, String.format("ID3 TimedMetadata %s: description=%s, value=%s", txxxFrame.id,
          txxxFrame.description, txxxFrame.value));
    } else if (id3Frame instanceof PrivFrame) {
      PrivFrame privFrame = (PrivFrame) id3Frame;
      Log.i(TAG, String.format("ID3 TimedMetadata %s: owner=%s", privFrame.id, privFrame.owner));
    } else if (id3Frame instanceof GeobFrame) {
      GeobFrame geobFrame = (GeobFrame) id3Frame;
      Log.i(TAG, String.format("ID3 TimedMetadata %s: mimeType=%s, filename=%s, description=%s",
          geobFrame.id, geobFrame.mimeType, geobFrame.filename, geobFrame.description));
    } else if (id3Frame instanceof ApicFrame) {
      ApicFrame apicFrame = (ApicFrame) id3Frame;
      Log.i(TAG, String.format("ID3 TimedMetadata %s: mimeType=%s, description=%s",
          apicFrame.id, apicFrame.mimeType, apicFrame.description));
    } else if (id3Frame instanceof TextInformationFrame) {
      TextInformationFrame textInformationFrame = (TextInformationFrame) id3Frame;
      Log.i(TAG, String.format("ID3 TimedMetadata %s: description=%s", textInformationFrame.id,
          textInformationFrame.description));
    } else {
      Log.i(TAG, String.format("ID3 TimedMetadata %s", id3Frame.id));
    }
  }
}
 
开发者ID:zhanglibin123488,项目名称:videoPickPlayer,代码行数:28,代码来源:EventLogger.java


示例9: printMetadata

import com.google.android.exoplayer2.metadata.id3.ApicFrame; //导入依赖的package包/类
private void printMetadata(Metadata metadata, String prefix) {
  for (int i = 0; i < metadata.length(); i++) {
    Metadata.Entry entry = metadata.get(i);
    if (entry instanceof TxxxFrame) {
      TxxxFrame txxxFrame = (TxxxFrame) entry;
      Log.d(TAG, prefix + String.format("%s: description=%s, value=%s", txxxFrame.id,
          txxxFrame.description, txxxFrame.value));
    } else if (entry instanceof PrivFrame) {
      PrivFrame privFrame = (PrivFrame) entry;
      Log.d(TAG, prefix + String.format("%s: owner=%s", privFrame.id, privFrame.owner));
    } else if (entry instanceof GeobFrame) {
      GeobFrame geobFrame = (GeobFrame) entry;
      Log.d(TAG, prefix + String.format("%s: mimeType=%s, filename=%s, description=%s",
          geobFrame.id, geobFrame.mimeType, geobFrame.filename, geobFrame.description));
    } else if (entry instanceof ApicFrame) {
      ApicFrame apicFrame = (ApicFrame) entry;
      Log.d(TAG, prefix + String.format("%s: mimeType=%s, description=%s",
          apicFrame.id, apicFrame.mimeType, apicFrame.description));
    } else if (entry instanceof TextInformationFrame) {
      TextInformationFrame textInformationFrame = (TextInformationFrame) entry;
      Log.d(TAG, prefix + String.format("%s: description=%s", textInformationFrame.id,
          textInformationFrame.description));
    } else if (entry instanceof CommentFrame) {
      CommentFrame commentFrame = (CommentFrame) entry;
      Log.d(TAG, prefix + String.format("%s: language=%s description=%s", commentFrame.id,
          commentFrame.language, commentFrame.description));
    } else if (entry instanceof Id3Frame) {
      Id3Frame id3Frame = (Id3Frame) entry;
      Log.d(TAG, prefix + String.format("%s", id3Frame.id));
    }
  }
}
 
开发者ID:TakumaMochizuki,项目名称:Komica,代码行数:33,代码来源:EventLogger.java



注:本文中的com.google.android.exoplayer2.metadata.id3.ApicFrame类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ShellFolder类代码示例发布时间:2022-05-21
下一篇:
Java UnsupportedTemporalTypeException类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap