Table of Contents

Interface IMediaBlockStoppable

Namespace
VisioForge.Core.MediaBlocks
Assembly
VisioForge.Core.dll

Optional lifecycle hook for blocks that run a background worker or apply upstream backpressure (block the GStreamer streaming thread) and therefore need an early, before-state-NULL signal to release that thread and cancel in-flight work. The pipeline probes for this interface with as and calls VisioForge.Core.MediaBlocks.IMediaBlockStoppable.RequestStop at the very start of its stop sequence — before EOS is sent and before the blocking transition to the NULL state — so a block that is backpressuring can unblock the streaming thread in time for EOS/NULL to proceed without a deadlock.

public interface IMediaBlockStoppable

Remarks

Implementations MUST be non-blocking (do not join the worker here — that still happens later in CleanUp/Dispose), idempotent, and safe to call when the block is not running.

Methods

RequestStop()

Signals the block that the pipeline is stopping. Releases any producer blocked for backpressure and cancels in-flight work so the streaming thread can exit promptly.

void RequestStop()