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

#include <DataCacheCore.h>

Classes

struct  SContentInfo
 
struct  SPlayerAudioInfo
 
struct  SPlayerVideoInfo
 
struct  SRenderInfo
 
struct  SStateInfo
 
struct  STimeInfo
 

Public Member Functions

 CDataCacheCore ()
 
virtual ~CDataCacheCore ()
 
void Reset ()
 
bool HasAVInfoChanges ()
 
void SignalVideoInfoChange ()
 
void SignalAudioInfoChange ()
 
void SignalSubtitleInfoChange ()
 
void SetVideoDecoderName (std::string name, bool isHw)
 
std::string GetVideoDecoderName ()
 
bool IsVideoHwDecoder ()
 
void SetVideoDeintMethod (std::string method)
 
std::string GetVideoDeintMethod ()
 
void SetVideoPixelFormat (std::string pixFormat)
 
std::string GetVideoPixelFormat ()
 
void SetVideoStereoMode (std::string mode)
 
std::string GetVideoStereoMode ()
 
void SetVideoDimensions (int width, int height)
 
int GetVideoWidth ()
 
int GetVideoHeight ()
 
void SetVideoFps (float fps)
 
float GetVideoFps ()
 
void SetVideoDAR (float dar)
 
float GetVideoDAR ()
 
void SetVideoInterlaced (bool isInterlaced)
 Set if the video is interlaced in cache.
 
bool IsVideoInterlaced ()
 Check if the video is interlaced from cache.
 
void SetAudioDecoderName (std::string name)
 
std::string GetAudioDecoderName ()
 
void SetAudioChannels (std::string channels)
 
std::string GetAudioChannels ()
 
void SetAudioSampleRate (int sampleRate)
 
int GetAudioSampleRate ()
 
void SetAudioBitsPerSample (int bitsPerSample)
 
int GetAudioBitsPerSample ()
 
void SetEditList (const std::vector< EDL::Edit > &editList)
 Set the EDL edit list to cache.
 
const std::vector< EDL::Edit > & GetEditList () const
 Get the EDL edit list in cache.
 
void SetCuts (const std::vector< int64_t > &cuts)
 Set the list of cut markers in cache.
 
const std::vector< int64_t > & GetCuts () const
 Get the list of cut markers from cache.
 
void SetSceneMarkers (const std::vector< int64_t > &sceneMarkers)
 Set the list of scene markers in cache.
 
const std::vector< int64_t > & GetSceneMarkers () const
 Get the list of scene markers markers from cache.
 
void SetChapters (const std::vector< std::pair< std::string, int64_t > > &chapters)
 
const std::vector< std::pair< std::string, int64_t > > & GetChapters () const
 Get the chapter list in cache.
 
void SetRenderClockSync (bool enabled)
 
bool IsRenderClockSync ()
 
void SeekFinished (int64_t offset)
 Notifies the cache core that a seek operation has finished.
 
void SetStateSeeking (bool active)
 
bool IsSeeking ()
 
bool HasPerformedSeek (int64_t lastSecondInterval) const
 Checks if a seek has been performed in the last provided seconds interval.
 
int64_t GetSeekOffSet () const
 Gets the last seek offset.
 
void SetSpeed (float tempo, float speed)
 
float GetSpeed ()
 
float GetTempo ()
 
void SetFrameAdvance (bool fa)
 
bool IsFrameAdvance ()
 
bool IsPlayerStateChanged ()
 
void SetGuiRender (bool gui)
 
bool GetGuiRender ()
 
void SetVideoRender (bool video)
 
bool GetVideoRender ()
 
void SetPlayTimes (time_t start, int64_t current, int64_t min, int64_t max)
 
void GetPlayTimes (time_t &start, int64_t &current, int64_t &min, int64_t &max)
 
time_t GetStartTime ()
 Get the start time.
 
int64_t GetPlayTime ()
 Get the current time of playback.
 
float GetPlayPercentage ()
 Get the current percentage of playback if a playback buffer is available.
 
int64_t GetMinTime ()
 Get the minimum time.
 
int64_t GetMaxTime ()
 Get the maximum time.
 

Static Public Member Functions

static CDataCacheCoreGetInstance ()
 

Protected Attributes

std::atomic_bool m_hasAVInfoChanges = false
 
CCriticalSection m_videoPlayerSection
 
struct CDataCacheCore::SPlayerVideoInfo m_playerVideoInfo
 
CCriticalSection m_audioPlayerSection
 
struct CDataCacheCore::SPlayerAudioInfo m_playerAudioInfo
 
CCriticalSection m_contentSection
 
struct CDataCacheCore::SContentInfo m_contentInfo
 
CCriticalSection m_renderSection
 
struct CDataCacheCore::SRenderInfo m_renderInfo
 
CCriticalSection m_stateSection
 
bool m_playerStateChanged = false
 
struct CDataCacheCore::SStateInfo m_stateInfo
 
struct CDataCacheCore::STimeInfo m_timeInfo = {}
 

Constructor & Destructor Documentation

◆ CDataCacheCore()

CDataCacheCore::CDataCacheCore ( )

◆ ~CDataCacheCore()

CDataCacheCore::~CDataCacheCore ( )
virtualdefault

Member Function Documentation

◆ GetAudioBitsPerSample()

int CDataCacheCore::GetAudioBitsPerSample ( )

◆ GetAudioChannels()

std::string CDataCacheCore::GetAudioChannels ( )

◆ GetAudioDecoderName()

std::string CDataCacheCore::GetAudioDecoderName ( )

◆ GetAudioSampleRate()

int CDataCacheCore::GetAudioSampleRate ( )

◆ GetChapters()

const std::vector< std::pair< std::string, int64_t > > & CDataCacheCore::GetChapters ( ) const

Get the chapter list in cache.

Returns
The list of chapters or an empty vector if no chapters exist.

◆ GetCuts()

const std::vector< int64_t > & CDataCacheCore::GetCuts ( ) const

Get the list of cut markers from cache.

Returns
The list of cut markers or an empty vector if no cuts exist.

◆ GetEditList()

const std::vector< EDL::Edit > & CDataCacheCore::GetEditList ( ) const

Get the EDL edit list in cache.

Returns
The EDL edits or an empty vector if no edits exist.

◆ GetGuiRender()

bool CDataCacheCore::GetGuiRender ( )

◆ GetInstance()

CDataCacheCore & CDataCacheCore::GetInstance ( )
static

◆ GetMaxTime()

int64_t CDataCacheCore::GetMaxTime ( )

Get the maximum time.

This is the maximum time, in ms, that the player can skip forward. For a typical video, this will be the total length. For live TV without timeshift this is zero, and for live TV with timeshift this will be the buffer ahead.

◆ GetMinTime()

int64_t CDataCacheCore::GetMinTime ( )

Get the minimum time.

This will be zero for a typical video. With timeshift, this is the time, in ms, that the player can go back. This can be before the start time.

◆ GetPlayPercentage()

float CDataCacheCore::GetPlayPercentage ( )

Get the current percentage of playback if a playback buffer is available.

If there is no playback buffer, percentage will be 0.

◆ GetPlayTime()

int64_t CDataCacheCore::GetPlayTime ( )

Get the current time of playback.

This is the time elapsed, in ms, since the start time.

◆ GetPlayTimes()

void CDataCacheCore::GetPlayTimes ( time_t & start,
int64_t & current,
int64_t & min,
int64_t & max )

◆ GetSceneMarkers()

const std::vector< int64_t > & CDataCacheCore::GetSceneMarkers ( ) const

Get the list of scene markers markers from cache.

Returns
The list of scene markers or an empty vector if no scene exist.

◆ GetSeekOffSet()

int64_t CDataCacheCore::GetSeekOffSet ( ) const

Gets the last seek offset.

Returns
the last seek offset

◆ GetSpeed()

float CDataCacheCore::GetSpeed ( )

◆ GetStartTime()

time_t CDataCacheCore::GetStartTime ( )

Get the start time.

For a typical video this will be zero. For live TV, this is a reference time in units of time_t (UTC) from which time elapsed starts. Ideally this would be the start of the tv show but can be any other time as well.

◆ GetTempo()

float CDataCacheCore::GetTempo ( )

◆ GetVideoDAR()

float CDataCacheCore::GetVideoDAR ( )

◆ GetVideoDecoderName()

std::string CDataCacheCore::GetVideoDecoderName ( )

◆ GetVideoDeintMethod()

std::string CDataCacheCore::GetVideoDeintMethod ( )

◆ GetVideoFps()

float CDataCacheCore::GetVideoFps ( )

◆ GetVideoHeight()

int CDataCacheCore::GetVideoHeight ( )

◆ GetVideoPixelFormat()

std::string CDataCacheCore::GetVideoPixelFormat ( )

◆ GetVideoRender()

bool CDataCacheCore::GetVideoRender ( )

◆ GetVideoStereoMode()

std::string CDataCacheCore::GetVideoStereoMode ( )

◆ GetVideoWidth()

int CDataCacheCore::GetVideoWidth ( )

◆ HasAVInfoChanges()

bool CDataCacheCore::HasAVInfoChanges ( )

◆ HasPerformedSeek()

bool CDataCacheCore::HasPerformedSeek ( int64_t lastSecondInterval) const

Checks if a seek has been performed in the last provided seconds interval.

Parameters
lastSecondInterval- the last elapsed second interval to check for a seek operation
Returns
true if a seek was performed in the lastSecondInterval, false otherwise

◆ IsFrameAdvance()

bool CDataCacheCore::IsFrameAdvance ( )

◆ IsPlayerStateChanged()

bool CDataCacheCore::IsPlayerStateChanged ( )

◆ IsRenderClockSync()

bool CDataCacheCore::IsRenderClockSync ( )

◆ IsSeeking()

bool CDataCacheCore::IsSeeking ( )

◆ IsVideoHwDecoder()

bool CDataCacheCore::IsVideoHwDecoder ( )

◆ IsVideoInterlaced()

bool CDataCacheCore::IsVideoInterlaced ( )

Check if the video is interlaced from cache.

Returns
True if interlaced, otherwise false

◆ Reset()

void CDataCacheCore::Reset ( )

◆ SeekFinished()

void CDataCacheCore::SeekFinished ( int64_t offset)

Notifies the cache core that a seek operation has finished.

Parameters
offset- the seek offset

◆ SetAudioBitsPerSample()

void CDataCacheCore::SetAudioBitsPerSample ( int bitsPerSample)

◆ SetAudioChannels()

void CDataCacheCore::SetAudioChannels ( std::string channels)

◆ SetAudioDecoderName()

void CDataCacheCore::SetAudioDecoderName ( std::string name)

◆ SetAudioSampleRate()

void CDataCacheCore::SetAudioSampleRate ( int sampleRate)

◆ SetChapters()

void CDataCacheCore::SetChapters ( const std::vector< std::pair< std::string, int64_t > > & chapters)

◆ SetCuts()

void CDataCacheCore::SetCuts ( const std::vector< int64_t > & cuts)

Set the list of cut markers in cache.

Returns
The list of cuts or an empty list if no cuts exist

◆ SetEditList()

void CDataCacheCore::SetEditList ( const std::vector< EDL::Edit > & editList)

Set the EDL edit list to cache.

Parameters
editListThe vector of edits to fill.

◆ SetFrameAdvance()

void CDataCacheCore::SetFrameAdvance ( bool fa)

◆ SetGuiRender()

void CDataCacheCore::SetGuiRender ( bool gui)

◆ SetPlayTimes()

void CDataCacheCore::SetPlayTimes ( time_t start,
int64_t current,
int64_t min,
int64_t max )

◆ SetRenderClockSync()

void CDataCacheCore::SetRenderClockSync ( bool enabled)

◆ SetSceneMarkers()

void CDataCacheCore::SetSceneMarkers ( const std::vector< int64_t > & sceneMarkers)

Set the list of scene markers in cache.

Returns
The list of scene markers or an empty list if no scene markers exist

◆ SetSpeed()

void CDataCacheCore::SetSpeed ( float tempo,
float speed )

◆ SetStateSeeking()

void CDataCacheCore::SetStateSeeking ( bool active)

◆ SetVideoDAR()

void CDataCacheCore::SetVideoDAR ( float dar)

◆ SetVideoDecoderName()

void CDataCacheCore::SetVideoDecoderName ( std::string name,
bool isHw )

◆ SetVideoDeintMethod()

void CDataCacheCore::SetVideoDeintMethod ( std::string method)

◆ SetVideoDimensions()

void CDataCacheCore::SetVideoDimensions ( int width,
int height )

◆ SetVideoFps()

void CDataCacheCore::SetVideoFps ( float fps)

◆ SetVideoInterlaced()

void CDataCacheCore::SetVideoInterlaced ( bool isInterlaced)

Set if the video is interlaced in cache.

Parameters
isInterlacedSet true when the video is interlaced

◆ SetVideoPixelFormat()

void CDataCacheCore::SetVideoPixelFormat ( std::string pixFormat)

◆ SetVideoRender()

void CDataCacheCore::SetVideoRender ( bool video)

◆ SetVideoStereoMode()

void CDataCacheCore::SetVideoStereoMode ( std::string mode)

◆ SignalAudioInfoChange()

void CDataCacheCore::SignalAudioInfoChange ( )

◆ SignalSubtitleInfoChange()

void CDataCacheCore::SignalSubtitleInfoChange ( )

◆ SignalVideoInfoChange()

void CDataCacheCore::SignalVideoInfoChange ( )

Member Data Documentation

◆ m_audioPlayerSection

CCriticalSection CDataCacheCore::m_audioPlayerSection
protected

◆ m_contentInfo

struct CDataCacheCore::SContentInfo CDataCacheCore::m_contentInfo
protected

◆ m_contentSection

CCriticalSection CDataCacheCore::m_contentSection
mutableprotected

◆ m_hasAVInfoChanges

std::atomic_bool CDataCacheCore::m_hasAVInfoChanges = false
protected

◆ m_playerAudioInfo

struct CDataCacheCore::SPlayerAudioInfo CDataCacheCore::m_playerAudioInfo
protected

◆ m_playerStateChanged

bool CDataCacheCore::m_playerStateChanged = false
protected

◆ m_playerVideoInfo

struct CDataCacheCore::SPlayerVideoInfo CDataCacheCore::m_playerVideoInfo
protected

◆ m_renderInfo

struct CDataCacheCore::SRenderInfo CDataCacheCore::m_renderInfo
protected

◆ m_renderSection

CCriticalSection CDataCacheCore::m_renderSection
protected

◆ m_stateInfo

struct CDataCacheCore::SStateInfo CDataCacheCore::m_stateInfo
protected

◆ m_stateSection

CCriticalSection CDataCacheCore::m_stateSection
mutableprotected

◆ m_timeInfo

struct CDataCacheCore::STimeInfo CDataCacheCore::m_timeInfo = {}
protected

◆ m_videoPlayerSection

CCriticalSection CDataCacheCore::m_videoPlayerSection
protected

The documentation for this class was generated from the following files: