pub struct TestMediaTaskRunner {
pub peer_id: PeerId,
pub codec_config: MediaCodecConfig,
pub reconfigurable: bool,
pub supports_set_delay: bool,
pub set_delay: Option<Duration>,
pub sender: Sender<TestMediaTask>,
}Fields§
§peer_id: PeerIdThe peer_id this was started with.
codec_config: MediaCodecConfigThe config that this runner will start tasks for
reconfigurable: boolIf this is reconfigurable
supports_set_delay: boolIf this supports delay reporting
set_delay: Option<Duration>What the delay is right now
sender: Sender<TestMediaTask>The Sender that will send a clone of the started tasks to the builder.
Trait Implementations§
Source§impl MediaTaskRunner for TestMediaTaskRunner
impl MediaTaskRunner for TestMediaTaskRunner
Source§fn start(
&mut self,
stream: MediaStream,
_offload: Option<AudioOffloadExtProxy>,
) -> Result<Box<dyn MediaTask>, MediaTaskError>
fn start( &mut self, stream: MediaStream, _offload: Option<AudioOffloadExtProxy>, ) -> Result<Box<dyn MediaTask>, MediaTaskError>
Start a MediaTask using the MediaStream given.
If the task started, returns a MediaTask which will finish if the stream ends or an
error occurs, and can be stopped using
MediaTask::stop or by dropping the MediaTask.
This can fail with MediaTaskError::ResourcesInUse if a MediaTask cannot be started because
one is already running.Source§fn set_delay(&mut self, delay: Duration) -> Result<(), MediaTaskError>
fn set_delay(&mut self, delay: Duration) -> Result<(), MediaTaskError>
Set the delay reported from the peer for this media task.
This should configure the media source or sink to attempt to compensate.
Typically this is zero for Sink tasks, but Source tasks can receive this info from the peer.
May only be supported before start.
If an Error is returned, the delay has not been set.
Source§fn reconfigure(
&mut self,
config: &MediaCodecConfig,
) -> Result<(), MediaTaskError>
fn reconfigure( &mut self, config: &MediaCodecConfig, ) -> Result<(), MediaTaskError>
Try to reconfigure the MediaTask to accept a new configuration. This differs from
MediaTaskBuilder::configure as it attempts to preserve the same configured session.
The runner remains configured with the initial configuration on an error.Auto Trait Implementations§
impl Freeze for TestMediaTaskRunner
impl !RefUnwindSafe for TestMediaTaskRunner
impl Send for TestMediaTaskRunner
impl Sync for TestMediaTaskRunner
impl Unpin for TestMediaTaskRunner
impl !UnwindSafe for TestMediaTaskRunner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]§impl<T> IntoAny for T
impl<T> IntoAny for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more