Class MediaObject
Media Object
public class MediaObject : IDisposable
- Inheritance
-
MediaObject
- Implements
- Inherited Members
Properties
InputStreamCount
Number of input streams
public int InputStreamCount { get; }
Property Value
OutputStreamCount
Number of output streams
public int OutputStreamCount { get; }
Property Value
Methods
AllocateStreamingResources()
Gives the DMO a chance to allocate any resources needed for streaming
public void AllocateStreamingResources()
Discontinuity(int)
Report a discontinuity on the specified input stream
public void Discontinuity(int inputStreamIndex)
Parameters
inputStreamIndexintInput Stream index
Dispose()
Releases the underlying COM object.
public void Dispose()
Flush()
Flushes all buffered data
public void Flush()
FreeStreamingResources()
Tells the DMO to free any resources needed for streaming
public void FreeStreamingResources()
GetInputMaxLatency(int)
Gets maximum input latency
public long GetInputMaxLatency(int inputStreamIndex)
Parameters
inputStreamIndexintinput stream index
Returns
- long
Maximum input latency as a ref-time
GetInputSizeInfo(int)
Get Input Size Info
public MediaObjectSizeInfo GetInputSizeInfo(int inputStreamIndex)
Parameters
inputStreamIndexintInput Stream Index
Returns
- MediaObjectSizeInfo
Input Size Info
GetInputType(int, int)
Gets the input media type for the specified input stream
public DmoMediaType? GetInputType(int inputStream, int inputTypeIndex)
Parameters
Returns
- DmoMediaType?
DMO Media Type or null if there are no more input types
GetInputTypes(int)
Enumerates the supported input types
public IEnumerable<DmoMediaType> GetInputTypes(int inputStreamIndex)
Parameters
inputStreamIndexintInput stream index
Returns
- IEnumerable<DmoMediaType>
Enumeration of input types
GetOutputCurrentType(int)
retrieves the media type that was set for an output stream, if any
public DmoMediaType GetOutputCurrentType(int outputStreamIndex)
Parameters
outputStreamIndexintOutput stream index
Returns
- DmoMediaType
DMO Media Type or null if no more available
GetOutputSizeInfo(int)
Get Output Size Info
public MediaObjectSizeInfo GetOutputSizeInfo(int outputStreamIndex)
Parameters
outputStreamIndexintOutput Stream Index
Returns
- MediaObjectSizeInfo
Output Size Info
GetOutputType(int, int)
Gets the DMO Media Output type
public DmoMediaType? GetOutputType(int outputStream, int outputTypeIndex)
Parameters
Returns
- DmoMediaType?
DMO Media Type or null if no more available
GetOutputTypes(int)
Enumerates the output types
public IEnumerable<DmoMediaType> GetOutputTypes(int outputStreamIndex)
Parameters
outputStreamIndexintOutput stream index
Returns
- IEnumerable<DmoMediaType>
Enumeration of supported output types
IsAcceptingData(int)
Is this input stream accepting data?
public bool IsAcceptingData(int inputStreamIndex)
Parameters
inputStreamIndexintInput Stream index
Returns
- bool
true if accepting data
ProcessInput(int, IMediaBuffer, DmoInputDataBufferFlags, long, long)
Process Input
public void ProcessInput(int inputStreamIndex, IMediaBuffer mediaBuffer, DmoInputDataBufferFlags flags, long timestamp, long duration)
Parameters
inputStreamIndexintInput Stream index
mediaBufferIMediaBufferMedia Buffer
flagsDmoInputDataBufferFlagsFlags
timestamplongTimestamp
durationlongDuration
ProcessOutput(DmoProcessOutputFlags, int, DmoOutputDataBuffer[])
Process Output
public void ProcessOutput(DmoProcessOutputFlags flags, int outputBufferCount, DmoOutputDataBuffer[] outputBuffers)
Parameters
flagsDmoProcessOutputFlagsFlags
outputBufferCountintOutput buffer count
outputBuffersDmoOutputDataBuffer[]Output buffers
SetInputType(int, DmoMediaType)
Sets the input type
public void SetInputType(int inputStreamIndex, DmoMediaType mediaType)
Parameters
inputStreamIndexintInput stream index
mediaTypeDmoMediaTypeMedia Type
SetInputWaveFormat(int, WaveFormat)
Sets the input type to the specified Wave format
public void SetInputWaveFormat(int inputStreamIndex, WaveFormat waveFormat)
Parameters
inputStreamIndexintInput stream index
waveFormatWaveFormatWave format
SetOutputType(int, DmoMediaType)
Sets the output type n.b. may need to set the input type first
public void SetOutputType(int outputStreamIndex, DmoMediaType mediaType)
Parameters
outputStreamIndexintOutput stream index
mediaTypeDmoMediaTypeMedia type to set
SetOutputWaveFormat(int, WaveFormat)
Set output type to the specified wave format n.b. may need to set input type first
public void SetOutputWaveFormat(int outputStreamIndex, WaveFormat waveFormat)
Parameters
outputStreamIndexintOutput stream index
waveFormatWaveFormatWave format
SupportsInputType(int, DmoMediaType)
Querys whether a specified input type is supported
public bool SupportsInputType(int inputStreamIndex, DmoMediaType mediaType)
Parameters
inputStreamIndexintInput stream index
mediaTypeDmoMediaTypeMedia type to check
Returns
- bool
true if supports
SupportsInputWaveFormat(int, WaveFormat)
Requests whether the specified Wave format is supported as an input
public bool SupportsInputWaveFormat(int inputStreamIndex, WaveFormat waveFormat)
Parameters
inputStreamIndexintInput stream index
waveFormatWaveFormatWave format
Returns
- bool
true if supported
SupportsOutputType(int, DmoMediaType)
Checks if a specified output type is supported n.b. you may need to set the input type first
public bool SupportsOutputType(int outputStreamIndex, DmoMediaType mediaType)
Parameters
outputStreamIndexintOutput stream index
mediaTypeDmoMediaTypeMedia type
Returns
- bool
True if supported
SupportsOutputWaveFormat(int, WaveFormat)
Tests if the specified Wave Format is supported for output n.b. may need to set the input type first
public bool SupportsOutputWaveFormat(int outputStreamIndex, WaveFormat waveFormat)
Parameters
outputStreamIndexintOutput stream index
waveFormatWaveFormatWave format
Returns
- bool
True if supported