Compare commits
4 Commits
v1.25
...
packet_ref
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
886781e115 | ||
|
|
d8c2fe6ef2 | ||
|
|
54c7baceac | ||
|
|
4c43784fd1 |
6
BUILD.md
6
BUILD.md
@@ -272,10 +272,10 @@ install` must be run as root)._
|
|||||||
|
|
||||||
#### Option 2: Use prebuilt server
|
#### Option 2: Use prebuilt server
|
||||||
|
|
||||||
- [`scrcpy-server-v1.24`][direct-scrcpy-server]
|
- [`scrcpy-server-v1.25`][direct-scrcpy-server]
|
||||||
<sub>SHA-256: `ae74a81ea79c0dc7250e586627c278c0a9a8c5de46c9fb5c38c167fb1a36f056`</sub>
|
<sub>SHA-256: `ce0306c7bbd06ae72f6d06f7ec0ee33774995a65de71e0a83813ecb67aec9bdb`</sub>
|
||||||
|
|
||||||
[direct-scrcpy-server]: https://github.com/Genymobile/scrcpy/releases/download/v1.24/scrcpy-server-v1.24
|
[direct-scrcpy-server]: https://github.com/Genymobile/scrcpy/releases/download/v1.25/scrcpy-server-v1.25
|
||||||
|
|
||||||
Download the prebuilt server somewhere, and specify its path during the Meson
|
Download the prebuilt server somewhere, and specify its path during the Meson
|
||||||
configuration:
|
configuration:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# scrcpy (v1.24)
|
# scrcpy (v1.25)
|
||||||
|
|
||||||
<img src="app/data/icon.svg" width="128" height="128" alt="scrcpy" align="right" />
|
<img src="app/data/icon.svg" width="128" height="128" alt="scrcpy" align="right" />
|
||||||
|
|
||||||
@@ -106,10 +106,10 @@ process][BUILD_simple]).
|
|||||||
For Windows, a prebuilt archive with all the dependencies (including `adb`) is
|
For Windows, a prebuilt archive with all the dependencies (including `adb`) is
|
||||||
available:
|
available:
|
||||||
|
|
||||||
- [`scrcpy-win64-v1.24.zip`][direct-win64]
|
- [`scrcpy-win64-v1.25.zip`][direct-win64]
|
||||||
<sub>SHA-256: `6ccb64cba0a3e75715e85a188daeb4f306a1985f8ce123eba92ba74fc9b27367`</sub>
|
<sub>SHA-256: `db65125e9c65acd00359efb7cea9c05f63cc7ccd5833000cd243cc92f5053028`</sub>
|
||||||
|
|
||||||
[direct-win64]: https://github.com/Genymobile/scrcpy/releases/download/v1.24/scrcpy-win64-v1.24.zip
|
[direct-win64]: https://github.com/Genymobile/scrcpy/releases/download/v1.25/scrcpy-win64-v1.25.zip
|
||||||
|
|
||||||
It is also available in [Chocolatey]:
|
It is also available in [Chocolatey]:
|
||||||
|
|
||||||
|
|||||||
@@ -95,29 +95,27 @@ sc_demuxer_push_packet(struct sc_demuxer *demuxer, AVPacket *packet) {
|
|||||||
// A config packet must not be decoded immediately (it contains no
|
// A config packet must not be decoded immediately (it contains no
|
||||||
// frame); instead, it must be concatenated with the future data packet.
|
// frame); instead, it must be concatenated with the future data packet.
|
||||||
if (demuxer->pending || is_config) {
|
if (demuxer->pending || is_config) {
|
||||||
size_t offset;
|
|
||||||
if (demuxer->pending) {
|
if (demuxer->pending) {
|
||||||
offset = demuxer->pending->size;
|
size_t offset = demuxer->pending->size;
|
||||||
if (av_grow_packet(demuxer->pending, packet->size)) {
|
if (av_grow_packet(demuxer->pending, packet->size)) {
|
||||||
LOG_OOM();
|
LOG_OOM();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memcpy(demuxer->pending->data + offset, packet->data, packet->size);
|
||||||
} else {
|
} else {
|
||||||
offset = 0;
|
|
||||||
demuxer->pending = av_packet_alloc();
|
demuxer->pending = av_packet_alloc();
|
||||||
if (!demuxer->pending) {
|
if (!demuxer->pending) {
|
||||||
LOG_OOM();
|
LOG_OOM();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (av_new_packet(demuxer->pending, packet->size)) {
|
if (av_packet_ref(demuxer->pending, packet)) {
|
||||||
LOG_OOM();
|
LOG_OOM();
|
||||||
av_packet_free(&demuxer->pending);
|
av_packet_free(&demuxer->pending);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(demuxer->pending->data + offset, packet->data, packet->size);
|
|
||||||
|
|
||||||
if (!is_config) {
|
if (!is_config) {
|
||||||
// prepare the concat packet to send to the decoder
|
// prepare the concat packet to send to the decoder
|
||||||
demuxer->pending->pts = packet->pts;
|
demuxer->pending->pts = packet->pts;
|
||||||
|
|||||||
@@ -306,14 +306,13 @@ sc_screen_render(struct sc_screen *screen, bool update_content_rect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__) || defined(__WINDOWS__)
|
||||||
# define CONTINUOUS_RESIZING_WORKAROUND
|
# define CONTINUOUS_RESIZING_WORKAROUND
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONTINUOUS_RESIZING_WORKAROUND
|
#ifdef CONTINUOUS_RESIZING_WORKAROUND
|
||||||
// On Windows and MacOS, resizing blocks the event loop, so resizing events are
|
// On Windows and MacOS, resizing blocks the event loop, so resizing events are
|
||||||
// not triggered. On MacOS, as a workaround, handle them in an event handler
|
// not triggered. As a workaround, handle them in an event handler.
|
||||||
// (it does not work for Windows unfortunately).
|
|
||||||
//
|
//
|
||||||
// <https://bugzilla.libsdl.org/show_bug.cgi?id=2077>
|
// <https://bugzilla.libsdl.org/show_bug.cgi?id=2077>
|
||||||
// <https://stackoverflow.com/a/40693139/1987178>
|
// <https://stackoverflow.com/a/40693139/1987178>
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
BUILDDIR=build-auto
|
BUILDDIR=build-auto
|
||||||
PREBUILT_SERVER_URL=https://github.com/Genymobile/scrcpy/releases/download/v1.24/scrcpy-server-v1.24
|
PREBUILT_SERVER_URL=https://github.com/Genymobile/scrcpy/releases/download/v1.25/scrcpy-server-v1.25
|
||||||
PREBUILT_SERVER_SHA256=ae74a81ea79c0dc7250e586627c278c0a9a8c5de46c9fb5c38c167fb1a36f056
|
PREBUILT_SERVER_SHA256=ce0306c7bbd06ae72f6d06f7ec0ee33774995a65de71e0a83813ecb67aec9bdb
|
||||||
|
|
||||||
echo "[scrcpy] Downloading prebuilt server..."
|
echo "[scrcpy] Downloading prebuilt server..."
|
||||||
wget "$PREBUILT_SERVER_URL" -O scrcpy-server
|
wget "$PREBUILT_SERVER_URL" -O scrcpy-server
|
||||||
@@ -12,7 +12,7 @@ echo "$PREBUILT_SERVER_SHA256 scrcpy-server" | sha256sum --check
|
|||||||
|
|
||||||
echo "[scrcpy] Building client..."
|
echo "[scrcpy] Building client..."
|
||||||
rm -rf "$BUILDDIR"
|
rm -rf "$BUILDDIR"
|
||||||
meson "$BUILDDIR" --buildtype=release --strip -Db_lto=true \
|
meson setup "$BUILDDIR" --buildtype=release --strip -Db_lto=true \
|
||||||
-Dprebuilt_server=scrcpy-server
|
-Dprebuilt_server=scrcpy-server
|
||||||
cd "$BUILDDIR"
|
cd "$BUILDDIR"
|
||||||
ninja
|
ninja
|
||||||
|
|||||||
Reference in New Issue
Block a user