![]() |
![]() |
![]() |
GStreamer Base Plugins 0.10 Library Reference Manual | ![]() |
---|---|---|---|---|
#include <gst/video/video.h> gboolean gst_video_calculate_display_ratio (guint *dar_n, guint *dar_d, guint video_width, guint video_height, guint video_par_n, guint video_par_d, guint display_par_n, guint display_par_d);
This library contains some helper functions and includes the videosink and videofilter base classes.
gboolean gst_video_calculate_display_ratio (guint *dar_n, guint *dar_d, guint video_width, guint video_height, guint video_par_n, guint video_par_d, guint display_par_n, guint display_par_d);
Given the Pixel Aspect Ratio and size of an input video frame, and the pixel aspect ratio of the intended display device, calculates the actual display ratio the video will be rendered with.
dar_n : |
Numerator of the calculated display_ratio |
dar_d : |
Denominator of the calculated display_ratio |
video_width : |
Width of the video frame in pixels |
video_height : |
Height of the video frame in pixels |
video_par_n : |
Numerator of the pixel aspect ratio of the input video. |
video_par_d : |
Denominator of the pixel aspect ratio of the input video. |
display_par_n : |
Numerator of the pixel aspect ratio of the display device |
display_par_d : |
Denominator of the pixel aspect ratio of the display device |
Returns : | A boolean indicating success and a calculated Display Ratio in the dar_n and dar_d parameters. The return value is FALSE in the case of integer overflow or other error. |
Since 0.10.7