@UnstableApi
class MuxerUtil


Utility methods for muxer.

Summary

Constants

const Long

The maximum value of a 32-bit unsigned int.

Public functions

java-static Unit
createMotionPhotoFromJpegImageAndBmffVideo(
    imageInputStream: FileInputStream!,
    imagePresentationTimestampUs: Long,
    videoInputStream: FileInputStream!,
    videoContainerMimeType: String!,
    outputChannel: WritableByteChannel!
)

Creates a Motion Photo from a JPEG image and a BMFF video as per the Motion Photo spec.

java-static BufferInfo!

Returns BufferInfo corresponding to the MediaCodec.BufferInfo.

java-static Boolean

Returns whether a given metadata is supported.

Constants

UNSIGNED_INT_MAX_VALUE

const val UNSIGNED_INT_MAX_VALUE = 4294967295: Long

The maximum value of a 32-bit unsigned int.

Public functions

createMotionPhotoFromJpegImageAndBmffVideo

java-static fun createMotionPhotoFromJpegImageAndBmffVideo(
    imageInputStream: FileInputStream!,
    imagePresentationTimestampUs: Long,
    videoInputStream: FileInputStream!,
    videoContainerMimeType: String!,
    outputChannel: WritableByteChannel!
): Unit

Creates a Motion Photo from a JPEG image and a BMFF video as per the Motion Photo spec.

Parameters
imageInputStream: FileInputStream!

A FileInputStream containing the image data. The caller is responsible for closing the stream once this method returns.

imagePresentationTimestampUs: Long

The presentation timestamp of the image in the video (in microseconds).

videoInputStream: FileInputStream!

A FileInputStream containing the video data. The caller is responsible for closing the stream once this method returns.

videoContainerMimeType: String!

The container mime type of the video. Must be VIDEO_MP4 or VIDEO_QUICK_TIME.

outputChannel: WritableByteChannel!

A WritableByteChannel to write output to. The caller is responsible for closing the channel once this method returns.

Throws
java.io.IOException

If an error occurs when creating the Motion Photo.

getMuxerBufferInfoFromMediaCodecBufferInfo

java-static fun getMuxerBufferInfoFromMediaCodecBufferInfo(
    mediaCodecBufferInfo: MediaCodec.BufferInfo!
): BufferInfo!

Returns BufferInfo corresponding to the MediaCodec.BufferInfo.

isMetadataSupported

java-static fun isMetadataSupported(metadata: Metadata.Entry!): Boolean

Returns whether a given metadata is supported.