xine-lib: xine-lib-1.2.13/src/combined/xine_ogg_demuxer.c File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Typedefs | Functions | Variables
xine_ogg_demuxer.c File Reference
`#include <stdio.h>`
`#include <fcntl.h>`
`#include <unistd.h>`
`#include <string.h>`
`#include <ctype.h>`
`#include <stdlib.h>`
`#include <inttypes.h>`
`#include <ogg/ogg.h>`
`#include <xine/xine_internal.h>`
`#include <xine/xineutils.h>`
`#include <xine/demux.h>`
`#include "bswap.h"`
`#include "flacutils.h"`
`#include "ogg_combined.h"`

## Data Structures
struct | chapter_entry_s
struct | chapter_info_s
struct | stream_info_s
struct | demux_ogg_s
struct | demux_ogg_class_t
struct | demux_anx_class_t
struct | ogg_meta

## Macros
#define | LOG_MODULE "demux_ogg"
#define | LOG_VERBOSE
#define | DEBUG_PACKETS 0
#define | DEBUG_PREVIEWS 0
#define | DEBUG_PTS 0
#define | DEBUG_VIDEO_PACKETS 0
#define | CHUNKSIZE 8500
#define | PACKET_TYPE_HEADER 0x01
#define | PACKET_TYPE_COMMENT 0x03
#define | PACKET_TYPE_CODEBOOK 0x05
#define | PACKET_TYPE_BITS 0x07
#define | PACKET_LEN_BITS01 0xc0
#define | PACKET_LEN_BITS2 0x02
#define | PACKET_IS_SYNCPOINT 0x08
#define | MAX_STREAMS 32
#define | PTS_AUDIO 0
#define | PTS_VIDEO 1
#define | WRAP_THRESHOLD 900000
#define | SUB_BUFSIZE 1024
#define | abs(x) ( ((x)<0) ? -(x) : (x) )
#define | OGG_META(TAG, APPEND) { #TAG"=", XINE_META_INFO_##TAG, APPEND }
#define | OGG_META_L(TAG, APPEND, META) { #TAG"=", XINE_META_INFO_##META, APPEND }
#define | ANNODEX_SIGNATURE_SEARCH 128

## Typedefs
typedef struct chapter_entry_s | chapter_entry_t
typedef struct chapter_info_s | chapter_info_t
typedef struct stream_info_s | stream_info_t
typedef struct demux_ogg_s | demux_ogg_t

## Functions
static int | get_stream (demux_ogg_t *this, int serno)
static int | new_stream_info (demux_ogg_t *this, const int cur_serno)
static int64_t | get_pts (demux_ogg_t *this, int stream_num, int64_t granulepos)
static int | read_ogg_packet (demux_ogg_t *this)
static void | get_stream_length (demux_ogg_t *this)
static void | check_newpts (demux_ogg_t *this, int64_t pts, int video, int preview)
static void | ogg_handle_event (demux_ogg_t *this)
static int | read_comments (demux_ogg_t *this, const char *comment)
static void | read_language_comment (demux_ogg_t *this, ogg_packet *op, int stream_num)
static void | read_chapter_comment (demux_ogg_t *this, ogg_packet *op)
static void | update_chapter_display (demux_ogg_t *this, int stream_num, ogg_packet *op)
static void | send_ogg_buf (demux_ogg_t *this, ogg_packet *op, int stream_num, uint32_t decoder_flags)
static void | decode_vorbis_header (demux_ogg_t *this, const int stream_num, ogg_packet *op)
static void | decode_speex_header (demux_ogg_t *this, const int stream_num, ogg_packet *op)
static void | decode_video_header (demux_ogg_t *this, const int stream_num, ogg_packet *op)
static void | decode_audio_header (demux_ogg_t *this, const int stream_num, ogg_packet *op)
static void | decode_dshow_header (demux_ogg_t *this, const int stream_num, ogg_packet *op)
static void | decode_text_header (demux_ogg_t *this, const int stream_num, ogg_packet *op)
static void | decode_theora_header (demux_ogg_t *this, const int stream_num, ogg_packet *op)
static void | decode_flac_header (demux_ogg_t *this, const int stream_num, ogg_packet *op)
static void | decode_opus_header (demux_ogg_t *this, const int stream_num, ogg_packet *op)
static void | decode_annodex_header (demux_ogg_t *this, const int stream_num, ogg_packet *op)
static void | decode_anxdata_header (demux_ogg_t *this, const int stream_num, ogg_packet *op)
static void | decode_cmml_header (demux_ogg_t *this, const int stream_num, ogg_packet *op)
static void | send_header (demux_ogg_t *this)
static int | demux_ogg_send_chunk (demux_plugin_t *this_gen)
static void | demux_ogg_dispose (demux_plugin_t *this_gen)
static int | demux_ogg_get_status (demux_plugin_t *this_gen)
static void | demux_ogg_send_headers (demux_plugin_t *this_gen)
static int | demux_ogg_seek (demux_plugin_t *this_gen, off_t start_pos, int start_time, int playing)
static int | demux_ogg_get_stream_length (demux_plugin_t *this_gen)
static uint32_t | demux_ogg_get_capabilities (demux_plugin_t *this_gen)
static int | format_lang_string (demux_ogg_t *this, uint32_t buf_mask, uint32_t buf_type, int channel, char *str)
static int | demux_ogg_get_optional_data (demux_plugin_t *this_gen, void *data, int data_type)
static int | detect_ogg_content (int detection_method, input_plugin_t *input)
static int | detect_anx_content (int detection_method, input_plugin_t *input)
static demux_plugin_t * | anx_open_plugin (demux_class_t *class_gen, xine_stream_t *stream, input_plugin_t *input)
static demux_plugin_t * | ogg_open_plugin (demux_class_t *class_gen, xine_stream_t *stream, input_plugin_t *input)
void * | anx_init_class (xine_t *xine, const void *data)
void * | ogg_init_class (xine_t *xine, const void *data)

