aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libucsi/dvb/transport_stream_descriptor.h
blob: 1797ec5344780e0a6438ab00765336ad53a18383 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*
 * section and descriptor parser
 *
 * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
 * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 */

#ifndef _UCSI_DVB_TRANSPORT_STREAM_DESCRIPTOR
#define _UCSI_DVB_TRANSPORT_STREAM_DESCRIPTOR 1

#ifdef __cplusplus
extern "C"
{
#endif

#include <libucsi/descriptor.h>
#include <libucsi/endianops.h>

/**
 * dvb_transport_stream_descriptor structure.
 */
struct dvb_transport_stream_descriptor {
	struct descriptor d;

	/* uint8_t data[] */
} __ucsi_packed;

/**
 * Process dvb_transport_stream_descriptor structure.
 *
 * @param d Pointer to generic descriptor.
 * @return dvb_transport_stream_descriptor structure or NULL on error.
 */
static inline struct dvb_transport_stream_descriptor*
	dvb_transport_stream_descriptor_codec(struct descriptor* d)
{
	return (struct dvb_transport_stream_descriptor*) d;
}

/**
 * Retrieve a pointer to the data field of a dvb_transport_stream_descriptor.
 *
 * @param d dvb_transport_stream_descriptor structure.
 * @return Pointer to data field.
 */
static inline uint8_t *
	dvb_transport_stream_descriptor_data(struct dvb_transport_stream_descriptor *d)
{
	return (uint8_t *) d + sizeof(struct dvb_transport_stream_descriptor);
}

/**
 * Calculate the length of the data field of a dvb_transport_stream_descriptor.
 *
 * @param d dvb_transport_stream_descriptor structure.
 * @return length of data field in bytes.
 */
static inline int
	dvb_transport_stream_descriptor_data_length(struct dvb_transport_stream_descriptor *d)
{
	return d->d.len;
}

#ifdef __cplusplus
}
#endif

#endif
-0410-b409-cd5a39f66f1f 2005-04-05[lcd4linux @ 2005-04-05 04:46:06 by reinelt]reinelt1-1/+20 ceil/floor patch from Maxime git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@526 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-04-04[lcd4linux @ 2005-04-04 20:11:14 by nicowallmeier]nicowallmeier1-2/+6 to be compatible with gcc 2.95 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@525 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-04-03[lcd4linux @ 2005-04-03 07:07:43 by reinelt]reinelt8-9/+152 added statfs plugin git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@524 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-04-02[lcd4linux @ 2005-04-02 05:28:58 by reinelt]reinelt3-19/+27 fixed gcc4 warnings about signed/unsigned mismatches git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@523 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-04-01[lcd4linux @ 2005-04-01 05:16:04 by reinelt]reinelt5-584/+694 moved plugin init stuff to a seperate function called on first use git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@522 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-03-30[lcd4linux @ 2005-03-30 04:57:50 by reinelt]reinelt3-23/+67 Evaluator speedup: use bsearch for finding functions and variables git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@521 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-03-28[lcd4linux @ 2005-03-28 22:29:23 by reinelt]reinelt1-250/+346 HD44780 multiple displays patch from geronet git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@520 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-03-28[lcd4linux @ 2005-03-28 19:39:14 by reinelt]reinelt9-256/+1147 HD44780/I2C patch from Luis merged (still does not work for me) git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@519 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-03-25[lcd4linux @ 2005-03-25 15:44:43 by reinelt]reinelt1-2/+5 HD44780 Backlight fixed (thanks to geronet) git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@518 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-03-23[lcd4linux @ 2005-03-23 12:23:35 by reinelt]reinelt1-27/+32 fixed some signed/unsigned char mismatches in the Crystalfontz driver (ticket #12) git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@517 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-02-24[lcd4linux @ 2005-02-24 07:07:55 by reinelt]reinelt1-0/+53 ChangeLog git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@516 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-02-24[lcd4linux @ 2005-02-24 07:06:45 by reinelt]reinelt11-28/+347 SimpleLCD driver added git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@515 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-02-24[lcd4linux @ 2005-02-24 06:51:40 by reinelt]reinelt1-4/+5 LCD-Linux driver GOTO_COST corrected git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@514 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-01-30[lcd4linux @ 2005-01-30 06:43:22 by reinelt]reinelt4-69/+95 driver for LCD-Linux finished git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@513 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-01-29[lcd4linux @ 2005-01-29 09:30:56 by reinelt]reinelt1-8/+11 minor HD44780 cleanups git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@512 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-01-22[lcd4linux @ 2005-01-22 22:57:57 by reinelt]reinelt9-47/+382 LCD-Linux driver added git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@511 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-01-22[lcd4linux @ 2005-01-22 12:44:41 by reinelt]reinelt1-3/+6 MatrixOrbital backlight micro-fix git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@510 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-01-18[lcd4linux @ 2005-01-18 06:30:21 by reinelt]reinelt89-261/+603 added (C) to all copyright statements git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@509 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-01-17[lcd4linux @ 2005-01-17 06:38:48 by reinelt]reinelt1-1/+6 info about backlight and brightness git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@508 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-01-17[lcd4linux @ 2005-01-17 06:29:24 by reinelt]reinelt3-33/+85 added software-controlled backlight support to HD44780 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@507 3ae390bd-cb1e-0410-b409-cd5a39f66f1f