EditingEndedEvent.Builder


public static final class EditingEndedEvent.Builder
extends Object

java.lang.Object
   ↳ android.media.metrics.EditingEndedEvent.Builder


Builder for EditingEndedEvent

Summary

Public constructors

Builder(int finalState)

Creates a new Builder.

Public methods

EditingEndedEvent.Builder addInputMediaItemInfo(MediaItemInfo mediaItemInfo)

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

EditingEndedEvent.Builder addOperationType(long operationType)

Adds an operation type to the set of operations performed.

EditingEndedEvent build()

Builds an instance.

EditingEndedEvent.Builder setErrorCode(int value)

Sets the error code for a failed editing session.

EditingEndedEvent.Builder setExporterName(String exporterName)

The name of the library implementing the exporting operation.

EditingEndedEvent.Builder setFinalProgressPercent(float finalProgressPercent)

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

EditingEndedEvent.Builder setMetricsBundle(Bundle metricsBundle)

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

EditingEndedEvent.Builder setMuxerName(String muxerName)

The name of the library implementing the media muxing operation.

EditingEndedEvent.Builder setOutputMediaItemInfo(MediaItemInfo mediaItemInfo)

Sets information about the output media item.

EditingEndedEvent.Builder setTimeSinceCreatedMillis(long timeSinceCreatedMillis)

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

Inherited methods

Public constructors

Builder

Added in API level 35
public Builder (int finalState)

Creates a new Builder.

Parameters
finalState int: The state of the editing session when it ended. Value is EditingEndedEvent.FINAL_STATE_SUCCEEDED, EditingEndedEvent.FINAL_STATE_CANCELED, or EditingEndedEvent.FINAL_STATE_ERROR

Public methods

addInputMediaItemInfo

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

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

Parameters
mediaItemInfo MediaItemInfo: This value cannot be null.

Returns
EditingEndedEvent.Builder This value cannot be null.

addOperationType

Added in API level 35
public EditingEndedEvent.Builder addOperationType (long operationType)

Adds an operation type to the set of operations performed.

Parameters
operationType long: A type of operation performed as part of this editing operation. Value is either 0 or a combination of EditingEndedEvent.OPERATION_TYPE_VIDEO_TRANSCODE, EditingEndedEvent.OPERATION_TYPE_AUDIO_TRANSCODE, EditingEndedEvent.OPERATION_TYPE_VIDEO_EDIT, EditingEndedEvent.OPERATION_TYPE_AUDIO_EDIT, EditingEndedEvent.OPERATION_TYPE_VIDEO_TRANSMUX, EditingEndedEvent.OPERATION_TYPE_AUDIO_TRANSMUX, EditingEndedEvent.OPERATION_TYPE_PAUSED, and EditingEndedEvent.OPERATION_TYPE_RESUMED

Returns
EditingEndedEvent.Builder This value cannot be null.

build

Added in API level 35
public EditingEndedEvent build ()

Builds an instance.

Returns
EditingEndedEvent This value cannot be null.

setErrorCode

Added in API level 35
public EditingEndedEvent.Builder setErrorCode (int value)

Sets the error code for a failed editing session.

Parameters
value int: Value is EditingEndedEvent.ERROR_CODE_NONE, EditingEndedEvent.ERROR_CODE_FAILED_RUNTIME_CHECK, EditingEndedEvent.ERROR_CODE_IO_UNSPECIFIED, EditingEndedEvent.ERROR_CODE_IO_NETWORK_CONNECTION_FAILED, EditingEndedEvent.ERROR_CODE_IO_NETWORK_CONNECTION_TIMEOUT, EditingEndedEvent.ERROR_CODE_IO_BAD_HTTP_STATUS, EditingEndedEvent.ERROR_CODE_IO_FILE_NOT_FOUND, EditingEndedEvent.ERROR_CODE_IO_NO_PERMISSION, EditingEndedEvent.ERROR_CODE_IO_CLEARTEXT_NOT_PERMITTED, EditingEndedEvent.ERROR_CODE_IO_READ_POSITION_OUT_OF_RANGE, EditingEndedEvent.ERROR_CODE_DECODER_INIT_FAILED, EditingEndedEvent.ERROR_CODE_DECODING_FAILED, EditingEndedEvent.ERROR_CODE_DECODING_FORMAT_UNSUPPORTED, EditingEndedEvent.ERROR_CODE_ENCODER_INIT_FAILED, EditingEndedEvent.ERROR_CODE_ENCODING_FAILED, EditingEndedEvent.ERROR_CODE_ENCODING_FORMAT_UNSUPPORTED, EditingEndedEvent.ERROR_CODE_VIDEO_FRAME_PROCESSING_FAILED, EditingEndedEvent.ERROR_CODE_AUDIO_PROCESSING_FAILED, or EditingEndedEvent.ERROR_CODE_MUXING_FAILED

Returns
EditingEndedEvent.Builder This value cannot be null.

setExporterName

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

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.

Returns
EditingEndedEvent.Builder This value cannot be null.

setFinalProgressPercent

Added in API level 35
public EditingEndedEvent.Builder setFinalProgressPercent (float finalProgressPercent)

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

Returns
EditingEndedEvent.Builder This value cannot be null.

setMetricsBundle

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

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.

Returns
EditingEndedEvent.Builder This value cannot be null.

setMuxerName

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

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.

Returns
EditingEndedEvent.Builder This value cannot be null.

setOutputMediaItemInfo

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

Sets information about the output media item.

Parameters
mediaItemInfo MediaItemInfo: This value cannot be null.

Returns
EditingEndedEvent.Builder This value cannot be null.

setTimeSinceCreatedMillis

Added in API level 35
public EditingEndedEvent.Builder setTimeSinceCreatedMillis (long timeSinceCreatedMillis)

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 EditingEndedEvent.TIME_SINCE_CREATED_UNKNOWN if unknown. Value is TIME_SINCE_CREATED_UNKNOWN or greater

Returns
EditingEndedEvent.Builder This value cannot be null.