Mercurial > libdvdnav.hg
comparison vm/vm.c @ 401:390fbf2a9602 src
Provide a way to retrieve video resolution.
Needed for correct aspect ratio support in VLC.
Patch by Jean-Baptiste Kempf /jb*videolan#org\
author | rathann |
---|---|
date | Tue, 25 May 2010 23:33:59 +0000 |
parents | 3daa43270d2c |
children | 1ce807c12563 |
comparison
equal
deleted
inserted
replaced
400:3daa43270d2c | 401:390fbf2a9602 |
---|---|
856 *num_avail = vm->vmgi->vmgi_mat->nr_of_vmgm_subp_streams; /* 1 */ | 856 *num_avail = vm->vmgi->vmgi_mat->nr_of_vmgm_subp_streams; /* 1 */ |
857 *current = 0x41; | 857 *current = 0x41; |
858 break; | 858 break; |
859 } | 859 } |
860 } | 860 } |
861 | 861 #endif |
862 /* currently unused */ | 862 |
863 void vm_get_video_res(vm_t *vm, int *width, int *height) { | 863 void vm_get_video_res(vm_t *vm, int *width, int *height) { |
864 video_attr_t attr = vm_get_video_attr(vm); | 864 video_attr_t attr = vm_get_video_attr(vm); |
865 | 865 |
866 if(attr.video_format != 0) | 866 if(attr.video_format != 0) |
867 *height = 576; | 867 *height = 576; |
881 *width = 352; | 881 *width = 352; |
882 *height /= 2; | 882 *height /= 2; |
883 break; | 883 break; |
884 } | 884 } |
885 } | 885 } |
886 #endif | |
887 | 886 |
888 int vm_get_video_aspect(vm_t *vm) { | 887 int vm_get_video_aspect(vm_t *vm) { |
889 int aspect = vm_get_video_attr(vm).display_aspect_ratio; | 888 int aspect = vm_get_video_attr(vm).display_aspect_ratio; |
890 | 889 |
891 assert(aspect == 0 || aspect == 3); | 890 assert(aspect == 0 || aspect == 3); |