xine-lib 1.2.11
|
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <stdlib.h>
#include <time.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include "bswap.h"
#include "http_helper.h"
#include "mms.h"
#include "../demuxers/asfheader.h"
Data Structures | |
struct | mms_buffer_s |
struct | mms_packet_header_s |
struct | mms_s |
Macros | |
#define | ICONV_CONST const |
#define | LOG_MODULE "mms" |
#define | LOG_VERBOSE |
#define | MMST_PORT 1755 |
#define | BUF_SIZE 102400 |
#define | CMD_HEADER_LEN 40 |
#define | CMD_PREFIX_LEN 8 |
#define | CMD_BODY_LEN 1024 |
#define | ASF_HEADER_LEN 8192 |
#define | MMS_PACKET_ERR 0 |
#define | MMS_PACKET_COMMAND 1 |
#define | MMS_PACKET_ASF_HEADER 2 |
#define | MMS_PACKET_ASF_PACKET 3 |
#define | ASF_HEADER_PACKET_ID_TYPE 2 |
#define | ASF_MEDIA_PACKET_ID_TYPE 4 |
#define | D2Q(d) |
#define | print_command(data, len) |
Typedefs | |
typedef struct mms_buffer_s | mms_buffer_t |
typedef struct mms_packet_header_s | mms_packet_header_t |
Functions | |
static void | mms_buffer_init (mms_buffer_t *mms_buffer, char *buffer) |
static void | mms_buffer_put_8 (mms_buffer_t *mms_buffer, uint8_t value) |
static void | mms_buffer_put_32 (mms_buffer_t *mms_buffer, uint32_t value) |
static void | mms_buffer_put_64 (mms_buffer_t *mms_buffer, uint64_t value) |
static int | send_command (mms_t *this, int command, uint32_t prefix1, uint32_t prefix2, int length) |
static void | string_utf16 (int unused, char *dest, const char *src, int len) |
static int | get_packet_header (mms_t *this, mms_packet_header_t *header) |
static int | get_packet_command (mms_t *this, uint32_t packet_len) |
static int | get_answer (mms_t *this) |
static int | get_asf_header (mms_t *this) |
static int | interp_asf_header (mms_t *this) |
static int | mmst_valid_proto (const char *proto) |
static void | report_progress (xine_stream_t *stream, int p) |
static int | mms_tcp_connect (mms_t *this) |
static void | mms_gen_guid (char guid[]) |
static int | mms_choose_best_streams (mms_t *this) |
mms_t * | mms_connect (xine_stream_t *stream, const char *url, int bandwidth) |
static int | get_media_packet (mms_t *this) |
size_t | mms_peek_header (mms_t *this, char *data, size_t maxsize) |
int | mms_read (mms_t *this, char *data, int len) |
void | mms_close (mms_t *this) |
uint32_t | mms_get_length (mms_t *this) |
off_t | mms_get_current_pos (mms_t *this) |
void | mms_set_start_time (mms_t *this, int time_offset) |
Variables | |
static const char | mmst_proto_s [][8] = { "mms", "mmst", "" } |
#define ASF_HEADER_LEN 8192 |
#define ASF_HEADER_PACKET_ID_TYPE 2 |
#define ASF_MEDIA_PACKET_ID_TYPE 4 |
#define BUF_SIZE 102400 |
#define CMD_BODY_LEN 1024 |
#define CMD_HEADER_LEN 40 |
#define CMD_PREFIX_LEN 8 |
#define D2Q | ( | d | ) |
#define ICONV_CONST const |
#define LOG_MODULE "mms" |
#define LOG_VERBOSE |
#define MMS_PACKET_ASF_HEADER 2 |
#define MMS_PACKET_ASF_PACKET 3 |
#define MMS_PACKET_COMMAND 1 |
#define MMS_PACKET_ERR 0 |
#define MMST_PORT 1755 |
#define print_command | ( | data, | |
len | |||
) |
typedef struct mms_buffer_s mms_buffer_t |
typedef struct mms_packet_header_s mms_packet_header_t |
|
static |
References get_answer(), get_packet_command(), get_packet_header(), MMS_PACKET_ASF_HEADER, MMS_PACKET_ASF_PACKET, MMS_PACKET_COMMAND, MMS_PACKET_ERR, mms_packet_header_s::packet_len, send_command(), XINE_VERBOSITY_LOG, and xprintf.
Referenced by get_answer(), get_asf_header(), mms_choose_best_streams(), and mms_connect().
|
static |
References _x_io_tcp_read(), ASF_HEADER_LEN, mms_packet_header_s::flags, get_answer(), get_packet_command(), get_packet_header(), lprintf, MMS_PACKET_ASF_HEADER, MMS_PACKET_ASF_PACKET, MMS_PACKET_COMMAND, MMS_PACKET_ERR, mms_packet_header_s::packet_len, send_command(), XINE_VERBOSITY_LOG, and xprintf.
Referenced by get_media_packet(), and mms_connect().
|
static |
References _x_io_tcp_read(), _X_LE_32, ASF_MEDIA_PACKET_ID_TYPE, CMD_HEADER_LEN, get_asf_header(), get_packet_command(), get_packet_header(), interp_asf_header(), lprintf, mms_buffer_init(), mms_buffer_put_32(), mms_buffer_put_8(), mms_choose_best_streams(), MMS_PACKET_ASF_HEADER, MMS_PACKET_ASF_PACKET, MMS_PACKET_COMMAND, MMS_PACKET_ERR, mms_packet_header_s::packet_len, mms_packet_header_s::packet_seq, mms_buffer_s::pos, send_command(), XINE_VERBOSITY_LOG, and xprintf.
Referenced by mms_read().
|
static |
References _x_io_tcp_read(), _X_LE_32, lprintf, and print_command.
Referenced by get_answer(), get_asf_header(), and get_media_packet().
|
static |
References _x_io_tcp_read(), _X_LE_16, _X_LE_32, ASF_HEADER_PACKET_ID_TYPE, BUF_SIZE, mms_packet_header_s::flags, lprintf, MMS_PACKET_ASF_HEADER, MMS_PACKET_ASF_PACKET, MMS_PACKET_COMMAND, MMS_PACKET_ERR, mms_packet_header_s::packet_id_type, mms_packet_header_s::packet_len, and mms_packet_header_s::packet_seq.
Referenced by get_answer(), get_asf_header(), and get_media_packet().
|
static |
References asf_header_delete(), and asf_header_new().
Referenced by get_media_packet(), and mms_connect().
|
static |
References mms_buffer_s::buffer, and mms_buffer_s::pos.
Referenced by get_media_packet(), mms_connect(), mms_read(), and send_command().
|
static |
References mms_buffer_s::buffer, and mms_buffer_s::pos.
Referenced by get_media_packet(), mms_connect(), mms_read(), and send_command().
|
static |
References mms_buffer_s::buffer, and mms_buffer_s::pos.
Referenced by mms_read().
|
static |
References mms_buffer_s::buffer, and mms_buffer_s::pos.
Referenced by get_media_packet(), mms_connect(), and mms_read().
|
static |
References asf_header_choose_streams(), get_answer(), lprintf, send_command(), XINE_VERBOSITY_LOG, and xprintf.
Referenced by get_media_packet(), and mms_connect().
void mms_close | ( | mms_t * | this | ) |
References _x_io_tcp_close(), _x_url_cleanup(), and asf_header_delete().
Referenced by mms_plugin_dispose().
mms_t * mms_connect | ( | xine_stream_t * | stream, |
const char * | url, | ||
int | bandwidth | ||
) |
References _x_io_tcp_close(), _x_mrl_unescape(), _x_url_cleanup(), _x_url_parse2(), ASF_HEADER_PACKET_ID_TYPE, ASF_MEDIA_PACKET_ID_TYPE, CMD_HEADER_LEN, CMD_PREFIX_LEN, get_answer(), get_asf_header(), ICONV_CONST, interp_asf_header(), lprintf, mms_buffer_init(), mms_buffer_put_32(), mms_buffer_put_8(), mms_choose_best_streams(), mms_gen_guid(), mms_tcp_connect(), mmst_valid_proto(), NULL, mms_buffer_s::pos, report_progress(), send_command(), string_utf16(), xine_stream_s::xine, XINE_VERBOSITY_LOG, and xprintf.
Referenced by mms_plugin_open().
|
static |
References NULL.
Referenced by mms_connect().
off_t mms_get_current_pos | ( | mms_t * | this | ) |
Referenced by mms_plugin_get_current_pos(), mms_plugin_seek(), and mms_plugin_seek_time().
uint32_t mms_get_length | ( | mms_t * | this | ) |
Referenced by mms_plugin_get_length().
size_t mms_peek_header | ( | mms_t * | this, |
char * | data, | ||
size_t | maxsize | ||
) |
Referenced by mms_plugin_get_optional_data().
int mms_read | ( | mms_t * | this, |
char * | data, | ||
int | len | ||
) |
References ASF_MEDIA_PACKET_ID_TYPE, D2Q, get_media_packet(), mms_buffer_init(), mms_buffer_put_32(), mms_buffer_put_64(), mms_buffer_put_8(), mms_buffer_s::pos, send_command(), xine_fast_memcpy, XINE_VERBOSITY_LOG, and xprintf.
Referenced by mms_plugin_read().
void mms_set_start_time | ( | mms_t * | this, |
int | time_offset | ||
) |
Referenced by mms_plugin_seek_time().
|
static |
References _x_io_select(), _x_io_tcp_connect(), lprintf, MMST_PORT, report_progress(), XINE_VERBOSITY_LOG, XIO_READY, XIO_TIMEOUT, XIO_WRITE_READY, and xprintf.
Referenced by mms_connect().
|
static |
References lprintf, and mmst_proto_s.
Referenced by mms_connect().
|
static |
References _, xine_progress_data_t::description, xine_progress_data_t::percent, XINE_EVENT_PROGRESS, and xine_event_send().
Referenced by mms_connect(), and mms_tcp_connect().
|
static |
References _x_io_tcp_write(), CMD_HEADER_LEN, CMD_PREFIX_LEN, mms_buffer_init(), mms_buffer_put_32(), and print_command.
Referenced by get_answer(), get_asf_header(), get_media_packet(), mms_choose_best_streams(), mms_connect(), and mms_read().
|
static |
Referenced by mms_connect().
|
static |
Referenced by mmst_valid_proto().