xine-lib 1.2.11
Data Structures | Macros | Functions | Variables
input_bluray.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <pthread.h>
#include <libbluray/bluray.h>
#include <libbluray/bluray-version.h>
#include <libbluray/keys.h>
#include <libbluray/overlay.h>
#include <libbluray/meta_data.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/input_plugin.h>
#include "media_helper.h"
#include "input_helper.h"

Data Structures

struct  bluray_input_class_t
 
struct  XINE_BD_ARGB_BUFFER
 
struct  bluray_input_plugin_t
 

Macros

#define LOG_MODULE   "input_bluray"
 
#define LOG_VERBOSE
 
#define LOGMSG(x...)   xine_log (this->stream->xine, XINE_LOG_MSG, "input_bluray: " x);
 
#define MIN(a, b)   ((a)<(b)?(a):(b))
 
#define MAX(a, b)   ((a)>(b)?(a):(b))
 
#define ALIGNED_UNIT_SIZE   6144
 
#define PKT_SIZE   192
 
#define TICKS_IN_MS   45
 
#define MIN_TITLE_LENGTH   180
 
#define BLURAY_MNT_PATH   "/mnt/bluray"
 
#define BLURAY_PATH   "/dev/dvd"
 
#define PALETTE_INDEX_BACKGROUND   0xff
 
#define CHECK_READ_INTERRUPT
 

Functions

static void osd_buf_lock (BD_ARGB_BUFFER *buf_gen)
 
static void osd_buf_unlock (BD_ARGB_BUFFER *buf_gen)
 
static void osd_buf_init (XINE_BD_ARGB_BUFFER *buf)
 
static void osd_buf_destroy (XINE_BD_ARGB_BUFFER *buf)
 
static void queue_black_frame (bluray_input_plugin_t *this)
 
static void send_num_buttons (bluray_input_plugin_t *this, int n)
 
static void clear_overlay (xine_osd_t *osd)
 
static xine_osd_tget_overlay (bluray_input_plugin_t *this, int plane)
 
static void close_overlay (bluray_input_plugin_t *this, int plane)
 
static void open_overlay (bluray_input_plugin_t *this, int plane, uint16_t x, uint16_t y, uint16_t w, uint16_t h)
 
static void draw_bitmap (xine_osd_t *osd, const BD_OVERLAY *const ov)
 
static void overlay_proc (void *this_gen, const BD_OVERLAY *const ov)
 
static void open_argb_overlay (bluray_input_plugin_t *this, int plane, uint16_t x, uint16_t y, uint16_t w, uint16_t h)
 
static xine_osd_tget_argb_overlay (bluray_input_plugin_t *this, int plane)
 
static void argb_overlay_proc (void *this_gen, const BD_ARGB_OVERLAY *const ov)
 
static void update_stream_info (bluray_input_plugin_t *this)
 
static void update_title_name (bluray_input_plugin_t *this)
 
static void update_title_info (bluray_input_plugin_t *this, int playlist_id)
 
static void fifos_wait (bluray_input_plugin_t *this)
 
static void stream_flush (bluray_input_plugin_t *this)
 
static void stream_reset (bluray_input_plugin_t *this)
 
static void wait_secs (bluray_input_plugin_t *this, unsigned seconds)
 
static void update_spu_channel (bluray_input_plugin_t *this, int channel)
 
static void update_audio_channel (bluray_input_plugin_t *this, int channel)
 
static void handle_libbluray_event (bluray_input_plugin_t *this, BD_EVENT ev)
 
static void handle_libbluray_events (bluray_input_plugin_t *this)
 
static int open_title (bluray_input_plugin_t *this, int title_idx)
 
static void send_mouse_enter_leave_event (bluray_input_plugin_t *this, int direction)
 
static void handle_events (bluray_input_plugin_t *this)
 
static uint32_t bluray_plugin_get_capabilities (input_plugin_t *this_gen)
 
static off_t bluray_plugin_read (input_plugin_t *this_gen, void *buf, off_t len)
 
static buf_element_tbluray_plugin_read_block (input_plugin_t *this_gen, fifo_buffer_t *fifo, off_t todo)
 
static off_t bluray_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin)
 
static off_t bluray_plugin_seek_time (input_plugin_t *this_gen, int time_offset, int origin)
 
static off_t bluray_plugin_get_current_pos (input_plugin_t *this_gen)
 
