ts/pad: slight `Pad{Sink,Src}Handler`s optimizations
This threadshare MR proposes 2 slight optimizations.
Don't pass self as ref in remaining handler traits functions
- They are either unit types or
Clone
(in which case they are implemented as pointers). - Internally, we already use an owned version, so there's no need to get a reference.
- It facilitates implementation if the handler must be moved into a closure
or a
Future
.
gst::Pad
in handlers trait functions instead of the Pad{Src,Sink}Ref
wrappers
Use - In practice, only the
gst::Pad
is useful in these functions. Some of these need aPad{Src,Sink}Ref
, but it's the one for the opposite stream direction. In those cases, it is accessed via the element's implementation. - It saves a few
clone
s. - The implementations usually use the
gst::Pad
for logging. They no longer need to access it viapad.gst_pad()
.