1. 14 4月, 2021 24 次提交
    • R
      Hide the window immediately on close · 7fa922d8
      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.
      7fa922d8
    • R
      Assert screen closed on destroy · ac7dca42
      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.
      ac7dca42
    • R
      Remove video_buffer callbacks · 492162a2
      Romain Vimont 提交于
      Now that screen is both the owner and the listener of the video buffer,
      execute the code directly without callbacks.
      492162a2
    • R
      Move video_buffer to screen · 2ab148bd
      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.
      2ab148bd
    • R
      Make decoder push frames to sinks · 67955640
      Romain Vimont 提交于
      Now that screen implements the packet sink trait, make decoder push
      packets to the sinks without depending on the concrete sink types.
      67955640
    • R
      Expose screen as frame sink · b7cdbce8
      Romain Vimont 提交于
      Make screen implement the frame sink trait.
      
      This will allow the decoder to push frames without depending on the
      concrete sink type.
      b7cdbce8
    • R
      Add frame sink trait · 5cd847a8
      Romain Vimont 提交于
      This trait will allow to abstract the concrete sink types from the frame
      producer (decoder.c).
      5cd847a8
    • R
      Make stream push packets to sinks · 3d36915d
      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.
      3d36915d
    • R
      Expose decoder as packet sink · c64f5ff7
      Romain Vimont 提交于
      Make decoder implement the packet sink trait.
      
      This will allow the stream to push packets without depending on the
      concrete sink type.
      c64f5ff7
    • R
      Reorder decoder functions · db418d08
      Romain Vimont 提交于
      This will make further commits more readable.
      db418d08
    • R
      Expose recorder as packet sink · b481ab0a
      Romain Vimont 提交于
      Make recorder implement the packet sink trait.
      
      This will allow the stream to push packets without depending on the
      concrete sink type.
      b481ab0a
    • R
      Privatize recorder threading · cb7017e2
      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.
      cb7017e2
    • R
      Reorder recorder functions · 5c6b04cf
      Romain Vimont 提交于
      This will make further commits more readable.
      5c6b04cf
    • R
      Add packet sink trait · 153d5e48
      Romain Vimont 提交于
      This trait will allow to abstract the concrete sink types from the
      packet producer (stream.c).
      153d5e48
    • R
      Add container_of() macro · 620b117a
      Romain Vimont 提交于
      This will allow to get the parent of an embedded struct.
      620b117a
    • R
      Make video_buffer more generic · 14e83175
      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.
      14e83175
    • R
      Remove compat with old FFmpeg codec params API · 0d46d0b3
      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.
      0d46d0b3
    • R
      Remove compat with old FFmpeg decoding API · 4632ef22
      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.
      4632ef22
    • R
      Remove option --render-expired-frames · bc079436
      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".
      bc079436
    • R
      Write trailer from recorder thread · 003fcb04
      Romain Vimont 提交于
      The recorder thread wrote the whole content except the trailer, which
      was odd.
      003fcb04
    • R
      Do not forward SDL_DROPFILE event · 8ef4c044
      Romain Vimont 提交于
      The event is handled by scrcpy.c, it is not necessary to send it to
      screen or input_manager.
      8ef4c044
    • R
      Move resizing workaround to screen.c · c23c38f9
      Romain Vimont 提交于
      c23c38f9
    • R
      Set initial fullscreen from screen.c · 65c4f487
      Romain Vimont 提交于
      65c4f487
    • R
      Make screen_show_window() static · c6d7f5ee
      Romain Vimont 提交于
      It is only used from screen.c now.
      c6d7f5ee
  2. 11 4月, 2021 6 次提交
  3. 06 4月, 2021 1 次提交
  4. 04 4月, 2021 1 次提交
  5. 17 3月, 2021 3 次提交
  6. 16 3月, 2021 1 次提交
  7. 15 3月, 2021 1 次提交
  8. 11 3月, 2021 1 次提交
  9. 09 3月, 2021 1 次提交
  10. 07 3月, 2021 1 次提交