WMFVideoMFTManager::~WMFVideoMFTManager()
{
  MOZ_COUNT_DTOR(WMFVideoMFTManager);
  // Ensure DXVA/D3D9 related objects are released on the main thread.
  if (mDXVA2Manager) {
    DeleteOnMainThread(mDXVA2Manager);
  }
}
Exemple #2
0
WMFVideoMFTManager::~WMFVideoMFTManager()
{
  MOZ_COUNT_DTOR(WMFVideoMFTManager);
  // Ensure DXVA/D3D9 related objects are released on the main thread.
  if (mDXVA2Manager) {
    DeleteOnMainThread(mDXVA2Manager);
  }

  // Record whether the video decoder successfully decoded, or output null
  // samples but did/didn't recover.
  uint32_t telemetry = (mNullOutputCount == 0) ? 0 :
                       (mGotValidOutputAfterNullOutput && mGotExcessiveNullOutput) ? 1 :
                       mGotExcessiveNullOutput ? 2 :
                       mGotValidOutputAfterNullOutput ? 3 :
                       4;

  nsCOMPtr<nsIRunnable> task = NS_NewRunnableFunction([=]() -> void {
    LOG(nsPrintfCString("Reporting telemetry VIDEO_MFT_OUTPUT_NULL_SAMPLES=%d", telemetry).get());
    Telemetry::Accumulate(Telemetry::ID::VIDEO_MFT_OUTPUT_NULL_SAMPLES, telemetry);
  });
  AbstractThread::MainThread()->Dispatch(task.forget());
}
Exemple #3
0
void
WMFVideoMFTManager::Shutdown()
{
  mDecoder = nullptr;
  DeleteOnMainThread(mDXVA2Manager);
}
WMFVideoOutputSource::~WMFVideoOutputSource()
{
  MOZ_COUNT_DTOR(WMFVideoOutputSource);
  // Ensure DXVA/D3D9 related objects are released on the main thread.
  DeleteOnMainThread(mDXVA2Manager);
}