static int bluray_plugin_get_current_time (input_plugin_t *this_gen)
 
static off_t bluray_plugin_get_length (input_plugin_t *this_gen)
 
static uint32_t bluray_plugin_get_blocksize (input_plugin_t *this_gen)
 
static const char * bluray_plugin_get_mrl (input_plugin_t *this_gen)
 
static int get_audio_lang (bluray_input_plugin_t *this, void *data)
 
static int get_spu_lang (bluray_input_plugin_t *this, void *data)
 
static int get_optional_data_impl (bluray_input_plugin_t *this, void *data, int data_type)
 
static int bluray_plugin_get_optional_data (input_plugin_t *this_gen, void *data, int data_type)
 
static void bluray_plugin_dispose (input_plugin_t *this_gen)
 
static int parse_mrl (const char *mrl_in, char **path, int *title, int *chapter)
 
static int get_disc_info (bluray_input_plugin_t *this)
 
static char * get_disc_name (const char *path)
 
static int is_iso_image (const char *mrl)
 
static int bluray_plugin_open (input_plugin_t *this_gen)
 
static input_plugin_tbluray_class_get_instance (input_class_t *cls_gen, xine_stream_t *stream, const char *mrl)
 
static void mountpoint_change_cb (void *data, xine_cfg_entry_t *cfg)
 
static void device_change_cb (void *data, xine_cfg_entry_t *cfg)
 
static void language_change_cb (void *data, xine_cfg_entry_t *cfg)
 
static void country_change_cb (void *data, xine_cfg_entry_t *cfg)
 
static void region_change_cb (void *data, xine_cfg_entry_t *cfg)
 
static void parental_change_cb (void *data, xine_cfg_entry_t *cfg)
 
static void skip_mode_change_cb (void *data, xine_cfg_entry_t *cfg)
 
static const char *const * bluray_class_get_autoplay_list (input_class_t *this_gen, int *num_files)
 
static xine_mrl_t ** bluray_class_get_dir (input_class_t *this_gen, const char *filename, int *nFiles)
 
static int bluray_class_eject_media (input_class_t *this_gen)
 
static void bluray_class_dispose (input_class_t *this_gen)
 
static void * bluray_init_plugin (xine_t *xine, const void *data)
 
static const char *const * bd_class_get_autoplay_list (input_class_t *this_gen, int *num_files)
 
static void * bd_init_plugin (xine_t *xine, const void *data)
 

Variables

const plugin_info_t xine_plugin_info[] EXPORTED
 

Macro Definition Documentation

◆ ALIGNED_UNIT_SIZE

#define ALIGNED_UNIT_SIZE   6144

◆ BLURAY_MNT_PATH

#define BLURAY_MNT_PATH   "/mnt/bluray"

◆ BLURAY_PATH

#define BLURAY_PATH   "/dev/dvd"

◆ CHECK_READ_INTERRUPT

#define CHECK_READ_INTERRUPT
Value:
do { \
if (this->demux_action_req) { \
this->demux_action_req = 0; \
errno = EAGAIN; \
return -1; \
} \
if (_x_action_pending(this->stream)) { \
errno = EINTR; \
return -1; \
} \
} while (0)
int _x_action_pending(xine_stream_t *s)
Definition: demux.c:771

◆ LOG_MODULE

#define LOG_MODULE   "input_bluray"

◆ LOG_VERBOSE

#define LOG_VERBOSE

◆ LOGMSG

#define LOGMSG (   x...)    xine_log (this->stream->xine, XINE_LOG_MSG, "input_bluray: " x);

◆ MAX

#define MAX (   a,
 
)    ((a)>(b)?(a):(b))

◆ MIN

#define MIN (   a,
 
)    ((a)<(b)?(a):(b))

◆ MIN_TITLE_LENGTH

#define MIN_TITLE_LENGTH   180

◆ PALETTE_INDEX_BACKGROUND

#define PALETTE_INDEX_BACKGROUND   0xff

◆ PKT_SIZE

#define PKT_SIZE   192

◆ TICKS_IN_MS

#define TICKS_IN_MS   45

Function Documentation

◆ argb_overlay_proc()

static void argb_overlay_proc ( void *  this_gen,
const BD_ARGB_OVERLAY *const  ov 
)
static

◆ bd_class_get_autoplay_list()

static const char *const * bd_class_get_autoplay_list ( input_class_t this_gen,
int *  num_files 
)
static

