mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-21 17:11:04 +00:00
gstreamer: Use new pad probe take_*() API in tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1448>
This commit is contained in:
parent
f14efbd70c
commit
6849e4b4c3
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