xine-lib: xine-lib-1.2.12/src/input/input_dvb.c File Reference

xine-lib 1.2.12

Data Structures | Macros | Functions | Variables
input_dvb.c File Reference
`#include <pthread.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <sys/types.h>`
`#include <sys/stat.h>`
`#include <unistd.h>`
`#include <fcntl.h>`
`#include <string.h>`
`#include <errno.h>`
`#include <sys/time.h>`
`#include <sys/ioctl.h>`
`#include <poll.h>`
`#include <sys/poll.h>`
`#include <time.h>`
`#include <ctype.h>`
`#include <basedir.h>`
`#include <linux/dvb/dmx.h>`
`#include <linux/dvb/frontend.h>`
`#include <xine/xine_internal.h>`
`#include <xine/xineutils.h>`
`#include <xine/input_plugin.h>`
`#include "net_buf_ctrl.h"`
`#include "input_helper.h"`

## Data Structures
struct | tuner_t
struct | epg_entry_t
struct | channel_t
struct | dvb_input_class_t
struct | dvb_input_plugin_t
struct | Param

## Macros
#define | LOG_MODULE "input_dvb"
#define | LOG_VERBOSE
#define | BUFSIZE 16384
#define | DVB_NOPID 0xffff
#define | INTERNAL_FILTER 0
#define | PATFILTER 1
#define | PMTFILTER 2
#define | EITFILTER 3
#define | PCRFILTER 4
#define | VIDFILTER 5
#define | AUDFILTER 6
#define | AC3FILTER 7
#define | TXTFILTER 8
#define | MAX_FILTERS 9
#define | MAX_AUTOCHANNELS 200
#define | MAX_SUBTITLES 4
#define | MOUSE_BUTTON_LEFT 1
#define | MOUSE_BUTTON_MIDDLE 2
#define | MOUSE_BUTTON_RIGHT 3
#define | MOUSE_WHEEL_UP 4
#define | MOUSE_WHEEL_DOWN 5
#define | MOUSE_SIDE_LEFT 6
#define | MOUSE_SIDE_RIGHT 7
#define | EPG_UPDATE_DELAY 60
#define | EPG_WIDTH 520
#define | EPG_HEIGHT 620
#define | EPG_TOP 50
#define | EPG_CHANNEL_FONT_SIZE 32
#define | EPG_CLOCK_FONT_SIZE 18
#define | EPG_TITLE_FONT_SIZE 24
#define | EPG_CONTENT_FONT_SIZE 18
#define | EPG_DESCRIPTION_FONT_SIZE 18
#define | EPG_PIXELS_BETWEEN_TEXT_ROWS 2
#define | EPG_PIXELS_BETWEEN_PROGRAM_ENTRIES 2
#define | EPG_BACKGROUND_MARGIN 5
#define | MAX_EPG_PROGRAM_NAME_LENGTH 255
#define | MAX_EPG_PROGRAM_DESCRIPTION_LENGTH 255
#define | MAX_EPG_CONTENT_TYPE_LENGTH 20
#define | MAX_EPG_ENTRIES_PER_CHANNEL 10
#define | MAX_EPG_ENTRY_LATENESS 5*60.0
#define | CHSEL_WIDTH 600
#define | CHSEL_HEIGHT 400
#define | CHSEL_CHANNEL_FONT_SIZE 26
#define | CHSEL_PROGRAM_NAME_FONT_SIZE 12
#define | bcdtoint(i) ((((i & 0xf0) >> 4) * 10) + (i & 0x0f))
#define | find_param(list, name) find_param_0(list, sizeof(list)/sizeof(list[0]), name)
#define | PKT_SIZE 188
#define | BODY_SIZE (188-4)

