forked from PyAV-Org/PyAV
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcore.pxd
More file actions
53 lines (37 loc) · 1.32 KB
/
Copy pathcore.pxd
File metadata and controls
53 lines (37 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
cimport libav as lib
from av.container.streams cimport StreamContainer
from av.dictionary cimport _Dictionary
from av.format cimport ContainerFormat
from av.stream cimport Stream
# Since there are multiple objects that need to refer to a valid context, we
# need this intermediate proxy object so that there aren't any reference cycles
# and the pointer can be freed when everything that depends upon it is deleted.
cdef class ContainerProxy(object):
cdef bint writeable
cdef lib.AVFormatContext *ptr
cdef seek(self, int stream_index, lib.int64_t timestamp, str mode, bint backward, bint any_frame)
cdef flush_buffers(self)
cdef str name
# File-like source.
cdef object file
cdef object fread
cdef object fwrite
cdef object fseek
cdef object ftell
# Custom IO for above.
cdef lib.AVIOContext *iocontext
cdef long bufsize
cdef unsigned char *buffer
cdef long pos
cdef bint pos_is_valid
cdef int err_check(self, int value) except -1
cdef class Container(object):
cdef readonly str name
cdef readonly object file
cdef readonly bint writeable
cdef readonly ContainerFormat format
cdef _Dictionary options
cdef ContainerProxy proxy
cdef object __weakref__
cdef readonly StreamContainer streams
cdef readonly dict metadata