## Variables
static const struct ogg_meta | metadata []

## Macro Definition Documentation

## ◆ abs

#define abs | ( |  | x | ) | ( ((x)<0) ? -(x) : (x) )

Referenced by _x_keyframes_add(), adjust_zoom(), ao_loop(), ao_sun_delay(), audio_filter_compress(), check_newpts(), DMO_VideoDecoder_SetDestFmt(), DS_VideoDecoder_SetDestFmt(), and find_close_samplerate_match().

## ◆ ANNODEX_SIGNATURE_SEARCH

#define ANNODEX_SIGNATURE_SEARCH 128

Referenced by detect_anx_content().

## ◆ CHUNKSIZE

#define CHUNKSIZE 8500

Referenced by read_ogg_packet().

## ◆ DEBUG_PACKETS

#define DEBUG_PACKETS 0

Referenced by demux_ogg_send_chunk(), and send_ogg_buf().

## ◆ DEBUG_PREVIEWS

#define DEBUG_PREVIEWS 0

Referenced by send_header().

## ◆ DEBUG_PTS

#define DEBUG_PTS 0

Referenced by check_newpts().

## ◆ DEBUG_VIDEO_PACKETS

#define DEBUG_VIDEO_PACKETS 0

Referenced by send_ogg_buf().

## ◆ LOG_MODULE

#define LOG_MODULE "demux_ogg"

Referenced by decode_audio_header(), decode_dshow_header(), and decode_video_header().

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## ◆ MAX_STREAMS

#define MAX_STREAMS 32

Referenced by demux_ogg_send_chunk(), open_plugin(), parse_tracks(), send_header(), spudec_dispose(), and spudec_reset().

## ◆ OGG_META

