Most of our Readers place 1:1 as pixel aspect ratio for undistorted video,
which doesn't seem to be correct from how I read the BeBook. Ignore it for now which is pretty unlikely to be a problem. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31511 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
691c650397
commit
3621c97fdf
@ -359,8 +359,8 @@ Controller::PlayerActivated(bool active)
|
||||
|
||||
|
||||
void
|
||||
Controller::GetSize(int *width, int *height, int* widthAspect,
|
||||
int* heightAspect)
|
||||
Controller::GetSize(int *width, int *height, int* _widthAspect,
|
||||
int* _heightAspect)
|
||||
{
|
||||
BAutolock _(this);
|
||||
|
||||
@ -368,17 +368,29 @@ Controller::GetSize(int *width, int *height, int* widthAspect,
|
||||
media_format format = fVideoTrackSupplier->Format();
|
||||
*height = format.u.raw_video.display.line_count;
|
||||
*width = format.u.raw_video.display.line_width;
|
||||
if (widthAspect != NULL)
|
||||
*widthAspect = format.u.raw_video.pixel_width_aspect;
|
||||
if (heightAspect != NULL)
|
||||
*heightAspect = format.u.raw_video.pixel_height_aspect;
|
||||
int widthAspect = 0;
|
||||
int heightAspect = 0;
|
||||
// Inore format aspect when both values are 1. If they have been
|
||||
// intentionally at 1:1 then no harm is done for quadratic videos,
|
||||
// only if the video is indeed encoded anamorphotic, but supposed
|
||||
// to be displayed quadratic... extremely unlikely.
|
||||
if (format.u.raw_video.pixel_width_aspect
|
||||
!= format.u.raw_video.pixel_height_aspect
|
||||
&& format.u.raw_video.pixel_width_aspect != 1) {
|
||||
widthAspect = format.u.raw_video.pixel_width_aspect;
|
||||
heightAspect = format.u.raw_video.pixel_height_aspect;
|
||||
}
|
||||
if (_widthAspect != NULL)
|
||||
*_widthAspect = widthAspect;
|
||||
if (_heightAspect != NULL)
|
||||
*_heightAspect = heightAspect;
|
||||
} else {
|
||||
*height = 0;
|
||||
*width = 0;
|
||||
if (widthAspect != NULL)
|
||||
*widthAspect = 1;
|
||||
if (heightAspect != NULL)
|
||||
*heightAspect = 1;
|
||||
if (_widthAspect != NULL)
|
||||
*_widthAspect = 1;
|
||||
if (_heightAspect != NULL)
|
||||
*_heightAspect = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user