You don't need to set the MediaType, just set it NULL
.
Or you can set a partial MediaType. So '0' everything and then set only majortype
and subtype
. (e.g. MEDIATYPE_Stream
and MEDIASUBTYPE_NULL
)
题
I have trouble using the filewriter filter. I am not sure on how to set the outputfile. It has a interface IFileSinkFilte with a method SetFileName. The problem i have is that i don't know how to set the AM_MEDIA_TYPE structure it uses. It looks as following:
typedef struct _MediaType {
GUID majortype;
GUID subtype;
BOOL bFixedSizeSamples;
BOOL bTemporalCompression;
ULONG lSampleSize;
GUID formattype;
IUnknown *pUnk;
ULONG cbFormat;
BYTE *pbFormat;
} AM_MEDIA_TYPE;
How do I know the sample size?
What is a format bloock?
How do i get its length?
解决方案
You don't need to set the MediaType, just set it NULL
.
Or you can set a partial MediaType. So '0' everything and then set only majortype
and subtype
. (e.g. MEDIATYPE_Stream
and MEDIASUBTYPE_NULL
)
其他提示