xine-lib 1.2.11
Data Structures | Macros | Functions | Variables
rtsp.c File Reference
#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_trtsp_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"
 

Macro Definition Documentation

◆ BUF_SIZE

#define BUF_SIZE   4096

◆ HEADER_SIZE

#define HEADER_SIZE   1024

◆ LOG_MODULE

#define LOG_MODULE   "rtsp"

◆ LOG_VERBOSE

#define LOG_VERBOSE

◆ MAX_FIELDS

#define MAX_FIELDS   256

◆ RTSP_ANNOUNCE

#define RTSP_ANNOUNCE   0x004

◆ RTSP_CONNECTED

#define RTSP_CONNECTED   1

◆ RTSP_DESCRIBE

#define RTSP_DESCRIBE   0x002

◆ RTSP_GET_PARAMETER

#define RTSP_GET_PARAMETER   0x010

◆ RTSP_INIT

#define RTSP_INIT   2

◆ RTSP_OPTIONS

#define RTSP_OPTIONS   0x001

◆ RTSP_PLAY

#define RTSP_PLAY   0x080

◆ RTSP_PLAYING

#define RTSP_PLAYING   8

◆ RTSP_READY

#define RTSP_READY   4

◆ RTSP_RECORD

#define RTSP_RECORD   0x100

◆ RTSP_RECORDING

#define RTSP_RECORDING   16

◆ RTSP_SET_PARAMETER

#define RTSP_SET_PARAMETER   0x020

◆ RTSP_SETUP

#define RTSP_SETUP   0x008

◆ RTSP_TEARDOWN

#define RTSP_TEARDOWN   0x040

Function Documentation

◆ rtsp_basicauth()

static void rtsp_basicauth ( const char *  user,
const char *  password,
char **  dest 
)
static

References xine_base64_encode().

Referenced by rtsp_connect().

◆ rtsp_close()

void rtsp_close ( rtsp_t s)

◆ rtsp_connect()

rtsp_t * rtsp_connect ( xine_stream_t stream,
const char *  mrl,
const char *  user_agent 
)

◆ rtsp_free_answers()

void rtsp_free_answers ( rtsp_t s)

References rtsp_s::answers, and NULL.

Referenced by rtsp_close(), and rtsp_get_answers().

◆ rtsp_get()

static char * rtsp_get ( rtsp_t s)
static

◆ rtsp_get_answers()

static int rtsp_get_answers ( rtsp_t s)
static

◆ rtsp_get_code()

static int rtsp_get_code ( rtsp_t s,
const char *  string 
)
static

◆ rtsp_get_mrl()

char * rtsp_get_mrl ( rtsp_t s)

References rtsp_s::mrl.

Referenced by real_setup_and_get_header().

◆ rtsp_put()

static int rtsp_put ( rtsp_t s,
const char *  string 
)
static

◆ rtsp_read_data()

int rtsp_read_data ( rtsp_t s,
void *  buffer_gen,
unsigned int  size 
)

◆ rtsp_request_describe()

int rtsp_request_describe ( rtsp_t s,
const char *  what 
)

◆ rtsp_request_options()

int rtsp_request_options ( rtsp_t s,
const char *  what 
)

◆ rtsp_request_play()

int rtsp_request_play ( rtsp_t s,
const char *  what 
)

◆ rtsp_request_setparameter()

int rtsp_request_setparameter ( rtsp_t s,
const char *  what 
)

◆ rtsp_request_setup()

int rtsp_request_setup ( rtsp_t s,
const char *  what 
)

◆ rtsp_schedule_field()

void rtsp_schedule_field ( rtsp_t s,
const char *  string 
)

◆ rtsp_schedule_standard()

static void rtsp_schedule_standard ( rtsp_t s)
static

◆ rtsp_search_answers()

const char * rtsp_search_answers ( rtsp_t s,
const char *  tag 
)

◆ rtsp_send_ok()

int rtsp_send_ok ( rtsp_t s)

References rtsp_s::cseq, and rtsp_put().

Referenced by real_setup_and_get_header().

◆ rtsp_send_request()

static void rtsp_send_request ( rtsp_t s,
const char *  type,
const char *  what 
)
static

◆ rtsp_unschedule_all()

void rtsp_unschedule_all ( rtsp_t s)

References NULL, and rtsp_s::scheduled.

Referenced by rtsp_close(), and rtsp_send_request().

Variable Documentation

◆ rtsp_protocol_version

const char rtsp_protocol_version[] ="RTSP/1.0"
static

Referenced by rtsp_get_code(), and rtsp_send_request().