@@ -76,7 +76,7 @@ typedef struct _STREAM_CONFIGURATION {
7676
7777 // If specified, the client's display refresh rate x 100. For example,
7878 // 59.94 Hz would be specified as 5994. This is used by recent versions
79- // of GFE for enhanced frame pacing.
79+ // of GFE for enhanced frame pacing. Ignored by Sunshine.
8080 int clientRefreshRateX100 ;
8181
8282 // If specified, sets the encoder colorspace to the provided COLORSPACE_*
@@ -100,11 +100,23 @@ typedef struct _STREAM_CONFIGURATION {
100100 // in /launch and /resume requests.
101101 char remoteInputAesKey [16 ];
102102 char remoteInputAesIv [16 ];
103+
104+ // Fractional frame rate of the video stream (in the form of numerator
105+ // and denominator). Supported by recent versions of Sunshine.
106+ // The non-fractional frame rate still needs to be specified for backward
107+ // compatibility. LiConvertFloatingPointFrameRateToFraction() can be used for
108+ // converting floating-point frame rates to this representation.
109+ int fpsNum ;
110+ int fpsDen ;
103111} STREAM_CONFIGURATION , * PSTREAM_CONFIGURATION ;
104112
105113// Use this function to zero the stream configuration when allocated on the stack or heap
106114void LiInitializeStreamConfiguration (PSTREAM_CONFIGURATION streamConfig );
107115
116+ // Use this function to convert floating-point frame rates to fractional frame
117+ // rates (in the form of numerator and denominator) while trying to maximize precision.
118+ void LiConvertFloatingPointFrameRateToFraction (double value , int * outNum , int * outDen );
119+
108120// These identify codec configuration data in the buffer lists
109121// of frames identified as IDR frames for H.264 and HEVC formats.
110122// For other codecs, all data is marked as BUFFER_TYPE_PICDATA.
0 commit comments