Compartir a través de


AM_SAMPLE_PROPERTY_FLAGS Enumeration

 
Microsoft DirectShow 9.0

AM_SAMPLE_PROPERTY_FLAGS Enumeration

Specifies values for the dwSampleFlags and dwStreamId members of the AM_SAMPLE2_PROPERTIES structure. These values describe the properties of media samples.

Syntax

  enum tagAM_SAMPLE_PROPERTY_FLAGS {
    AM_SAMPLE_SPLICEPOINT        = 0x01,   
    AM_SAMPLE_PREROLL            = 0x02,   
    AM_SAMPLE_DATADISCONTINUITY  = 0x04,   
    AM_SAMPLE_TYPECHANGED        = 0x08,   
    AM_SAMPLE_TIMEVALID          = 0x10,   
    AM_SAMPLE_TIMEDISCONTINUITY  = 0x40,   
    AM_SAMPLE_FLUSH_ON_PAUSE     = 0x80,   
    AM_SAMPLE_STOPVALID          = 0x100,  
    AM_SAMPLE_ENDOFSTREAM        = 0x200,  
    AM_STREAM_MEDIA              = 0,      
    AM_STREAM_CONTROL            = 1       
};

Members

AM_SAMPLE_SPLICEPOINT

Sample is a splice point (it can be decoded without reference to previous data).

AM_SAMPLE_PREROLL

Sample is a preroll sample.

AM_SAMPLE_DATADISCONTINUITY

Initial data in this sample is a splice point. The data in the previous sample was not intended to be followed by data in this sample. For more information, see Remarks.

AM_SAMPLE_TYPECHANGED

Sample type changed.

AM_SAMPLE_TIMEVALID

Time is valid.

AM_SAMPLE_TIMEDISCONTINUITY

A time gap in the data starts after this sample. The pbBuffer member of the AM_SAMPLE2_PROPERTIES structure can be NULL in this case.

AM_SAMPLE_FLUSH_ON_PAUSE

For live data only; indicates discard in the paused state.

AM_SAMPLE_STOPVALID

Stop time is valid.

AM_SAMPLE_ENDOFSTREAM

End of stream occurs after this sample. This is reserved for kernel streaming and Microsoft® DirectShow® currently doesn't use it.

AM_STREAM_MEDIA

Normal data stream identifier.

AM_STREAM_CONTROL

Control stream identifier. A value greater than 0x7FFFFFFF indicates an application-defined stream.

Remarks

The AM_SAMPLE_DATADISCONTINUITY flag indicates that the data in the current media sample is not considered contiguous with the data in previous samples. A filter receiving a sample with the AM_SAMPLE_DATADISCONTINUITY flag set should not discard unprocessed data in its buffers. A filter waiting for incoming data before it can process buffered data should process the buffered data immediately; so, buffered data might be discarded if it is incomplete.

For example, a video decompressor filter might receive a media sample with the AM_SAMPLE_DATADISCONTINUITY flag set when it has two complete compressed video frames and one incomplete compressed video frame in its buffers. In this case, the filter decompresses the two complete frames and discards the incomplete third frame before beginning to process data from the current media sample.

The AM_SAMPLE_DATADISCONTINUITY flag is set on the first sample received following a flush or a stop. In addition, you should use the AM_SAMPLE_DATADISCONTINUITY flag when content is switched in the source, when a channel change occurs (when there might also be a format change), or when there is missing data because of stream interruptions.

The AM_SAMPLE_DATADISCONTINUITY flag is equivalent to the IMediaSample::IsDiscontinuity method returning S_OK.

Requirements

  Header: Dshow.h

See Also