Skip to content

Commit

Permalink
Add docstrings for vpush and vpull
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Jun 28, 2024
1 parent c890636 commit 29fb3fd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions av/filter/graph.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ cdef class Graph:
ctx.push(frame)

def vpush(self, VideoFrame frame):
"""Like `push`, but only for VideoFrames."""
for ctx in self._context_by_type.get("buffer", []):
ctx.push(frame)

Expand All @@ -194,6 +195,7 @@ cdef class Graph:
return (vsinks or asinks)[0].pull()

def vpull(self):
"""Like `pull`, but only for VideoFrames."""
vsinks = self._context_by_type.get("buffersink", [])
nsinks = len(vsinks)
if nsinks != 1:
Expand Down

0 comments on commit 29fb3fd

Please sign in to comment.