1. 15 9月, 2019 1 次提交
  2. 02 8月, 2019 1 次提交
    • R
      Add generic intrusive FIFO queue · 53b6ee2c
      Romain Vimont 提交于
      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.
      53b6ee2c
  3. 11 6月, 2019 3 次提交
    • R
      Improve portable builds · 2755bfc2
      Romain Vimont 提交于
      In portable builds, scrcpy-server.jar was supposed to be present in the
      current directory, so in practice it worked only if scrcpy was launched
      from its own directory.
      
      Instead, find the absolute path of the executable and build a suitable
      path to use scrcpy-server.jar from the same directory.
      2755bfc2
    • R
      Simplify portable build configuration · eb34098a
      Romain Vimont 提交于
      To create a portable build (with scrcpy-server.jar accessible from the
      scrcpy directory), replace OVERRIDE_SERVER_PATH by a simple compilation
      flag: PORTABLE.
      
      This paves the way to use more complex rules to determine the path of
      scrcpy-server.jar in portable builds.
      eb34098a
    • R
      Simplify scrcpy-server path configuration · b777760b
      Romain Vimont 提交于
      The full path of scrcpy-server.jar was partially configured from
      meson.build then concatenated by C code.
      
      Instead, directly write the path in C.
      b777760b
  4. 07 6月, 2019 1 次提交
  5. 06 6月, 2019 1 次提交
  6. 31 5月, 2019 7 次提交
  7. 03 3月, 2019 1 次提交
    • 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
  8. 02 3月, 2019 1 次提交
  9. 12 11月, 2018 2 次提交
  10. 11 11月, 2018 1 次提交
  11. 04 10月, 2018 1 次提交
  12. 16 8月, 2018 1 次提交
  13. 15 8月, 2018 1 次提交
  14. 10 8月, 2018 1 次提交
  15. 06 6月, 2018 1 次提交
  16. 29 5月, 2018 5 次提交
  17. 21 3月, 2018 1 次提交
    • R
      Include source root directory · f5cf6c1b
      Romain Vimont 提交于
      All headers and sources are in src/. To avoid using relative includes
      from subdirectories ("../../"), include the source root directory.
      f5cf6c1b
  18. 14 3月, 2018 1 次提交
  19. 08 3月, 2018 3 次提交
  20. 16 2月, 2018 2 次提交
    • R
      Rename SCRCPY_SERVER_JAR to SCRCPY_SERVER_PATH · 08937892
      Romain Vimont 提交于
      The server is currently a JAR, but it may ba an APK or a DEX, so the
      variable name should not contain the type.
      
      Rename the environment variable, the Meson options and the C
      definitions.
      08937892
    • R
      Replace SDL_net by custom implementation · 9b056f50
      Romain Vimont 提交于
      SDL_net is not very suitable for scrcpy.
      
      For example, SDLNet_TCP_Accept() is non-blocking, so we have to wrap it
      by calling many SDL_Net-specific functions to make it blocking.
      
      But above all, SDLNet_TCP_Open() is a server socket only when no IP is
      provided; otherwise, it's a client socket. Therefore, it is not possible
      to create a server socket bound to localhost, so it accepts connections
      from anywhere.
      
      This is a problem for scrcpy, because on start, the application listens
      for nearly 1 second until it accepts the first connection, supposedly
      from the device. If someone on the local network manages to connect to
      the server socket first, then they can stream arbitrary H.264 video.
      This may be troublesome, for example during a public presentation ;-)
      
      Provide our own simplified API (net.h) instead, implemented for the
      different platforms.
      9b056f50
  21. 15 2月, 2018 3 次提交
    • R
      Refactor screencontrol to inputmanager · 000ced9b
      Romain Vimont 提交于
      The "screen control" handled user input, which happened to be only
      used to control the screen.
      
      The controller and screen were passed to every function. Instead, group
      them in a struct input_manager.
      
      The purpose is to add a new shortcut to enable/disable FPS counter. This
      feature is not related to "screen control", and will require access to
      the "frames" instance.
      000ced9b
    • R
      Expose skip_frames as a build option · 42882702
      Romain Vimont 提交于
      It can be initially configured by:
      
          meson builddir -Dskip_frames=false
      
      Or on an existing builddir by:
      
          mesonconf builddir -Dskip_frames=false
      42882702
    • R
      Add FPS counter · 38e66828
      Romain Vimont 提交于
      Remove frame counter from scrcpy.c and add a new FPS counter, logging as
      INFO the measured frame rate every second (on new frame).
      38e66828
  22. 14 2月, 2018 1 次提交
    • R
      Require Meson 0.37 · 0efa9305
      Romain Vimont 提交于
      Older versions of Meson are too limited, and it's simple to install a
      newer version ("pip3 install meson").
      0efa9305