FoxiGram/TMessagesProj/jni/voip/libtgvoip/os/darwin/SampleBufferDisplayLayerRenderer.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

40 lines
1.2 KiB
Objective-C

//
// libtgvoip is free and unencumbered public domain software.
// For more information, see http://unlicense.org or the UNLICENSE file
// you should have received with this source code distribution.
//
#ifndef TGVOIP_SAMPLEBUFFERDISPLAYLAYERRENDERER
#define TGVOIP_SAMPLEBUFFERDISPLAYLAYERRENDERER
#include "../../video/VideoRenderer.h"
#include <vector>
#include <objc/objc.h>
#include <VideoToolbox/VideoToolbox.h>
#ifdef __OBJC__
@class TGVVideoRenderer;
#else
typedef struct objc_object TGVVideoRenderer;
#endif
namespace tgvoip{
namespace video{
class SampleBufferDisplayLayerRenderer : public VideoRenderer{
public:
SampleBufferDisplayLayerRenderer(TGVVideoRenderer* renderer);
virtual ~SampleBufferDisplayLayerRenderer();
virtual void Reset(uint32_t codec, unsigned int width, unsigned int height, std::vector<Buffer>& csd) override;
virtual void DecodeAndDisplay(Buffer frame, uint32_t pts) override;
virtual void SetStreamEnabled(bool enabled) override;
static int GetMaximumResolution();
static std::vector<uint32_t> GetAvailableDecoders();
private:
TGVVideoRenderer* renderer;
CMFormatDescriptionRef formatDesc=NULL;
bool needReset=false;
};
}
}
#endif /* TGVOIP_SAMPLEBUFFERDISPLAYLAYERRENDERER */