Commit graph

8 commits

Author SHA1 Message Date
Sebastian Dröge 3d617371af Update for macro renames 2020-12-20 20:43:45 +02:00
Sebastian Dröge af0337c26c generic: Update for subclassing API changes 2020-11-15 18:25:42 +02:00
Sebastian Dröge 9bb3e75fb9 Update to use the new pad builders for safely setting pad functions
Only two uses of unsafely setting the pad functions is left:
- fallbacksrc for overriding the chain function of the proxy pad of a
  ghost pad
- threadshare for overriding the pad functions after creationg, which
  probably needs some fixing at some point
2020-06-22 11:28:19 +03:00
François Laignel dfaf59a59b threadshare: simplify Pad{Src,Sink} implementations
Pad{Src,Sink}[Ref] delegate some functions to their respective
Pad{Src,Sink}Inner. Since they act as smart pointers, we can
safely implement the Deref trait to simplify the implementations.
2020-05-30 08:30:27 +00:00
François Laignel 8e38d861b4 threadshare: save upgrade in Pad functions
When initializing Pad functions in `Pad{Src,Sink}`, we downgrade the
`Pad{Src,Sink}` and upgrade it when necessary. This was implemented
to avoid reference cycles:

`gst::Pad` -> pad function -> `Pad{Src,Sink}` -> `gst::Pad`.

Since `Pad{Src,Sink}` reset the pad functions when dropping, there is
no cycles, so we can use an `Arc<Pad{Src,Sink}>` in the pad functions,
thus saving an `upgrade`.
2020-04-29 16:10:19 +02:00
François Laignel 26634f591a threadshare: build Pad{Src,Sink} with handlers
Handlers for `Pad{Src,Sink}` are assigned when `prepare` is called
which prevents them from handling pre-prepare queries.

See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/247
2020-04-29 16:08:16 +02:00
Sebastian Dröge 5a7fcfad7f Fix various new clippy warnings with clippy 1.43 2020-04-24 13:55:01 +03:00
Arun Raghavan dc3c8fd049 Drop gst-plugin- prefix in plugin directory name 2020-04-05 19:10:47 +00:00
Renamed from generic/gst-plugin-threadshare/src/runtime/pad.rs (Browse further)