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-02-21 20:43:46 +0300
committerFrançois Laignel <fengalin@free.fr>2022-02-21 22:50:01 +0300
commit422ea740ca937c3d669b7c961a67a09d9b1baed0 (patch)
treed6b0333340dcb3621a2195d2b92ffb23e402d5b6 /tutorial
parent8263e19313df6af6bb9dc59bad94bec0769192fc (diff)
Update to gst::_log_macro_
See the details: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/980
Diffstat (limited to 'tutorial')
-rw-r--r--tutorial/src/identity/imp.rs13
-rw-r--r--tutorial/src/progressbin/imp.rs5
-rw-r--r--tutorial/src/rgb2gray/imp.rs7
-rw-r--r--tutorial/src/sinesrc/imp.rs45
-rw-r--r--tutorial/tutorial-1.md13
-rw-r--r--tutorial/tutorial-2.md51
6 files changed, 64 insertions, 70 deletions
diff --git a/tutorial/src/identity/imp.rs b/tutorial/src/identity/imp.rs
index a48311ad7..1e5c72e87 100644
--- a/tutorial/src/identity/imp.rs
+++ b/tutorial/src/identity/imp.rs
@@ -11,7 +11,6 @@
use gst::glib;
use gst::prelude::*;
use gst::subclass::prelude::*;
-use gst::{gst_log, gst_trace};
use once_cell::sync::Lazy;
@@ -44,7 +43,7 @@ impl Identity {
_element: &super::Identity,
buffer: gst::Buffer,
) -> Result<gst::FlowSuccess, gst::FlowError> {
- gst_log!(CAT, obj: pad, "Handling buffer {:?}", buffer);
+ gst::log!(CAT, obj: pad, "Handling buffer {:?}", buffer);
self.srcpad.push(buffer)
}
@@ -56,7 +55,7 @@ impl Identity {
// See the documentation of gst::Event and gst::EventRef to see what can be done with
// events, and especially the gst::EventView type for inspecting events.
fn sink_event(&self, pad: &gst::Pad, _element: &super::Identity, event: gst::Event) -> bool {
- gst_log!(CAT, obj: pad, "Handling event {:?}", event);
+ gst::log!(CAT, obj: pad, "Handling event {:?}", event);
self.srcpad.push_event(event)
}
@@ -75,7 +74,7 @@ impl Identity {
_element: &super::Identity,
query: &mut gst::QueryRef,
) -> bool {
- gst_log!(CAT, obj: pad, "Handling query {:?}", query);
+ gst::log!(CAT, obj: pad, "Handling query {:?}", query);
self.srcpad.peer_query(query)
}
@@ -88,7 +87,7 @@ impl Identity {
// See the documentation of gst::Event and gst::EventRef to see what can be done with
// events, and especially the gst::EventView type for inspecting events.
fn src_event(&self, pad: &gst::Pad, _element: &super::Identity, event: gst::Event) -> bool {
- gst_log!(CAT, obj: pad, "Handling event {:?}", event);
+ gst::log!(CAT, obj: pad, "Handling event {:?}", event);
self.sinkpad.push_event(event)
}
@@ -107,7 +106,7 @@ impl Identity {
_element: &super::Identity,
query: &mut gst::QueryRef,
) -> bool {
- gst_log!(CAT, obj: pad, "Handling query {:?}", query);
+ gst::log!(CAT, obj: pad, "Handling query {:?}", query);
self.sinkpad.peer_query(query)
}
}
@@ -259,7 +258,7 @@ impl ElementImpl for Identity {
element: &Self::Type,
transition: gst::StateChange,
) -> Result<gst::StateChangeSuccess, gst::StateChangeError> {
- gst_trace!(CAT, obj: element, "Changing state {:?}", transition);
+ gst::trace!(CAT, obj: element, "Changing state {:?}", transition);
// Call the parent class' implementation of ::change_state()
self.parent_change_state(element, transition)
diff --git a/tutorial/src/progressbin/imp.rs b/tutorial/src/progressbin/imp.rs
index 2dee9d1af..c65eedbc0 100644
--- a/tutorial/src/progressbin/imp.rs
+++ b/tutorial/src/progressbin/imp.rs
@@ -9,7 +9,6 @@
// SPDX-License-Identifier: MIT/Apache-2.0
use gst::glib;
-use gst::gst_info;
use gst::prelude::*;
use gst::subclass::prelude::*;
use std::sync::Mutex;
@@ -111,7 +110,7 @@ impl ObjectImpl for ProgressBin {
let new_output_type = value
.get::<ProgressBinOutput>()
.expect("type checked upstream");
- gst_info!(
+ gst::info!(
CAT,
obj: obj,
"Changing output from {:?} to {:?}",
@@ -238,7 +237,7 @@ impl BinImpl for ProgressBin {
match output_type {
ProgressBinOutput::Println => println!("progress: {:5.1}%", percent),
ProgressBinOutput::DebugCategory => {
- gst_info!(CAT, "progress: {:5.1}%", percent);
+ gst::info!(CAT, "progress: {:5.1}%", percent);
}
};
}
diff --git a/tutorial/src/rgb2gray/imp.rs b/tutorial/src/rgb2gray/imp.rs
index 26cb799ad..2da282c51 100644
--- a/tutorial/src/rgb2gray/imp.rs
+++ b/tutorial/src/rgb2gray/imp.rs
@@ -11,7 +11,6 @@
use gst::glib;
use gst::prelude::*;
use gst::subclass::prelude::*;
-use gst::{gst_debug, gst_info};
use gst_base::subclass::prelude::*;
use gst_video::subclass::prelude::*;
@@ -134,7 +133,7 @@ impl ObjectImpl for Rgb2Gray {
"invert" => {
let mut settings = self.settings.lock().unwrap();
let invert = value.get().expect("type checked upstream");
- gst_info!(
+ gst::info!(
CAT,
obj: obj,
"Changing invert from {} to {}",
@@ -146,7 +145,7 @@ impl ObjectImpl for Rgb2Gray {
"shift" => {
let mut settings = self.settings.lock().unwrap();
let shift = value.get().expect("type checked upstream");
- gst_info!(
+ gst::info!(
CAT,
obj: obj,
"Changing shift from {} to {}",
@@ -322,7 +321,7 @@ impl BaseTransformImpl for Rgb2Gray {
gray_caps
};
- gst_debug!(
+ gst::debug!(
CAT,
obj: element,
"Transformed caps from {} to {} in direction {:?}",
diff --git a/tutorial/src/sinesrc/imp.rs b/tutorial/src/sinesrc/imp.rs
index 377cd5c31..ea3897a17 100644
--- a/tutorial/src/sinesrc/imp.rs
+++ b/tutorial/src/sinesrc/imp.rs
@@ -11,7 +11,6 @@
use gst::glib;
use gst::prelude::*;
use gst::subclass::prelude::*;
-use gst::{gst_debug, gst_error, gst_info, gst_log};
use gst_base::prelude::*;
use gst_base::subclass::base_src::CreateSuccess;
use gst_base::subclass::prelude::*;
@@ -240,7 +239,7 @@ impl ObjectImpl for SineSrc {
"samples-per-buffer" => {
let mut settings = self.settings.lock().unwrap();
let samples_per_buffer = value.get().expect("type checked upstream");
- gst_info!(
+ gst::info!(
CAT,
obj: obj,
"Changing samples-per-buffer from {} to {}",
@@ -255,7 +254,7 @@ impl ObjectImpl for SineSrc {
"freq" => {
let mut settings = self.settings.lock().unwrap();
let freq = value.get().expect("type checked upstream");
- gst_info!(
+ gst::info!(
CAT,
obj: obj,
"Changing freq from {} to {}",
@@ -267,7 +266,7 @@ impl ObjectImpl for SineSrc {
"volume" => {
let mut settings = self.settings.lock().unwrap();
let volume = value.get().expect("type checked upstream");
- gst_info!(
+ gst::info!(
CAT,
obj: obj,
"Changing volume from {} to {}",
@@ -279,7 +278,7 @@ impl ObjectImpl for SineSrc {
"mute" => {
let mut settings = self.settings.lock().unwrap();
let mute = value.get().expect("type checked upstream");
- gst_info!(
+ gst::info!(
CAT,
obj: obj,
"Changing mute from {} to {}",
@@ -291,7 +290,7 @@ impl ObjectImpl for SineSrc {
"is-live" => {
let mut settings = self.settings.lock().unwrap();
let is_live = value.get().expect("type checked upstream");
- gst_info!(
+ gst::info!(
CAT,
obj: obj,
"Changing is-live from {} to {}",
@@ -423,7 +422,7 @@ impl BaseSrcImpl for SineSrc {
gst::loggable_error!(CAT, "Failed to build `AudioInfo` from caps {}", caps)
})?;
- gst_debug!(CAT, obj: element, "Configuring for caps {}", caps);
+ gst::debug!(CAT, obj: element, "Configuring for caps {}", caps);
element.set_blocksize(info.bpf() * (*self.settings.lock().unwrap()).samples_per_buffer);
@@ -471,7 +470,7 @@ impl BaseSrcImpl for SineSrc {
*self.state.lock().unwrap() = Default::default();
self.unlock_stop(element)?;
- gst_info!(CAT, obj: element, "Started");
+ gst::info!(CAT, obj: element, "Started");
Ok(())
}
@@ -482,7 +481,7 @@ impl BaseSrcImpl for SineSrc {
*self.state.lock().unwrap() = Default::default();
self.unlock(element)?;
- gst_info!(CAT, obj: element, "Stopped");
+ gst::info!(CAT, obj: element, "Stopped");
Ok(())
}
@@ -502,7 +501,7 @@ impl BaseSrcImpl for SineSrc {
let latency = gst::ClockTime::SECOND
.mul_div_floor(settings.samples_per_buffer as u64, info.rate() as u64)
.unwrap();
- gst_debug!(CAT, obj: element, "Returning latency {}", latency);
+ gst::debug!(CAT, obj: element, "Returning latency {}", latency);
q.set(settings.is_live, latency, gst::ClockTime::NONE);
true
} else {
@@ -547,7 +546,7 @@ impl BaseSrcImpl for SineSrc {
// and for calculating the timestamps, etc.
if segment.rate() < 0.0 {
- gst_error!(CAT, obj: element, "Reverse playback not supported");
+ gst::error!(CAT, obj: element, "Reverse playback not supported");
return false;
}
@@ -579,7 +578,7 @@ impl BaseSrcImpl for SineSrc {
let accumulator =
(sample_offset as f64).rem(2.0 * PI * (settings.freq as f64) / (rate as f64));
- gst_debug!(
+ gst::debug!(
CAT,
obj: element,
"Seeked to {}-{:?} (accum: {}) for segment {:?}",
@@ -601,7 +600,7 @@ impl BaseSrcImpl for SineSrc {
use std::f64::consts::PI;
if state.info.is_none() {
- gst_error!(
+ gst::error!(
CAT,
obj: element,
"Can only seek in Default format if sample rate is known"
@@ -615,7 +614,7 @@ impl BaseSrcImpl for SineSrc {
let accumulator =
(sample_offset as f64).rem(2.0 * PI * (settings.freq as f64) / (rate as f64));
- gst_debug!(
+ gst::debug!(
CAT,
obj: element,
"Seeked to {}-{:?} (accum: {}) for segment {:?}",
@@ -634,7 +633,7 @@ impl BaseSrcImpl for SineSrc {
true
} else {
- gst_error!(
+ gst::error!(
CAT,
obj: element,
"Can't seek in format {:?}",
@@ -648,7 +647,7 @@ impl BaseSrcImpl for SineSrc {
fn unlock(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> {
// This should unblock the create() function ASAP, so we
// just unschedule the clock it here, if any.
- gst_debug!(CAT, obj: element, "Unlocking");
+ gst::debug!(CAT, obj: element, "Unlocking");
let mut clock_wait = self.clock_wait.lock().unwrap();
if let Some(clock_id) = clock_wait.clock_id.take() {
clock_id.unschedule();
@@ -661,7 +660,7 @@ impl BaseSrcImpl for SineSrc {
fn unlock_stop(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> {
// This signals that unlocking is done, so we can reset
// all values again.
- gst_debug!(CAT, obj: element, "Unlock stop");
+ gst::debug!(CAT, obj: element, "Unlock stop");
let mut clock_wait = self.clock_wait.lock().unwrap();
clock_wait.flushing = false;
@@ -695,7 +694,7 @@ impl PushSrcImpl for SineSrc {
// point but at most samples_per_buffer samples per buffer
let n_samples = if let Some(sample_stop) = state.sample_stop {
if sample_stop <= state.sample_offset {
- gst_log!(CAT, obj: element, "At EOS");
+ gst::log!(CAT, obj: element, "At EOS");
return Err(gst::FlowError::Eos);
}
@@ -785,7 +784,7 @@ impl PushSrcImpl for SineSrc {
// so that we immediately stop waiting on e.g. shutdown.
let mut clock_wait = self.clock_wait.lock().unwrap();
if clock_wait.flushing {
- gst_debug!(CAT, obj: element, "Flushing");
+ gst::debug!(CAT, obj: element, "Flushing");
return Err(gst::FlowError::Flushing);
}
@@ -793,7 +792,7 @@ impl PushSrcImpl for SineSrc {
clock_wait.clock_id = Some(id.clone());
drop(clock_wait);
- gst_log!(
+ gst::log!(
CAT,
obj: element,
"Waiting until {}, now {}",
@@ -801,18 +800,18 @@ impl PushSrcImpl for SineSrc {
clock.time().display(),
);
let (res, jitter) = id.wait();
- gst_log!(CAT, obj: element, "Waited res {:?} jitter {}", res, jitter);
+ gst::log!(CAT, obj: element, "Waited res {:?} jitter {}", res, jitter);
self.clock_wait.lock().unwrap().clock_id.take();
// If the clock ID was unscheduled, unlock() was called
// and we should return Flushing immediately.
if res == Err(gst::ClockError::Unscheduled) {
- gst_debug!(CAT, obj: element, "Flushing");
+ gst::debug!(CAT, obj: element, "Flushing");
return Err(gst::FlowError::Flushing);
}
}
- gst_debug!(CAT, obj: element, "Produced buffer {:?}", buffer);
+ gst::debug!(CAT, obj: element, "Produced buffer {:?}", buffer);
Ok(CreateSuccess::NewBuffer(buffer))
}
diff --git a/tutorial/tutorial-1.md b/tutorial/tutorial-1.md
index 7ea9cb9e6..fc997b766 100644
--- a/tutorial/tutorial-1.md
+++ b/tutorial/tutorial-1.md
@@ -146,7 +146,6 @@ With that our `src/lib.rs` is complete, and all following code is only in `src/r
```rust
use gst::glib;
-use gst::{gst_debug, gst_info};
use gst_base::subclass::prelude::*;
use std::i32;
@@ -438,7 +437,7 @@ impl BaseTransformImpl for Rgb2Gray {
Some(info) => info,
};
- gst_debug!(
+ gst::debug!(
CAT,
obj: element,
"Configured for caps {} to {}",
@@ -455,14 +454,14 @@ impl BaseTransformImpl for Rgb2Gray {
// Drop state
let _ = self.state.lock().unwrap().take();
- gst_info!(CAT, obj: element, "Stopped");
+ gst::info!(CAT, obj: element, "Stopped");
Ok(())
}
}
```
-This code should be relatively self-explanatory. In `set_caps` we’re parsing the two caps into a `VideoInfo` and then store this in our `State`, in `stop` we drop the `State` and replace it with `None`. In addition we make use of our debug category here and use the `gst_info!` and `gst_debug!` macros to output the current caps configuration to the GStreamer debug logging system. This information can later be useful for debugging any problems once the element is running.
+This code should be relatively self-explanatory. In `set_caps` we’re parsing the two caps into a `VideoInfo` and then store this in our `State`, in `stop` we drop the `State` and replace it with `None`. In addition we make use of our debug category here and use the `gst::info!` and `gst::debug!` macros to output the current caps configuration to the GStreamer debug logging system. This information can later be useful for debugging any problems once the element is running.
Next we have to provide information to the `BaseTransform` base class about the size in bytes of a video frame with specific caps. This is needed so that the base class can allocate an appropriately sized output buffer for us, that we can then fill later. This is done with the `get_unit_size` virtual method, which is required to return the size of one processing unit in specific caps. In our case, one processing unit is one video frame. In the case of raw audio it would be the size of one sample multiplied by the number of channels.
@@ -518,7 +517,7 @@ impl BaseTransformImpl for Rgb2Gray {
gray_caps
};
- gst_debug!(
+ gst::debug!(
CAT,
obj: element,
"Transformed caps from {} to {} in direction {:?}",
@@ -778,7 +777,7 @@ impl ObjectImpl for Rgb2Gray {
"invert" => {
let mut settings = self.settings.lock().unwrap();
let invert = value.get_some().expect("type checked upstream");
- gst_info!(
+ gst::info!(
CAT,
obj: obj,
"Changing invert from {} to {}",
@@ -790,7 +789,7 @@ impl ObjectImpl for Rgb2Gray {
"shift" => {
let mut settings = self.settings.lock().unwrap();
let shift = value.get_some().expect("type checked upstream");
- gst_info!(
+ gst::info!(
CAT,
obj: obj,
"Changing shift from {} to {}",
diff --git a/tutorial/tutorial-2.md b/tutorial/tutorial-2.md
index 3b633c53e..dcea6c8a2 100644
--- a/tutorial/tutorial-2.md
+++ b/tutorial/tutorial-2.md
@@ -25,7 +25,6 @@ In `src/sinesrc/imp.rs`:
use gst::glib;
use gst::prelude::*;
use gst::subclass::prelude::*;
-use gst::{gst_debug, gst_error, gst_info, gst_log};
use gst_base::prelude::*;
use gst_base::subclass::prelude::*;
@@ -240,7 +239,7 @@ impl ObjectImpl for SineSrc {
"samples-per-buffer" => {
let mut settings = self.settings.lock().unwrap();
let samples_per_buffer = value.get_some().expect("type checked upstream");
- gst_info!(
+ gst::info!(
CAT,
obj: obj,
"Changing samples-per-buffer from {} to {}",
@@ -255,7 +254,7 @@ impl ObjectImpl for SineSrc {
"freq" => {
let mut settings = self.settings.lock().unwrap();
let freq = value.get_some().expect("type checked upstream");
- gst_info!(
+ gst::info!(
CAT,
obj: obj,
"Changing freq from {} to {}",
@@ -267,7 +266,7 @@ impl ObjectImpl for SineSrc {
"volume" => {
let mut settings = self.settings.lock().unwrap();
let volume = value.get_some().expect("type checked upstream");
- gst_info!(
+ gst::info!(
CAT,
obj: obj,
"Changing volume from {} to {}",
@@ -279,7 +278,7 @@ impl ObjectImpl for SineSrc {
"mute" => {
let mut settings = self.settings.lock().unwrap();
let mute = value.get_some().expect("type checked upstream");
- gst_info!(
+ gst::info!(
CAT,
obj: obj,
"Changing mute from {} to {}",
@@ -291,7 +290,7 @@ impl ObjectImpl for SineSrc {
"is-live" => {
let mut settings = self.settings.lock().unwrap();
let is_live = value.get_some().expect("type checked upstream");
- gst_info!(
+ gst::info!(
CAT,
obj: obj,
"Changing is-live from {} to {}",
@@ -342,7 +341,7 @@ impl BaseSrcImpl for SineSrc {
// Reset state
*self.state.lock().unwrap() = Default::default();
- gst_info!(CAT, obj: element, "Started");
+ gst::info!(CAT, obj: element, "Started");
true
}
@@ -352,7 +351,7 @@ impl BaseSrcImpl for SineSrc {
// Reset state
*self.state.lock().unwrap() = Default::default();
- gst_info!(CAT, obj: element, "Stopped");
+ gst::info!(CAT, obj: element, "Stopped");
true
}
@@ -421,7 +420,7 @@ First of all, we need to get notified whenever the caps that our source is confi
gst::loggable_error!(CAT, "Failed to build `AudioInfo` from caps {}", caps)
})?;
- gst_debug!(CAT, obj: element, "Configuring for caps {}", caps);
+ gst::debug!(CAT, obj: element, "Configuring for caps {}", caps);
element.set_blocksize(info.bpf() * (*self.settings.lock().unwrap()).samples_per_buffer);
@@ -586,7 +585,7 @@ Now that this is done, we need to implement the `PushSrc::create` virtual meth
// point but at most samples_per_buffer samples per buffer
let n_samples = if let Some(sample_stop) = state.sample_stop {
if sample_stop <= state.sample_offset {
- gst_log!(CAT, obj: element, "At EOS");
+ gst::log!(CAT, obj: element, "At EOS");
return Err(gst::FlowReturn::Eos);
}
@@ -645,7 +644,7 @@ Now that this is done, we need to implement the `PushSrc::create` virtual meth
state.sample_offset += n_samples;
drop(state);
- gst_debug!(CAT, obj: element, "Produced buffer {:?}", buffer);
+ gst::debug!(CAT, obj: element, "Produced buffer {:?}", buffer);
Ok(buffer)
}
@@ -712,7 +711,7 @@ For working in live mode, we have to add a few different parts in various places
let id = clock.new_single_shot_id(wait_until);
- gst_log!(
+ gst::log!(
CAT,
obj: element,
"Waiting until {}, now {}",
@@ -720,7 +719,7 @@ For working in live mode, we have to add a few different parts in various places
clock.get_time().display(),
);
let (res, jitter) = id.wait();
- gst_log!(
+ gst::log!(
CAT,
obj: element,
"Waited res {:?} jitter {}",
@@ -729,7 +728,7 @@ For working in live mode, we have to add a few different parts in various places
);
}
- gst_debug!(CAT, obj: element, "Produced buffer {:?}", buffer);
+ gst::debug!(CAT, obj: element, "Produced buffer {:?}", buffer);
Ok(buffer)
}
@@ -783,7 +782,7 @@ This querying is done with the `LATENCY` query, which we will have to handle i
let latency = gst::ClockTime::SECOND
.mul_div_floor(settings.samples_per_buffer as u64, info.rate() as u64)
.unwrap();
- gst_debug!(CAT, obj: element, "Returning latency {}", latency);
+ gst::debug!(CAT, obj: element, "Returning latency {}", latency);
q.set(settings.is_live, latency, gst::ClockTime::NONE);
true
} else {
@@ -837,7 +836,7 @@ struct SineSrc {
fn unlock(&self, element: &Self::Type) -> bool {
// This should unblock the create() function ASAP, so we
// just unschedule the clock it here, if any.
- gst_debug!(CAT, obj: element, "Unlocking");
+ gst::debug!(CAT, obj: element, "Unlocking");
let mut clock_wait = self.clock_wait.lock().unwrap();
if let Some(clock_id) = clock_wait.clock_id.take() {
clock_id.unschedule();
@@ -856,7 +855,7 @@ Once everything is unlocked, we need to reset things again so that data flow can
fn unlock_stop(&self, element: &Self::Type) -> bool {
// This signals that unlocking is done, so we can reset
// all values again.
- gst_debug!(CAT, obj: element, "Unlock stop");
+ gst::debug!(CAT, obj: element, "Unlock stop");
let mut clock_wait = self.clock_wait.lock().unwrap();
clock_wait.flushing = false;
@@ -874,7 +873,7 @@ Now as a last step, we need to actually make use of the new struct we added arou
// so that we immediately stop waiting on e.g. shutdown.
let mut clock_wait = self.clock_wait.lock().unwrap();
if clock_wait.flushing {
- gst_debug!(CAT, obj: element, "Flushing");
+ gst::debug!(CAT, obj: element, "Flushing");
return Err(gst::FlowReturn::Flushing);
}
@@ -882,7 +881,7 @@ Now as a last step, we need to actually make use of the new struct we added arou
clock_wait.clock_id = Some(id.clone());
drop(clock_wait);
- gst_log!(
+ gst::log!(
CAT,
obj: element,
"Waiting until {}, now {}",
@@ -890,7 +889,7 @@ Now as a last step, we need to actually make use of the new struct we added arou
clock.get_time().display(),
);
let (res, jitter) = id.wait();
- gst_log!(
+ gst::log!(
CAT,
obj: element,
"Waited res {:?} jitter {}",
@@ -902,7 +901,7 @@ Now as a last step, we need to actually make use of the new struct we added arou
// If the clock ID was unscheduled, unlock() was called
// and we should return Flushing immediately.
if res == gst::ClockReturn::Unscheduled {
- gst_debug!(CAT, obj: element, "Flushing");
+ gst::debug!(CAT, obj: element, "Flushing");
return Err(gst::FlowReturn::Flushing);
}
```
@@ -931,7 +930,7 @@ Seeking is implemented in the `BaseSrc::do_seek` virtual method, and signallin
// and for calculating the timestamps, etc.
if segment.get_rate() < 0.0 {
- gst_error!(CAT, obj: element, "Reverse playback not supported");
+ gst::error!(CAT, obj: element, "Reverse playback not supported");
return false;
}
@@ -962,7 +961,7 @@ Seeking is implemented in the `BaseSrc::do_seek` virtual method, and signallin
let accumulator =
(sample_offset as f64).rem(2.0 * PI * (settings.freq as f64) / (rate as f64));
- gst_debug!(
+ gst::debug!(
CAT,
obj: element,
"Seeked to {}-{:?} (accum: {}) for segment {:?}",
@@ -984,7 +983,7 @@ Seeking is implemented in the `BaseSrc::do_seek` virtual method, and signallin
use std::f64::consts::PI;
if state.info.is_none() {
- gst_error!(
+ gst::error!(
CAT,
obj: element,
"Can only seek in Default format if sample rate is known"
@@ -998,7 +997,7 @@ Seeking is implemented in the `BaseSrc::do_seek` virtual method, and signallin
let accumulator =
(sample_offset as f64).rem(2.0 * PI * (settings.freq as f64) / (rate as f64));
- gst_debug!(
+ gst::debug!(
CAT,
obj: element,
"Seeked to {}-{:?} (accum: {}) for segment {:?}",
@@ -1017,7 +1016,7 @@ Seeking is implemented in the `BaseSrc::do_seek` virtual method, and signallin
true
} else {
- gst_error!(
+ gst::error!(
CAT,
obj: element,
"Can't seek in format {:?}",