Skip to content

Commit

Permalink
Yeah, we can just delete decode
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Mar 5, 2024
1 parent ec3c6d8 commit d68fd1c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion av/stream.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ class Stream:
type: Literal["video", "audio", "data", "subtitle", "attachment"]

def encode(self, frame: Frame | None = None) -> list[Packet]: ...
def decode(self, packet: Packet | None = None) -> list[Frame]: ...
14 changes: 0 additions & 14 deletions av/stream.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -165,20 +165,6 @@ cdef class Stream:
packet.ptr.stream_index = self.ptr.index
return packets

def decode(self, packet=None):
"""
Decode a :class:`.Packet` and return a list of :class:`.AudioFrame`
or :class:`.VideoFrame`.
:return: :class:`list` of :class:`.Frame` subclasses.
.. seealso:: This is mostly a passthrough to :meth:`.CodecContext.decode`.
"""
if self.codec_context is None:
raise RuntimeError("Stream.decode requires a valid CodecContext")

return self.codec_context.decode(packet)

cdef _get_side_data(self, lib.AVStream *stream):
# Get DISPLAYMATRIX SideData from a lib.AVStream object.
# Returns: tuple[int, dict[str, Any]]
Expand Down

0 comments on commit d68fd1c

Please sign in to comment.