## Functions
static time_t | dvb_mjdtime (uint8_t *buf)
static void | load_epg_data (dvb_input_plugin_t *this)
static void | show_eit (dvb_input_plugin_t *this)
static void | print_error (const char *estring)
static unsigned int | getbits (unsigned char *buffer, unsigned int bitpos, unsigned int bitcount)
static int | find_descriptor (uint8_t tag, const unsigned char *buf, int descriptors_loop_len, const unsigned char **desc, int *desc_len)
static void | tuner_dispose (tuner_t *this)
static tuner_t * | tuner_init (xine_t *xine, int adapter)
static int | dvb_set_pidfilter (dvb_input_plugin_t *this, int filter, ushort pid, int pidtype, int taptype)
static int | dvb_set_sectfilter (dvb_input_plugin_t *this, int filter, ushort pid, int pidtype, uint8_t table, uint8_t mask)
static int | find_param_0 (const Param *list, size_t list_size, const char *name)
static int | extract_channel_from_string_internal (channel_t *channel, char *str, fe_type_t fe_type)
static int | extract_channel_from_string (channel_t *channel, char *str, fe_type_t fe_type)
static channel_t * | load_channels (xine_t *xine, xine_stream_t *stream, int *num_ch, fe_type_t fe_type)
static void | free_channel_list (channel_t *channels, int num_channels)
static int | tuner_set_diseqc (tuner_t *this, channel_t *c)
static int | tuner_tune_it (tuner_t *this, struct dvb_frontend_parameters *front_param)
static void | parse_pmt (dvb_input_plugin_t *this, const unsigned char *buf, int section_length)
static void | dvb_parse_si (dvb_input_plugin_t *this)
static int | channel_index (dvb_input_plugin_t *this, int service_id)
static int | compare_epg_by_starttime (const void *a, const void *b)
static int | epg_with_starttime (channel_t *channel, time_t starttime)
static void | render_text_area (osd_renderer_t *renderer, osd_object_t *osd, const char *text, int x, int y, int row_space, int max_x, int max_y, int *height, int color_base)
static epg_entry_t * | ith_next_epg (channel_t *channel, int count)
static epg_entry_t * | current_epg (channel_t *channel)
static epg_entry_t * | next_epg (channel_t *channel)
static void | show_program_info (int x, int y, int max_x, int max_y, int *last_y, epg_entry_t *epg_data, osd_renderer_t *renderer, osd_object_t *osd)
static int | tuner_set_channel (dvb_input_plugin_t *this, channel_t *c)
static void | osd_show_channel (dvb_input_plugin_t *this, int channel)
static int | switch_channel (dvb_input_plugin_t *this, int channel)
static void | do_record (dvb_input_plugin_t *this)
static void | dvb_event_handler (dvb_input_plugin_t *this)
static void | ts_rewrite_packets (dvb_input_plugin_t *this, unsigned char *originalPkt, int len)
static off_t | dvb_plugin_read (input_plugin_t *this_gen, void *buf_gen, off_t len)
static off_t | dvb_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin)
static off_t | dvb_plugin_get_current_pos (input_plugin_t *this_gen)
static void | dvb_plugin_dispose (input_plugin_t *this_gen)
static const char * | dvb_plugin_get_mrl (input_plugin_t *this_gen)
static void | dvb_zoom_cb (void *this_gen, xine_cfg_entry_t *cfg)
static int | dvb_plugin_open (input_plugin_t *this_gen)
static int | dvb_plugin_get_optional_data (input_plugin_t *this_gen, void *data, int data_type)
static input_plugin_t * | dvb_class_get_instance (input_class_t *class_gen, xine_stream_t *stream, const char *data)
static void | dvb_class_dispose (input_class_t *this_gen)
static int | dvb_class_eject_media (input_class_t *this_gen)
static const char *const * | dvb_class_get_autoplay_list (input_class_t *this_gen, int *num_files)
static void * | init_class (xine_t *xine, const void *data)

## Variables
static const Param | inversion_list []
static const Param | bw_list []
static const Param | fec_list []
static const Param | guard_list []
static const Param | hierarchy_list []
static const Param | atsc_list []
static const Param | qam_list []
static const Param | transmissionmode_list []
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ AC3FILTER

#define AC3FILTER 7

## ◆ AUDFILTER

#define AUDFILTER 6

## ◆ bcdtoint

#define bcdtoint | ( |  | i | ) | ((((i & 0xf0) >> 4) * 10) + (i & 0x0f))

## ◆ BODY_SIZE

#define BODY_SIZE (188-4)

## ◆ BUFSIZE

#define BUFSIZE 16384

## ◆ CHSEL_CHANNEL_FONT_SIZE

#define CHSEL_CHANNEL_FONT_SIZE 26

## ◆ CHSEL_HEIGHT

#define CHSEL_HEIGHT 400

## ◆ CHSEL_PROGRAM_NAME_FONT_SIZE

#define CHSEL_PROGRAM_NAME_FONT_SIZE 12

## ◆ CHSEL_WIDTH

#define CHSEL_WIDTH 600

## ◆ DVB_NOPID

#define DVB_NOPID 0xffff

## ◆ EITFILTER

#define EITFILTER 3

## ◆ EPG_BACKGROUND_MARGIN

#define EPG_BACKGROUND_MARGIN 5

## ◆ EPG_CHANNEL_FONT_SIZE

#define EPG_CHANNEL_FONT_SIZE 32

## ◆ EPG_CLOCK_FONT_SIZE

#define EPG_CLOCK_FONT_SIZE 18

## ◆ EPG_CONTENT_FONT_SIZE

#define EPG_CONTENT_FONT_SIZE 18

## ◆ EPG_DESCRIPTION_FONT_SIZE

