为MPEG2传输流构建图形的最佳方法 [英] best way to build graph for MPEG2 transport stream

查看:118
本文介绍了为MPEG2传输流构建图形的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows 7上,Windows Media Player很好地支持.ts文件, 从某种意义上说,Windows Media Player知道如何在没有任何其他编解码器包的情况下处理此类文件.

on windows 7 the windows media player supports .ts files very well, in the sense that windows media player knows how to handle such files without any additional codec packs.

但是,如果我尝试使用graphedit来渲染" .ts文件,它会抱怨 不知道如何为它建立图形.

however if I try to use graphedit to "render" a .ts file, it complains it doesnt know how to build a graph for it.

Windows Media Player使用什么方法对这些文件进行解复用/解码? 是直接放映吗? Windows Media基础? BDA?微软电视技术?统一调整模型?

what method does windows media player use to demux/decode these files? is it directshow? windows media foundation? BDA? Microsoft TV Technologies? unified tuning model?

无论使用哪种方法,都可以用作我的自定义应用程序中使用的API?

whatever the method they use, is available as an API to be used in my custom application?

推荐答案

在DirectShow中,仅使用Microsoft过滤器可能会有些混乱.需要使用 IMpeg2Demultiplexer 接口或通过属性页添加内容流的输出引脚.通常,您需要将其他内容连接到过滤器以解析PSI/PAT信息并标识传输流中内容流的程序ID. Microsoft提供了 SDK示例 Windows Platform SDK中可以做到这一点.

In DirectShow using only Microsoft filters it can be a bit of a mess. The Mpeg2 Demultiplexer needs to be manually configured through code using the IMpeg2Demultiplexer interface or through the property pages to add output pins for the content streams. Normally you would need to connect something else to the filter to parse the PSI/PAT information and identify the program ids of the content streams inside the transport stream. Microsoft provides an SDK sample to do this in the Windows Platform SDK.

这是假设您具有常规的mpeg2传输流文件.您可以使用免费的应用程序 MediaInfo

This is assuming that you have a regular mpeg2 transport stream file. You can use the free apps MediaInfo or TsReader Lite to see exactly what is in your ts file.

有些非Microsoft的筛选器使DirectShow中的传输流处理变得容易得多.开源过滤器Haali Media Splitter和Ffdshow的组合无需任何额外配置即可完成此工作.或MainConcept,Elecard,LEADTools等的商业过滤器包.

There are non-Microsoft filters that make handling transport streams in DirectShow a lot easier. The combination of the open source filters Haali Media Splitter and Ffdshow will do it without any extra configuration. Or commercial filter packages from MainConcept, Elecard, LEADTools, etc.

我没有在Media Foundation上做过很多动手工作,因此在这方面我没有太多建议.较新版本的Windows Media Player使用MF而不是DirectShow.一些但不是全部的新MF功能也通过DirectShow界面公开.

I haven't done much hands-on work with Media Foundation, so I don't have much advice to offer on that front. Newer versions of Windows Media Player use MF instead of DirectShow. Some, but not all, new MF functionality is also exposed through DirectShow interfaces.

这篇关于为MPEG2传输流构建图形的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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