Mp4LocationData


@UnstableApi
class Mp4LocationData : Metadata.Entry


Stores MP4 location data.

The location data is typically read/written in the "udta" box (user data box, defined in ISO/IEC 14496-12).

Summary

Constants

const Float
ALTITUDE_UNSET = -3.4028235E38f

Represents an unset or unknown altitude.

Public constructors

Mp4LocationData(
    latitude: @FloatRange(from = "-90.0", to = 90.0) Float,
    longitude: @FloatRange(from = "-180.0", to = 180.0) Float
)

Creates an instance with latitude and longitude only.

Mp4LocationData(
    latitude: @FloatRange(from = "-90.0", to = 90.0) Float,
    longitude: @FloatRange(from = "-180.0", to = 180.0) Float,
    altitude: Float
)

Creates an instance with latitude, longitude, and altitude.

Public functions

Boolean
equals(obj: Any?)
Int
String!

Public properties

Float

The altitude, in meters, or ALTITUDE_UNSET if unset.

Float

The latitude, in degrees.

Float

The longitude, in degrees.

Inherited functions

From androidx.media3.common.Metadata.Entry
Array<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.

Unit

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

Constants

ALTITUDE_UNSET

const val ALTITUDE_UNSET = -3.4028235E38f: Float

Represents an unset or unknown altitude.

Public constructors

Mp4LocationData

Mp4LocationData(
    latitude: @FloatRange(from = "-90.0", to = 90.0) Float,
    longitude: @FloatRange(from = "-180.0", to = 180.0) Float
)

Creates an instance with latitude and longitude only.

The altitude is set to ALTITUDE_UNSET.

Parameters
latitude: @FloatRange(from = "-90.0", to = 90.0) Float

The latitude, in degrees. Its value must be in the range [-90, 90].

longitude: @FloatRange(from = "-180.0", to = 180.0) Float

The longitude, in degrees. Its value must be in the range [-180, 180].

Mp4LocationData

Mp4LocationData(
    latitude: @FloatRange(from = "-90.0", to = 90.0) Float,
    longitude: @FloatRange(from = "-180.0", to = 180.0) Float,
    altitude: Float
)

Creates an instance with latitude, longitude, and altitude.

Parameters
latitude: @FloatRange(from = "-90.0", to = 90.0) Float

The latitude, in degrees. Its value must be in the range [-90, 90].

longitude: @FloatRange(from = "-180.0", to = 180.0) Float

The longitude, in degrees. Its value must be in the range [-180, 180].

altitude: Float

The altitude, in meters, or ALTITUDE_UNSET if unset.

Public functions

equals

fun equals(obj: Any?): Boolean

hashCode

fun hashCode(): Int

toString

fun toString(): String!

Public properties

altitude

val altitude: Float

The altitude, in meters, or ALTITUDE_UNSET if unset.

latitude

val latitude: Float

The latitude, in degrees.

longitude

val longitude: Float

The longitude, in degrees.