Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading