After we looked at the data movement mechanism in the previous chapter, it would be logical to talk about the dangers lurking in it. One of the peculiarities of the “data flow” principle is that memory allocation from the heap occurs in filters located at the source of the data flow, and the filters located at the end of the stream already free memory and return it to the heap. In addition, the creation of new data and their destruction can occur somewhere in the middle. In general, the data blocks memory allocation and free are doing by different filters.


Havoc Pennington

Red Hat, Inc.


Дэвид Уиллер

Джон Палмиери

Red Hat, Inc.


Колин Уолтерс

Red Hat, Inc.


Версия 0.5.0

в процессе разработки

Это руководство не завершено. Оно, вероятно, содержит некоторую полезную информацию, но также имеет много пробелов. Прямо сейчас вам также необходимо обратиться к спецификации D-Bus, справочной документации Doxygen и посмотреть несколько примеров того, как другие приложения используют D-Bus.

Определенно, приветствуется улучшение руководства — отправляйте свои исправления или предложения в список рассылки. Если вы создаете привязку D-Bus, пожалуйста, добавьте в этот учебник раздел о вашей привязке, хотя бы небольшой раздел с парой примеров.

Что такое D-Bus?

D-Bus — это система межпроцессного…

Data movement in the mediastreamer is performed using queues described by the queue_t structure. Processions of messages of the mblk_t type are moving along the queues, messages by themselves do not contain data blocks, but only references to the previous, next message and to a data block. In addition, I want to emphasize especially, there is also a field for a link to a message of the same type, which allows you to organize messages into a singly linked list. A group of messages united by such a list will be called a tuple. Thus, any element of the queue…

In this article, we will learn how to write filters and add them to the intercom project.

A plugin is an independently compiled software module that is dynamically connected to a media streamer and designed to expand its capabilities. This allows a third party developer i.e. you, to apply a media streamer to solving problems that its authors did not originally envision.

4.1 General approach

To use the plugin in your program, you must include the plugin’s header file using #include. After that In the body of the program, using the function ms_filter_register() register a new filter. …

This article will focus on a few examples of using mediastreamer’s filters. In the process, we will learn how the signal graph is organized, how to create and destroy filter instances. We will learn how to connect them into data processing circuits, tone detection, signal level measurements. Then we will see how to transmit a signal through an RTP-stream. Let’s get acquainted with the internal fields of the RTP-packet using the TShark tool. And we conclude the article with an example of a duplex intercom.

3.1 Creating a
Sound Generator

In the previous article, we installed the mediastreamer library, development tools and tested their functionality…

This article is the beginning of a series of articles on realtime media processing using the Mediastreamer2 engine.


The Mediastreamer2 library, is intended for building audio and video processing/transmission systems based on VoIP technology. Due to its versatility and interface for plugins, the Mediastreamer2 can be used not only for the development and prototyping of these systems, but also for working with other data. The library is free software licensed under the GPLv3.

The code examples given in the serie demonstrate the use of a Mediastreamer2 for processing audio data, but this does not prevent you from applying the knowledge…

This article tells how to make Graphviz graphs drawing easy and faster by using C preprocessor.

The key point is that the dot graph language that Graphviz (graph visualization software) uses is preprocessable in its syntax. This is what the Graphviz developers intended. Thanks to their foresight, when describing graphs, we can use the following features (I am citing Wikipedia from memory):

  • replacing the corresponding digraphs and trigraphs with the equivalent symbols “#” and “\”;
  • removing escaped line feed characters;
  • Replacing inline and block comments with empty lines (removing surrounding spaces and tabs);
  • inserting (including) the content of an arbitrary…

Igor Plastov

Electronics engineer who became a programmer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store