如何让DirectShow播放资源中的视频? [英] How do you get DirectShow to play a video from a resource?

查看:117
本文介绍了如何让DirectShow播放资源中的视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在扩展一个应用程序,以在对话框中的控件上播放多个视频之一.从无窗口示例开始,尽管视频必须是与主要可执行文件分开的文件,但我已经可以正常工作了.

I'm extending an application to play one of several videos on a control in a dialog. Starting with the Windowless sample, I've got this working, though the videos have to be separate files from the main executable.

从打包的角度来看,理想的方案是将视频作为资源包含在可执行文件中.我为此做了一些谷歌搜索,并且有相当多的有人应该这样做",还有一些指向异步示例的指针,尽管尚不清楚如何从那里到达我想要的位置.

The ideal scenario from a packaging standpoint is for the videos to be included with the executable as resources. I did a bit of googling for this, and there's a fair amount of "somebody should do this", and several pointers to the Async sample, though it's not clear how to get where I want from there.

有人知道这样做的简单方法吗?似乎这不是一个死角子,我对此并不感到惊讶.

Does anybody know a simple way to do this? It doesn't seem like this is a corner case, and I'm a bit surprised that this wasn't in the box.

推荐答案

查找 此博客文章的更多信息

Look for Async Filter Sample in the DirectShow SDK, It has impl something called CMemStream which can stream data (read: media) from memory. more info on this blog post

这篇关于如何让DirectShow播放资源中的视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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