Next revision | Previous revisionNext revisionBoth sides next revision |
software:msd:internals [2014/10/23 00:18] – created root | software:msd:internals [2014/10/23 02:06] – [How it works] root |
---|
FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)// | FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)// |
| |
====== Внутреннее устройство ====== | ====== How it works ====== |
| |
Клиентский запрос поступает на встроенный web сервер. К нему применяются настройки описанные в разделе [[ru:software:msd:config#HTTP|HTTP]] подсекция [[ru:software:msd:config#skt|skt]] и [[ru:software:msd:config#congestionControl|congestionControl]].\\ | The client request goes to integrated web server.\\ |
| Settings are applied as described in section [[en:software:msd:config#HTTP|HTTP]] subsection [[en:software:msd:config#skt|skt]] and [[en:software:msd:config#congestionControl|congestionControl]].\\ |
| |
Если клиент запрашивает Stream Hub то его сокет передаётся существующему Stream Hub либо Stream Hub может быть создан по запросу клиента.\\ | Client socket is passed to the existing Stream Hub, or Stream Hub can be created on request.\\ |
| |
Для каждого канала создаётся свой Stream Hub.\\ | For each channel, created its own Stream Hub.\\ |
| |
К одному Stream Hub может быть подключено множество клиентов.\\ | To one Stream Hub can connect multiple clients.\\ |
| |
Stream Hub имеет уникальное имя по которому идентифицируется. Для динамических Stream Hub оно генерируется автоматом на основе URL запроса. Для каналов из файла конфигурации оно соответствует имени канала.\\ | Stream Hub has a unique name by which identified. For dynamic Stream Hub is generated based on the request URL. Channels from the configuration file, it is the name of the channel.\\ |
| |
Stream Hub привязывается к одному потоку (thread + kqueue/epoll).\\ | Stream Hub is bound to a single thread (thread + kqueue/epoll).\\ |
Каждый поток привязывается (bind) к ядру процессора. Можно настроить количество потоков и привязку к процессорам.\\ | Each thread is bound to the processor core. You can configure the number of threads and processor affinity.\\ |
| |
Stream Hub может иметь один и более источников (multicast, http и тп).\\ | Stream Hub may have one or more sources (multicast, http etc).\\ |
Каждый источник имеет свой кольцевой буфер (ring Buf) для приёма данных.\\ | Each source has its own circular buffer (ring Buf) to receive data.\\ |
| |
Stream Hub по мере поступления данных из активного источника отправляет клиентам данные из кольцевого буфера.\\ | Stream Hub as data become available from the active source sends data to clients from the ring buffer.\\ |
| |
Новому клиенту Stream Hub может отправить MPEG2-TS служебные заголовки (флаг [[ru:software:msd:config#fMPEG2TSAnalyzing|fMPEG2TSAnalyzing]] в конфиге). Это необходимо чтобы декодер клиента инициализировался и не отбрасывал MPEG2-TS пакеты в поисках служебных данных. Так же Stream Hub может отправить указанное в [[ru:software:msd:config#precache|конфиг файле]] / [[ru:software:msd:urls#precache|URL запроса]] количество килобайт precache из кольцевого буфера.\\ | New client Stream Hub can send MPEG2-TS service headers (flag [[en:software:msd:config#fMPEG2TSAnalyzing|fMPEG2TSAnalyzing]] in the config file).\\ |
| It is necessary to initialize the decoder client and not drop a MPEG2-TS packets in the search of a service data. Just Stream Hub can send specified in [[en:software:msd:config#precache|config file]] / [[en:software:msd:urls#precache|URL query]] number of kilobytes precache from the ring buffer.\\ |
| |
| |
==== Виды Stream Hub ==== | ==== Types Stream Hub ==== |
* статические каналы: описываются в конфиг файле, могут иметь несколько источников с разными настройками | * static channels: described in the config file, may have multiple sources with different settings |
* динамический - multicast: совместимы с udpxy по URL, например: http://192.168.0.1:7088/udp/238.1.1.15:1234 | * dynamic - multicast: compatible with udpxy by URL, for example: http://192.168.0.1:7088/udp/238.1.1.15:1234 |
* динамический - http: в качестве источника потока в URL выступает другой сервер, например: http://192.168.0.1:7088/http/SomeServer.tv:7088/udp/239.0.0.116:4000 | * dynamic - http: As the source stream URL acts another server, for example: http://192.168.0.1:7088/http/SomeServer.tv:7088/udp/239.0.0.116:4000 |
* динамический - transparent: тоже что и http но поле host в запросе указывает на другой сервер, например: http://SomeServer.tv:7088/udp/239.0.0.116:4000 | * dynamic - transparent: the same as http but the field host in the HTTP header points to another server, for example: http://SomeServer.tv:7088/udp/239.0.0.116:4000 |
| |