0

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

4

1 回答 1

7

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

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

开发声音

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

这些类CMMFAudioInputStreamCMMFAudioOutputStream本质上是 DevSound 的包装器;它们更容易使用,但没有那么强大。

音频剪辑实用程序

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

视频剪辑实用程序

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

直接屏幕访问

Direst Screen Access (DSA) 提供对视频硬件的快速访问,用于渲染视频、相机取景器或任何其他需要高速图形的东西。开始的课程是CDirectScreenAccess.

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

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

ECAM

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

开发视频

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

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.
于 2009-12-29T15:18:43.593 回答