`

Mediastreamer2

阅读更多


 

Mediastreamer2 - the multimedia streaming engine

Mediastreamer2 is a powerful and lightweighted streaming engine specialized for voice/video telephony applications .

It is the library that is responsible for all the receiving and sending of multimedia streams in linphone, including voice/video capture, encoding and decoding, and rendering.

Features

  • Read/Write from to an alsa device, an oss device, a windows waveapi device
  • Send and receive RTP packets
  • Encode and decode the following formats: speex, G711, GSM, H263, theora, iLBC, MPEG4, and H264.
  • Read and write from/to a wav file
  • Read YUV pictures from a webcam (provided that it has video4linux v1 or v2 driver)
  • Display YUV pictures (using SDL library or native apis on windows)
  • Dual tones generation
  • Echo cancelation, using the extraordinary echo canceler algorithm from the speex library
  • Audio conferencing
  • Audio parametric equalizer using a FIR filter
  • Volume control, automatic gain control

Mediastreamer2 can be extended with dynamic plugins, currently a H264 and an ILBC codec plugins are available.

Portability

  • Linux/x86 Linux/x86_64
  • Embedded Linux: ARM and Blackfin
  • Windows XP, Vista and 7
  • Mac OS X
  • Google Android

Design and principles

Each processing entity is contained within a MSFilter object. MSFilter(s) have inputs and/or outputs that can be used to connect from and to other MSFilters.

A trivial example to understand:

  • MSRtpRecv is a MSFilter that receives RTP packets from the network, unpacketize them and post them on its only output.
  • MSSpeexDec is a MSFilter that takes everything on its input assuming these are speex encoded packets, and decodes them and put the result on its output.
  • MSFileRec is a MSFilter that takes everything on its input and write it to wav file (assuming the input is 16bit linear pcm).

MSFilters can be connected together to become filter chain. If we assemble the three above examples, we obtain a processing chain that receives RTP packet, decode them and write the uncompressed result into a wav file.

The execution of the media processing work is scheduled by a MSTicker object, a thread that wakes up every 10 ms to process data in all the MSFilter chains it manages. Several MSTicker can be used simultaneously, for example one for audio filters, one for video filters, or one on each processor of the machine where it runs.

Mediastreamer2 is easy to use

If your intent is simply to create audio and video streams, a simple API is defined in audiostream.h and videostream.h to create audio and video streams.

If your intent is to add new functionalities to mediastreamer2, you'll be glad to know that implementing a mediastreamer2 filter is very straightforward. The mediastreamer2 filter encapsulation is very light.

Thanks to this lightweighted framework, developers can concentrate on what matters: the implementation of the signal/image processing algorithm !

Documentation

Mediastreamer2 is documented using doxygen. You can browse the API documention here.

Mediastreamer2 is suitable for embedded systems

  • Mediastreamer2 is light. For example on linux/x86 the full-featured shared library takes around 800ko unstripped and compiled with -g (debug). Data messages that carries the media data within mediastreamer2 chains are optimized using the famous sys-V mblk_t structure. This is to avoid copies as long it is possible and allow low cost fragmentation/re-assemble operations that are very common especially when processing video streams.
  • Mediastreamer2 is written in C
  • Mediastreamer2 compiles on arm with gcc.
  • Mediastreamer2 has only oRTP and libc as minimal dependencies. Others (ffmpeg, speex, alsa...) can be added optionnaly if you need all features.
  • Thanks to its plugin architecture, mediastreamer2 can be extended to interface with hardware codecs, for example video codecs dsp.

 

 

 

http://download-mirror.savannah.gnu.org/releases/linphone/mediastreamer/doc/group__mediastreamer2.html

 

mediastreamer2 library - a modular sound and video processing and streaming

Detailed Description

mediastreamer2 Version 2.4.0

See also:
http://savannah.gnu.org/projects/linphone

What is mediastreamer2

mediastreamer2 is a powerful engine to make audio and video streams. mediastreamer2 is GPL (COPYING). Please understand the licencing details before using it!

For any use of this library beyond the rights granted to you by the GPL license, please contact antisip at <jack@atosc.org >.

Some definitions.

Filter: A filter is a mediastreamer2 component that process data. A filter have 0 or several INPUT pins and 0 or several OUTPUT pins. Here is a list of possible use of filters:

   capture audio or video data.
   play audio or display video data.
   send or receive RTP data.
   encode or decode audio or video data.
   transform (resize video, resample audio...) data.
   duplicate any kind of data.
   mix audio/video data.
 

Graph: A graph is a manager of filters connected together. It will transfer data from OUTPUT pins to INPUT pins and will be responsible for running filters.

How do I use mediastremer2?

Mediastreamer2 can be used for a lot of different purpose. The primary use is to manage RTP audio and video session. You will need to use the API to build filters, link them together in a graph. Then the ticker API will help you to start and stop the graph.

Basic graph sample:

  AUDIO CAPTURE   -->   ENCODE  -->     RTP
      FILTER      -->   FILTER  -->    FILTER
 

The above graph is composed of three filters. The first one has no input: tt captures audio data directly from the drivers and provide it to the OUTPUT pin. This data is sent to the INPUT pin of the encoder which of course encode the data and send it to its OUTPUT pin. This pin is connected to the INPUT pin of a filter capable to build and send RTP packets.

The modular design helps you to encode in many different format just by replacing the "ENCODE FILTER" with another one. mediastreamer2 contains internal support for g711u, g711a, speex and gsm. You can add new encoding format by implementing new filters which can then be dynamically loaded.

 

List of existing filters.

mediastreamer2 already provides a large set of filters. Here is a complete list of built-in filters.

 All supported platforms:
   RTP receiver
   RTP sender
   tee (duplicate data)
 Audio Filters:
   audio capture
   audio playback
     mme API (windows)
     alsa API (linux)
     oss API (linux)
     arts API (linux)
     portaudio API (macosx and other)
   macsnd API (native macosx API -please do more testing...-)
   several audio encoder/decoder: PCMU, PCMA, speex, gsm
   wav file reader.
   wav file recorder.
   resampler.
   conference bridge.
   volume analyser.
   acoustic echo canceller.
   dtmf generation filter.
 Video Filters:
   video capture
     v4w API (windows)
     directshow API (windows)
     video4linux API (linux)
   video display
     v4w API (windows)
     SDL API (linux, macosx...)
   several audio encoder/decoder: H263-1998, MP4V-ES, theora
   image resizer.
   format converter. (RBG24, I420...)
 Plugin Filters:
  iLBC decoder/encoder.

 

 

 

http://mirror.yongbok.net/nongnu/linphone/mediastreamer/doc/

 

Project    : mediastreamer2 - a modular sound and video processing and streaming
Email      : simon.morlat_at_linphone.org
License    : GPL
Home Page  : http://savannah.gnu.org/projects/linphone

Mediastreamer2 is a GPL licensed library to make audio and
video real-time streaming and processing. Written in pure C,
it is based upon the ortp library.

Design:
------

Using mediastreamer2 will allow you to chain filters in a graph. Each
filter will be responsible for doing some kind of processing and will
deliver data to the next filter. As an example, you could get some
data from network and unpack it in an RTP filter. This RTP filter will
deliver the data to a decoder (speex, G711...) which will deliver it
to a filter that is able to play the PCM data or record it into a .wav
file.

There is a doxygen documentation for more information.

Features:
--------

mediastreamer2 already provides a large set of filters.
Here is a complete list of built-in filters.

 All supported platforms:
 *  RTP receiver
 *  RTP sender
 *  tee (duplicate data)

 Audio Filters:
 *  audio capture
 *  audio playback
 *    mme API (windows)
 *    alsa API (linux)
 *    oss API (linux)
 *    arts API (linux)
 *    portaudio API (macosx and other)
 *  macsnd API (native macosx API -please do more testing...-)
 *  aq (audio queue, macos API too)
 *  several audio encoder/decoder: PCMU, PCMA, speex, gsm
 *  wav file reader.
 *  wav file recorder.
 *  resampler.
 *  conference bridge.
 *  volume analyser, gain control, and automatic gain control.
 *  acoustic echo canceller.
 *  dtmf generation filter.
 *  parametric equalizer, can be used to compensate the spectral response of a bad quality speaker or microphone

 Video Filters:
 *  video capture
 *    v4w API (windows, deprecated)
 *    directshow API (windows)
 *    video4linux and video4linux2 APIs (linux)
 *  video display
 *    v4w API (windows)
 *    SDL API (linux, macosx...)
 *  several audio encoder/decoder: H263-1998, MP4V-ES, theora
 *  image resizer.
 *  format converter. (RBG24, I420...)

 Plugin Filters:
 * iLBC decoder/encoder.
 * H264 codec, based on x264


Note that, you can build your own components/filters to do your
own processing or support other codecs.

Installation procedure:
-----------------------

The program is known to run on linux, but might work
on any unix and windows systems.

   $> ./configure
   $> make
   $> su -c 'make install'

Contact information:
--------------------

For more information on mediastreamer2, any contributions, or any remarks,
you can contact me at <simon.morlat_at_linphone.org>.

Use the *linphone* mailing list for question about mediastreamer2.
  <linphone-developers@nongnu.org>.

Subscribe by writing to:
  <linphone-developers-request@nongnu.org> with a subject set to "subscribe".

Commercial support and licensing is provided by Belledonne Communications
http://www.belledonne-communications.com
  • 大小: 69.1 KB
分享到:
评论

相关推荐

    Linphone的mediastreamer2源码分析.doc

    **mediastreamer2源码分析** 1. **目的** mediastreamer2是一个开源的多媒体处理库,主要用于VoIP应用,如Linphone。它的主要目的是为开发者提供一个跨平台的框架,以便轻松实现音频和视频的编解码、传输以及流...

    基于mediastreamer2的网络电话实现流程以及源码库

    首先接到这一个项目,说是要用mediastreamer2做一个网络电话。之前也是从来没有接触过。于是首先开始在百度中搜索一下需要哪些东西,以及那些步骤。最后大致了解了一下,做这个项目最终要的就是需要移植好多的库,每...

    Linphone MediaStreamer2入门.docx

    **MediaStreamer2 入门详解** MediaStreamer2 是一个专为音视频通话应用程序设计的高效流处理引擎。这个库在Linphone中起着核心作用,处理所有多媒体流的接收、发送,包括音视频的捕获、编码、解码以及渲染。...

    Mediastreamer2 源码

    Mediastreamer2 是一个专为音视频通话应用设计的开源流媒体引擎,它在Linux平台上扮演着核心角色,尤其在著名的VoIP应用程序linphone中。这个强大的库提供了丰富的功能,包括多媒体数据的捕获、编码、解码以及渲染。...

    MEDIASTREAMER2分析研究

    ### MEDIASTREAMER2分析研究 #### 1. 目的 本文档旨在深入解析MEDIASTREAMER2(简称MS)在VoIP系统中的作用及其技术细节。通过对MS的全面研究,我们旨在实现以下功能: - 实现企业通讯客户端中的软电话呼叫外部...

    MEDIASTREAMER2分析研究.doc

    **流媒体分析MEDIASTREAMER2 分析研究** **1. 目的** 本文档旨在深入理解和分析 linphone 音视频引擎的核心组件——MEDIASTREAMER2。通过解析其架构、功能和工作流程,我们可以更好地理解如何在实时通信应用中实现...

    mediastreamer2 dll

    **mediastreamer2 DLL** 是一个用于多媒体流处理的开源库,主要应用于VoIP(Voice over Internet Protocol)服务。这个库提供了丰富的功能,允许开发者创建高质量的语音和视频通话应用。在描述中提到的 `...

    mediastreamer2_book.pdf

    Mediastreamer2 是一个强大且轻量级的流媒体引擎,专为语音/视频电话应用程序设计。这个媒体处理和流媒体工具包在Linphone中承担着接收和发送所有多媒体流的任务,包括声音和视频的捕获、编码、解码以及渲染。...

    基于Mediastreamer2的嵌入式语音终端的实现 (2012年)

    Mediastreamer2是一个跨平台轻量级多媒体流技术引擎,非常适合用于VoIP系统的开发。设计了在嵌人式终端中实现基于SIP协议的软电话的方法。硬件以ARM11为平台,软件以Linux系统为平台,信令协议采用eXosip2,并应用...

    mediastreamer-2.8.2

    接下来,开发者需要对源代码进行编译,生成"mediastreamer2.lib"和"mediastreamer2.dll"这两个文件。".lib"文件是静态链接库,包含了可执行文件链接时所需的函数和数据;而".dll"文件是动态链接库,运行时被加载到...

    用osip2、eXosip2、ortp和mediastreamer写的linux下简易软电话带代码

    标题中的“用osip2、eXosip2、ortp和mediastreamer写的linux下简易软电话带代码”揭示了这个项目是基于Linux操作系统,利用特定的开源库来开发的一款简单软电话应用。其中,osip2、eXosip2、ortp和mediastreamer分别...

    mediastreamer开发手册

    Mediastreamer is a library written in C that allows you to create and run audio and video streams. It is designed for any kind of voice over IP applications. It features RTP connectivity, audio codecs...

    ortp与mediastreamAPI_WINCE版本

    mediastreamer2的主要功能包括媒体捕获、处理、编码、解码、混合和播放,为开发VoIP、视频会议和其他多媒体应用提供了强大的工具。 在Windows CE系统上安装ortp与mediastreamer,首先需要确保系统已具备必要的编译...

    linphone-3.10.2 for windows 源代码

    mediastreamer2支持多种编码格式,如G.711、AAC、Opus等音频编码,以及H.264、VP8等视频编码,确保了与不同设备和网络环境的兼容性。此外,它还包含了回声消除、噪声抑制等功能,提升通话质量。 exosip是linphone中...

    osip_mediastreamer

    《osip_mediastreamer:软电话开发的关键库》 在软电话开发领域,osip_mediastreamer是一个至关重要的库文件。这个库专为实现VoIP(Voice over Internet Protocol)通信提供了核心功能,使得开发者能够创建高效、...

    Linphone分析

    它基于SIP协议构建,处理SIP协议的实现主要依赖于osip和eXosip这两个开源库,而多媒体流的处理则通过mediastreamer2来完成,音视频编解码由ffmpeg、speedx等开源软件实现,最终通过ortp库基于RTP协议实现音视频数据...

    linphone学习资料\文档

    它基于开源软件构建,并使用了osip和exosip两个开源库处理SIP协议,使用mediastreamer2来整合处理媒体数据,以及使用ffmepg、speedx等开源软件完成音视频的编解码。Linphone利用ortp库完成基于RTP协议的音视频数据...

    支持iLBC的Android 版SIP Phone的源代码

    描述进一步指出,这个源代码是基于osip/exosip/ortp/iLBC/mediastreamer2库构建的。这些是Android SIP电话实现的关键组件: 1. osip/exosip:这是eXOSIP库的两个部分,由OpenSIP项目开发,提供了SIP协议栈的实现。...

    Linphone源码分析.pdf

    核心引擎由liblinphone、mediastreamer2、ortp、exosip等组件构成,这些组件分别处理不同的功能和协议。 liblinphone是核心引擎的主要模块,它实现了Linphone的所有功能函数,方便添加音频和视频的呼叫功能,提供...

    linphone编译与分析

    《linphone编译与分析》 Linphone是一款开源的VoIP(Voice over IP)软件,它支持多种通信协议,如SIP(Session Initiation Protocol),并可在多种操作系统上运行,包括Android、iOS、Windows和Linux等。...

Global site tag (gtag.js) - Google Analytics