/* * 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.
*/ #ifndef TEST_FRAME_GENERATOR_H_ #define TEST_FRAME_GENERATOR_H_
// SquareGenerator is a FrameGenerator that draws a given amount of randomly // sized and colored squares. Between each new generated frame, the squares // are moved slightly towards the lower right corner. class SquareGenerator : public FrameGeneratorInterface { public:
SquareGenerator(int width, int height, OutputType type, int num_squares);
private:
Random random_generator_; int x_; int y_; constint length_; const uint8_t yuv_y_; const uint8_t yuv_u_; const uint8_t yuv_v_; const uint8_t yuv_a_;
};
mutable Mutex mutex_; const OutputType type_; int width_ RTC_GUARDED_BY(&mutex_); int height_ RTC_GUARDED_BY(&mutex_);
std::vector<std::unique_ptr<Square>> squares_ RTC_GUARDED_BY(&mutex_);
};
class YuvFileGenerator : public FrameGeneratorInterface { public:
YuvFileGenerator(std::vector<FILE*> files,
size_t width,
size_t height, int frame_repeat_count);
class NV12FileGenerator : public FrameGeneratorInterface { public:
NV12FileGenerator(std::vector<FILE*> files,
size_t width,
size_t height, int frame_repeat_count);
// SlideGenerator works similarly to YuvFileGenerator but it fills the frames // with randomly sized and colored squares instead of reading their content // from files. class SlideGenerator : public FrameGeneratorInterface { public:
SlideGenerator(int width, int height, int frame_repeat_count);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.