Skip to content

Commit

Permalink
Remove encode and decode for DataStream
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Mar 25, 2024
1 parent 1dfe776 commit 43ed7a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
3 changes: 1 addition & 2 deletions av/data/stream.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ from av.packet import Packet
from av.stream import Stream

class DataStream(Stream):
def encode(self, frame: Frame | None = None) -> list[Packet]: ...
def decode(self, packet: Packet | None = None, count: int = 0) -> list[Frame]: ...
name: str | None
11 changes: 1 addition & 10 deletions av/data/stream.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,10 @@ cimport libav as lib
cdef class DataStream(Stream):
def __repr__(self):
return (
f"<av.{self.__class__.__name__} #{self.index} {self.type or '<notype>'}/"
f"<av.{self.__class__.__name__} #{self.index} data/"
f"{self.name or '<nocodec>'} at 0x{id(self):x}>"
)

def __getattr__(self, name):
return getattr(self.codec_context, name)

def encode(self, frame=None):
return []

def decode(self, packet=None, count=0):
return []

@property
def name(self):
cdef const lib.AVCodecDescriptor *desc = lib.avcodec_descriptor_get(self.ptr.codecpar.codec_id)
Expand Down

0 comments on commit 43ed7a0

Please sign in to comment.