diff options
author | Voyager1 <voyager@xbmc.org> | 2014-02-08 09:40:22 +0100 |
---|---|---|
committer | Voyager1 <voyager@xbmc.org> | 2014-02-11 19:23:31 +0100 |
commit | d3f79278ca2b6839b64a70b4c5f45b985173a5fb (patch) | |
tree | 596738f90e6666ff7fcaffcf839e5b7a907fbed5 /lib/libdvd | |
parent | 19ac2c411c2166201ac24998e2b1c3e930ee5c0e (diff) |
libdvdread-libdvdnav - remove unused xbmc patches
Diffstat (limited to 'lib/libdvd')
-rw-r--r-- | lib/libdvd/libdvdnav/src/dvdnav.c | 212 | ||||
-rw-r--r-- | lib/libdvd/libdvdnav/src/dvdnav/dvdnav.h | 36 | ||||
-rw-r--r-- | lib/libdvd/libdvdnav/src/vm/vm.c | 4 | ||||
-rw-r--r-- | lib/libdvd/libdvdnav/src/vm/vm.h | 4 |
4 files changed, 4 insertions, 252 deletions
diff --git a/lib/libdvd/libdvdnav/src/dvdnav.c b/lib/libdvd/libdvdnav/src/dvdnav.c index fd2a187022..7b2ff892a4 100644 --- a/lib/libdvd/libdvdnav/src/dvdnav.c +++ b/lib/libdvd/libdvdnav/src/dvdnav.c @@ -1195,68 +1195,6 @@ vm_t* dvdnav_get_vm(dvdnav_t *this) { return this->vm; } -int dvdnav_get_nr_of_subtitle_streams(dvdnav_t *this) -{ - int i; - int count = 0; - - if (this && this->vm && this->vm->state.pgc) - { - for (i = 0; i < 32; i++) - { - if (this->vm->state.pgc->subp_control[i] & (1<<31)) count++; - } - } - return count; - - /* old code - if(!this || !this->vm || !this->vm->vtsi || !this->vm->vtsi->vtsi_mat) return 0; - - switch ((this->vm->state).domain) { - case VTS_DOMAIN: - return this->vm->vtsi->vtsi_mat->nr_of_vts_subp_streams; - case VTSM_DOMAIN: - return this->vm->vtsi->vtsi_mat->nr_of_vtsm_subp_streams; // 1 - case VMGM_DOMAIN: - case FP_DOMAIN: - return this->vm->vmgi->vmgi_mat->nr_of_vmgm_subp_streams; // 1 - } - - return 0; - */ -} - -int dvdnav_get_nr_of_audio_streams(dvdnav_t *this) -{ - int i; - int count = 0; - - if (this && this->vm && this->vm->state.pgc) - { - for (i = 0; i < 8; i++) - { - if (this->vm->state.pgc->audio_control[i] & (1<<15)) count++; - } - } - return count; - - /* old code - if(!this || !this->vm || !this->vm->vtsi || !this->vm->vtsi->vtsi_mat) return 0; - - switch ((this->vm->state).domain) { - case VTS_DOMAIN: - return this->vm->vtsi->vtsi_mat->nr_of_vts_audio_streams; - case VTSM_DOMAIN: - return this->vm->vtsi->vtsi_mat->nr_of_vtsm_audio_streams; // 1 - case VMGM_DOMAIN: - case FP_DOMAIN: - return this->vm->vmgi->vmgi_mat->nr_of_vmgm_audio_streams; // 1 - } - - return 0; - */ -} - /* return the alpha and color for the current active button * color, alpha [0][] = selection * color, alpha = color @@ -1292,157 +1230,7 @@ int dvdnav_get_button_info(dvdnav_t* this, int alpha[2][4], int color[2][4]) return 0; } -/* - * the next stuff is taken from ratdvd - */ - #undef printerr #define printerr(str) strncpy(self->err_str, str, MAX_ERR_LEN); -dvdnav_status_t dvdnav_get_audio_info(dvdnav_t * self, int32_t streamid, audio_attr_t* audio_attributes) -{ - if(!self) { - printerr("Passed a NULL pointer."); - return -1; - } - if(!self->started) { - printerr("Virtual DVD machine not started."); - return -1; - } - - pthread_mutex_lock(&self->vm_lock); - audio_attr_t attributes = vm_get_audio_attr(self->vm,streamid); - pthread_mutex_unlock(&self->vm_lock); - audio_attributes->audio_format = attributes.audio_format; - audio_attributes->multichannel_extension = attributes.multichannel_extension; - audio_attributes->lang_type = attributes.lang_type; - audio_attributes->application_mode = attributes.application_mode; - audio_attributes->quantization = attributes.quantization; - audio_attributes->sample_frequency = attributes.sample_frequency; - audio_attributes->channels = attributes.channels; - audio_attributes->lang_code = attributes.lang_code; - audio_attributes->lang_extension = attributes.lang_extension; - audio_attributes->code_extension = attributes.code_extension; - audio_attributes->unknown3 = attributes.unknown3; - audio_attributes->app_info = attributes.app_info; - return DVDNAV_STATUS_OK; -} - -dvdnav_status_t dvdnav_get_stitle_info(dvdnav_t * self - , int32_t streamid, subp_attr_t* stitle_attributes) -{ - if(!self) { - printerr("Passed a NULL pointer."); - return -1; - } - if(!self->started) { - printerr("Virtual DVD machine not started."); - return -1; - } - - pthread_mutex_lock(&self->vm_lock); - subp_attr_t attributes = vm_get_subp_attr(self->vm,streamid); - pthread_mutex_unlock(&self->vm_lock); - stitle_attributes->code_mode = attributes.code_mode; - stitle_attributes->zero1 = attributes.zero1; - stitle_attributes->type = attributes.type; - stitle_attributes->zero2 = attributes.zero2; - stitle_attributes->lang_code = attributes.lang_code; - stitle_attributes->lang_extension = attributes.lang_extension; - stitle_attributes->code_extension = attributes.code_extension; - return DVDNAV_STATUS_OK; -} - -dvdnav_status_t dvdnav_get_video_info(dvdnav_t * self, video_attr_t* video_attributes) -{ - if(!self) { - printerr("Passed a NULL pointer."); - return -1; - } - if(!self->started) { - printerr("Virtual DVD machine not started."); - return -1; - } - - pthread_mutex_lock(&self->vm_lock); - video_attr_t attributes = vm_get_video_attr(self->vm); - pthread_mutex_unlock(&self->vm_lock); - - video_attributes->video_format = attributes.video_format; - video_attributes->permitted_df = attributes.permitted_df; - video_attributes->display_aspect_ratio = attributes.display_aspect_ratio; - video_attributes->mpeg_version = attributes.mpeg_version; - video_attributes->film_mode = attributes.film_mode; - video_attributes->letterboxed = attributes.letterboxed; - video_attributes->picture_size = attributes.picture_size; - video_attributes->bit_rate = attributes.bit_rate; - video_attributes->unknown1 = attributes.unknown1; - video_attributes->line21_cc_2 = attributes.line21_cc_2; - video_attributes->line21_cc_1 = attributes.line21_cc_1; - return DVDNAV_STATUS_OK; -} - -dvdnav_status_t dvdnav_audio_change(dvdnav_t *self, int32_t audio) -{ - int32_t num; - - if(!self) { - printerr("Passed a NULL pointer."); - return DVDNAV_STATUS_ERR; - } - - num = dvdnav_get_nr_of_audio_streams(self); - pthread_mutex_lock(&self->vm_lock); - /* Set subp AUDIO if valid */ - if((audio >= 0) && (audio <= num)) { - self->vm->state.AST_REG = audio; - } else { - //printerr("Passed an invalid audio number."); - pthread_mutex_unlock(&self->vm_lock); - return DVDNAV_STATUS_ERR; - } - pthread_mutex_unlock(&self->vm_lock); - - return DVDNAV_STATUS_OK; -} - -dvdnav_status_t dvdnav_subpicture_change(dvdnav_t *self, int32_t subpicture) -{ - int32_t num; - - if(!self) { - printerr("Passed a NULL pointer."); - return DVDNAV_STATUS_ERR; - } - - num = dvdnav_get_nr_of_subtitle_streams(self); - pthread_mutex_lock(&self->vm_lock); - /* Set subp SPRM if valid */ - if((subpicture >= 0) && (subpicture <= num)) { - self->vm->state.SPST_REG = subpicture | 0x40; - } else if (subpicture & 0x80) { - self->vm->state.SPST_REG = subpicture & ~0x80; - } else { - self->vm->state.SPST_REG = subpicture; - //printerr("Passed an invalid subpicture number."); - //pthread_mutex_unlock(&self->vm_lock); - //return DVDNAV_STATUS_ERR; - } - pthread_mutex_unlock(&self->vm_lock); - - return DVDNAV_STATUS_OK; -} - -void dvdnav_lock(dvdnav_t *self) -{ - // we do not check for null pointer problems - pthread_mutex_lock(&self->vm_lock); -} - -void dvdnav_unlock(dvdnav_t *self) -{ - // we do not check for null pointer problems - pthread_mutex_unlock(&self->vm_lock); -} - #endif // _XBMC diff --git a/lib/libdvd/libdvdnav/src/dvdnav/dvdnav.h b/lib/libdvd/libdvdnav/src/dvdnav/dvdnav.h index d24e0a602a..bf6aae9d2a 100644 --- a/lib/libdvd/libdvdnav/src/dvdnav/dvdnav.h +++ b/lib/libdvd/libdvdnav/src/dvdnav/dvdnav.h @@ -697,42 +697,6 @@ int8_t dvdnav_is_domain_vtsm(dvdnav_t *self); */ int8_t dvdnav_is_domain_vts(dvdnav_t *self); -////////// RATDVD stuff /////////////// - -/* - * Get the number of audio streams. - */ -int32_t dvdnav_get_audio_stream_count(dvdnav_t * self); - -/* - * Get the number of subpicture streams. - */ -int32_t dvdnav_get_subpicture_stream_count(dvdnav_t * self); - -/* - * Get attributes of the current audio stream. - */ -dvdnav_status_t dvdnav_get_audio_info(dvdnav_t * self, int32_t streamid, audio_attr_t* audio_attributes); - -/* - * Get attributes of the current subpicture stream. - */ -dvdnav_status_t dvdnav_get_stitle_info(dvdnav_t * self, int32_t streamid, subp_attr_t* stitle_attributes); - -/* - * Get information about the current video stream - */ -dvdnav_status_t dvdnav_get_video_info(dvdnav_t * self, video_attr_t* video_attributes); - -/* - * Select the audio stream to be played - */ -dvdnav_status_t dvdnav_audio_change(dvdnav_t *self, int32_t audio); - -/* - * Select the spu stream to be displayed - */ -dvdnav_status_t dvdnav_subpicture_change(dvdnav_t *self, int32_t subpicture); #ifdef __cplusplus } diff --git a/lib/libdvd/libdvdnav/src/vm/vm.c b/lib/libdvd/libdvdnav/src/vm/vm.c index ed3342febd..6040a6fd15 100644 --- a/lib/libdvd/libdvdnav/src/vm/vm.c +++ b/lib/libdvd/libdvdnav/src/vm/vm.c @@ -863,7 +863,7 @@ void vm_get_angle_info(vm_t *vm, int *current, int *num_avail) { } } -// XBMC #if 0 +#if 0 /* currently unused */ void vm_get_audio_info(vm_t *vm, int *current, int *num_avail) { switch ((vm->state).domain) { @@ -901,7 +901,7 @@ void vm_get_subp_info(vm_t *vm, int *current, int *num_avail) { break; } } -// XBMC #endif +#endif void vm_get_video_res(vm_t *vm, int *width, int *height) { video_attr_t attr = vm_get_video_attr(vm); diff --git a/lib/libdvd/libdvdnav/src/vm/vm.h b/lib/libdvd/libdvdnav/src/vm/vm.h index 2405489c69..3e754ab74d 100644 --- a/lib/libdvd/libdvdnav/src/vm/vm.h +++ b/lib/libdvd/libdvdnav/src/vm/vm.h @@ -156,11 +156,11 @@ int vm_get_subp_stream(vm_t *vm, int subpN, int mode); int vm_get_audio_active_stream(vm_t *vm); int vm_get_subp_active_stream(vm_t *vm, int mode); void vm_get_angle_info(vm_t *vm, int *current, int *num_avail); -// _XBMC #if 0 +#if 0 /* currently unused */ void vm_get_audio_info(vm_t *vm, int *current, int *num_avail); void vm_get_subp_info(vm_t *vm, int *current, int *num_avail); -// _XBMC #endif +#endif void vm_get_video_res(vm_t *vm, int *width, int *height); int vm_get_video_aspect(vm_t *vm); int vm_get_video_scale_permission(vm_t *vm); |