Package-level declarations

Types

Link copied to clipboard
data class History<T>(val previous: T?, val current: T)

Properties

Link copied to clipboard

Get the application pixel density

Link copied to clipboard

Returns the display orientation in degrees from the natural orientation.

Link copied to clipboard
@get:IntRange(from = 0, to = 359)
val Context.displayRotationDegrees: Int

Returns the display orientation in degrees from the natural orientation.

Link copied to clipboard

Extracts csd buffers from MediaFormat. It can contains SPS, PPS for AVC.

Link copied to clipboard

Whether ByteBuffer is Annex B or not. Annex B frames start with a start code (0x00000001 or 0x000001).

Link copied to clipboard

Whether the application is in landscape.

Link copied to clipboard

Whether the application is in portrait.

Link copied to clipboard

Whether ByteBuffer is AVCC/HVCC or not. AVCC/HVCC frames start with a the frame size.

Link copied to clipboard

Whether the device is in landscape orientation.

Link copied to clipboard

Whether the device is in portrait orientation.

Link copied to clipboard

Whether the size is in landscape orientation.

Link copied to clipboard

Whether the application is in landscape orientation.

Link copied to clipboard

Whether the natural orientation is portrait.

Link copied to clipboard

Whether the size is in portrait orientation.

Link copied to clipboard

Gets the size in landscape orientation: the largest dimension as width and the smallest as height.

Link copied to clipboard

Gets the size in portrait orientation: the smallest dimension as width and the largest as height.

Link copied to clipboard

Extracts resolution from a MediaFormat. Only for MediaFormat of video.

Link copied to clipboard

Reverses width and height for a Size.

Link copied to clipboard

Get root cause. This code is from guava Throwables API.

Link copied to clipboard

Get the screen rectangle in pixels

Link copied to clipboard

Returns the Size of the Rect.

Link copied to clipboard

Get start code size of ByteBuffer.

Link copied to clipboard

Functions

Link copied to clipboard

Clone ByteBuffer. The position of the original ByteBuffer will be 0 after the clone.

Link copied to clipboard
fun List<Size>.closestTo(size: Size): Size

Find the closest size to the given size in a list of sizes.

Link copied to clipboard
fun ByteBuffer.extractRbsp(headerLength: Int): ByteBuffer
Link copied to clipboard
fun ByteBuffer.getLong(isLittleEndian: Boolean): Long
Link copied to clipboard
fun ByteBuffer.getString(size: Int = this.remaining()): String
Link copied to clipboard
Link copied to clipboard
fun Context.isRotationDegreesPortrait(@IntRange(from = 0, to = 359) rotationDegrees: Int): Boolean

Whether the rotation is portrait for this device.

Link copied to clipboard

Whether the rotation is portrait for this device.

Link copied to clipboard
infix fun Byte.or(b: Byte): Int
infix fun Byte.or(other: Int): Int
Link copied to clipboard
fun ByteBuffer.put(i: Int, i1: Int)
fun ByteBuffer.put(buffer: ByteBuffer, offset: Int, length: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Remove all prefixes from ByteBuffer whatever their order. It slices ByteBuffer so it does not copy data.

Link copied to clipboard
Link copied to clipboard
fun Size.rotate(@IntRange(from = 0, to = 359) rotationDegrees: Int): Size

Rotates a Size according to the rotation degrees.

Link copied to clipboard
fun Size.rotateFromNaturalOrientation(context: Context, @IntRange(from = 0, to = 359) rotationDegrees: Int): Size

Rotates a Size according to device natural orientation.

Link copied to clipboard
fun <T> SharedFlow<T>.runningHistory(): Flow<History<T>?>
Link copied to clipboard
fun <T> SharedFlow<T>.runningHistoryNotNull(): Flow<History<T>>
Link copied to clipboard
infix fun Boolean.shl(i: Int): Int
infix fun Byte.shl(i: Int): Int
infix fun Short.shl(i: Int): Int
Link copied to clipboard
infix fun Byte.shr(i: Int): Int
Link copied to clipboard

Get all ByteBuffer occurrences that start with prefix.

Link copied to clipboard

Whether the ByteBuffer starts with a String from the current position.

Whether the ByteBuffer starts with a list of ByteBuffer from the current position.

fun ByteBuffer.startsWith(prefix: ByteBuffer, prefixSkip: Int = 0): Boolean
fun ByteBuffer.startsWith(prefix: ByteArray, prefixSkip: Int = 0): Boolean

Whether the ByteBuffer starts with a ByteArray from the current position.

Link copied to clipboard
Link copied to clipboard

Convert Byte to a Boolean.

Convert Int to a Boolean.

Link copied to clipboard

Convert a Boolean to a Byte.

Link copied to clipboard

Returns ByteBuffer array even if ByteBuffer.hasArray returns false.

Link copied to clipboard

Convert a Boolean to an Int.

Link copied to clipboard
fun <T> Iterable<List<T>>.unzip(): List<List<T>>