Example #1
0
/* static */ void
OmxDecoder::RecycleCallback(TextureClient* aClient, void* aClosure)
{
  MOZ_ASSERT(aClient && !aClient->IsDead());
  OmxDecoder* decoder = static_cast<OmxDecoder*>(aClosure);
  decoder->RecycleCallbackImp(aClient);
}
static bool CreateDecoder(PluginHost *aPluginHost, Decoder *aDecoder, const char *aMimeChars, size_t aMimeLen)
{
  OmxDecoder *omx = new OmxDecoder(aPluginHost, aDecoder);
  if (!omx || !omx->Init())
    return false;

  aDecoder->mPrivate = omx;
  aDecoder->GetDuration = GetDuration;
  aDecoder->GetVideoParameters = GetVideoParameters;
  aDecoder->GetAudioParameters = GetAudioParameters;
  aDecoder->HasVideo = HasVideo;
  aDecoder->HasAudio = HasAudio;
  aDecoder->ReadVideo = ReadVideo;
  aDecoder->ReadAudio = ReadAudio;
  aDecoder->DestroyDecoder = DestroyDecoder;

  return true;
}
Example #3
0
/* static */ void
OmxDecoder::RecycleCallback(TextureClient* aClient, void* aClosure)
{
  OmxDecoder* decoder = static_cast<OmxDecoder*>(aClosure);
  decoder->RecycleCallbackImp(aClient);
}