Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
DRMPRIME Namespace Reference

Classes

class  CDmaBufIdentityCache
 Ioctl-free bookkeeping for one caller-owned kernel object per dma-buf identity. More...
 
struct  DmaBufIdentity
 Identifies a frame's memory and layout across file descriptor reuse. More...
 

Typedefs

using StatInodeFn = std::function<bool(int fd, uint64_t& inode)>
 Writes the dma-buf inode for fd; false on failure.
 

Functions

bool StatInode (int fd, uint64_t &inode)
 
std::optional< DmaBufIdentityGetDmaBufIdentity (const AVDRMFrameDescriptor *descriptor, uint32_t width, uint32_t height)
 Identity of descriptor layer[0] only; nbLayers is keyed, layers 1+ are not inspected: a consumer that reads layers 1+ must not key on this identity. Returns nullopt for a missing or malformed descriptor or an unreadable inode.
 
std::optional< DmaBufIdentityGetDmaBufIdentity (const AVDRMFrameDescriptor *descriptor, uint32_t width, uint32_t height, const StatInodeFn &statInode)
 Test seam: same, with an injectable stat function.
 
std::string GetColorEncoding (const VideoPicture &picture)
 
std::string GetColorRange (const VideoPicture &picture)
 

Typedef Documentation

◆ StatInodeFn

using DRMPRIME::StatInodeFn = std::function<bool(int fd, uint64_t& inode)>

Writes the dma-buf inode for fd; false on failure.

Function Documentation

◆ GetColorEncoding()

std::string DRMPRIME::GetColorEncoding ( const VideoPicture & picture)

◆ GetColorRange()

std::string DRMPRIME::GetColorRange ( const VideoPicture & picture)

◆ GetDmaBufIdentity() [1/2]

std::optional< DmaBufIdentity > DRMPRIME::GetDmaBufIdentity ( const AVDRMFrameDescriptor * descriptor,
uint32_t width,
uint32_t height )

Identity of descriptor layer[0] only; nbLayers is keyed, layers 1+ are not inspected: a consumer that reads layers 1+ must not key on this identity. Returns nullopt for a missing or malformed descriptor or an unreadable inode.

◆ GetDmaBufIdentity() [2/2]

std::optional< DmaBufIdentity > DRMPRIME::GetDmaBufIdentity ( const AVDRMFrameDescriptor * descriptor,
uint32_t width,
uint32_t height,
const StatInodeFn & statInode )

Test seam: same, with an injectable stat function.

◆ StatInode()

bool DRMPRIME::StatInode ( int fd,
uint64_t & inode )