FoxiGram/TMessagesProj/jni/voip/tgcalls/desktop_capturer/DesktopCaptureSourceHelper.h
instant992 8e79f2ee9c FoxiGram: Telegram client with built-in Xray VLESS proxy
Based on Nekogram. Key additions:
- Rebrand to FoxiGram (app name, APK name, applicationId com.foxigram.app)
- Embedded Xray (VLESS+Reality) proxy client via JNI libxray.so
- Bundled hidden one-tap proxies (LTE + WiFi), read-only in UI
- Auto-restore proxy on restart, rebind to active network (LTE/WiFi)
- Server credentials externalized to git-ignored XrayServers.java (+ template)
- libxray Go source included; compiled .so, keystore, google-services.json ignored
2026-06-08 16:41:07 +04:00

56 lines
1.3 KiB
C++

//
// 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__