Commit Graph

613 Commits (9a50b65b338699ab6f0916712cda806353127434)
 

Author SHA1 Message Date
Romain Vimont 9a50b65b33
Merge pull request #695 from schwabe/schwabe/fix_null_queue
Fix building on OS X (missing NULL in queue.h)
5 years ago
Arne Schwabe c05056343b Fix building on OS X (missing NULL in queue.h)
Headers seem to be a bit different in Apple land and you need to include
stddef.h explicitly to the NULL declaration.

This also makes the code a bit more correct, as stddef.h is the header
in the C standard that defines NULL
(https://en.cppreference.com/w/cpp/header/cstddef).
5 years ago
Romain Vimont 9bcee4ea42 Update links to v1.10 in README and BUILD 5 years ago
Romain Vimont c28619e4e8 Bump version to 1.10 5 years ago
Romain Vimont 8969444ff2 List scrcpy characteristics in README
They were listed in the blog post introducing scrcpy:
<https://blog.rom1v.com/2018/03/introducing-scrcpy/>
5 years ago
Romain Vimont b54f0bfe48 Upgrade SDL (2.0.10) for Windows
Include the latest version of SDL in Windows releases.
5 years ago
Romain Vimont 0aec1e502e Update platform-tools (29.0.2) for Windows
Include the latest version of adb in Windows releases.
5 years ago
Romain Vimont c3a58ad10f Upgrade FFmpeg (4.1.4) for Windows
Include the latest version of FFmpeg in Windows releases.
5 years ago
Romain Vimont b0184f2869 Initialize queue "last" field
The compiler is not always able to see that "last" is always initialized
before being used, so always initialize it.
5 years ago
Romain Vimont e2ac996183 Use Cmd instead of Ctrl on macOS when possible
Fixes <https://github.com/Genymobile/scrcpy/issues/642>
5 years ago
Romain Vimont 5e4ccfd832 Use generic FIFO queue for recording
Replace the specific recording queue by the new generic FIFO queue
implementation.
5 years ago
Romain Vimont 53b6ee2cf4 Add generic intrusive FIFO queue
We need several FIFO queues (a queue of packets, a queue of messages,
etc.).

Some of them are implemented using cbuf, a generic circular buffer. But
for recording, we need to store the packets in an unbounded queue until
they are written, so the queue was implemented manually.

Create a generic implementation (using macros) to avoid reimplementing
it every time.
5 years ago
Romain Vimont 26213f1031 Fix cbuf documentation 5 years ago
Romain Vimont 96b5067cbf Remove unnecessary backslash in cbuf 5 years ago
Romain Vimont 421e4be399 Remove root directory from Windows zip releases
Put the scrcpy files at the root of the zip archive. This avoids an
unnecessary level of directories when extracting.
5 years ago
Romain Vimont 6abb4902c6 Log recording failure
If recording fails, log "recording failed" instead of "recording
complete".
5 years ago
Romain Vimont d4ed8b6f26 Log scrcpy version and URL on start
Keep --version which also print the version of dependencies.
5 years ago
Romain Vimont 35d9185f6c Record asynchronously
The record file was written from the stream thread. As a consequence,
any blocking I/O to write the file delayed the decoder.

For maximum performance even when recording is enabled, send
(refcounted) packets to a separate recording thread.
5 years ago
Romain Vimont 63af7fbafe Reduce latency by 1 frame
To packetize the H.264 raw stream, av_parser_parse2() (called by
av_read_frame()) knows that it has received a full frame only after it
has received some data for the next frame. As a consequence, the client
always waited until the next frame before sending the current frame to
the decoder!

On the device side, we know packets boundaries. To reduce latency,
make the device always transmit the "frame meta" to packetize the stream
manually (it was already implemented to send PTS, but only enabled on
recording).

On the client side, replace av_read_frame() by manual packetizing and
parsing.

<https://stackoverflow.com/questions/50682518/replacing-av-read-frame-to-reduce-delay>
<https://trac.ffmpeg.org/ticket/3354>
5 years ago
Romain Vimont a90ccbdf3b Add option to change the push target
A drag & drop always pushed the file to /sdcard/.

Add an option to customize the target directory.

Fixes <https://github.com/Genymobile/scrcpy/issues/659>
5 years ago
Romain Vimont ca970e8aa6 Merge branch 'master' into dev 5 years ago
Romain Vimont 6b3d9e3eab Add unit test for device message serialization
There was a test for the deserialization, but not for the serialization.
5 years ago
Romain Vimont 02692ffa42 Rename "build_" to "compile_"
Recent versions of meson complain about an option having name starting
with "build_":

> DEPRECATION: Option uses prefix "build_", which is reserved for Meson.
> This will become an error in the future.

Use "compile_" instead.
5 years ago
Jonathan 3b69463e61 Update README.md
Signed-off-by: Romain Vimont <rom@rom1v.com>
5 years ago
Romain Vimont 9dea6d2384 Add me as copyright owner 5 years ago
Romain Vimont 3c55d0c69b Fix double-free on error
If writing the recording header fails, do not clean the resources
immediately to avoid double-free.
5 years ago
Romain Vimont 4961256123 Close decoder on stream ended
Add missing call to decoder_close().
5 years ago
Romain Vimont e4ac943d86 Document --window-title in README 5 years ago
Romain Vimont 4b997239f3 Merge pull request #614 from beango1:window-title-simple
add option window-title to set the title
5 years ago
beango1 8e65c10720 Add option --window-title
Add an option to set a custom window title.

Signed-off-by: Romain Vimont <rom@rom1v.com>
5 years ago
Romain Vimont 056e47e752 Replace "cannot" by "could not" 5 years ago
Romain Vimont 439b009a79 Fix expected parameters count in error message 5 years ago
Romain Vimont 91ecb4f218 Close socket on error
Suggested-by: barry-ran

<https://github.com/Genymobile/scrcpy/issues/607>
5 years ago
Romain Vimont bfb3f0842f Prevent to turn screen off if no control
If --no-control is set, then the controller is not initialized (both in
the client and the server), so it is not possible to control the device
to turn its screen off.

See <https://github.com/Genymobile/scrcpy/issues/608>.
5 years ago
Romain Vimont 87d7a157a9 Reference USBaudio from README 5 years ago
Romain Vimont b91ecf5225 Fix --serial help
Make explicit that --serial excepts a parameter.
5 years ago
Romain Vimont 1807de4955 Merge pull request #595 from taaem/fix_build_fedora
The Java JDK is needed to build the server
5 years ago
taaem 0a233fd27f Fix required java package for Fedora
The Java JDK is needed to build the server. The relevant Fedora package
is java-devel, not java.

Signed-off-by: Romain Vimont <rom@rom1v.com>
5 years ago
Romain Vimont 4940746bcb Remove useless else
The if-block ends with a return.
5 years ago
Romain Vimont fe758e6e15 Improve comment
Rephrase to simplify and add a link to the issue.
5 years ago
Romain Vimont b29a568f08
Merge pull request #587 from schwabe/fix_586_screen_off_qbeta
Use getPhysicalDisplayToken if getBuiltInDisplay is not found
5 years ago
Arne Schwabe b769083a5b Use getPhysicalDisplayToken on Anroid Q+ instead of getBuiltInDisplay
This makes the -S (screen off) parameter work on Android Q beta 4

Closes #586
5 years ago
Romain Vimont 8ca36406b9 Remove compilation flag "skip_frames"
It is unused since ebccb9f6cc.
5 years ago
Romain Vimont 53310a925a Disable portable build by default
The default value of a boolean meson option is true. We want
non-portable build by default.
5 years ago
Romain Vimont 0cb902d58b Merge pull request #587 from zzndb/patch-1 5 years ago
zzndb bcd0a876f7 Fix a spell mistake
After commented default portable option in `app/meson.build` get some
error and then find this. :)

Signed-off-by: Romain Vimont <rom@rom1v.com>
5 years ago
Romain Vimont de2016a48e Add link to Snap package in README
<https://github.com/Genymobile/scrcpy/issues/523>
5 years ago
Romain Vimont 19ca6a0d66 Fix typo in README 5 years ago
Romain Vimont e2996e85c0 Update links to v1.9 in README and BUILD 5 years ago
Romain Vimont c2df0228a3 Merge branch 'dev' 5 years ago