References NULL.

Referenced by bd_init_plugin().

◆ bd_init_plugin()

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

◆ bluray_class_dispose()

static void bluray_class_dispose ( input_class_t this_gen)
static

◆ bluray_class_eject_media()

static int bluray_class_eject_media ( input_class_t this_gen)
static

◆ bluray_class_get_autoplay_list()

static const char *const * bluray_class_get_autoplay_list ( input_class_t this_gen,
int *  num_files 
)
static

References NULL.

Referenced by bluray_init_plugin().

◆ bluray_class_get_dir()

static xine_mrl_t ** bluray_class_get_dir ( input_class_t this_gen,
const char *  filename,
int *  nFiles 
)
static

◆ bluray_class_get_instance()

static input_plugin_t * bluray_class_get_instance ( input_class_t cls_gen,
xine_stream_t stream,
const char *  mrl 
)
static

◆ bluray_init_plugin()

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

◆ bluray_plugin_dispose()

static void bluray_plugin_dispose ( input_plugin_t this_gen)
static

◆ bluray_plugin_get_blocksize()

static uint32_t bluray_plugin_get_blocksize ( input_plugin_t this_gen)
static

References ALIGNED_UNIT_SIZE.

Referenced by bluray_class_get_instance().

◆ bluray_plugin_get_capabilities()

static uint32_t bluray_plugin_get_capabilities ( input_plugin_t this_gen)
static

◆ bluray_plugin_get_current_pos()

static off_t bluray_plugin_get_current_pos ( input_plugin_t this_gen)
static

◆ bluray_plugin_get_current_time()

static int bluray_plugin_get_current_time ( input_plugin_t this_gen)
static

◆ bluray_plugin_get_length()

static off_t bluray_plugin_get_length ( input_plugin_t this_gen)
static

◆ bluray_plugin_get_mrl()

static const char * bluray_plugin_get_mrl ( input_plugin_t this_gen)
static

◆ bluray_plugin_get_optional_data()

static int bluray_plugin_get_optional_data ( input_plugin_t this_gen,
void *  data,
int  data_type 
)
static

◆ bluray_plugin_open()

static int bluray_plugin_open ( input_plugin_t this_gen)
static

◆ bluray_plugin_read()

static off_t bluray_plugin_read ( input_plugin_t this_gen,
void *  buf,
off_t  len 
)
static

◆ bluray_plugin_read_block()

static buf_element_t * bluray_plugin_read_block ( input_plugin_t this_gen,
fifo_buffer_t fifo,
off_t  todo 
)
static

◆ bluray_plugin_seek()

static off_t bluray_plugin_seek ( input_plugin_t this_gen,
off_t  offset,
int  origin 
)
static

References lprintf.

Referenced by bluray_class_get_instance().

◆ bluray_plugin_seek_time()

static off_t bluray_plugin_seek_time ( input_plugin_t this_gen,
int  time_offset,
int  origin 
)
static

◆ clear_overlay()

static void clear_overlay ( xine_osd_t osd)
static

◆ close_overlay()

static void close_overlay ( bluray_input_plugin_t this,
int  plane 
)
static

◆ country_change_cb()

static void country_change_cb ( void *  data,
xine_cfg_entry_t cfg 
)
static

◆ device_change_cb()

static void device_change_cb ( void *  data,
xine_cfg_entry_t cfg 
)
static

◆ draw_bitmap()

static void draw_bitmap ( xine_osd_t osd,
const BD_OVERLAY *const  ov 
)
static

◆ fifos_wait()

static void fifos_wait ( bluray_input_plugin_t this)
static

◆ get_argb_overlay()

static xine_osd_t * get_argb_overlay ( bluray_input_plugin_t this,
int  plane 
)
static

References get_overlay(), and NULL.

Referenced by argb_overlay_proc().

◆ get_audio_lang()

static int get_audio_lang ( bluray_input_plugin_t this,
void *  data 
)
static

◆ get_disc_info()

static int get_disc_info ( bluray_input_plugin_t this)
static

◆ get_disc_name()

static char * get_disc_name ( const char *  path)
static

References lprintf, and NULL.

Referenced by bluray_plugin_open().

◆ get_optional_data_impl()

static int get_optional_data_impl ( bluray_input_plugin_t this,
void *  data,
int  data_type 
)
static

◆ get_overlay()

