summaryrefslogtreecommitdiffstats
path: root/remoting/codec/video_encoder_verbatim_unittest.cc
blob: d6315ee3ccae2d1e9a537186c0382933981d2ec8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "remoting/codec/video_encoder_verbatim.h"

#include "remoting/codec/codec_test.h"
#include "remoting/codec/video_decoder_verbatim.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace remoting {

TEST(VideoEncoderVerbatimTest, TestVideoEncoder) {
  scoped_ptr<VideoEncoderVerbatim> encoder(new VideoEncoderVerbatim());
  TestVideoEncoder(encoder.get(), true);
}

TEST(VideoEncoderVerbatimTest, TestVideoEncoderSmallOutputBuffer) {
  scoped_ptr<VideoEncoderVerbatim> encoder(new VideoEncoderVerbatim());
  encoder->SetMaxPacketSize(16);
  TestVideoEncoder(encoder.get(), true);
}

TEST(VideoEncoderVerbatimTest, EncodeAndDecode) {
  scoped_ptr<VideoEncoderVerbatim> encoder(new VideoEncoderVerbatim());
  scoped_ptr<VideoDecoderVerbatim> decoder(new VideoDecoderVerbatim());
  TestVideoEncoderDecoder(encoder.get(), decoder.get(), false);
}

TEST(VideoEncoderVerbatimTest, EncodeAndDecodeSmallOutputBuffer) {
  scoped_ptr<VideoEncoderVerbatim> encoder(new VideoEncoderVerbatim());
  encoder->SetMaxPacketSize(16);
  scoped_ptr<VideoDecoderVerbatim> decoder(new VideoDecoderVerbatim());
  TestVideoEncoderDecoder(encoder.get(), decoder.get(), false);
}

}  // namespace remoting