1. 17 Aug, 2022 2 commits
  2. 16 Aug, 2022 4 commits
  3. 13 Aug, 2022 1 commit
    • François Laignel's avatar
      ts/udpsink: move sync on buffer to try_next · 21da7536
      François Laignel authored
      By moving sync on buffer ts to `try_next`, the resulting delay
      can be cancelled when a state transition occurs.
      
      To prevent item loss, this requires first peeking the incoming
      item from the channel without popping it. After the delay has
      elasped, we can pop the item as the last await point in
      `try_next`: either it will be cancelled before popping or the
      popped item will be passed on to `handle_item`.
      
      Also add `flush` which was missing from `stop` and `flush_start`
      transition actions.
      21da7536
  4. 12 Aug, 2022 7 commits
  5. 11 Aug, 2022 1 commit
  6. 10 Aug, 2022 4 commits
    • François Laignel's avatar
      ts: migrate elements to try_next / handle_item · 33e601d3
      François Laignel authored
      See previous commit for details.
      
      Also switched to panicking for some programming errors.
      33e601d3
    • François Laignel's avatar
      ts/Task: split iterate into try_next and handle_item · 8b54c3fe
      François Laignel authored
      Previous Task iteration model suffered from the following
      shortcomings:
      
      - When an iteration was engaged it could be cancelled at
        await points by Stop or Flush state transitions,
        which could lead to inconsistent states.
      - When an iteration was engaged it could not be cancelled
        by a Pause state transition so as to prevent data loss.
        This meant we couldn't block on the Pause request because
        the mechanism couldn't guarantee Paused would be reached
        in a timely manner.
      
      This commit split the Task iteration into:
      
      - `try_next`: this function returns a future that awaits
        for a new iteration to begin. The regular use case is
        to return an item to process. The item can be left to
        `()` if `try_next` acts as a tick generator. It can
        also return an error. This function can be cancelled at
        await points when a state transition request occurs.
      - `handle_item`: this function is called with the item
        returned by `try_next` and is guaranteed to run to
        completion even if a transition request is received.
      
      Note that this model plays well with the common Future
      cancellation pitfalls in Rust.
      8b54c3fe
    • Vivia Nikolaidou's avatar
      audio, video: Use AudioCapsBuilder::new_interleaved where applicable · 07cbc2f0
      Vivia Nikolaidou authored
      Further code simplification
      07cbc2f0
    • Sebastian Dröge's avatar
      threadshare: Fix some new clippy beta warnings · bdaa39e2
      Sebastian Dröge authored
      warning: this expression borrows a value the compiler would automatically borrow
         --> generic/threadshare/src/runtime/executor/async_wrapper.rs:402:19
          |
      402 |             match (&mut *self).get_mut().read(buf) {
          |                   ^^^^^^^^^^^^ help: change this to: `(*self)`
          |
          = note: `#[warn(clippy::needless_borrow)]` on by default
          = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
      bdaa39e2
  7. 09 Aug, 2022 16 commits
    • Vivia Nikolaidou's avatar
      audio: Use gst_audio::AudioCapsBuilder in some plugins · 8ee8ae58
      Vivia Nikolaidou authored
      Simplify caps creation codes
      8ee8ae58
    • Vivia Nikolaidou's avatar
      video: Use gst_video::VideoCapsBuilder in some plugins · 247702b7
      Vivia Nikolaidou authored
      Simplify caps creation codes
      247702b7
    • François Laignel's avatar
      ts: update elements for new TransitionStatus · fb7929dd
      François Laignel authored
      See previous commit
      fb7929dd
    • François Laignel's avatar
      ts/Task: return a future for state transitions · d4061774
      François Laignel authored
      State transitions request functions hid the synchronization
      details to the caller:
      
      - If the transition was requested from a Context, a subtask was
        added or the transition ack was not awaited if the new transition
        was requested from a running transition or an iteration function.
      - If the transition was not requested from a Context, current
        thread was blocked until the ack was received.
      
      This strategy facilitated code in elements, but it suffered from
      the following shortcomings:
      
      - The `prepare` transition request didn't comply with the above
        strategy and would always return an `Async` form. This was
        designed to accomodate the `Prepare` function for elements
        such as `ts-tcpclientsrc` which takes times due to the
        TCP socket connection delays. The idea was that the actual
        transition result would be available after calling `start`.
        This was a disadvantage for elements which would prefer to
        error immediately in the event of a preparation failure.
      - Hidding the transition request synchronization to the caller
        meant that they had no options but relying on the internal
        mechanism. E.g.: it was not possible to `start` from another
        async runtime without blocking. Also it was not possible
        to request a transition and choose not to await for the
        ack.
      
      This commit introduces a more flexible API for state
      transitions requests:
      
      - The transition request function now return a `TransitionStatus`,
        which is a Future.
      - When an error occurs immediately (e.g. the transition
        request is not autorized due to current state of the Task),
        the `TransitionStatus` is resolved immediately and can be
        `check`ed for errors. This is useful for functions such as
        `pepare` in the case of `ts-tcpclientsrc` (see above).
        This is also useful for `pause`, because in current design,
        the transition is always async. Note however, that `pause` is
        forseen to adhere to the same behaviour as the other transition
        requests in the near future [1].
      - If the caller chooses to await for the ack and they don't know
        if they are running on a ts Context (e.g. in `Pad{Src,Sink}`
        handlers), they can call `await_maybe_on_context`. This is mostly
        the same behaviour as the one that used to be performed internaly.
      - If the caller knows for sure they can't possibly block an async
        executor, they can call `block_on` which is more explicite, but
        will nonetheless make sure no ts Context is being blocked. This
        last check was introduced as it was considered low overhead
        while it should ease preventing missues in cases where the above
        functions should be used.
      
      [1]: gstreamer/gst-plugins-rs!793 (comment 1464400)
      d4061774
    • François Laignel's avatar
      ts/Task: spawn StateMachine on ts Context · 625fce39
      François Laignel authored
      Task state machines used to execute in an executor from the Futures
      crate. State transitions actions and iteration functions were then
      spawned on the target threadshare Context.
      
      This commit directly spawns the task state machine on the threadshare
      Context. This simplifies code a bit and paves the way for the changes
      described in [1].
      
      Also introduces struct `StateMachineHandle`, which gather together
      fields to communicate and synchronize with the StateMachine. Renamed
      `StateMachine::run` as `spawn` and return `StateMachineHandle`.
      
      [1]: gstreamer/gst-plugins-rs!793 (comment 1464400)
      625fce39
    • François Laignel's avatar
      ts-udpsrc: align default port with C counterpart · 0858dfed
      François Laignel authored
      ... and also with the default settings for ts-udpsink.
      0858dfed
    • Sebastian Dröge's avatar
      raptorq: Derive `Eq` for some more structs · 05207caf
      Sebastian Dröge authored and Sebastian Dröge's avatar Sebastian Dröge committed
      warning: you are deriving `PartialEq` and can implement `Eq`
        --> net/raptorq/src/fecscheme.rs:13:24
         |
      13 | #[derive(Clone, Debug, PartialEq)]
         |                        ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = note: `#[warn(clippy::derive_partial_eq_without_eq)]` on by default
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq
      
      warning: you are deriving `PartialEq` and can implement `Eq`
        --> net/raptorq/src/fecscheme.rs:38:24
         |
      38 | #[derive(Clone, Debug, PartialEq)]
         |                        ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq
      05207caf
    • Sebastian Dröge's avatar
      hlssink3: Update to m3u8-rs 5 · cbb55c23
      Sebastian Dröge authored and Sebastian Dröge's avatar Sebastian Dröge committed
      cbb55c23
    • Sebastian Dröge's avatar
      fmp4: Update to m3u8-rs 5 · d058c965
      Sebastian Dröge authored and Sebastian Dröge's avatar Sebastian Dröge committed
      d058c965
    • Sebastian Dröge's avatar
      aws: Update to aws 0.17/0.47 · 8b11aee0
      Sebastian Dröge authored and Sebastian Dröge's avatar Sebastian Dröge committed
      8b11aee0
    • François Laignel's avatar
      ts/scheduler: rename awake / wake_up as unpark · 28a62e62
      François Laignel authored and Sebastian Dröge's avatar Sebastian Dröge committed
      28a62e62
    • François Laignel's avatar
      ts/Task: wake up after the triggering event is pushed · 833331ab
      François Laignel authored and Sebastian Dröge's avatar Sebastian Dröge committed
      The scheduler is awaken when aborting a task loop, but not after
      a triggering event is pushed. This can cause throttling to induce
      long state transitions for pipelines with many streams.
      
      Observed for Unprepare with:
      
      GST_DEBUG=ts-benchmark:4 ../../target/debug/examples/benchmark 2000 ts-udpsrc 2 20 5000
      833331ab
    • François Laignel's avatar
      ts/udpsink: fix default clients not leading to socket configuration · 374671cb
      François Laignel authored and Sebastian Dröge's avatar Sebastian Dröge committed
      During MR !793, the socket configuration mechanism was changed to
      use commands passed to the Task via a channel. This worked properly
      for user changes via settings and signals, however the default
      clients setting was not used.
      
      A simple solution could have been to send a command at initialization
      to add the default clients, but it was considered a better solution
      to just wait for the Task preparation to configure the sockets based
      on the value of settings.clients at that time, thus avoiding
      unnecessary successive removals and additions of clients which could
      have happened before preparation.
      
      Of course, users can still add or remove clients as before, before
      and after Task preparation.
      
      See also gstreamer/gst-plugins-rs!793
      374671cb
    • Mathieu Duponchelle's avatar
      aws_transcriber: expose filtering related properties · f646cabb
      Mathieu Duponchelle authored and Sebastian Dröge's avatar Sebastian Dröge committed
      - vocabulary-filter-name allows picking a vocabulary to filter words
      - vocabulary-filter-method allows controlling how words are filtered
      f646cabb
    • Seungha Yang's avatar
      tracers: Enable PipelineSnapshot only for unix target · a9a41a54
      Seungha Yang authored and Sebastian Dröge's avatar Sebastian Dröge committed
      This implementation does not support the other targets
      (it uses SIGUSR1 which does not exist on Windows)
      and would not be compiled
      a9a41a54
    • Guillaume Desmottes's avatar
      tracers: buffer_lateness.py: cycle colors · 7eea27ae
      Guillaume Desmottes authored
      Fix crash when drawing more dataset than the number of colors.
      
      Fix #221
      7eea27ae
  8. 04 Aug, 2022 2 commits
  9. 21 Jul, 2022 3 commits