chromium/third_party/blink/renderer/platform/peerconnection/rtc_encoded_audio_stream_transformer.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/rtc_encoded_audio_stream_transformer.h"

#include <utility>

#include "base/memory/ptr_util.h"
#include "base/synchronization/lock.h"
#include "base/task/single_thread_task_runner.h"
#include "third_party/blink/renderer/platform/heap/persistent.h"
#include "third_party/blink/renderer/platform/peerconnection/rtc_scoped_refptr_cross_thread_copier.h"
#include "third_party/blink/renderer/platform/scheduler/public/post_cross_thread_task.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_copier_base.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_copier_std.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
#include "third_party/webrtc/api/frame_transformer_interface.h"
#include "third_party/webrtc/rtc_base/ref_counted_object.h"

namespace blink {

namespace {

// This delegate class exists to work around the fact that
// RTCEncodedAudioStreamTransformer cannot derive from rtc::RefCountedObject
// and post tasks referencing itself as an rtc::scoped_refptr. Instead,
// RTCEncodedAudioStreamTransformer creates a delegate using
// rtc::RefCountedObject and posts tasks referencing the delegate, which
// invokes the RTCEncodedAudioStreamTransformer via callbacks.
class RTCEncodedAudioStreamTransformerDelegate
    : public webrtc::FrameTransformerInterface {};

}  // namespace

RTCEncodedAudioStreamTransformer::Broker::Broker(
    RTCEncodedAudioStreamTransformer* transformer_)
    :{}

void RTCEncodedAudioStreamTransformer::Broker::RegisterTransformedFrameCallback(
    rtc::scoped_refptr<webrtc::TransformedFrameCallback>
        send_frame_to_sink_callback) {}

void RTCEncodedAudioStreamTransformer::Broker::
    UnregisterTransformedFrameCallback() {}

void RTCEncodedAudioStreamTransformer::Broker::TransformFrameOnSourceTaskRunner(
    std::unique_ptr<webrtc::TransformableAudioFrameInterface> frame) {}

void RTCEncodedAudioStreamTransformer::Broker::SetTransformerCallback(
    TransformerCallback callback) {}

void RTCEncodedAudioStreamTransformer::Broker::ResetTransformerCallback() {}

void RTCEncodedAudioStreamTransformer::Broker::SetSourceTaskRunner(
    scoped_refptr<base::SingleThreadTaskRunner> task_runner) {}

void RTCEncodedAudioStreamTransformer::Broker::ClearTransformer() {}

void RTCEncodedAudioStreamTransformer::Broker::SendFrameToSink(
    std::unique_ptr<webrtc::TransformableAudioFrameInterface> frame) {}

void RTCEncodedAudioStreamTransformer::Broker::StartShortCircuiting() {}

RTCEncodedAudioStreamTransformer::RTCEncodedAudioStreamTransformer(
    scoped_refptr<base::SingleThreadTaskRunner> realm_task_runner)
    :{}

RTCEncodedAudioStreamTransformer::~RTCEncodedAudioStreamTransformer() {}

void RTCEncodedAudioStreamTransformer::RegisterTransformedFrameCallback(
    rtc::scoped_refptr<webrtc::TransformedFrameCallback> callback) {}

void RTCEncodedAudioStreamTransformer::UnregisterTransformedFrameCallback() {}

void RTCEncodedAudioStreamTransformer::TransformFrame(
    std::unique_ptr<webrtc::TransformableAudioFrameInterface> frame) {}

void RTCEncodedAudioStreamTransformer::SendFrameToSink(
    std::unique_ptr<webrtc::TransformableAudioFrameInterface> frame) {}

void RTCEncodedAudioStreamTransformer::StartShortCircuiting() {}

void RTCEncodedAudioStreamTransformer::SetTransformerCallback(
    TransformerCallback callback) {}

void RTCEncodedAudioStreamTransformer::ResetTransformerCallback() {}

bool RTCEncodedAudioStreamTransformer::HasTransformerCallback() {}

bool RTCEncodedAudioStreamTransformer::HasTransformedFrameCallback() const {}

rtc::scoped_refptr<webrtc::FrameTransformerInterface>
RTCEncodedAudioStreamTransformer::Delegate() {}

void RTCEncodedAudioStreamTransformer::SetSourceTaskRunner(
    scoped_refptr<base::SingleThreadTaskRunner> realm_task_runner) {}

scoped_refptr<RTCEncodedAudioStreamTransformer::Broker>
RTCEncodedAudioStreamTransformer::GetBroker() {}

}  // namespace blink