@UnstableApi
class PictureFrame : Metadata.Entry


A picture parsed from a Vorbis Comment or a FLAC picture block.

Summary

Public constructors

PictureFrame(
    pictureType: Int,
    mimeType: String!,
    description: String!,
    width: Int,
    height: Int,
    depth: Int,
    colors: Int,
    pictureData: ByteArray!
)

Public functions

Int
Boolean
equals(obj: Any?)
java-static PictureFrame!

Parses a METADATA_BLOCK_PICTURE into a PictureFrame instance.

Int
Unit

Updates the MediaMetadata.Builder with the type-specific values stored in this Entry.

String!
Unit
writeToParcel(dest: Parcel!, flags: Int)

Public properties

Int

For indexed-color pictures (e.g. GIF), the number of colors used.

Int

The color depth of the picture in bits-per-pixel.

String!

A description of the picture.

Int

The height of the picture in pixels.

String!

The MIME type of the picture.

ByteArray<Byte>!

The encoded picture data.

Int

The type of the picture.

Int

The width of the picture in pixels.

Inherited functions

From androidx.media3.common.Metadata.Entry
ByteArray<Byte>?

Returns the bytes of the wrapped metadata in this Entry, or null if it doesn't contain wrapped metadata.

Format?

Returns the Format that can be used to decode the wrapped metadata in getWrappedMetadataBytes, or null if this Entry doesn't contain wrapped metadata.

Constants

CREATOR

const val CREATORParcelable.Creator<PictureFrame!>!

Public constructors

PictureFrame

PictureFrame(
    pictureType: Int,
    mimeType: String!,
    description: String!,
    width: Int,
    height: Int,
    depth: Int,
    colors: Int,
    pictureData: ByteArray!
)

Public functions

describeContents

fun describeContents(): Int

equals

fun equals(obj: Any?): Boolean

fromPictureBlock

java-static fun fromPictureBlock(pictureBlock: ParsableByteArray!): PictureFrame!

Parses a METADATA_BLOCK_PICTURE into a PictureFrame instance.

pictureBlock may be read directly from a FLAC file, or decoded from the base64 content of a Vorbis Comment.

Parameters
pictureBlock: ParsableByteArray!

The data of the METADATA_BLOCK_PICTURE, not including any headers.

Returns
PictureFrame!

A PictureFrame parsed from pictureBlock.

hashCode

fun hashCode(): Int

populateMediaMetadata

fun populateMediaMetadata(builder: MediaMetadata.Builder!): Unit

Updates the MediaMetadata.Builder with the type-specific values stored in this Entry.

Parameters
builder: MediaMetadata.Builder!

The builder to be updated.

toString

fun toString(): String!

writeToParcel

fun writeToParcel(dest: Parcel!, flags: Int): Unit

Public properties

colors

val colorsInt

For indexed-color pictures (e.g. GIF), the number of colors used. 0 otherwise.

depth

val depthInt

The color depth of the picture in bits-per-pixel.

description

val descriptionString!

A description of the picture.

height

val heightInt

The height of the picture in pixels.

mimeType

val mimeTypeString!

The MIME type of the picture.

pictureData

val pictureDataByteArray<Byte>!

The encoded picture data.

pictureType

val pictureTypeInt

The type of the picture.

width

val widthInt

The width of the picture in pixels.