#define EPG_DESCRIPTION_FONT_SIZE 18

## ◆ EPG_HEIGHT

#define EPG_HEIGHT 620

## ◆ EPG_PIXELS_BETWEEN_PROGRAM_ENTRIES

#define EPG_PIXELS_BETWEEN_PROGRAM_ENTRIES 2

## ◆ EPG_PIXELS_BETWEEN_TEXT_ROWS

#define EPG_PIXELS_BETWEEN_TEXT_ROWS 2

## ◆ EPG_TITLE_FONT_SIZE

#define EPG_TITLE_FONT_SIZE 24

## ◆ EPG_TOP

#define EPG_TOP 50

## ◆ EPG_UPDATE_DELAY

#define EPG_UPDATE_DELAY 60

## ◆ EPG_WIDTH

#define EPG_WIDTH 520

## ◆ find_param

#define find_param | ( |  | list,
|  |  | name
| ) |  | find_param_0(list, sizeof(list)/sizeof(list[0]), name)

## ◆ INTERNAL_FILTER

#define INTERNAL_FILTER 0

## ◆ LOG_MODULE

#define LOG_MODULE "input_dvb"

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## ◆ MAX_AUTOCHANNELS

#define MAX_AUTOCHANNELS 200

## ◆ MAX_EPG_CONTENT_TYPE_LENGTH

#define MAX_EPG_CONTENT_TYPE_LENGTH 20

## ◆ MAX_EPG_ENTRIES_PER_CHANNEL

#define MAX_EPG_ENTRIES_PER_CHANNEL 10

## ◆ MAX_EPG_ENTRY_LATENESS

#define MAX_EPG_ENTRY_LATENESS 5*60.0

## ◆ MAX_EPG_PROGRAM_DESCRIPTION_LENGTH

#define MAX_EPG_PROGRAM_DESCRIPTION_LENGTH 255

## ◆ MAX_EPG_PROGRAM_NAME_LENGTH

#define MAX_EPG_PROGRAM_NAME_LENGTH 255

## ◆ MAX_FILTERS

#define MAX_FILTERS 9

## ◆ MAX_SUBTITLES

#define MAX_SUBTITLES 4

## ◆ MOUSE_BUTTON_LEFT

#define MOUSE_BUTTON_LEFT 1

## ◆ MOUSE_BUTTON_MIDDLE

#define MOUSE_BUTTON_MIDDLE 2

## ◆ MOUSE_BUTTON_RIGHT

#define MOUSE_BUTTON_RIGHT 3

## ◆ MOUSE_SIDE_LEFT

#define MOUSE_SIDE_LEFT 6

## ◆ MOUSE_SIDE_RIGHT

#define MOUSE_SIDE_RIGHT 7

## ◆ MOUSE_WHEEL_DOWN

#define MOUSE_WHEEL_DOWN 5

## ◆ MOUSE_WHEEL_UP

#define MOUSE_WHEEL_UP 4

## ◆ PATFILTER

#define PATFILTER 1

## ◆ PCRFILTER

#define PCRFILTER 4

## ◆ PKT_SIZE

#define PKT_SIZE 188

## ◆ PMTFILTER

#define PMTFILTER 2

## ◆ TXTFILTER

#define TXTFILTER 8

## ◆ VIDFILTER

#define VIDFILTER 5

## Function Documentation

## ◆ channel_index()

static int channel_index | ( | dvb_input_plugin_t * | this,
|  | int | service_id
| ) |  |
| static

Referenced by load_epg_data().

## ◆ compare_epg_by_starttime()

static int compare_epg_by_starttime | ( | const void * | a,
|  | const void * | b
| ) |  |
| static

Referenced by load_epg_data().

## ◆ current_epg()

static epg_entry_t * current_epg | ( | channel_t * | channel | ) |
| static

References ith_next_epg(), NULL, epg_entry_t::progname, and epg_entry_t::running.

Referenced by load_epg_data(), osd_show_channel(), show_eit(), and switch_channel().

## ◆ do_record()

static void do_record | ( | dvb_input_plugin_t * | this | ) |
| static

References _x_assert, _x_freep(), name, NULL, OSD_TEXT3, xine_cfg_entry_s::str_value, xine_config_lookup_entry(), xine_create_cloexec(), xine_get_homedir(), XINE_VERBOSITY_LOG, and xprintf.

Referenced by dvb_event_handler(), and dvb_plugin_read().

## ◆ dvb_class_dispose()

static void dvb_class_dispose | ( | input_class_t * | this_gen | ) |
| static

References _x_freep().

Referenced by init_class().

## ◆ dvb_class_eject_media()

static int dvb_class_eject_media | ( | input_class_t * | this_gen | ) |
| static

