threadshare: fix Transition naming

This commit is contained in:
François Laignel 2020-05-25 17:18:31 +02:00
parent 725eb0a093
commit 244f6dd6f7
2 changed files with 268 additions and 269 deletions

File diff suppressed because it is too large Load diff

View file

@ -41,7 +41,7 @@ use std::u32;
use tokio::io::AsyncReadExt; use tokio::io::AsyncReadExt;
use crate::runtime::prelude::*; use crate::runtime::prelude::*;
use crate::runtime::task::Transition; use crate::runtime::task;
use crate::runtime::{Context, PadSrc, PadSrcRef, PadSrcWeak, Task, TaskState}; use crate::runtime::{Context, PadSrc, PadSrcRef, PadSrcWeak, Task, TaskState};
use super::socket::{Socket, SocketError, SocketRead}; use super::socket::{Socket, SocketError, SocketRead};
@ -391,21 +391,21 @@ impl TaskImpl for TcpClientSrcTask {
.boxed() .boxed()
} }
fn handle_hook_error( fn handle_action_error(
&mut self, &mut self,
transition: Transition, trigger: task::Trigger,
state: TaskState, state: TaskState,
err: gst::ErrorMessage, err: gst::ErrorMessage,
) -> BoxFuture<'_, Transition> { ) -> BoxFuture<'_, task::Trigger> {
async move { async move {
match transition { match trigger {
Transition::Prepare => { task::Trigger::Prepare => {
gst_error!(CAT, "Task preparation failed: {:?}", err); gst_error!(CAT, "Task preparation failed: {:?}", err);
self.element.post_error_message(&err); self.element.post_error_message(&err);
Transition::Error task::Trigger::Error
} }
other => unreachable!("Hook error {:?} in state {:?}", other, state), other => unreachable!("Action error for {:?} in state {:?}", other, state),
} }
} }
.boxed() .boxed()