Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
ContentGeometry

Where the picture is inside the frame carrying it. More...

Classes

class  XBMCAddon::xbmc::ContentGeometry
 

Functions

 XBMCAddon::xbmc::ContentGeometry::getX ()
 

Function: getX()


Get the left edge of the picture, in display space.
 
 XBMCAddon::xbmc::ContentGeometry::getY ()
 

Function: getY()


Get the top edge of the picture, in display space.
 
 XBMCAddon::xbmc::ContentGeometry::getWidth ()
 

Function: getWidth()


Get the width of the picture, in display space.
 
 XBMCAddon::xbmc::ContentGeometry::getHeight ()
 

Function: getHeight()


Get the height of the picture, in display space.
 
 XBMCAddon::xbmc::ContentGeometry::getFrameWidth ()
 

Function: getFrameWidth()


Get the width of the whole frame the picture sits in, in display space.
 
 XBMCAddon::xbmc::ContentGeometry::getFrameHeight ()
 

Function: getFrameHeight()


Get the height of the whole frame the picture sits in, in display space.
 
 XBMCAddon::xbmc::ContentGeometry::getCodedWidth ()
 

Function: getCodedWidth()


Get the width of the coded frame, before pixel aspect correction and before rotation.
 
 XBMCAddon::xbmc::ContentGeometry::getCodedHeight ()
 

Function: getCodedHeight()


Get the height of the coded frame, before pixel aspect correction and before rotation.
 
 XBMCAddon::xbmc::ContentGeometry::getPixelAspect ()
 

Function: getPixelAspect()


Get the width of a coded pixel in display pixels. One for content with no anamorphic coding.
 
 XBMCAddon::xbmc::ContentGeometry::getOrientation ()
 

Function: getOrientation()


Get the clockwise rotation applied to the picture for display, in degrees.
 
 XBMCAddon::xbmc::ContentGeometry::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.
 
 XBMCAddon::xbmc::ContentGeometry::getLabel ()
 

Function: getLabel()


Get the ratio as Kodi writes it, e.g. 2.35.
 
 XBMCAddon::xbmc::ContentGeometry::getName ()
 

Function: getName()


Get what the ratio is called, e.g. Scope. Empty when it has no name. Not translated.
 
 XBMCAddon::xbmc::ContentGeometry::getSource ()
 

Function: getSource()


Get where the answer came from.
 
 XBMCAddon::xbmc::ContentGeometry::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().
 
 XBMCAddon::xbmc::ContentGeometry::getStale ()
 

Function: getStale()


Whether the measurement came from a superseded detector, and is served rather than discarded.
 
 XBMCAddon::xbmc::ContentGeometry::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.
 
 XBMCAddon::xbmc::ContentGeometry::getSections ()
 

Function: getSections()


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

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

◆ getAspect()

XBMCAddon::xbmc::ContentGeometry::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.

◆ getCodedHeight()

XBMCAddon::xbmc::ContentGeometry::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.

◆ getCodedWidth()

XBMCAddon::xbmc::ContentGeometry::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.

◆ getFrameHeight()

XBMCAddon::xbmc::ContentGeometry::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.

◆ getFrameWidth()

XBMCAddon::xbmc::ContentGeometry::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.

◆ getHeight()

XBMCAddon::xbmc::ContentGeometry::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.

◆ getLabel()

XBMCAddon::xbmc::ContentGeometry::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()

XBMCAddon::xbmc::ContentGeometry::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.

◆ getOrientation()

XBMCAddon::xbmc::ContentGeometry::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.

◆ getPixelAspect()

XBMCAddon::xbmc::ContentGeometry::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.

◆ getRejected()

XBMCAddon::xbmc::ContentGeometry::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()

std::vector< ContentGeometrySection * > XBMCAddon::xbmc::ContentGeometry::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.

◆ getSource()

XBMCAddon::xbmc::ContentGeometry::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.

◆ getStale()

XBMCAddon::xbmc::ContentGeometry::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.

◆ getVaries()

XBMCAddon::xbmc::ContentGeometry::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.

◆ getWidth()

XBMCAddon::xbmc::ContentGeometry::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.

◆ getX()

XBMCAddon::xbmc::ContentGeometry::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()

XBMCAddon::xbmc::ContentGeometry::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.