xine-lib 1.2.11
|
#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_t * | get_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_t * | get_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_t * | bluray_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_t * | bluray_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 |
#define ALIGNED_UNIT_SIZE 6144 |
#define BLURAY_MNT_PATH "/mnt/bluray" |
#define BLURAY_PATH "/dev/dvd" |
#define CHECK_READ_INTERRUPT |
#define LOG_MODULE "input_bluray" |
#define LOG_VERBOSE |
#define LOGMSG | ( | x... | ) | xine_log (this->stream->xine, XINE_LOG_MSG, "input_bluray: " x); |
#define MAX | ( | a, | |
b | |||
) | ((a)>(b)?(a):(b)) |
#define MIN | ( | a, | |
b | |||
) | ((a)<(b)?(a):(b)) |
#define MIN_TITLE_LENGTH 180 |
#define PALETTE_INDEX_BACKGROUND 0xff |
#define PKT_SIZE 192 |
#define TICKS_IN_MS 45 |
|
static |
References close_overlay(), get_argb_overlay(), LOGMSG, lprintf, METRONOM_VPTS_OFFSET, open_argb_overlay(), osd_buf_lock(), osd_buf_unlock(), xine_osd_set_argb_buffer(), and xine_osd_show().
Referenced by bluray_plugin_open().
|
static |
References NULL.
Referenced by bd_init_plugin().
|
static |
|
static |
References _x_input_free_mrls(), xine_s::config, NULL, config_values_s::unregister_callbacks, bluray_input_class_t::xine, and bluray_input_class_t::xine_playlist.
Referenced by bluray_init_plugin().
|
static |
References bluray_input_class_t::device, media_eject_media(), and bluray_input_class_t::xine.
Referenced by bluray_init_plugin().
|
static |
References NULL.
Referenced by bluray_init_plugin().
|
static |
|
static |
References bluray_plugin_dispose(), bluray_plugin_get_blocksize(), bluray_plugin_get_capabilities(), bluray_plugin_get_current_pos(), bluray_plugin_get_current_time(), bluray_plugin_get_length(), bluray_plugin_get_mrl(), bluray_plugin_get_optional_data(), bluray_plugin_open(), bluray_plugin_read(), bluray_plugin_read_block(), bluray_plugin_seek(), bluray_plugin_seek_time(), NULL, and xine_event_new_queue().
Referenced by bluray_init_plugin().
|
static |
References _, bluray_class_dispose(), bluray_class_eject_media(), bluray_class_get_autoplay_list(), bluray_class_get_dir(), bluray_class_get_instance(), BLURAY_MNT_PATH, BLURAY_PATH, xine_s::config, bluray_input_class_t::country, country_change_cb(), input_class_s::description, bluray_input_class_t::device, device_change_cb(), input_class_s::dispose, input_class_s::eject_media, input_class_s::get_autoplay_list, input_class_s::get_dir, input_class_s::get_instance, input_class_s::identifier, bluray_input_class_t::input_class, bluray_input_class_t::language, language_change_cb(), bluray_input_class_t::mountpoint, mountpoint_change_cb(), NULL, bluray_input_class_t::parental, parental_change_cb(), bluray_input_class_t::region, region_change_cb(), config_values_s::register_enum, config_values_s::register_filename, config_values_s::register_num, config_values_s::register_string, bluray_input_class_t::skip_mode, skip_mode_change_cb(), bluray_input_class_t::xine, XINE_CONFIG_STRING_IS_DEVICE_NAME, and XINE_CONFIG_STRING_IS_DIRECTORY_NAME.
Referenced by bd_init_plugin().
|
static |
References _x_freep(), close_overlay(), NULL, osd_buf_destroy(), and xine_event_dispose_queue().
Referenced by bluray_class_get_instance().
|
static |
References ALIGNED_UNIT_SIZE.
Referenced by bluray_class_get_instance().
|
static |
References INPUT_CAP_AUDIOLANG, INPUT_CAP_BLOCK, INPUT_CAP_CHAPTERS, INPUT_CAP_SEEKABLE, INPUT_CAP_SPULANG, and INPUT_CAP_TIME_SEEKABLE.
Referenced by bluray_class_get_instance().
|
static |
Referenced by bluray_class_get_instance().
|
static |
Referenced by bluray_class_get_instance().
|
static |
Referenced by bluray_class_get_instance().
|
static |
Referenced by bluray_class_get_instance().
|
static |
References get_optional_data_impl(), and INPUT_OPTIONAL_UNSUPPORTED.
Referenced by bluray_class_get_instance().
|
static |
References _x_message(), _x_stream_info_set(), argb_overlay_proc(), get_disc_info(), get_disc_name(), is_iso_image(), LOGMSG, lprintf, MAX, MIN, MIN_TITLE_LENGTH, NULL, open_title(), osd_buf_init(), overlay_proc(), parse_mrl(), VO_CAP_ARGB_LAYER_OVERLAY, XINE_MSG_GENERAL_WARNING, and XINE_STREAM_INFO_DVD_CHAPTER_NUMBER.
Referenced by bluray_class_get_instance().
|
static |
References _x_action_pending(), CHECK_READ_INTERRUPT, handle_events(), handle_libbluray_event(), handle_libbluray_events(), LOGMSG, and queue_black_frame().
Referenced by bluray_class_get_instance(), and bluray_plugin_read_block().
|
static |
References ALIGNED_UNIT_SIZE, bluray_plugin_read(), BUF_DEMUX_BLOCK, fifo_buffer_s::buffer_pool_size_alloc, buf_element_s::extra_info, buf_element_s::free_buffer, buf_element_s::max_size, buf_element_s::mem, NULL, buf_element_s::size, extra_info_s::total_time, and buf_element_s::type.
Referenced by bluray_class_get_instance().
|
static |
References lprintf.
Referenced by bluray_class_get_instance().
|
static |
References input_plugin_s::get_current_time, and lprintf.
Referenced by bluray_class_get_instance().
|
static |
References osd_object_s::area, osd_object_s::area_touched, osd_object_s::height, xine_osd_s::osd, PALETTE_INDEX_BACKGROUND, osd_object_s::width, osd_object_s::x1, osd_object_s::x2, osd_object_s::y1, and osd_object_s::y2.
Referenced by open_overlay(), and overlay_proc().
|
static |
References close_overlay(), lprintf, NULL, osd_buf_lock(), osd_buf_unlock(), send_num_buttons(), and xine_osd_free().
Referenced by argb_overlay_proc(), bluray_plugin_dispose(), close_overlay(), open_overlay(), and overlay_proc().
|
static |
References bluray_input_class_t::country, and xine_cfg_entry_s::str_value.
Referenced by bluray_init_plugin().
|
static |
References bluray_input_class_t::device, and xine_cfg_entry_s::str_value.
Referenced by bluray_init_plugin().
|
static |
References NULL, xine_osd_draw_bitmap(), and xine_osd_set_palette().
Referenced by overlay_proc().
|
static |
References _x_query_buffer_usage(), BUF_CONTROL_FLUSH_DECODER, LOGMSG, NULL, buf_element_s::type, and xine_usec_sleep().
Referenced by handle_libbluray_event().
|
static |
References get_overlay(), and NULL.
Referenced by argb_overlay_proc().
|
static |
References INPUT_OPTIONAL_SUCCESS, and INPUT_OPTIONAL_UNSUPPORTED.
Referenced by get_optional_data_impl().
|
static |
References _x_message(), LOGMSG, NULL, VO_CAP_ARGB_LAYER_OVERLAY, XINE_MSG_ENCRYPTED_SOURCE, and XINE_MSG_GENERAL_WARNING.
Referenced by bluray_plugin_open().
|
static |
Referenced by bluray_plugin_open().
|
static |
|
static |
References _x_select_spu_channel().
Referenced by get_argb_overlay(), and overlay_proc().
|
static |
References INPUT_OPTIONAL_SUCCESS, and INPUT_OPTIONAL_UNSUPPORTED.
Referenced by get_optional_data_impl().
|
static |
References _x_message(), _x_stream_info_set(), input(), lprintf, MAX, METRONOM_VPTS_OFFSET, MIN, NULL, open_title(), send_mouse_enter_leave_event(), stream_reset(), xine_event_t::type, update_stream_info(), xine_event_free(), xine_event_get(), XINE_EVENT_INPUT_ANGLE_NEXT, XINE_EVENT_INPUT_ANGLE_PREVIOUS, XINE_EVENT_INPUT_DOWN, XINE_EVENT_INPUT_LEFT, XINE_EVENT_INPUT_MENU1, XINE_EVENT_INPUT_MENU2, XINE_EVENT_INPUT_MOUSE_BUTTON, XINE_EVENT_INPUT_MOUSE_MOVE, XINE_EVENT_INPUT_NEXT, XINE_EVENT_INPUT_NUMBER_0, XINE_EVENT_INPUT_NUMBER_1, XINE_EVENT_INPUT_NUMBER_2, XINE_EVENT_INPUT_NUMBER_3, XINE_EVENT_INPUT_NUMBER_4, XINE_EVENT_INPUT_NUMBER_5, XINE_EVENT_INPUT_NUMBER_6, XINE_EVENT_INPUT_NUMBER_7, XINE_EVENT_INPUT_NUMBER_8, XINE_EVENT_INPUT_NUMBER_9, XINE_EVENT_INPUT_PREVIOUS, XINE_EVENT_INPUT_RIGHT, XINE_EVENT_INPUT_SELECT, XINE_EVENT_INPUT_UP, xine_get_current_vpts(), XINE_MSG_GENERAL_WARNING, and XINE_STREAM_INFO_DVD_ANGLE_NUMBER.
Referenced by bluray_plugin_read().
|
static |
References _x_get_fine_speed(), _x_message(), _x_set_fine_speed(), _x_stream_info_set(), fifos_wait(), LOGMSG, lprintf, NULL, send_num_buttons(), stream_flush(), stream_reset(), update_audio_channel(), update_spu_channel(), update_title_info(), wait_secs(), XINE_MSG_ENCRYPTED_SOURCE, XINE_MSG_GENERAL_WARNING, XINE_SPEED_NORMAL, XINE_SPEED_PAUSE, XINE_STREAM_INFO_DVD_ANGLE_NUMBER, XINE_STREAM_INFO_DVD_CHAPTER_NUMBER, and xine_usec_sleep().
Referenced by bluray_plugin_read(), and handle_libbluray_events().
|
static |
References handle_libbluray_event().
Referenced by bluray_plugin_read().
|
static |
Referenced by bluray_plugin_open().
|
static |
References bluray_input_class_t::language, and xine_cfg_entry_s::str_value.
Referenced by bluray_init_plugin().
|
static |
References bluray_input_class_t::mountpoint, and xine_cfg_entry_s::str_value.
Referenced by bluray_init_plugin().
|
static |
References LOGMSG, lprintf, open_overlay(), XINE_OSD_CAP_ARGB_LAYER, and xine_osd_get_capabilities().
Referenced by argb_overlay_proc().
|
static |
References clear_overlay(), close_overlay(), lprintf, xine_osd_new(), and xine_osd_set_extent().
Referenced by open_argb_overlay(), and overlay_proc().
|
static |
References LOGMSG, lprintf, and update_title_info().
Referenced by bluray_plugin_open(), and handle_events().
|
static |
References XINE_BD_ARGB_BUFFER::buf, XINE_BD_ARGB_BUFFER::buf_lock, and NULL.
Referenced by bluray_plugin_dispose().
|
static |
References XINE_BD_ARGB_BUFFER::buf, XINE_BD_ARGB_BUFFER::buf_lock, NULL, osd_buf_lock(), and osd_buf_unlock().
Referenced by bluray_plugin_open().
|
static |
References XINE_BD_ARGB_BUFFER::buf_lock.
Referenced by argb_overlay_proc(), close_overlay(), and osd_buf_init().
|
static |
References XINE_BD_ARGB_BUFFER::buf_lock.
Referenced by argb_overlay_proc(), close_overlay(), and osd_buf_init().
|
static |
References osd_object_s::area_touched, clear_overlay(), close_overlay(), draw_bitmap(), get_overlay(), LOGMSG, lprintf, METRONOM_VPTS_OFFSET, open_overlay(), xine_osd_s::osd, PALETTE_INDEX_BACKGROUND, send_num_buttons(), xine_osd_draw_rect(), xine_osd_hide(), and xine_osd_show().
Referenced by bluray_plugin_open().
|
static |
References xine_cfg_entry_s::num_value, and bluray_input_class_t::parental.
Referenced by bluray_init_plugin().
|
static |
References _x_mrl_unescape(), lprintf, and NULL.
Referenced by bluray_class_get_dir(), and bluray_plugin_open().
|
static |
References _x_lock_port_rewiring(), _x_unlock_port_rewiring(), vo_frame_s::bad_frame, vo_frame_s::base, vo_frame_s::draw, vo_frame_s::duration, vo_frame_s::format, vo_frame_s::free, vo_frame_s::height, NULL, vo_frame_s::pitches, vo_frame_s::pts, VO_BOTH_FIELDS, and XINE_IMGFMT_YV12.
Referenced by bluray_plugin_read().
|
static |
References xine_cfg_entry_s::num_value, and bluray_input_class_t::region.
Referenced by bluray_init_plugin().
|
static |
References xine_spu_button_t::button, xine_spu_button_t::direction, xine_event_send(), and XINE_EVENT_SPU_BUTTON.
Referenced by handle_events(), and vcd_handle_events().
|
static |
References xine_ui_data_t::num_buttons, xine_event_send(), and XINE_EVENT_UI_NUM_BUTTONS.
Referenced by close_overlay(), handle_libbluray_event(), and overlay_proc().
|
static |
References xine_cfg_entry_s::num_value, and bluray_input_class_t::skip_mode.
Referenced by bluray_init_plugin().
|
static |
References lprintf, NULL, xine_event_t::type, XINE_EVENT_END_OF_CLIP, and xine_event_send().
Referenced by handle_libbluray_event(), and wait_secs().
|
static |
References _x_demux_flush_engine(), lprintf, NULL, xine_event_t::type, XINE_EVENT_PIDS_CHANGE, and xine_event_send().
Referenced by handle_events(), handle_libbluray_event(), and wait_secs().
|
static |
References BUF_CONTROL_AUDIO_CHANNEL, buf_element_s::decoder_info, and buf_element_s::type.
Referenced by handle_libbluray_event().
|
static |
References BUF_CONTROL_SPU_CHANNEL, buf_element_s::decoder_info, and buf_element_s::type.
Referenced by handle_libbluray_event().
|
static |
|
static |
References _x_stream_info_set(), LOGMSG, update_stream_info(), update_title_name(), XINE_STREAM_INFO_BITRATE, XINE_STREAM_INFO_DVD_TITLE_COUNT, and XINE_STREAM_INFO_DVD_TITLE_NUMBER.
Referenced by handle_libbluray_event(), and open_title().
|
static |
References _x_meta_info_set(), 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 update_title_info().
|
static |
References lprintf, NULL, stream_flush(), stream_reset(), and xine_usec_sleep().
Referenced by handle_libbluray_event().
const plugin_info_t xine_plugin_info [] EXPORTED |