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, const float fFramesPerSecond)
 
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
 
int GetTotalCutTime () const
 Get the total cut time removed from the original item because of EDL cuts.
 
int GetTimeWithoutCuts (int seek) const
 Providing a given seek time, return the actual time without considering cut ranges removed from the file.
 
double GetTimeAfterRestoringCuts (double seek) 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< int64_tGetCutMarkers () const
 Get the list of EDL cut markers.
 
const std::vector< int64_tGetSceneMarkers () const
 Get the list of EDL scene markers.
 
bool InEdit (int iSeek, EDL::Edit *pEdit=nullptr)
 Check if for the provided seek time is contained within an EDL edit and fill pEdit with the respective edit struct.
 
int GetLastEditTime () const
 Get the last processed edit time (set during playback when a given edit is surpassed)
 
void SetLastEditTime (int editTime)
 Set the last processed edit time (set during playback when a given edit is surpassed)
 
void ResetLastEditTime ()
 Reset the last recorded edit time (-1)
 
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)
 
bool GetNextSceneMarker (bool bPlus, const int iClock, int *iSceneMarker)
 

Static Public Member Functions

static std::string MillisecondsToTimeString (const int iMilliseconds)
 

Constructor & Destructor Documentation

◆ CEdl()

CEdl::CEdl ( )

Member Function Documentation

◆ Clear()

void CEdl::Clear ( )

◆ GetCutMarkers()

const std::vector< int64_t > 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()

int CEdl::GetLastEditTime ( ) const

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

Returns
The last processed edit time (ms) or -1 if not any

◆ GetNextSceneMarker()

bool CEdl::GetNextSceneMarker ( bool bPlus,
const int iClock,
int * iSceneMarker )

◆ 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< int64_t > 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()

double CEdl::GetTimeAfterRestoringCuts ( double seek) 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()

int CEdl::GetTimeWithoutCuts ( int seek) 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()

int 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()

bool CEdl::InEdit ( int iSeek,
EDL::Edit * pEdit = nullptr )

Check if for the provided seek time is contained within an EDL edit and fill pEdit with the respective edit struct.

Note
seek time refers to the time in the original file timeline (i.e. without considering cut blocks)
Parameters
iSeekThe seek time (on the original timeline)
[in,out]pEditThe edit pointer (or nullptr if iSeek not within an edit)
Returns
true if iSeek is within an edit, false otherwise

◆ MillisecondsToTimeString()

std::string CEdl::MillisecondsToTimeString ( const int iMilliseconds)
static

◆ ReadEditDecisionLists()

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

◆ ResetLastEditTime()

void CEdl::ResetLastEditTime ( )

Reset the last recorded edit time (-1)

◆ 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 ( int editTime)

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

Parameters
editTimeThe last processed EDL edit time (ms)

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