Function

GstVideo-1.0GstVideovideo_calculate_display_ratio

  • 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.

    Parameters

    • video_width: number

      Width of the video frame in pixels

    • video_height: number

      Height of the video frame in pixels

    • video_par_n: number

      Numerator of the pixel aspect ratio of the input video.

    • video_par_d: number

      Denominator of the pixel aspect ratio of the input video.

    • display_par_n: number

      Numerator of the pixel aspect ratio of the display device

    • display_par_d: number

      Denominator of the pixel aspect ratio of the display device

    Returns [boolean, number, number]

    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.