encoder-uninstantiate
- C
- C++
- CSharp
- Java
- JavaScript
- Swift
- Python
- Go
- PHP
status = mte_enc_uninstantiate(encoder);
if (status != mte_status_success)
{
fprintf(stderr, "Failed to uninstantiate encoder (%s): %s\n",
mte_base_status_name(status),
mte_base_status_description(status));
return status;
}
status = encoder.uninstantiate();
if (status != mte_status_success)
{
std::cerr << "Encoder uninstantiate error ("
<< MteBase::getStatusName(status)
<< "): "
<< MteBase::getStatusDescription(status)
<< std::endl;
return status;
}
// Uninstantiate the Encoder
MteStatus encoderStatus = mteEncoder.Uninstantiate();
if(encoderStatus != MteStatus.mte_status_success)
{
// MTE was not uninstantiated as desired so handle failure appropriately
// Below is only an example
throw new Exception("Failed to uninstantiate Encoder. Status: "
+ mteEncoder.GetStatusName(encoderStatus)+ " / "
+ mteEncoder.GetStatusDescription(encoderStatus));
}
// Uninstantiate the Encoder
MteStatus encoderStatus = mteEncoder.uninstantiate();
if(encoderStatus != MteStatus.mte_status_success)
{
// MTE was not uninstantiated as desired so handle failure appropriately
// Below is only an example
throw new Exception("Failed to uninstantiate Encoder. Status: "
+ MteBase.getStatusName(encoderStatus)+ " / "
+ MteBase.getStatusDescription(encoderStatus));
}
// Uninstantiate the Encoder
mteEncoder.uninstantiate();
// free WASM memory
mteEncoder.destroy();
// Uninstantiate the Encoder
let status: mte_status = encoder.uninstantiate()
if status != mte_status_success {
// MTE was not uninstantiated as desired so handle failure appropriately
print("Encoder Uninstantiate error: \(MteBase.getStatusName(status))." +
"Description: \(MteBase.getStatusDescription(status))"
}
# Uninstantiate the Encoder.
encoder_status = mte_encoder.uninstantiate()
if encoder_status != MteStatus.mte_status_success:
# MTE was not uninstantiated as desired so handle failure appropriately.
# Below is only an example.
raise Exception("Failed to uninstantiate Encoder. Status: {0} / {1}\n".format(MteBase.get_status_name(encoder_status),
MteBase.get_status_description(encoder_status)))
// Uninstantiate the Encoder
encoderStatus := mteEncoder.Uninstantiate();
if(encoderStatus != mte.Status_mte_status_success){
// Handle Encoder uninstatiate failure appropriately
// Below is only an example
fmt.Fprintf(os.Stderr, "Encoder uninstantiate error (%v): %v\n",
mte.GetStatusName(encoderStatus), mte.GetStatusDescription(encoderStatus))
return int(encoderStatus)
}
<?php
// Uninstantiate the Encoder
$encoderStatus = $mteEncoder->uninstantiate();
if (constant($encoderStatus) != mte_status_success) {
//----------------------------------------------------
// Handle Encoder uninstantiate failure appropriately
// Below is only an example
echo "Encoder uninstantiate error: ".$mteEncoder->getStatusName(constant($encoderStatus)).":"
.$mteEncoder->getStatusDescription(constant($encoderStatus));
return $mteEncoder->getStatusCode(constant($encoderStatus));
}
// Clear out $mteEncoder variable
unset($mteEncoder);
?>