xine-lib: xine-lib-1.2.13/src/input/input_mms.c File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Functions | Variables
input_mms.c File Reference
`#include <unistd.h>`
`#include <stdio.h>`
`#include <string.h>`
`#include <sys/types.h>`
`#include <sys/stat.h>`
`#include <fcntl.h>`
`#include "bswap.h"`
`#include <xine/xine_internal.h>`
`#include <xine/xineutils.h>`
`#include <xine/input_plugin.h>`
`#include "mms.h"`
`#include "mmsh.h"`
`#include "net_buf_ctrl.h"`
`#include "input_helper.h"`

## Data Structures
struct | mms_input_plugin_t
struct | mms_input_class_t

## Macros
#define | LOG_MODULE "input_mms"
#define | LOG_VERBOSE
#define | LOG_MODULE "input_mms"
#define | PROTOCOL_UNDEFINED 0
#define | PROTOCOL_MMST 1
#define | PROTOCOL_MMSH 2
#define | NUM_BANDWIDTHS (sizeof (mms_bandwidths) / sizeof (mms_bandwidths[0]))

## Functions
static off_t | mms_plugin_read (input_plugin_t *this_gen, void *buf_gen, off_t len)
static off_t | mms_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin)
static off_t | mms_plugin_seek_time (input_plugin_t *this_gen, int time_offset, int origin)
static off_t | mms_plugin_get_length (input_plugin_t *this_gen)
static off_t | mms_plugin_get_current_pos (input_plugin_t *this_gen)
static void | mms_plugin_dispose (input_plugin_t *this_gen)
static const char * | mms_plugin_get_mrl (input_plugin_t *this_gen)
static int | mms_plugin_get_optional_data (input_plugin_t *this_gen, void *data, int data_type)
static void | bandwidth_changed_cb (void *this_gen, xine_cfg_entry_t *entry)
static void | protocol_changed_cb (void *this_gen, xine_cfg_entry_t *entry)
static int | mms_plugin_open (input_plugin_t *this_gen)
static input_plugin_t * | mms_class_get_instance (input_class_t *cls_gen, xine_stream_t *stream, const char *data)
static void | mms_class_dispose (input_class_t *this_gen)
static void * | init_class (xine_t *xine, const void *data)

## Variables
static const uint32_t | mms_bandwidths []
static const char *const | mms_bandwidth_strs []
static const char *const | mms_protocol_strs [] ={"auto", "TCP", "HTTP", NULL}
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ LOG_MODULE [1/2]

#define LOG_MODULE "input_mms"

## ◆ LOG_MODULE [2/2]

#define LOG_MODULE "input_mms"

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## ◆ NUM_BANDWIDTHS

#define NUM_BANDWIDTHS (sizeof (mms_bandwidths) / sizeof (mms_bandwidths[0]))

Referenced by bandwidth_changed_cb(), and init_class().

## ◆ PROTOCOL_MMSH

#define PROTOCOL_MMSH 2

Referenced by mms_class_get_instance(), mms_plugin_get_current_pos(), mms_plugin_get_length(), mms_plugin_get_optional_data(), mms_plugin_open(), mms_plugin_read(), mms_plugin_seek(), and mms_plugin_seek_time().

## ◆ PROTOCOL_MMST

#define PROTOCOL_MMST 1

Referenced by mms_class_get_instance(), mms_plugin_get_current_pos(), mms_plugin_get_length(), mms_plugin_get_optional_data(), mms_plugin_open(), mms_plugin_read(), mms_plugin_seek(), and mms_plugin_seek_time().

## ◆ PROTOCOL_UNDEFINED

#define PROTOCOL_UNDEFINED 0

Referenced by mms_plugin_open().

## Function Documentation

## ◆ bandwidth_changed_cb()

static void bandwidth_changed_cb | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry )
| static

References lprintf, mms_bandwidths, NUM_BANDWIDTHS, and xine_cfg_entry_s::num_value.

Referenced by init_class(), and mms_class_get_instance().

## ◆ init_class()

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

References _, mms_input_class_t::bandwidth, bandwidth_changed_cb(), xine_s::config, input_class_s::description, input_class_s::dispose, 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, mms_input_class_t::input_class, mms_bandwidth_strs, mms_bandwidths, mms_class_dispose(), mms_class_get_instance(), mms_protocol_strs, N_, NULL, NUM_BANDWIDTHS, mms_input_class_t::protocol, protocol_changed_cb(), config_values_s::register_enum, and mms_input_class_t::xine.

## ◆ mms_class_dispose()

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

