int av_mediacodec_default_init(AVCodecContext *avctx, AVMediaCodecContext *ctx, void *surface)
{ int ret = 0;
JNIEnv *env = NULL;
env = ff_jni_get_env(avctx); if (!env) { return AVERROR_EXTERNAL;
}
ctx->surface = (*env)->NewGlobalRef(env, surface); if (ctx->surface) {
avctx->hwaccel_context = ctx;
} else {
av_log(avctx, AV_LOG_ERROR, "Could not create new global reference\n");
ret = AVERROR_EXTERNAL;
}
env = ff_jni_get_env(avctx); if (!env) { return;
}
if (ctx->surface) {
(*env)->DeleteGlobalRef(env, ctx->surface);
ctx->surface = NULL;
}
av_freep(&avctx->hwaccel_context);
}
int av_mediacodec_release_buffer(AVMediaCodecBuffer *buffer, int render)
{
MediaCodecDecContext *ctx = buffer->ctx; int released = atomic_fetch_add(&buffer->released, 1);
int av_mediacodec_render_buffer_at_time(AVMediaCodecBuffer *buffer, int64_t time)
{
MediaCodecDecContext *ctx = buffer->ctx; int released = atomic_fetch_add(&buffer->released, 1);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.