chromium/third_party/blink/renderer/platform/peerconnection/gpu_codec_support_waiter.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/platform/peerconnection/gpu_codec_support_waiter.h"

#include "base/logging.h"
#include "base/synchronization/waitable_event.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/renderer/platform/wtf/thread_safe_ref_counted.h"

namespace blink {

namespace {

// Codec support known callback can potentially be called after the waiter is
// destroyed. RefCountedWaitableEvent is used for the event which callback sets
// to keep it alive in such case.
class RefCountedWaitableEvent
    : public base::WaitableEvent,
      public WTF::ThreadSafeRefCounted<RefCountedWaitableEvent> {};

std::optional<base::TimeDelta> GetCodecSupportWaitTimeoutMs() {}

void OnCodecSupportKnown(
    scoped_refptr<RefCountedWaitableEvent> codec_support_known) {}

}  // namespace

GpuCodecSupportWaiter::GpuCodecSupportWaiter(
    media::GpuVideoAcceleratorFactories* gpu_factories)
    :{}

bool GpuCodecSupportWaiter::IsCodecSupportKnown(bool is_encoder) const {}

bool GpuCodecSupportWaiter::IsDecoderSupportKnown() const {}

bool GpuCodecSupportWaiter::IsEncoderSupportKnown() const {}

}  // namespace blink