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 <francois@centricular.com>2023-05-10 18:02:08 +0300
committerFrançois Laignel <francois@centricular.com>2023-05-12 13:55:31 +0300
commit7ba0073052c81c8f2f1ebe500048ed6d974e81d8 (patch)
tree26a4f2b74ac8a7129b6ecc95e8affcb302aa1bc2 /net/hlssink3
parent8e93d294e5a61a94f14e812bef59cd0e529494e1 (diff)
use Pad builders for optional name definition
Also, apply auto-naming in the following cases * When building from a non wildcard-named template, the name of the template is automatically assigned to the Pad. User can override with a specific name by calling `name()` on the `PadBuilder`. * When building with a target and no name was provided via the above, the GhostPad is named after the target. See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/448 Auto-naming discussion: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1255#note_1891181 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1197>
Diffstat (limited to 'net/hlssink3')
-rw-r--r--net/hlssink3/src/imp.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/hlssink3/src/imp.rs b/net/hlssink3/src/imp.rs
index 324634b12..c629ce401 100644
--- a/net/hlssink3/src/imp.rs
+++ b/net/hlssink3/src/imp.rs
@@ -797,9 +797,7 @@ impl ElementImpl for HlsSink3 {
}
let peer_pad = settings.splitmuxsink.request_pad_simple("audio_0").unwrap();
- let sink_pad =
- gst::GhostPad::from_template_with_target(templ, Some("audio"), &peer_pad)
- .unwrap();
+ let sink_pad = gst::GhostPad::from_template_with_target(templ, &peer_pad).unwrap();
self.obj().add_pad(&sink_pad).unwrap();
sink_pad.set_active(true).unwrap();
settings.audio_sink = true;
@@ -817,9 +815,7 @@ impl ElementImpl for HlsSink3 {
}
let peer_pad = settings.splitmuxsink.request_pad_simple("video").unwrap();
- let sink_pad =
- gst::GhostPad::from_template_with_target(templ, Some("video"), &peer_pad)
- .unwrap();
+ let sink_pad = gst::GhostPad::from_template_with_target(templ, &peer_pad).unwrap();
self.obj().add_pad(&sink_pad).unwrap();
sink_pad.set_active(true).unwrap();
settings.video_sink = true;