From patchwork Thu Jun 28 00:51:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Holljes X-Patchwork-Id: 9546 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:104:0:0:0:0:0 with SMTP id c4-v6csp1483913jad; Wed, 27 Jun 2018 17:59:52 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeIA/LCMY+jCnfeCioqu7S4mOCk0PAiCKuIpiJY58OcE5kRwyiiszjer/qbnq5T/cpU/t0r X-Received: by 2002:adf:8142:: with SMTP id 60-v6mr6734149wrm.192.1530147592292; Wed, 27 Jun 2018 17:59:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530147592; cv=none; d=google.com; s=arc-20160816; b=T4+iIshYYICUiKc9nt99Djf7HSVngsVHMNle72bZUfeHfWAdVS/2zLFyJrN0BAvwmS opk8wXzJf/BT3/uIHUtxtvsavOBsyB1vIzKXu+mGx+CK2SMoG0DWyoSQdsihPL8V4PHH GOSV/d4fDDLKeTi4VIebPmB0WOYz9AqW3HpAba73uqCck+HNG71kjKL96GASAE/4E0/+ q3JCTZOL2ytHkr7K3waJsp+1KGrw4COoGfN40iuLL+/uHCrMkyR6Nr03J0xFBxgKpfG3 ThDqiZvzuTj1Eb2QWEakfJyZ7hdSdC8iGQRGkOR4kQLl5iHtPv9T4+9/XlC5bo6tv8ad Yb+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=l739I2YIyEtJimh4wrvx0KOH0kXeE4bZbHgs97GXuoA=; b=qUQgplM1CXiFnWtlyRWgrzDhW+Hd22FjDLOzFNb3/8+mbKskI8otg3gW4a/nBe3V42 IfjpKxltPcKlR+qWDhZq3Hb6pIFViFTFmFI8HSIStxXcRRdFkXeaLh1VWd+yM6JA73EW W+06AB4ukOwgOGqp2LtocwiiwRliuYkH00cHQRvIwblQ5TKkzRouxurMiflbuI81V3Zj BjgHATGAByY1chH/ZkIUgXxegh19znrsAPh0h71wdg9qx60o0mASyJeu6QzGUTsQxvbu Lw3/jF433nYgNEe/z28sK2ZtVVMM44IeXvE8nd1P/qCbkrf5zcoG9X6CwPA1BUCcohsF tmBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@googlemail.com header.s=20161025 header.b="L6/S8X6M"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id f10-v6si2284978wmi.205.2018.06.27.17.59.51; Wed, 27 Jun 2018 17:59:52 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@googlemail.com header.s=20161025 header.b="L6/S8X6M"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7F81568A558; Thu, 28 Jun 2018 03:59:49 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 11D8F68A410 for ; Thu, 28 Jun 2018 03:59:43 +0300 (EEST) Received: by mail-wm0-f67.google.com with SMTP id n17-v6so6697694wmh.2 for ; Wed, 27 Jun 2018 17:59:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=K8BY+QVDb8lkmEqKybrEEmJh8lO7CcMHSnD+kWYCQR8=; b=L6/S8X6Me3RODDzC8RedGKzHGfJUJ8HjWsMJKz/A6pURQdtsAHyV6XJeKViOLP+PFT e9GUD7M2bvCfNacjJ03gTOX2kFthFolOZ8ckIG4Obi/cTuGQIFAqX4OlAuu9tP2vgaXY BMJTgKZl9OeY5A0d92A5R+jvsXnHInN9IIXWEumwSl2v/G2ZgEnNgtfud9pGZdwQETWm DoaQKoZh5HpHeTj7+cINS2fAxZktFrL8Wbd7bOkQM3+R5q152ywhbGgcmYFOe1C0B0JU bAJJ8ymi/sQekn4YT44oEDUzn05rjEgNCHK5q/Pf+IbkMONjJn09hDyrMk0XQsgaxW/8 vtLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=K8BY+QVDb8lkmEqKybrEEmJh8lO7CcMHSnD+kWYCQR8=; b=cIOjHy79ZCuDY9TFXO073+9PwsYWqrofyA8eyGjZRDrCA4en8eG9KRxpW9vkgRCGXt Jx8auuF+VTi8f66a/n92kOcnWrtOd/d6AJZhXlDQZY4DKLq6imKy4ZN83NL6BLTMa9tB b6QHH9PuC289ynAIu2yU/ZWY1HZvtWFpQ2vN0foagFIIgdW/EdZ2+Tz9PcTS3rXTQNjh Y54AKGuGeM+C34WTWUGhajZ/xv0/53ZH6Kgm/ZYBd3t0dunugVW3MlGsAll+pIhg8bc3 t7+AtupKVLNHOtSqJUIG4uyGXb/ba2BFRfr5nvnUP3+/7NXQrZfT6MeazoXvx8NwCHDA DbAg== X-Gm-Message-State: APt69E0SzjjgLtvcD01K665kkYMPiOE99yZJs9lYAOD4y09g70JsLofW i0rNPrWNijhDVZwpCKqBOIEuoQ== X-Received: by 2002:a1c:6b51:: with SMTP id g78-v6mr6740512wmc.149.1530147107092; Wed, 27 Jun 2018 17:51:47 -0700 (PDT) Received: from localhost.localdomain ([46.5.2.0]) by smtp.gmail.com with ESMTPSA id a9-v6sm1363017wrq.1.2018.06.27.17.51.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jun 2018 17:51:46 -0700 (PDT) From: Stephan Holljes To: ffmpeg-devel@ffmpeg.org Date: Thu, 28 Jun 2018 02:51:17 +0200 Message-Id: <20180628005117.18902-18-klaxa1337@googlemail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180628005117.18902-1-klaxa1337@googlemail.com> References: <20180628005117.18902-1-klaxa1337@googlemail.com> Subject: [FFmpeg-devel] [PATCH 17/17] Update Documentation.txt X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Stephan Holljes MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Stephan Holljes --- Documentation.txt | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Documentation.txt b/Documentation.txt index c8fef11..3eb52b8 100644 --- a/Documentation.txt +++ b/Documentation.txt @@ -12,13 +12,18 @@ the server is currently reading (including the short buffer). The stream received by the clients is simply an HTTP response to an HTTP request. +HLS and DASH streaming are also supported. The corresponding files are written +to directories corresponding to the server and stream name. A fileserver thread +is started on a per-server basis depending on whether HLS or DASH was requested. + Documentation ------------- -The current implementation has three different types of work that is done in +The current implementation has four different types of work that is done in different threads. These types are: reading a stream, accepting HTTP -connections and writing media data to clients. +connections and writing media data to clients. This is split into serving +static files and serving dynamic matroska content. The design tries to follow a Publisher-Subscriber-Pattern. The PublisherContext struct contains buffers of read media data and the list of clients. Clients @@ -56,7 +61,7 @@ The HTTPDInterface struct takes the following function pointers: struct HTTPDInterface { int (*init) (void **server, struct HTTPDConfig config); int (*free) (void *server); - int (*accept)(void *server, struct HTTPClient **client, int reply_code); + int (*accept)(void *server, struct HTTPClient **client, const char **valid_files); int (*write) (void *server, struct HTTPClient *client, const unsigned char *buf, int size); int (*read) (void *server, struct HTTPClient *client, unsigned char *buf, int size); void (*close)(void *server, struct HTTPClient *client); @@ -72,9 +77,10 @@ read and where to serve them. A sample config is supplied as sample_config.lua. This sample config defines two servers with a total of three streams. The first server serves two streams on all interfaces on port 8080, while the second server serves one stream on 127.0.0.1. The streams can be received by -requesting the configured stream name as the GET parameter in the HTTP request. -In the sample config, this would be "http://:8080/default_stream" -for the first stream. +requesting the stream and the desired format as the GET parameter of the request +in the form of: // +In the sample config, this would be "http://:8080/default_stream/mkv" +for the first stream. Other formats are "hls" and "dash". The stream is read in real time from whatever resource it is retrieved. Currently a maximum of 16 clients is implemented.