Commit Graph

775 Commits (cd69eb4a4fecf8167208399def4ef536b59c9d22)
 

Author SHA1 Message Date
Romain Vimont 9463850c24 Rename "convert.h" to "event_converter.h"
The filename gave no hint about what was converted.
5 years ago
Romain Vimont 6e38e0cbfe Rename variable names "event" to "msg"
Some variable names had not been renamed when "event" was renamed to
"message" (28980bbc90).
5 years ago
Romain Vimont 7040e8abc4 Fix control message reader test
The mouse event test actually tested a key event control message.
5 years ago
Romain Vimont da5b0ec0d5 Improve FAQ 5 years ago
Romain Vimont a9c8fa305d Fix segfault on recording with old FFmpeg
The AVPacket fields side_data and side_data_elems were not initialized
by av_packet_ref() in old FFmpeg versions (prior to [1]).

As a consequence, on av_packet_unref(), side_data was freed, causing a
segfault.

Fixes <https://github.com/Genymobile/scrcpy/issues/707>

[1]: <http://git.videolan.org/gitweb.cgi/ffmpeg.git/?p=ffmpeg.git;a=commitdiff;h=3b4026e15110547892d5d770b6b43c9e34df458f>
5 years ago
Romain Vimont 20b3f101a4 Print gradle output on compiling
Enable the attribute "console" of custom_target() introduced in meson
0.48. This allows to get a feedback of what gradle does (which can takes
a very long time).

This produces warnings because we declare to support meson >= 0.37, but
we don't want to stop supporting older versions for that. Older versions
just ignore the option:

> WARNING: Unknown keyword arguments in target scrcpy-server: console

Newer meson versions use it, but warn because we declare supporting
older versions:

> WARNING: Project targetting '>= 0.37' but tried to use feature
> introduced in '0.48.0': console arg in custom_target

Meson does not support conditional branches to suppress such warnings,
so just keep the warnings.
5 years ago
Romain Vimont 686733023b
Merge pull request #708 from toddsierens/patch-1
Update WindowManager.java
5 years ago
toddsierens 27eacc3c11
Update WindowManager.java 5 years ago
Romain Vimont 8507fea271 Record a packet with its duration
Record a packet only once the following has been received, so that we
can set its duration before muxing it.

Fixes <https://github.com/Genymobile/scrcpy/issues/702>
5 years ago
Romain Vimont 8a08ca0f3d Merge pull request #692 from msfjarvis/msf/uprev-dependencies
Upgrade build dependencies
5 years ago
Harsh Shandilya 44fb692a64 Uprev Gradle wrapper to latest stable
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
5 years ago
Harsh Shandilya 3f77c29c95 Uprev AGP to latest stable
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
5 years ago
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