Skip to content

Commit

Permalink
Cleanup AVStream.side_data leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
lgeiger authored Dec 5, 2024
1 parent bf03325 commit 382ea86
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
2 changes: 0 additions & 2 deletions av/stream.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ cdef class Stream:
# Stream attributes.
cdef readonly Container container
cdef readonly dict metadata
cdef readonly int nb_side_data
cdef readonly dict side_data

# CodecContext attributes.
cdef readonly CodecContext codec_context
Expand Down
8 changes: 1 addition & 7 deletions av/stream.pyi
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
from enum import Enum
from fractions import Fraction
from typing import ClassVar, Literal
from typing import Literal

from .codec import Codec, CodecContext
from .container import Container
from .frame import Frame
from .packet import Packet

class SideData(Enum):
DISPLAYMATRIX: ClassVar[SideData]

class Stream:
name: str | None
Expand Down
8 changes: 1 addition & 7 deletions av/stream.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
cimport libav as lib
from libc.stdint cimport int32_t

from enum import Enum

Expand All @@ -15,11 +14,6 @@ from av.utils cimport (

cdef object _cinit_bypass_sentinel = object()

# If necessary more can be added from
# https://ffmpeg.org/doxygen/trunk/group__lavc__packet.html#ga9a80bfcacc586b483a973272800edb97
class SideData(Enum):
DISPLAYMATRIX: "Display Matrix" = lib.AV_PKT_DATA_DISPLAYMATRIX

cdef Stream wrap_stream(Container container, lib.AVStream *c_stream, CodecContext codec_context):
"""Build an av.Stream for an existing AVStream.
Expand Down Expand Up @@ -84,7 +78,7 @@ cdef class Stream:
self.codec_context = codec_context
if self.codec_context:
self.codec_context.stream_index = stream.index

self.metadata = avdict_to_dict(
stream.metadata,
encoding=self.container.metadata_encoding,
Expand Down

0 comments on commit 382ea86

Please sign in to comment.