xine-lib: xine-lib-1.2.12/src/demuxers/demux_playlist.c File Reference

xine-lib 1.2.12

Data Structures | Macros | Enumerations | Functions | Variables
demux_playlist.c File Reference
`#include <stdio.h>`
`#include <fcntl.h>`
`#include <unistd.h>`
`#include <string.h>`
`#include <stdlib.h>`
`#include <ctype.h>`
`#include <xine/xine_internal.h>`
`#include <xine/xineutils.h>`
`#include "bswap.h"`
`#include <xine/demux.h>`

## Data Structures
struct | demux_playlist_t

## Macros
#define | LOG_MODULE "demux_playlist"
#define | LOG_VERBOSE

## Enumerations
enum | playlist_t { XINE_PLT_NONE = 0 , XINE_PLT_REF = ME_FOURCC('R','E','F',0) , XINE_PLT_M3U = ME_FOURCC('M','3','U',0) , XINE_PLT_RAM = ME_FOURCC('R','A','M',0) , XINE_PLT_PLS = ME_FOURCC('P','L','S',0) , XINE_PLT_ASX = ME_FOURCC('A','S','X',0) , XINE_PLT_SMI = ME_FOURCC('S','M','I',0) , XINE_PLT_QTL = ME_FOURCC('Q','T','L',0) , XINE_PLT_XSPF = ME_FOURCC('X','S','P',0) , XINE_PLT_RSS = ME_FOURCC('R','S','S',0) }

## Functions
static playlist_t | detect_by_extension (input_plugin_t *input)
static playlist_t | detect_by_content (input_plugin_t *input)
static char * | trim (char *s)
static int | parse_time (const char *s)
static void | parse_ref (demux_playlist_t *this, char *data, int length)
static void | parse_m3u (demux_playlist_t *this, char *data, int length)
static void | parse_ram (demux_playlist_t *this, char *data, int length)
static void | parse_pls (demux_playlist_t *this, char *data, int length)
static void | parse_asx (demux_playlist_t *this, char *data, int length)
static void | parse_smi (demux_playlist_t *this, char *data, int length)
static void | parse_qtl (demux_playlist_t *this, char *data, int length)
static void | parse_xspf (demux_playlist_t *this, char *data, int length)
static void | parse_rss (demux_playlist_t *this, char *data, int length)
static void | demux_playlist_send_headers (demux_plugin_t *this_gen)
static int | demux_playlist_send_chunk (demux_plugin_t *this_gen)
static int | demux_playlist_seek (demux_plugin_t *this_gen, off_t start_pos, int start_time, int playing)
static int | demux_playlist_get_status (demux_plugin_t *this_gen)
static int | demux_playlist_get_stream_length (demux_plugin_t *this_gen)
static uint32_t | demux_playlist_get_capabilities (demux_plugin_t *this_gen)
static int | demux_playlist_get_optional_data (demux_plugin_t *this_gen, void *data, int data_type)
static demux_plugin_t * | open_plugin (demux_class_t *class_gen, xine_stream_t *stream, input_plugin_t *input)
static void * | init_plugin (xine_t *xine, const void *data)

## Variables
static const demuxer_info_t | demux_info_playlist
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ LOG_MODULE

#define LOG_MODULE "demux_playlist"

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## Enumeration Type Documentation

## ◆ playlist_t

enum playlist_t

Enumerator
XINE_PLT_NONE |
XINE_PLT_REF |
XINE_PLT_M3U |
XINE_PLT_RAM |
XINE_PLT_PLS |
XINE_PLT_ASX |
XINE_PLT_SMI |
XINE_PLT_QTL |
XINE_PLT_XSPF |
XINE_PLT_RSS |

## Function Documentation

## ◆ demux_playlist_get_capabilities()

static uint32_t demux_playlist_get_capabilities | ( | demux_plugin_t * | this_gen | ) |
| static

References DEMUX_CAP_NOCAP.

Referenced by open_plugin().

## ◆ demux_playlist_get_optional_data()

static int demux_playlist_get_optional_data | ( | demux_plugin_t * | this_gen,
|  | void * | data,
|  | int | data_type
| ) |  |
| static

References DEMUX_OPTIONAL_UNSUPPORTED.

Referenced by open_plugin().

## ◆ demux_playlist_get_status()

static int demux_playlist_get_status | ( | demux_plugin_t * | this_gen | ) |
| static

