Repo created
This commit is contained in:
parent
81b91f4139
commit
f8c34fa5ee
22732 changed files with 4815320 additions and 2 deletions
|
|
@ -0,0 +1,56 @@
|
|||
//
|
||||
// DesktopCaptureSourceHelper.h
|
||||
// TgVoipWebrtc
|
||||
//
|
||||
// Created by Mikhail Filimonov on 28.12.2020.
|
||||
// Copyright © 2020 Mikhail Filimonov. All rights reserved.
|
||||
//
|
||||
#ifndef TGCALLS_DESKTOP_CAPTURE_SOURCE_HELPER_H__
|
||||
#define TGCALLS_DESKTOP_CAPTURE_SOURCE_HELPER_H__
|
||||
|
||||
#include "tgcalls/desktop_capturer/DesktopCaptureSource.h"
|
||||
|
||||
#include <memory>
|
||||
#include <functional>
|
||||
|
||||
namespace webrtc {
|
||||
class VideoFrame;
|
||||
} // namespace webrtc
|
||||
|
||||
namespace rtc {
|
||||
template <typename T>
|
||||
class VideoSinkInterface;
|
||||
} // namespace rtc
|
||||
|
||||
namespace tgcalls {
|
||||
|
||||
DesktopCaptureSource DesktopCaptureSourceForKey(
|
||||
const std::string &uniqueKey);
|
||||
bool ShouldBeDesktopCapture(const std::string &uniqueKey);
|
||||
|
||||
class DesktopCaptureSourceHelper {
|
||||
public:
|
||||
DesktopCaptureSourceHelper(
|
||||
DesktopCaptureSource source,
|
||||
DesktopCaptureSourceData data);
|
||||
~DesktopCaptureSourceHelper();
|
||||
|
||||
void setOutput(
|
||||
std::shared_ptr<
|
||||
rtc::VideoSinkInterface<webrtc::VideoFrame>> sink) const;
|
||||
void setSecondaryOutput(
|
||||
std::shared_ptr<
|
||||
rtc::VideoSinkInterface<webrtc::VideoFrame>> sink) const;
|
||||
void start() const;
|
||||
void stop() const;
|
||||
void setOnFatalError(std::function<void ()>) const;
|
||||
void setOnPause(std::function<void (bool)>) const;
|
||||
private:
|
||||
struct Renderer;
|
||||
std::shared_ptr<Renderer> _renderer;
|
||||
|
||||
};
|
||||
|
||||
} // namespace tgcalls
|
||||
|
||||
#endif // TGCALLS_DESKTOP_CAPTURE_SOURCE_HELPER_H__
|
||||
Loading…
Add table
Add a link
Reference in a new issue