Language:
  • Francais
  • English

Skip to main content

  • Features
  • Screenshots
  • Getting started
  • Download
  • Contacts
  • Code review
  • Contribute
  • F.A.Q
  • Links
  • Commercial support

Welcome / Code review / Mediastreamer2

Code review

  • Mediastreamer2
  • oRTP
  • liblinphone

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, 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
  • Works on linux, windows XP and unofficialy on mac OS X.

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

Design and principles

Each processing entity is contained within a MSFilter object. MSFilter(s) have inputs and/or outputs.
For example 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.

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 stream.

It can be as simple as:

AudioStream *as=audio_stream_start(.../*list of parameters*/);sleep(10);
audio_stream_stop(as);

If your intent is to add new functionalities to mediastreamer2, you'll be glad to know that implementing a mediastreamer2 filter is very straightforward: no complex declarations, inheritance or such like this.

As an example, have a look at this: it is the 'MSVolume' MSFilter, whose goal is to measure and control loudness of an audio stream.

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

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

Mediastreamer2 is also 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.

License

Mediastreamer2 is licensed under GPL.

Proprietary licenses can be ordered from antisip.com.

Need support for mediastreamer2 ?

Ask Belledonne Communications !

Right menu

News

A new linphonecsh interface controls linphonec running in the background

Many developers and integrators dreamed of that feature for a long time, this is now reality !


Here is Linphone-3.1.0

Linphone-3.1.0 is finally out, bringing its bunch of improvements and new features...


Linphone-3.0.0 is out

A major release of linphone is out, with plenty of new exciting features !


Easy start of linphone on windows

This article explains how to pack linphone together with its config file inside a auto-expand file so that you can share it with friends that aren't familiar with IP telephony, proxies and so on.

An interesting use-case is to have it on a USB key you bring with you to use in an internet cafe.


Antisip & Belledonne Communications partnership for commercial support

Antisip and Belledonne Communications (company created by the author of linphone) had and have today a strong partnership in the development of mediastreamer2, the multimedia streaming engine of linphone.


Copyright 2007 Linphone.org - Hosting & Design Choup.net
Powered by eZ Publish™ Content Management System.