1. 30 9月, 2019 1 次提交
  2. 31 7月, 2019 2 次提交
  3. 25 6月, 2019 1 次提交
  4. 24 6月, 2019 1 次提交
  5. 07 6月, 2019 2 次提交
    • R
      Improve framerate counting · e2a272bf
      Romain Vimont 提交于
      The FPS counter was called only on new frames, so it could not print
      values regularly, especially when there are very few FPS (when the
      device surface does not change).
      
      To the extreme, it was never able to display 0 fps.
      
      Add a separate thread to print framerate every second.
      e2a272bf
    • R
      Fix controller cleanup · eda44b60
      Romain Vimont 提交于
      After commit bfb86ca2, the controller
      was not stopped and destroyed on quit.
      eda44b60
  6. 06 6月, 2019 1 次提交
  7. 05 6月, 2019 4 次提交
  8. 31 5月, 2019 6 次提交
    • R
      Do not minimize on focus loss · 9712cb81
      Romain Vimont 提交于
      The default behavior seems annoying.
      
      Fixes <https://github.com/Genymobile/scrcpy/issues/554>
      9712cb81
    • Y
      Correct return value type in handle_event · 2a8a3e6e
      Yu-Chen Lin 提交于
      handle_event return the type enum event_result not bool
      Signed-off-by: NYu-Chen Lin <npes87184@gmail.com>
      2a8a3e6e
    • R
      Use two sockets for video and control · ec71a3f6
      Romain Vimont 提交于
      The socket used the device-to-computer direction to stream the video and
      the computer-to-device direction to send control events.
      
      Some features, like copy-paste from device to computer, require to send
      non-video data from the device to the computer.
      
      To make them possible, use two sockets:
       - one for streaming the video from the device to the client;
       - one for control/events in both directions.
      ec71a3f6
    • R
      Simplify cleanup · bfb86ca2
      Romain Vimont 提交于
      The cleanup is not linear: for example, the server must be stopped and
      its sockets must be shutdown after the stream and controller are stopped
      (so that they don't continue processing garbage), but before they are
      joined, to avoid a deadlock if they are blocked on a socket read.
      
      Simplify the spaghetti-cleanup by keeping trace of initialization at
      runtime.
      bfb86ca2
    • R
      Make server_connect_to() return a bool · 5a431cdf
      Romain Vimont 提交于
      The resulting socket is accessible from the server instance, there is no
      need to return it.
      
      This paves the way to use several sockets in parallel.
      5a431cdf
    • R
      Fix indentation · d2504f97
      Romain Vimont 提交于
      Previous refactorings broke indentation.
      d2504f97
  9. 05 5月, 2019 2 次提交
  10. 03 3月, 2019 12 次提交
    • R
      Explicitly pass control flag to input manager · f7efafd8
      Romain Vimont 提交于
      Replace the "global" control flag in the input_manager by a function
      parameter to make explicit that the behavior depends whether
      --no-control has been set.
      f7efafd8
    • R
      Do not init SDL video subsystem if no display · 6baed8a0
      Romain Vimont 提交于
      The SDL video subsystem is not necessary if we don't display the video.
      
      Move the sdl_init_and_configure() function from screen.c to scrcpy.c,
      because it is not only related to the screen display.
      6baed8a0
    • R
      Replace SDL types by C99 standard types · dfed1b25
      Romain Vimont 提交于
      Scrcpy is a C11 project. Use the C99 standard types instead of the
      SDL-specific types:
      
          SDL_bool -> bool
          SintXX   -> intXX_t
          UintXX   -> uintXX_t
      dfed1b25
    • R
      Add option to mirror in read-only · 8655ba71
      Romain Vimont 提交于
      Add an option to disable device control: -n/--no-control.
      8655ba71
    • R
      Rename -n/--no-window to -N/--no-display · 163cd36c
      Romain Vimont 提交于
      The description of scrcpy is "Display and control your Android device".
      We want an option to disable display, another one to disable control.
      
      For naming consistency, name it --no-display.
      
      Also change the shortname to -N, so that we can use -n for --no-control
      later.
      163cd36c
    • R
      Avoid unnecessary call if display is disabled · 36191b7e
      Romain Vimont 提交于
      If --no-window is passed, there is no need to register an event watcher.
      36191b7e
    • R
      Extract event processing out of event_loop() · 33ccb136
      Romain Vimont 提交于
      To avoid too many levels of nested blocks, move the event handling logic
      in a separate function.
      33ccb136
    • R
      Update code style · aeda583a
      Romain Vimont 提交于
      Limit source code to 80 chars, and declare functions return type and
      modifiers on a separate line.
      
      This allows to avoid very long lines, and all function names are
      aligned.
      
      (We do this on VLC, and I like it.)
      aeda583a
    • R
      Implement the --no-window flag · 89812e4e
      Romain Vimont 提交于
      Disable decoder, screen (display), file_handler and controller when
      --no-window is requested.
      
      <https://github.com/Genymobile/scrcpy/pull/418>
      89812e4e
    • R
      Add stream layer · e6e011ba
      Romain Vimont 提交于
      The decoder initially read from the socket, decoded the video and sent
      the decoded frames to the screen:
      
                    +---------+      +----------+
        socket ---> | decoder | ---> |  screen  |
                    +---------+      +----------+
      
      The design was simple, but the decoder had several responsabilities.
      
      Then we added the recording feature, so we added a recorder, which
      reused the packets received from the socket managed by the decoder:
      
                                          +----------+
                                     ---> |  screen  |
                    +---------+     /     +----------+
        socket ---> | decoder | ----
                    +---------+     \     +----------+
                                     ---> | recorder |
                                          +----------+
      
      This lack of separation of concerns now have concrete implications: we
      could not (properly) disable the decoder/display to only record the
      video.
      
      Therefore, split the decoder to extract the stream:
      
                                          +----------+      +----------+
                                     ---> | decoder  | ---> |  screen  |
                    +---------+     /     +----------+      +----------+
        socket ---> | stream  | ----
                    +---------+     \     +----------+
                                     ---> | recorder |
                                          +----------+
      
      This will allow to record the stream without decoding the video.
      e6e011ba
    • R
      Store the recording request in a local bool · e7b7b083
      Romain Vimont 提交于
      This avoids to test explicitly whether options->record_filename is NULL.
      e7b7b083
    • R
      Fix cleanup order · 8aeb5c0e
      Romain Vimont 提交于
      The order of cleanup was not the reverse as the initialization order. As
      a consequence, recorder_destroy() could theoretically be called even if
      recorder_init() failed.
      8aeb5c0e
  11. 02 3月, 2019 1 次提交
  12. 09 2月, 2019 2 次提交
    • R
      Support recording to MKV · 0ed23739
      Romain Vimont 提交于
      Implement recording to Matroska files.
      
      The format to use is determined by the option -F/--record-format if set,
      or by the file extension (".mp4" or ".mkv").
      0ed23739
    • R
      Forward FFmpeg logs · ee3cba57
      Romain Vimont 提交于
      FFmpeg logs can be useful to understand the cause of issues.
      ee3cba57
  13. 27 1月, 2019 1 次提交
  14. 12 11月, 2018 3 次提交
    • R
      Send frame meta only if recording is enabled · 345f8858
      Romain Vimont 提交于
      The client needs the PTS for each frame only if recording is enabled.
      Otherwise, the PTS are not necessary, and the protocol is more
      straighforward.
      345f8858
    • R
      Rename --output-file to --record · 22bf0c19
      Romain Vimont 提交于
      To record the screen to a local file:
      
          scrcpy --record file.mp4
      22bf0c19
    • R
      Reenable custom SDL signal handlers · d0e090e1
      Romain Vimont 提交于
      This partially reverts commit f00c6c5b.
      
      On Ctrl+C, we need to execute cleanup code. For instance, if recording
      is enabled, we need to write MP4 file trailer on exit.
      
      Custom SDL signal handlers were disabled because it leaded to process
      hanging on Ctrl+C during network calls on initialization, but now it
      seems to work correctly, the network calls return immediately on signal.
      d0e090e1
  15. 11 11月, 2018 1 次提交