pgc->subp_control and pgc->audio_control are no more bitfields,

but plain uint32_t and uint16_t respectively; replaced access
to bitfield members with bitmask operations (and removed some 
ugly macro)


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25151 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nicodvb 2007-11-23 21:12:11 +00:00
parent a8449bf462
commit 298f569c21
1 changed files with 0 additions and 20 deletions

View File

@ -927,11 +927,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
if(vts_file->vts_pgcit) { if(vts_file->vts_pgcit) {
int i; int i;
for(i=0;i<8;i++) for(i=0;i<8;i++)
#ifdef USE_DVDREAD_INTERNAL
if(pgc->audio_control[i].present) {
#else
if(pgc->audio_control[i] & 0x8000) { if(pgc->audio_control[i] & 0x8000) {
#endif
audio_attr_t * audio = &vts_file->vtsi_mat->vts_audio_attr[i]; audio_attr_t * audio = &vts_file->vtsi_mat->vts_audio_attr[i];
int language = 0; int language = 0;
char tmp[] = "unknown"; char tmp[] = "unknown";
@ -945,11 +941,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
} }
audio_stream->language=language; audio_stream->language=language;
#ifdef USE_DVDREAD_INTERNAL
audio_stream->id=pgc->audio_control[i].s_audio;
#else
audio_stream->id=pgc->audio_control[i] >> 8 & 7; audio_stream->id=pgc->audio_control[i] >> 8 & 7;
#endif
switch(audio->audio_format) { switch(audio->audio_format) {
case 0: // ac3 case 0: // ac3
audio_stream->id+=FIRST_AC3_AID; audio_stream->id+=FIRST_AC3_AID;
@ -996,11 +988,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
d->nr_of_subtitles=0; d->nr_of_subtitles=0;
for(i=0;i<32;i++) for(i=0;i<32;i++)
#ifdef USE_DVDREAD_INTERNAL
if(pgc->subp_control[i].present) {
#else
if(pgc->subp_control[i] & 0x80000000) { if(pgc->subp_control[i] & 0x80000000) {
#endif
subp_attr_t * subtitle = &vts_file->vtsi_mat->vts_subp_attr[i]; subp_attr_t * subtitle = &vts_file->vtsi_mat->vts_subp_attr[i];
video_attr_t *video = &vts_file->vtsi_mat->vts_video_attr; video_attr_t *video = &vts_file->vtsi_mat->vts_video_attr;
int language = 0; int language = 0;
@ -1017,17 +1005,9 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
sub_stream->language=language; sub_stream->language=language;
sub_stream->id=d->nr_of_subtitles; sub_stream->id=d->nr_of_subtitles;
if(video->display_aspect_ratio == 0) /* 4:3 */ if(video->display_aspect_ratio == 0) /* 4:3 */
#ifdef USE_DVDREAD_INTERNAL
sub_stream->id = pgc->subp_control[i].s_4p3;
#else
sub_stream->id = pgc->subp_control[i] >> 24 & 31; sub_stream->id = pgc->subp_control[i] >> 24 & 31;
#endif
else if(video->display_aspect_ratio == 3) /* 16:9 */ else if(video->display_aspect_ratio == 3) /* 16:9 */
#ifdef USE_DVDREAD_INTERNAL
sub_stream->id = pgc->subp_control[i].s_lbox;
#else
sub_stream->id = pgc->subp_control[i] >> 8 & 31; sub_stream->id = pgc->subp_control[i] >> 8 & 31;
#endif
mp_msg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDsubtitleLanguage, sub_stream->id, tmp); mp_msg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDsubtitleLanguage, sub_stream->id, tmp);
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SUBTITLE_ID=%d\n", sub_stream->id); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SUBTITLE_ID=%d\n", sub_stream->id);