Mercurial > libdvdnav.hg
changeset 262:7708d2fc1745 src
added dvdnav_get_restrictions()
author | mrouthier |
---|---|
date | Fri, 18 Mar 2005 20:27:14 +0000 |
parents | 8ad83ff183be |
children | d999338cab17 |
files | dvdnav.c dvdnav.h |
diffstat | 2 files changed, 21 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/dvdnav.c Wed Feb 09 17:07:27 2005 +0000 +++ b/dvdnav.c Fri Mar 18 20:27:14 2005 +0000 @@ -1086,3 +1086,18 @@ return this->position_next.still; } +user_ops_t dvdnav_get_restrictions(dvdnav_t* this) { + /* + * user_ops_t is a structure of 32 bits. We want to compute + * the union of two of those bitfields so to make this quicker + * than performing 32 ORs, we will access them as 32bits words. + */ + uint32_t ops=0; + + ops|=*(uint32_t*)&this->pci.pci_gi.vobu_uop_ctl; + + if(this->vm && this->vm->state.pgc) + ops|=*(uint32_t*)&this->vm->state.pgc->prohibited_ops; + + return *(user_ops_t*)&ops; +}
--- a/dvdnav.h Wed Feb 09 17:07:27 2005 +0000 +++ b/dvdnav.h Fri Mar 18 20:27:14 2005 +0000 @@ -573,6 +573,12 @@ */ int8_t dvdnav_get_active_spu_stream(dvdnav_t *self); +/* + * Get the set of user operations that are currently prohibited. + * There are potentially new restrictions right after + * DVDNAV_CHANNEL_HOP and DVDNAV_NAV_PACKET. + */ +user_ops_t dvdnav_get_restrictions(dvdnav_t *self); /********************************************************************* * multiple angles *