diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2022-01-19 16:07:45 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2022-01-19 16:07:45 +0300 |
commit | 65fcd55160d126c549a89b613cdf84714a5b346e (patch) | |
tree | 83bd17f3deb9bc37ffa23b9819798ae744705c4a /tutorial | |
parent | 763ad0cb184e9b68bd215c9e5fe63f391a581e2d (diff) |
Update for event/message/query view API changes
Diffstat (limited to 'tutorial')
-rw-r--r-- | tutorial/src/progressbin/imp.rs | 2 | ||||
-rw-r--r-- | tutorial/src/sinesrc/imp.rs | 4 | ||||
-rw-r--r-- | tutorial/tutorial-2.md | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tutorial/src/progressbin/imp.rs b/tutorial/src/progressbin/imp.rs index 38a654005..2dee9d1af 100644 --- a/tutorial/src/progressbin/imp.rs +++ b/tutorial/src/progressbin/imp.rs @@ -225,7 +225,7 @@ impl BinImpl for ProgressBin { // to stdout. Otherwise we pass through to the default message // handling of the parent class, i.e. forwarding to the parent // bins and the application. - MessageView::Element(ref msg) + MessageView::Element(msg) if msg.src().as_ref() == Some(self.progress.upcast_ref()) && msg .structure() diff --git a/tutorial/src/sinesrc/imp.rs b/tutorial/src/sinesrc/imp.rs index 91c5da60e..377cd5c31 100644 --- a/tutorial/src/sinesrc/imp.rs +++ b/tutorial/src/sinesrc/imp.rs @@ -488,13 +488,13 @@ impl BaseSrcImpl for SineSrc { } fn query(&self, element: &Self::Type, query: &mut gst::QueryRef) -> bool { - use gst::QueryView; + use gst::QueryViewMut; match query.view_mut() { // In Live mode we will have a latency equal to the number of samples in each buffer. // We can't output samples before they were produced, and the last sample of a buffer // is produced that much after the beginning, leading to this latency calculation - QueryView::Latency(ref mut q) => { + QueryViewMut::Latency(q) => { let settings = *self.settings.lock().unwrap(); let state = self.state.lock().unwrap(); diff --git a/tutorial/tutorial-2.md b/tutorial/tutorial-2.md index d3615195f..3b633c53e 100644 --- a/tutorial/tutorial-2.md +++ b/tutorial/tutorial-2.md @@ -769,13 +769,13 @@ This querying is done with the `LATENCY` query, which we will have to handle i ```rust fn query(&self, element: &Self::Type, query: &mut gst::QueryRef) -> bool { - use gst::QueryView; + use gst::QueryViewMut; match query.view_mut() { // In Live mode we will have a latency equal to the number of samples in each buffer. // We can't output samples before they were produced, and the last sample of a buffer // is produced that much after the beginning, leading to this latency calculation - QueryView::Latency(ref mut q) => { + QueryViewMut::Latency(q) => { let settings = *self.settings.lock().unwrap(); let state = self.state.lock().unwrap(); |