Stay organized with collections Save and categorize content based on your preferences.

MotionPhotoMetadata

@UnstableApi
public final class MotionPhotoMetadata implements Metadata.Entry


Metadata of a motion photo file.

Summary

Public fields

final long

The presentation timestamp of the photo, in microseconds, or TIME_UNSET if unknown.

final long

The size of the photo data, in bytes.

final long

The start offset of the photo data, in bytes.

final long

The size of the video data, in bytes.

final long

The start offset of the video data, in bytes.

Public constructors

MotionPhotoMetadata(
    long photoStartPosition,
    long photoSize,
    long photoPresentationTimestampUs,
    long videoStartPosition,
    long videoSize
)

Creates an instance.

Public methods

int
boolean
int
String
void
writeToParcel(Parcel dest, int flags)

Inherited Constants

From android.os.Parcelable
static final int
static final int

Inherited methods

From androidx.media3.common.Metadata.Entry
@Nullable byte[]

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

@Nullable 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.

void

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

Constants

CREATOR

public static final Parcelable.Creator<MotionPhotoMetadataCREATOR

Public fields

photoPresentationTimestampUs

public final long photoPresentationTimestampUs

The presentation timestamp of the photo, in microseconds, or TIME_UNSET if unknown.

photoSize

public final long photoSize

The size of the photo data, in bytes.

photoStartPosition

public final long photoStartPosition

The start offset of the photo data, in bytes.

videoSize

public final long videoSize

The size of the video data, in bytes.

videoStartPosition

public final long videoStartPosition

The start offset of the video data, in bytes.

Public constructors

MotionPhotoMetadata

public MotionPhotoMetadata(
    long photoStartPosition,
    long photoSize,
    long photoPresentationTimestampUs,
    long videoStartPosition,
    long videoSize
)

Creates an instance.

Public methods

describeContents

public int describeContents()

equals

public boolean equals(@Nullable Object obj)

hashCode

public int hashCode()

toString

public String toString()

writeToParcel

public void writeToParcel(Parcel dest, int flags)