Пример #1
0
static void
vda_close(struct media_codec *mc)
{
  vda_decoder_t *vdad = mc->opaque;
  VDADecoderFlush(vdad->vdad_decoder, 0);
  VDADecoderDestroy(vdad->vdad_decoder);
  destroy_frames(vdad);
}
Пример #2
0
void
AppleVDADecoder::ProcessShutdown()
{
  if (mDecoder) {
    LOG("%s: cleaning up decoder %p", __func__, mDecoder);
    VDADecoderDestroy(mDecoder);
    mDecoder = nullptr;
  }
}
Пример #3
0
int ff_vda_destroy_decoder(struct vda_context *vda_ctx)
{
    OSStatus status = kVDADecoderNoErr;

    if (vda_ctx->decoder)
        status = VDADecoderDestroy(vda_ctx->decoder);

    return status;
}
nsresult
AppleVDADecoder::Shutdown()
{
  if (mDecoder) {
    LOG("%s: cleaning up decoder %p", __func__, mDecoder);
    VDADecoderDestroy(mDecoder);
    mDecoder = nullptr;
  }
  return NS_OK;
}
Пример #5
0
int ff_vda_destroy_decoder(struct vda_context *vda_ctx)
{
    OSStatus status = kVDADecoderNoErr;

    if (vda_ctx->decoder)
        status = VDADecoderDestroy(vda_ctx->decoder);

#if FF_API_VDA_ASYNC
    vda_clear_queue(vda_ctx);
    pthread_mutex_destroy(&vda_ctx->queue_mutex);
#endif
    av_freep(&vda_ctx->priv_bitstream);

    return status;
}
Пример #6
0
int ff_vda_destroy_decoder(struct vda_context *vda_ctx)
{
    OSStatus status = kVDADecoderNoErr;

    if (vda_ctx->decoder)
        status = VDADecoderDestroy(vda_ctx->decoder);

    vda_clear_queue(vda_ctx);

    pthread_mutex_destroy(&vda_ctx->queue_mutex);

    if (vda_ctx->bitstream)
        av_freep(&vda_ctx->bitstream);

    if (kVDADecoderNoErr != status)
        return status;

    return 0;
}
Пример #7
0
void CDVDVideoCodecVDA::Dispose()
{
  CCocoaAutoPool pool;
  if (m_vda_decoder)
    VDADecoderDestroy((VDADecoder)m_vda_decoder), m_vda_decoder = NULL;

  if (!m_use_cvBufferRef && m_videobuffer.iFlags & DVP_FLAG_ALLOCATED)
  {
    free(m_videobuffer.data[0]), m_videobuffer.data[0] = NULL;
    free(m_videobuffer.data[1]), m_videobuffer.data[1] = NULL;
    free(m_videobuffer.data[2]), m_videobuffer.data[2] = NULL;
    m_videobuffer.iFlags = 0;
  }

  if (m_bitstream)
    delete m_bitstream, m_bitstream = NULL;

  if (m_dllSwScale)
    delete m_dllSwScale, m_dllSwScale = NULL;
}
Пример #8
0
void CDVDVideoCodecVDA::Dispose()
{
  CCocoaAutoPool pool;
  if (m_vda_decoder)
    VDADecoderDestroy((VDADecoder)m_vda_decoder), m_vda_decoder = NULL;

  if (!m_use_cvBufferRef && m_videobuffer.iFlags & DVP_FLAG_ALLOCATED)
  {
    free(m_videobuffer.data[0]), m_videobuffer.data[0] = NULL;
    free(m_videobuffer.data[1]), m_videobuffer.data[1] = NULL;
    free(m_videobuffer.data[2]), m_videobuffer.data[2] = NULL;
    m_videobuffer.iFlags = 0;
  }
  else
  {
    while (m_queue_depth)
      DisplayQueuePop();
  }

  if (m_bitstream)
    delete m_bitstream, m_bitstream = NULL;
}
Пример #9
0
void
MoonVDADecoder::Dispose ()
{
	VDADecoderDestroy (decoder);
}
Пример #10
0
void ff_vda_default_free(AVCodecContext *avctx)
{
    AVVDAContext *vda = avctx->hwaccel_context;
    if (vda && vda->decoder)
        VDADecoderDestroy(vda->decoder);
}