disc: signal libmmbd usage to upper layers
This commit is contained in:
parent
1d93273f16
commit
78e36bc458
|
@ -235,6 +235,9 @@ JNIEXPORT jbyteArray JNICALL Java_org_videolan_Libbluray_getAacsDataN
|
|||
if (type == 8/*BD_AACS_BDJ_ROOT_CERT_HASH*/) {
|
||||
data_size = 20;
|
||||
}
|
||||
if (type == 0x1000/*BD_BDPLUS_TYPE*/) {
|
||||
data_size = strlen((const char*)data);
|
||||
}
|
||||
|
||||
jbyteArray array = (*env)->NewByteArray(env, data_size);
|
||||
(*env)->SetByteArrayRegion(env, array, 0, data_size, (const jbyte *)data);
|
||||
|
|
|
@ -258,6 +258,18 @@ int libbdplus_get_date(BD_BDPLUS *p)
|
|||
return _bdplus_get(p, "bdplus_get_code_date");
|
||||
}
|
||||
|
||||
const uint8_t *libbdplus_get_data(BD_BDPLUS *p, int type)
|
||||
{
|
||||
switch (type) {
|
||||
case BD_BDPLUS_TYPE:
|
||||
if (libbdplus_is_mmbd(p->bdplus)) {
|
||||
return (const uint8_t *)"mmbd";
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void libbdplus_event(BD_BDPLUS *p, uint32_t event, uint32_t param1, uint32_t param2)
|
||||
{
|
||||
if (p && p->bdplus && p->event) {
|
||||
|
|
|
@ -43,6 +43,9 @@ BD_PRIVATE void libbdplus_psr(BD_BDPLUS *p, void *regs, void *read, void *write)
|
|||
BD_PRIVATE void libbdplus_start(BD_BDPLUS *p);
|
||||
BD_PRIVATE void libbdplus_event(BD_BDPLUS *p, uint32_t event, uint32_t param1, uint32_t param2);
|
||||
|
||||
#define BD_BDPLUS_TYPE 0x1000
|
||||
BD_PRIVATE const uint8_t *libbdplus_get_data(BD_BDPLUS *p, int type);
|
||||
|
||||
/*
|
||||
* stream layer
|
||||
*/
|
||||
|
|
|
@ -243,7 +243,7 @@ static int _libbdplus_init(BD_DEC *dec, struct dec_dev *dev,
|
|||
if (i->bdplus_date == 0) {
|
||||
// libmmbd -> no menu support
|
||||
BD_DEBUG(DBG_BLURAY | DBG_CRIT, "WARNING: using libmmbd for BD+. On-disc menus will not work.\n");
|
||||
i->no_menu_support = 1;
|
||||
//i->no_menu_support = 1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -339,10 +339,19 @@ void dec_close(BD_DEC **pp)
|
|||
|
||||
const uint8_t *dec_data(BD_DEC *dec, int type)
|
||||
{
|
||||
if (dec->aacs) {
|
||||
return libaacs_get_aacs_data(dec->aacs, type);
|
||||
const uint8_t *ret = NULL;
|
||||
|
||||
if (type >= 0x1000) {
|
||||
if (dec->bdplus) {
|
||||
ret = libbdplus_get_data(dec->bdplus, type);
|
||||
}
|
||||
} else {
|
||||
if (dec->aacs) {
|
||||
ret = libaacs_get_aacs_data(dec->aacs, type);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
const uint8_t *dec_disc_id(BD_DEC *dec)
|
||||
|
|
Loading…
Reference in New Issue