static xine_osd_t * get_overlay ( bluray_input_plugin_t this,
int  plane 
)
static

◆ get_spu_lang()

static int get_spu_lang ( bluray_input_plugin_t this,
void *  data 
)
static

◆ handle_events()

static void handle_events ( bluray_input_plugin_t this)
static

◆ handle_libbluray_event()

static void handle_libbluray_event ( bluray_input_plugin_t this,
BD_EVENT  ev 
)
static

◆ handle_libbluray_events()

static void handle_libbluray_events ( bluray_input_plugin_t this)
static

References handle_libbluray_event().

Referenced by bluray_plugin_read().

◆ is_iso_image()

static int is_iso_image ( const char *  mrl)
static

Referenced by bluray_plugin_open().

◆ language_change_cb()

static void language_change_cb ( void *  data,
xine_cfg_entry_t cfg 
)
static

◆ mountpoint_change_cb()

static void mountpoint_change_cb ( void *  data,
xine_cfg_entry_t cfg 
)
static

◆ open_argb_overlay()

static void open_argb_overlay ( bluray_input_plugin_t this,
int  plane,
uint16_t  x,
uint16_t  y,
uint16_t  w,
uint16_t  h 
)
static

◆ open_overlay()

static void open_overlay ( bluray_input_plugin_t this,
int  plane,
uint16_t  x,
uint16_t  y,
uint16_t  w,
uint16_t  h 
)
static

◆ open_title()

static int open_title ( bluray_input_plugin_t this,
int  title_idx 
)
static

◆ osd_buf_destroy()

static void osd_buf_destroy ( XINE_BD_ARGB_BUFFER buf)
static

◆ osd_buf_init()

static void osd_buf_init ( XINE_BD_ARGB_BUFFER buf)
static

◆ osd_buf_lock()

static void osd_buf_lock ( BD_ARGB_BUFFER *  buf_gen)
static

◆ osd_buf_unlock()

static void osd_buf_unlock ( BD_ARGB_BUFFER *  buf_gen)
static

◆ overlay_proc()

static void overlay_proc ( void *  this_gen,
const BD_OVERLAY *const  ov 
)
static

◆ parental_change_cb()

static void parental_change_cb ( void *  data,
xine_cfg_entry_t cfg 
)
static

◆ parse_mrl()

static int parse_mrl ( const char *  mrl_in,
char **  path,
int *  title,
int *  chapter 
)
static

◆ queue_black_frame()

static void queue_black_frame ( bluray_input_plugin_t this)
static

◆ region_change_cb()

static void region_change_cb ( void *  data,
xine_cfg_entry_t cfg 
)
static

◆ send_mouse_enter_leave_event()

static void send_mouse_enter_leave_event ( bluray_input_plugin_t this,
int  direction 
)
static

◆ send_num_buttons()

static void send_num_buttons ( bluray_input_plugin_t this,
int  n 
)
static

◆ skip_mode_change_cb()

static void skip_mode_change_cb ( void *  data,
xine_cfg_entry_t cfg 
)
static

◆ stream_flush()

static void stream_flush ( bluray_input_plugin_t this)
static

◆ stream_reset()

static void stream_reset ( bluray_input_plugin_t this)
static

◆ update_audio_channel()

static void update_audio_channel ( bluray_input_plugin_t this,
int  channel 
)
static

◆ update_spu_channel()

static void update_spu_channel ( bluray_input_plugin_t this,
int  channel 
)
static

◆ update_stream_info()

static void update_stream_info ( bluray_input_plugin_t this)
static

◆ update_title_info()

static void update_title_info ( bluray_input_plugin_t this,
int  playlist_id 
)
static

◆ update_title_name()

static void update_title_name ( bluray_input_plugin_t this)
static

◆ wait_secs()

static void wait_secs ( bluray_input_plugin_t this,
unsigned  seconds 
)
static

Variable Documentation

◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED
Initial value:
= {
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
static void * bluray_init_plugin(xine_t *xine, const void *data)
Definition: input_bluray.c:1933
static void * bd_init_plugin(xine_t *xine, const void *data)
Definition: input_bluray.c:2017
#define XINE_VERSION_CODE
Definition: xine_internal.h:57
NULL
Definition: xine_plugin.c:78
#define PLUGIN_NONE
Definition: xine_plugin.h:29
#define PLUGIN_INPUT
Definition: xine_plugin.h:30