mirror of
https://github.com/iluvcapra/ptulsconv.git
synced 2025-12-31 08:50:48 +00:00
Added some documentation
This commit is contained in:
@@ -20,6 +20,9 @@ class SessionDescriptor:
|
|||||||
self.markers = kwargs['markers']
|
self.markers = kwargs['markers']
|
||||||
|
|
||||||
def markers_timed(self) -> Iterator[Tuple['MarkerDescriptor', Fraction]]:
|
def markers_timed(self) -> Iterator[Tuple['MarkerDescriptor', Fraction]]:
|
||||||
|
"""
|
||||||
|
Iterate each marker in the session with its respective time reference.
|
||||||
|
"""
|
||||||
for marker in self.markers:
|
for marker in self.markers:
|
||||||
marker_time = Fraction(marker.time_reference,
|
marker_time = Fraction(marker.time_reference,
|
||||||
int(self.header.sample_rate))
|
int(self.header.sample_rate))
|
||||||
@@ -28,6 +31,9 @@ class SessionDescriptor:
|
|||||||
|
|
||||||
def tracks_clips(self) -> Iterator[Tuple['TrackDescriptor',
|
def tracks_clips(self) -> Iterator[Tuple['TrackDescriptor',
|
||||||
'TrackClipDescriptor']]:
|
'TrackClipDescriptor']]:
|
||||||
|
"""
|
||||||
|
Iterate each track clip with its respective owning clip.
|
||||||
|
"""
|
||||||
for track in self.tracks:
|
for track in self.tracks:
|
||||||
for clip in track.clips:
|
for clip in track.clips:
|
||||||
yield track, clip
|
yield track, clip
|
||||||
@@ -37,7 +43,10 @@ class SessionDescriptor:
|
|||||||
Fraction, Fraction, Fraction]
|
Fraction, Fraction, Fraction]
|
||||||
]:
|
]:
|
||||||
"""
|
"""
|
||||||
:return: A Generator that yields track, clip, start time, finish time,
|
Iterate each track clip with its respective owning clip and timing
|
||||||
|
information.
|
||||||
|
|
||||||
|
:returns: A Generator that yields track, clip, start time, finish time,
|
||||||
and timestamp
|
and timestamp
|
||||||
"""
|
"""
|
||||||
for track, clip in self.tracks_clips():
|
for track, clip in self.tracks_clips():
|
||||||
|
|||||||
Reference in New Issue
Block a user