xine-lib 1.2.11
|
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include "rtsp.h"
#include <xine/io_helper.h>
#include <xine/xineutils.h>
Data Structures | |
struct | rtsp_s |
Macros | |
#define | LOG_MODULE "rtsp" |
#define | LOG_VERBOSE |
#define | BUF_SIZE 4096 |
#define | HEADER_SIZE 1024 |
#define | MAX_FIELDS 256 |
#define | RTSP_CONNECTED 1 |
#define | RTSP_INIT 2 |
#define | RTSP_READY 4 |
#define | RTSP_PLAYING 8 |
#define | RTSP_RECORDING 16 |
#define | RTSP_OPTIONS 0x001 |
#define | RTSP_DESCRIBE 0x002 |
#define | RTSP_ANNOUNCE 0x004 |
#define | RTSP_SETUP 0x008 |
#define | RTSP_GET_PARAMETER 0x010 |
#define | RTSP_SET_PARAMETER 0x020 |
#define | RTSP_TEARDOWN 0x040 |
#define | RTSP_PLAY 0x080 |
#define | RTSP_RECORD 0x100 |
Functions | |
static char * | rtsp_get (rtsp_t *s) |
static int | rtsp_put (rtsp_t *s, const char *string) |
static int | rtsp_get_code (rtsp_t *s, const char *string) |
static void | rtsp_send_request (rtsp_t *s, const char *type, const char *what) |
static void | rtsp_schedule_standard (rtsp_t *s) |
static int | rtsp_get_answers (rtsp_t *s) |
int | rtsp_send_ok (rtsp_t *s) |
int | rtsp_request_options (rtsp_t *s, const char *what) |
int | rtsp_request_describe (rtsp_t *s, const char *what) |
int | rtsp_request_setup (rtsp_t *s, const char *what) |
int | rtsp_request_setparameter (rtsp_t *s, const char *what) |
int | rtsp_request_play (rtsp_t *s, const char *what) |
int | rtsp_read_data (rtsp_t *s, void *buffer_gen, unsigned int size) |
static void | rtsp_basicauth (const char *user, const char *password, char **dest) |
rtsp_t * | rtsp_connect (xine_stream_t *stream, const char *mrl, const char *user_agent) |
void | rtsp_close (rtsp_t *s) |
const char * | rtsp_search_answers (rtsp_t *s, const char *tag) |
char * | rtsp_get_mrl (rtsp_t *s) |
void | rtsp_schedule_field (rtsp_t *s, const char *string) |
void | rtsp_unschedule_all (rtsp_t *s) |
void | rtsp_free_answers (rtsp_t *s) |
Variables | |
static const char | rtsp_protocol_version [] ="RTSP/1.0" |
#define BUF_SIZE 4096 |
#define HEADER_SIZE 1024 |
#define LOG_MODULE "rtsp" |
#define LOG_VERBOSE |
#define MAX_FIELDS 256 |
#define RTSP_ANNOUNCE 0x004 |
#define RTSP_CONNECTED 1 |
#define RTSP_DESCRIBE 0x002 |
#define RTSP_GET_PARAMETER 0x010 |
#define RTSP_INIT 2 |
#define RTSP_OPTIONS 0x001 |
#define RTSP_PLAY 0x080 |
#define RTSP_PLAYING 8 |
#define RTSP_READY 4 |
#define RTSP_RECORD 0x100 |
#define RTSP_RECORDING 16 |
#define RTSP_SET_PARAMETER 0x020 |
#define RTSP_SETUP 0x008 |
#define RTSP_TEARDOWN 0x040 |
|
static |
References xine_base64_encode().
Referenced by rtsp_connect().
void rtsp_close | ( | rtsp_t * | s | ) |
References _x_io_tcp_close(), rtsp_s::auth, rtsp_s::host, rtsp_s::mrl, rtsp_s::path, rtsp_free_answers(), rtsp_unschedule_all(), rtsp_s::s, rtsp_s::session, rtsp_s::stream, and rtsp_s::user_agent.
Referenced by rtsp_connect(), rtsp_session_end(), and rtsp_session_start().
rtsp_t * rtsp_connect | ( | xine_stream_t * | stream, |
const char * | mrl, | ||
const char * | user_agent | ||
) |
References _, _x_asprintf(), _x_io_tcp_connect(), rtsp_s::answers, rtsp_s::auth, rtsp_s::cseq, rtsp_s::host, lprintf, MAX_FIELDS, rtsp_s::mrl, NULL, rtsp_s::path, rtsp_s::port, rtsp_basicauth(), rtsp_close(), rtsp_request_options(), rtsp_schedule_field(), rtsp_s::s, rtsp_s::scheduled, rtsp_s::server, rtsp_s::server_caps, rtsp_s::session, rtsp_s::stream, rtsp_s::user_agent, xine_stream_s::xine, XINE_VERBOSITY_LOG, and xprintf.
Referenced by rtsp_session_start().
void rtsp_free_answers | ( | rtsp_t * | s | ) |
References rtsp_s::answers, and NULL.
Referenced by rtsp_close(), and rtsp_get_answers().
|
static |
References _x_io_tcp_read_line(), BUF_SIZE, lprintf, NULL, rtsp_s::s, rtsp_s::stream, and string.
Referenced by rtsp_get_answers(), and rtsp_read_data().
|
static |
References rtsp_s::answers, code, rtsp_s::cseq, lprintf, MAX_FIELDS, NULL, rtsp_free_answers(), rtsp_get(), rtsp_get_code(), rtsp_schedule_standard(), rtsp_s::server, rtsp_s::session, rtsp_s::stream, xine_stream_s::xine, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by rtsp_request_describe(), rtsp_request_options(), rtsp_request_play(), rtsp_request_setparameter(), and rtsp_request_setup().
|
static |
References _x_message(), code, rtsp_s::mrl, NULL, rtsp_protocol_version, RTSP_STATUS_SET_PARAMETER, rtsp_s::stream, xine_stream_s::xine, XINE_MSG_AUTHENTICATION_NEEDED, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by rtsp_get_answers().
char * rtsp_get_mrl | ( | rtsp_t * | s | ) |
References rtsp_s::mrl.
Referenced by real_setup_and_get_header().
|
static |
References _x_io_tcp_write(), lprintf, rtsp_s::s, and rtsp_s::stream.
Referenced by rtsp_read_data(), rtsp_send_ok(), and rtsp_send_request().
int rtsp_read_data | ( | rtsp_t * | s, |
void * | buffer_gen, | ||
unsigned int | size | ||
) |
References _x_asprintf(), _x_io_tcp_read(), lprintf, rtsp_get(), rtsp_put(), rtsp_s::s, and rtsp_s::stream.
Referenced by real_get_rdt_chunk(), and real_setup_and_get_header().
int rtsp_request_describe | ( | rtsp_t * | s, |
const char * | what | ||
) |
References _x_asprintf(), rtsp_s::host, rtsp_s::path, rtsp_s::port, rtsp_get_answers(), and rtsp_send_request().
Referenced by real_setup_and_get_header().
int rtsp_request_options | ( | rtsp_t * | s, |
const char * | what | ||
) |
References _x_asprintf(), rtsp_s::host, rtsp_s::port, rtsp_get_answers(), and rtsp_send_request().
Referenced by rtsp_connect().
int rtsp_request_play | ( | rtsp_t * | s, |
const char * | what | ||
) |
References _x_asprintf(), rtsp_s::host, rtsp_s::path, rtsp_s::port, rtsp_get_answers(), and rtsp_send_request().
Referenced by rtsp_session_play().
int rtsp_request_setparameter | ( | rtsp_t * | s, |
const char * | what | ||
) |
References _x_asprintf(), rtsp_s::host, rtsp_s::path, rtsp_s::port, rtsp_get_answers(), and rtsp_send_request().
Referenced by real_setup_and_get_header().
int rtsp_request_setup | ( | rtsp_t * | s, |
const char * | what | ||
) |
References rtsp_get_answers(), and rtsp_send_request().
Referenced by real_setup_and_get_header().
void rtsp_schedule_field | ( | rtsp_t * | s, |
const char * | string | ||
) |
References rtsp_s::scheduled.
Referenced by real_setup_and_get_header(), rtsp_connect(), rtsp_schedule_standard(), and rtsp_session_play().
|
static |
References _x_asprintf(), rtsp_s::cseq, rtsp_schedule_field(), and rtsp_s::session.
Referenced by rtsp_get_answers().
const char * rtsp_search_answers | ( | rtsp_t * | s, |
const char * | tag | ||
) |
References rtsp_s::answers, and NULL.
Referenced by real_setup_and_get_header(), and rtsp_session_start().
int rtsp_send_ok | ( | rtsp_t * | s | ) |
References rtsp_s::cseq, and rtsp_put().
Referenced by real_setup_and_get_header().
|
static |
References _x_asprintf(), rtsp_s::auth, rtsp_protocol_version, rtsp_put(), rtsp_unschedule_all(), and rtsp_s::scheduled.
Referenced by rtsp_request_describe(), rtsp_request_options(), rtsp_request_play(), rtsp_request_setparameter(), and rtsp_request_setup().
void rtsp_unschedule_all | ( | rtsp_t * | s | ) |
References NULL, and rtsp_s::scheduled.
Referenced by rtsp_close(), and rtsp_send_request().
|
static |
Referenced by rtsp_get_code(), and rtsp_send_request().