libbluray is an open-source library designed for Blu-Ray Discs playback for media players, like VLC or MPlayer. Right now the disc must be mounted to play.
Please note: this does *not* decrypt the files from the disc yet, but
can use other libraries for that.
I have also attached a patch to mplayer that allows me to watch
(unencrypted) bluray discs.
mount /dev/cd0a /mnt && mplayer -bluray-device /mnt bluray://
OK for one or both?
Index: Makefile
===================================================================
RCS file: /cvs/openbsd/ports/x11/mplayer/Makefile,v
retrieving revision 1.196
diff -u -p -r1.196 Makefile
--- Makefile 19 Sep 2011 14:24:44 -0000 1.196
+++ Makefile 16 Nov 2011 17:41:59 -0000
@@ -13,7 +13,7 @@ SUBST_VARS += PREFIX CONFDIR
# Distfiles must be hand-rolled, see README
N = mplayer
DISTNAME = mplayer-${V}
-REVISION = 10
+REVISION = 11
CATEGORIES = x11 multimedia
@@ -48,6 +48,7 @@ LIB_DEPENDS = graphics/png \
audio/speex \
audio/libogg \
audio/lame \
+ converters/libbluray \
multimedia/libdv \
devel/fribidi \
graphics/lcms \
Index: patches/patch-configure
===================================================================
RCS file: /cvs/openbsd/ports/x11/mplayer/patches/patch-configure,v
retrieving revision 1.59
diff -u -p -r1.59 patch-configure
--- patches/patch-configure 25 Jun 2011 14:15:43 -0000 1.59
+++ patches/patch-configure 13 Nov 2011 13:22:23 -0000
@@ -1,6 +1,6 @@
$OpenBSD: patch-configure,v 1.59 2011/06/25 14:15:43 edd Exp $
---- configure.orig Wed Mar 9 00:33:03 2011
-+++ configure Fri Jun 24 12:19:32 2011
+--- configure.orig Wed Mar 9 01:33:03 2011
++++ configure Sun Nov 13 14:22:17 2011
@@ -35,29 +35,33 @@
#
#############################################################################
@@ -210,7 +210,32 @@ $OpenBSD: patch-configure,v 1.59 2011/06
def_mlib='#define CONFIG_MLIB 0'
if sunos; then
echocheck "Sun mediaLib"
-@@ -5832,8 +5866,9 @@ if test "$_dvdread_internal" = auto ; then
+@@ -5780,7 +5814,15 @@ else
+ default_dvd_device="/dev/dvd"
+ fi
+
++if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos ; then
++ default_bluray_device=$default_cdrom_device
++elif darwin ; then
++ default_bluray_device="/dev/rdiskN"
++else
++ default_bluray_device="/dev/dvd"
++fi
+
++
+ echocheck "VCD support"
+ if test "$_vcd" = auto; then
+ _vcd=no
+@@ -5805,7 +5847,7 @@ echores "$_vcd"
+ echocheck "Blu-ray support"
+ if test "$_bluray" = auto ; then
+ _bluray=no
+- statement_check libbluray/bluray.h 'bd_get_title_info(0, 0)' -lbluray &&
_bluray=yes
++ statement_check libbluray/bluray.h 'bd_get_title_info(0, 0, 0)' -lbluray &&
_bluray=yes
+ fi
+ if test "$_bluray" = yes ; then
+ def_bluray='#define CONFIG_LIBBLURAY 1'
+@@ -5832,8 +5874,9 @@ if test "$_dvdread_internal" = auto ; then
elif test "$_dvdread" = auto ; then
_dvdread=no
if test "$_dl" = yes; then
@@ -222,7 +247,7 @@ $OpenBSD: patch-configure,v 1.59 2011/06
if header_check dvdread/dvd_reader.h $_dvdreadcflags $_dvdreadlibs
$_ld_dl ; then
_dvdread=yes
extra_cflags="$extra_cflags $_dvdreadcflags"
-@@ -6521,7 +6556,7 @@ echores "$_libmpeg2"
+@@ -6521,7 +6564,7 @@ echores "$_libmpeg2"
echocheck "libdca support"
if test "$_libdca" = auto ; then
_libdca=no
@@ -231,7 +256,7 @@ $OpenBSD: patch-configure,v 1.59 2011/06
statement_check_broken stdint.h dts.h 'dts_init(0)' $_ld_dca $_ld_lm &&
extra_ldflags="$extra_ldflags $_ld_dca" && _libdca=yes && break
done
-@@ -7360,6 +7395,8 @@ if test "$_tv_v4l2" = auto ; then
+@@ -7360,6 +7403,8 @@ if test "$_tv_v4l2" = auto ; then
_tv_v4l2=no
if test "$_tv" = yes && linux ; then
header_check_broken sys/time.h linux/videodev2.h && _tv_v4l2=yes
@@ -240,7 +265,7 @@ $OpenBSD: patch-configure,v 1.59 2011/06
fi
fi
if test "$_tv_v4l2" = yes ; then
-@@ -8069,6 +8106,7 @@ SPEEX = $_speex
+@@ -8069,6 +8114,7 @@ SPEEX = $_speex
STREAM_CACHE = $_stream_cache
SGIAUDIO = $_sgiaudio
SUNAUDIO = $_sunaudio
@@ -248,7 +273,15 @@ $OpenBSD: patch-configure,v 1.59 2011/06
SVGA = $_svga
TDFXFB = $_tdfxfb
TDFXVID = $_tdfxvid
-@@ -8445,6 +8483,7 @@ $def_ossaudio_devmixer
+@@ -8357,6 +8403,7 @@ $(ff_config_enable "$cpuexts_all" "$cpuexts" "#" "HAVE
+ /* Blu-ray/DVD/VCD/CD */
+ #define DEFAULT_CDROM_DEVICE "$default_cdrom_device"
+ #define DEFAULT_DVD_DEVICE "$default_dvd_device"
++#define DEFAULT_BLURAY_DEVICE "$default_bluray_device"
+ $def_bluray
+ $def_bsdi_dvd
+ $def_cddb
+@@ -8445,6 +8492,7 @@ $def_ossaudio_devmixer
$def_pulse
$def_sgiaudio
$def_sunaudio
Index: patches/patch-stream_stream_bluray_c
===================================================================
RCS file: patches/patch-stream_stream_bluray_c
diff -N patches/patch-stream_stream_bluray_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-stream_stream_bluray_c 13 Nov 2011 22:59:08 -0000
@@ -0,0 +1,78 @@
+$OpenBSD$
+
+Update to new libbluray API
+
+--- stream/stream_bluray.c.orig Wed Mar 9 01:32:47 2011
++++ stream/stream_bluray.c Sun Nov 13 23:59:03 2011
+@@ -116,7 +116,7 @@ static int bluray_stream_control(stream_t *s, int cmd,
+ case STREAM_CTRL_GET_NUM_CHAPTERS: {
+ BLURAY_TITLE_INFO *ti;
+
+- ti = bd_get_title_info(b->bd, b->current_title);
++ ti = bd_get_title_info(b->bd, b->current_title, 0);
+ if (!ti)
+ return STREAM_UNSUPPORTED;
+
+@@ -137,7 +137,7 @@ static int bluray_stream_control(stream_t *s, int cmd,
+ int64_t pos;
+ int r;
+
+- ti = bd_get_title_info(b->bd, b->current_title);
++ ti = bd_get_title_info(b->bd, b->current_title, 0);
+ if (!ti)
+ return STREAM_UNSUPPORTED;
+
+@@ -156,7 +156,7 @@ static int bluray_stream_control(stream_t *s, int cmd,
+ case STREAM_CTRL_GET_NUM_ANGLES: {
+ BLURAY_TITLE_INFO *ti;
+
+- ti = bd_get_title_info(b->bd, b->current_title);
++ ti = bd_get_title_info(b->bd, b->current_title, 0);
+ if (!ti)
+ return STREAM_UNSUPPORTED;
+
+@@ -175,7 +175,7 @@ static int bluray_stream_control(stream_t *s, int cmd,
+ BLURAY_TITLE_INFO *ti;
+ int angle = *((int *) arg);
+
+- ti = bd_get_title_info(b->bd, b->current_title);
++ ti = bd_get_title_info(b->bd, b->current_title, 0);
+ if (!ti)
+ return STREAM_UNSUPPORTED;
+
+@@ -222,6 +222,8 @@ static int bluray_stream_open(stream_t *s, int mode,
+ device = p->device;
+ else if (bluray_device)
+ device = bluray_device;
++ else
++ device = DEFAULT_BLURAY_DEVICE;
+
+ if (!device) {
+ mp_msg(MSGT_OPEN, MSGL_ERR, MSGTR_BlurayNoDevice);
+@@ -236,7 +238,7 @@ static int bluray_stream_open(stream_t *s, int mode,
+ }
+
+ /* check for available titles on disc */
+- title_count = bd_get_titles(bd, TITLES_RELEVANT);
++ title_count = bd_get_titles(bd, TITLES_RELEVANT, 0);
+ mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_BLURAY_TITLES=%d\n", title_count);
+ if (!title_count) {
+ mp_msg(MSGT_OPEN, MSGL_ERR, MSGTR_BlurayNoTitles);
+@@ -250,7 +252,7 @@ static int bluray_stream_open(stream_t *s, int mode,
+ BLURAY_TITLE_INFO *ti;
+ int sec, msec;
+
+- ti = bd_get_title_info(bd, i);
++ ti = bd_get_title_info(bd, i, 0);
+ if (!ti)
+ continue;
+
+@@ -284,7 +286,7 @@ static int bluray_stream_open(stream_t *s, int mode,
+ "ID_BLURAY_CURRENT_TITLE=%d\n", title + 1);
+
+ /* Get current title information */
+- info = bd_get_title_info(bd, title);
++ info = bd_get_title_info(bd, title, 0);
+ if (!info)
+ goto err_no_info;
+
--
What's another word for "thesaurus"?
-- Steven Wright
libbluray.tgz
Description: application/tar-gz
