xine-lib 1.2.11
|
#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 |
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 |
#define AC3FILTER 7 |
#define AUDFILTER 6 |
#define bcdtoint | ( | i | ) | ((((i & 0xf0) >> 4) * 10) + (i & 0x0f)) |
#define BODY_SIZE (188-4) |
#define BUFSIZE 16384 |
#define CHSEL_CHANNEL_FONT_SIZE 26 |
#define CHSEL_HEIGHT 400 |
#define CHSEL_PROGRAM_NAME_FONT_SIZE 12 |
#define CHSEL_WIDTH 600 |
#define DVB_NOPID 0xffff |
#define EITFILTER 3 |
#define EPG_BACKGROUND_MARGIN 5 |
#define EPG_CHANNEL_FONT_SIZE 32 |
#define EPG_CLOCK_FONT_SIZE 18 |
#define EPG_CONTENT_FONT_SIZE 18 |
#define EPG_DESCRIPTION_FONT_SIZE 18 |
#define EPG_HEIGHT 620 |
#define EPG_PIXELS_BETWEEN_PROGRAM_ENTRIES 2 |
#define EPG_PIXELS_BETWEEN_TEXT_ROWS 2 |
#define EPG_TITLE_FONT_SIZE 24 |
#define EPG_TOP 50 |
#define EPG_UPDATE_DELAY 60 |
#define EPG_WIDTH 520 |
#define find_param | ( | list, | |
name | |||
) | find_param_0(list, sizeof(list)/sizeof(list[0]), name) |
#define INTERNAL_FILTER 0 |
#define LOG_MODULE "input_dvb" |
#define LOG_VERBOSE |
#define MAX_AUTOCHANNELS 200 |
#define MAX_EPG_CONTENT_TYPE_LENGTH 20 |
#define MAX_EPG_ENTRIES_PER_CHANNEL 10 |
#define MAX_EPG_ENTRY_LATENESS 5*60.0 |
#define MAX_EPG_PROGRAM_DESCRIPTION_LENGTH 255 |
#define MAX_EPG_PROGRAM_NAME_LENGTH 255 |
#define MAX_FILTERS 9 |
#define MAX_SUBTITLES 4 |
#define MOUSE_BUTTON_LEFT 1 |
#define MOUSE_BUTTON_MIDDLE 2 |
#define MOUSE_BUTTON_RIGHT 3 |
#define MOUSE_SIDE_LEFT 6 |
#define MOUSE_SIDE_RIGHT 7 |
#define MOUSE_WHEEL_DOWN 5 |
#define MOUSE_WHEEL_UP 4 |
#define PATFILTER 1 |
#define PCRFILTER 4 |
#define PKT_SIZE 188 |
#define PMTFILTER 2 |
#define TXTFILTER 8 |
#define VIDFILTER 5 |
|
static |
Referenced by load_epg_data().
|
static |
Referenced by load_epg_data().
|
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().
|
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().
|
static |
References _x_freep().
Referenced by init_class().
|
static |
Referenced by init_class().
|
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().
|
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().
|
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().
|
static |
References _x_assert, bcdtoint, and NULL.
Referenced by load_epg_data().
|
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().
|
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().
|
static |
Referenced by dvb_class_get_instance().
|
static |
Referenced by dvb_class_get_instance().
|
static |
References INPUT_OPTIONAL_DATA_DEMUXER, INPUT_OPTIONAL_SUCCESS, and INPUT_OPTIONAL_UNSUPPORTED.
Referenced by dvb_class_get_instance().
|
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().
|
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().
|
static |
References _x_input_seek_preview(), XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by dvb_class_get_instance().
|
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().
|
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().
|
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().
|
static |
References channel_t::epg, channel_t::epg_count, and epg_entry_t::starttime.
Referenced by load_epg_data().
|
static |
References _x_freep(), extract_channel_from_string_internal(), channel_t::name, and NULL.
Referenced by dvb_plugin_open(), and load_channels().
|
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().
|
static |
Referenced by parse_pmt().
|
static |
References name, and Param::value.
|
static |
References _x_freep(), and name.
Referenced by dvb_class_get_autoplay_list(), and dvb_plugin_dispose().
|
static |
Referenced by dvb_parse_si(), and load_epg_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.
|
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().
|
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().
|
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().
|
static |
References ith_next_epg(), NULL, epg_entry_t::progname, and epg_entry_t::running.
Referenced by show_eit().
|
static |
|
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().
|
static |
Referenced by show_eit(), show_program_info(), and tuner_tune_it().
|
static |
References osd_renderer_s::get_text_size, height, and osd_renderer_s::render_text.
Referenced by osd_show_channel(), and show_program_info().
|
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().
|
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().
|
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().
|
static |
References PKT_SIZE, and xine_crc32_ieee().
Referenced by dvb_plugin_read().
|
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().
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().
|
static |
References channel_t::pol, channel_t::sat_no, and channel_t::tone.
Referenced by tuner_set_channel().
|
static |
References NULL, print_error(), xine_config_lookup_entry(), XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.
Referenced by tuner_set_channel().
|
static |
Referenced by extract_channel_from_string_internal().
|
static |
Referenced by extract_channel_from_string_internal().
const plugin_info_t xine_plugin_info [] EXPORTED |
|
static |
Referenced by extract_channel_from_string_internal().
|
static |
Referenced by extract_channel_from_string_internal().
|
static |
Referenced by extract_channel_from_string_internal().
|
static |
Referenced by extract_channel_from_string_internal().
|
static |
Referenced by extract_channel_from_string_internal().
|
static |
Referenced by extract_channel_from_string_internal().