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
45 lines
721 B
Objective-C
45 lines
721 B
Objective-C
//
|
|
// Capturer.m
|
|
// CoreMediaMacCapture
|
|
//
|
|
// Created by Mikhail Filimonov on 21.06.2021.
|
|
//
|
|
|
|
#import "TGCMIOCapturer.h"
|
|
#import "TGCMIODevice.h"
|
|
|
|
@interface TGCMIOCapturer ()
|
|
|
|
@end
|
|
|
|
@implementation TGCMIOCapturer
|
|
{
|
|
AVCaptureDevice * _captureDevice;
|
|
TGCMIODevice * _device;
|
|
}
|
|
-(id)initWithDeviceId:(AVCaptureDevice *)device {
|
|
if (self = [super init]) {
|
|
_captureDevice = device;
|
|
|
|
}
|
|
return self;
|
|
}
|
|
|
|
-(void)start:(renderBlock)renderBlock {
|
|
_device = [TGCMIODevice FindDeviceByUniqueId:_captureDevice];
|
|
|
|
[_device run:^(CMSampleBufferRef sampleBuffer) {
|
|
renderBlock(sampleBuffer);
|
|
}];
|
|
|
|
|
|
}
|
|
-(void)stop {
|
|
[_device stop];
|
|
}
|
|
|
|
-(void)dealloc {
|
|
|
|
}
|
|
|
|
@end
|