chromium/remoting/codec/codec_test.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "remoting/codec/codec_test.h"

#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>

#include <memory>
#include <utility>

#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "remoting/base/util.h"
#include "remoting/codec/video_decoder.h"
#include "remoting/codec/video_encoder.h"
#include "remoting/proto/video.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"

BasicDesktopFrame;
DesktopFrame;
DesktopRect;
DesktopRegion;
DesktopSize;

namespace {

const int kBytesPerPixel =;

// Some sample rects for testing.
std::vector<DesktopRegion> MakeTestRegionLists(DesktopSize size) {}

}  // namespace

namespace remoting {

class VideoDecoderTester {};

// The VideoEncoderTester provides a hook for retrieving the data, and passing
// the message to other subprograms for validaton.
class VideoEncoderTester {};

std::unique_ptr<DesktopFrame> PrepareFrame(const DesktopSize& size) {}

static void TestEncodingRects(VideoEncoder* encoder,
                              VideoEncoderTester* tester,
                              DesktopFrame* frame,
                              const DesktopRegion& region) {}

void TestVideoEncoder(VideoEncoder* encoder, bool strict) {}

void TestVideoEncoderEmptyFrames(VideoEncoder* encoder, int max_topoff_frames) {}

static void TestEncodeDecodeRects(VideoEncoder* encoder,
                                  VideoEncoderTester* encoder_tester,
                                  VideoDecoderTester* decoder_tester,
                                  DesktopFrame* frame,
                                  const DesktopRegion& region) {}

void TestVideoEncoderDecoder(VideoEncoder* encoder,
                             VideoDecoder* decoder,
                             bool strict) {}

static void FillWithGradient(DesktopFrame* frame) {}

void TestVideoEncoderDecoderGradient(VideoEncoder* encoder,
                                     VideoDecoder* decoder,
                                     const DesktopSize& screen_size,
                                     double max_error_limit,
                                     double mean_error_limit) {}

}  // namespace remoting