Referenced by init_class().

## ◆ dvb_class_get_autoplay_list()

static const char *const * dvb_class_get_autoplay_list | ( | input_class_t * | this_gen,
|  | int * | num_files
| ) |  |
| static

References _, _x_asprintf(), _x_assert, tuner_t::feinfo, free_channel_list(), load_channels(), MAX_AUTOCHANNELS, name, NULL, xine_cfg_entry_s::num_value, tuner_dispose(), tuner_init(), xine_config_lookup_entry(), XINE_VERBOSITY_LOG, and xprintf.

Referenced by init_class().

## ◆ dvb_class_get_instance()

static input_plugin_t * dvb_class_get_instance | ( | input_class_t * | class_gen,
|  | xine_stream_t * | stream,
|  | const char * | data
| ) |  |
| static

References _x_input_default_get_blocksize(), _x_input_default_get_length(), _x_input_default_read_block(), _x_input_get_capabilities_none(), dvb_plugin_dispose(), dvb_plugin_get_current_pos(), dvb_plugin_get_mrl(), dvb_plugin_get_optional_data(), dvb_plugin_open(), dvb_plugin_read(), dvb_plugin_seek(), nbc_init, and NULL.

Referenced by init_class().

## ◆ dvb_event_handler()

static void dvb_event_handler | ( | dvb_input_plugin_t * | this | ) |
| static

References xine_event_t::data, do_record(), input(), MOUSE_BUTTON_LEFT, MOUSE_SIDE_LEFT, MOUSE_SIDE_RIGHT, MOUSE_WHEEL_DOWN, MOUSE_WHEEL_UP, NULL, osd_show_channel(), OSD_TEXT3, show_eit(), switch_channel(), xine_event_t::type, xine_event_free(), xine_event_get(), XINE_EVENT_INPUT_DOWN, XINE_EVENT_INPUT_MENU1, XINE_EVENT_INPUT_MENU2, XINE_EVENT_INPUT_MENU3, XINE_EVENT_INPUT_MENU4, XINE_EVENT_INPUT_MENU7, XINE_EVENT_INPUT_MOUSE_BUTTON, XINE_EVENT_INPUT_NEXT, XINE_EVENT_INPUT_PREVIOUS, XINE_EVENT_INPUT_SELECT, XINE_EVENT_INPUT_UP, XINE_PARAM_VO_ZOOM_X, XINE_PARAM_VO_ZOOM_Y, xine_set_param(), XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by dvb_plugin_read().

## ◆ dvb_mjdtime()

static time_t dvb_mjdtime | ( | uint8_t * | buf | ) |
| static

References _x_assert, bcdtoint, and NULL.

Referenced by load_epg_data().

## ◆ dvb_parse_si()

static void dvb_parse_si | ( | dvb_input_plugin_t * | this | ) |
| static

References _x_assert, AUDFILTER, dvb_set_pidfilter(), dvb_set_sectfilter(), EITFILTER, getbits(), INTERNAL_FILTER, NULL, parse_pmt(), VIDFILTER, xine_usec_sleep(), XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.

Referenced by dvb_plugin_open(), and switch_channel().

## ◆ dvb_plugin_dispose()

static void dvb_plugin_dispose | ( | input_plugin_t * | this_gen | ) |
| static

References _x_freep(), free_channel_list(), MAX_EPG_ENTRIES_PER_CHANNEL, nbc_close, NULL, tuner_dispose(), and xine_event_dispose_queue().

Referenced by dvb_class_get_instance().

## ◆ dvb_plugin_get_current_pos()

static off_t dvb_plugin_get_current_pos | ( | input_plugin_t * | this_gen | ) |
| static

Referenced by dvb_class_get_instance().

## ◆ dvb_plugin_get_mrl()

static const char * dvb_plugin_get_mrl | ( | input_plugin_t * | this_gen | ) |
| static

Referenced by dvb_class_get_instance().

## ◆ dvb_plugin_get_optional_data()

static int dvb_plugin_get_optional_data | ( | input_plugin_t * | this_gen,
|  | void * | data,
|  | int | data_type
| ) |  |
| static

References INPUT_OPTIONAL_DATA_DEMUXER, INPUT_OPTIONAL_SUCCESS, and INPUT_OPTIONAL_UNSUPPORTED.

Referenced by dvb_class_get_instance().

## ◆ dvb_plugin_open()

static int dvb_plugin_open | ( | input_plugin_t * | this_gen | ) |
| static

