需要有关如何使用Microsoft MPEG 2编码器/解码器的示例源代码 [英] Need sample source code on how to use Microsoft MPEG 2 Encoder / Decoder

查看:94
本文介绍了需要有关如何使用Microsoft MPEG 2编码器/解码器的示例源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 我需要一些示例代码,该代码允许我向RGB24或RGB32位图帧发送由CLSID_CMPEG2EncoderVideoDS标识并在MSMPEG2ENC中实现的Microsoft MPEG 2视频编码器/解码器. dll.

我浏览了所有DirectShow示例,但找不到使用CLSID_CMPEG2EncoderVideoDS的任何地方. Microsoft MPEG-2视频编码器的工作方式如MSDN中所述.例如,Microsoft Windows 7 SDK文档说Microsoft MPEG-2视频编码器采用Media子类型MEDIASUBTYPE_RGB24的输入引脚.但是,当我尝试将PushSource(DirectShow示例过滤器)桌面捕获输出引脚连接到GraphEdit中的Microsoft MPEG-2编码器输入引脚时,它们无法连接.我看到在Microsoft MPEG-2编码器的SDK文档中,优点已设置为MERIT_DO_NOT_USE.也许这与无法将PushSource示例输出引脚连接到Microsoft MPEG-2输入引脚有关.我更改了PushSource代码,以为其返回的桌面屏幕截图返回MEDIASUBTYPE_RGB24的子类型,但这无济于事.

无论如何,我只需要知道如何使用feed原始位图框架RGB 24或RGB&32流到Microsoft MPEG-2视频编码器.

感谢

 I need some sample code that allows me to send RGB24 or RGB32 bitmap frames the Microsoft MPEG 2 video Encoder/Decoder identified by CLSID_CMPEG2EncoderVideoDS and implemented in the MSMPEG2ENC.DLL  dll. 

I looked through all the DirectShow samples but could not find anywhere where CLSID_CMPEG2EncoderVideoDS was used.  The reason I'm asking for a minimal source code snippet that compiles and works is to be sure that Microsoft MPEG-2 Video Encoder works as documented in MSDN.  For instance, Microsoft Windows 7 SDK documentation says that Microsoft MPEG-2 Video Encoder takes an Input Pin of Media subtype MEDIASUBTYPE_RGB24.  However, when I try to connect the PushSource (directshow sample filter) desktop capture output pin to the Microsoft MPEG-2 Encoder input pin in GraphEdit, they don't connect.  I see the merit is set to MERIT_DO_NOT_USE in the SDK documentation for the Microsoft MPEG-2 Encoder.  Perhaps this has something to do with not being able to connect the PushSource sample output pin to the Microsoft MPEG-2 input pin.  I changed PushSource code to return a subtype of MEDIASUBTYPE_RGB24 for the desktop screen capture it does, but this doesn't help.

At any rate, I just need to know how to use feed a raw Bitmap frame stream of RGB 24 or RGB 32 to the Microsoft MPEG-2 video Encoder. 

thanks

推荐答案

凸起.

 

对此有答案吗?


这篇关于需要有关如何使用Microsoft MPEG 2编码器/解码器的示例源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