| 1 |
cimport libav as lib |
| 2 |
from libc.stdint cimport uint8_t, uint64_t |
| 3 |
|
| 4 |
from av.audio.format cimport AudioFormat |
| 5 |
from av.audio.layout cimport AudioLayout |
| 6 |
from av.frame cimport Frame |
| 7 |
|
| 8 |
|
| 9 |
cdef class AudioFrame(Frame): |
| 10 |
# For raw storage of the frame's data; don't ever touch this. |
| 11 |
cdef uint8_t *_buffer |
| 12 |
cdef size_t _buffer_size |
| 13 |
|
| 14 |
cdef readonly AudioLayout layout |
| 15 |
""" |
| 16 |
The audio channel layout. |
| 17 |
|
| 18 |
:type: AudioLayout |
| 19 |
""" |
| 20 |
|
| 21 |
cdef readonly AudioFormat format |
| 22 |
""" |
| 23 |
The audio sample format. |
| 24 |
|
| 25 |
:type: AudioFormat |
| 26 |
""" |
| 27 |
|
| 28 |
cdef _init(self, lib.AVSampleFormat format, lib.AVChannelLayout layout, unsigned int nb_samples, unsigned int align) |
| 29 |
cdef _init_user_attributes(self) |
| 30 |
|
| 31 |
cdef AudioFrame alloc_audio_frame() |