Repo created
This commit is contained in:
parent
81b91f4139
commit
f8c34fa5ee
22732 changed files with 4815320 additions and 2 deletions
35
TMessagesProj/jni/voip/tgcalls/FakeVideoTrackSource.h
Normal file
35
TMessagesProj/jni/voip/tgcalls/FakeVideoTrackSource.h
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace webrtc {
|
||||
class VideoTrackSourceInterface;
|
||||
class VideoFrame;
|
||||
}
|
||||
|
||||
namespace tgcalls {
|
||||
class FrameSource {
|
||||
public:
|
||||
struct Info {
|
||||
int32_t width;
|
||||
int32_t height;
|
||||
};
|
||||
|
||||
virtual ~FrameSource() = default;
|
||||
|
||||
virtual Info info() const = 0;
|
||||
virtual webrtc::VideoFrame next_frame();
|
||||
static void video_frame_to_rgb0(const webrtc::VideoFrame &src, char *dest);
|
||||
virtual void next_frame_rgb0(char *buf, double *pt_in_seconds) = 0;
|
||||
|
||||
static std::unique_ptr<FrameSource> chess();
|
||||
static std::unique_ptr<FrameSource> from_file(std::string path);
|
||||
};
|
||||
|
||||
class FakeVideoTrackSource {
|
||||
public:
|
||||
static std::function<webrtc::VideoTrackSourceInterface*()> create(std::unique_ptr<FrameSource> source);
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue