mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Refactor vorbis metadata parsing into xiph
Move all picture and vorbis frame parsing into a new xiph module. This commit also adds cover frame parsing from vorbis comments as well.
This commit is contained in:
parent
d6eae9ad5f
commit
d7a40679de
@ -5055,7 +5055,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
</th>
|
||||
</tr>
|
||||
<tr id="i811" class="rowColor">
|
||||
<td class="colFirst"><a href="com/google/android/exoplayer2/metadata/flac/PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.flac">PictureFrame</a></td>
|
||||
<td class="colFirst"><a href="com/google/android/exoplayer2/metadata/flac/PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.xiph">PictureFrame</a></td>
|
||||
<th class="colLast" scope="row">
|
||||
<div class="block">A picture parsed from a FLAC file.</div>
|
||||
</th>
|
||||
@ -7144,7 +7144,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
</th>
|
||||
</tr>
|
||||
<tr id="i1155" class="rowColor">
|
||||
<td class="colFirst"><a href="com/google/android/exoplayer2/metadata/flac/VorbisComment.html" title="class in com.google.android.exoplayer2.metadata.flac">VorbisComment</a></td>
|
||||
<td class="colFirst"><a href="com/google/android/exoplayer2/metadata/flac/VorbisComment.html" title="class in com.google.android.exoplayer2.metadata.xiph">VorbisComment</a></td>
|
||||
<th class="colLast" scope="row">
|
||||
<div class="block">A vorbis comment.</div>
|
||||
</th>
|
||||
|
@ -830,7 +830,7 @@
|
||||
<li><a href="com/google/android/exoplayer2/source/dash/manifest/Period.html" title="class in com.google.android.exoplayer2.source.dash.manifest">Period</a></li>
|
||||
<li><a href="com/google/android/exoplayer2/extractor/ts/PesReader.html" title="class in com.google.android.exoplayer2.extractor.ts">PesReader</a></li>
|
||||
<li><a href="com/google/android/exoplayer2/text/pgs/PgsDecoder.html" title="class in com.google.android.exoplayer2.text.pgs">PgsDecoder</a></li>
|
||||
<li><a href="com/google/android/exoplayer2/metadata/flac/PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.flac">PictureFrame</a></li>
|
||||
<li><a href="com/google/android/exoplayer2/metadata/flac/PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.xiph">PictureFrame</a></li>
|
||||
<li><a href="com/google/android/exoplayer2/scheduler/PlatformScheduler.html" title="class in com.google.android.exoplayer2.scheduler">PlatformScheduler</a></li>
|
||||
<li><a href="com/google/android/exoplayer2/scheduler/PlatformScheduler.PlatformSchedulerService.html" title="class in com.google.android.exoplayer2.scheduler">PlatformScheduler.PlatformSchedulerService</a></li>
|
||||
<li><a href="com/google/android/exoplayer2/PlaybackException.html" title="class in com.google.android.exoplayer2">PlaybackException</a></li>
|
||||
@ -1174,7 +1174,7 @@
|
||||
<li><a href="com/google/android/exoplayer2/video/VideoRendererEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.video">VideoRendererEventListener.EventDispatcher</a></li>
|
||||
<li><a href="com/google/android/exoplayer2/video/VideoSize.html" title="class in com.google.android.exoplayer2.video">VideoSize</a></li>
|
||||
<li><a href="com/google/android/exoplayer2/extractor/VorbisBitArray.html" title="class in com.google.android.exoplayer2.extractor">VorbisBitArray</a></li>
|
||||
<li><a href="com/google/android/exoplayer2/metadata/flac/VorbisComment.html" title="class in com.google.android.exoplayer2.metadata.flac">VorbisComment</a></li>
|
||||
<li><a href="com/google/android/exoplayer2/metadata/flac/VorbisComment.html" title="class in com.google.android.exoplayer2.metadata.xiph">VorbisComment</a></li>
|
||||
<li><a href="com/google/android/exoplayer2/extractor/VorbisUtil.html" title="class in com.google.android.exoplayer2.extractor">VorbisUtil</a></li>
|
||||
<li><a href="com/google/android/exoplayer2/extractor/VorbisUtil.CommentHeader.html" title="class in com.google.android.exoplayer2.extractor">VorbisUtil.CommentHeader</a></li>
|
||||
<li><a href="com/google/android/exoplayer2/extractor/VorbisUtil.Mode.html" title="class in com.google.android.exoplayer2.extractor">VorbisUtil.Mode</a></li>
|
||||
|
@ -248,7 +248,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<th class="colFirst" scope="row"><a href="com/google/android/exoplayer2/metadata/flac/package-summary.html">com.google.android.exoplayer2.metadata.flac</a></th>
|
||||
<th class="colFirst" scope="row"><a href="com/google/android/exoplayer2/metadata/flac/package-summary.html">com.google.android.exoplayer2.metadata.xiph</a></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
|
@ -307,7 +307,7 @@ extends <a href="https://developer.android.com/reference/java/lang/Object.html"
|
||||
int bitsPerSample,
|
||||
long totalSamples,
|
||||
<a href="https://developer.android.com/reference/java/util/ArrayList.html" title="class or interface in java.util" class="externalLink">ArrayList</a><<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a>> vorbisComments,
|
||||
<a href="https://developer.android.com/reference/java/util/ArrayList.html" title="class or interface in java.util" class="externalLink">ArrayList</a><<a href="../metadata/flac/PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.flac" target="_top">PictureFrame</a>> pictureFrames)</code></th>
|
||||
<a href="https://developer.android.com/reference/java/util/ArrayList.html" title="class or interface in java.util" class="externalLink">ArrayList</a><<a href="../metadata/flac/PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.xiph" target="_top">PictureFrame</a>> pictureFrames)</code></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -330,7 +330,7 @@ extends <a href="https://developer.android.com/reference/java/lang/Object.html"
|
||||
</tr>
|
||||
<tr id="i0" class="altColor">
|
||||
<td class="colFirst"><code><a href="FlacStreamMetadata.html" title="class in com.google.android.exoplayer2.extractor">FlacStreamMetadata</a></code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#copyWithPictureFrames(java.util.List)">copyWithPictureFrames</a></span>​(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a><<a href="../metadata/flac/PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.flac" target="_top">PictureFrame</a>> pictureFrames)</code></th>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#copyWithPictureFrames(java.util.List)">copyWithPictureFrames</a></span>​(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a><<a href="../metadata/flac/PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.xiph" target="_top">PictureFrame</a>> pictureFrames)</code></th>
|
||||
<td class="colLast">
|
||||
<div class="block">Returns a copy of <code>this</code> with the given picture frames added to the metadata.</div>
|
||||
</td>
|
||||
@ -601,7 +601,7 @@ public final <a href="FlacStreamMetadata.SeekTable.html" title="class in co
|
||||
int bitsPerSample,
|
||||
long totalSamples,
|
||||
<a href="https://developer.android.com/reference/java/util/ArrayList.html" title="class or interface in java.util" class="externalLink">ArrayList</a><<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a>> vorbisComments,
|
||||
<a href="https://developer.android.com/reference/java/util/ArrayList.html" title="class or interface in java.util" class="externalLink">ArrayList</a><<a href="../metadata/flac/PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.flac" target="_top">PictureFrame</a>> pictureFrames)</pre>
|
||||
<a href="https://developer.android.com/reference/java/util/ArrayList.html" title="class or interface in java.util" class="externalLink">ArrayList</a><<a href="../metadata/flac/PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.xiph" target="_top">PictureFrame</a>> pictureFrames)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -733,7 +733,7 @@ public <a href="../metadata/Metadata.html" title="class in com.google.andro
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>copyWithPictureFrames</h4>
|
||||
<pre class="methodSignature">public <a href="FlacStreamMetadata.html" title="class in com.google.android.exoplayer2.extractor">FlacStreamMetadata</a> copyWithPictureFrames​(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a><<a href="../metadata/flac/PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.flac" target="_top">PictureFrame</a>> pictureFrames)</pre>
|
||||
<pre class="methodSignature">public <a href="FlacStreamMetadata.html" title="class in com.google.android.exoplayer2.extractor">FlacStreamMetadata</a> copyWithPictureFrames​(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a><<a href="../metadata/flac/PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.xiph" target="_top">PictureFrame</a>> pictureFrames)</pre>
|
||||
<div class="block">Returns a copy of <code>this</code> with the given picture frames added to the metadata.</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -126,7 +126,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>All Known Implementing Classes:</dt>
|
||||
<dd><code><a href="id3/ApicFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">ApicFrame</a></code>, <code><a href="dvbsi/AppInfoTable.html" title="class in com.google.android.exoplayer2.metadata.dvbsi">AppInfoTable</a></code>, <code><a href="id3/BinaryFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">BinaryFrame</a></code>, <code><a href="id3/ChapterFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">ChapterFrame</a></code>, <code><a href="id3/ChapterTocFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">ChapterTocFrame</a></code>, <code><a href="id3/CommentFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">CommentFrame</a></code>, <code><a href="emsg/EventMessage.html" title="class in com.google.android.exoplayer2.metadata.emsg">EventMessage</a></code>, <code><a href="../testutil/FakeMetadataEntry.html" title="class in com.google.android.exoplayer2.testutil">FakeMetadataEntry</a></code>, <code><a href="id3/GeobFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">GeobFrame</a></code>, <code><a href="../source/hls/HlsTrackMetadataEntry.html" title="class in com.google.android.exoplayer2.source.hls">HlsTrackMetadataEntry</a></code>, <code><a href="icy/IcyHeaders.html" title="class in com.google.android.exoplayer2.metadata.icy">IcyHeaders</a></code>, <code><a href="icy/IcyInfo.html" title="class in com.google.android.exoplayer2.metadata.icy">IcyInfo</a></code>, <code><a href="id3/Id3Frame.html" title="class in com.google.android.exoplayer2.metadata.id3">Id3Frame</a></code>, <code><a href="id3/InternalFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">InternalFrame</a></code>, <code><a href="mp4/MdtaMetadataEntry.html" title="class in com.google.android.exoplayer2.metadata.mp4">MdtaMetadataEntry</a></code>, <code><a href="id3/MlltFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">MlltFrame</a></code>, <code><a href="mp4/MotionPhotoMetadata.html" title="class in com.google.android.exoplayer2.metadata.mp4">MotionPhotoMetadata</a></code>, <code><a href="flac/PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.flac">PictureFrame</a></code>, <code><a href="scte35/PrivateCommand.html" title="class in com.google.android.exoplayer2.metadata.scte35">PrivateCommand</a></code>, <code><a href="id3/PrivFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">PrivFrame</a></code>, <code><a href="mp4/SlowMotionData.html" title="class in com.google.android.exoplayer2.metadata.mp4">SlowMotionData</a></code>, <code><a href="mp4/SmtaMetadataEntry.html" title="class in com.google.android.exoplayer2.metadata.mp4">SmtaMetadataEntry</a></code>, <code><a href="scte35/SpliceCommand.html" title="class in com.google.android.exoplayer2.metadata.scte35">SpliceCommand</a></code>, <code><a href="scte35/SpliceInsertCommand.html" title="class in com.google.android.exoplayer2.metadata.scte35">SpliceInsertCommand</a></code>, <code><a href="scte35/SpliceNullCommand.html" title="class in com.google.android.exoplayer2.metadata.scte35">SpliceNullCommand</a></code>, <code><a href="scte35/SpliceScheduleCommand.html" title="class in com.google.android.exoplayer2.metadata.scte35">SpliceScheduleCommand</a></code>, <code><a href="id3/TextInformationFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">TextInformationFrame</a></code>, <code><a href="scte35/TimeSignalCommand.html" title="class in com.google.android.exoplayer2.metadata.scte35">TimeSignalCommand</a></code>, <code><a href="id3/UrlLinkFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">UrlLinkFrame</a></code>, <code><a href="flac/VorbisComment.html" title="class in com.google.android.exoplayer2.metadata.flac">VorbisComment</a></code></dd>
|
||||
<dd><code><a href="id3/ApicFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">ApicFrame</a></code>, <code><a href="dvbsi/AppInfoTable.html" title="class in com.google.android.exoplayer2.metadata.dvbsi">AppInfoTable</a></code>, <code><a href="id3/BinaryFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">BinaryFrame</a></code>, <code><a href="id3/ChapterFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">ChapterFrame</a></code>, <code><a href="id3/ChapterTocFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">ChapterTocFrame</a></code>, <code><a href="id3/CommentFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">CommentFrame</a></code>, <code><a href="emsg/EventMessage.html" title="class in com.google.android.exoplayer2.metadata.emsg">EventMessage</a></code>, <code><a href="../testutil/FakeMetadataEntry.html" title="class in com.google.android.exoplayer2.testutil">FakeMetadataEntry</a></code>, <code><a href="id3/GeobFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">GeobFrame</a></code>, <code><a href="../source/hls/HlsTrackMetadataEntry.html" title="class in com.google.android.exoplayer2.source.hls">HlsTrackMetadataEntry</a></code>, <code><a href="icy/IcyHeaders.html" title="class in com.google.android.exoplayer2.metadata.icy">IcyHeaders</a></code>, <code><a href="icy/IcyInfo.html" title="class in com.google.android.exoplayer2.metadata.icy">IcyInfo</a></code>, <code><a href="id3/Id3Frame.html" title="class in com.google.android.exoplayer2.metadata.id3">Id3Frame</a></code>, <code><a href="id3/InternalFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">InternalFrame</a></code>, <code><a href="mp4/MdtaMetadataEntry.html" title="class in com.google.android.exoplayer2.metadata.mp4">MdtaMetadataEntry</a></code>, <code><a href="id3/MlltFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">MlltFrame</a></code>, <code><a href="mp4/MotionPhotoMetadata.html" title="class in com.google.android.exoplayer2.metadata.mp4">MotionPhotoMetadata</a></code>, <code><a href="flac/PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.xiph">PictureFrame</a></code>, <code><a href="scte35/PrivateCommand.html" title="class in com.google.android.exoplayer2.metadata.scte35">PrivateCommand</a></code>, <code><a href="id3/PrivFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">PrivFrame</a></code>, <code><a href="mp4/SlowMotionData.html" title="class in com.google.android.exoplayer2.metadata.mp4">SlowMotionData</a></code>, <code><a href="mp4/SmtaMetadataEntry.html" title="class in com.google.android.exoplayer2.metadata.mp4">SmtaMetadataEntry</a></code>, <code><a href="scte35/SpliceCommand.html" title="class in com.google.android.exoplayer2.metadata.scte35">SpliceCommand</a></code>, <code><a href="scte35/SpliceInsertCommand.html" title="class in com.google.android.exoplayer2.metadata.scte35">SpliceInsertCommand</a></code>, <code><a href="scte35/SpliceNullCommand.html" title="class in com.google.android.exoplayer2.metadata.scte35">SpliceNullCommand</a></code>, <code><a href="scte35/SpliceScheduleCommand.html" title="class in com.google.android.exoplayer2.metadata.scte35">SpliceScheduleCommand</a></code>, <code><a href="id3/TextInformationFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">TextInformationFrame</a></code>, <code><a href="scte35/TimeSignalCommand.html" title="class in com.google.android.exoplayer2.metadata.scte35">TimeSignalCommand</a></code>, <code><a href="id3/UrlLinkFrame.html" title="class in com.google.android.exoplayer2.metadata.id3">UrlLinkFrame</a></code>, <code><a href="flac/VorbisComment.html" title="class in com.google.android.exoplayer2.metadata.xiph">VorbisComment</a></code></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>Enclosing class:</dt>
|
||||
|
@ -113,7 +113,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">com.google.android.exoplayer2.metadata.flac</a></div>
|
||||
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">com.google.android.exoplayer2.metadata.xiph</a></div>
|
||||
<h2 title="Class PictureFrame" class="title">Class PictureFrame</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
@ -121,7 +121,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>com.google.android.exoplayer2.metadata.flac.PictureFrame</li>
|
||||
<li>com.google.android.exoplayer2.metadata.xiph.PictureFrame</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -182,7 +182,7 @@ implements <a href="../Metadata.Entry.html" title="interface in com.google.andro
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/os/Parcelable.Creator.html" title="class or interface in android.os" class="externalLink">Parcelable.Creator</a><<a href="PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.flac" target="_top">PictureFrame</a>></code></td>
|
||||
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/os/Parcelable.Creator.html" title="class or interface in android.os" class="externalLink">Parcelable.Creator</a><<a href="PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.xiph" target="_top">PictureFrame</a>></code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#CREATOR">CREATOR</a></span></code></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
@ -438,7 +438,7 @@ implements <a href="../Metadata.Entry.html" title="interface in com.google.andro
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>CREATOR</h4>
|
||||
<pre>public static final <a href="https://developer.android.com/reference/android/os/Parcelable.Creator.html" title="class or interface in android.os" class="externalLink">Parcelable.Creator</a><<a href="PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.flac" target="_top">PictureFrame</a>> CREATOR</pre>
|
||||
<pre>public static final <a href="https://developer.android.com/reference/android/os/Parcelable.Creator.html" title="class or interface in android.os" class="externalLink">Parcelable.Creator</a><<a href="PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.xiph" target="_top">PictureFrame</a>> CREATOR</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -113,7 +113,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">com.google.android.exoplayer2.metadata.flac</a></div>
|
||||
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">com.google.android.exoplayer2.metadata.xiph</a></div>
|
||||
<h2 title="Class VorbisComment" class="title">Class VorbisComment</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
@ -121,7 +121,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>com.google.android.exoplayer2.metadata.flac.VorbisComment</li>
|
||||
<li>com.google.android.exoplayer2.metadata.xiph.VorbisComment</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -175,7 +175,7 @@ implements <a href="../Metadata.Entry.html" title="interface in com.google.andro
|
||||
<th class="colLast" scope="col">Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/os/Parcelable.Creator.html" title="class or interface in android.os" class="externalLink">Parcelable.Creator</a><<a href="VorbisComment.html" title="class in com.google.android.exoplayer2.metadata.flac" target="_top">VorbisComment</a>></code></td>
|
||||
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/os/Parcelable.Creator.html" title="class or interface in android.os" class="externalLink">Parcelable.Creator</a><<a href="VorbisComment.html" title="class in com.google.android.exoplayer2.metadata.xiph" target="_top">VorbisComment</a>></code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#CREATOR">CREATOR</a></span></code></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
@ -330,7 +330,7 @@ implements <a href="../Metadata.Entry.html" title="interface in com.google.andro
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>CREATOR</h4>
|
||||
<pre>public static final <a href="https://developer.android.com/reference/android/os/Parcelable.Creator.html" title="class or interface in android.os" class="externalLink">Parcelable.Creator</a><<a href="VorbisComment.html" title="class in com.google.android.exoplayer2.metadata.flac" target="_top">VorbisComment</a>> CREATOR</pre>
|
||||
<pre>public static final <a href="https://developer.android.com/reference/android/os/Parcelable.Creator.html" title="class or interface in android.os" class="externalLink">Parcelable.Creator</a><<a href="VorbisComment.html" title="class in com.google.android.exoplayer2.metadata.xiph" target="_top">VorbisComment</a>> CREATOR</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -19,15 +19,15 @@
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="com.google.android.exoplayer2.metadata.flac (ExoPlayer library)";
|
||||
parent.document.title="com.google.android.exoplayer2.metadata.xiph (ExoPlayer library)";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
var pathtoroot = "../../../../../../";
|
||||
var useModuleDirectories = false;
|
||||
loadScripts(document, 'script');</script>
|
||||
var pathtoroot = "../../../../../../";
|
||||
var useModuleDirectories = false;
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
@ -91,7 +91,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
</header>
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 title="Package" class="title">Package com.google.android.exoplayer2.metadata.flac</h1>
|
||||
<h1 title="Package" class="title">Package com.google.android.exoplayer2.metadata.xiph</h1>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="blockList">
|
||||
@ -104,13 +104,13 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<th class="colFirst" scope="row"><a href="PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.flac">PictureFrame</a></th>
|
||||
<th class="colFirst" scope="row"><a href="PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.xiph">PictureFrame</a></th>
|
||||
<td class="colLast">
|
||||
<div class="block">A picture parsed from a FLAC file.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<th class="colFirst" scope="row"><a href="VorbisComment.html" title="class in com.google.android.exoplayer2.metadata.flac">VorbisComment</a></th>
|
||||
<th class="colFirst" scope="row"><a href="VorbisComment.html" title="class in com.google.android.exoplayer2.metadata.xiph">VorbisComment</a></th>
|
||||
<td class="colLast">
|
||||
<div class="block">A vorbis comment.</div>
|
||||
</td>
|
||||
|
@ -19,15 +19,15 @@
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="com.google.android.exoplayer2.metadata.flac Class Hierarchy (ExoPlayer library)";
|
||||
parent.document.title="com.google.android.exoplayer2.metadata.xiph Class Hierarchy (ExoPlayer library)";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
var pathtoroot = "../../../../../../";
|
||||
var useModuleDirectories = false;
|
||||
loadScripts(document, 'script');</script>
|
||||
var pathtoroot = "../../../../../../";
|
||||
var useModuleDirectories = false;
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
@ -91,7 +91,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
</header>
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 class="title">Hierarchy For Package com.google.android.exoplayer2.metadata.flac</h1>
|
||||
<h1 class="title">Hierarchy For Package com.google.android.exoplayer2.metadata.xiph</h1>
|
||||
<span class="packageHierarchyLabel">Package Hierarchies:</span>
|
||||
<ul class="horizontal">
|
||||
<li><a href="../../../../../../overview-tree.html">All Packages</a></li>
|
||||
@ -103,8 +103,8 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
<ul>
|
||||
<li class="circle">java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink"><span class="typeNameLink" target="_top">Object</span></a>
|
||||
<ul>
|
||||
<li class="circle">com.google.android.exoplayer2.metadata.flac.<a href="PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.flac"><span class="typeNameLink">PictureFrame</span></a> (implements com.google.android.exoplayer2.metadata.<a href="../Metadata.Entry.html" title="interface in com.google.android.exoplayer2.metadata">Metadata.Entry</a>)</li>
|
||||
<li class="circle">com.google.android.exoplayer2.metadata.flac.<a href="VorbisComment.html" title="class in com.google.android.exoplayer2.metadata.flac"><span class="typeNameLink">VorbisComment</span></a> (implements com.google.android.exoplayer2.metadata.<a href="../Metadata.Entry.html" title="interface in com.google.android.exoplayer2.metadata">Metadata.Entry</a>)</li>
|
||||
<li class="circle">com.google.android.exoplayer2.metadata.flac.<a href="PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.xiph"><span class="typeNameLink">PictureFrame</span></a> (implements com.google.android.exoplayer2.metadata.<a href="../Metadata.Entry.html" title="interface in com.google.android.exoplayer2.metadata">Metadata.Entry</a>)</li>
|
||||
<li class="circle">com.google.android.exoplayer2.metadata.flac.<a href="VorbisComment.html" title="class in com.google.android.exoplayer2.metadata.xiph"><span class="typeNameLink">VorbisComment</span></a> (implements com.google.android.exoplayer2.metadata.<a href="../Metadata.Entry.html" title="interface in com.google.android.exoplayer2.metadata">Metadata.Entry</a>)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -246,7 +246,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="altColor" id="i36">
|
||||
<th class="colFirst" scope="row"><a href="com/google/android/exoplayer2/metadata/flac/package-summary.html">com.google.android.exoplayer2.metadata.flac</a></th>
|
||||
<th class="colFirst" scope="row"><a href="com/google/android/exoplayer2/metadata/flac/package-summary.html">com.google.android.exoplayer2.metadata.xiph</a></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="rowColor" id="i37">
|
||||
|
@ -130,7 +130,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
<li><a href="com/google/android/exoplayer2/metadata/package-tree.html">com.google.android.exoplayer2.metadata</a>, </li>
|
||||
<li><a href="com/google/android/exoplayer2/metadata/dvbsi/package-tree.html">com.google.android.exoplayer2.metadata.dvbsi</a>, </li>
|
||||
<li><a href="com/google/android/exoplayer2/metadata/emsg/package-tree.html">com.google.android.exoplayer2.metadata.emsg</a>, </li>
|
||||
<li><a href="com/google/android/exoplayer2/metadata/flac/package-tree.html">com.google.android.exoplayer2.metadata.flac</a>, </li>
|
||||
<li><a href="com/google/android/exoplayer2/metadata/flac/package-tree.html">com.google.android.exoplayer2.metadata.xiph</a>, </li>
|
||||
<li><a href="com/google/android/exoplayer2/metadata/icy/package-tree.html">com.google.android.exoplayer2.metadata.icy</a>, </li>
|
||||
<li><a href="com/google/android/exoplayer2/metadata/id3/package-tree.html">com.google.android.exoplayer2.metadata.id3</a>, </li>
|
||||
<li><a href="com/google/android/exoplayer2/metadata/mp4/package-tree.html">com.google.android.exoplayer2.metadata.mp4</a>, </li>
|
||||
@ -860,7 +860,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
<li class="circle">com.google.android.exoplayer2.extractor.ts.<a href="com/google/android/exoplayer2/extractor/ts/PassthroughSectionPayloadReader.html" title="class in com.google.android.exoplayer2.extractor.ts"><span class="typeNameLink">PassthroughSectionPayloadReader</span></a> (implements com.google.android.exoplayer2.extractor.ts.<a href="com/google/android/exoplayer2/extractor/ts/SectionPayloadReader.html" title="interface in com.google.android.exoplayer2.extractor.ts">SectionPayloadReader</a>)</li>
|
||||
<li class="circle">com.google.android.exoplayer2.source.dash.manifest.<a href="com/google/android/exoplayer2/source/dash/manifest/Period.html" title="class in com.google.android.exoplayer2.source.dash.manifest"><span class="typeNameLink">Period</span></a></li>
|
||||
<li class="circle">com.google.android.exoplayer2.extractor.ts.<a href="com/google/android/exoplayer2/extractor/ts/PesReader.html" title="class in com.google.android.exoplayer2.extractor.ts"><span class="typeNameLink">PesReader</span></a> (implements com.google.android.exoplayer2.extractor.ts.<a href="com/google/android/exoplayer2/extractor/ts/TsPayloadReader.html" title="interface in com.google.android.exoplayer2.extractor.ts">TsPayloadReader</a>)</li>
|
||||
<li class="circle">com.google.android.exoplayer2.metadata.flac.<a href="com/google/android/exoplayer2/metadata/flac/PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.flac"><span class="typeNameLink">PictureFrame</span></a> (implements com.google.android.exoplayer2.metadata.<a href="com/google/android/exoplayer2/metadata/Metadata.Entry.html" title="interface in com.google.android.exoplayer2.metadata">Metadata.Entry</a>)</li>
|
||||
<li class="circle">com.google.android.exoplayer2.metadata.flac.<a href="com/google/android/exoplayer2/metadata/flac/PictureFrame.html" title="class in com.google.android.exoplayer2.metadata.xiph"><span class="typeNameLink">PictureFrame</span></a> (implements com.google.android.exoplayer2.metadata.<a href="com/google/android/exoplayer2/metadata/Metadata.Entry.html" title="interface in com.google.android.exoplayer2.metadata">Metadata.Entry</a>)</li>
|
||||
<li class="circle">com.google.android.exoplayer2.scheduler.<a href="com/google/android/exoplayer2/scheduler/PlatformScheduler.html" title="class in com.google.android.exoplayer2.scheduler"><span class="typeNameLink">PlatformScheduler</span></a> (implements com.google.android.exoplayer2.scheduler.<a href="com/google/android/exoplayer2/scheduler/Scheduler.html" title="interface in com.google.android.exoplayer2.scheduler">Scheduler</a>)</li>
|
||||
<li class="circle">com.google.android.exoplayer2.robolectric.<a href="com/google/android/exoplayer2/robolectric/PlaybackOutput.html" title="class in com.google.android.exoplayer2.robolectric"><span class="typeNameLink">PlaybackOutput</span></a> (implements com.google.android.exoplayer2.testutil.<a href="com/google/android/exoplayer2/testutil/Dumper.Dumpable.html" title="interface in com.google.android.exoplayer2.testutil">Dumper.Dumpable</a>)</li>
|
||||
<li class="circle">com.google.android.exoplayer2.<a href="com/google/android/exoplayer2/PlaybackParameters.html" title="class in com.google.android.exoplayer2"><span class="typeNameLink">PlaybackParameters</span></a> (implements com.google.android.exoplayer2.<a href="com/google/android/exoplayer2/Bundleable.html" title="interface in com.google.android.exoplayer2">Bundleable</a>)</li>
|
||||
@ -1283,7 +1283,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
</ul>
|
||||
</li>
|
||||
<li class="circle">com.google.android.exoplayer2.extractor.<a href="com/google/android/exoplayer2/extractor/VorbisBitArray.html" title="class in com.google.android.exoplayer2.extractor"><span class="typeNameLink">VorbisBitArray</span></a></li>
|
||||
<li class="circle">com.google.android.exoplayer2.metadata.flac.<a href="com/google/android/exoplayer2/metadata/flac/VorbisComment.html" title="class in com.google.android.exoplayer2.metadata.flac"><span class="typeNameLink">VorbisComment</span></a> (implements com.google.android.exoplayer2.metadata.<a href="com/google/android/exoplayer2/metadata/Metadata.Entry.html" title="interface in com.google.android.exoplayer2.metadata">Metadata.Entry</a>)</li>
|
||||
<li class="circle">com.google.android.exoplayer2.metadata.flac.<a href="com/google/android/exoplayer2/metadata/flac/VorbisComment.html" title="class in com.google.android.exoplayer2.metadata.xiph"><span class="typeNameLink">VorbisComment</span></a> (implements com.google.android.exoplayer2.metadata.<a href="com/google/android/exoplayer2/metadata/Metadata.Entry.html" title="interface in com.google.android.exoplayer2.metadata">Metadata.Entry</a>)</li>
|
||||
<li class="circle">com.google.android.exoplayer2.extractor.<a href="com/google/android/exoplayer2/extractor/VorbisUtil.html" title="class in com.google.android.exoplayer2.extractor"><span class="typeNameLink">VorbisUtil</span></a></li>
|
||||
<li class="circle">com.google.android.exoplayer2.extractor.<a href="com/google/android/exoplayer2/extractor/VorbisUtil.CommentHeader.html" title="class in com.google.android.exoplayer2.extractor"><span class="typeNameLink">VorbisUtil.CommentHeader</span></a></li>
|
||||
<li class="circle">com.google.android.exoplayer2.extractor.<a href="com/google/android/exoplayer2/extractor/VorbisUtil.Mode.html" title="class in com.google.android.exoplayer2.extractor"><span class="typeNameLink">VorbisUtil.Mode</span></a></li>
|
||||
|
@ -12,6 +12,6 @@
|
||||
-keep class com.google.android.exoplayer2.extractor.FlacStreamMetadata {
|
||||
*;
|
||||
}
|
||||
-keep class com.google.android.exoplayer2.metadata.flac.PictureFrame {
|
||||
-keep class com.google.android.exoplayer2.metadata.xiph.PictureFrame {
|
||||
*;
|
||||
}
|
||||
|
@ -20,11 +20,11 @@ import com.google.android.exoplayer2.ParserException;
|
||||
import com.google.android.exoplayer2.extractor.VorbisUtil.CommentHeader;
|
||||
import com.google.android.exoplayer2.extractor.flac.FlacConstants;
|
||||
import com.google.android.exoplayer2.metadata.Metadata;
|
||||
import com.google.android.exoplayer2.metadata.flac.PictureFrame;
|
||||
import com.google.android.exoplayer2.metadata.xiph.PictureFrame;
|
||||
import com.google.android.exoplayer2.metadata.id3.Id3Decoder;
|
||||
import com.google.android.exoplayer2.util.ParsableBitArray;
|
||||
import com.google.android.exoplayer2.util.ParsableByteArray;
|
||||
import com.google.common.base.Charsets;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
@ -168,7 +168,10 @@ public final class FlacMetadataReader {
|
||||
metadataHolder.flacStreamMetadata =
|
||||
flacStreamMetadata.copyWithVorbisComments(vorbisComments);
|
||||
} else if (type == FlacConstants.METADATA_TYPE_PICTURE) {
|
||||
PictureFrame pictureFrame = readPictureMetadataBlock(input, length);
|
||||
ParsableByteArray pic_scratch = new ParsableByteArray(length);
|
||||
input.readFully(pic_scratch.getData(), 0, length);
|
||||
pic_scratch.skipBytes(FlacConstants.METADATA_BLOCK_HEADER_SIZE);
|
||||
PictureFrame pictureFrame = VorbisUtil.buildPictureFrame(pic_scratch);
|
||||
metadataHolder.flacStreamMetadata =
|
||||
flacStreamMetadata.copyWithPictureFrames(Collections.singletonList(pictureFrame));
|
||||
} else {
|
||||
@ -268,28 +271,5 @@ public final class FlacMetadataReader {
|
||||
return Arrays.asList(commentHeader.comments);
|
||||
}
|
||||
|
||||
private static PictureFrame readPictureMetadataBlock(ExtractorInput input, int length)
|
||||
throws IOException {
|
||||
ParsableByteArray scratch = new ParsableByteArray(length);
|
||||
input.readFully(scratch.getData(), 0, length);
|
||||
scratch.skipBytes(FlacConstants.METADATA_BLOCK_HEADER_SIZE);
|
||||
|
||||
int pictureType = scratch.readInt();
|
||||
int mimeTypeLength = scratch.readInt();
|
||||
String mimeType = scratch.readString(mimeTypeLength, Charsets.US_ASCII);
|
||||
int descriptionLength = scratch.readInt();
|
||||
String description = scratch.readString(descriptionLength);
|
||||
int width = scratch.readInt();
|
||||
int height = scratch.readInt();
|
||||
int depth = scratch.readInt();
|
||||
int colors = scratch.readInt();
|
||||
int pictureDataLength = scratch.readInt();
|
||||
byte[] pictureData = new byte[pictureDataLength];
|
||||
scratch.readBytes(pictureData, 0, pictureDataLength);
|
||||
|
||||
return new PictureFrame(
|
||||
pictureType, mimeType, description, width, height, depth, colors, pictureData);
|
||||
}
|
||||
|
||||
private FlacMetadataReader() {}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ import androidx.annotation.Nullable;
|
||||
import com.google.android.exoplayer2.C;
|
||||
import com.google.android.exoplayer2.Format;
|
||||
import com.google.android.exoplayer2.metadata.Metadata;
|
||||
import com.google.android.exoplayer2.metadata.flac.PictureFrame;
|
||||
import com.google.android.exoplayer2.metadata.xiph.PictureFrame;
|
||||
import com.google.android.exoplayer2.util.MimeTypes;
|
||||
import com.google.android.exoplayer2.util.ParsableBitArray;
|
||||
import com.google.android.exoplayer2.util.Util;
|
||||
|
@ -15,16 +15,19 @@
|
||||
*/
|
||||
package com.google.android.exoplayer2.extractor;
|
||||
|
||||
import android.util.Base64;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.google.android.exoplayer2.Format;
|
||||
import com.google.android.exoplayer2.ParserException;
|
||||
import com.google.android.exoplayer2.metadata.Metadata;
|
||||
import com.google.android.exoplayer2.metadata.flac.PictureFrame;
|
||||
import com.google.android.exoplayer2.metadata.flac.VorbisComment;
|
||||
import com.google.android.exoplayer2.metadata.xiph.PictureFrame;
|
||||
import com.google.android.exoplayer2.metadata.xiph.VorbisComment;
|
||||
import com.google.android.exoplayer2.util.Log;
|
||||
import com.google.android.exoplayer2.util.ParsableByteArray;
|
||||
import com.google.android.exoplayer2.util.Util;
|
||||
import com.google.common.base.Charsets;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@ -260,11 +263,30 @@ public final class VorbisUtil {
|
||||
return new CommentHeader(vendor, comments, length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds a metadata instance from Vorbis comments.
|
||||
*
|
||||
* METADATA_BLOCK_PICTURE comments will be transformed into picture frames.
|
||||
* All others will be transformed into vorbis comments.
|
||||
*
|
||||
* @param vorbisComments The raw input of comments, as a key-value pair KEY=VAL.
|
||||
* @return A metadata instance containing the processed tags.
|
||||
*/
|
||||
@Nullable
|
||||
public static Metadata buildMetadata(List<String> vorbisComments) {
|
||||
return buildMetadata(vorbisComments, Collections.emptyList());
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds a metadata instance from Vorbis comments.
|
||||
*
|
||||
* METADATA_BLOCK_PICTURE comments will be transformed into picture frames.
|
||||
* All others will be transformed into vorbis comments.
|
||||
*
|
||||
* @param vorbisComments The raw input of comments, as a key-value pair KEY=VAL.
|
||||
* @param pictureFrames Any picture frames that were parsed beforehand.
|
||||
* @return A metadata instance containing the processed tags.
|
||||
*/
|
||||
@Nullable
|
||||
public static Metadata buildMetadata(List<String> vorbisComments, List<PictureFrame> pictureFrames) {
|
||||
if (vorbisComments.isEmpty() && pictureFrames.isEmpty()) {
|
||||
@ -279,8 +301,19 @@ public final class VorbisUtil {
|
||||
if (keyAndValue.length != 2) {
|
||||
Log.w(TAG, "Failed to parse Vorbis comment: " + vorbisComment);
|
||||
} else {
|
||||
VorbisComment entry = new VorbisComment(keyAndValue[0], keyAndValue[1]);
|
||||
metadataEntries.add(entry);
|
||||
if (keyAndValue[0].equals("METADATA_BLOCK_PICTURE")) {
|
||||
// This tag is a special cover art tag. Decode it from Base64 and make it a
|
||||
// PictureFrame.
|
||||
try {
|
||||
byte[] decoded = Base64.decode(keyAndValue[1], Base64.DEFAULT);
|
||||
metadataEntries.add(buildPictureFrame(new ParsableByteArray(decoded)));
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, "Failed to parse vorbis picture");
|
||||
}
|
||||
} else {
|
||||
VorbisComment entry = new VorbisComment(keyAndValue[0], keyAndValue[1]);
|
||||
metadataEntries.add(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
metadataEntries.addAll(pictureFrames);
|
||||
@ -288,6 +321,30 @@ public final class VorbisUtil {
|
||||
return metadataEntries.isEmpty() ? null : new Metadata(metadataEntries);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a picture metadata block into a picture frame.
|
||||
*
|
||||
* @param input The bytes of the picture.
|
||||
* @return A picture frame from the input data.
|
||||
*/
|
||||
static PictureFrame buildPictureFrame(ParsableByteArray input) {
|
||||
int pictureType = input.readInt();
|
||||
int mimeTypeLength = input.readInt();
|
||||
String mimeType = input.readString(mimeTypeLength, Charsets.US_ASCII);
|
||||
int descriptionLength = input.readInt();
|
||||
String description = input.readString(descriptionLength);
|
||||
int width = input.readInt();
|
||||
int height = input.readInt();
|
||||
int depth = input.readInt();
|
||||
int colors = input.readInt();
|
||||
int pictureDataLength = input.readInt();
|
||||
byte[] pictureData = new byte[pictureDataLength];
|
||||
input.readBytes(pictureData, 0, pictureDataLength);
|
||||
|
||||
return new PictureFrame(
|
||||
pictureType, mimeType, description, width, height, depth, colors, pictureData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifies whether the next bytes in {@code header} are a Vorbis header of the given {@code
|
||||
* headerType}.
|
||||
|
@ -0,0 +1,4 @@
|
||||
package com.google.android.exoplayer2.extractor;
|
||||
|
||||
public class XiphUtil {
|
||||
}
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.android.exoplayer2.metadata.flac;
|
||||
package com.google.android.exoplayer2.metadata.xiph;
|
||||
|
||||
import static com.google.android.exoplayer2.util.Util.castNonNull;
|
||||
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.android.exoplayer2.metadata.flac;
|
||||
package com.google.android.exoplayer2.metadata.xiph;
|
||||
|
||||
import static com.google.android.exoplayer2.util.Util.castNonNull;
|
||||
|
@ -14,6 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
@NonNullApi
|
||||
package com.google.android.exoplayer2.metadata.flac;
|
||||
package com.google.android.exoplayer2.metadata.xiph;
|
||||
|
||||
import com.google.android.exoplayer2.util.NonNullApi;
|
@ -24,8 +24,8 @@ import com.google.android.exoplayer2.ParserException;
|
||||
import com.google.android.exoplayer2.extractor.FlacMetadataReader.FlacStreamMetadataHolder;
|
||||
import com.google.android.exoplayer2.extractor.flac.FlacConstants;
|
||||
import com.google.android.exoplayer2.metadata.Metadata;
|
||||
import com.google.android.exoplayer2.metadata.flac.PictureFrame;
|
||||
import com.google.android.exoplayer2.metadata.flac.VorbisComment;
|
||||
import com.google.android.exoplayer2.metadata.xiph.PictureFrame;
|
||||
import com.google.android.exoplayer2.metadata.xiph.VorbisComment;
|
||||
import com.google.android.exoplayer2.testutil.FakeExtractorInput;
|
||||
import com.google.android.exoplayer2.testutil.TestUtil;
|
||||
import com.google.android.exoplayer2.util.ParsableByteArray;
|
||||
|
@ -21,7 +21,7 @@ import androidx.test.core.app.ApplicationProvider;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import com.google.android.exoplayer2.extractor.flac.FlacConstants;
|
||||
import com.google.android.exoplayer2.metadata.Metadata;
|
||||
import com.google.android.exoplayer2.metadata.flac.VorbisComment;
|
||||
import com.google.android.exoplayer2.metadata.xiph.VorbisComment;
|
||||
import com.google.android.exoplayer2.testutil.TestUtil;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.android.exoplayer2.metadata.flac;
|
||||
package com.google.android.exoplayer2.metadata.xiph;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.android.exoplayer2.metadata.flac;
|
||||
package com.google.android.exoplayer2.metadata.xiph;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
@ -22,8 +22,8 @@ import com.google.android.exoplayer2.Player;
|
||||
import com.google.android.exoplayer2.metadata.Metadata;
|
||||
import com.google.android.exoplayer2.metadata.dvbsi.AppInfoTable;
|
||||
import com.google.android.exoplayer2.metadata.emsg.EventMessage;
|
||||
import com.google.android.exoplayer2.metadata.flac.PictureFrame;
|
||||
import com.google.android.exoplayer2.metadata.flac.VorbisComment;
|
||||
import com.google.android.exoplayer2.metadata.xiph.PictureFrame;
|
||||
import com.google.android.exoplayer2.metadata.xiph.VorbisComment;
|
||||
import com.google.android.exoplayer2.metadata.icy.IcyHeaders;
|
||||
import com.google.android.exoplayer2.metadata.icy.IcyInfo;
|
||||
import com.google.android.exoplayer2.metadata.id3.Id3Frame;
|
||||
|
Loading…
x
Reference in New Issue
Block a user