在Directshow MPEG2多路分解器中,可以创建输出引脚 例如在视频中:
这是从视频输出引脚上获取的
AM_MEDIA_TYPE pMediaType;
MPEG2VIDEOINFO video_info;
interface IMPEG2StreamIdMap *StreamIdMapVideo;
memset(&pMediaType, 0x0, sizeof(pMediaType));
memset(&video_info, 0x0, sizeof(MPEG2VIDEOINFO));
//Type settings for the output stream
pMediaType.majortype = MEDIATYPE_Video;
pMediaType.subtype = MEDIASUBTYPE_MPEG2_VIDEO;
pMediaType.formattype = FORMAT_MPEG2Video;
//not sure exactly what I need these for
pMediaType.bFixedSizeSamples = FALSE;
pMediaType.bTemporalCompression = TRUE;
pMediaType.lSampleSize = 0;
pMediaType.cbFormat = sizeof(MPEG2VIDEOINFO);
pMediaType.pbFormat = (BYTE *)&video_info;
CComPtr<IMpeg2Demultiplexer> pDemuxInterface;
hr = pElecardMpegPushDemux->QueryInterface(IID_IMpeg2Demultiplexer, (void **)&pDemuxInterface);
IPin *pDemuxKlvOutPin;
hr = pDemuxInterface->CreateOutputPin(&pMediaType, L"KLV", &pDemuxKlvOutPin);
我想创建PID 258作为KLV元数据输出引脚 如何定义?