- 14 4月, 2021 24 次提交
-
-
由 Romain Vimont 提交于
The screen may not be destroyed immediately on close to avoid undefined behavior, because it may still receive events from the decoder. But the visual window must still be closed immediately.
-
由 Romain Vimont 提交于
The destruction order is important, but tricky, because the screen is open/close by the decoder, but destroyed by scrcpy.c on the main thread. Add assertions to guarantee that the screen is not destroyed before being closed.
-
由 Romain Vimont 提交于
Now that screen is both the owner and the listener of the video buffer, execute the code directly without callbacks.
-
由 Romain Vimont 提交于
The video buffer is now an internal detail of the screen component. Since the screen is plugged to the decoder via the frame sink trait, the decoder does not access to the video buffer anymore.
-
由 Romain Vimont 提交于
Now that screen implements the packet sink trait, make decoder push packets to the sinks without depending on the concrete sink types.
-
由 Romain Vimont 提交于
Make screen implement the frame sink trait. This will allow the decoder to push frames without depending on the concrete sink type.
-
由 Romain Vimont 提交于
This trait will allow to abstract the concrete sink types from the frame producer (decoder.c).
-
由 Romain Vimont 提交于
Now that decoder and recorder implement the packet sink trait, make stream push packets to the sinks without depending on the concrete sink types.
-
由 Romain Vimont 提交于
Make decoder implement the packet sink trait. This will allow the stream to push packets without depending on the concrete sink type.
-
由 Romain Vimont 提交于
This will make further commits more readable.
-
由 Romain Vimont 提交于
Make recorder implement the packet sink trait. This will allow the stream to push packets without depending on the concrete sink type.
-
由 Romain Vimont 提交于
The fact that the recorder uses a separate thread is an internal detail, so the functions _start(), _stop() and _join() should not be exposed. Instead, start the thread on _open() and _stop()+_join() on close(). This paves the way to expose the recorder as a packet sink trait.
-
由 Romain Vimont 提交于
This will make further commits more readable.
-
由 Romain Vimont 提交于
This trait will allow to abstract the concrete sink types from the packet producer (stream.c).
-
由 Romain Vimont 提交于
This will allow to get the parent of an embedded struct.
-
由 Romain Vimont 提交于
The video buffer took ownership of the producer frame (so that it could swap frames quickly). In order to support multiple sinks plugged to the decoder, the decoded frame must not be consumed by the display video buffer. Therefore, move the producer and consumer frames out of the video buffer, and use FFmpeg AVFrame refcounting to share ownership while avoiding copies.
-
由 Romain Vimont 提交于
The new API has been introduced in 2016 in libavformat 57.xx, it's very old. This will avoid to maintain two code paths for codec parameters.
-
由 Romain Vimont 提交于
The new API has been introduced in 2016 in libavcodec 57.xx, it's very old. This will avoid to maintain two code paths for decoding.
-
由 Romain Vimont 提交于
This flag forced the decoder to wait for the previous frame to be consumed by the display. It was initially implemented as a compilation flag for testing, not intended to be exposed at runtime. But to remove ifdefs and to allow users to test this flag easily, it had finally been exposed by commit ebccb9f6. In practice, it turned out to be useless: it had no practical impact, and it did not solve or mitigate any performance issues causing frame skipping. But that added some complexity to the codebase: it required an additional condition variable, and made video buffer calls possibly blocking, which in turn required code to interrupt it on exit. To prepare support for multiple sinks plugged to the decoder (display and v4l2 for example), the blocking call used for pacing the decoder output becomes unacceptable, so just remove this useless "feature".
-
由 Romain Vimont 提交于
The recorder thread wrote the whole content except the trailer, which was odd.
-
由 Romain Vimont 提交于
The event is handled by scrcpy.c, it is not necessary to send it to screen or input_manager.
-
由 Romain Vimont 提交于
-
由 Romain Vimont 提交于
-
由 Romain Vimont 提交于
It is only used from screen.c now.
-
- 11 4月, 2021 6 次提交
-
-
由 Romain Vimont 提交于
The screen receives callbacks from the decoder, fed by the stream. The decoder is run from the stream thread, so waiting for the end of stream is sufficient to avoid possible use-after-destroy.
-
由 Romain Vimont 提交于
When --no-display was passed, screen_destroy() was called while screen_init() was never called. In practice, it did not crash because it just freed NULL pointers, but it was still incorrect.
-
由 Romain Vimont 提交于
-
由 Romain Vimont 提交于
-
由 Romain Vimont 提交于
-
由 Romain Vimont 提交于
-
- 06 4月, 2021 1 次提交
-
-
由 Romain Vimont 提交于
Commits cb9c42bd and 441d3fb1 updated the code only for the new decoding API.
-
- 04 4月, 2021 1 次提交
-
-
由 Romain Vimont 提交于
Always enable HiDPI support, there is no reason to expose a compilation flag.
-
- 17 3月, 2021 3 次提交
-
-
由 Yu-Chen Lin 提交于
PR #824 <https://github.com/Genymobile/scrcpy/pull/824> Signed-off-by: NYu-Chen Lin <npes87184@gmail.com> Signed-off-by: NRomain Vimont <rom@rom1v.com>
-
由 Yu-Chen Lin 提交于
PR #824 <https://github.com/Genymobile/scrcpy/pull/824> Signed-off-by: NYu-Chen Lin <npes87184@gmail.com> Signed-off-by: NRomain Vimont <rom@rom1v.com>
-
由 slingmint 提交于
PR #2052 <https://github.com/Genymobile/scrcpy/pull/2052> Signed-off-by: NRomain Vimont <rom@rom1v.com>
-
- 16 3月, 2021 1 次提交
-
-
由 Romain Vimont 提交于
BUTTON_PRIMARY must not be set for touch events: > This button constant is not set in response to simple touches with a > finger or stylus tip. The user must actually push a button. <https://developer.android.com/reference/android/view/MotionEvent#BUTTON_PRIMARY> Fixes #2169 <https://github.com/Genymobile/scrcpy/issues/2169>
-
- 15 3月, 2021 1 次提交
-
-
由 Romain Vimont 提交于
Virtual device is only for keyboard sources, not mouse or touchscreen sources. Here is the value of InputDevice.getDevice(-1).toString(): Input Device -1: Virtual Descriptor: ... Generation: 2 Location: built-in Keyboard Type: alphabetic Has Vibrator: false Has mic: false Sources: 0x301 ( keyboard dpad ) InputDevice.getDeviceId() documentation says: > An id of zero indicates that the event didn't come from a physical > device and maps to the default keymap. <https://developer.android.com/reference/android/view/InputEvent#getDeviceId()> However, injecting events with a device id of 0 causes event.getDevice() to be null on the client-side. Commit 26529d37 used -1 as a workaround to avoid a NPE on a specific Android TV device. But this is a bug in the device system, which wrongly assumes that input device may not be null. A similar issue was present in Flutter, but it is now fixed: - <https://github.com/flutter/flutter/issues/30665> - <https://github.com/flutter/engine/pull/7986> On the other hand, using an id of -1 for touchscreen events (which is invalid) causes issues for some apps: <https://github.com/Genymobile/scrcpy/issues/2125#issuecomment-790535792> Therefore, use a device id of 0. An alternative could be to find an existing device matching the source, like "adb shell input" does. See getInputDeviceId(): <https://android.googlesource.com/platform/frameworks/base.git/+/master/cmds/input/src/com/android/commands/input/Input.java> But it seems better to indicate that the event didn't come from a physical device, and it would not solve #962 anyway, because an Android TV has no touchscreen. Refs #962 <https://github.com/Genymobile/scrcpy/issues/962> Fixes #2125 <https://github.com/Genymobile/scrcpy/issues/2125>
-
- 11 3月, 2021 1 次提交
-
-
由 Romain Vimont 提交于
The option is --encoder, not --encoder-name.
-
- 09 3月, 2021 1 次提交
-
-
由 Biswapriyo Nath 提交于
This helps to use mingw toolchains which are not in /usr/bin path. PR #2185 <https://github.com/Genymobile/scrcpy/pull/2185> Signed-off-by: NRomain Vimont <rom@rom1v.com>
-
- 07 3月, 2021 1 次提交
-
-
由 Romain Vimont 提交于
During a frame swap, one of the two frames involved can be released.
-