可以从Windows服务调用DirectShow [英] Can DirectShow be called from a windows service

查看:62
本文介绍了可以从Windows服务调用DirectShow的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以从服务中调用DirectShow还是需要会话/登录? 我已经看到几个帖子说DirectX和MCI需要一个会话,而且这些帖子在注销时无法在服务中运行。

Can I call DirectShow from a service or is a session / login necessary?  I've seen several posts that say a session is required for DirectX and MCI and that those will not work in a service when logged out.

这里有一些关于我正在做什么的背景信息。  ;我们有一个传统的C ++服务,其中包括使用waveOutOpen来播放wave文件。 我需要更改服务,以便播放mp3文件。  waveOutOpen不会播放mp3文件。 
我很确定我可以使用ACM api来解压缩/转换mp3数据然后继续使用waveOutOpen但是我的经理宁愿我找到一种直接和本地播放mp3的方法而不首先转换它。 如果可能的话,我被要求避免使用
的第三方库,例如LAME。 这就是我开始关注DirectShow的原因。

Here's some background about what I am doing.  We have a legacy C++ service that among other things, uses waveOutOpen to play wave files.  I need to change the service so mp3 files can be played too.  waveOutOpen will not play mp3 files.  I am pretty sure I could use the ACM api to decompress / convert the mp3 data then continue to use waveOutOpen but my manager would rather me find a way to play mp3 directly and natively without converting it first.  I have been asked to avoid the use of third party libraries such as LAME if possible.  That is why I am starting to look at DirectShow.

Kevin Jones

Kevin Jones

推荐答案

你不需要DirectShow的交互式会话。将支持DirectShow的应用程序作为服务运行很好。
You don't need an interactive session for DirectShow. Running your DirectShow-enabled application as a service is fine.


这篇关于可以从Windows服务调用DirectShow的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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