Class ConversionQueue
Create queue for conversions
Inheritance
System.Object
ConversionQueue
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Xabe.FFmpeg
Assembly: Xabe.FFmpeg.dll
Syntax
public class ConversionQueue : IDisposable
Constructors
ConversionQueue(Boolean)
Queue for conversions.
Declaration
public ConversionQueue(bool parallel = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | parallel | If set, queue create multiple workers based on CPU cores. It's best to set if files are small (less than few MB). |
Methods
Add(Task<IConversion>)
Add conversion to queue
Declaration
public Task Add(Task<IConversion> conversion)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.Tasks.Task<IConversion> | conversion | Defined conversion |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Add(IConversion)
Add conversion to queue
Declaration
public void Add(IConversion conversion)
Parameters
Type | Name | Description |
---|---|---|
IConversion | conversion | Defined conversion |
Dispose()
Declaration
public void Dispose()
Pause()
Pause converting media in queue
Declaration
public void Pause()
Start(CancellationTokenSource)
Start converting media in queue
Declaration
public void Start(CancellationTokenSource cancellationTokenSource = null)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationTokenSource | cancellationTokenSource | Cancelation token |
Events
OnConverted
Occurs when conversion in queue finished
Declaration
public event ConversionQueue.ConversionQueueEventHandler OnConverted
Event Type
Type | Description |
---|---|
ConversionQueue.ConversionQueueEventHandler |
OnException
Occurs when appers any exceptions during conversion
Declaration
public event ConversionQueue.ConversionQueueEventHandler OnException
Event Type
Type | Description |
---|---|
ConversionQueue.ConversionQueueEventHandler |
Implements
System.IDisposable