[libdvdnav-devel] [Git][videolan/libdvdnav][master] Add button forced selection when FOSL_BTNN is present
Jean-Baptiste Kempf
gitlab at videolan.org
Wed Jan 17 22:20:31 CET 2018
Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdnav
Commits:
4c923b61 by Pierre Lamot at 2018-01-17T22:20:27+01:00
Add button forced selection when FOSL_BTNN is present
This patch allows to force the the selection of the current button when
activating a SPU stream. The behavior is innacurate though, FOSL_BTNN is
supposed to update the register at time HLI_S_PTM.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
- - - - -
3 changed files:
- src/dvdnav.c
- src/vm/getset.c
- src/vm/getset.h
Changes:
=====================================
src/dvdnav.c
=====================================
--- a/src/dvdnav.c
+++ b/src/dvdnav.c
@@ -790,6 +790,14 @@ dvdnav_status_t dvdnav_get_next_cache_block(dvdnav_t *this, uint8_t **buf,
fprintf(MSG_OUT, "libdvdnav: SPU_STREAM_CHANGE stream_id_pan_scan=%d\n",stream_change->physical_pan_scan);
fprintf(MSG_OUT, "libdvdnav: SPU_STREAM_CHANGE returning DVDNAV_STATUS_OK\n");
#endif
+ /* This is not realy the right place to do this. FOSL_BTNN should set the register
+ * at HLI_S_PTM rather than when we enter the SPU. As well we should activate FOAC_BTNN
+ * at HLI_E_PTM
+ */
+ if (this->pci.hli.hl_gi.fosl_btnn != 0) {
+ set_HL_BTN(this->vm, this->pci.hli.hl_gi.fosl_btnn);
+ }
+
pthread_mutex_unlock(&this->vm_lock);
return DVDNAV_STATUS_OK;
}
=====================================
src/vm/getset.c
=====================================
--- a/src/vm/getset.c
+++ b/src/vm/getset.c
@@ -216,6 +216,13 @@ void set_RSMinfo(vm_t *vm, int cellN, int blockN) {
}
}
+
+/* Force the highlight button number register */
+void set_HL_BTN(vm_t *vm, int btnn)
+{
+ (vm->state).HL_BTNN_REG = btnn << 10;
+}
+
/* Get functions */
/* Searches the TT tables, to find the current TT.
=====================================
src/vm/getset.h
=====================================
--- a/src/vm/getset.h
+++ b/src/vm/getset.h
@@ -38,6 +38,7 @@ int set_MENU(vm_t *vm, int menu);
int set_PGCN(vm_t *vm, int pgcN);
int set_PGN(vm_t *vm); /* Set PGN based on (vm->state).CellN */
void set_RSMinfo(vm_t *vm, int cellN, int blockN);
+void set_BTN(vm_t *vm, int btnn);
/* Get */
int get_TT(vm_t *vm, int vtsN, int vts_ttn);
View it on GitLab: https://code.videolan.org/videolan/libdvdnav/commit/4c923b61b950de3768fb7104c898c405b1b9cf92
---
View it on GitLab: https://code.videolan.org/videolan/libdvdnav/commit/4c923b61b950de3768fb7104c898c405b1b9cf92
You're receiving this email because of your account on code.videolan.org.
More information about the libdvdnav-devel
mailing list