C# Class Vidka.Core.Model.VidkaProjExtensions

显示文件 Open project: miktemk/VidkaEditor

Public Methods

Method Description
Crop ( this proj, long frameStart, long framesLength, int newW = null, int newH = null, bool onlyLockedClips = false ) : VidkaProj
FilenameToVarName ( this filename ) : string
FrameToSec ( this proj, long frame ) : double
GetNextLockedVideoClipStartingAtIndex ( this proj, int index, int &newIndex ) : VidkaClipVideoAbstract

returns clip at index, if it is locked, and, if not, looks for the next clip returns null if index is out of bounds

GetTotalLengthOfAudioClipsFrame ( this proj ) : long

used in ProjectDimensions.recalculateProjectWidth.

GetTotalLengthOfVideoClipsFrame ( this proj ) : long

used in ProjectDimensions.recalculateProjectWidth. The other part of this calculation is GetTotalLengthOfAudioClipsSec

GetVideoClipAbsFramePositionLeft ( this proj, VidkaClipVideoAbstract clip ) : long

The inverse of GetVideoClipIndexAtFrame. Instead returns the frame of the clip (left side) within project absolute frame space. Returns -1 if the clip is not even in the project

GetVideoClipAtIndex ( this proj, int index ) : VidkaClipVideoAbstract

returns null if index is out of bounds

GetVideoClipAtIndexForce ( this proj, int index ) : VidkaClipVideoAbstract

returns either the first or last clip if index is out of bounds respectively. If there are no clips at all, returns null

GetVideoClipIndexAtFrame ( this proj, long curFrame, long &frameOffset ) : int

Returns index of the clip under the given frame (curFrame) and also how far into the clip, the marker is (out frameOffset). NOTE: frameOffset is relative to beginning of the video file, not to clip.FrameStart! If curFrame is not on any of the clips -1 is returned

GetVideoClipIndexAtFrame_forceOnLastClip ( this proj, long curFrame, long &frameOffset ) : int

Returns same thing as GetVideoClipIndexAtFrame, except when the marker is too far out, it returns the last clip's index and frameOffset = clip.FrameEnd (again, relative to start of file) If there are no clips at all, returns -1 and frameOffset is 0

GetVideoClipsForRendering ( this proj ) : RenderableProject
HowMuchCanBeEased ( this clip, TrimDirection side, long delta ) : long
HowMuchCanBeTrimmed ( this clip, TrimDirection side, long delta ) : long

Returns what the delta should be not to violate the trimming of this clip

RenderBreakupsCount ( this proj ) : int
RenderBreakupsSplitIntoSubProjects ( this proj ) : Vidka.Core.Model.VidkaProj[]
SecToFrame ( this proj, double sec ) : int
SecToFrameDouble ( this proj, double sec ) : double
cxzxc ( this clip ) : string

Debug description

Private Methods

Method Description
GetRenderableTypeOfClip ( VidkaClipVideoAbstract clip ) : VideoClipRenderableType
GetRenderableVideoFileType ( VidkaClipVideoAbstract vclip ) : RenderableMediaFileType

Method Details

Crop() public static method

public static Crop ( this proj, long frameStart, long framesLength, int newW = null, int newH = null, bool onlyLockedClips = false ) : VidkaProj
proj this
frameStart long
framesLength long
newW int
newH int
onlyLockedClips bool
return VidkaProj

FilenameToVarName() public static method

public static FilenameToVarName ( this filename ) : string
filename this
return string

FrameToSec() public static method

public static FrameToSec ( this proj, long frame ) : double
proj this
frame long
return double

GetNextLockedVideoClipStartingAtIndex() public static method

returns clip at index, if it is locked, and, if not, looks for the next clip returns null if index is out of bounds
public static GetNextLockedVideoClipStartingAtIndex ( this proj, int index, int &newIndex ) : VidkaClipVideoAbstract
proj this
index int
newIndex int
return VidkaClipVideoAbstract

GetTotalLengthOfAudioClipsFrame() public static method

used in ProjectDimensions.recalculateProjectWidth.
public static GetTotalLengthOfAudioClipsFrame ( this proj ) : long
proj this
return long

GetTotalLengthOfVideoClipsFrame() public static method

used in ProjectDimensions.recalculateProjectWidth. The other part of this calculation is GetTotalLengthOfAudioClipsSec
public static GetTotalLengthOfVideoClipsFrame ( this proj ) : long
proj this
return long

GetVideoClipAbsFramePositionLeft() public static method

The inverse of GetVideoClipIndexAtFrame. Instead returns the frame of the clip (left side) within project absolute frame space. Returns -1 if the clip is not even in the project
public static GetVideoClipAbsFramePositionLeft ( this proj, VidkaClipVideoAbstract clip ) : long
proj this
clip VidkaClipVideoAbstract
return long

GetVideoClipAtIndex() public static method

returns null if index is out of bounds
public static GetVideoClipAtIndex ( this proj, int index ) : VidkaClipVideoAbstract
proj this
index int
return VidkaClipVideoAbstract

GetVideoClipAtIndexForce() public static method

returns either the first or last clip if index is out of bounds respectively. If there are no clips at all, returns null
public static GetVideoClipAtIndexForce ( this proj, int index ) : VidkaClipVideoAbstract
proj this
index int
return VidkaClipVideoAbstract

GetVideoClipIndexAtFrame() public static method

Returns index of the clip under the given frame (curFrame) and also how far into the clip, the marker is (out frameOffset). NOTE: frameOffset is relative to beginning of the video file, not to clip.FrameStart! If curFrame is not on any of the clips -1 is returned
public static GetVideoClipIndexAtFrame ( this proj, long curFrame, long &frameOffset ) : int
proj this
curFrame long
frameOffset long
return int

GetVideoClipIndexAtFrame_forceOnLastClip() public static method

Returns same thing as GetVideoClipIndexAtFrame, except when the marker is too far out, it returns the last clip's index and frameOffset = clip.FrameEnd (again, relative to start of file) If there are no clips at all, returns -1 and frameOffset is 0
public static GetVideoClipIndexAtFrame_forceOnLastClip ( this proj, long curFrame, long &frameOffset ) : int
proj this
curFrame long
frameOffset long
return int

GetVideoClipsForRendering() public static method

public static GetVideoClipsForRendering ( this proj ) : RenderableProject
proj this
return RenderableProject

HowMuchCanBeEased() public static method

public static HowMuchCanBeEased ( this clip, TrimDirection side, long delta ) : long
clip this
side TrimDirection
delta long
return long

HowMuchCanBeTrimmed() public static method

Returns what the delta should be not to violate the trimming of this clip
public static HowMuchCanBeTrimmed ( this clip, TrimDirection side, long delta ) : long
clip this
side TrimDirection
delta long
return long

RenderBreakupsCount() public static method

public static RenderBreakupsCount ( this proj ) : int
proj this
return int

RenderBreakupsSplitIntoSubProjects() public static method

public static RenderBreakupsSplitIntoSubProjects ( this proj ) : Vidka.Core.Model.VidkaProj[]
proj this
return Vidka.Core.Model.VidkaProj[]

SecToFrame() public static method

public static SecToFrame ( this proj, double sec ) : int
proj this
sec double
return int

SecToFrameDouble() public static method

public static SecToFrameDouble ( this proj, double sec ) : double
proj this
sec double
return double

cxzxc() public static method

Debug description
public static cxzxc ( this clip ) : string
clip this
return string