<commit_before>/*
 *  Copyright (c) 2015 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 <string.h>

#include <memory>

#include "webrtc/media/base/videoframe_unittest.h"
#include "webrtc/media/engine/webrtcvideoframe.h"
#include "webrtc/media/engine/webrtcvideoframefactory.h"

class WebRtcVideoFrameFactoryTest
    : public VideoFrameTest<cricket::WebRtcVideoFrameFactory> {
 public:
  WebRtcVideoFrameFactoryTest() {}

  void InitFrame(webrtc::VideoRotation frame_rotation) {
    const int frame_width = 1920;
    const int frame_height = 1080;

    // Build the CapturedFrame.
    captured_frame_.fourcc = cricket::FOURCC_I420;
    captured_frame_.pixel_width = 1;
    captured_frame_.pixel_height = 1;
    captured_frame_.time_stamp = rtc::TimeNanos();
    captured_frame_.rotation = frame_rotation;
    captured_frame_.width = frame_width;
    captured_frame_.height = frame_height;
    captured_frame_.data_size =
        (frame_width * frame_height) +
        ((frame_width + 1) / 2) * ((frame_height + 1) / 2) * 2;
    captured_frame_buffer_.reset(new uint8_t[captured_frame_.data_size]);<commit_msg>WebRtcVideoFrameFactoryTest shouldn't inherit VideoFrameTest.<commit_after>/*
 *  Copyright (c) 2015 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 <string.h>

#include <memory>

#include "webrtc/base/gunit.h"
#include "webrtc/media/base/videocapturer.h"
#include "webrtc/media/engine/webrtcvideoframe.h"
#include "webrtc/media/engine/webrtcvideoframefactory.h"

class WebRtcVideoFrameFactoryTest : public testing::Test {
 public:
  WebRtcVideoFrameFactoryTest() {}

  void InitFrame(webrtc::VideoRotation frame_rotation) {
    const int frame_width = 1920;
    const int frame_height = 1080;

    // Build the CapturedFrame.
    captured_frame_.fourcc = cricket::FOURCC_I420;
    captured_frame_.pixel_width = 1;
    captured_frame_.pixel_height = 1;
    captured_frame_.time_stamp = rtc::TimeNanos();
    captured_frame_.rotation = frame_rotation;
    captured_frame_.width = frame_width;
    captured_frame_.height = frame_height;
    captured_frame_.data_size =
        (frame_width * frame_height) +
        ((frame_width + 1) / 2) * ((frame_height + 1) / 2) * 2;
    captured_frame_buffer_.reset(new uint8_t[captured_frame_.data_size]);
{'fraction_non_alphanumeric': 0.0888135593220339, 'fraction_numerical': 0.015593220338983051, 'mean_word_length': 4.141114982578397, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '927655', 'n_tokens_mistral': 964, 'n_tokens_neox': 927, 'n_words': 252}