1. 20 2月, 2021 6 次提交
    • R
      Handle frame available from screen.c · e51e9c74
      Romain Vimont 提交于
      e51e9c74
    • R
      Initialize screen before starting the stream · c79d3a28
      Romain Vimont 提交于
      As soon as the stream is started, the video buffer could notify a new
      frame available.
      
      In order to pass this event to the screen without race condition, the
      screen must be initialized before the screen is started.
      c79d3a28
    • R
      Expose skipped frames to the consumer · 108fe581
      Romain Vimont 提交于
      A skipped frame is detected when the producer offers a frame while the
      current pending frame has not been consumed.
      
      However, the producer (in practice the decoder) is not interested in the
      fact that a frame has been skipped, only the consumer (the renderer) is.
      Therefore, expose the skipped count in consumer_take_frame() instead of
      a flag in the producer_offer_frame().
      
      This allows to manage the skipped and rendered frames count at the same
      place, and remove fps_counter from decoder.
      108fe581
    • R
      Use a callback to notify a new frame · 1ff357bd
      Romain Vimont 提交于
      Make the decoder independant of the SDL even mechanism, by registering a
      callback on the video_buffer.
      1ff357bd
    • R
      Make video buffer more generic · 5f2f0ce5
      Romain Vimont 提交于
      Video buffer is a tool between a frame producer and a frame consumer.
      
      For now, it is used between a decoder and a renderer, but in the future
      another instance might be used to swscale decoded frames.
      5f2f0ce5
    • R
      Move fps counter out of video buffer · 816c1585
      Romain Vimont 提交于
      In order to make video buffer more generic, move out its specific
      responsibility to count the fps between the decoder and the renderer.
      816c1585
  2. 17 2月, 2021 17 次提交
  3. 14 2月, 2021 2 次提交
  4. 24 1月, 2021 5 次提交
    • R
      Fix undefined left shift · 97b001e7
      Romain Vimont 提交于
      Small unsigned integers promote to signed int. As a consequence, if v is
      a uint8_t, then (v << 24) yields an int, so the left shift is undefined
      if the MSB is 1.
      
      Cast to uint32_t to yield an unsigned value.
      
      Reported by USAN (meson x -Db_sanitize=undefined):
      
          runtime error: left shift of 255 by 24 places cannot be represented
          in type 'int'
      97b001e7
    • R
      Improve file handler error message · d8e9ad20
      Romain Vimont 提交于
      Terminating the file handler current process may be either a "push" or
      "install" command.
      d8e9ad20
    • R
      Kill process with SIGKILL signal · b566700b
      Romain Vimont 提交于
      An "adb push" command is not terminated by SIGTERM.
      b566700b
    • R
      Fix file_handler process race condition · 7afd149f
      Romain Vimont 提交于
      The current process could be waited both by run_file_handler() and
      file_handler_stop().
      
      To avoid the race condition, wait the process without closing, then
      close with mutex locked.
      7afd149f
    • R
      Expose a single process_wait() · 6a502316
      Romain Vimont 提交于
      There were two versions: process_wait() and process_wait_noclose().
      
      Expose a single version with a flag (it was already implemented that way
      internally).
      6a502316
  5. 23 1月, 2021 1 次提交
    • R
      Simplify process_wait() · b8edcf52
      Romain Vimont 提交于
      The function process_wait() returned a bool (true if the process
      terminated successfully) and provided the exit code via an output
      parameter exit_code.
      
      But the returned value was always equivalent to exit_code == 0, so just
      return the exit code instead.
      b8edcf52
  6. 18 1月, 2021 2 次提交
  7. 17 1月, 2021 1 次提交
  8. 09 1月, 2021 4 次提交
  9. 08 1月, 2021 2 次提交
    • R
      Separate process wait and close · d580ee30
      Romain Vimont 提交于
      On Linux, waitpid() both waits for the process to terminate and reaps it
      (closes its handle). On Windows, these actions are separated into
      WaitForSingleObject() and CloseHandle().
      
      Expose these actions separately, so that it is possible to send a signal
      to a process while waiting for its termination without race condition.
      
      This allows to wait for server termination normally, but kill the
      process without race condition if it is not terminated after some delay.
      d580ee30
    • R
      Rename process_simple_wait to process_wait · 821c1757
      Romain Vimont 提交于
      Adding "simple" in the function name brings no benefit.
      821c1757