Added in API level 35

Builder


class Builder
kotlin.Any
   ↳ android.media.metrics.EditingEndedEvent.Builder

Builder for EditingEndedEvent

Summary

Public constructors
Builder(finalState: Int)

Creates a new Builder.

Public methods
EditingEndedEvent.Builder

Adds information about a media item that was input to the editing operation.

EditingEndedEvent.Builder
addOperationType(operationType: Long)

Adds an operation type to the set of operations performed.

EditingEndedEvent

Builds an instance.

EditingEndedEvent.Builder
setErrorCode(value: Int)

Sets the error code for a failed editing session.

EditingEndedEvent.Builder
setExporterName(exporterName: String)

The name of the library implementing the exporting operation.

EditingEndedEvent.Builder
setFinalProgressPercent(finalProgressPercent: Float)

Sets the progress of the editing operation in percent at the moment that it ended.

EditingEndedEvent.Builder
setMetricsBundle(metricsBundle: Bundle)

Sets metrics-related information that is not supported by dedicated methods.

EditingEndedEvent.Builder
setMuxerName(muxerName: String)

The name of the library implementing the media muxing operation.

EditingEndedEvent.Builder

Sets information about the output media item.

EditingEndedEvent.Builder
setTimeSinceCreatedMillis(timeSinceCreatedMillis: Long)

Sets the elapsed time since creating the editing session, in milliseconds.

Public constructors

Builder

Added in API level 35
Builder(finalState: Int)

Creates a new Builder.

Parameters
finalState Int: The state of the editing session when it ended. Value is android.media.metrics.EditingEndedEvent#FINAL_STATE_SUCCEEDED, android.media.metrics.EditingEndedEvent#FINAL_STATE_CANCELED, or android.media.metrics.EditingEndedEvent#FINAL_STATE_ERROR

Public methods

addInputMediaItemInfo

Added in API level 35
fun addInputMediaItemInfo(mediaItemInfo: MediaItemInfo): EditingEndedEvent.Builder

Adds information about a media item that was input to the editing operation.

Parameters
mediaItemInfo MediaItemInfo: This value cannot be null.
Return
EditingEndedEvent.Builder This value cannot be null.

build

Added in API level 35
fun build(): EditingEndedEvent

Builds an instance.

Return
EditingEndedEvent This value cannot be null.

setErrorCode

Added in API level 35
fun setErrorCode(value: Int): EditingEndedEvent.Builder

Sets the error code for a failed editing session.

Parameters
value Int: Value is android.media.metrics.EditingEndedEvent#ERROR_CODE_NONE, android.media.metrics.EditingEndedEvent#ERROR_CODE_FAILED_RUNTIME_CHECK, android.media.metrics.EditingEndedEvent#ERROR_CODE_IO_UNSPECIFIED, android.media.metrics.EditingEndedEvent#ERROR_CODE_IO_NETWORK_CONNECTION_FAILED, android.media.metrics.EditingEndedEvent#ERROR_CODE_IO_NETWORK_CONNECTION_TIMEOUT, android.media.metrics.EditingEndedEvent#ERROR_CODE_IO_BAD_HTTP_STATUS, android.media.metrics.EditingEndedEvent#ERROR_CODE_IO_FILE_NOT_FOUND, android.media.metrics.EditingEndedEvent#ERROR_CODE_IO_NO_PERMISSION, android.media.metrics.EditingEndedEvent#ERROR_CODE_IO_CLEARTEXT_NOT_PERMITTED, android.media.metrics.EditingEndedEvent#ERROR_CODE_IO_READ_POSITION_OUT_OF_RANGE, android.media.metrics.EditingEndedEvent#ERROR_CODE_DECODER_INIT_FAILED, android.media.metrics.EditingEndedEvent#ERROR_CODE_DECODING_FAILED, android.media.metrics.EditingEndedEvent#ERROR_CODE_DECODING_FORMAT_UNSUPPORTED, android.media.metrics.EditingEndedEvent#ERROR_CODE_ENCODER_INIT_FAILED, android.media.metrics.EditingEndedEvent#ERROR_CODE_ENCODING_FAILED, android.media.metrics.EditingEndedEvent#ERROR_CODE_ENCODING_FORMAT_UNSUPPORTED, android.media.metrics.EditingEndedEvent#ERROR_CODE_VIDEO_FRAME_PROCESSING_FAILED, android.media.metrics.EditingEndedEvent#ERROR_CODE_AUDIO_PROCESSING_FAILED, or android.media.metrics.EditingEndedEvent#ERROR_CODE_MUXING_FAILED
Return
EditingEndedEvent.Builder This value cannot be null.

setExporterName

Added in API level 35
fun setExporterName(exporterName: String): EditingEndedEvent.Builder

The name of the library implementing the exporting operation. For example, a Maven artifact ID like "androidx.media3.media3-transformer:1.3.0-beta01".

Parameters
exporterName String: The name of the library implementing the export operation. This value cannot be null.
Return
EditingEndedEvent.Builder This value cannot be null.

setFinalProgressPercent

Added in API level 35
fun setFinalProgressPercent(finalProgressPercent: Float): EditingEndedEvent.Builder

Sets the progress of the editing operation in percent at the moment that it ended.

Parameters
finalProgressPercent Float: The progress of the editing operation in percent at the moment that it ended. Value is between 0 and 100 inclusive
Return
EditingEndedEvent.Builder This value cannot be null.

setMetricsBundle

Added in API level 35
fun setMetricsBundle(metricsBundle: Bundle): EditingEndedEvent.Builder

Sets metrics-related information that is not supported by dedicated methods.

Used for backwards compatibility by the metrics infrastructure.

Parameters
metricsBundle Bundle: This value cannot be null.
Return
EditingEndedEvent.Builder This value cannot be null.

setMuxerName

Added in API level 35
fun setMuxerName(muxerName: String): EditingEndedEvent.Builder

The name of the library implementing the media muxing operation. For example, a Maven artifact ID like "androidx.media3.media3-muxer:1.3.0-beta01".

Parameters
muxerName String: The name of the library implementing the media muxing operation. This value cannot be null.
Return
EditingEndedEvent.Builder This value cannot be null.

See Also

setOutputMediaItemInfo

Added in API level 35
fun setOutputMediaItemInfo(mediaItemInfo: MediaItemInfo): EditingEndedEvent.Builder

Sets information about the output media item.

Parameters
mediaItemInfo MediaItemInfo: This value cannot be null.
Return
EditingEndedEvent.Builder This value cannot be null.

setTimeSinceCreatedMillis

Added in API level 35
fun setTimeSinceCreatedMillis(timeSinceCreatedMillis: Long): EditingEndedEvent.Builder

Sets the elapsed time since creating the editing session, in milliseconds.

Parameters
timeSinceCreatedMillis Long: The elapsed time since creating the editing session, in milliseconds, or TIME_SINCE_CREATED_UNKNOWN if unknown. Value is TIME_SINCE_CREATED_UNKNOWN or greater
Return
EditingEndedEvent.Builder This value cannot be null.