Referenced by open_plugin().

## ◆ demux_playlist_get_stream_length()

static int demux_playlist_get_stream_length | ( | demux_plugin_t * | this_gen | ) |
| static

Referenced by open_plugin().

## ◆ demux_playlist_seek()

static int demux_playlist_seek | ( | demux_plugin_t * | this_gen,
|  | off_t | start_pos,
|  | int | start_time,
|  | int | playing
| ) |  |
| static

References DEMUX_OK.

Referenced by open_plugin().

## ◆ demux_playlist_send_chunk()

static int demux_playlist_send_chunk | ( | demux_plugin_t * | this_gen | ) |
| static

References DEMUX_FINISHED, input(), lprintf, NULL, parse_asx(), parse_m3u(), parse_pls(), parse_qtl(), parse_ram(), parse_ref(), parse_rss(), parse_smi(), parse_xspf(), XINE_PLT_ASX, XINE_PLT_M3U, XINE_PLT_PLS, XINE_PLT_QTL, XINE_PLT_RAM, XINE_PLT_REF, XINE_PLT_RSS, XINE_PLT_SMI, and XINE_PLT_XSPF.

Referenced by open_plugin().

## ◆ demux_playlist_send_headers()

static void demux_playlist_send_headers | ( | demux_plugin_t * | this_gen | ) |
| static

References _x_demux_control_start(), _x_stream_info_set(), DEMUX_FINISHED, DEMUX_OK, input(), XINE_STREAM_INFO_HAS_AUDIO, and XINE_STREAM_INFO_HAS_VIDEO.

Referenced by open_plugin().

## ◆ detect_by_content()

static playlist_t detect_by_content | ( | input_plugin_t * | input | ) |
| static

References _x_demux_read_header(), input(), XINE_PLT_ASX, XINE_PLT_M3U, XINE_PLT_NONE, XINE_PLT_PLS, XINE_PLT_QTL, XINE_PLT_RAM, XINE_PLT_REF, XINE_PLT_RSS, XINE_PLT_SMI, and XINE_PLT_XSPF.

Referenced by open_plugin().

## ◆ detect_by_extension()

static playlist_t detect_by_extension | ( | input_plugin_t * | input | ) |
| static

References input(), XINE_PLT_ASX, XINE_PLT_M3U, XINE_PLT_NONE, XINE_PLT_PLS, XINE_PLT_QTL, XINE_PLT_RAM, XINE_PLT_RSS, XINE_PLT_SMI, and XINE_PLT_XSPF.

Referenced by open_plugin().

## ◆ init_plugin()

static void * init_plugin | ( | xine_t * | xine,
|  | const void * | data
| ) |  |
| static

References N_, NULL, open_plugin(), and demux_class_s::open_plugin.

## ◆ open_plugin()

static demux_plugin_t * open_plugin | ( | demux_class_t * | class_gen,
|  | xine_stream_t * | stream,
|  | input_plugin_t * | input
| ) |  |
| static

References xine_stream_s::content_detection_method, default_demux_plugin_dispose, demux_playlist_get_capabilities(), demux_playlist_get_optional_data(), demux_playlist_get_status(), demux_playlist_get_stream_length(), demux_playlist_seek(), demux_playlist_send_chunk(), demux_playlist_send_headers(), detect_by_content(), detect_by_extension(), input(), lprintf, METHOD_BY_CONTENT, METHOD_BY_MRL, METHOD_EXPLICIT, NULL, xine_stream_s::xine, and XINE_PLT_NONE.

Referenced by init_plugin().

## ◆ parse_asx()

static void parse_asx | ( | demux_playlist_t * | this,
|  | char * | data,
|  | int | length
| ) |  |
| static

References _x_demux_send_mrl_reference(), xml_node_s::child, xml_node_s::data, lprintf, xml_node_s::name, xml_node_s::next, NULL, parse_ref(), parse_time(), xml_parser_build_tree_r(), XML_PARSER_CASE_INSENSITIVE, xml_parser_finalize_r(), xml_parser_free_tree(), xml_parser_get_property(), and xml_parser_init_r().

Referenced by demux_playlist_send_chunk().

## ◆ parse_m3u()

static void parse_m3u | ( | demux_playlist_t * | this,
|  | char * | data,
|  | int | length
| ) |  |
| static

