chromium/third_party/blink/renderer/platform/peerconnection/instrumented_video_encoder_wrapper.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_INSTRUMENTED_VIDEO_ENCODER_WRAPPER_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_PEERCONNECTION_INSTRUMENTED_VIDEO_ENCODER_WRAPPER_H_

#include <memory>

#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/sequence_checker.h"
#include "base/task/sequenced_task_runner.h"
#include "base/thread_annotations.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/webrtc/api/video_codecs/video_encoder.h"

namespace blink {

// InstrumentedVideoEncoderWrapper is webrtc::VideoEncoder that
// - delegates webrtc::VideoEncoder call to |wrapped_encoder_|,
// - delegates webrtc::EncodedImageCallback call to |callback_|,
// - notifies the wrapped encoder state within these calls to |state_observer_|.
class PLATFORM_EXPORT InstrumentedVideoEncoderWrapper
    : public webrtc::VideoEncoder,
      public webrtc::EncodedImageCallback {};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_PEERCONNECTION_INSTRUMENTED_VIDEO_ENCODER_WRAPPER_H_