From patchwork Tue Apr 15 18:39:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Roth?= X-Patchwork-Id: 3995021 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D1ED8BFF02 for ; Tue, 15 Apr 2014 18:41:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1A7AC20274 for ; Tue, 15 Apr 2014 18:41:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4FAAA2026C for ; Tue, 15 Apr 2014 18:41:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755215AbaDOSla (ORCPT ); Tue, 15 Apr 2014 14:41:30 -0400 Received: from mail-ee0-f43.google.com ([74.125.83.43]:56191 "EHLO mail-ee0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754974AbaDOSl2 (ORCPT ); Tue, 15 Apr 2014 14:41:28 -0400 Received: by mail-ee0-f43.google.com with SMTP id e53so8012476eek.16 for ; Tue, 15 Apr 2014 11:41:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=h9fpeQJDomO97Vpzx7cyNheSuruOf/f++Bl9M40Y8Rc=; b=Urghie2hSI97+yZcQttsWYXWFHKd8EuJI6bZpNPl6CUKtIT1AOdGJVLXuifR03HbC5 pLNUNDXTUg/Vw7coOMPfA1wqsBTltD0mqs7hJSuvDiyTxdZ9TJINEO8t4F0eBRJmGjru Fwg2yrKsbbpIwc/vBFavnMpGSC7o2o9tqf4XijDZC8fOB4Fsosptq50ObsCtO7F/F0Ei tJMnCwazNyD4Jye/FGU+weR0o8C2sZrWgpwF4o5AaGUs8WqV7ry1omAQggxUwdMhtvpa wXhEVaaqnmwHaZsTDBKXaeMBNvDbr2QUE9fMMy5PGlBl+uQ+tXxydDXj9wgrANYbaUHH DDzA== X-Received: by 10.14.198.197 with SMTP id v45mr4655169een.9.1397587287503; Tue, 15 Apr 2014 11:41:27 -0700 (PDT) Received: from neutrino.exnihilo (29-206.60-188.cust.bluewin.ch. [188.60.206.29]) by mx.google.com with ESMTPSA id q41sm51095511eez.7.2014.04.15.11.41.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 15 Apr 2014 11:41:27 -0700 (PDT) From: =?UTF-8?q?Andr=C3=A9=20Roth?= To: linux-media@vger.kernel.org Cc: =?UTF-8?q?Andr=C3=A9=20Roth?= Subject: [PATCH 3/4] libdvbv5: short API description Date: Tue, 15 Apr 2014 20:39:32 +0200 Message-Id: <1397587173-1120-3-git-send-email-neolynx@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1397587173-1120-1-git-send-email-neolynx@gmail.com> References: <1397587173-1120-1-git-send-email-neolynx@gmail.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: André Roth --- lib/include/libdvbv5/dvb-scan.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/lib/include/libdvbv5/dvb-scan.h b/lib/include/libdvbv5/dvb-scan.h index f0af9d7..8f0e553 100644 --- a/lib/include/libdvbv5/dvb-scan.h +++ b/lib/include/libdvbv5/dvb-scan.h @@ -76,6 +76,32 @@ struct dvb_table_filter { void dvb_table_filter_free(struct dvb_table_filter *sect); +/* Read DVB table sections + * + * The following functions can be used to read DVB table sections by + * specifying a table ID and a program ID. Optionally a transport + * stream ID can be specified as well. The function will read on the + * specified demux and return when reading is done or an error has + * occurred. If table is not NULL after the call, it has to be freed + * with the apropriate free table function (even if an error has + * occurred). + * + * Returns 0 on success or a negative error code. + * + * Example usage: + * + * struct dvb_table_pat *pat; + * int r = dvb_read_section( parms, dmx_fd, DVB_TABLE_PAT, DVB_TABLE_PAT_PID, (void **) &pat, 5 ); + * if (r < 0) + * dvb_logerr("error reading PAT table"); + * else { + * // do something with pat + * } + * if (pat) + * dvb_table_pat_free( pat ); + * + */ + int dvb_read_section(struct dvb_v5_fe_parms *parms, int dmx_fd, unsigned char tid, uint16_t pid, void **table, unsigned timeout);