Media streams are something that we all use every day. From watching videos on Youtube to placing calls media streams are right there with us in the background. They are the flow of media between two entities. They may be bidirectional (like a phone call) or they may even be unidirectional (like the Youtube video).
When it comes to Asterisk though it has traditionally had no representation of streams. Streams themselves have only existed in a virtual sense that you can imagine in your mind. As audio comes from a channel and goes to another, that’s a stream. As video comes from a channel and goes to another, that’s another stream. These have not been represented in the code but merely have traveled over the same ‘pipe’ separated by the type of the media.
While this simplifies things for the simple audio case it has not lent itself well to video. Every case where media is moved around needs special cases for video, which increases complexity. It also does not present a clear mechanism or way to request that changes to media streams occur (as they don’t exist). Media stream changes occur when a format wants to be added, removed, or forced to be in use. It is also used to add or remove media streams.
It’s time for this to change.
A wiki page has been created which proposes a method of adding stream support to Asterisk. The approach taken when writing this wiki page was to minimize the immediate impact to Asterisk. Existing code and modules should require no modification until they need to support multiple streams (if they even do). Initial changes done as a result of the design will be isolated to the core and existing interfaces will behave as they do today.
Over time though we will gain great functionality. We will gain the ability to add/remove media streams, to have multiple streams (for example multple video streams from a single device), and to change media streams (for example to force a specific codec or to transition from ulaw to g729 based on condition changes).
I urge you to look over the wiki page and think about whether the design of stream support in Asterisk meets all the needs for supporting streams properly. If you have any comments or can think of additional requirements feel free to add them as a comment on the wiki page.
There's One Comment
The Digium Blog
- No items