Romain Vimont
4ad7479425
Add missing shortcut in documentation
...
MOD+Backspace also triggers BACK.
2023-06-08 08:52:21 +02:00
Marek Madejski
958f22490b
Document installation via winget on Windows
...
PR #4005 <https://github.com/Genymobile/scrcpy/pull/4005 >
Refs #1444 <https://github.com/Genymobile/scrcpy/issues/1444 >
Refs #3932 <https://github.com/Genymobile/scrcpy/issues/3932 >
Signed-off-by: Romain Vimont <rom@rom1v.com >
2023-05-17 19:36:39 +02:00
parknich081
cb20bcb16f
Clarify API versions that support Audio Forwarding
...
Reword the supported API versions for audio forwarding sentence to
clarify that it supports API >= 30
PR #3949 <https://github.com/Genymobile/scrcpy/pull/3949 >
Signed-off-by: Romain Vimont <rom@rom1v.com >
2023-04-26 19:33:28 +02:00
Romain Vimont
8f0b38cc4f
Specify in README that OTG does not require adb
2023-03-31 07:55:13 +02:00
Romain Vimont
a1e8a34001
Fix documentation link in FAQ
2023-03-28 08:32:07 +02:00
Romain Vimont
00534b0b2d
Fix typo in FAQ
2023-03-28 08:31:01 +02:00
Romain Vimont
21df2c240e
Mention necessary reboot
...
After setting "USB debugging (security settings)", a reboot is
necessary.
2023-03-23 19:06:44 +01:00
Romain Vimont
2d3059e1ab
Reference FAQ from HID/OTG documentation
...
Reference the FAQ section about "HID/OTG issues on Windows" from the
HID/OTG documentation.
2023-03-20 19:42:23 +01:00
Romain Vimont
478aece68f
Replace "bit-rate" with "bit rate"
2023-03-20 08:35:13 +01:00
NextDev65
55899c091e
Fix typo in doc/audio.md
...
The documentation is about audio bit rate, not video bit rate.
PR #3839 <https://github.com/Genymobile/scrcpy/pull/3839 >
Signed-off-by: Romain Vimont <rom@rom1v.com >
2023-03-20 08:32:58 +01:00
Romain Vimont
d9a644df9c
Clarify V4L2 feature in README
...
The previous formulation could suggest that the device camera could be
used as a webcam. This is not the case (yet?).
2023-03-15 10:46:36 +01:00
Romain Vimont
45717733a1
Document missing Opus encoder error
...
And how to solve it.
2023-03-15 00:41:07 +01:00
Bernard Cafarelli
6ad037ea04
Update Gentoo instructions
...
scrcpy is available directly in the distro, drop link to the overlay
(which only contains older versions).
PR #3816 <https://github.com/Genymobile/scrcpy/pull/3816 >
Signed-off-by: Romain Vimont <rom@rom1v.com >
2023-03-14 22:03:21 +01:00
Romain Vimont
2eced46a37
Update broken link in documentation
...
The Android documentation has been updated.
2023-03-14 19:21:43 +01:00
Romain Vimont
1a80333747
Replace link to enable USB debugging in README
...
Link to a more relevant page in the official documentation to enable USB
debugging.
2023-03-13 10:19:22 +01:00
Romain Vimont
fb61b779a6
Add references to prerequisites
...
Users sometimes only read the OS-specific instructions, they must be
aware of the prerequisites.
2023-03-13 08:43:54 +01:00
Romain Vimont
5899af6a2f
Add blogpost link about scrcpy 2.0
2023-03-12 21:08:51 +01:00
Romain Vimont
cbca79b95b
Fix v4l2 sink
...
The codec id to write as codec parameters is the one from the v4l2
encoder, not from the decoder.
Regression introduced by be985b8242 .
Fixes #3795 <https://github.com/Genymobile/scrcpy/issues/3795 >
2023-03-12 12:45:49 +01:00
Romain Vimont
02586cf21f
Fix build issue on FFmpeg < 5.1
...
An include was missing.
Fixes #3783 <https://github.com/Genymobile/scrcpy/issues/3783 >
2023-03-12 08:54:42 +01:00
Romain Vimont
80a6fa7a01
Fix comparison warning
...
An int was compared with an unsigned:
../app/src/audio_player.c:290:27: warning: comparison of integers of
different signs: 'int' and 'unsigned int' [-Wsign-compare]
if (abs(diff) < ap->sample_rate / 1000) {
~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~
2023-03-12 08:37:08 +01:00
Ruoyu Zhong
6b769675fa
Fix an "expected expression" error
...
In C, a label can only be followed by a statement, not a declaration.
An error in `app/src/screen.c` violated this, and led to a build error
with an error message similar to the one below:
../app/src/screen.c:821:13: error: expected expression
bool ok = sc_screen_init_size(screen);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/stdbool.h:15:14: note: expanded from macro 'bool'
#define bool _Bool
^
../app/src/screen.c:822:18: error: use of undeclared identifier 'ok'
if (!ok) {
^
2 errors generated.
This could be fixed by introducing a new block (or compound statement;
as is already being done in the next `case`). That is a statement.
Fixes #3785 <https://github.com/Genymobile/scrcpy/issues/3785 >
PR #3787 <https://github.com/Genymobile/scrcpy/pull/3787 >
Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com >
Signed-off-by: Romain Vimont <rom@rom1v.com >
2023-03-12 08:26:17 +01:00
Romain Vimont
e5aa2ce01f
Fix broken link in Windows download page
2023-03-12 02:59:44 +01:00
Romain Vimont
cbc638c6ba
Fix broken link in shortcuts documentation
2023-03-12 02:50:10 +01:00
Romain Vimont
abc1be4872
Update links to v2.0
2023-03-12 02:49:28 +01:00
Romain Vimont
f1b2d6bbbb
Bump version to 2.0
v2.0
2023-03-12 02:05:37 +01:00
Romain Vimont
90926d40ad
Merge branch 'master' into dev
2023-03-12 02:05:24 +01:00
Romain Vimont
f12590ed08
Rework README and documentation
...
The README.md page is HUGE. Split it up.
Also document audio forwarding and improve installation instructions for
each platform and user documentation.
PR #3774 <https://github.com/Genymobile/scrcpy/pull/3774 >
2023-03-12 02:04:58 +01:00
Romain Vimont
05a55e3687
Happy new year 2023!
2023-03-12 02:04:58 +01:00
Romain Vimont
affda26bfa
Document audio player
...
Add some high-level documentation on the audio player implementation.
2023-03-12 02:04:58 +01:00
Romain Vimont
0bf866fa8d
Apply new compensation only if it changed
...
If the compensation is the same (typically when it is 0), do not reapply
it.
2023-03-12 02:04:58 +01:00
Romain Vimont
73727e7fdf
Disable clock drift compensation for tiny values
...
For less than 1ms, the estimated drift is just noise.
2023-03-12 02:04:58 +01:00
Romain Vimont
c22c87eded
Fail on deprecated options
...
Suggest the video and audio specific options instead.
2023-03-12 02:04:58 +01:00
Romain Vimont
426dfbf21d
Remove dead code about the deprecated -F option
...
The -F option was already removed.
2023-03-12 02:04:58 +01:00
Romain Vimont
5512777404
Remove deprecated option --render-expired-frames
...
This option did nothing since it was deprecated. Totally remove it.
2023-03-12 02:04:58 +01:00
Romain Vimont
cc07f8dac4
Upgrade platform-tools (34.0.1) for Windows
...
Include the latest version of adb in Windows releases.
2023-03-12 02:04:58 +01:00
Romain Vimont
f5bb9e576d
Upgrade SDL (2.26.4) for Windows
...
Include the latest version of SDL in Windows releases.
2023-03-12 02:04:58 +01:00
Romain Vimont
2380879376
Remove unused IOException
...
IOException may not be thrown from this method.
2023-03-12 02:04:58 +01:00
Romain Vimont
eca8766545
Compute buffering and compensation without lock
...
Once underflow has been read with a lock, the buffering and compensation
may be performed without shared variables.
2023-03-12 02:04:58 +01:00
Romain Vimont
0b8a5ca923
Do not read avg_buffering from the player thread
...
On buffer underflow, the average buffering must be updated, but it is
intended to be accessed only from the receiver thread.
Make the player and the receiver thread communicate the underflow via a
new field (ap->underflow).
2023-03-12 02:04:58 +01:00
Romain Vimont
e06acc1ba2
Simplify bytebuf naming
...
Rename read_available to can_read and write_available to can_write.
This is more readable.
2023-03-12 02:04:57 +01:00
Romain Vimont
14f9d82fda
Add audio sample ring-buffer
...
Add a thin wrapper around bytebuf to handle samples instead of bytes.
This simplifies the audio player, which mostly handles samples.
2023-03-12 02:04:07 +01:00
Romain Vimont
bb509d9317
Define the audio output buffer in milliseconds
...
In theory, this buffer must be dimensioned for a target duration, so its
size in bytes should depend on the sample rate.
2023-03-11 15:57:25 +01:00
Romain Vimont
238ab872ba
Pass video size as codec metadata
...
On initial connection, scrcpy sent some device metadata:
- the device name (to be used as window title)
- the initial video size (before any frame or even SPS/PPS)
But it is better to provide the initial video size as part as the video
stream, so that it can be demuxed and exposed via AVCodecContext to
sinks.
This avoids to pass an explicit "initial frame size" for the screen, the
recorder and the v4l2 sink.
2023-03-11 15:57:25 +01:00
Romain Vimont
3a72f3fb4d
Report errors on screen event error
...
Make scrcpy fail if an important screen event (like frame update) fails.
2023-03-11 15:57:25 +01:00
Romain Vimont
aa1efbc35c
Rename sendCodecId to sendCodecMeta
...
This will allow the codec header to contain more than the codec id.
2023-03-11 15:57:25 +01:00
Romain Vimont
be985b8242
Copy codec parameters from context
...
Now that the recorder have access to the codec context, it may
automatically initialize the stream codec parameters.
The V4L2 sink could do the same.
2023-03-11 15:57:25 +01:00
Romain Vimont
a9f6001f51
Simplify recorder
...
After the refactor performed by the previous commit, the functions to
wait the video stream and the audio stream could be inlined.
2023-03-11 15:57:25 +01:00
Romain Vimont
5052e15f7f
Create recorder streams from packet sinks ops
...
Previously, the packet sink push() implementation just set the codec and
notified a wait condition. Then the recorder thread read the codec and
created the AVStream.
But this was racy: an AVFrame could be pushed before the creation of the
AVStream, causing its video_stream_index or audio_stream_index to be
initialized to -1.
Also, in the future, the AVStream initialization might need data
provided by the packet sink open(), so initialize it there (with a
mutex).
2023-03-11 15:57:25 +01:00
Romain Vimont
4bdf632dfa
Pass AVCodecContext to packet sinks
...
Create the codec context from the demuxer, so that it can fill context
data for the decoder and recorder.
2023-03-11 15:57:25 +01:00
Romain Vimont
4db50ddbb7
Enable log signaling buffering threshold exceeded
...
It is as important as underflow logs.
2023-03-11 15:55:44 +01:00