References xine_s::config, NULL, config_values_s::unregister_callbacks, and mms_input_class_t::xine.

Referenced by init_class().

## ◆ mms_class_get_instance()

static input_plugin_t * mms_class_get_instance | ( | input_class_t * | cls_gen,
|  | xine_stream_t * | stream,
|  | const char * | data )
| static

References _x_input_default_get_blocksize(), _x_input_default_read_block(), _x_input_get_capabilities_preview(), bandwidth_changed_cb(), lprintf, mms_plugin_dispose(), mms_plugin_get_current_pos(), mms_plugin_get_length(), mms_plugin_get_mrl(), mms_plugin_get_optional_data(), mms_plugin_open(), mms_plugin_read(), mms_plugin_seek(), mms_plugin_seek_time(), nbc_init, NULL, mms_input_class_t::protocol, PROTOCOL_MMSH, PROTOCOL_MMST, xine_stream_s::xine, and xine_config_lookup_entry().

Referenced by init_class().

## ◆ mms_plugin_dispose()

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

References mms_close(), mmsh_close(), nbc_close, and NULL.

Referenced by mms_class_get_instance().

## ◆ mms_plugin_get_current_pos()

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

References mms_get_current_pos(), mmsh_get_current_pos(), PROTOCOL_MMSH, and PROTOCOL_MMST.

Referenced by mms_class_get_instance().

## ◆ mms_plugin_get_length()

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

References lprintf, mms_get_length(), mmsh_get_length(), PROTOCOL_MMSH, and PROTOCOL_MMST.

Referenced by mms_class_get_instance().

## ◆ mms_plugin_get_mrl()

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

Referenced by mms_class_get_instance().

## ◆ mms_plugin_get_optional_data()

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

References INPUT_OPTIONAL_DATA_PREVIEW, INPUT_OPTIONAL_UNSUPPORTED, MAX_PREVIEW_SIZE, mms_peek_header(), mmsh_peek_header(), PROTOCOL_MMSH, and PROTOCOL_MMST.

Referenced by mms_class_get_instance().

## ◆ mms_plugin_open()

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

References mms_input_class_t::input_class, mms_connect(), mmsh_connect(), NULL, mms_input_class_t::protocol, PROTOCOL_MMSH, PROTOCOL_MMST, and PROTOCOL_UNDEFINED.

Referenced by mms_class_get_instance().

## ◆ mms_plugin_read()

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

References lprintf, mms_read(), mmsh_read(), PROTOCOL_MMSH, and PROTOCOL_MMST.

Referenced by mms_class_get_instance().

## ◆ mms_plugin_seek()

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

References _x_input_seek_preview(), lprintf, mms_get_current_pos(), mmsh_get_current_pos(), PROTOCOL_MMSH, and PROTOCOL_MMST.

Referenced by mms_class_get_instance().

## ◆ mms_plugin_seek_time()

static off_t mms_plugin_seek_time | ( | input_plugin_t * | this_gen,
|  | int | time_offset,
|  | int | origin )
| static

References lprintf, mms_get_current_pos(), mms_set_start_time(), mmsh_get_current_pos(), mmsh_set_start_time(), PROTOCOL_MMSH, and PROTOCOL_MMST.

Referenced by mms_class_get_instance().

## ◆ protocol_changed_cb()

static void protocol_changed_cb | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry )
| static

References lprintf, and xine_cfg_entry_s::num_value.

Referenced by init_class().

## Variable Documentation

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 18, "mms", 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_mms.c:375
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

## ◆ mms_bandwidth_strs

const char* const mms_bandwidth_strs[]
| static

Initial value:
={"14.4 Kbps (Modem)", "19.2 Kbps (Modem)",
"28.8 Kbps (Modem)", "33.6 Kbps (Modem)",
"34.4 Kbps (Modem)", "57.6 Kbps (Modem)",
"115.2 Kbps (ISDN)", "262.2 Kbps (Cable/DSL)",
"393.2 Kbps (Cable/DSL)","524.3 Kbps (Cable/DSL)",
"1.5 Mbps (T1)", "10.5 Mbps (LAN)", NULL}

Referenced by init_class().

## ◆ mms_bandwidths

const uint32_t mms_bandwidths[]
| static

Initial value:
={14400,19200,28800,33600,34430,57600,
115200,262200,393216,524300,1544000,10485800}

Referenced by bandwidth_changed_cb(), and init_class().

## ◆ mms_protocol_strs

const char* const mms_protocol_strs[] ={"auto", "TCP", "HTTP", NULL}
| static

Referenced by init_class().