mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 01:21:05 +00:00
gstreamer: Use new pad probe take_*() API in tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1537>
This commit is contained in:
parent
e34323cf2a
commit
a369f9e345
1 changed files with 2 additions and 2 deletions
|
@ -2451,7 +2451,7 @@ mod tests {
|
|||
{
|
||||
let events = events.clone();
|
||||
pad.add_probe(crate::PadProbeType::EVENT_UPSTREAM, move |_, info| {
|
||||
if let Some(PadProbeData::Event(event)) = info.data.take() {
|
||||
if let Some(event) = info.take_event() {
|
||||
let mut events = events.lock().unwrap();
|
||||
events.push(event);
|
||||
} else {
|
||||
|
@ -2464,7 +2464,7 @@ mod tests {
|
|||
{
|
||||
let buffers = buffers.clone();
|
||||
pad.add_probe(crate::PadProbeType::BUFFER, move |_, info| {
|
||||
if let Some(PadProbeData::Buffer(buffer)) = info.data.take() {
|
||||
if let Some(buffer) = info.take_buffer() {
|
||||
let mut buffers = buffers.lock().unwrap();
|
||||
info.flow_res = if buffers.is_empty() {
|
||||
Ok(FlowSuccess::Ok)
|
||||
|
|
Loading…
Reference in a new issue