References _x_demux_send_mrl_reference(), lprintf, NULL, and trim().

Referenced by demux_playlist_send_chunk().

## ◆ parse_pls()

static void parse_pls | ( | demux_playlist_t * | this,
|  | char * | data,
|  | int | length
| ) |  |
| static

References _x_demux_send_mrl_reference(), lprintf, NULL, and trim().

Referenced by demux_playlist_send_chunk().

## ◆ parse_qtl()

static void parse_qtl | ( | demux_playlist_t * | this,
|  | char * | data,
|  | int | length
| ) |  |
| static

References _x_demux_send_mrl_reference(), lprintf, xml_node_s::name, xml_node_s::next, NULL, xml_parser_build_tree_r(), XML_PARSER_CASE_SENSITIVE, xml_parser_finalize_r(), xml_parser_free_tree(), xml_parser_get_property(), and xml_parser_init_r().

Referenced by demux_playlist_send_chunk().

## ◆ parse_ram()

static void parse_ram | ( | demux_playlist_t * | this,
|  | char * | data,
|  | int | length
| ) |  |
| static

References _x_demux_send_mrl_reference(), lprintf, NULL, and trim().

Referenced by demux_playlist_send_chunk(), and parse_smi().

## ◆ parse_ref()

static void parse_ref | ( | demux_playlist_t * | this,
|  | char * | data,
|  | int | length
| ) |  |
| static

References _x_demux_send_mrl_reference(), lprintf, NULL, and trim().

Referenced by demux_playlist_send_chunk(), and parse_asx().

## ◆ parse_rss()

static void parse_rss | ( | demux_playlist_t * | this,
|  | char * | data,
|  | int | length
| ) |  |
| static

References _x_demux_send_mrl_reference(), xml_node_s::child, xml_node_s::data, lprintf, xml_node_s::name, xml_node_s::next, NULL, xml_parser_build_tree_r(), XML_PARSER_CASE_SENSITIVE, xml_parser_finalize_r(), xml_parser_free_tree(), xml_parser_get_property(), and xml_parser_init_r().

Referenced by demux_playlist_send_chunk().

## ◆ parse_smi()

static void parse_smi | ( | demux_playlist_t * | this,
|  | char * | data,
|  | int | length
| ) |  |
| static

References _x_demux_send_mrl_reference(), xml_node_s::child, lprintf, xml_node_s::name, xml_node_s::next, parse_ram(), parse_time(), xml_parser_build_tree_r(), XML_PARSER_CASE_SENSITIVE, xml_parser_finalize_r(), xml_parser_free_tree(), xml_parser_get_property(), and xml_parser_init_r().

Referenced by demux_playlist_send_chunk().

## ◆ parse_time()

static int parse_time | ( | const char * | s | ) |
| static

Referenced by parse_asx(), and parse_smi().

## ◆ parse_xspf()

static void parse_xspf | ( | demux_playlist_t * | this,
|  | char * | data,
|  | int | length
| ) |  |
| static

References _x_demux_send_mrl_reference(), xml_node_s::child, xml_node_s::data, lprintf, xml_node_s::name, xml_node_s::next, NULL, trim(), xml_parser_build_tree_r(), XML_PARSER_CASE_SENSITIVE, xml_parser_finalize_r(), xml_parser_free_tree(), and xml_parser_init_r().

Referenced by demux_playlist_send_chunk().

## ◆ trim()

static char * trim | ( | char * | s | ) |
| static

Referenced by parse_m3u(), parse_pls(), parse_ram(), parse_ref(), and parse_xspf().

## Variable Documentation

## ◆ demux_info_playlist

const demuxer_info_t demux_info_playlist
| static

Initial value:
= {
.priority = 10,
}

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_DEMUX, 27, "playlist", XINE_VERSION_CODE, &demux_info_playlist, init_plugin },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
init_plugin
static void * init_plugin(xine_t *xine, const void *data)
Definition: demux_playlist.c:735
demux_info_playlist
static const demuxer_info_t demux_info_playlist
Definition: demux_playlist.c:765
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition: xine_internal.h:57
NULL
NULL
Definition: xine_plugin.c:78
PLUGIN_DEMUX
#define PLUGIN_DEMUX
Definition: xine_plugin.h:31
PLUGIN_NONE
#define PLUGIN_NONE
Definition: xine_plugin.h:29