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:
authorSebastian Dröge <sebastian@centricular.com>2022-10-23 23:03:22 +0300
committerSebastian Dröge <sebastian@centricular.com>2022-10-23 23:08:46 +0300
commit9a68f6e221576f94e153f5f20e499b22745621ec (patch)
tree776a587d54578bc7dff1fe432bf3008308bffb79 /net/hlssink3
parent86776be58c5d7e8607653edcd719ac1f0ba8d992 (diff)
Move from `imp.instance()` to `imp.obj()`
It's doing the same thing and is shorter.
Diffstat (limited to 'net/hlssink3')
-rw-r--r--net/hlssink3/src/imp.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/hlssink3/src/imp.rs b/net/hlssink3/src/imp.rs
index 030203ccb..c61e53f34 100644
--- a/net/hlssink3/src/imp.rs
+++ b/net/hlssink3/src/imp.rs
@@ -189,7 +189,7 @@ impl HlsSink3 {
state.current_segment_location = Some(segment_file_location.clone());
let fragment_stream = self
- .instance()
+ .obj()
.emit_by_name::<Option<gio::OutputStream>>(
SIGNAL_GET_FRAGMENT_STREAM,
&[&segment_file_location],
@@ -280,7 +280,7 @@ impl HlsSink3 {
// Acquires the playlist file handle so we can update it with new content. By default, this
// is expected to be the same file every time.
let mut playlist_stream = self
- .instance()
+ .obj()
.emit_by_name::<Option<gio::OutputStream>>(
SIGNAL_GET_PLAYLIST_STREAM,
&[&playlist_location],
@@ -323,7 +323,7 @@ impl HlsSink3 {
for _ in 0..state.old_segment_locations.len() - max_num_segments {
let old_segment_location = state.old_segment_locations.remove(0);
if !self
- .instance()
+ .obj()
.emit_by_name::<bool>(SIGNAL_DELETE_FRAGMENT, &[&old_segment_location])
{
gst::error!(CAT, imp: self, "Could not delete fragment");
@@ -617,7 +617,7 @@ impl ObjectImpl for HlsSink3 {
fn constructed(&self) {
self.parent_constructed();
- let obj = self.instance();
+ let obj = self.obj();
obj.set_element_flags(gst::ElementFlags::SINK);
obj.set_suppressed_flags(gst::ElementFlags::SINK | gst::ElementFlags::SOURCE);
@@ -772,7 +772,7 @@ impl ElementImpl for HlsSink3 {
let sink_pad =
gst::GhostPad::from_template_with_target(templ, Some("audio"), &peer_pad)
.unwrap();
- self.instance().add_pad(&sink_pad).unwrap();
+ self.obj().add_pad(&sink_pad).unwrap();
sink_pad.set_active(true).unwrap();
settings.audio_sink = true;
@@ -792,7 +792,7 @@ impl ElementImpl for HlsSink3 {
let sink_pad =
gst::GhostPad::from_template_with_target(templ, Some("video"), &peer_pad)
.unwrap();
- self.instance().add_pad(&sink_pad).unwrap();
+ self.obj().add_pad(&sink_pad).unwrap();
sink_pad.set_active(true).unwrap();
settings.video_sink = true;
@@ -823,7 +823,7 @@ impl ElementImpl for HlsSink3 {
}
pad.set_active(false).unwrap();
- self.instance().remove_pad(pad).unwrap();
+ self.obj().remove_pad(pad).unwrap();
if "audio" == ghost_pad.name() {
settings.audio_sink = false;