如何为KLV定义mpeg2多路分解器输出引脚(元数据)

时间:2019-07-11 12:39:34

标签: mpeg2-ts

在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元数据输出引脚 如何定义?

0 个答案:

没有答案