MuxerUtil
@UnstableApi
public final class MuxerUtil
Utility methods for muxer.
Summary
Constants |
|
|---|---|
static final long |
UNSIGNED_INT_MAX_VALUE = 4294967295The maximum value of a 32-bit unsigned int. |
Public methods |
|
|---|---|
static void |
createMotionPhotoFromJpegImageAndBmffVideo(Creates a Motion Photo from a JPEG image and a BMFF video as per the Motion Photo spec. |
static BufferInfo |
getMuxerBufferInfoFromMediaCodecBufferInfo(Returns |
static boolean |
isMetadataSupported(Metadata.Entry metadata)Returns whether a given |
Constants
UNSIGNED_INT_MAX_VALUE
public static final long UNSIGNED_INT_MAX_VALUE = 4294967295
The maximum value of a 32-bit unsigned int.
Public methods
createMotionPhotoFromJpegImageAndBmffVideo
public static void createMotionPhotoFromJpegImageAndBmffVideo(
FileInputStream imageInputStream,
long imagePresentationTimestampUs,
FileInputStream videoInputStream,
String videoContainerMimeType,
WritableByteChannel outputChannel
)
Creates a Motion Photo from a JPEG image and a BMFF video as per the Motion Photo spec.
| Parameters | |
|---|---|
FileInputStream imageInputStream |
A |
long imagePresentationTimestampUs |
The presentation timestamp of the image in the video (in microseconds). |
FileInputStream videoInputStream |
A |
String videoContainerMimeType |
The container mime type of the video. Must be |
WritableByteChannel outputChannel |
A |
| Throws | |
|---|---|
java.io.IOException |
If an error occurs when creating the Motion Photo. |
getMuxerBufferInfoFromMediaCodecBufferInfo
public static BufferInfo getMuxerBufferInfoFromMediaCodecBufferInfo(
MediaCodec.BufferInfo mediaCodecBufferInfo
)
Returns BufferInfo corresponding to the MediaCodec.BufferInfo.
isMetadataSupported
public static boolean isMetadataSupported(Metadata.Entry metadata)
Returns whether a given metadata is supported.