Reformat Metal files Rewrite Metal render loop to not use DisplayLink so we can use the amazing afterMinimumDuration API call Improve frame drop algorithm Misc fixes to HDR <-> SDR switching, deprecation warning cleanup Fix AVSB mode Fix renderingBackend selected value Add Rendering Backend setting to iPhone Let users choose which renderer to use. Refactor metrics into a singleton Fix tvOS build Port moonlight-qt's Metal renderer Bump imgui to latest Misc tweaks and refactoring Switch iOS to use Opus float32 audio, in line with other clients. It was already being sent from the server as float32, so this is simply decoding it with less loss of dynamic range. Give FrameQueue a faster data structure and full test coverage. Remove pts frame pacing, it's not a fit for iOS. Don't allow very transparent opacity for middle stats overlay box Change wording to select button instead of remote button Add tvOS gesture for double-clicking remote button to show/hide stats Remove kVTDecodeFrame_1xRealTimePlayback, this was found to seriously impact decode times Move decode time stat out of async block Enabe FQ logging Misc cleanup/fixes iPad: 26 will require UIRequiresFullScreen to be false, and for all orientations to be supported Updated iPhone and iPad settings panels Add setting for graph opacity. Enable stats and graphs to be toggled via two finger swipe Fix wait time in displaylink, fix settings spacing, stats fixes Settings for frame queue size, graphs. Misc refactoring and cleanup Bump moonlight-common-c Improve logging readability Fix host frametime and frame queue stats to be recorded during input not output. Show min/max/avg decode time Add bytes per frame graph Started on settings changes, both modes working very well Misc refactoring, move graphs around, both pacing functions working well Set frameDropTarget to 2 always Use raw RTP timestamps without converting to floating point for even more accurate playback Standard frame pacing: remove +3 logic Switch to NSRunLoopCommonModes for displayLink Add frame pacing algorithm based on moonlight-qt's Pacer class as a simpler baseline Switch to os_unfair_lock, misc tweaks Large refactor that now uses VTDecompressionSession based on PR535 from felipejfc. This now allows more control over queue size and allows dropping arbitrary frames, but introduces a lot of new problems bump moonlight-common-c to fix 32-bit rollover issue LiWait timing graph Add displaylink interval graph Graphs checkpoint ImGui graph working checkpoint ImGui working checkpoint Add pending frames to stats, add a define for verbose logging DisplayLink WIP Add imgui & implot modules Frame pacing: alternate method based on thieman's pullFrames thread Frame pacing: simplify displayLink, support passing targetTimestamp down to the sample buffer Point to my common-c with some timing changes. Add stats gestures: 2-finger swipe down to show stats, and 2-finger swipe up to hide Limit refresh rate to 60 when in low power mode Display screen refresh rate in stats overlay, remove decode time and explain why it can't be measured Adjust the refresh rate of the display to match the stream framerate and improve battery life Don't use presentationTimeMs when creating CMSampleTimingInfo Fix overlayView build for iOS Refactor CADisplayLink callback for improved frame delivery. Support a user-configurable buffered frame count. [opt] Use UILabel for stats overlay
37 lines
1.3 KiB
Objective-C
37 lines
1.3 KiB
Objective-C
#import <Foundation/Foundation.h>
|
|
#import <Metal/Metal.h>
|
|
#import <MetalKit/MetalKit.h>
|
|
#import <UIKit/UIKit.h>
|
|
|
|
#import "FloatBuffer.h"
|
|
#import "Plot.h"
|
|
|
|
typedef void (^MetricsHandler)(int plotId, CFTimeInterval value);
|
|
|
|
@interface ImGuiRenderer : UIViewController
|
|
@end
|
|
|
|
@interface ImGuiRenderer () <MTKViewDelegate>
|
|
@property (nonatomic) CGRect bounds;
|
|
@property (nonatomic, readonly) MTKView * _Nonnull mtkView;
|
|
@property (nonatomic, strong) id <MTLDevice> _Nonnull device;
|
|
@property (nonatomic, strong) id <MTLCommandQueue> _Nonnull commandQueue;
|
|
@property (nonatomic) struct PlotDef * _Nonnull plots;
|
|
@property (nonatomic) FloatBuffer * _Nonnull frametimes;
|
|
@property (nonatomic) BOOL enableGraphs;
|
|
@property (nonatomic) float graphOpacity;
|
|
@property (nonatomic) BOOL imguiRunning;
|
|
@property (nonatomic) MetricsHandler _Nonnull metricsHandler;
|
|
|
|
-(nonnull instancetype) initWithFrame:(CGRect)bounds
|
|
streamFps:(int)streamFps
|
|
enableGraphs:(BOOL)enableGraphs
|
|
graphOpacity:(int)graphOpacity;
|
|
-(void) start;
|
|
-(void) show;
|
|
-(void) hide;
|
|
-(void) stop;
|
|
-(void) observeFloat:(int)plotId value:(CFTimeInterval)value;
|
|
-(void) observeFloatReturnMetrics:(int)plotId value:(CFTimeInterval)value plotMetrics:(PlotMetrics * _Nullable)plotMetrics;
|
|
@end
|