scrcpy/server
Romain Vimont 1c82c3923d Compute relative PTS on the client-side
The PTS received from MediaCodec are expressed relative to an arbitrary
clock origin. We consider the PTS of the first frame to be 0, and the
PTS of every other frame is relative to this first PTS (note that the
PTS is only used for recording, it is ignored for mirroring).

For simplicity, this relative PTS was computed on the server-side.

To prepare support for multiple stream (video and audio), send the
packet with its original PTS, and handle the PTS offset on the
client-side (by the recorder).

Since we can't know in advance which stream will produce the first
packet with the lowest PTS (a packet received later on one stream may
have a PTS lower than a packet received earlier on another stream),
computing the PTS on the server-side would require unnecessary waiting.
2023-02-03 12:31:28 +01:00
..
scripts Use "/usr/bin/env bash" for build-wrapper.sh 2020-09-15 13:44:02 +02:00
src Compute relative PTS on the client-side 2023-02-03 12:31:28 +01:00
.gitignore
build_without_gradle.sh Support Java lambdas in build_without_gradle.sh 2023-01-27 22:08:25 +01:00
build.gradle Bump version to 1.25 2022-12-22 12:33:29 +01:00
meson.build Remove deprecated meson.source_root() 2022-08-28 15:16:31 +02:00
proguard-rules.pro