chromium/third_party/webrtc/test/fake_encoder.cc

/*
 *  Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#include "test/fake_encoder.h"

#include <string.h>

#include <algorithm>
#include <cstdint>
#include <memory>
#include <string>

#include "api/environment/environment.h"
#include "api/task_queue/task_queue_factory.h"
#include "api/video/video_content_type.h"
#include "modules/video_coding/codecs/h264/include/h264_globals.h"
#include "modules/video_coding/include/video_codec_interface.h"
#include "modules/video_coding/include/video_error_codes.h"
#include "rtc_base/checks.h"
#include "system_wrappers/include/sleep.h"

namespace webrtc {
namespace test {
namespace {
const int kKeyframeSizeFactor =;

// Inverse of proportion of frames assigned to each temporal layer for all
// possible temporal layers numbers.
const int kTemporalLayerRateFactor[4][4] =;

void WriteCounter(unsigned char* payload, uint32_t counter) {}

}  // namespace

FakeEncoder::FakeEncoder(const Environment& env)
    :{}

void FakeEncoder::SetFecControllerOverride(
    FecControllerOverride* fec_controller_override) {}

void FakeEncoder::SetMaxBitrate(int max_kbps) {}

void FakeEncoder::SetQp(int qp) {}

void FakeEncoder::SetImplementationName(absl::string_view implementation_name) {}

int32_t FakeEncoder::InitEncode(const VideoCodec* config,
                                const Settings& settings) {}

int32_t FakeEncoder::Encode(const VideoFrame& input_image,
                            const std::vector<VideoFrameType>* frame_types) {}

CodecSpecificInfo FakeEncoder::EncodeHook(
    EncodedImage& encoded_image,
    rtc::scoped_refptr<EncodedImageBuffer> buffer) {}

FakeEncoder::FrameInfo FakeEncoder::NextFrame(
    const std::vector<VideoFrameType>* frame_types,
    bool keyframe,
    uint8_t num_simulcast_streams,
    const VideoBitrateAllocation& target_bitrate,
    SimulcastStream simulcast_streams[kMaxSimulcastStreams],
    int framerate) {}

int32_t FakeEncoder::RegisterEncodeCompleteCallback(
    EncodedImageCallback* callback) {}

int32_t FakeEncoder::Release() {}

void FakeEncoder::SetRates(const RateControlParameters& parameters) {}

void FakeEncoder::SetRatesLocked(const RateControlParameters& parameters) {}

VideoEncoder::EncoderInfo FakeEncoder::GetEncoderInfo() const {}

int FakeEncoder::GetConfiguredInputFramerate() const {}

int FakeEncoder::GetNumInitializations() const {}

const VideoCodec& FakeEncoder::config() const {}

FakeH264Encoder::FakeH264Encoder(const Environment& env)
    :{}

CodecSpecificInfo FakeH264Encoder::EncodeHook(
    EncodedImage& encoded_image,
    rtc::scoped_refptr<EncodedImageBuffer> buffer) {}

DelayedEncoder::DelayedEncoder(const Environment& env, int delay_ms)
    :{}

void DelayedEncoder::SetDelay(int delay_ms) {}

int32_t DelayedEncoder::Encode(const VideoFrame& input_image,
                               const std::vector<VideoFrameType>* frame_types) {}

MultithreadedFakeH264Encoder::MultithreadedFakeH264Encoder(
    const Environment& env)
    :{}

int32_t MultithreadedFakeH264Encoder::InitEncode(const VideoCodec* config,
                                                 const Settings& settings) {}

int32_t MultithreadedFakeH264Encoder::Encode(
    const VideoFrame& input_image,
    const std::vector<VideoFrameType>* frame_types) {}

int32_t MultithreadedFakeH264Encoder::EncodeCallback(
    const VideoFrame& input_image,
    const std::vector<VideoFrameType>* frame_types) {}

int32_t MultithreadedFakeH264Encoder::Release() {}

}  // namespace test
}  // namespace webrtc