|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* This file is part of libbluray
|
|
Packit |
5e46da |
* Copyright (C) 2009-2010 Obliter0n
|
|
Packit |
5e46da |
* Copyright (C) 2009-2010 John Stebbins
|
|
Packit |
5e46da |
* Copyright (C) 2010-2017 Petri Hintukainen
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* This library is free software; you can redistribute it and/or
|
|
Packit |
5e46da |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit |
5e46da |
* License as published by the Free Software Foundation; either
|
|
Packit |
5e46da |
* version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
5e46da |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
5e46da |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
5e46da |
* Lesser General Public License for more details.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit |
5e46da |
* License along with this library. If not, see
|
|
Packit |
5e46da |
* <http://www.gnu.org/licenses/>.
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#ifndef BLURAY_H_
|
|
Packit |
5e46da |
#define BLURAY_H_
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#ifdef __cplusplus
|
|
Packit |
5e46da |
extern "C" {
|
|
Packit |
5e46da |
#endif
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
* @file libbluray/bluray.h
|
|
Packit |
5e46da |
* external API header
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#include <stdint.h>
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#define TITLES_ALL 0 /**< all titles. */
|
|
Packit |
5e46da |
#define TITLES_FILTER_DUP_TITLE 0x01 /**< remove duplicate titles. */
|
|
Packit |
5e46da |
#define TITLES_FILTER_DUP_CLIP 0x02 /**< remove titles that have duplicate
|
|
Packit |
5e46da |
clips. */
|
|
Packit |
5e46da |
#define TITLES_RELEVANT \
|
|
Packit |
5e46da |
(TITLES_FILTER_DUP_TITLE | TITLES_FILTER_DUP_CLIP) /**< remove duplicate
|
|
Packit |
5e46da |
titles and clips */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct bluray BLURAY;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* Disc info
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* AACS error codes */
|
|
Packit |
5e46da |
#define BD_AACS_CORRUPTED_DISC -1
|
|
Packit |
5e46da |
#define BD_AACS_NO_CONFIG -2
|
|
Packit |
5e46da |
#define BD_AACS_NO_PK -3
|
|
Packit |
5e46da |
#define BD_AACS_NO_CERT -4
|
|
Packit |
5e46da |
#define BD_AACS_CERT_REVOKED -5
|
|
Packit |
5e46da |
#define BD_AACS_MMC_FAILED -6
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* HDMV / BD-J title */
|
|
Packit |
5e46da |
typedef struct {
|
|
Packit |
5e46da |
const char *name; /* optional title name in preferred language */
|
|
Packit |
5e46da |
uint8_t interactive; /* 1 if title is interactive (title length and playback position should not be shown in UI) */
|
|
Packit |
5e46da |
uint8_t accessible; /* 1 if it is allowed to jump into this title */
|
|
Packit |
5e46da |
uint8_t hidden; /* 1 if title number should not be shown during playback */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
uint8_t bdj; /* 0 - HDMV title. 1 - BD-J title */
|
|
Packit |
5e46da |
uint32_t id_ref; /* Movie Object number / bdjo file number */
|
|
Packit |
5e46da |
} BLURAY_TITLE;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct {
|
|
Packit |
5e46da |
uint8_t bluray_detected;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* Disc ID */
|
|
Packit |
5e46da |
const char *disc_name; /* optional disc name in preferred language */
|
|
Packit |
5e46da |
const char *udf_volume_id; /* optional UDF volume identifier */
|
|
Packit |
5e46da |
uint8_t disc_id[20];
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* HDMV / BD-J titles */
|
|
Packit |
5e46da |
uint8_t no_menu_support; /* 1 if this disc can't be played using on-disc menus */
|
|
Packit |
5e46da |
uint8_t first_play_supported;
|
|
Packit |
5e46da |
uint8_t top_menu_supported;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
uint32_t num_titles;
|
|
Packit |
5e46da |
const BLURAY_TITLE *const *titles; /* index is title number 1 ... N */
|
|
Packit |
5e46da |
const BLURAY_TITLE *first_play; /* titles[N+1]. NULL if not present on the disc. */
|
|
Packit |
5e46da |
const BLURAY_TITLE *top_menu; /* titles[0]. NULL if not present on the disc. */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
uint32_t num_hdmv_titles;
|
|
Packit |
5e46da |
uint32_t num_bdj_titles;
|
|
Packit |
5e46da |
uint32_t num_unsupported_titles;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* BD-J info (valid only if disc uses BD-J) */
|
|
Packit |
5e46da |
uint8_t bdj_detected; /* 1 if disc uses BD-J */
|
|
Packit |
5e46da |
uint8_t bdj_supported; /* (deprecated) */
|
|
Packit |
5e46da |
uint8_t libjvm_detected; /* 1 if usable Java VM was found */
|
|
Packit |
5e46da |
uint8_t bdj_handled; /* 1 if usable Java VM + libbluray.jar was found */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
char bdj_org_id[9]; /* (BD-J) disc organization ID */
|
|
Packit |
5e46da |
char bdj_disc_id[33]; /* (BD-J) disc ID */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* disc application info */
|
|
Packit |
5e46da |
uint8_t video_format; /* bd_video_format_e */
|
|
Packit |
5e46da |
uint8_t frame_rate; /* bd_frame_rate_e */
|
|
Packit |
5e46da |
uint8_t content_exist_3D;
|
|
Packit |
5e46da |
uint8_t initial_output_mode_preference; /* 0 - 2D, 1 - 3D */
|
|
Packit |
5e46da |
uint8_t provider_data[32];
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* AACS info (valid only if disc uses AACS) */
|
|
Packit |
5e46da |
uint8_t aacs_detected; /* 1 if disc is using AACS encoding */
|
|
Packit |
5e46da |
uint8_t libaacs_detected; /* 1 if usable AACS decoding library was found */
|
|
Packit |
5e46da |
uint8_t aacs_handled; /* 1 if disc is using supported AACS encoding */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
int aacs_error_code; /* AACS error code (BD_AACS_*) */
|
|
Packit |
5e46da |
int aacs_mkbv; /* AACS MKB version */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* BD+ info (valid only if disc uses BD+) */
|
|
Packit |
5e46da |
uint8_t bdplus_detected; /* 1 if disc is using BD+ encoding */
|
|
Packit |
5e46da |
uint8_t libbdplus_detected; /* 1 if usable BD+ decoding library was found */
|
|
Packit |
5e46da |
uint8_t bdplus_handled; /* 1 if disc is using supporred BD+ encoding */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
uint8_t bdplus_gen; /* BD+ content code generation */
|
|
Packit |
5e46da |
uint32_t bdplus_date; /* BD+ content code relese date ((year<<16)|(month<<8)|day) */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
} BLURAY_DISC_INFO;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* Playlist info
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef enum {
|
|
Packit |
5e46da |
BLURAY_STREAM_TYPE_VIDEO_MPEG1 = 0x01,
|
|
Packit |
5e46da |
BLURAY_STREAM_TYPE_VIDEO_MPEG2 = 0x02,
|
|
Packit |
5e46da |
BLURAY_STREAM_TYPE_AUDIO_MPEG1 = 0x03,
|
|
Packit |
5e46da |
BLURAY_STREAM_TYPE_AUDIO_MPEG2 = 0x04,
|
|
Packit |
5e46da |
BLURAY_STREAM_TYPE_AUDIO_LPCM = 0x80,
|
|
Packit |
5e46da |
BLURAY_STREAM_TYPE_AUDIO_AC3 = 0x81,
|
|
Packit |
5e46da |
BLURAY_STREAM_TYPE_AUDIO_DTS = 0x82,
|
|
Packit |
5e46da |
BLURAY_STREAM_TYPE_AUDIO_TRUHD = 0x83,
|
|
Packit |
5e46da |
BLURAY_STREAM_TYPE_AUDIO_AC3PLUS = 0x84,
|
|
Packit |
5e46da |
BLURAY_STREAM_TYPE_AUDIO_DTSHD = 0x85,
|
|
Packit |
5e46da |
BLURAY_STREAM_TYPE_AUDIO_DTSHD_MASTER = 0x86,
|
|
Packit |
5e46da |
BLURAY_STREAM_TYPE_VIDEO_VC1 = 0xea,
|
|
Packit |
5e46da |
BLURAY_STREAM_TYPE_VIDEO_H264 = 0x1b,
|
|
Packit |
5e46da |
BLURAY_STREAM_TYPE_VIDEO_HEVC = 0x24,
|
|
Packit |
5e46da |
BLURAY_STREAM_TYPE_SUB_PG = 0x90,
|
|
Packit |
5e46da |
BLURAY_STREAM_TYPE_SUB_IG = 0x91,
|
|
Packit |
5e46da |
BLURAY_STREAM_TYPE_SUB_TEXT = 0x92,
|
|
Packit |
5e46da |
BLURAY_STREAM_TYPE_AUDIO_AC3PLUS_SECONDARY = 0xa1,
|
|
Packit |
5e46da |
BLURAY_STREAM_TYPE_AUDIO_DTSHD_SECONDARY = 0xa2
|
|
Packit |
5e46da |
} bd_stream_type_e;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef enum {
|
|
Packit |
5e46da |
BLURAY_VIDEO_FORMAT_480I = 1, // ITU-R BT.601-5
|
|
Packit |
5e46da |
BLURAY_VIDEO_FORMAT_576I = 2, // ITU-R BT.601-4
|
|
Packit |
5e46da |
BLURAY_VIDEO_FORMAT_480P = 3, // SMPTE 293M
|
|
Packit |
5e46da |
BLURAY_VIDEO_FORMAT_1080I = 4, // SMPTE 274M
|
|
Packit |
5e46da |
BLURAY_VIDEO_FORMAT_720P = 5, // SMPTE 296M
|
|
Packit |
5e46da |
BLURAY_VIDEO_FORMAT_1080P = 6, // SMPTE 274M
|
|
Packit |
5e46da |
BLURAY_VIDEO_FORMAT_576P = 7, // ITU-R BT.1358
|
|
Packit |
5e46da |
BLURAY_VIDEO_FORMAT_2160P = 8, //
|
|
Packit |
5e46da |
} bd_video_format_e;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef enum {
|
|
Packit |
5e46da |
BLURAY_VIDEO_RATE_24000_1001 = 1, // 23.976
|
|
Packit |
5e46da |
BLURAY_VIDEO_RATE_24 = 2,
|
|
Packit |
5e46da |
BLURAY_VIDEO_RATE_25 = 3,
|
|
Packit |
5e46da |
BLURAY_VIDEO_RATE_30000_1001 = 4, // 29.97
|
|
Packit |
5e46da |
BLURAY_VIDEO_RATE_50 = 6,
|
|
Packit |
5e46da |
BLURAY_VIDEO_RATE_60000_1001 = 7 // 59.94
|
|
Packit |
5e46da |
} bd_video_rate_e;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef enum {
|
|
Packit |
5e46da |
BLURAY_ASPECT_RATIO_4_3 = 2,
|
|
Packit |
5e46da |
BLURAY_ASPECT_RATIO_16_9 = 3
|
|
Packit |
5e46da |
} bd_video_aspect_e;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef enum {
|
|
Packit |
5e46da |
BLURAY_AUDIO_FORMAT_MONO = 1,
|
|
Packit |
5e46da |
BLURAY_AUDIO_FORMAT_STEREO = 3,
|
|
Packit |
5e46da |
BLURAY_AUDIO_FORMAT_MULTI_CHAN = 6,
|
|
Packit |
5e46da |
BLURAY_AUDIO_FORMAT_COMBO = 12 // Stereo ac3/dts,
|
|
Packit |
5e46da |
} bd_audio_format_e;
|
|
Packit |
5e46da |
// multi mlp/dts-hd
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef enum {
|
|
Packit |
5e46da |
BLURAY_AUDIO_RATE_48 = 1,
|
|
Packit |
5e46da |
BLURAY_AUDIO_RATE_96 = 4,
|
|
Packit |
5e46da |
BLURAY_AUDIO_RATE_192 = 5,
|
|
Packit |
5e46da |
BLURAY_AUDIO_RATE_192_COMBO = 12, // 48 or 96 ac3/dts
|
|
Packit |
5e46da |
// 192 mpl/dts-hd
|
|
Packit |
5e46da |
BLURAY_AUDIO_RATE_96_COMBO = 14 // 48 ac3/dts
|
|
Packit |
5e46da |
// 96 mpl/dts-hd
|
|
Packit |
5e46da |
} bd_audio_rate_e;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef enum {
|
|
Packit |
5e46da |
BLURAY_TEXT_CHAR_CODE_UTF8 = 0x01,
|
|
Packit |
5e46da |
BLURAY_TEXT_CHAR_CODE_UTF16BE = 0x02,
|
|
Packit |
5e46da |
BLURAY_TEXT_CHAR_CODE_SHIFT_JIS = 0x03,
|
|
Packit |
5e46da |
BLURAY_TEXT_CHAR_CODE_EUC_KR = 0x04,
|
|
Packit |
5e46da |
BLURAY_TEXT_CHAR_CODE_GB18030_20001 = 0x05,
|
|
Packit |
5e46da |
BLURAY_TEXT_CHAR_CODE_CN_GB = 0x06,
|
|
Packit |
5e46da |
BLURAY_TEXT_CHAR_CODE_BIG5 = 0x07
|
|
Packit |
5e46da |
} bd_char_code_e;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef enum {
|
|
Packit |
5e46da |
BLURAY_STILL_NONE = 0x00,
|
|
Packit |
5e46da |
BLURAY_STILL_TIME = 0x01,
|
|
Packit |
5e46da |
BLURAY_STILL_INFINITE = 0x02,
|
|
Packit |
5e46da |
} bd_still_mode_e;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef enum {
|
|
Packit |
5e46da |
BLURAY_MARK_ENTRY = 0x01, /* entry mark for chapter search */
|
|
Packit |
5e46da |
BLURAY_MARK_LINK = 0x02, /* link point */
|
|
Packit |
5e46da |
} bd_mark_type_e;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct bd_stream_info {
|
|
Packit |
5e46da |
uint8_t coding_type;
|
|
Packit |
5e46da |
uint8_t format;
|
|
Packit |
5e46da |
uint8_t rate;
|
|
Packit |
5e46da |
uint8_t char_code;
|
|
Packit |
5e46da |
uint8_t lang[4];
|
|
Packit |
5e46da |
uint16_t pid;
|
|
Packit |
5e46da |
uint8_t aspect;
|
|
Packit |
5e46da |
uint8_t subpath_id;
|
|
Packit |
5e46da |
} BLURAY_STREAM_INFO;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct bd_clip {
|
|
Packit |
5e46da |
uint32_t pkt_count;
|
|
Packit |
5e46da |
uint8_t still_mode;
|
|
Packit |
5e46da |
uint16_t still_time; /* seconds */
|
|
Packit |
5e46da |
uint8_t video_stream_count;
|
|
Packit |
5e46da |
uint8_t audio_stream_count;
|
|
Packit |
5e46da |
uint8_t pg_stream_count;
|
|
Packit |
5e46da |
uint8_t ig_stream_count;
|
|
Packit |
5e46da |
uint8_t sec_audio_stream_count;
|
|
Packit |
5e46da |
uint8_t sec_video_stream_count;
|
|
Packit |
5e46da |
BLURAY_STREAM_INFO *video_streams;
|
|
Packit |
5e46da |
BLURAY_STREAM_INFO *audio_streams;
|
|
Packit |
5e46da |
BLURAY_STREAM_INFO *pg_streams;
|
|
Packit |
5e46da |
BLURAY_STREAM_INFO *ig_streams;
|
|
Packit |
5e46da |
BLURAY_STREAM_INFO *sec_audio_streams;
|
|
Packit |
5e46da |
BLURAY_STREAM_INFO *sec_video_streams;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
uint64_t start_time; /* start media time, 90kHz, ("playlist time") */
|
|
Packit |
5e46da |
uint64_t in_time; /* start timestamp, 90kHz */
|
|
Packit |
5e46da |
uint64_t out_time; /* end timestamp, 90kHz */
|
|
Packit |
5e46da |
char clip_id[6];
|
|
Packit |
5e46da |
} BLURAY_CLIP_INFO;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct bd_chapter {
|
|
Packit |
5e46da |
uint32_t idx;
|
|
Packit |
5e46da |
uint64_t start; /* start media time, 90kHz, ("playlist time") */
|
|
Packit |
5e46da |
uint64_t duration; /* duration */
|
|
Packit |
5e46da |
uint64_t offset; /* distance from title start, bytes */
|
|
Packit |
5e46da |
unsigned clip_ref;
|
|
Packit |
5e46da |
} BLURAY_TITLE_CHAPTER;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct bd_mark {
|
|
Packit |
5e46da |
uint32_t idx;
|
|
Packit |
5e46da |
int type; /* bd_mark_type_e */
|
|
Packit |
5e46da |
uint64_t start; /* mark media time, 90kHz, ("playlist time") */
|
|
Packit |
5e46da |
uint64_t duration; /* time to next mark */
|
|
Packit |
5e46da |
uint64_t offset; /* mark distance from title start, bytes */
|
|
Packit |
5e46da |
unsigned clip_ref;
|
|
Packit |
5e46da |
} BLURAY_TITLE_MARK;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct bd_title_info {
|
|
Packit |
5e46da |
uint32_t idx; /* filled only with bd_get_title_info() */
|
|
Packit |
5e46da |
uint32_t playlist;
|
|
Packit |
5e46da |
uint64_t duration;
|
|
Packit |
5e46da |
uint32_t clip_count;
|
|
Packit |
5e46da |
uint8_t angle_count;
|
|
Packit |
5e46da |
uint32_t chapter_count;
|
|
Packit |
5e46da |
uint32_t mark_count;
|
|
Packit |
5e46da |
BLURAY_CLIP_INFO *clips;
|
|
Packit |
5e46da |
BLURAY_TITLE_CHAPTER *chapters;
|
|
Packit |
5e46da |
BLURAY_TITLE_MARK *marks;
|
|
Packit |
5e46da |
} BLURAY_TITLE_INFO;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* Sound effect data
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct bd_sound_effect {
|
|
Packit |
5e46da |
uint8_t num_channels; /* 1 - mono, 2 - stereo */
|
|
Packit |
5e46da |
uint32_t num_frames;
|
|
Packit |
5e46da |
const int16_t *samples; /* 48000 Hz, 16 bit LPCM. interleaved if stereo */
|
|
Packit |
5e46da |
} BLURAY_SOUND_EFFECT;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
* Get library version
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
void bd_get_version(int *major, int *minor, int *micro);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* Disc functions
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
* Open BluRay disc
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Shortcut for bd_open_disc(bd_init(), device_path, keyfile_path)
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param device_path path to mounted Blu-ray disc, device or image file
|
|
Packit |
5e46da |
* @param keyfile_path path to KEYDB.cfg (may be NULL)
|
|
Packit |
5e46da |
* @return allocated BLURAY object, NULL if error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
BLURAY *bd_open(const char *device_path, const char *keyfile_path);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
* Initialize BLURAY object
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Resulting object can be passed to following bd_open_??? functions.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @return allocated BLURAY object, NULL if error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
BLURAY *bd_init(void);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
* Open BluRay disc
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param device_path path to mounted Blu-ray disc, device or image file
|
|
Packit |
5e46da |
* @param keyfile_path path to KEYDB.cfg (may be NULL)
|
|
Packit |
5e46da |
* @return 1 on success, 0 if error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int bd_open_disc(BLURAY *bd, const char *device_path, const char *keyfile_path);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
* Open BluRay disc
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param handle opaque handle for read_blocks
|
|
Packit |
5e46da |
* @param read_blocks function used to read disc blocks
|
|
Packit |
5e46da |
* @return 1 on success, 0 if error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int bd_open_stream(BLURAY *bd,
|
|
Packit |
5e46da |
void *read_blocks_handle,
|
|
Packit |
5e46da |
int (*read_blocks)(void *handle, void *buf, int lba, int num_blocks));
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
* Open BluRay disc
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param handle opaque handle for open_dir and open_file
|
|
Packit |
5e46da |
* @param open_dir function used to open a directory
|
|
Packit |
5e46da |
* @param open_file function used to open a file
|
|
Packit |
5e46da |
* @return 1 on success, 0 if error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
struct bd_dir_s;
|
|
Packit |
5e46da |
struct bd_file_s;
|
|
Packit |
5e46da |
int bd_open_files(BLURAY *bd,
|
|
Packit |
5e46da |
void *handle,
|
|
Packit |
5e46da |
struct bd_dir_s *(*open_dir)(void *handle, const char *rel_path),
|
|
Packit |
5e46da |
struct bd_file_s *(*open_file)(void *handle, const char *rel_path));
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
* Close BluRay disc
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
void bd_close(BLURAY *bd);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Get information about current BluRay disc
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @return pointer to BLURAY_DISC_INFO object, NULL on error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
const BLURAY_DISC_INFO *bd_get_disc_info(BLURAY *bd);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Get meta information about current BluRay disc.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Meta information is optional in BluRay discs.
|
|
Packit |
5e46da |
* If information is provided in multiple languages, currently
|
|
Packit |
5e46da |
* selected language (BLURAY_PLAYER_SETTING_MENU_LANG) is used.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Referenced thumbnail images should be read with bd_get_meta_file().
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @return META_DL (disclib) object, NULL on error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
struct meta_dl;
|
|
Packit |
5e46da |
const struct meta_dl *bd_get_meta(BLURAY *bd);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Read metadata file from BluRay disc.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Allocate large enough memory block and read file contents.
|
|
Packit |
5e46da |
* Caller must free the memory block with free().
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param file_name name of metadata file
|
|
Packit |
5e46da |
* @param data where to store pointer to file data
|
|
Packit |
5e46da |
* @param size where to store file size
|
|
Packit |
5e46da |
* @return 1 on success, 0 on error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int bd_get_meta_file(BLURAY *bd, const char *file_name, void **data, int64_t *size);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* Title selection without on-disc menus
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Get number of titles (playlists)
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* This must be called after bd_open() and before bd_select_title().
|
|
Packit |
5e46da |
* Populates the title list in BLURAY.
|
|
Packit |
5e46da |
* Filtering of the returned list is controled through title flags
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param flags title flags
|
|
Packit |
5e46da |
* @param min_title_length filter out titles shorter than min_title_length seconds
|
|
Packit |
5e46da |
* @return number of titles found
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
uint32_t bd_get_titles(BLURAY *bd, uint8_t flags, uint32_t min_title_length);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Get main title
|
|
Packit |
5e46da |
* Returned number is an index to the list created by bd_get_titles()
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @return title index of main title, -1 on error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int bd_get_main_title(BLURAY *bd);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Get information about a title
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param title_idx title index number
|
|
Packit |
5e46da |
* @param angle angle number (chapter offsets and clip size depend on selected angle)
|
|
Packit |
5e46da |
* @return allocated BLURAY_TITLE_INFO object, NULL on error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
BLURAY_TITLE_INFO* bd_get_title_info(BLURAY *bd, uint32_t title_idx, unsigned angle);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Free BLURAY_TITLE_INFO object
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param title_info BLURAY_TITLE_INFO object
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
void bd_free_title_info(BLURAY_TITLE_INFO *title_info);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Select the title from the list created by bd_get_titles()
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param title title to select
|
|
Packit |
5e46da |
* @return 1 on success, 0 if error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int bd_select_title(BLURAY *bd, uint32_t title);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Select a playlist
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param playlist playlist to select
|
|
Packit |
5e46da |
* @return 1 on success, 0 if error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int bd_select_playlist(BLURAY *bd, uint32_t playlist);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Returns the current title index
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @return current title index
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
uint32_t bd_get_current_title(BLURAY *bd);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Read from currently selected title file, decrypt if possible
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param buf buffer to read data into
|
|
Packit |
5e46da |
* @param len size of data to be read
|
|
Packit |
5e46da |
* @return size of data read, -1 if error, 0 if EOF
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int bd_read(BLURAY *bd, unsigned char *buf, int len);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* Playback control functions
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
* Seek to pos in currently selected title
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param pos position to seek to
|
|
Packit |
5e46da |
* @return current seek position
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int64_t bd_seek(BLURAY *bd, uint64_t pos);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Seek to specific time in 90Khz ticks
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY ojbect
|
|
Packit |
5e46da |
* @param tick tick count
|
|
Packit |
5e46da |
* @return current seek position
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int64_t bd_seek_time(BLURAY *bd, uint64_t tick);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Seek to a chapter. First chapter is 0
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param chapter chapter to seek to
|
|
Packit |
5e46da |
* @return current seek position
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int64_t bd_seek_chapter(BLURAY *bd, unsigned chapter);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Seek to a playmark. First mark is 0
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param mark playmark to seek to
|
|
Packit |
5e46da |
* @return current seek position
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int64_t bd_seek_mark(BLURAY *bd, unsigned mark);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Seek to a playitem.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param playitem to seek to
|
|
Packit |
5e46da |
* @return current seek position
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int64_t bd_seek_playitem(BLURAY *bd, unsigned clip_ref);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Set the angle to play
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param angle angle to play
|
|
Packit |
5e46da |
* @return 1 on success, 0 if error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int bd_select_angle(BLURAY *bd, unsigned angle);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Initiate seamless angle change
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param angle angle to change to
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
void bd_seamless_angle_change(BLURAY *bd, unsigned angle);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Select stream (PG / TextST track)
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* When playing with on-disc menus:
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Stream selection is controlled by on-disc menus.
|
|
Packit |
5e46da |
* If user can change stream selection also in player GUI, this function
|
|
Packit |
5e46da |
* should be used to keep on-disc menus in sync with player GUI.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* When playing the disc without on-disc menus:
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Initial stream selection is done using preferred language settings.
|
|
Packit |
5e46da |
* This function can be used to override automatic stream selection.
|
|
Packit |
5e46da |
* Without on-disc menus selecting the stream is useful only when using
|
|
Packit |
5e46da |
* libbluray internal decoders or the stream is stored in a sub-path.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param stream_type BLURAY_*_STREAM
|
|
Packit |
5e46da |
* @param stream_id stream number (1..N)
|
|
Packit |
5e46da |
* @param enable_flag set to 0 to disable streams of this type
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
#define BLURAY_AUDIO_STREAM 0
|
|
Packit |
5e46da |
#define BLURAY_PG_TEXTST_STREAM 1
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
void bd_select_stream(BLURAY *bd, uint32_t stream_type, uint32_t stream_id, uint32_t enable_flag);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* Playback status functions
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Find the byte position of a chapter
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param chapter chapter to find position of
|
|
Packit |
5e46da |
* @return seek position of chapter start
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int64_t bd_chapter_pos(BLURAY *bd, unsigned chapter);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Get the current chapter
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @return current chapter
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
uint32_t bd_get_current_chapter(BLURAY *bd);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Returns file size in bytes of currently selected title, 0 in no title
|
|
Packit |
5e46da |
* selected
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @return file size in bytes of currently selected title, 0 if no title
|
|
Packit |
5e46da |
* selected
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
uint64_t bd_get_title_size(BLURAY *bd);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Return the current angle
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @return current angle
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
unsigned bd_get_current_angle(BLURAY *bd);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Return current pos
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @return current seek position
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
uint64_t bd_tell(BLURAY *bd);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Return current time
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @return current time
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
uint64_t bd_tell_time(BLURAY *bd);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* player settings
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef enum {
|
|
Packit |
5e46da |
BLURAY_PLAYER_SETTING_AUDIO_LANG = 16, /* Initial audio language. String (ISO 639-2/T). */
|
|
Packit |
5e46da |
BLURAY_PLAYER_SETTING_PG_LANG = 17, /* Initial PG/SPU language. String (ISO 639-2/T). */
|
|
Packit |
5e46da |
BLURAY_PLAYER_SETTING_MENU_LANG = 18, /* Initial menu language. String (ISO 639-2/T). */
|
|
Packit |
5e46da |
BLURAY_PLAYER_SETTING_COUNTRY_CODE = 19, /* Player country code. String (ISO 3166-1/alpha-2). */
|
|
Packit |
5e46da |
BLURAY_PLAYER_SETTING_REGION_CODE = 20, /* Player region code. Integer. */
|
|
Packit |
5e46da |
BLURAY_PLAYER_SETTING_OUTPUT_PREFER = 21, /* Output mode preference. Integer. */
|
|
Packit |
5e46da |
BLURAY_PLAYER_SETTING_PARENTAL = 13, /* Age for parental control. Integer. */
|
|
Packit |
5e46da |
BLURAY_PLAYER_SETTING_AUDIO_CAP = 15, /* Audio capability. Bit mask. */
|
|
Packit |
5e46da |
BLURAY_PLAYER_SETTING_VIDEO_CAP = 29, /* Video capability. Bit mask. */
|
|
Packit |
5e46da |
BLURAY_PLAYER_SETTING_DISPLAY_CAP = 23, /* Display capability. Bit mask. */
|
|
Packit |
5e46da |
BLURAY_PLAYER_SETTING_3D_CAP = 24, /* 3D capability. Bit mask. */
|
|
Packit |
5e46da |
BLURAY_PLAYER_SETTING_UHD_CAP = 25, /* UHD capability. */
|
|
Packit |
5e46da |
BLURAY_PLAYER_SETTING_UHD_DISPLAY_CAP = 26, /* UHD display capability. */
|
|
Packit |
5e46da |
BLURAY_PLAYER_SETTING_HDR_PREFERENCE = 27, /* HDR preference. */
|
|
Packit |
5e46da |
BLURAY_PLAYER_SETTING_SDR_CONV_PREFER = 28, /* SDR conversion preference. */
|
|
Packit |
5e46da |
BLURAY_PLAYER_SETTING_TEXT_CAP = 30, /* Text Subtitle capability. Bit mask. */
|
|
Packit |
5e46da |
BLURAY_PLAYER_SETTING_PLAYER_PROFILE = 31, /* Player profile and version. */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
BLURAY_PLAYER_SETTING_DECODE_PG = 0x100, /* Enable/disable PG (subtitle) decoder. Integer. Default: disabled. */
|
|
Packit |
5e46da |
BLURAY_PLAYER_SETTING_PERSISTENT_STORAGE = 0x101, /* Enable/disable BD-J persistent storage. Integer. Default: enabled. */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
BLURAY_PLAYER_PERSISTENT_ROOT = 0x200, /* Root path to the BD_J persistent storage location. String. */
|
|
Packit |
5e46da |
BLURAY_PLAYER_CACHE_ROOT = 0x201, /* Root path to the BD_J cache storage location. String. */
|
|
Packit |
5e46da |
} bd_player_setting;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Update player setting
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Bit masks and enumeration values are defined in player_settings.h.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param idx Player setting to update
|
|
Packit |
5e46da |
* @param value New value for player setting
|
|
Packit |
5e46da |
* @return 1 on success, 0 on error (invalid setting)
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
int bd_set_player_setting(BLURAY *bd, uint32_t idx, uint32_t value);
|
|
Packit |
5e46da |
int bd_set_player_setting_str(BLURAY *bd, uint32_t idx, const char *value);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* events
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef enum {
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
BD_EVENT_NONE = 0, /* no pending events */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* errors
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
BD_EVENT_ERROR = 1, /* Fatal error. Playback can't be continued. */
|
|
Packit |
5e46da |
BD_EVENT_READ_ERROR = 2, /* Reading of .m2ts aligned unit failed. Next call to read will try next block. */
|
|
Packit |
5e46da |
BD_EVENT_ENCRYPTED = 3, /* .m2ts file is encrypted and can't be played */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* current playback position
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
BD_EVENT_ANGLE = 4, /* current angle, 1...N */
|
|
Packit |
5e46da |
BD_EVENT_TITLE = 5, /* current title, 1...N (0 = top menu) */
|
|
Packit |
5e46da |
BD_EVENT_PLAYLIST = 6, /* current playlist (xxxxx.mpls) */
|
|
Packit |
5e46da |
BD_EVENT_PLAYITEM = 7, /* current play item, 0...N-1 */
|
|
Packit |
5e46da |
BD_EVENT_CHAPTER = 8, /* current chapter, 1...N */
|
|
Packit |
5e46da |
BD_EVENT_PLAYMARK = 9, /* playmark reached */
|
|
Packit |
5e46da |
BD_EVENT_END_OF_TITLE = 10,
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* stream selection
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
BD_EVENT_AUDIO_STREAM = 11, /* 1..32, 0xff = none */
|
|
Packit |
5e46da |
BD_EVENT_IG_STREAM = 12, /* 1..32 */
|
|
Packit |
5e46da |
BD_EVENT_PG_TEXTST_STREAM = 13, /* 1..255, 0xfff = none */
|
|
Packit |
5e46da |
BD_EVENT_PIP_PG_TEXTST_STREAM = 14, /* 1..255, 0xfff = none */
|
|
Packit |
5e46da |
BD_EVENT_SECONDARY_AUDIO_STREAM = 15, /* 1..32, 0xff = none */
|
|
Packit |
5e46da |
BD_EVENT_SECONDARY_VIDEO_STREAM = 16, /* 1..32, 0xff = none */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
BD_EVENT_PG_TEXTST = 17, /* 0 - disable, 1 - enable */
|
|
Packit |
5e46da |
BD_EVENT_PIP_PG_TEXTST = 18, /* 0 - disable, 1 - enable */
|
|
Packit |
5e46da |
BD_EVENT_SECONDARY_AUDIO = 19, /* 0 - disable, 1 - enable */
|
|
Packit |
5e46da |
BD_EVENT_SECONDARY_VIDEO = 20, /* 0 - disable, 1 - enable */
|
|
Packit |
5e46da |
BD_EVENT_SECONDARY_VIDEO_SIZE = 21, /* 0 - PIP, 0xf - fullscreen */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* playback control
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* HDMV VM or JVM stopped playlist playback. Flush all buffers. */
|
|
Packit |
5e46da |
BD_EVENT_PLAYLIST_STOP = 22,
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* discontinuity in the stream (non-seamless connection). Reset demuxer PES buffers. */
|
|
Packit |
5e46da |
BD_EVENT_DISCONTINUITY = 23, /* new timestamp (45 kHz) */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* HDMV VM or JVM seeked the stream. Next read() will return data from new position. Flush all buffers. */
|
|
Packit |
5e46da |
BD_EVENT_SEEK = 24, /* new media time (45 kHz) */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* still playback (pause) */
|
|
Packit |
5e46da |
BD_EVENT_STILL = 25, /* 0 - off, 1 - on */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* Still playback for n seconds (reached end of still mode play item).
|
|
Packit |
5e46da |
* Playback continues by calling bd_read_skip_still(). */
|
|
Packit |
5e46da |
BD_EVENT_STILL_TIME = 26, /* 0 = infinite ; 1...300 = seconds */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* Play sound effect */
|
|
Packit |
5e46da |
BD_EVENT_SOUND_EFFECT = 27, /* effect ID */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* status
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* Nothing to do. Playlist is not playing, but title applet is running.
|
|
Packit |
5e46da |
* Application should not call bd_read*() immediately again to avoid busy loop. */
|
|
Packit |
5e46da |
BD_EVENT_IDLE = 28,
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* Pop-Up menu available */
|
|
Packit |
5e46da |
BD_EVENT_POPUP = 29, /* 0 - no, 1 - yes */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* Interactive menu visible */
|
|
Packit |
5e46da |
BD_EVENT_MENU = 30, /* 0 - no, 1 - yes */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* 3D */
|
|
Packit |
5e46da |
BD_EVENT_STEREOSCOPIC_STATUS = 31, /* 0 - 2D, 1 - 3D */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* BD-J key interest table changed */
|
|
Packit |
5e46da |
BD_EVENT_KEY_INTEREST_TABLE = 32, /* bitmask, BLURAY_KIT_* */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* UO mask changed */
|
|
Packit |
5e46da |
BD_EVENT_UO_MASK_CHANGED = 33, /* bitmask, BLURAY_UO_* */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/*BD_EVENT_LAST = 33, */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
} bd_event_e;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct {
|
|
Packit |
5e46da |
uint32_t event; /* bd_event_e */
|
|
Packit |
5e46da |
uint32_t param;
|
|
Packit |
5e46da |
} BD_EVENT;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* BD_EVENT_ERROR param values */
|
|
Packit |
5e46da |
#define BD_ERROR_HDMV 1
|
|
Packit |
5e46da |
#define BD_ERROR_BDJ 2
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* BD_EVENT_ENCRYPTED param vlues */
|
|
Packit |
5e46da |
#define BD_ERROR_AACS 3
|
|
Packit |
5e46da |
#define BD_ERROR_BDPLUS 4
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* BD_EVENT_TITLE special titles */
|
|
Packit |
5e46da |
#define BLURAY_TITLE_FIRST_PLAY 0xffff
|
|
Packit |
5e46da |
#define BLURAY_TITLE_TOP_MENU 0
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* BD_EVENT_KEY_INTEREST flags */
|
|
Packit |
5e46da |
#define BLURAY_KIT_PLAY 0x1
|
|
Packit |
5e46da |
#define BLURAY_KIT_STOP 0x2
|
|
Packit |
5e46da |
#define BLURAY_KIT_FFW 0x4
|
|
Packit |
5e46da |
#define BLURAY_KIT_REW 0x8
|
|
Packit |
5e46da |
#define BLURAY_KIT_TRACK_NEXT 0x10
|
|
Packit |
5e46da |
#define BLURAY_KIT_TRACK_PREV 0x20
|
|
Packit |
5e46da |
#define BLURAY_KIT_PAUSE 0x40
|
|
Packit |
5e46da |
#define BLURAY_KIT_STILL_OFF 0x80
|
|
Packit |
5e46da |
#define BLURAY_KIT_SEC_AUDIO 0x100
|
|
Packit |
5e46da |
#define BLURAY_KIT_SEC_VIDEO 0x200
|
|
Packit |
5e46da |
#define BLURAY_KIT_PG_TEXTST 0x400
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* BD_EVENT_UO_MASK flags */
|
|
Packit |
5e46da |
#define BLURAY_UO_MENU_CALL 0x1
|
|
Packit |
5e46da |
#define BLURAY_UO_TITLE_SEARCH 0x2
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Get event from libbluray event queue.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param event next BD_EVENT from event queue, NULL to initialize event queue
|
|
Packit |
5e46da |
* @return 1 on success, 0 if no events
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int bd_get_event(BLURAY *bd, BD_EVENT *event);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* On-screen display
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
struct bd_overlay_s; /* defined in overlay.h */
|
|
Packit |
5e46da |
struct bd_argb_overlay_s; /* defined in overlay.h */
|
|
Packit |
5e46da |
struct bd_argb_buffer_s; /* defined in overlay.h */
|
|
Packit |
5e46da |
typedef void (*bd_overlay_proc_f)(void *, const struct bd_overlay_s * const);
|
|
Packit |
5e46da |
typedef void (*bd_argb_overlay_proc_f)(void *, const struct bd_argb_overlay_s * const);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Register handler for compressed YUV overlays
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Compressed YUV overlays are used with presentation graphics (subtitles)
|
|
Packit |
5e46da |
* and HDMV mode menus.
|
|
Packit |
5e46da |
* This function can be used when player does not support full-screen ARGB overlays
|
|
Packit |
5e46da |
* or player can optimize drawing of compressed overlays, color space conversion etc.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Callback function is called from application thread context while bd_*() functions
|
|
Packit |
5e46da |
* are called.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Note that BD-J mode outputs only ARGB graphics.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param handle application-specific handle that will be passed to handler function
|
|
Packit |
5e46da |
* @param func handler function pointer
|
|
Packit |
5e46da |
* @return 1 on success, 0 if error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
void bd_register_overlay_proc(BLURAY *bd, void *handle, bd_overlay_proc_f func);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Register handler for ARGB overlays
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* ARGB overlays are used with BD-J (Java) menus.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Callback function can be called at any time by a thread created by Java VM.
|
|
Packit |
5e46da |
* No more than single call for each overlay plane are executed in paraller.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param handle application-specific handle that will be passed to handler function
|
|
Packit |
5e46da |
* @param func handler function pointer
|
|
Packit |
5e46da |
* @param buf optional application-allocated frame buffer
|
|
Packit |
5e46da |
* @return 1 on success, 0 if error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
void bd_register_argb_overlay_proc(BLURAY *bd, void *handle, bd_argb_overlay_proc_f func, struct bd_argb_buffer_s *buf);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* Playback with on-disc menus
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Start playing disc with on-disc menus
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Playback is started from "First Play" title.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @return 1 on success, 0 if error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int bd_play(BLURAY *bd);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Play a title (from disc index).
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Title 0 = Top Menu
|
|
Packit |
5e46da |
* Title 0xffff = First Play title
|
|
Packit |
5e46da |
* Number of titles can be found from BLURAY_DISC_INFO.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param title title number from disc index
|
|
Packit |
5e46da |
* @return 1 on success, 0 if error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int bd_play_title(BLURAY *bd, unsigned title);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Open BluRay disc Top Menu.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Current pts is needed for resuming playback when menu is closed.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param pts current playback position (1/90000s) or -1
|
|
Packit |
5e46da |
* @return 1 on success, 0 if error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int bd_menu_call(BLURAY *bd, int64_t pts);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Read from currently playing title.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* When playing disc in navigation mode this function must be used instead of bd_read().
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param buf buffer to read data into
|
|
Packit |
5e46da |
* @param len size of data to be read
|
|
Packit |
5e46da |
* @param event next BD_EVENT from event queue (BD_EVENT_NONE if no events)
|
|
Packit |
5e46da |
* @return size of data read, -1 if error, 0 if event needs to be handled first, 0 if end of title was reached
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int bd_read_ext(BLURAY *bd, unsigned char *buf, int len, BD_EVENT *event);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Continue reading after still mode clip
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @return 0 on error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int bd_read_skip_still(BLURAY *bd);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Get information about a playlist
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param playlist playlist number
|
|
Packit |
5e46da |
* @param angle angle number (chapter offsets and clip size depend on selected angle)
|
|
Packit |
5e46da |
* @return allocated BLURAY_TITLE_INFO object, NULL on error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
BLURAY_TITLE_INFO* bd_get_playlist_info(BLURAY *bd, uint32_t playlist, unsigned angle);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Get sound effect
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param effect_id sound effect id (0...N)
|
|
Packit |
5e46da |
* @param effect sound effect data
|
|
Packit |
5e46da |
* @return <0 when no effects, 0 when id out of range, 1 on success
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int bd_get_sound_effect(BLURAY *bd, unsigned sound_id, struct bd_sound_effect *effect);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* User interaction
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Update current pts.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param pts current playback position (1/90000s) or -1
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
void bd_set_scr(BLURAY *bd, int64_t pts);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Set current playback rate.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Notify BD-J media player when user changes playback rate
|
|
Packit |
5e46da |
* (ex. pauses playback).
|
|
Packit |
5e46da |
* Changing rate may fail if corresponding UO is masked or
|
|
Packit |
5e46da |
* playlist is not playing.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param rate current playback rate * 90000 (0 = paused, 90000 = normal)
|
|
Packit |
5e46da |
* @return <0 on error, 0 on success
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
#define BLURAY_RATE_PAUSED 0
|
|
Packit |
5e46da |
#define BLURAY_RATE_NORMAL 90000
|
|
Packit |
5e46da |
int bd_set_rate(BLURAY *bd, uint32_t rate);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Pass user input to graphics controller or BD-J.
|
|
Packit |
5e46da |
* Keys are defined in libbluray/keys.h.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param pts current playback position (1/90000s) or -1
|
|
Packit |
5e46da |
* @param key input key
|
|
Packit |
5e46da |
* @return <0 on error, 0 on success, >0 if selection/activation changed
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int bd_user_input(BLURAY *bd, int64_t pts, uint32_t key);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Select menu button at location (x,y).
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* This function has no effect with BD-J menus.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param pts current playback position (1/90000s) or -1
|
|
Packit |
5e46da |
* @param x mouse pointer x-position
|
|
Packit |
5e46da |
* @param y mouse pointer y-position
|
|
Packit |
5e46da |
* @return <0 on error, 0 when mouse is outside of buttons, 1 when mouse is inside button
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int bd_mouse_select(BLURAY *bd, int64_t pts, uint16_t x, uint16_t y);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* Testing and debugging
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* access to internal information */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
struct clpi_cl;
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Get copy of clip information for requested playitem.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY objects
|
|
Packit |
5e46da |
* @param clip_ref requested playitem number
|
|
Packit |
5e46da |
* @return pointer to allocated CLPI_CL object on success, NULL on error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
struct clpi_cl *bd_get_clpi(BLURAY *bd, unsigned clip_ref);
|
|
Packit |
5e46da |
struct clpi_cl *bd_read_clpi(const char *clpi_file);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Free CLPI_CL object
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param cl CLPI_CL objects
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
void bd_free_clpi(struct clpi_cl *cl);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
struct mpls_pl;
|
|
Packit |
5e46da |
struct mpls_pl *bd_read_mpls(const char *mpls_file);
|
|
Packit |
5e46da |
void bd_free_mpls(struct mpls_pl *);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
struct mobj_objects;
|
|
Packit |
5e46da |
struct mobj_objects *bd_read_mobj(const char *mobj_file);
|
|
Packit |
5e46da |
void bd_free_mobj(struct mobj_objects *);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
struct bdjo_data;
|
|
Packit |
5e46da |
struct bdjo_data *bd_read_bdjo(const char *bdjo_file);
|
|
Packit |
5e46da |
void bd_free_bdjo(struct bdjo_data *);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/* BD-J testing */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
int bd_start_bdj(BLURAY *bd, const char* start_object); // start BD-J from the specified BD-J object (should be a 5 character string)
|
|
Packit |
5e46da |
void bd_stop_bdj(BLURAY *bd); // shutdown BD-J and clean up resources
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
/**
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Read a file from BluRay Virtual File System.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* Allocate large enough memory block and read file contents.
|
|
Packit |
5e46da |
* Caller must free the memory block with free().
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* @param bd BLURAY object
|
|
Packit |
5e46da |
* @param file_name path to the file (relative to disc root)
|
|
Packit |
5e46da |
* @param data where to store pointer to allocated data
|
|
Packit |
5e46da |
* @param size where to store file size
|
|
Packit |
5e46da |
* @return 1 on success, 0 on error
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
int bd_read_file(BLURAY *, const char *path, void **data, int64_t *size);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#ifdef __cplusplus
|
|
Packit |
5e46da |
}
|
|
Packit |
5e46da |
#endif
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#endif /* BLURAY_H_ */
|