aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dvb/dmx.h
diff options
context:
space:
mode:
authorMark Purcell <msp@debian.org>2008-06-22 11:00:40 +1000
committeretobi <git@e-tobi.net>2013-09-03 09:48:42 +0200
commit891c51ff368ed700dec6025eeb47ce4d96f76418 (patch)
tree3729664829e4faa691d403274f38eb10890b533c /include/linux/dvb/dmx.h
parent1c6e1f28f54ec2606c23936c1d8689f2be55a86c (diff)
parentab959d7b4194715870128e616b8e29d4a101e488 (diff)
downloadlinux-dvb-apps-891c51ff368ed700dec6025eeb47ce4d96f76418.tar.gz
Imported Debian patch 1.1.1+rev1207-1debian/1.1.1+rev1207-1
Diffstat (limited to 'include/linux/dvb/dmx.h')
-rw-r--r--include/linux/dvb/dmx.h181
1 files changed, 0 insertions, 181 deletions
diff --git a/include/linux/dvb/dmx.h b/include/linux/dvb/dmx.h
deleted file mode 100644
index 62e6217..0000000
--- a/include/linux/dvb/dmx.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * dmx.h
- *
- * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
- * & Ralph Metzler <ralph@convergence.de>
- for convergence integrated media GmbH
- *
- * This program 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 program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef _DVBDMX_H_
-#define _DVBDMX_H_
-
-#include <asm/types.h>
-#ifdef __KERNEL__
-#include <linux/time.h>
-#else
-#include <time.h>
-#endif
-
-
-#define DMX_FILTER_SIZE 16
-
-typedef enum
-{
- DMX_OUT_DECODER, /* Streaming directly to decoder. */
- DMX_OUT_TAP, /* Output going to a memory buffer */
- /* (to be retrieved via the read command).*/
- DMX_OUT_TS_TAP /* Output multiplexed into a new TS */
- /* (to be retrieved by reading from the */
- /* logical DVR device). */
-} dmx_output_t;
-
-
-typedef enum
-{
- DMX_IN_FRONTEND, /* Input from a front-end device. */
- DMX_IN_DVR /* Input from the logical DVR device. */
-} dmx_input_t;
-
-
-typedef enum
-{
- DMX_PES_AUDIO0,
- DMX_PES_VIDEO0,
- DMX_PES_TELETEXT0,
- DMX_PES_SUBTITLE0,
- DMX_PES_PCR0,
-
- DMX_PES_AUDIO1,
- DMX_PES_VIDEO1,
- DMX_PES_TELETEXT1,
- DMX_PES_SUBTITLE1,
- DMX_PES_PCR1,
-
- DMX_PES_AUDIO2,
- DMX_PES_VIDEO2,
- DMX_PES_TELETEXT2,
- DMX_PES_SUBTITLE2,
- DMX_PES_PCR2,
-
- DMX_PES_AUDIO3,
- DMX_PES_VIDEO3,
- DMX_PES_TELETEXT3,
- DMX_PES_SUBTITLE3,
- DMX_PES_PCR3,
-
- DMX_PES_OTHER
-} dmx_pes_type_t;
-
-#define DMX_PES_AUDIO DMX_PES_AUDIO0
-#define DMX_PES_VIDEO DMX_PES_VIDEO0
-#define DMX_PES_TELETEXT DMX_PES_TELETEXT0
-#define DMX_PES_SUBTITLE DMX_PES_SUBTITLE0
-#define DMX_PES_PCR DMX_PES_PCR0
-
-
-typedef enum
-{
- DMX_SCRAMBLING_EV,
- DMX_FRONTEND_EV
-} dmx_event_t;
-
-
-typedef enum
-{
- DMX_SCRAMBLING_OFF,
- DMX_SCRAMBLING_ON
-} dmx_scrambling_status_t;
-
-
-typedef struct dmx_filter
-{
- __u8 filter[DMX_FILTER_SIZE];
- __u8 mask[DMX_FILTER_SIZE];
- __u8 mode[DMX_FILTER_SIZE];
-} dmx_filter_t;
-
-
-struct dmx_sct_filter_params
-{
- __u16 pid;
- dmx_filter_t filter;
- __u32 timeout;
- __u32 flags;
-#define DMX_CHECK_CRC 1
-#define DMX_ONESHOT 2
-#define DMX_IMMEDIATE_START 4
-#define DMX_KERNEL_CLIENT 0x8000
-};
-
-
-struct dmx_pes_filter_params
-{
- __u16 pid;
- dmx_input_t input;
- dmx_output_t output;
- dmx_pes_type_t pes_type;
- __u32 flags;
-};
-
-
-struct dmx_event
-{
- dmx_event_t event;
- time_t timeStamp;
- union
- {
- dmx_scrambling_status_t scrambling;
- } u;
-};
-
-typedef struct dmx_caps {
- __u32 caps;
- int num_decoders;
-} dmx_caps_t;
-
-typedef enum {
- DMX_SOURCE_FRONT0 = 0,
- DMX_SOURCE_FRONT1,
- DMX_SOURCE_FRONT2,
- DMX_SOURCE_FRONT3,
- DMX_SOURCE_DVR0 = 16,
- DMX_SOURCE_DVR1,
- DMX_SOURCE_DVR2,
- DMX_SOURCE_DVR3
-} dmx_source_t;
-
-struct dmx_stc {
- unsigned int num; /* input : which STC? 0..N */
- unsigned int base; /* output: divisor for stc to get 90 kHz clock */
- __u64 stc; /* output: stc in 'base'*90 kHz units */
-};
-
-
-#define DMX_START _IO('o', 41)
-#define DMX_STOP _IO('o', 42)
-#define DMX_SET_FILTER _IOW('o', 43, struct dmx_sct_filter_params)
-#define DMX_SET_PES_FILTER _IOW('o', 44, struct dmx_pes_filter_params)
-#define DMX_SET_BUFFER_SIZE _IO('o', 45)
-#define DMX_GET_EVENT _IOR('o', 46, struct dmx_event)
-#define DMX_GET_PES_PIDS _IOR('o', 47, __u16[5])
-#define DMX_GET_CAPS _IOR('o', 48, dmx_caps_t)
-#define DMX_SET_SOURCE _IOW('o', 49, dmx_source_t)
-#define DMX_GET_STC _IOWR('o', 50, struct dmx_stc)
-
-#endif /*_DVBDMX_H_*/
-
win, 1, WAV_WIDTH - 1, ACS_VLINE, h); } else { wborder(win, ACS_VLINE, ACS_VLINE, ACS_HLINE, ACS_HLINE, top_left, top_right, ACS_LLCORNER, ACS_LRCORNER); } wattrset(win, COLOR_PAIR(CP_WTITLE)); mvwaddstr(win, 0, 2, title); wattroff(win, COLOR_PAIR(CP_WTITLE)); return win; } /* clear inside window content up to the right border */ void mvwclrtoborder(WINDOW *win, int y, int x) { if (x >= 1 && x <= MAXXLEN) mvwhline(win, y, x, ' ', 1 + MAXXLEN - x); } void wclrtoborder(WINDOW *win) { int x, y; getyx(win, y, x); mvwclrtoborder(win, y, x); } void waddstr_center(WINDOW *win, int y, const char *s) { mvwaddstr(win, y, (WAV_WIDTH - strlen(s)) / 2, s); } void waddstr_b(WINDOW *win, const char *s) { wattron(win, A_BOLD); waddstr(win, s); wattroff(win, A_BOLD); } /* Enforce that @str is at most @len characters (excluding the terminal '\0') */ const char *curtail(const char *str, const char *sep, int len) { static char out_buf[128]; const char fallback_sep[] = "~"; int l = 0, front, mid, back; if (len >= sizeof(out_buf)) len = sizeof(out_buf) - 1; if (sep == NULL || *sep == '\0') sep = fallback_sep; mid = strlen(sep); if (mid > len) { sep = fallback_sep; mid = strlen(sep); } if (str != NULL) l = strlen(str); if (l <= len) return str; front = (len - mid)/2.0 + 0.5; back = len - front - mid; strncpy(out_buf, str, front); strncpy(out_buf + front, sep, mid); strncpy(out_buf + front + mid, str + l - back, back + 1); return out_buf; } static double interpolate(const double val, const double min, const double max) { return val < min ? 0 : val > max ? 1 : (val - min) / (max - min); } void waddbar(WINDOW *win, int y, float v, float min, float max, char *cscale, bool rev) { chtype ch = '=' | A_BOLD | cp_from_scale(v, cscale, rev); int len = MAXXLEN * interpolate(v, min, max); mvwhline(win, y, 1, ch, len); mvwclrtoborder(win, y, len + 1); } void waddthreshold(WINDOW *win, int y, float v, float tv, float minv, float maxv, char *cscale, chtype tch) { if (tv > minv && tv < maxv) { if (v > tv) tch |= COLOR_PAIR(CP_STANDARD); else tch |= cp_from_scale(v, cscale, true); mvwaddch(win, y, 1 + MAXXLEN * interpolate(tv, minv, maxv), tch); } }