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
1 change: 0 additions & 1 deletion av/audio/plane.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ from av.plane cimport Plane


cdef class AudioPlane(Plane):
cdef readonly size_t buffer_size
cdef size_t _buffer_size(self)
6 changes: 2 additions & 4 deletions av/audio/plane.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ def __cinit__(self, frame: AudioFrame, index: cython.int):
if index < 0 or index >= nb_planes:
raise ValueError(f"plane index {index} out of range for {nb_planes} planes")

# Only the first linesize is ever populated, but it applies to every plane.
self.buffer_size = self.frame.ptr.linesize[0]

@cython.cfunc
def _buffer_size(self) -> cython.size_t:
return self.buffer_size
# Only the first linesize is ever populated, but it applies to every plane.
return self.frame.ptr.linesize[0]
3 changes: 1 addition & 2 deletions av/audio/plane.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from av.plane import Plane

class AudioPlane(Plane):
buffer_size: int
class AudioPlane(Plane): ...
6 changes: 3 additions & 3 deletions av/codec/hwaccel.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ cdef class HWConfig:
cdef HWConfig wrap_hwconfig(const lib.AVCodecHWConfig *ptr)

cdef class HWAccel:
cdef int _device_type
cdef str _device
cdef readonly Codec codec
cdef readonly HWConfig config
cdef lib.AVBufferRef *ptr
cdef public dict options
cdef int _device_type
cdef readonly int device_id
cdef public int flags
cdef readonly bint is_hw_owned
cdef public bint allow_software_fallback
cdef public dict options
cdef public int flags
4 changes: 2 additions & 2 deletions av/container/core.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ cdef class Container:
cdef lib.AVFormatContext *ptr
cdef readonly str name
cdef readonly PyIOFile file
cdef int buffer_size
cdef readonly object io_open
cdef readonly object open_files
cdef readonly dict open_files
cdef readonly ContainerFormat format
cdef readonly dict options
cdef readonly dict container_options
Expand All @@ -32,6 +31,7 @@ cdef class Container:
cdef HWAccel hwaccel

cdef timeout_info interrupt_callback_info
cdef int buffer_size
cdef uint8_t _myflag # enum: writeable, input_was_opened, started, done, extradata_planned

cdef void _assert_open(self)
Expand Down
4 changes: 2 additions & 2 deletions av/filter/context.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ cdef class FilterContext:
cdef lib.AVFilterContext *ptr
cdef readonly Graph graph
cdef readonly Filter filter
cdef object _inputs
cdef object _outputs
cdef tuple _inputs
cdef tuple _outputs
cdef bint inited
cdef unsigned char _kind

Expand Down
4 changes: 2 additions & 2 deletions av/filter/filter.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ cimport libav as lib

cdef class Filter:
cdef const lib.AVFilter *ptr
cdef object _inputs
cdef object _outputs
cdef tuple _inputs
cdef tuple _outputs


cdef Filter wrap_filter(const lib.AVFilter *ptr)
Loading