123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #ifndef API_TEST_FRAME_GENERATOR_INTERFACE_H_
- #define API_TEST_FRAME_GENERATOR_INTERFACE_H_
- #include <utility>
- #include "absl/types/optional.h"
- #include "api/scoped_refptr.h"
- #include "api/video/video_frame.h"
- #include "api/video/video_frame_buffer.h"
- namespace webrtc {
- namespace test {
- class FrameGeneratorInterface {
- public:
- struct VideoFrameData {
- VideoFrameData(rtc::scoped_refptr<VideoFrameBuffer> buffer,
- absl::optional<VideoFrame::UpdateRect> update_rect)
- : buffer(std::move(buffer)), update_rect(update_rect) {}
- rtc::scoped_refptr<VideoFrameBuffer> buffer;
- absl::optional<VideoFrame::UpdateRect> update_rect;
- };
- enum class OutputType { kI420, kI420A, kI010, kNV12 };
- static const char* OutputTypeToString(OutputType type);
- virtual ~FrameGeneratorInterface() = default;
-
-
- virtual VideoFrameData NextFrame() = 0;
-
- virtual void ChangeResolution(size_t width, size_t height) = 0;
- };
- }
- }
- #endif
|