References _, _x_assert, _x_meta_info_set(), CHSEL_HEIGHT, CHSEL_WIDTH, xine_s::config, DVB_NOPID, dvb_parse_si(), dvb_zoom_cb(), tuner_t::dvr_device, EPG_BACKGROUND_MARGIN, EPG_HEIGHT, EPG_WIDTH, extract_channel_from_string(), tuner_t::feinfo, load_channels(), MAX_FILTERS, name, NULL, xine_cfg_entry_s::num_value, OSD_TEXT3, OSD_TEXT4, channel_t::pid, config_values_s::register_bool, tuner_dispose(), tuner_init(), tuner_set_channel(), config_values_s::update_num, config_values_s::xine, xine_config_lookup_entry(), xine_event_new_queue(), XINE_META_INFO_TITLE, xine_open_cloexec(), XINE_TEXTPALETTE_WHITE_NONE_TRANSLUCID, XINE_TEXTPALETTE_YELLOW_BLACK_TRANSPARENT, XINE_VERBOSITY_LOG, and xprintf.

Referenced by dvb_class_get_instance().

## ◆ dvb_plugin_read()

static off_t dvb_plugin_read | ( | input_plugin_t * | this_gen,
|  | void * | buf_gen,
|  | off_t | len
| ) |  |
| static

References _x_demux_control_end(), _x_demux_control_start(), _x_message(), BUF_FLAG_END_USER, do_record(), dvb_event_handler(), NULL, ts_rewrite_packets(), xine_usec_sleep(), XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.

Referenced by dvb_class_get_instance().

## ◆ dvb_plugin_seek()

static off_t dvb_plugin_seek | ( | input_plugin_t * | this_gen,
|  | off_t | offset,
|  | int | origin
| ) |  |
| static

References _x_input_seek_preview(), XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by dvb_class_get_instance().

## ◆ dvb_set_pidfilter()

static int dvb_set_pidfilter | ( | dvb_input_plugin_t * | this,
|  | int | filter,
|  | ushort | pid,
|  | int | pidtype,
|  | int | taptype
| ) |  |
| static

References DVB_NOPID, tuner_t::fd_pidfilter, filter(), tuner_t::pesFilterParams, tuner_t::xine, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by dvb_parse_si(), and parse_pmt().

## ◆ dvb_set_sectfilter()

static int dvb_set_sectfilter | ( | dvb_input_plugin_t * | this,
|  | int | filter,
|  | ushort | pid,
|  | int | pidtype,
|  | uint8_t | table,
|  | uint8_t | mask
| ) |  |
| static

References DVB_NOPID, tuner_t::fd_pidfilter, filter(), tuner_t::sectFilterParams, tuner_t::xine, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by dvb_parse_si().

## ◆ dvb_zoom_cb()

static void dvb_zoom_cb | ( | void * | this_gen,
|  | xine_cfg_entry_t * | cfg
| ) |  |
| static

References xine_cfg_entry_s::num_value, XINE_PARAM_VO_ZOOM_X, XINE_PARAM_VO_ZOOM_Y, and xine_set_param().

Referenced by dvb_plugin_open().

## ◆ epg_with_starttime()

static int epg_with_starttime | ( | channel_t * | channel,
|  | time_t | starttime
| ) |  |
| static

References channel_t::epg, channel_t::epg_count, and epg_entry_t::starttime.

Referenced by load_epg_data().

## ◆ extract_channel_from_string()

static int extract_channel_from_string | ( | channel_t * | channel,
|  | char * | str,
|  | fe_type_t | fe_type
| ) |  |
| static

References _x_freep(), extract_channel_from_string_internal(), channel_t::name, and NULL.

Referenced by dvb_plugin_open(), and load_channels().

## ◆ extract_channel_from_string_internal()

static int extract_channel_from_string_internal | ( | channel_t * | channel,
|  | char * | str,
|  | fe_type_t | fe_type
| ) |  |
| static

References atsc_list, AUDFILTER, bw_list, fec_list, field, find_param, channel_t::front_param, guard_list, hierarchy_list, inversion_list, channel_t::name, NULL, channel_t::pid, channel_t::pol, qam_list, channel_t::sat_no, channel_t::service_id, channel_t::tone, transmissionmode_list, and VIDFILTER.

Referenced by extract_channel_from_string().

## ◆ find_descriptor()

static int find_descriptor | ( | uint8_t | tag,
|  | const unsigned char * | buf,
|  | int | descriptors_loop_len,
|  | const unsigned char ** | desc,
|  | int * | desc_len
| ) |  |
| static

Referenced by parse_pmt().

## ◆ find_param_0()

static int find_param_0 | ( | const Param * | list,
|  | size_t | list_size,
|  | const char * | name
| ) |  |
| static

References name, and Param::value.

## ◆ free_channel_list()

static void free_channel_list | ( | channel_t * | channels,
|  | int | num_channels
| ) |  |
| static

References _x_freep(), and name.

