chromium/third_party/blink/renderer/platform/peerconnection/video_encoder_state_observer_impl.h

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

#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_PEERCONNECTION_VIDEO_ENCODER_STATE_OBSERVER_IMPL_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_PEERCONNECTION_VIDEO_ENCODER_STATE_OBSERVER_IMPL_H_

#include <memory>
#include <optional>

#include "base/atomic_ref_count.h"
#include "base/containers/flat_map.h"
#include "base/location.h"
#include "base/sequence_checker.h"
#include "third_party/blink/renderer/platform/peerconnection/stats_collector.h"
#include "third_party/blink/renderer/platform/peerconnection/video_encoder_state_observer.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
#include "third_party/webrtc/api/video_codecs/video_codec.h"

namespace blink {
// VideoEncoderStateObserverImpl collects the encode stats for the top spatial
// layer in SVC encoding, top stream in simulcast or the vanilla stream
// otherwise. It doesn't collect stats if multiple encoders are running. This is
// constructed in webrtc worker sequence. After construction, all the operations
// including destructor must be done in the webrtc encoder sequence.
class PLATFORM_EXPORT VideoEncoderStateObserverImpl
    : public VideoEncoderStateObserver,
      public StatsCollector {};

}  // namespace blink
#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_PEERCONNECTION_VIDEO_ENCODER_STATE_OBSERVER_IMPL_H_