xine-lib 1.2.11
Data Structures | Macros | Functions | Variables
demux_mod.c File Reference
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/compat.h>
#include <xine/demux.h>
#include <libmodplug/modplug.h>
#include "bswap.h"

Data Structures

struct  demux_mod_t
 

Macros

#define LOG_MODULE   "demux_mod"
 
#define MOD_SAMPLERATE   44100
 
#define MOD_BITS   16
 
#define MOD_CHANNELS   2
 
#define OUT_BYTES_PER_SECOND   (MOD_SAMPLERATE * MOD_CHANNELS * (MOD_BITS >> 3))
 
#define BLOCK_SIZE   4096
 
#define FOURCC_32(a, b, c, d)   (d + (c<<8) + (b<<16) + (a<<24))
 

Functions

static int probe_mod_file (input_plugin_t *input)
 Probes if the given file can be demuxed using modplug or not. More...
 
static int open_mod_file (demux_mod_t *this, input_plugin_t *input)
 
static int demux_mod_send_chunk (demux_plugin_t *this_gen)
 
static void demux_mod_send_headers (demux_plugin_t *this_gen)
 
static int demux_mod_seek (demux_plugin_t *this_gen, off_t start_pos, int start_time, int playing)
 
static void demux_mod_dispose (demux_plugin_t *this_gen)
 
static int demux_mod_get_status (demux_plugin_t *this_gen)
 
static int demux_mod_get_stream_length (demux_plugin_t *this_gen)
 
static uint32_t demux_mod_get_capabilities (demux_plugin_t *this_gen)
 
static int demux_mod_get_optional_data (demux_plugin_t *this_gen, void *data, int data_type)
 
static demux_plugin_topen_plugin (demux_class_t *class_gen, xine_stream_t *stream, input_plugin_t *input)
 
static void * demux_mod_init_plugin (xine_t *xine, const void *data)
 

Variables

static const demuxer_info_t demux_info_mod
 
const plugin_info_t xine_plugin_info[] EXPORTED
 

Macro Definition Documentation

◆ BLOCK_SIZE

#define BLOCK_SIZE   4096

◆ FOURCC_32

#define FOURCC_32 (   a,
  b,
  c,
 
)    (d + (c<<8) + (b<<16) + (a<<24))

◆ LOG_MODULE

#define LOG_MODULE   "demux_mod"

◆ MOD_BITS

#define MOD_BITS   16

◆ MOD_CHANNELS

#define MOD_CHANNELS   2

◆ MOD_SAMPLERATE

#define MOD_SAMPLERATE   44100

◆ OUT_BYTES_PER_SECOND

#define OUT_BYTES_PER_SECOND   (MOD_SAMPLERATE * MOD_CHANNELS * (MOD_BITS >> 3))

Function Documentation

◆ demux_mod_dispose()

static void demux_mod_dispose ( demux_plugin_t this_gen)
static

References _x_freep().

Referenced by open_plugin().

◆ demux_mod_get_capabilities()

static uint32_t demux_mod_get_capabilities ( demux_plugin_t this_gen)
static

References DEMUX_CAP_NOCAP.

Referenced by open_plugin().

◆ demux_mod_get_optional_data()

static int demux_mod_get_optional_data ( demux_plugin_t this_gen,
void *  data,
int  data_type 
)
static

References DEMUX_OPTIONAL_UNSUPPORTED.

Referenced by open_plugin().

◆ demux_mod_get_status()

static int demux_mod_get_status ( demux_plugin_t this_gen)
static

Referenced by open_plugin().

◆ demux_mod_get_stream_length()

static int demux_mod_get_stream_length ( demux_plugin_t this_gen)
static

Referenced by open_plugin().

◆ demux_mod_init_plugin()

static void * demux_mod_init_plugin ( xine_t xine,
const void *  data 
)
static

◆ demux_mod_seek()

static int demux_mod_seek ( demux_plugin_t this_gen,
off_t  start_pos,
int  start_time,
int  playing 
)
static

References _x_demux_flush_engine().

Referenced by open_plugin().

◆ demux_mod_send_chunk()

static int demux_mod_send_chunk ( demux_plugin_t this_gen)
static

◆ demux_mod_send_headers()

static void demux_mod_send_headers ( demux_plugin_t this_gen)
static

◆ open_mod_file()

static int open_mod_file ( demux_mod_t this,
input_plugin_t input 
)
static

◆ open_plugin()

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

◆ probe_mod_file()

static int probe_mod_file ( input_plugin_t input)
static

Probes if the given file can be demuxed using modplug or not.

Return values
0The file is not a valid modplug file (or the probe isn't complete yet)
1The file has been identified as a valid modplug file
Todo:
Just Protracker files are detected right now.

References _X_ABE_32, _x_demux_read_header(), FOURCC_32, and input().

Referenced by open_plugin().

Variable Documentation

◆ demux_info_mod

const demuxer_info_t demux_info_mod
static
Initial value:
= {
.priority = 10,
}

◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED
Initial value:
= {
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
static const demuxer_info_t demux_info_mod
Definition: demux_mod.c:393
static void * demux_mod_init_plugin(xine_t *xine, const void *data)
Definition: demux_mod.c:363
#define XINE_VERSION_CODE
Definition: xine_internal.h:57
NULL
Definition: xine_plugin.c:78
#define PLUGIN_DEMUX
Definition: xine_plugin.h:31
#define PLUGIN_NONE
Definition: xine_plugin.h:29