适用于 Symbian 操作系统的 DirectShow 模拟?

发布于 2024-08-16 18:52:25 字数 77 浏览 6 评论 0原文

Windows Mobile 有用于媒体编辑捕获的 DirectShow,那么它对于 Symbian OS (s60 v5) 的模拟是什么?

So Windows Mobile has its DirectShow for media editing capturing and so what is its analog for Symbian OS (s60 v5)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

没有你我更好 2024-08-23 18:52:25

Symbian 上有许多 API 可以提供音频和音频服务。视频功能;请注意,我不熟悉 DirectShow,但根据对 Wikipedia 的简要了解,看起来 DirectShow API 比 Symbian(当前)提供的功能更强大。

以下是 Symbian 可用 API 的简要概述以及您可以使用它们做什么。

DevSound

DevSound API,CMMFDevSound,是可用的最低级别的音频 API。它提供多种格式的音频输入和输出流。支持的确切格式取决于您使用的具体硬件,但它始终支持 16 位 PCM,并且通常也支持 AMR、AAC、MP3。该 API 不是最容易使用的,但如果您想执行“实时”音频流,可能值得使用。

CMMFAudioInputStream 和 CMMFAudioOutputStream 类本质上是 DevSound 的包装器;它们更容易使用,但功能不够强大。

音频剪辑实用程序

对于基本文件(剪辑)播放/录制,您可以使用 CMdaAudioPlayerUtilityCMdaAudioRecorderUtility。它们提供“打开文件”、“播放”、“查找”等级别的功能。如果您只想播放/录制音频文件,它们是最简单的选择。如果您希望能够在播放时生成音频或在录制时对其进行处理,那么它们就没有用了。

视频剪辑实用程序

这些实用程序与音频剪辑实用程序类似,但用于播放/录制视频文件。要使用的类是 CVideoPlayerUtilityCVideoRecorderUtility。它们涉及使用直接屏幕访问和/或 ECAM 来渲染/录制视频(见下文)。

直接屏幕访问

直接屏幕访问 (DSA) 提供对视频硬件的快速访问,用于渲染视频、相机取景器或任何需要高速图形的其他内容。开始的类是CDirectScreenAccess

DSA 的确切行为很大程度上取决于您的特定硬件:例如,如果在 DSA 区域顶部绘制菜单或另一个窗口,某些实现将“中止”您的 DSA;其他人可能允许 DSA 在后台继续运行,在硬件中对 DSA 区域执行剪辑。

请注意,如果您直接使用 DSA 渲染视频,则需要自行安排视频流解码; DevVideo(如下)可能会有所帮助。使用 DSA 只能渲染未压缩的位图。

ECAM

ECAM API,CCamera,提供对现有任何相机硬件的访问。它可以提供来自相机的实时未压缩视频帧(用于编码或渲染取景器,通常使用 DSA),也可以拍摄快照。

DevVideo

DevVideo API 提供对视频编码和解码硬件的低级访问。根据您使用的特定硬件,它还可能支持将编码视频流渲染到 DSA 区域。该 API 很难使用,并且您可能会遇到不同手机型号之间的不规则情况。我只建议您在确实需要执行硬件加速流视频编码/解码时使用它。请注意,上面提到的视频剪辑实用程序在底层使用 DevVideo,因此如果您使用它们,您将受益于任何硬件加速。

要查看的类是 CMMFDevVideoPlayCMMFDevVideoRecord。一些注意事项:

  • 诺基亚已从某些 SDK 中排除了 .lib 文件,这意味着您无法将这些 API 与标准 SDK 一起使用;我不确定这里目前的情况如何。
  • 实际上,要使这些课程发挥作用,您可能需要诺基亚的专业帮助,即您需要付费。我很高兴在这里被证明是错误的:-)

使用哪些 API?

好问题。这取决于你想做什么。如果您只想进行音频/视频的基本播放/录制,请使用剪辑实用程序。如果它们足够强大,可以满足您的需求,那么它们比其他工具更容易使用。

但是,如果您需要执行音频或视频流,则需要使用 DevSound 和/或 DSA。如果您想做类似的事情:

  • 渲染通过网络流式传输的音频和视频
  • 实时生成音频,例如游戏音效
  • 实时处理录制的音频/视频,例如通过网络从摄像机流式传输

