1. 08 3月, 2019 4 次提交
  2. 03 3月, 2019 23 次提交
    • R
      Add more consts · a7b3901c
      Romain Vimont 提交于
      Some decoder and recorder functions must not write to AVCodec and
      AVPacket.
      a7b3901c
    • R
      Merge pull request #442 from npes87184/master · fc81d0d7
      Romain Vimont 提交于
      server/meson.build: support relative path for prebuilt_server
      fc81d0d7
    • 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
    • Y
      server/meson.build: support relative path for prebuilt_server · c456e382
      Yu-Chen Lin 提交于
      If we don't do this trick, the prebuilt_server will be
      ../server/[the_user_defined_path]. In general, we will not give an relative path
      based on build directory, which leads to wrong prebuilt_server path.
      
      The building error:
      
      ninja: error: '../scrcpy-server-v1.7.jar', needed by
      'server/scrcpy-server.jar', missing and no known rule to make it
      Signed-off-by: NYu-Chen Lin <npes87184@gmail.com>
      c456e382
    • 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
      Use explicit output parameter for skipped frame · 85958620
      Romain Vimont 提交于
      The function video_buffer_offer_decoded_frame() returned a bool to
      indicate whether the previous frame had been consumed.
      
      This was confusing, because we could expect the returned bool report
      whether the action succeeded.
      
      Make the semantic explicit by using an output parameter.
      
      Also revert the flag (report if the frame has been skipped instead of
      consumed) to avoid confusion for the first frame (the previous is
      neither skipped nor consumed because there is no previous frame).
      85958620
    • R
      Make owned serial a pointer-to-non-const · 9ef345fd
      Romain Vimont 提交于
      The server owns the serial, so it needs to free it. Therefore, it should
      not be a pointer-to-const.
      9ef345fd
    • 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
      Add missing no_window initialization · db6644f1
      Romain Vimont 提交于
      Initialize the field no_window in "struct args"
      db6644f1
    • 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
      Replace uint64_t by Uint64 for consistency · b2fe0054
      Romain Vimont 提交于
      The field pts is declared Uint64 in struct frame_meta.
      b2fe0054
    • R
      Describe the --no-window feature in README · ef118cc6
      Romain Vimont 提交于
      ef118cc6
    • 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
    • C
      Add a new option: -n/--no-window · 421a1141
      CapsLock 提交于
      This option will allow scrcpy to record the stream without display.
      Signed-off-by: NRomain Vimont <rom@rom1v.com>
      421a1141
    • 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
    • R
      Fix recording with old decoding/encoding API · bcd4090d
      Romain Vimont 提交于
      The deprecated avcodec_decode_video2() should always the whole packet,
      so there is no need to loop (cf doc/examples/demuxing_decoding.c in
      FFmpeg).
      
      This hack changed the packet size and data pointer. This broke recording
      which used the same packet.
      bcd4090d
    • R
      Rename "stop" to "interrupt" · 84270e2d
      Romain Vimont 提交于
      The purpose of video_buffer_stop() is to interrupt any blocking call, so
      rename it to video_buffer_interrupt().
      84270e2d
  3. 02 3月, 2019 2 次提交
  4. 27 2月, 2019 1 次提交
  5. 16 2月, 2019 5 次提交
  6. 10 2月, 2019 4 次提交
  7. 09 2月, 2019 1 次提交
    • 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