Partager via


MediaCodec.UnsubscribeFromVendorParameters(IList<String>) Method

Definition

Unsubscribe from vendor parameters, so that these parameters will not be present in #getOutputFormat and changes to these parameters no longer generate output format change event.

[Android.Runtime.Register("unsubscribeFromVendorParameters", "(Ljava/util/List;)V", "", ApiSince=31)]
public void UnsubscribeFromVendorParameters (System.Collections.Generic.IList<string> names);
[<Android.Runtime.Register("unsubscribeFromVendorParameters", "(Ljava/util/List;)V", "", ApiSince=31)>]
member this.UnsubscribeFromVendorParameters : System.Collections.Generic.IList<string> -> unit

Parameters

names
IList<String>

names of the vendor parameters to unsubscribe. This may be an empty list, and in that case this method will not change the list of subscribed parameters.

Attributes

Remarks

Unsubscribe from vendor parameters, so that these parameters will not be present in #getOutputFormat and changes to these parameters no longer generate output format change event.

Unrecognized parameter names, standard (non-vendor) parameter names will be ignored. #reset also resets the list of subscribed parameters. If a parameter in names is already unsubscribed, it will remain unsubscribed.

This method can be called in any codec state except for released state. When called in running state with newly unsubscribed parameters, it takes effect no later than the processing of the subsequently queued buffer. For the removed parameters, the codec will generate output format change event.

Note that any vendor parameters set in a #configure or #setParameters call are automatically subscribed, and with this method they can be unsubscribed.

See also #INFO_OUTPUT_FORMAT_CHANGED or Callback#onOutputFormatChanged for output format change events.

Java documentation for android.media.MediaCodec.unsubscribeFromVendorParameters(java.util.List<java.lang.String>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to