xine-lib  1.2.10
mmsh.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2002-2009 the xine project
3  *
4  * This file is part of xine, a free video player.
5  *
6  * xine is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * xine is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19  *
20  * libmmsh public header
21  */
22 
23 #ifndef HAVE_MMSH_H
24 #define HAVE_MMSH_H
25 
26 #include <inttypes.h>
27 #include <xine/xine_internal.h>
28 
29 typedef struct mmsh_s mmsh_t;
30 
31 char* mmsh_connect_common(int *s ,int *port, char *url, char **host, char **path, char **file);
32 mmsh_t* mmsh_connect (xine_stream_t *stream, const char *url_, int bandwidth);
33 
34 int mmsh_read (mmsh_t *this, char *data, int len);
35 uint32_t mmsh_get_length (mmsh_t *this);
36 void mmsh_close (mmsh_t *this);
37 
38 size_t mmsh_peek_header (mmsh_t *this, char *data, size_t maxsize);
39 
40 off_t mmsh_get_current_pos (mmsh_t *this);
41 
42 void mmsh_set_start_time (mmsh_t *this, int time_offset);
43 
44 #endif
http_helper.h
xine_stream_s::xine
xine_t * xine
Definition: xine_internal.h:126
mmsh_s::chunk_length
uint16_t chunk_length
Definition: mmsh.c:155
xine_stream_s
Definition: xine_internal.h:123
_x_io_tcp_write
off_t _x_io_tcp_write(xine_stream_t *stream, int s, const void *wbuf_gen, off_t todo)
Definition: io_helper.c:607
asf_header_disable_streams
void asf_header_disable_streams(asf_header_t *header_pub, int video_id, int audio_id)
Definition: asfheader.c:933
CHUNK_HEADER_LENGTH
#define CHUNK_HEADER_LENGTH
Definition: mmsh.c:63
mmsh_tcp_connect
static int mmsh_tcp_connect(mmsh_t *this)
Definition: mmsh.c:470
mmsh_get_current_pos
off_t mmsh_get_current_pos(mmsh_t *this)
Definition: mmsh.c:861
mmsh_peek_header
size_t mmsh_peek_header(mmsh_t *this, char *data, size_t maxsize)
Definition: mmsh.c:758
mmsh_FirstRequest
#define mmsh_FirstRequest
Definition: mmsh.c:74
xineutils.h
mmsh_read
int mmsh_read(mmsh_t *this, char *data, int len)
Definition: mmsh.c:769
mmsh_s::current_pos
off_t current_pos
Definition: mmsh.c:170
mmsh_s
Definition: mmsh.c:137
mmsh_get_current_pos
off_t mmsh_get_current_pos(mmsh_t *this)
Definition: mmsh.c:861
asf_header_new
asf_header_t * asf_header_new(uint8_t *buffer, int buffer_len)
Definition: asfheader.c:720
mmsh_s::chunk_seq_number
uint16_t chunk_seq_number
Definition: mmsh.c:156
xine_fast_memcpy
void *(* xine_fast_memcpy)(void *to, const void *from, size_t len)
Definition: memcpy.c:60
xine_event_t
Definition: xine.h:1923
_x_io_select
int _x_io_select(xine_stream_t *stream, int fd, int state, int timeout_msec)
Definition: io_helper.c:356
send_command
static int send_command(mmsh_t *this, char *cmd)
Definition: mmsh.c:177
xine_url_t
Definition: http_helper.h:49
XINE_EVENT_PROGRESS
#define XINE_EVENT_PROGRESS
Definition: xine.h:1821
mmsh_get_length
uint32_t mmsh_get_length(mmsh_t *this)
Definition: mmsh.c:857
mmsh_close
void mmsh_close(mmsh_t *this)
Definition: mmsh.c:841
mmsh_connect
mmsh_t * mmsh_connect(xine_stream_t *stream, const char *url_, int bandwidth)
Definition: mmsh.c:617
mmsh_set_start_time
void mmsh_set_start_time(mmsh_t *this, int time_offset)
Definition: mmsh.c:865
mmsh.h
mmsh_close
void mmsh_close(mmsh_t *this)
Definition: mmsh.c:841
lprintf
#define lprintf(...)
Definition: xineutils.h:620
mmsh_connect_common
char * mmsh_connect_common(int *s, int *port, char *url, char **host, char **path, char **file)
mmsh_s::seq_num
int seq_num
Definition: mmsh.c:165
CHUNK_TYPE_RESET
#define CHUNK_TYPE_RESET
Definition: mmsh.c:65
mmsh_s::video_stream
int video_stream
Definition: mmsh.c:167
XIO_TIMEOUT
#define XIO_TIMEOUT
Definition: io_helper.h:37
_x_url_cleanup
void _x_url_cleanup(xine_url_t *url)
Definition: http_helper.c:374
MMSH_UNKNOWN
#define MMSH_UNKNOWN
Definition: mmsh.c:59
mmsh_s::s
int s
Definition: mmsh.c:141
CHUNK_TYPE_DATA
#define CHUNK_TYPE_DATA
Definition: mmsh.c:66
mmsh_s::asf_header_buffer
uint8_t asf_header_buffer[8192]
Definition: mmsh.c:162
mmsh_s::stream_type
int stream_type
Definition: mmsh.c:149
_X_LE_16
#define _X_LE_16(x)
Definition: bswap.h:58
get_answer
static int get_answer(mmsh_t *this)
Definition: mmsh.c:188
mmsh_LiveRequest
#define mmsh_LiveRequest
Definition: mmsh.c:95
mmsh_connect_int2
static int mmsh_connect_int2(mmsh_t *this, int bandwidth)
Definition: mmsh.c:551
get_chunk_header
static int get_chunk_header(mmsh_t *this)
Definition: mmsh.c:285
NULL
NULL
Definition: xine_plugin.c:78
xine_event_send
void xine_event_send(xine_stream_t *s, const xine_event_t *event)
Definition: events.c:194
XIO_WRITE_READY
#define XIO_WRITE_READY
Definition: io_helper.h:31
XIO_READY
#define XIO_READY
Definition: io_helper.h:34
XINE_VERBOSITY_LOG
#define XINE_VERBOSITY_LOG
Definition: xine.h:425
_x_url_parse2
int _x_url_parse2(const char *mrl, xine_url_t *url)
Definition: http_helper.c:156
SCRATCH_SIZE
#define SCRATCH_SIZE
Definition: mmsh.c:72
mmsh_s::asf_header_len
uint32_t asf_header_len
Definition: mmsh.c:163
interp_header
static int interp_header(mmsh_t *this)
Definition: mmsh.c:412
mmsh_proto_s
static const char mmsh_proto_s[][8]
Definition: mmsh.c:433
_
#define _(String)
Definition: vcdplayer.h:39
_X_LE_32
#define _X_LE_32(x)
Definition: bswap.h:63
mmsh_s::str
char str[1024]
Definition: mmsh.c:146
mmsh_s::chunk_type
uint16_t chunk_type
Definition: mmsh.c:154
xine_progress_data_t::description
const char * description
Definition: xine.h:2010
report_progress
static void report_progress(xine_stream_t *stream, int p)
Definition: mmsh.c:452
mmsh_s::buf_read
int buf_read
Definition: mmsh.c:160
mmsh_s::url
xine_url_t url
Definition: mmsh.c:144
mmsh_s::stream
xine_stream_t * stream
Definition: mmsh.c:139
XINE_LOG_MSG
#define XINE_LOG_MSG
Definition: xine_internal.h:64
ASF_MAX_NUM_STREAMS
#define ASF_MAX_NUM_STREAMS
Definition: asfheader.h:116
mmsh_connect_int
static int mmsh_connect_int(mmsh_t *this, int bandwidth)
Definition: mmsh.c:507
mmsh_connect
mmsh_t * mmsh_connect(xine_stream_t *stream, const char *url, int bandwidth)
Definition: mmsh.c:617
asf_header_s
Definition: asfheader.h:132
mmsh_peek_header
size_t mmsh_peek_header(mmsh_t *this, char *data, size_t maxsize)
Definition: mmsh.c:758
mmsh_s::audio_stream
int audio_stream
Definition: mmsh.c:168
mmsh_read
int mmsh_read(mmsh_t *this, char *data, int len)
Definition: mmsh.c:769
asf_header_delete
void asf_header_delete(asf_header_t *header_pub)
Definition: asfheader.c:858
mmsh_s::buf
uint8_t buf[65536]
Definition: mmsh.c:157
mmsh_s::asf_header_read
uint32_t asf_header_read
Definition: mmsh.c:164
xine_progress_data_t::percent
int percent
Definition: xine.h:2011
mmsh_s::buf_size
int buf_size
Definition: mmsh.c:159
bswap.h
mmsh_s::playing
int playing
Definition: mmsh.c:173
CHUNK_SIZE
#define CHUNK_SIZE
Definition: mmsh.c:69
get_header
static int get_header(mmsh_t *this)
Definition: mmsh.c:366
xine_internal.h
MMSH_SEEKABLE
#define MMSH_SEEKABLE
Definition: mmsh.c:60
EXT_HEADER_LENGTH
#define EXT_HEADER_LENGTH
Definition: mmsh.c:64
config.h
_x_io_tcp_connect
int _x_io_tcp_connect(xine_stream_t *stream, const char *host, int port)
Definition: io_helper.c:159
mmsh_get_length
uint32_t mmsh_get_length(mmsh_t *this)
Definition: mmsh.c:857
CHUNK_TYPE_END
#define CHUNK_TYPE_END
Definition: mmsh.c:67
mmsh_set_start_time
void mmsh_set_start_time(mmsh_t *this, int time_offset)
Definition: mmsh.c:865
mmsh_SeekableRequest
#define mmsh_SeekableRequest
Definition: mmsh.c:83
mmsh_s::asf_header
asf_header_t * asf_header
Definition: mmsh.c:148
get_media_packet
static int get_media_packet(mmsh_t *this)
Definition: mmsh.c:683
ASF_HEADER_SIZE
#define ASF_HEADER_SIZE
Definition: mmsh.c:70
mmsh_s::user_bandwidth
int user_bandwidth
Definition: mmsh.c:171
MMSH_LIVE
#define MMSH_LIVE
Definition: mmsh.c:61
xine_log
void xine_log(xine_t *this_gen, int buf, const char *format,...)
Definition: xine.c:3340
MMSH_PORT
#define MMSH_PORT
Definition: mmsh.c:58
asf_header_choose_streams
void asf_header_choose_streams(asf_header_t *header_pub, uint32_t bandwidth, int *video_id, int *audio_id)
Definition: asfheader.c:894
_x_io_tcp_close
int _x_io_tcp_close(xine_stream_t *stream, int fd)
Definition: io_helper.c:740
xine_progress_data_t
Definition: xine.h:2009
CHUNK_TYPE_ASF_HEADER
#define CHUNK_TYPE_ASF_HEADER
Definition: mmsh.c:68
mmsh_valid_proto
static int mmsh_valid_proto(const char *proto)
Definition: mmsh.c:435
xprintf
#define xprintf(xine, verbose,...)
Definition: xineutils.h:664
mmsh_s::start_time
unsigned int start_time
Definition: mmsh.c:174
_x_io_tcp_read
off_t _x_io_tcp_read(xine_stream_t *stream, int s, void *buf_gen, off_t todo)
Definition: io_helper.c:524