From patchwork Mon May 28 18:18:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Holljes X-Patchwork-Id: 9122 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:11c:0:0:0:0:0 with SMTP id c28-v6csp2229472jad; Mon, 28 May 2018 11:25:34 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKj2hngqu3TAh/Yv9wYhICwE8Ilkkpr8od9PqOxN9Ce+BnEIh0v3dqaHuzj69lM7dlArm08 X-Received: by 2002:a1c:91c4:: with SMTP id t187-v6mr8554451wmd.19.1527531934890; Mon, 28 May 2018 11:25:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527531934; cv=none; d=google.com; s=arc-20160816; b=Nu6Im6ZnLp7BRmJW8BT6e7EViej0qIkSHAT8IYCT6G7T20iFVATb5hjkVXTxcw46P0 ieMHVsFfe15nS0VqJX19gG/swhTzDFXSD4yr4fPPMxoXOrlo5PbrsyzqNnbVo6NwfDvg SZhjRKEbG/Y1eXF7ye59UqHECt+bK1drzS2rhegTpa3LJw933LnreR50vTQbBXhKwFT0 ucwJmjrKec0TpebFZjn3C9lUKv1KCq8isgNmp5ENYs9RdBeHeGR46JCFT/u4tqANJ0LS ECvrNoGzuyPqzmxYLzeZ+uG/c6Psix9EeoKezmMfjLA2P6UWg3+qzKJLEBv2xwgYkuKC FT3Q== 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=Lfl4UeOHG4bbk+gDlJJCjOa+CbhOq8gszSJcFOIam0U=; b=bTJ6B8AkkuQnMD0Q+wJY2VAjjMtm8g6D72LVLEduLDMqgyCSFgbBgnBkMwmQPs5HyD SbetKCfFPdJnp070E92yWkQOH9Gup1UL7g89MWdz9cHon/kXv9U5X+06bWu9iX0JuRTK xv+yv14rhFzP49jJDFOtry7OZRqh3RGlh6W8NowDMIT9gxIhINFE/zVHtnS9Idikyrjq kke7IJG7AoVBCJH4rMXB4QnYDeePB64VM8n2881r8sDdYspJnA73ysuGjImKE5hqGWIr SDarNrxSaBWrtMAswSdETj23PpiJtWUV+uvmwzOdPrtIHu0V6BfNS/rTD66nLhPbF9FY 2L2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@googlemail.com header.s=20161025 header.b=ILznrbrJ; 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 x66-v6si10151579wmg.226.2018.05.28.11.25.34; Mon, 28 May 2018 11:25:34 -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=ILznrbrJ; 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 79BB068A2DD; Mon, 28 May 2018 21:24:49 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 881D6680877 for ; Mon, 28 May 2018 21:24:43 +0300 (EEST) Received: by mail-wm0-f51.google.com with SMTP id o78-v6so34268700wmg.0 for ; Mon, 28 May 2018 11:25:27 -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=x6ZJp6r5YjFGHS8/++I8QP820TVYQgjDd9i1iKYMo+I=; b=ILznrbrJjCKnZ0oDkWWoHLhSdIuMCID4YnKmjtoUWbuE7zScUA9YXTeLyL1wqDWab8 Ft6Q4FjeuSjrVnugAaFQE7C960vpVL+LfZrAhIsrolGzpKmgsjEybLrQLsFYQsh55RGM y8pbyf85xjsxJv7iyyCxfDF7cbdKkzj2LIjusO2IzQyIyEH7XFB9b6AG8RDtjUatnh8n Z3RVdTpn+mmY8I4YoFWK4LHvzV9TEidmXIkn/1uJAR0Hdgrh6+5s7V8BSTIMGZLIwNQ6 KBa4njltG6PkQ9ENYGShhvoz7S1ARRE7xgbOCyaie26D6ffThdM0ju/ifRT3REUv9XAi kDRA== 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=x6ZJp6r5YjFGHS8/++I8QP820TVYQgjDd9i1iKYMo+I=; b=lWGWkuVmg963UWmEVwn1EptGxjeFp0V590y3UCjSF18VqcZr36hjEodKKnFNm/BcWR n/bgH4HliMZNLq/7boiEdaQ6hqYE+4UAZpHCHwGP+cSiKPT2+G69xMtqspP7PyvSoS1m w2awLFV8+ZZpblCMvm/NPMz4UVVF6Z4mROeUn0ZkWX01P0ENBhEW6lWXhrt7rbjLy3Xl W8bvXYoGZTq3UVeKnzK/0W1XnS8xt6HosKglE2CpvdBYbbOefWOxnkVz983ka+LphLPa hBqvk//n4mGFcT52q4acz5CnYRFDU558wB1gC4FzMBYk5afn5emixS1yLCoRFXThHSdc yMrQ== X-Gm-Message-State: ALKqPwe0RNkTY2JJQa9YfiQnWnb8q5dDyI1f/4hUOZsi9F+BH6ecDaEs 2aVNzpqdcgkFuQKK0rn0fP2OaQ== X-Received: by 2002:a1c:8b0b:: with SMTP id n11-v6mr8439518wmd.12.1527531571376; Mon, 28 May 2018 11:19:31 -0700 (PDT) Received: from localhost.localdomain ([46.5.2.0]) by smtp.gmail.com with ESMTPSA id p5-v6sm14649465wre.83.2018.05.28.11.19.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 May 2018 11:19:30 -0700 (PDT) From: Stephan Holljes To: ffmpeg-devel@ffmpeg.org Date: Mon, 28 May 2018 20:18:56 +0200 Message-Id: <20180528181859.12182-6-klaxa1337@googlemail.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180528181859.12182-1-klaxa1337@googlemail.com> References: <20180520185404.29836-1-klaxa1337@googlemail.com> <20180528181859.12182-1-klaxa1337@googlemail.com> Subject: [FFmpeg-devel] [PATCH 5/8] publisher.h: Add stream_name to PublisherContext 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 --- publisher.c | 3 ++- publisher.h | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/publisher.c b/publisher.c index 1123056..2e96f2f 100644 --- a/publisher.c +++ b/publisher.c @@ -93,11 +93,12 @@ void client_push_segment(struct Client *c, struct Segment *seg) client_set_state(c, WRITABLE); } -void publisher_init(struct PublisherContext **pub) +void publisher_init(struct PublisherContext **pub, char *stream_name) { int i; struct PublisherContext *pc = (struct PublisherContext*) av_malloc(sizeof(struct PublisherContext)); pc->nb_threads = 8; + pc->stream_name = stream_name; pc->current_segment_id = -1; pc->shutdown = 0; pc->buffer = av_fifo_alloc_array(sizeof(struct Segment), MAX_SEGMENTS); diff --git a/publisher.h b/publisher.h index 97b745d..e25c33d 100644 --- a/publisher.h +++ b/publisher.h @@ -73,6 +73,7 @@ struct PublisherContext { int nb_threads; int current_segment_id; int shutdown; // indicate shutdown, gracefully close client connections and files and exit + char *stream_name; }; /** @@ -101,8 +102,9 @@ void client_set_state(struct Client *c, enum State state); * Allocate and initialize a PublisherContext * * @param pub pointer to a pointer to a PublisherContext. It will be allocated and initialized. + * @param stream_name string containing the name of the stream. */ -void publisher_init(struct PublisherContext **pub); +void publisher_init(struct PublisherContext **pub, char *stream_name); /** * Push a Segment to a PublisherContext.