scrcpy/server
Romain Vimont 00e4800b0c Add session metadata for video stream
Introduce a new packet type, a "session" packet, containing metadata
about the encoding session. It is used only for the video stream,
and currently includes the video resolution.

For illustration, here is a sequence of packets on the video stream:

                                        device rotation
                                        v
    CODEC | SESSION | MEDIA | MEDIA | … | SESSION | MEDIA | MEDIA | …
           1920x1080 <-----------------> 1080x1920 <------------------
                      encoding session 1            encoding session 2

This metadata is not strictly necessary, since the video resolution can
be determined after decoding. However, it allows detection of cases
where the encoder does not respect the requested size (and logs a
warning), even without decoding (e.g., when there is no video playback).

Additional metadata could be added later if necessary, for example the
actual device rotation.

Refs #5918 <https://github.com/Genymobile/scrcpy/pull/5918>
Refs #5894 <https://github.com/Genymobile/scrcpy/pull/5894>

Co-authored-by: gz0119 <liyong2@4399.com>
2025-11-28 22:44:12 +01:00
..
scripts Use "/usr/bin/env bash" for build-wrapper.sh 2020-09-15 13:44:02 +02:00
src Add session metadata for video stream 2025-11-28 22:44:12 +01:00
.gitignore Convert server to an Android project 2018-01-30 12:01:36 +01:00
build.gradle Upgrade Gradle and use Android SDK 36 2025-10-19 21:00:05 +02:00
build_without_gradle.sh Fix handling of non-integer ANDROID_PLATFORM 2025-10-19 21:00:05 +02:00
meson.build Set icon and server env paths for meson devenv 2024-12-12 18:15:26 +01:00
proguard-rules.pro Convert server to an Android project 2018-01-30 12:01:36 +01:00