commit d88751e1242d0d59861f9d14660de22db78f0be8
Author: Martin Kittel <martin@egon.zuhause.de>
Date: Mon Dec 21 21:13:07 2009 +0100
DVD: pass down new audio stream number to dvdnav vm when changing audio stream via osd
diff --git a/mythtv/libs/libmythdvdnav/dvdnav/dvdnav.c b/mythtv/libs/libmythdvdnav/dvdnav/dvdnav.c
index c03c78b..df4039e 100644
|
a
|
b
|
int8_t dvdnav_get_active_audio_stream(dvdnav_t *this) { |
| 1061 | 1061 | return retval; |
| 1062 | 1062 | } |
| 1063 | 1063 | |
| | 1064 | int8_t dvdnav_set_active_audio_stream(dvdnav_t *this, int8_t stream) { |
| | 1065 | int8_t retval; |
| | 1066 | |
| | 1067 | if(!this->started) { |
| | 1068 | printerr("Virtual DVD machine not started."); |
| | 1069 | return -1; |
| | 1070 | } |
| | 1071 | |
| | 1072 | pthread_mutex_lock(&this->vm_lock); |
| | 1073 | if (!this->vm->state.pgc) { |
| | 1074 | printerr("No current PGC."); |
| | 1075 | pthread_mutex_unlock(&this->vm_lock); |
| | 1076 | return -1; |
| | 1077 | } |
| | 1078 | |
| | 1079 | retval = vm_set_audio_active_stream(this->vm, stream); |
| | 1080 | pthread_mutex_unlock(&this->vm_lock); |
| | 1081 | |
| | 1082 | return retval; |
| | 1083 | } |
| | 1084 | |
| 1064 | 1085 | int8_t dvdnav_get_active_spu_stream(dvdnav_t *this) { |
| 1065 | 1086 | int8_t retval; |
| 1066 | 1087 | |
diff --git a/mythtv/libs/libmythdvdnav/dvdnav/dvdnav.h b/mythtv/libs/libmythdvdnav/dvdnav/dvdnav.h
index f183d4d..1e4c825 100644
|
a
|
b
|
dvdnav_status_t dvdnav_get_spu_attr(dvdnav_t *self, uint8_t audio_mum, subp_attr |
| 627 | 627 | int8_t dvdnav_get_active_audio_stream(dvdnav_t *self); |
| 628 | 628 | |
| 629 | 629 | /* |
| | 630 | * Set active audio stream |
| | 631 | */ |
| | 632 | int8_t dvdnav_set_active_audio_stream(dvdnav_t *self, int8_t stream); |
| | 633 | |
| | 634 | /* |
| 630 | 635 | * Get active spu stream. |
| 631 | 636 | */ |
| 632 | 637 | int8_t dvdnav_get_active_spu_stream(dvdnav_t *self); |
diff --git a/mythtv/libs/libmythdvdnav/dvdnav/vm/vm.c b/mythtv/libs/libmythdvdnav/dvdnav/vm/vm.c
index 15448a0..c8f25eb 100644
|
a
|
b
|
int vm_get_audio_active_stream(vm_t *vm) { |
| 775 | 775 | return streamN; |
| 776 | 776 | } |
| 777 | 777 | |
| | 778 | int vm_set_audio_active_stream(vm_t *vm, int audioN) { |
| | 779 | |
| | 780 | if (audioN >= 8) |
| | 781 | return -1; |
| | 782 | |
| | 783 | /* verify that stream exists */ |
| | 784 | if(! (vm->state).pgc->audio_control[audioN] & (1<<15)) |
| | 785 | return -1; |
| | 786 | |
| | 787 | (vm->state).AST_REG = audioN; |
| | 788 | return 0; |
| | 789 | } |
| | 790 | |
| 778 | 791 | int vm_get_subp_active_stream(vm_t *vm, int mode) { |
| 779 | 792 | int subpN; |
| 780 | 793 | int streamN; |
diff --git a/mythtv/libs/libmythdvdnav/dvdnav/vm/vm.h b/mythtv/libs/libmythdvdnav/dvdnav/vm/vm.h
index 9edcff8..c015596 100644
|
a
|
b
|
int vm_get_current_title_part(vm_t *vm, int *title_result, int *part_result); |
| 153 | 153 | int vm_get_audio_stream(vm_t *vm, int audioN); |
| 154 | 154 | int vm_get_subp_stream(vm_t *vm, int subpN, int mode); |
| 155 | 155 | int vm_get_audio_active_stream(vm_t *vm); |
| | 156 | int vm_set_audio_active_stream(vm_t *vm, int audioN); |
| 156 | 157 | int vm_get_subp_active_stream(vm_t *vm, int mode); |
| 157 | 158 | void vm_get_angle_info(vm_t *vm, int *current, int *num_avail); |
| 158 | 159 | #if 0 |
diff --git a/mythtv/libs/libmythtv/DVDRingBuffer.cpp b/mythtv/libs/libmythtv/DVDRingBuffer.cpp
index ec22f1a..30c66a6 100644
|
a
|
b
|
void DVDRingBufferPriv::SetTrack(uint type, int trackNo) |
| 1166 | 1166 | { |
| 1167 | 1167 | m_curAudioTrack = trackNo; |
| 1168 | 1168 | m_autoselectaudio = false; |
| | 1169 | dvdnav_set_active_audio_stream(m_dvdnav, trackNo); |
| 1169 | 1170 | } |
| 1170 | 1171 | } |
| 1171 | 1172 | |