那么您'您将需要使用低级 API,并且您可能有很多东西需要学习!

有些链接了

  • Symbian 图书 页面上的一些示例源代码。 Symbian OS C++ for Mobile Phones v3 中的代码包含所有高级多媒体 API 的示例(即不是 DevSound 或 DevVideo)。不幸的是,这本书本身无法在线获取。
  • 诺基亚论坛有一些示例代码,可能值得一看。

There are a number of APIs on Symbian which provide audio & video functionality; note, I'm not familiar with DirectShow but based on a brief look at Wikipedia it looks like the DirectShow APIs are more powerful that what Symbian (currently) offers.

Here's a brief overview of the APIs available of Symbian and what you can do with them.

DevSound

The DevSound API, CMMFDevSound, is the lowest level audio API available. It provides audio input and output streaming in a variety of formats. The exact formats supported will depend on the specific hardware you're using, but it always supports 16 bit PCM and usually supports AMR, AAC, MP3 too. The API is not the easiest to use but probably worth using if you want to perform 'real-time' audio streaming.

The classes CMMFAudioInputStream and CMMFAudioOutputStream are essentially wrappers around DevSound; they are easier to use but not quite as powerful.

Audio Clip utilities

For basic file (clip) playback/recording, you can use CMdaAudioPlayerUtility and CMdaAudioRecorderUtility. These provide functionality at the level of 'open file', 'play', 'seek', etc. They are the easiest option if you just want to play/record audio files. They are no good if you want to be able to generate audio as it plays, or process it as it is recording.

Video Clip Utilities

These are the analog of the audio clip utilities, but used for playing/recording video files. The classes to use are CVideoPlayerUtility and CVideoRecorderUtility. They involve using Direct Screen Access and/or ECAM to render/record video (see below).

Direct Screen Access

Direst Screen Access (DSA) provides fast access to the video hardware, and is used for rendering video, camera view finders, or anything else that requires high speed graphics. The class to start with is CDirectScreenAccess.

The exact behaviour of DSA can very depending on your specific hardware: for example, some implementations will 'abort' your DSA if a menu or another window is drawn on top of the DSA area; others may allow the DSA to continue in the background, performing clipping og your DSA region in hardware.

Note, if you are using DSA directly to render video, you will need to arrange for the video stream to be decoded yourself; DevVideo (below) may help here. Only uncompressed bitmaps can be rendered using DSA.

ECAM

The ECAM API, CCamera, provides access to any camera hardware present. It can provide live uncompressed video frames from the camera (for encoding or to render a viewfinder, usually using DSA), or it can take snapshots.

DevVideo

The DevVideo API provides low level access to video encoding and decoding hardware. Depending on the specific hardware you're using, it may also support rendering of an encoded video stream to a DSA region. The API is difficult to use and you are likely to encounter irregularities between different phone models. I would only recommend using it if you really need to perform hardware accelerated streamed video encoding/decoding. Note, the video clip utilities mentioned above use DevVideo under the hood, so you will benefit from any hardware acceleration present if you use those.

The classes to look at are CMMFDevVideoPlay and CMMFDevVideoRecord. Some caveats:

  • Nokia have excluded the .lib files from some SDKs meaning you can't use these APIs with the standard SDK; I'm not sure what the current situation is here.
  • Realistically, to get these classes working, you will probably need professional help from Nokia, i.e. you will need to pay for it. I would glad to be proved wrong here :-)

Which APIs to use?

Good question. It depends what you want to do. If all you want to do is basic playback/recording of audio/video, use the clip utilities. They are much easier to use that the others, if they are powerful enough for your needs.

If, however, you need to perform streaming of audio or video, you'll need to use DevSound and/or DSA. If you want to do something like:

  • render audio and video being streamed over a network
  • generate audio in real-time, for example game sound effects
  • process recorded audio/video in real time, for example streaming from the camera over a network

Then you'll need to use the low level APIs, and you probably have a lot to learn!

Some links

  • some example source code on the Symbian books page. The code from Symbian OS C++ for Mobile Phones v3 contains examples for all the higher level multimedia APIs (i.e. not DevSound or DevVideo). Unfortunately, the book itself is not available online.
  • Forum Nokia has some example code which may be worth a look.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文