#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 {
class RefCountedWaitableEvent
: public base::WaitableEvent,
public WTF::ThreadSafeRefCounted<RefCountedWaitableEvent> { … };
std::optional<base::TimeDelta> GetCodecSupportWaitTimeoutMs() { … }
void OnCodecSupportKnown(
scoped_refptr<RefCountedWaitableEvent> codec_support_known) { … }
}
GpuCodecSupportWaiter::GpuCodecSupportWaiter(
media::GpuVideoAcceleratorFactories* gpu_factories)
: … { … }
bool GpuCodecSupportWaiter::IsCodecSupportKnown(bool is_encoder) const { … }
bool GpuCodecSupportWaiter::IsDecoderSupportKnown() const { … }
bool GpuCodecSupportWaiter::IsEncoderSupportKnown() const { … }
}