Referenced by dvb_class_get_autoplay_list(), and dvb_plugin_dispose().

## ◆ getbits()

static unsigned int getbits | ( | unsigned char * | buffer,
|  | unsigned int | bitpos,
|  | unsigned int | bitcount
| ) |  |
| static

Referenced by dvb_parse_si(), and load_epg_data().

## ◆ init_class()

static void * init_class | ( | xine_t * | xine,
|  | const void * | data
| ) |  |
| static

References _, xine_s::config, input_class_s::description, input_class_s::dispose, dvb_class_dispose(), dvb_class_eject_media(), dvb_class_get_autoplay_list(), dvb_class_get_instance(), input_class_s::eject_media, input_class_s::get_autoplay_list, input_class_s::get_dir, input_class_s::get_instance, input_class_s::identifier, dvb_input_class_t::input_class, N_, NULL, config_values_s::register_bool, config_values_s::register_num, dvb_input_class_t::xine, XINE_VERBOSITY_DEBUG, and xprintf.

## ◆ ith_next_epg()

static epg_entry_t * ith_next_epg | ( | channel_t * | channel,
|  | int | count
| ) |  |
| static

References epg_entry_t::duration_hours, epg_entry_t::duration_minutes, channel_t::epg, channel_t::epg_count, MAX_EPG_ENTRY_LATENESS, NULL, epg_entry_t::running, and epg_entry_t::starttime.

Referenced by current_epg(), and next_epg().

## ◆ load_channels()

static channel_t * load_channels | ( | xine_t * | xine,
|  | xine_stream_t * | stream,
|  | int * | num_ch,
|  | fe_type_t | fe_type
| ) |  |
| static

References _, _x_assert, _x_message(), xine_s::basedir_handle, BUFSIZE, channel_t::epg_count, extract_channel_from_string(), channel_t::name, NULL, PACKAGE, S_ISREG, XINE_MSG_FILE_NOT_FOUND, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.

Referenced by dvb_class_get_autoplay_list(), and dvb_plugin_open().

## ◆ load_epg_data()

static void load_epg_data | ( | dvb_input_plugin_t * | this | ) |
| static

References _x_assert, bcdtoint, channel_index(), compare_epg_by_starttime(), epg_entry_t::content, current_epg(), epg_entry_t::description, epg_entry_t::duration_hours, epg_entry_t::duration_minutes, dvb_mjdtime(), EITFILTER, channel_t::epg, channel_t::epg_count, epg_with_starttime(), getbits(), MAX_EPG_CONTENT_TYPE_LENGTH, MAX_EPG_ENTRIES_PER_CHANNEL, MAX_EPG_PROGRAM_DESCRIPTION_LENGTH, MAX_EPG_PROGRAM_NAME_LENGTH, NULL, epg_entry_t::progname, epg_entry_t::rating, epg_entry_t::running, epg_entry_t::starttime, xine_cfg_entry_s::str_value, xine_config_lookup_entry(), XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.

Referenced by show_eit(), and switch_channel().

## ◆ next_epg()

static epg_entry_t * next_epg | ( | channel_t * | channel | ) |
| static

References ith_next_epg(), NULL, epg_entry_t::progname, and epg_entry_t::running.

Referenced by show_eit().

## ◆ osd_show_channel()

static void osd_show_channel | ( | dvb_input_plugin_t * | this,
|  | int | channel
| ) |  |
| static

References CHSEL_CHANNEL_FONT_SIZE, CHSEL_HEIGHT, CHSEL_WIDTH, current_epg(), name, NULL, OSD_TEXT3, OSD_TEXT4, epg_entry_t::progname, render_text_area(), XINE_TEXTPALETTE_WHITE_NONE_TRANSLUCID, and XINE_TEXTPALETTE_YELLOW_BLACK_TRANSPARENT.

Referenced by dvb_event_handler().

## ◆ parse_pmt()

static void parse_pmt | ( | dvb_input_plugin_t * | this,
|  | const unsigned char * | buf,
|  | int | section_length
| ) |  |
| static

References AC3FILTER, AUDFILTER, DVB_NOPID, dvb_set_pidfilter(), find_descriptor(), MAX_SUBTITLES, NULL, PATFILTER, PCRFILTER, PMTFILTER, TXTFILTER, VIDFILTER, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.

Referenced by dvb_parse_si().

## ◆ print_error()

static void print_error | ( | const char * | estring | ) |
| static

Referenced by show_eit(), show_program_info(), and tuner_tune_it().

## ◆ render_text_area()

static void render_text_area | ( | osd_renderer_t * | renderer,
|  | osd_object_t * | osd,
|  | const char * | text,
|  | int | x,
|  | int | y,
|  | int | row_space,
|  | int | max_x,
|  | int | max_y,
|  | int * | height,
|  | int | color_base
| ) |  |
| static

