Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
UTILS::DISCS Namespace Reference

Classes

struct  DiscInfo
 Abstracts the info the app knows about a disc (type, name, serial) More...
 

Enumerations

enum class  DiscType { UNKNOWN , DVD , BLURAY }
 Abstracts a disc type. More...
 

Functions

bool GetDiscInfo (DiscInfo &info, const std::string &mediaPath)
 Try to obtain the disc info (type, name, serial) of a given media path.
 
DiscInfo ProbeDVDDiscInfo (const std::string &mediaPath)
 Try to probe the provided media path as a DVD.
 
DiscInfo ProbeBlurayDiscInfo (const std::string &mediaPath)
 Try to probe the provided media path as a Bluray.
 
bool IsBlurayDiscImage (const CFileItem &item)
 Probe a FileItem to see it is a bluray disc image.
 
bool IsBlurayDiscImage (const std::string &path)
 Probe a FileItem to see it is a bluray disc image.
 

Enumeration Type Documentation

◆ DiscType

enum class UTILS::DISCS::DiscType
strong

Abstracts a disc type.

Enumerator
UNKNOWN 

the default value, the application doesn't know what the device is

DVD 

dvd disc

BLURAY 

blu-ray disc

Function Documentation

◆ GetDiscInfo()

bool UTILS::DISCS::GetDiscInfo ( DiscInfo & info,
const std::string & mediaPath )

Try to obtain the disc info (type, name, serial) of a given media path.

Parameters
[in,out]infoThe disc info struct
mediaPathThe disc mediapath (e.g. /dev/cdrom, D\://, etc)
Returns
true if getting the disc info was successful
Todo
it's wrong to include videoplayer scoped files, refactor

◆ IsBlurayDiscImage() [1/2]

bool UTILS::DISCS::IsBlurayDiscImage ( const CFileItem & item)

Probe a FileItem to see it is a bluray disc image.

Parameters
itemThe FileItem to probe
Returns
true if the item is a bluray disc image, false otherwise

◆ IsBlurayDiscImage() [2/2]

bool UTILS::DISCS::IsBlurayDiscImage ( const std::string & path)

Probe a FileItem to see it is a bluray disc image.

Parameters
pathThe path to probe
Returns
true if the item is a bluray disc image, false otherwise

◆ ProbeBlurayDiscInfo()

UTILS::DISCS::DiscInfo UTILS::DISCS::ProbeBlurayDiscInfo ( const std::string & mediaPath)

Try to probe the provided media path as a Bluray.

Parameters
mediaPathThe disc mediapath (e.g. /dev/cdrom, D\://, etc)
Returns
the DiscInfo for the given media path (might be an empty struct)

◆ ProbeDVDDiscInfo()

UTILS::DISCS::DiscInfo UTILS::DISCS::ProbeDVDDiscInfo ( const std::string & mediaPath)

Try to probe the provided media path as a DVD.

Parameters
mediaPathThe disc mediapath (e.g. /dev/cdrom, D\://, etc)
Returns
the DiscInfo for the given media path (might be an empty struct)