Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrançois Laignel <fengalin@free.fr>2022-10-24 14:15:13 +0300
committerFrançois Laignel <fengalin@free.fr>2022-10-24 14:15:13 +0300
commit5ca033049ea3e23c48a630cd449bf3fdd3e1cb85 (patch)
tree9aaf39f03b94023231bbb4e5de6482a9451fd4ff /generic/threadshare/src/appsrc/imp.rs
parent554ce7e7d607648264a3158f1d1e031460114992 (diff)
ts/pad: use `gst::Pad` in handlers trait functions...
... instead of the `Pad{Src,Sink}Ref` wrappers: - In practice, only the `gst::Pad` is useful in these functions. Some of these which need a `Pad{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 via `pad.gst_pad()`.
Diffstat (limited to 'generic/threadshare/src/appsrc/imp.rs')
-rw-r--r--generic/threadshare/src/appsrc/imp.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/generic/threadshare/src/appsrc/imp.rs b/generic/threadshare/src/appsrc/imp.rs
index ff4a8b98c..ceb79201c 100644
--- a/generic/threadshare/src/appsrc/imp.rs
+++ b/generic/threadshare/src/appsrc/imp.rs
@@ -33,7 +33,7 @@ use std::time::Duration;
use std::u32;
use crate::runtime::prelude::*;
-use crate::runtime::{Context, PadSrc, PadSrcRef, Task, TaskState};
+use crate::runtime::{Context, PadSrc, Task, TaskState};
const DEFAULT_CONTEXT: &str = "";
const DEFAULT_CONTEXT_WAIT: Duration = Duration::ZERO;
@@ -82,8 +82,8 @@ struct AppSrcPadHandler;
impl PadSrcHandler for AppSrcPadHandler {
type ElementImpl = AppSrc;
- fn src_event(self, pad: &PadSrcRef, imp: &AppSrc, event: gst::Event) -> bool {
- gst::log!(CAT, obj: pad.gst_pad(), "Handling {:?}", event);
+ fn src_event(self, pad: &gst::Pad, imp: &AppSrc, event: gst::Event) -> bool {
+ gst::log!(CAT, obj: pad, "Handling {:?}", event);
use gst::EventView;
let ret = match event.view() {
@@ -95,16 +95,16 @@ impl PadSrcHandler for AppSrcPadHandler {
};
if ret {
- gst::log!(CAT, obj: pad.gst_pad(), "Handled {:?}", event);
+ gst::log!(CAT, obj: pad, "Handled {:?}", event);
} else {
- gst::log!(CAT, obj: pad.gst_pad(), "Didn't handle {:?}", event);
+ gst::log!(CAT, obj: pad, "Didn't handle {:?}", event);
}
ret
}
- fn src_query(self, pad: &PadSrcRef, imp: &AppSrc, query: &mut gst::QueryRef) -> bool {
- gst::log!(CAT, obj: pad.gst_pad(), "Handling {:?}", query);
+ fn src_query(self, pad: &gst::Pad, imp: &AppSrc, query: &mut gst::QueryRef) -> bool {
+ gst::log!(CAT, obj: pad, "Handling {:?}", query);
use gst::QueryViewMut;
let ret = match query.view_mut() {
@@ -136,9 +136,9 @@ impl PadSrcHandler for AppSrcPadHandler {
};
if ret {
- gst::log!(CAT, obj: pad.gst_pad(), "Handled {:?}", query);
+ gst::log!(CAT, obj: pad, "Handled {:?}", query);
} else {
- gst::log!(CAT, obj: pad.gst_pad(), "Didn't handle {:?}", query);
+ gst::log!(CAT, obj: pad, "Didn't handle {:?}", query);
}
ret
}