References osd_renderer_s::get_text_size, height, and osd_renderer_s::render_text.

Referenced by osd_show_channel(), and show_program_info().

## ◆ show_eit()

static void show_eit | ( | dvb_input_plugin_t * | this | ) |
| static

References current_epg(), EPG_BACKGROUND_MARGIN, EPG_CHANNEL_FONT_SIZE, EPG_CLOCK_FONT_SIZE, EPG_HEIGHT, EPG_TOP, EPG_WIDTH, load_epg_data(), name, next_epg(), NULL, OSD_TEXT3, OSD_TEXT4, print_error(), show_program_info(), xine_get_param(), xine_get_stream_info(), XINE_PARAM_VO_WINDOW_HEIGHT, XINE_PARAM_VO_WINDOW_WIDTH, XINE_STREAM_INFO_VIDEO_HEIGHT, XINE_STREAM_INFO_VIDEO_WIDTH, and XINE_TEXTPALETTE_YELLOW_BLACK_TRANSPARENT.

Referenced by dvb_event_handler(), and switch_channel().

## ◆ show_program_info()

static void show_program_info | ( | int | x,
|  | int | y,
|  | int | max_x,
|  | int | max_y,
|  | int * | last_y,
|  | epg_entry_t * | epg_data,
|  | osd_renderer_t * | renderer,
|  | osd_object_t * | osd
| ) |  |
| static

References _x_assert, epg_entry_t::content, epg_entry_t::description, epg_entry_t::duration_hours, epg_entry_t::duration_minutes, EPG_CONTENT_FONT_SIZE, EPG_DESCRIPTION_FONT_SIZE, EPG_PIXELS_BETWEEN_TEXT_ROWS, EPG_TITLE_FONT_SIZE, osd_renderer_s::get_text_size, NULL, OSD_TEXT3, OSD_TEXT4, print_error(), epg_entry_t::progname, epg_entry_t::rating, osd_renderer_s::render_text, render_text_area(), osd_renderer_s::set_font, and epg_entry_t::starttime.

Referenced by show_eit().

## ◆ switch_channel()

static int switch_channel | ( | dvb_input_plugin_t * | this,
|  | int | channel
| ) |  |
| static

References _, _x_demux_control_nop(), _x_demux_flush_engine(), _x_meta_info_set(), xine_pids_data_t::apid, AUDFILTER, BUF_FLAG_END_STREAM, current_epg(), dvb_parse_si(), load_epg_data(), MAX_FILTERS, NULL, show_eit(), xine_ui_data_t::str, xine_ui_data_t::str_len, tuner_set_channel(), VIDFILTER, xine_pids_data_t::vpid, XINE_EVENT_PIDS_CHANGE, xine_event_send(), XINE_EVENT_UI_SET_TITLE, XINE_META_INFO_TITLE, xine_open_cloexec(), XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.

Referenced by dvb_event_handler().

## ◆ ts_rewrite_packets()

static void ts_rewrite_packets | ( | dvb_input_plugin_t * | this,
|  | unsigned char * | originalPkt,
|  | int | len
| ) |  |
| static

References PKT_SIZE, and xine_crc32_ieee().

Referenced by dvb_plugin_read().

## ◆ tuner_dispose()

static void tuner_dispose | ( | tuner_t * | this | ) |
| static

References _x_freep(), MAX_FILTERS, and MAX_SUBTITLES.

Referenced by dvb_class_get_autoplay_list(), dvb_plugin_dispose(), dvb_plugin_open(), and tuner_init().

## ◆ tuner_init()

static tuner_t * tuner_init | ( | xine_t * | xine,
|  | int | adapter
| ) |  |
| static

References _x_asprintf(), _x_freep(), EITFILTER, INTERNAL_FILTER, MAX_FILTERS, MAX_SUBTITLES, NULL, tuner_dispose(), xine_open_cloexec(), XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by dvb_class_get_autoplay_list(), and dvb_plugin_open().

## ◆ tuner_set_channel()

static int tuner_set_channel | ( | dvb_input_plugin_t * | this,
|  | channel_t * | c
| ) |  |
| static

References xine_s::config, tuner_t::feinfo, channel_t::front_param, xine_cfg_entry_s::num_value, tuner_set_diseqc(), tuner_tune_it(), config_values_s::update_num, config_values_s::xine, and xine_config_lookup_entry().

Referenced by dvb_plugin_open(), and switch_channel().

## ◆ tuner_set_diseqc()

static int tuner_set_diseqc | ( | tuner_t * | this,
|  | channel_t * | c
| ) |  |
| static

