【发布时间】:2014-10-13 20:27:55
【问题描述】:
使用 H264Decoder 我想以 Java 字节数组的形式获取解码后的 YUV420 数据。我已经搜索了所有内容,但没有看到任何适合的示例。
ByteBuffer buf = ByteBuffer.wrap(h264EncodedByteArray); H264Decoder 解码器 = new H264Decoder(); // 假设解码器上设置了sps和pps 图片输出 = Picture.create(320, 240, ColorSpace.YUV420); 图片真实 = decoder.decodeFrame(buf, out.getData());“h264EncodedByteArray”是来自流或文件的 h264 编码字节数组。
【问题讨论】: