Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
ContentGeometryScanner.cpp File Reference
#include "ContentGeometryScanner.h"
#include "FileItem.h"
#include "ServiceBroker.h"
#include "URL.h"
#include "cores/VideoPlayer/VideoFileGeometry.h"
#include "cores/VideoSettings.h"
#include "dialogs/GUIDialogBusy.h"
#include "jobs/JobManager.h"
#include "threads/Event.h"
#include "utils/URIUtils.h"
#include "utils/log.h"
#include "video/VideoDatabase.h"
#include "video/VideoFileItemClassify.h"
#include "video/geometry/GeometrySettings.h"
#include "video/geometry/SampledGeometry.h"
#include "video/jobs/VideoLibraryContentGeometryJob.h"
#include "video/jobs/VideoLibraryJob.h"
#include <atomic>
#include <chrono>
#include <memory>
#include <mutex>
#include <utility>

Namespaces

namespace  KODI
 
namespace  KODI::VIDEO
 
namespace  KODI::VIDEO::GEOMETRY
 

Functions

std::optional< FileIdentity > KODI::VIDEO::GEOMETRY::MeasurableIdentity (const CFileItem &item)
 The identity to measure item under. Nothing when the extractors' policy refuses it, it is a stack, or its size and time cannot be read.
 
std::optional< ContentGeometryRecord > KODI::VIDEO::GEOMETRY::MeasureContentGeometry (const CFileItem &item, const FileIdentity &identity, SamplingDepth depth=SamplingDepth::Normal, const std::function< bool()> &cancelled={})
 Sample item and produce the row to store. Nothing when sampling was abandoned; a file that could not be read gives a record with no ratios.
 
void KODI::VIDEO::GEOMETRY::MeasureContentGeometryBeforePlaybackBlocking (const CFileItem &item)
 Measure the file item plays, unless something already has, and store it, under the busy dialog. Blocks, so the rectangle is known before the first frame. Skips a file with a declared ratio. Video items only; backing out abandons the measurement and starts the film, as does a measurement that has not finished within its limit.
 
bool KODI::VIDEO::GEOMETRY::RemeasureContentGeometry (const CFileItem &item, SamplingDepth depth=SamplingDepth::Normal, const std::function< bool()> &cancelled={})
 Measure item again and replace what is stored, without asking whether the work is needed, and even where a ratio is declared. False when the item cannot be measured at all.
 

Variable Documentation

◆ cancelled

std::atomic<bool> cancelled {false}

◆ done

CEvent done

◆ identity

FileIdentity identity

◆ idFile

int idFile {-1}

◆ item

const CFileItem item