Kodi Development 23.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches
ContentGeometry

Detailed Description

Where the picture is inside the frame carrying it.

Class: xbmc.ContentGeometry()

A snapshot of the content rectangle in force, taken when it was asked for and never changing afterwards. Every member of one describes the same resolution.

The rectangle is zero wherever there is no frame behind it - nothing playing, or a library item nothing was measured for. The ratio is still answered while nothing is playing; getFrameWidth() is what separates the two.

Obtained from xbmc.Player().getContentGeometry() for what is playing, or from InfoTagVideo.getContentGeometry() for a library item, rather than created.


v23 Python API changes
New class added.

Example:

...
geometry = xbmc.Player().getContentGeometry()
if geometry.getSource() != 'container':
lens.select(geometry.getAspect())
...

Function Documentation

◆ getX()

getX ( )

Function: getX()


Get the left edge of the picture, in display space.

Returns
[float] Left edge in display pixels

v23 Python API changes
New function added.

◆ getY()

getY ( )

Function: getY()


Get the top edge of the picture, in display space.

Returns
[float] Top edge in display pixels

v23 Python API changes
New function added.

◆ getWidth()

getWidth ( )

Function: getWidth()


Get the width of the picture, in display space.

Returns
[float] Width in display pixels

v23 Python API changes
New function added.

◆ getHeight()

getHeight ( )

Function: getHeight()


Get the height of the picture, in display space.

Returns
[float] Height in display pixels

v23 Python API changes
New function added.

◆ getFrameWidth()

getFrameWidth ( )

Function: getFrameWidth()


Get the width of the whole frame the picture sits in, in display space.

Returns
[float] Frame width in display pixels\, zero when nothing is playing

v23 Python API changes
New function added.

◆ getFrameHeight()

getFrameHeight ( )

Function: getFrameHeight()


Get the height of the whole frame the picture sits in, in display space.

Returns
[float] Frame height in display pixels\, zero when nothing is playing

v23 Python API changes
New function added.

◆ getCodedWidth()

getCodedWidth ( )

Function: getCodedWidth()


Get the width of the coded frame, before pixel aspect correction and before rotation.

Returns
[integer] Coded width in pixels

v23 Python API changes
New function added.

◆ getCodedHeight()

getCodedHeight ( )

Function: getCodedHeight()


Get the height of the coded frame, before pixel aspect correction and before rotation.

Returns
[integer] Coded height in pixels

v23 Python API changes
New function added.

◆ getPixelAspect()

getPixelAspect ( )

Function: getPixelAspect()


Get the width of a coded pixel in display pixels. One for content with no anamorphic coding.

Returns
[float] Pixel aspect ratio

v23 Python API changes
New function added.

◆ getOrientation()

getOrientation ( )

Function: getOrientation()


Get the clockwise rotation applied to the picture for display, in degrees.

Returns
[integer] Rotation in degrees

v23 Python API changes
New function added.

◆ getAspect()

getAspect ( )

Function: getAspect()


Get the ratio the content was shot at. The picture's own ratio except when it is rotated, where it is the upright one.

Returns
[float] Aspect ratio of the content

v23 Python API changes
New function added.

◆ getLabel()

getLabel ( )

Function: getLabel()


Get the ratio as Kodi writes it, e.g. 2.35.

Returns
[string] Aspect ratio label

v23 Python API changes
New function added.

◆ getName()

getName ( )

Function: getName()


Get what the ratio is called, e.g. Scope. Empty when it has no name. Not translated.

Returns
[string] Aspect ratio name

v23 Python API changes
New function added.

◆ getSource()

getSource ( )

Function: getSource()


Get where the answer came from.

Returns
[string] One of:
  • container - nothing is known\, so the coded frame is the answer
  • cached - a stored measurement
  • live - measured during playback
  • declared - stated by the viewer\, which pins

v23 Python API changes
New function added.

◆ getVaries()

getVaries ( )

Function: getVaries()


Whether the title's geometry changes partway through, so that one rectangle cannot describe all of it. What the others are is at getSections().

Returns
[bool] True when the title varies

v23 Python API changes
New function added.

◆ getStale()

getStale ( )

Function: getStale()


Whether the measurement came from a superseded detector, and is served rather than discarded.

Returns
[bool] True when the measurement is stale

v23 Python API changes
New function added.

◆ getRejected()

getRejected ( )

Function: getRejected()


Whether a measurement existed and the plausibility gate refused it, so the frame is being served instead. Never having measured at all reports the same container.

Returns
[bool] True when a measurement was refused

v23 Python API changes
New function added.

◆ getSections()

getSections ( )

Function: getSections()


Get every geometry the title was measured in, dominant first. Empty unless the answer came from a measurement.

Returns
[list] List of ContentGeometrySection

v23 Python API changes
New function added.