File: plane.py

package info (click to toggle)
python-av 16.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,684 kB
  • sloc: python: 7,607; sh: 182; ansic: 174; makefile: 135
file content (13 lines) | stat: -rw-r--r-- 407 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
import cython
from cython.cimports.av.audio.frame import AudioFrame


@cython.cclass
class AudioPlane(Plane):
    def __cinit__(self, frame: AudioFrame, index: cython.int):
        # 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