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

#include <Edl.h>

Public Member Functions

 CEdl ()
 
bool ReadEditDecisionLists (const CFileItem &fileItem, float fps)
 
void Clear ()
 
bool HasEdits () const
 Check if there are any parsed edits in EDL for the current item.
 
bool HasCuts () const
 Check if the edit list has EDL cuts (edits with action CUT)
 
bool HasSceneMarker () const
 
std::chrono::milliseconds GetTotalCutTime () const
 Get the total cut time removed from the original item because of EDL cuts.
 
std::chrono::milliseconds GetTimeWithoutCuts (std::chrono::milliseconds seekTime) const
 Providing a given seek time, return the actual time without considering cut ranges removed from the file.
 
std::chrono::milliseconds GetTimeAfterRestoringCuts (std::chrono::milliseconds seekTime) const
 Provided a given seek time, return the time after correction with the addition of the already surpassed EDL cut ranges.
 
const std::vector< EDL::Edit > & GetRawEditList () const
 Get the raw EDL edit list.
 
const std::vector< EDL::EditGetEditList () const
 Get the EDL edit list.
 
const std::vector< std::chrono::milliseconds > GetCutMarkers () const
 Get the list of EDL cut markers.
 
const std::vector< std::chrono::milliseconds > GetSceneMarkers () const
 Get the list of EDL scene markers.
 
std::optional< std::unique_ptr< EDL::Edit > > InEdit (std::chrono::milliseconds seekTime)
 Check if for the provided seek time is contained within an EDL edit.
 
std::optional< std::chrono::milliseconds > GetLastEditTime () const
 Get the last processed edit time (set during playback when a given edit is surpassed)
 
void SetLastEditTime (std::chrono::milliseconds editTime)
 Set the last processed edit time (set during playback when a given edit is surpassed)
 
void ResetLastEditTime ()
 Reset the last recorded edit time (nullopt)
 
void SetLastEditActionType (EDL::Action action)
 Set the last processed edit action type.
 
EDL::Action GetLastEditActionType () const
 Get the last processed edit action type (set during playback when a given edit is surpassed)
 
std::optional< std::chrono::milliseconds > GetNextSceneMarker (Direction direction, std::chrono::milliseconds clockTime)
 Get the next scene marker with respect to the provided clock time.
 

Constructor & Destructor Documentation

◆ CEdl()

CEdl::CEdl ( )

Member Function Documentation

◆ Clear()

void CEdl::Clear ( )

◆ GetCutMarkers()

const std::vector< std::chrono::milliseconds > CEdl::GetCutMarkers ( ) const

Get the list of EDL cut markers.

Returns
The list of EDL cut markers or an empty vector if no EDL cuts exist. The returned values are accurate with respect to cut durations. I.e. if the file has multiple cuts, the positions of subsquent cuts are automatically corrected by substracting the previous cut durations.

◆ GetEditList()

const std::vector< EDL::Edit > CEdl::GetEditList ( ) const

Get the EDL edit list.

Returns
The EDL edits or an empty vector if no edits exist. Edits are provided with respect to the actual timeline, i.e. considering EDL cuts are not part of the media item.

◆ GetLastEditActionType()

EDL::Action CEdl::GetLastEditActionType ( ) const

Get the last processed edit action type (set during playback when a given edit is surpassed)

Returns
The last processed edit action type or -1 if not any

◆ GetLastEditTime()

std::optional< std::chrono::milliseconds > CEdl::GetLastEditTime ( ) const

Get the last processed edit time (set during playback when a given edit is surpassed)

Returns
The last processed edit time or nullopt if not any

◆ GetNextSceneMarker()

std::optional< std::chrono::milliseconds > CEdl::GetNextSceneMarker ( Direction direction,
std::chrono::milliseconds clockTime )

Get the next scene marker with respect to the provided clock time.

Parameters
direction(the direction of the search - backward or forward)
clockthe current position of the clock
Returns
the position of the scenemarker (nullopt if none)

◆ GetRawEditList()

const std::vector< EDL::Edit > & CEdl::GetRawEditList ( ) const
inline

Get the raw EDL edit list.

Returns
The EDL edits or an empty vector if no edits exist. Edits are provided with respect to the original media item timeline.

◆ GetSceneMarkers()

const std::vector< std::chrono::milliseconds > CEdl::GetSceneMarkers ( ) const

Get the list of EDL scene markers.

Returns
The list of EDL scene markers or an empty vector if no EDL scene exist. The returned values are accurate with respect to cut durations. I.e. if the file has multiple cuts, the positions of scene markers are automatically corrected by substracting the surpassed cut durations until the scene marker point.

◆ GetTimeAfterRestoringCuts()

std::chrono::milliseconds CEdl::GetTimeAfterRestoringCuts ( std::chrono::milliseconds seekTime) const

Provided a given seek time, return the time after correction with the addition of the already surpassed EDL cut ranges.

Note
VideoPlayer uses it to restore the correct time after seek since cut blocks are not part of the playable file
Parameters
seekthe desired seek time
Returns
the seek time after applying the cut blocks already surpassed by the provided seek time

◆ GetTimeWithoutCuts()

std::chrono::milliseconds CEdl::GetTimeWithoutCuts ( std::chrono::milliseconds seekTime) const

Providing a given seek time, return the actual time without considering cut ranges removed from the file.

Note
VideoPlayer always displays/returns the playback time considering cut blocks are not part of the playable file
Parameters
seekthe desired seek time
Returns
the seek time without considering EDL cut blocks

◆ GetTotalCutTime()

std::chrono::milliseconds CEdl::GetTotalCutTime ( ) const

Get the total cut time removed from the original item because of EDL cuts.

Returns
the total cut time

◆ HasCuts()

bool CEdl::HasCuts ( ) const

Check if the edit list has EDL cuts (edits with action CUT)

Returns
true if EDL has cuts, false otherwise

◆ HasEdits()

bool CEdl::HasEdits ( ) const

Check if there are any parsed edits in EDL for the current item.

Returns
true if EDL has edits, false otherwise

◆ HasSceneMarker()

bool CEdl::HasSceneMarker ( ) const

◆ InEdit()

std::optional< std::unique_ptr< EDL::Edit > > CEdl::InEdit ( std::chrono::milliseconds seekTime)

Check if for the provided seek time is contained within an EDL edit.

Note
seek time refers to the time in the original file timeline (i.e. without considering cut blocks)
Parameters
seekTimeThe seek time (on the original timeline)
Returns
a pointer to the edit struct if seekTime is within an edit, nullopt otherwise

◆ ReadEditDecisionLists()

bool CEdl::ReadEditDecisionLists ( const CFileItem & fileItem,
float fps )

◆ ResetLastEditTime()

void CEdl::ResetLastEditTime ( )

Reset the last recorded edit time (nullopt)

◆ SetLastEditActionType()

void CEdl::SetLastEditActionType ( EDL::Action action)

Set the last processed edit action type.

Parameters
actionThe action type (e.g. COMM_BREAK)

◆ SetLastEditTime()

void CEdl::SetLastEditTime ( std::chrono::milliseconds editTime)

Set the last processed edit time (set during playback when a given edit is surpassed)

Parameters
editTimeThe last processed EDL edit time

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