2014-08-31 13:13:46 -04:00
|
|
|
//
|
|
|
|
|
// Connection.h
|
2015-05-12 21:48:30 -04:00
|
|
|
// Moonlight
|
2014-08-31 13:13:46 -04:00
|
|
|
//
|
|
|
|
|
// Created by Diego Waxemberg on 1/19/14.
|
2015-05-12 21:48:30 -04:00
|
|
|
// Copyright (c) 2014 Moonlight Stream. All rights reserved.
|
2014-08-31 13:13:46 -04:00
|
|
|
//
|
|
|
|
|
|
2014-10-19 00:09:47 -04:00
|
|
|
#import "VideoDecoderRenderer.h"
|
2014-10-20 19:20:50 -04:00
|
|
|
#import "StreamConfiguration.h"
|
2014-08-31 13:13:46 -04:00
|
|
|
|
2020-08-10 22:56:47 -07:00
|
|
|
#define CONN_TEST_SERVER "ios.conntest.moonlight-stream.org"
|
|
|
|
|
|
2020-11-01 13:27:10 -06:00
|
|
|
typedef struct {
|
|
|
|
|
CFTimeInterval startTime;
|
|
|
|
|
CFTimeInterval endTime;
|
|
|
|
|
int totalFrames;
|
|
|
|
|
int receivedFrames;
|
|
|
|
|
int networkDroppedFrames;
|
2023-09-27 03:57:49 -05:00
|
|
|
int totalHostProcessingLatency;
|
|
|
|
|
int framesWithHostProcessingLatency;
|
|
|
|
|
int maxHostProcessingLatency;
|
|
|
|
|
int minHostProcessingLatency;
|
2020-11-01 13:27:10 -06:00
|
|
|
} video_stats_t;
|
|
|
|
|
|
2014-08-31 13:13:46 -04:00
|
|
|
@interface Connection : NSOperation <NSStreamDelegate>
|
|
|
|
|
|
2016-10-05 17:32:30 -07:00
|
|
|
-(id) initWithConfig:(StreamConfiguration*)config renderer:(VideoDecoderRenderer*)myRenderer connectionCallbacks:(id<ConnectionCallbacks>)callbacks;
|
2014-10-21 01:54:31 -04:00
|
|
|
-(void) terminate;
|
2014-08-31 13:13:46 -04:00
|
|
|
-(void) main;
|
2020-11-01 13:27:10 -06:00
|
|
|
-(BOOL) getVideoStats:(video_stats_t*)stats;
|
|
|
|
|
-(NSString*) getActiveCodecName;
|
2014-08-31 13:13:46 -04:00
|
|
|
|
|
|
|
|
@end
|