No description
Find a file
Andy Grundman 82ee2d6590 Improve support for high-resolution stats
* This patch adds a new microsecond-resolution function call, LiGetMicroseconds(), to complement
the existing LiGetMillis(). Many variables used by stats have been updated to work at this
higher resolution and now provide better results when displaying e.g. sub-millisecond frametime stats.
To try and avoid confusion, variables that now contain microseconds have been renamed with a suffix
of 'Us', and those ending in 'Ms' contain milliseconds. I originally experimented with nanoseconds but it
felt like overkill for our needs.

Public API in Limelight.h:
uint64_t LiGetMicroseconds(void);
uint64_t LiGetMillis(void);
const RTP_AUDIO_STATS* LiGetRTPAudioStats(void);  // provides access to RTP data for the overlay stats
const RTP_VIDEO_STATS* LiGetRTPVideoStats(void);

Note: Users of this library may need to make changes. If using LiGetMillis() to track the duration of
something that is shown to the user, consider switching to LiGetMicroseconds(). Remember to divide by
1000 at time of display to show in milliseconds.
2025-11-06 20:27:01 -06:00
.github Create dependabot.yml 2025-07-05 18:53:47 -05:00
cmake Behavior changes to CMakeLists.txt 2021-04-29 17:40:47 -05:00
enet@115a10baa1 Bump enet from 44c85e1 to 115a10b 2025-07-05 18:57:52 -05:00
reedsolomon Fix Clang warnings 2020-12-05 23:20:02 -06:00
src Improve support for high-resolution stats 2025-11-06 20:27:01 -06:00
.gitignore Improve support for high-resolution stats 2025-11-06 20:27:01 -06:00
.gitmodules Change to our modified ENet fork 2016-03-06 15:29:02 -08:00
CMakeLists.txt Improve support for high-resolution stats 2025-11-06 20:27:01 -06:00
LICENSE.txt Add missing license 2017-05-10 10:13:06 -07:00
README.md Update readme with new URL 2018-12-03 21:37:11 -08:00

Moonlight Streaming Core Library

Moonlight-common-c contains the core GameStream client code shared between Moonlight clients, including Moonlight PC, Moonlight Android, Moonlight iOS, and Moonlight Chrome.

If you are implementing your own Moonlight game streaming client that can use a C library, you probably want the code here.

Note to Developers

Moonlight-common-c requires the specific version of ENet that is bundled as a submodule. This version has changes required for IPv6 compatibility and retransmission reliability, among other things. These are breaking API/ABI changes which make Moonlight-common-c incompatible with other versions of the ENet library. Attempting to runtime link to another libenet library will cause your client to crash when connecting to recent versions of GeForce Experience.