请问陆老师,如何识别视频流的媒体类型??
改写BALL.ax 实现读文件字节流 PUSH到下一个SPLITER FILTER,不知道在什么地方这些字节流的媒体类型,(SetMediaType,GetMediaType,CheckMediaType到底有什么用)谢谢
class CRMSourceStream : public CSourceStream
{
public:
CRMSourceStream(HRESULT *phr, CRMSource *pParent, LPCWSTR pPinName);
~CRMSourceStream();
// plots a ball into the supplied video frame
HRESULT FillBuffer(IMediaSample *pms);
// Ask for buffers of the size appropriate to the agreed media type
HRESULT DecideBufferSize(IMemAllocator *pIMemAlloc,
ALLOCATOR_PROPERTIES *pProperties);
// Set the agreed media type, and set up the necessary ball parameters
HRESULT SetMediaType(const CMediaType *pMediaType);
HRESULT GetMediaType(CMediaType *pmt);
HRESULT CheckMediaType(const CMediaType *pMediaType);
}