diff options
author | François Laignel <fengalin@free.fr> | 2022-10-24 12:57:27 +0300 |
---|---|---|
committer | François Laignel <fengalin@free.fr> | 2022-10-24 13:01:09 +0300 |
commit | 554ce7e7d607648264a3158f1d1e031460114992 (patch) | |
tree | fdf2884d4ecc699774f417885183205bd272ca66 /generic/threadshare/src/appsrc/imp.rs | |
parent | 43e28e5a6d80d08761aea460152fd9f3411ebe37 (diff) |
ts/pad: 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`.
Diffstat (limited to 'generic/threadshare/src/appsrc/imp.rs')
-rw-r--r-- | generic/threadshare/src/appsrc/imp.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/threadshare/src/appsrc/imp.rs b/generic/threadshare/src/appsrc/imp.rs index fb32ddf75..ff4a8b98c 100644 --- a/generic/threadshare/src/appsrc/imp.rs +++ b/generic/threadshare/src/appsrc/imp.rs @@ -82,7 +82,7 @@ struct AppSrcPadHandler; impl PadSrcHandler for AppSrcPadHandler { type ElementImpl = AppSrc; - fn src_event(&self, pad: &PadSrcRef, imp: &AppSrc, event: gst::Event) -> bool { + fn src_event(self, pad: &PadSrcRef, imp: &AppSrc, event: gst::Event) -> bool { gst::log!(CAT, obj: pad.gst_pad(), "Handling {:?}", event); use gst::EventView; @@ -103,7 +103,7 @@ impl PadSrcHandler for AppSrcPadHandler { ret } - fn src_query(&self, pad: &PadSrcRef, imp: &AppSrc, query: &mut gst::QueryRef) -> bool { + fn src_query(self, pad: &PadSrcRef, imp: &AppSrc, query: &mut gst::QueryRef) -> bool { gst::log!(CAT, obj: pad.gst_pad(), "Handling {:?}", query); use gst::QueryViewMut; |