xine-lib  1.2.10
real.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  * special functions for real streams.
21  * adopted from joschkas real tools.
22  */
23 
24 #ifndef HAVE_REAL_H
25 #define HAVE_REAL_H
26 
27 #include "rmff.h"
28 #include "rtsp.h"
29 
30 #ifdef __CYGWIN__
31 #define uint32_t unsigned int
32 #define uint16_t unsigned short int
33 #define uint8_t unsigned char
34 #endif
35 
36 /*
37  * calculates response and checksum of a given challenge
38  * (RealChallenge1 in rtsp). See implementation for details.
39  */
40 void real_calc_response_and_checksum (char *response, char *chksum, char *challenge);
41 int real_get_rdt_chunk(rtsp_t *rtsp_session, unsigned char **buffer);
42 rmff_header_t *real_parse_sdp(char *data, char **stream_rules, uint32_t bandwidth);
43 rmff_header_t *real_setup_and_get_header(rtsp_t *rtsp_session, uint32_t bandwidth);
44 
45 #endif
46 
rmff_header_t::cont
rmff_cont_t * cont
Definition: rmff.h:168
sdpplin_t::title
char * title
Definition: sdpplin.h:85
real_get_rdt_chunk
int real_get_rdt_chunk(rtsp_t *rtsp_session, unsigned char **buffer)
Definition: real.c:536
rtsp_send_ok
int rtsp_send_ok(rtsp_t *s)
Definition: rtsp.c:282
rmff_new_cont
rmff_cont_t * rmff_new_cont(const char *title, const char *author, const char *copyright, const char *comment)
Definition: rmff.c:651
sdpplin_t::copyright
char * copyright
Definition: sdpplin.h:87
sdpplin.h
xine_buffer_copyin
#define xine_buffer_copyin(buf, i, data, len)
Definition: xine_buffer.c:194
xine_buffer_free
#define xine_buffer_free(buf)
Definition: xine_buffer.c:149
xineutils.h
rmff_new_prop
rmff_prop_t * rmff_new_prop(uint32_t max_bit_rate, uint32_t avg_bit_rate, uint32_t max_packet_size, uint32_t avg_packet_size, uint32_t num_packets, uint32_t duration, uint32_t preroll, uint32_t index_offset, uint32_t data_offset, uint16_t num_streams, uint16_t flags)
Definition: rmff.c:571
sdpplin_parse
sdpplin_t * sdpplin_parse(char *data)
Definition: sdpplin.c:201
MAX_DESC_BUF
#define MAX_DESC_BUF
maximum size of the rtsp description, must be < INT_MAX
Definition: real.c:606
sdpplin_stream_t::avg_packet_size
int avg_packet_size
Definition: sdpplin.h:50
key
char key[16]
Definition: xine_speex_decoder.c:94
real_setup_and_get_header
rmff_header_t * real_setup_and_get_header(rtsp_t *rtsp_session, uint32_t bandwidth)
Definition: real.c:607
xine_buffer_ensure_size
#define xine_buffer_ensure_size(buf, data)
Definition: xine_buffer.c:332
real_parse_sdp
rmff_header_t * real_parse_sdp(char *data, char **stream_rules, uint32_t bandwidth)
Definition: real.c:432
rmff_header_t
Definition: rmff.h:163
real_parse_sdp
rmff_header_t * real_parse_sdp(char *data, char **stream_rules, uint32_t bandwidth)
Definition: real.c:432
calc_response
static void calc_response(uint8_t *result, uint8_t *field)
Definition: real.c:260
rmff_pheader_t::object_version
uint16_t object_version
Definition: rmff.h:174
rtsp_schedule_field
void rtsp_schedule_field(rtsp_t *s, const char *string)
Definition: rtsp.c:633
field
static int field
Definition: spudec.c:733
rtsp.h
rmff_pheader_t::flags
uint8_t flags
Definition: rmff.h:180
lprintf
#define lprintf(...)
Definition: xineutils.h:620
sdpplin_stream_t::duration
int duration
Definition: sdpplin.h:56
xor_table
static const unsigned char xor_table[]
Definition: real.c:45
_X_BE_16
#define _X_BE_16(x)
Definition: bswap.h:40
rmff_cont_t::copyright
char * copyright
Definition: rmff.h:147
rmff_mdpr_t
Definition: rmff.h:110
rmff_header_t::prop
rmff_prop_t * prop
Definition: rmff.h:166
NULL
NULL
Definition: xine_plugin.c:78
rtsp_read_data
int rtsp_read_data(rtsp_t *s, void *buffer_gen, unsigned int size)
Definition: rtsp.c:381
sdpplin_t::stream_count
uint16_t stream_count
Definition: sdpplin.h:84
sdpplin_stream_t::max_packet_size
int max_packet_size
Definition: sdpplin.h:51
rmff_pheader_t::reserved
uint8_t reserved
Definition: rmff.h:179
rmff_cont_t::author
char * author
Definition: rmff.h:145
rmff_new_dataheader
rmff_data_t * rmff_new_dataheader(uint32_t num_packets, uint32_t next_data_header)
Definition: rmff.c:689
sdpplin_stream_t::start_time
int start_time
Definition: sdpplin.h:46
xine_hexdump
void xine_hexdump(const void *buf_gen, int length)
Definition: utils.c:576
rmff_new_fileheader
rmff_fileheader_t * rmff_new_fileheader(uint32_t num_headers)
Definition: rmff.c:558
_X_LE_32
#define _X_LE_32(x)
Definition: bswap.h:63
sdpplin_stream_t::mlti_data
char * mlti_data
Definition: sdpplin.h:61
sdpplin_stream_t::avg_bit_rate
int avg_bit_rate
Definition: sdpplin.h:48
sdpplin_stream_t::stream_id
uint16_t stream_id
Definition: sdpplin.h:40
rmff_pheader_t::stream_number
uint16_t stream_number
Definition: rmff.h:177
rtsp_get_mrl
char * rtsp_get_mrl(rtsp_t *s)
Definition: rtsp.c:623
MAX
#define MAX(a, b)
Definition: demux_ts.c:323
sdpplin_stream_t::mlti_data_size
int mlti_data_size
Definition: sdpplin.h:62
rmff_new_mdpr
rmff_mdpr_t * rmff_new_mdpr(uint16_t stream_number, uint32_t max_bit_rate, uint32_t avg_bit_rate, uint32_t max_packet_size, uint32_t avg_packet_size, uint32_t start_time, uint32_t preroll, uint32_t duration, const char *stream_name, const char *mime_type, uint32_t type_specific_len, const char *type_specific_data)
Definition: rmff.c:605
sdpplin_free
void sdpplin_free(sdpplin_t *p)
Definition: sdpplin.c:322
xine_buffer.h
rtsp_request_setparameter
int rtsp_request_setparameter(rtsp_t *s, const char *what)
Definition: rtsp.c:336
select_mlti_data
static int select_mlti_data(const char *mlti_chunk, int mlti_size, int selection, char **out)
Definition: real.c:370
asmrp_match
int asmrp_match(const char *rules, int bandwidth, int *matches, int matchsize)
Definition: asmrp.c:643
rtsp_request_describe
int rtsp_request_describe(rtsp_t *s, const char *what)
Definition: rtsp.c:313
call_hash
static void call_hash(uint8_t *key, const uint8_t *challenge, unsigned int len)
Definition: real.c:217
sdpplin_stream_t::mime_type
char * mime_type
Definition: sdpplin.h:59
sdpplin_t::flags
int flags
Definition: sdpplin.h:82
sdpplin_t::abstract
char * abstract
Definition: sdpplin.h:91
rmff_header_t::fileheader
rmff_fileheader_t * fileheader
Definition: rmff.h:165
real_calc_response_and_checksum
void real_calc_response_and_checksum(char *response, char *chksum, char *challenge)
Definition: real.c:315
sdpplin_t::author
char * author
Definition: sdpplin.h:86
sdpplin_stream_t::stream_name
char * stream_name
Definition: sdpplin.h:57
rmff_cont_t::title
char * title
Definition: rmff.h:143
hash
static void hash(uint8_t *field, const uint8_t *param)
Definition: real.c:55
bswap.h
rmff_dump_pheader
void rmff_dump_pheader(rmff_pheader_t *h, uint8_t *data)
Definition: rmff.c:280
rmff_pheader_t::timestamp
uint32_t timestamp
Definition: rmff.h:178
rtsp_request_setup
int rtsp_request_setup(rtsp_t *s, const char *what)
Definition: rtsp.c:329
real.h
real_calc_response_and_checksum
void real_calc_response_and_checksum(char *response, char *chksum, char *challenge)
Definition: real.c:315
_X_BE_32
#define _X_BE_32(x)
Definition: bswap.h:45
rmff_prop_t::num_streams
uint16_t num_streams
Definition: rmff.h:105
_X_BE_32C
#define _X_BE_32C(x, y)
Definition: real.c:52
config.h
sdpplin_t
Definition: sdpplin.h:70
rmff_fix_header
void rmff_fix_header(rmff_header_t *h)
Definition: rmff.c:771
rmff_header_t::streams
rmff_mdpr_t ** streams
Definition: rmff.h:167
rmff_header_t::data
rmff_data_t * data
Definition: rmff.h:169
sdpplin_stream_t::max_bit_rate
int max_bit_rate
Definition: sdpplin.h:49
XOR_TABLE_LEN
#define XOR_TABLE_LEN
Definition: real.c:44
real_setup_and_get_header
rmff_header_t * real_setup_and_get_header(rtsp_t *rtsp_session, uint32_t bandwidth)
Definition: real.c:607
real_get_rdt_chunk
int real_get_rdt_chunk(rtsp_t *rtsp_session, unsigned char **buffer)
Definition: real.c:536
calc_response_string
static void calc_response_string(char *result, const uint8_t *challenge)
Definition: real.c:288
sdpplin_t::stream
sdpplin_stream_t ** stream
Definition: sdpplin.h:100
rmff.h
xine_buffer_init
void * xine_buffer_init(int chunk_size)
Definition: xine_buffer.c:129
sdpplin_stream_t::preroll
int preroll
Definition: sdpplin.h:54
rmff_pheader_t::length
uint16_t length
Definition: rmff.h:176
rmff_pheader_t
Definition: rmff.h:172
sdpplin_stream_t::asm_rule_book
char * asm_rule_book
Definition: sdpplin.h:66
asmrp.h
xine_buffer_strcat
#define xine_buffer_strcat(buf, data)
Definition: xine_buffer.c:266
rtsp_s
Definition: rtsp.c:49
_X_LE_32C
#define _X_LE_32C(x, y)
Definition: real.c:53
rtsp_search_answers
const char * rtsp_search_answers(rtsp_t *s, const char *tag)
Definition: rtsp.c:583