Mercurial > libdvdnav.hg
comparison dvdnav.c @ 262:7708d2fc1745 src
added dvdnav_get_restrictions()
author | mrouthier |
---|---|
date | Fri, 18 Mar 2005 20:27:14 +0000 |
parents | 6299ccea8a38 |
children | d999338cab17 |
comparison
equal
deleted
inserted
replaced
261:8ad83ff183be | 262:7708d2fc1745 |
---|---|
1084 uint32_t dvdnav_get_next_still_flag(dvdnav_t *this) { | 1084 uint32_t dvdnav_get_next_still_flag(dvdnav_t *this) { |
1085 if(!this) return -1; | 1085 if(!this) return -1; |
1086 return this->position_next.still; | 1086 return this->position_next.still; |
1087 } | 1087 } |
1088 | 1088 |
1089 user_ops_t dvdnav_get_restrictions(dvdnav_t* this) { | |
1090 /* | |
1091 * user_ops_t is a structure of 32 bits. We want to compute | |
1092 * the union of two of those bitfields so to make this quicker | |
1093 * than performing 32 ORs, we will access them as 32bits words. | |
1094 */ | |
1095 uint32_t ops=0; | |
1096 | |
1097 ops|=*(uint32_t*)&this->pci.pci_gi.vobu_uop_ctl; | |
1098 | |
1099 if(this->vm && this->vm->state.pgc) | |
1100 ops|=*(uint32_t*)&this->vm->state.pgc->prohibited_ops; | |
1101 | |
1102 return *(user_ops_t*)&ops; | |
1103 } |