#define OGG_META | ( |  | TAG,
|  |  | APPEND ) { #TAG"=", XINE_META_INFO_##TAG, APPEND }

## ◆ OGG_META_L

#define OGG_META_L | ( |  | TAG,
|  |  | APPEND,
|  |  | META ) { #TAG"=", XINE_META_INFO_##META, APPEND }

## ◆ PACKET_IS_SYNCPOINT

#define PACKET_IS_SYNCPOINT 0x08

Referenced by demux_ogg_send_chunk().

## ◆ PACKET_LEN_BITS01

#define PACKET_LEN_BITS01 0xc0

Referenced by send_ogg_buf().

## ◆ PACKET_LEN_BITS2

#define PACKET_LEN_BITS2 0x02

Referenced by send_ogg_buf().

## ◆ PACKET_TYPE_BITS

#define PACKET_TYPE_BITS 0x07

## ◆ PACKET_TYPE_CODEBOOK

#define PACKET_TYPE_CODEBOOK 0x05

## ◆ PACKET_TYPE_COMMENT

#define PACKET_TYPE_COMMENT 0x03

Referenced by send_header(), and send_ogg_buf().

## ◆ PACKET_TYPE_HEADER

#define PACKET_TYPE_HEADER 0x01

Referenced by demux_ogg_send_chunk(), and send_ogg_buf().

## ◆ PTS_AUDIO

#define PTS_AUDIO 0

Referenced by demux_ogg_seek(), and send_ogg_buf().

## ◆ PTS_VIDEO

#define PTS_VIDEO 1

Referenced by demux_ogg_seek(), and send_ogg_buf().

## ◆ SUB_BUFSIZE

#define SUB_BUFSIZE 1024

## ◆ WRAP_THRESHOLD

#define WRAP_THRESHOLD 900000

Referenced by check_newpts().

## Typedef Documentation

## ◆ chapter_entry_t

typedef struct chapter_entry_s chapter_entry_t

## ◆ chapter_info_t

typedef struct chapter_info_s chapter_info_t

## ◆ demux_ogg_t

typedef struct demux_ogg_s demux_ogg_t

## ◆ stream_info_t

typedef struct stream_info_s stream_info_t

## Function Documentation

## ◆ anx_init_class()

void * anx_init_class | ( | xine_t * | xine,
|  | const void * | data )

References anx_open_plugin(), default_demux_class_dispose, N_, and NULL.

## ◆ anx_open_plugin()

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

References xine_stream_s::content_detection_method, DEMUX_FINISHED, demux_ogg_dispose(), demux_ogg_get_capabilities(), demux_ogg_get_optional_data(), demux_ogg_get_status(), demux_ogg_get_stream_length(), demux_ogg_seek(), demux_ogg_send_chunk(), demux_ogg_send_headers(), detect_anx_content(), input(), NULL, input_plugin_s::seek, xine_event_new_queue(), and XINE_STREAM_INFO_MAX.

Referenced by anx_init_class().

## ◆ check_newpts()

static void check_newpts | ( | demux_ogg_t * | this,
|  | int64_t | pts,
|  | int | video,
|  | int | preview )
| static

References _x_demux_control_newpts(), abs, BUF_FLAG_SEEK, DEBUG_PTS, input(), llprintf, WRAP_THRESHOLD, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by send_ogg_buf().

## ◆ decode_annodex_header()

static void decode_annodex_header | ( | demux_ogg_t * | this,
|  | const int | stream_num,
|  | ogg_packet * | op )
| static

References _x_meta_info_set(), BUF_CONTROL_NOP, lprintf, and XINE_META_INFO_SYSTEMLAYER.

Referenced by send_header().

## ◆ decode_anxdata_header()

static void decode_anxdata_header | ( | demux_ogg_t * | this,
|  | const int | stream_num,
|  | ogg_packet * | op )
| static

References _X_LE_32, _X_LE_64, BUF_AUDIO_SPEEX, BUF_AUDIO_VORBIS, BUF_CONTROL_NOP, BUF_SPU_CMML, BUF_VIDEO_THEORA, and lprintf.

Referenced by send_header().

## ◆ decode_audio_header()

static void decode_audio_header | ( | demux_ogg_t * | this,
|  | const int | stream_num,
|  | ogg_packet * | op )
| static

References _x_formattag_to_buf_audio(), _X_LE_16, _X_LE_32, _X_LE_64, _x_report_audio_format_tag(), _x_stream_info_set(), BUF_AUDIO_UNKNOWN, BUF_CONTROL_NOP, BUF_FLAG_FRAME_END, BUF_FLAG_HEADER, BUF_FLAG_STDHEADER, buf_element_s::decoder_flags, buf_element_s::decoder_info, LOG_MODULE, lprintf, NULL, buf_element_s::type, xine_hexdump(), XINE_STREAM_INFO_AUDIO_BITRATE, XINE_STREAM_INFO_AUDIO_BITS, XINE_STREAM_INFO_AUDIO_CHANNELS, XINE_STREAM_INFO_AUDIO_FOURCC, and XINE_STREAM_INFO_AUDIO_SAMPLERATE.

Referenced by send_header().

## ◆ decode_cmml_header()

static void decode_cmml_header | ( | demux_ogg_t * | this,
|  | const int | stream_num,
|  | ogg_packet * | op )
| static

References _X_LE_64, and BUF_SPU_CMML.

Referenced by send_header().

## ◆ decode_dshow_header()

static void decode_dshow_header | ( | demux_ogg_t * | this,
|  | const int | stream_num,
|  | ogg_packet * | op )
| static

References _x_fourcc_to_buf_video(), _X_LE_16, _X_LE_32, _x_report_video_fourcc(), _x_stream_info_set(), xine_bmiheader::biBitCount, xine_bmiheader::biClrImportant, xine_bmiheader::biClrUsed, xine_bmiheader::biCompression, xine_bmiheader::biHeight, xine_bmiheader::biPlanes, xine_bmiheader::biSize, xine_bmiheader::biSizeImage, xine_bmiheader::biWidth, xine_bmiheader::biXPelsPerMeter, xine_bmiheader::biYPelsPerMeter, BUF_CONTROL_NOP, BUF_FLAG_FRAME_END, BUF_FLAG_FRAMERATE, BUF_FLAG_HEADER, BUF_FLAG_STDHEADER, BUF_VIDEO_UNKNOWN, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, LOG_MODULE, lprintf, buf_element_s::size, buf_element_s::type, xine_hexdump(), XINE_STREAM_INFO_FRAME_DURATION, XINE_STREAM_INFO_VIDEO_HEIGHT, XINE_STREAM_INFO_VIDEO_WIDTH, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by send_header().

## ◆ decode_flac_header()

static void decode_flac_header | ( | demux_ogg_t * | this,
|  | const int | stream_num,
|  | ogg_packet * | op )
| static

References _x_assert, _X_BE_32, _x_parse_flac_metadata_header(), _x_parse_flac_streaminfo_block(), _x_stream_info_set(), xine_flac_streaminfo_block::bits_per_sample, xine_flac_metadata_header::blocktype, BUF_AUDIO_FLAC, BUF_FLAG_FRAME_END, BUF_FLAG_HEADER, BUF_FLAG_STDHEADER, xine_waveformatex::cbSize, xine_flac_streaminfo_block::channels, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, FLAC_BLOCKTYPE_STREAMINFO, FLAC_STREAMINFO_SIZE, xine_flac_metadata_header::length, ME_FOURCC, xine_flac_streaminfo_block::samplerate, buf_element_s::size, buf_element_s::type, xine_hexdump(), XINE_STREAM_INFO_AUDIO_BITS, XINE_STREAM_INFO_AUDIO_CHANNELS, and XINE_STREAM_INFO_AUDIO_SAMPLERATE.

Referenced by send_header().

## ◆ decode_opus_header()

static void decode_opus_header | ( | demux_ogg_t * | this,
|  | const int | stream_num,
|  | ogg_packet * | op )
| static

References _X_BE_32, _x_stream_info_set(), BUF_AUDIO_OPUS, BUF_FLAG_FRAME_END, BUF_FLAG_HEADER, BUF_FLAG_STDHEADER, xine_waveformatex::cbSize, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, buf_element_s::size, buf_element_s::type, XINE_STREAM_INFO_AUDIO_CHANNELS, and XINE_STREAM_INFO_AUDIO_SAMPLERATE.

Referenced by send_header().

## ◆ decode_speex_header()

static void decode_speex_header | ( | demux_ogg_t * | this,
|  | const int | stream_num,
|  | ogg_packet * | op )
| static

References _x_stream_info_set(), BUF_AUDIO_SPEEX, BUF_CONTROL_NOP, lprintf, mode(), XINE_STREAM_INFO_AUDIO_BITRATE, XINE_STREAM_INFO_AUDIO_SAMPLERATE, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by send_header().

## ◆ decode_text_header()

static void decode_text_header | ( | demux_ogg_t * | this,
|  | const int | stream_num,
|  | ogg_packet * | op )
| static

References BUF_SPU_OGM, buf_element_s::content, lprintf, buf_element_s::pts, and buf_element_s::type.

Referenced by send_header().

## ◆ decode_theora_header()

static void decode_theora_header | ( | demux_ogg_t * | this,
|  | const int | stream_num,
|  | ogg_packet * | op )
| static

References _x_meta_info_set(), _x_stream_info_set(), BUF_CONTROL_NOP, BUF_VIDEO_THEORA, lprintf, XINE_META_INFO_VIDEOCODEC, XINE_STREAM_INFO_FRAME_DURATION, XINE_STREAM_INFO_VIDEO_HEIGHT, XINE_STREAM_INFO_VIDEO_RATIO, XINE_STREAM_INFO_VIDEO_WIDTH, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by send_header().

## ◆ decode_video_header()

static void decode_video_header | ( | demux_ogg_t * | this,
|  | const int | stream_num,
|  | ogg_packet * | op )
| static

References _x_fourcc_to_buf_video(), _X_LE_16, _X_LE_32, _X_LE_64, _x_report_video_fourcc(), _x_stream_info_set(), xine_bmiheader::biBitCount, xine_bmiheader::biClrImportant, xine_bmiheader::biClrUsed, xine_bmiheader::biCompression, xine_bmiheader::biHeight, xine_bmiheader::biPlanes, xine_bmiheader::biSize, xine_bmiheader::biSizeImage, xine_bmiheader::biWidth, xine_bmiheader::biXPelsPerMeter, xine_bmiheader::biYPelsPerMeter, BUF_FLAG_FRAME_END, BUF_FLAG_FRAMERATE, BUF_FLAG_HEADER, BUF_FLAG_STDHEADER, BUF_VIDEO_UNKNOWN, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, LOG_MODULE, lprintf, buf_element_s::size, buf_element_s::type, xine_hexdump(), XINE_STREAM_INFO_FRAME_DURATION, XINE_STREAM_INFO_VIDEO_FOURCC, XINE_STREAM_INFO_VIDEO_HEIGHT, and XINE_STREAM_INFO_VIDEO_WIDTH.

Referenced by send_header().

## ◆ decode_vorbis_header()

static void decode_vorbis_header | ( | demux_ogg_t * | this,
|  | const int | stream_num,
|  | ogg_packet * | op )
| static

References _, _x_stream_info_set(), BUF_AUDIO_VORBIS, xine_log(), XINE_LOG_MSG, XINE_STREAM_INFO_AUDIO_BITRATE, and XINE_STREAM_INFO_AUDIO_SAMPLERATE.

Referenced by send_header().

## ◆ demux_ogg_dispose()

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

References xine_event_dispose_queue(), and XINE_STREAM_INFO_MAX.

Referenced by anx_open_plugin(), and ogg_open_plugin().

## ◆ demux_ogg_get_capabilities()

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

References DEMUX_CAP_AUDIOLANG, DEMUX_CAP_CHAPTERS, and DEMUX_CAP_SPULANG.

Referenced by anx_open_plugin(), and ogg_open_plugin().

## ◆ demux_ogg_get_optional_data()

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

References BUF_AUDIO_BASE, BUF_SPU_OGM, DEMUX_OPTIONAL_DATA_AUDIOLANG, DEMUX_OPTIONAL_DATA_SPULANG, DEMUX_OPTIONAL_SUCCESS, DEMUX_OPTIONAL_UNSUPPORTED, format_lang_string(), and lprintf.

Referenced by anx_open_plugin(), and ogg_open_plugin().

## ◆ demux_ogg_get_status()

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

Referenced by anx_open_plugin(), and ogg_open_plugin().

## ◆ demux_ogg_get_stream_length()

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

References input().

Referenced by anx_open_plugin(), and ogg_open_plugin().

## ◆ demux_ogg_seek()

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

References _x_demux_flush_engine(), DEMUX_OK, input(), INPUT_IS_SEEKABLE, lprintf, PTS_AUDIO, and PTS_VIDEO.

Referenced by anx_open_plugin(), and ogg_open_plugin().

## ◆ demux_ogg_send_chunk()

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

References _x_demux_control_end(), _x_demux_control_start(), BUF_AUDIO_FLAC, BUF_AUDIO_SPEEX, BUF_SPU_BASE, BUF_VIDEO_BASE, BUF_VIDEO_THEORA, DEBUG_PACKETS, DEMUX_FINISHED, get_pts(), get_stream(), llprintf, lprintf, MAX_STREAMS, new_stream_info(), ogg_handle_event(), PACKET_IS_SYNCPOINT, PACKET_TYPE_HEADER, read_ogg_packet(), send_header(), send_ogg_buf(), XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.

Referenced by anx_open_plugin(), and ogg_open_plugin().

## ◆ demux_ogg_send_headers()

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

References _x_demux_control_start(), _x_stream_info_set(), DEMUX_FINISHED, DEMUX_OK, input(), lprintf, send_header(), XINE_STREAM_INFO_HAS_AUDIO, XINE_STREAM_INFO_HAS_VIDEO, XINE_STREAM_INFO_MAX_SPU_CHANNEL, and XINE_STREAM_INFO_VIDEO_HANDLED.

Referenced by anx_open_plugin(), and ogg_open_plugin().

## ◆ detect_anx_content()

static int detect_anx_content | ( | int | detection_method,
|  | input_plugin_t * | input )
| static

References _x_demux_read_header(), ANNODEX_SIGNATURE_SEARCH, detect_ogg_content(), input(), METHOD_BY_CONTENT, METHOD_BY_MRL, and METHOD_EXPLICIT.

Referenced by anx_open_plugin().

## ◆ detect_ogg_content()

static int detect_ogg_content | ( | int | detection_method,
|  | input_plugin_t * | input )
| static

References _x_demux_read_header(), input(), ME_FOURCC, METHOD_BY_CONTENT, METHOD_BY_MRL, and METHOD_EXPLICIT.

Referenced by detect_anx_content(), and ogg_open_plugin().

## ◆ format_lang_string()

static int format_lang_string | ( | demux_ogg_t * | this,
|  | uint32_t | buf_mask,
|  | uint32_t | buf_type,
|  | int | channel,
|  | char * | str )
| static

References buf_type, DEMUX_OPTIONAL_SUCCESS, DEMUX_OPTIONAL_UNSUPPORTED, and XINE_LANG_MAX.

Referenced by demux_ogg_get_optional_data().

## ◆ get_pts()

static int64_t get_pts | ( | demux_ogg_t * | this,
|  | int | stream_num,
|  | int64_t | granulepos )
| static

References BUF_SPU_CMML, and BUF_VIDEO_THEORA.

Referenced by demux_ogg_send_chunk(), get_stream_length(), send_ogg_buf(), update_chapter_display(), and vdr_execute_rpc_command().

## ◆ get_stream()

static int get_stream | ( | demux_ogg_t * | this,
|  | int | serno )
| static

Referenced by demux_ogg_send_chunk(), get_stream_length(), and send_header().

## ◆ get_stream_length()

static void get_stream_length | ( | demux_ogg_t * | this | ) |
| static

References _x_stream_info_set(), get_pts(), get_stream(), input(), INPUT_CAP_SEEKABLE, read_ogg_packet(), and XINE_STREAM_INFO_BITRATE.

Referenced by send_header().

## ◆ new_stream_info()

static int new_stream_info | ( | demux_ogg_t * | this,
|  | const int | cur_serno )
| static

Referenced by demux_ogg_send_chunk(), and send_header().

## ◆ ogg_handle_event()

static void ogg_handle_event | ( | demux_ogg_t * | this | ) |
| static

References xine_event_t::type, xine_event_free(), xine_event_get(), XINE_EVENT_INPUT_NEXT, and XINE_EVENT_INPUT_PREVIOUS.

Referenced by demux_ogg_send_chunk().

## ◆ ogg_init_class()

void * ogg_init_class | ( | xine_t * | xine,
|  | const void * | data )

References default_demux_class_dispose, N_, NULL, and ogg_open_plugin().

## ◆ ogg_open_plugin()

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

References xine_stream_s::content_detection_method, DEMUX_FINISHED, demux_ogg_dispose(), demux_ogg_get_capabilities(), demux_ogg_get_optional_data(), demux_ogg_get_status(), demux_ogg_get_stream_length(), demux_ogg_seek(), demux_ogg_send_chunk(), demux_ogg_send_headers(), detect_ogg_content(), input(), NULL, input_plugin_s::seek, xine_event_new_queue(), and XINE_STREAM_INFO_MAX.

Referenced by ogg_init_class().

## ◆ read_chapter_comment()

static void read_chapter_comment | ( | demux_ogg_t * | this,
|  | ogg_packet * | op )
| static

References _x_freep(), lprintf, NULL, and read_comments().

Referenced by send_ogg_buf().

## ◆ read_comments()

static int read_comments | ( | demux_ogg_t * | this,
|  | const char * | comment )
| static

References _x_meta_info_set_utf8(), ogg_meta::meta, and metadata.

Referenced by read_chapter_comment(), and read_language_comment().

## ◆ read_language_comment()

static void read_language_comment | ( | demux_ogg_t * | this,
|  | ogg_packet * | op,
|  | int | stream_num )
| static

References read_comments().

Referenced by send_ogg_buf().

## ◆ read_ogg_packet()

static int read_ogg_packet | ( | demux_ogg_t * | this | ) |
| static

References CHUNKSIZE, input(), and lprintf.

Referenced by demux_ogg_send_chunk(), get_stream_length(), and send_header().

## ◆ send_header()

static void send_header | ( | demux_ogg_t * | this | ) |
| static

References BUF_CONTROL_NOP, BUF_FLAG_HEADER, xine_event_t::data_length, DEBUG_PREVIEWS, decode_annodex_header(), decode_anxdata_header(), decode_audio_header(), decode_cmml_header(), decode_dshow_header(), decode_flac_header(), decode_opus_header(), decode_speex_header(), decode_text_header(), decode_theora_header(), decode_video_header(), decode_vorbis_header(), DEMUX_FINISHED, get_stream(), get_stream_length(), llprintf, lprintf, MAX_STREAMS, new_stream_info(), PACKET_TYPE_COMMENT, read_ogg_packet(), send_ogg_buf(), xine_event_t::type, xine_event_send(), XINE_EVENT_UI_CHANNELS_CHANGED, xine_hexdump(), XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.

Referenced by demux_mpgaudio_next(), demux_ogg_send_chunk(), and demux_ogg_send_headers().

## ◆ send_ogg_buf()

static void send_ogg_buf | ( | demux_ogg_t * | this,
|  | ogg_packet * | op,
|  | int | stream_num,
|  | uint32_t | decoder_flags )
| static

References _x_demux_send_data(), BUF_AUDIO_BASE, BUF_AUDIO_FLAC, BUF_AUDIO_OPUS, BUF_AUDIO_SPEEX, BUF_AUDIO_VORBIS, BUF_FLAG_HEADER, BUF_SPU_BASE, BUF_SPU_CMML, BUF_VIDEO_BASE, BUF_VIDEO_THEORA, check_newpts(), buf_element_s::content, DEBUG_PACKETS, DEBUG_VIDEO_PACKETS, get_pts(), input(), llprintf, lprintf, PACKET_LEN_BITS01, PACKET_LEN_BITS2, PACKET_TYPE_COMMENT, PACKET_TYPE_HEADER, buf_element_s::pts, PTS_AUDIO, PTS_VIDEO, read_chapter_comment(), read_language_comment(), buf_element_s::size, buf_element_s::type, and update_chapter_display().

Referenced by demux_ogg_send_chunk(), and send_header().

## ◆ update_chapter_display()

static void update_chapter_display | ( | demux_ogg_t * | this,
|  | int | stream_num,
|  | ogg_packet * | op )
| static

References _x_meta_info_set(), get_pts(), lprintf, xine_ui_data_t::str, xine_ui_data_t::str_len, xine_event_t::type, xine_event_send(), XINE_EVENT_UI_SET_TITLE, and XINE_META_INFO_TITLE.

Referenced by send_ogg_buf().

## Variable Documentation

## ◆ metadata

const struct ogg_meta metadata[]
| static

Initial value:
= {
{ "ALBUM""=", XINE_META_INFO_ALBUM, 0 } ,
{ "ARTIST""=", XINE_META_INFO_ARTIST, 0 } ,
{ "PUBLISHER""=", XINE_META_INFO_PUBLISHER, 0 } ,
{ "COPYRIGHT""=", XINE_META_INFO_COPYRIGHT, 0 } ,
{ "DISCNUMBER""=", XINE_META_INFO_DISCNUMBER, 0 } ,
{ "LICENSE""=", XINE_META_INFO_LICENSE, 0 } ,
{ "TITLE""=", XINE_META_INFO_TITLE, 0 } ,
{ "TRACKNUMBER""=", XINE_META_INFO_TRACK_NUMBER, 0 } ,
{ "COMPOSER""=", XINE_META_INFO_COMPOSER, 1 } ,
{ "ARRANGER""=", XINE_META_INFO_ARRANGER, 1 } ,
{ "LYRICIST""=", XINE_META_INFO_LYRICIST, 1 } ,
{ "AUTHOR""=", XINE_META_INFO_AUTHOR, 1 } ,
{ "CONDUCTOR""=", XINE_META_INFO_CONDUCTOR, 1 } ,
{ "PERFORMER""=", XINE_META_INFO_PERFORMER, 1 } ,
{ "ENSEMBLE""=", XINE_META_INFO_ENSEMBLE, 1 } ,
{ "OPUS""=", XINE_META_INFO_OPUS, 0 } ,
{ "PART""=", XINE_META_INFO_PART, 0 } ,
{ "PARTNUMBER""=", XINE_META_INFO_PARTNUMBER, 0 } ,
{ "GENRE""=", XINE_META_INFO_GENRE, 1 } ,
{ "DATE""=", XINE_META_INFO_YEAR, 1 } ,
{ "LOCATION""=", XINE_META_INFO_LOCATION, 0 } ,
{ "COMMENT""=", XINE_META_INFO_COMMENT, 0 } ,
}
XINE_META_INFO_ARTIST
#define XINE_META_INFO_ARTIST
Definition xine.h:1081
XINE_META_INFO_AUTHOR
#define XINE_META_INFO_AUTHOR
Definition xine.h:1098
XINE_META_INFO_COPYRIGHT
#define XINE_META_INFO_COPYRIGHT
Definition xine.h:1094
XINE_META_INFO_COMMENT
#define XINE_META_INFO_COMMENT
Definition xine.h:1080
XINE_META_INFO_LOCATION
#define XINE_META_INFO_LOCATION
Definition xine.h:1105
XINE_META_INFO_PARTNUMBER
#define XINE_META_INFO_PARTNUMBER
Definition xine.h:1104
XINE_META_INFO_CONDUCTOR
#define XINE_META_INFO_CONDUCTOR
Definition xine.h:1099
XINE_META_INFO_TRACK_NUMBER
#define XINE_META_INFO_TRACK_NUMBER
Definition xine.h:1090
XINE_META_INFO_LICENSE
#define XINE_META_INFO_LICENSE
Definition xine.h:1095
XINE_META_INFO_OPUS
#define XINE_META_INFO_OPUS
Definition xine.h:1102
XINE_META_INFO_ALBUM
#define XINE_META_INFO_ALBUM
Definition xine.h:1083
XINE_META_INFO_LYRICIST
#define XINE_META_INFO_LYRICIST
Definition xine.h:1097
XINE_META_INFO_PART
#define XINE_META_INFO_PART
Definition xine.h:1103
XINE_META_INFO_ARRANGER
#define XINE_META_INFO_ARRANGER
Definition xine.h:1096
XINE_META_INFO_COMPOSER
#define XINE_META_INFO_COMPOSER
Definition xine.h:1091
XINE_META_INFO_PERFORMER
#define XINE_META_INFO_PERFORMER
Definition xine.h:1100
XINE_META_INFO_TITLE
#define XINE_META_INFO_TITLE
Definition xine.h:1079
XINE_META_INFO_DISCNUMBER
#define XINE_META_INFO_DISCNUMBER
Definition xine.h:1107
XINE_META_INFO_YEAR
#define XINE_META_INFO_YEAR
Definition xine.h:1084
XINE_META_INFO_PUBLISHER
#define XINE_META_INFO_PUBLISHER
Definition xine.h:1093
XINE_META_INFO_GENRE
#define XINE_META_INFO_GENRE
Definition xine.h:1082
XINE_META_INFO_ENSEMBLE
#define XINE_META_INFO_ENSEMBLE
Definition xine.h:1101

Referenced by flac_metadata_callback(), flac_metadata_callback(), and read_comments().