References channel_t::pol, channel_t::sat_no, and channel_t::tone.

Referenced by tuner_set_channel().

## ◆ tuner_tune_it()

static int tuner_tune_it | ( | tuner_t * | this,
|  | struct dvb_frontend_parameters * | front_param
| ) |  |
| static

References NULL, print_error(), xine_config_lookup_entry(), XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.

Referenced by tuner_set_channel().

## Variable Documentation

## ◆ atsc_list

const Param atsc_list[]
| static

Initial value:
= {
{ "8VSB", VSB_8 },
{ "QAM_256", QAM_256 },
{ "QAM_64", QAM_64 },
{ "QAM", QAM_AUTO },
}

Referenced by extract_channel_from_string_internal().

## ◆ bw_list

const Param bw_list[]
| static

Initial value:
= {
{ "BANDWIDTH_6_MHZ", BANDWIDTH_6_MHZ },
{ "BANDWIDTH_7_MHZ", BANDWIDTH_7_MHZ },
{ "BANDWIDTH_8_MHZ", BANDWIDTH_8_MHZ },
{ "BANDWIDTH_AUTO", BANDWIDTH_AUTO },
}

Referenced by extract_channel_from_string_internal().

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 18, "DVB", XINE_VERSION_CODE, NULL, init_class },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
init_class
static void * init_class(xine_t *xine, const void *data)
Definition: input_dvb.c:3190
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition: xine_internal.h:57
NULL
NULL
Definition: xine_plugin.c:78
PLUGIN_NONE
#define PLUGIN_NONE
Definition: xine_plugin.h:29
PLUGIN_MUST_PRELOAD
#define PLUGIN_MUST_PRELOAD
Definition: xine_plugin.h:46
PLUGIN_INPUT
#define PLUGIN_INPUT
Definition: xine_plugin.h:30

## ◆ fec_list

const Param fec_list[]
| static

Initial value:
= {
{ "FEC_1_2", FEC_1_2 },
{ "FEC_2_3", FEC_2_3 },
{ "FEC_3_4", FEC_3_4 },
{ "FEC_4_5", FEC_4_5 },
{ "FEC_5_6", FEC_5_6 },
{ "FEC_6_7", FEC_6_7 },
{ "FEC_7_8", FEC_7_8 },
{ "FEC_8_9", FEC_8_9 },
{ "FEC_AUTO", FEC_AUTO },
{ "FEC_NONE", FEC_NONE },
}

Referenced by extract_channel_from_string_internal().

## ◆ guard_list

const Param guard_list[]
| static

Initial value:
= {
{"GUARD_INTERVAL_1_16", GUARD_INTERVAL_1_16},
{"GUARD_INTERVAL_1_32", GUARD_INTERVAL_1_32},
{"GUARD_INTERVAL_1_4", GUARD_INTERVAL_1_4},
{"GUARD_INTERVAL_1_8", GUARD_INTERVAL_1_8},
{"GUARD_INTERVAL_AUTO", GUARD_INTERVAL_AUTO},
}

Referenced by extract_channel_from_string_internal().

## ◆ hierarchy_list

const Param hierarchy_list[]
| static

Initial value:
= {
{ "HIERARCHY_1", HIERARCHY_1 },
{ "HIERARCHY_2", HIERARCHY_2 },
{ "HIERARCHY_4", HIERARCHY_4 },
{ "HIERARCHY_NONE", HIERARCHY_NONE },
{ "HIERARCHY_AUTO", HIERARCHY_AUTO },
}

Referenced by extract_channel_from_string_internal().

## ◆ inversion_list

const Param inversion_list[]
| static

Initial value:
= {
{ "INVERSION_OFF", INVERSION_OFF },
{ "INVERSION_ON", INVERSION_ON },
{ "INVERSION_AUTO", INVERSION_AUTO },
}

Referenced by extract_channel_from_string_internal().

## ◆ qam_list

const Param qam_list[]
| static

Initial value:
= {
{ "QPSK", QPSK },
{ "QAM_128", QAM_128 },
{ "QAM_16", QAM_16 },
{ "QAM_256", QAM_256 },
{ "QAM_32", QAM_32 },
{ "QAM_64", QAM_64 },
{ "QAM_AUTO", QAM_AUTO },
}

Referenced by extract_channel_from_string_internal().

## ◆ transmissionmode_list

const Param transmissionmode_list[]
| static

Initial value:
= {
{ "TRANSMISSION_MODE_2K", TRANSMISSION_MODE_2K },
{ "TRANSMISSION_MODE_8K", TRANSMISSION_MODE_8K },
{ "TRANSMISSION_MODE_AUTO", TRANSMISSION_MODE_AUTO },
}

Referenced by extract_channel_from_string_internal().