/usr/share/pyshared/xcb/xvmc.py is in python-xpyb 1.3.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | #
# This file generated automatically from xvmc.xml by py_client.py.
# Edit at your peril.
#
import xcb
import cStringIO
from struct import pack, unpack_from
from array import array
import xproto
import shm
import xv
MAJOR_VERSION = 1
MINOR_VERSION = 1
key = xcb.ExtensionKey('XVideo-MotionCompensation')
class SurfaceInfo(xcb.Struct):
def __init__(self, parent, offset, size):
xcb.Struct.__init__(self, parent, offset, size)
(self.id, self.chroma_format, self.pad0, self.max_width, self.max_height, self.subpicture_max_width, self.subpicture_max_height, self.mc_type, self.flags,) = unpack_from('IHHHHHHII', parent, offset)
class QueryVersionCookie(xcb.Cookie):
pass
class QueryVersionReply(xcb.Reply):
def __init__(self, parent, offset=0):
xcb.Reply.__init__(self, parent, offset)
(self.major, self.minor,) = unpack_from('xx2x4xII', parent, offset)
class ListSurfaceTypesCookie(xcb.Cookie):
pass
class ListSurfaceTypesReply(xcb.Reply):
def __init__(self, parent, offset=0):
xcb.Reply.__init__(self, parent, offset)
(self.num,) = unpack_from('xx2x4xI20x', parent, offset)
offset += 32
self.surfaces = xcb.List(parent, offset, self.num, SurfaceInfo, 24)
class CreateContextCookie(xcb.Cookie):
pass
class CreateContextReply(xcb.Reply):
def __init__(self, parent, offset=0):
xcb.Reply.__init__(self, parent, offset)
(self.width_actual, self.height_actual, self.flags_return,) = unpack_from('xx2x4xHHI20x', parent, offset)
offset += 36
self.priv_data = xcb.List(parent, offset, self.length, 'I', 4)
class CreateSurfaceCookie(xcb.Cookie):
pass
class CreateSurfaceReply(xcb.Reply):
def __init__(self, parent, offset=0):
xcb.Reply.__init__(self, parent, offset)
offset += 32
self.priv_data = xcb.List(parent, offset, self.length, 'I', 4)
class CreateSubpictureCookie(xcb.Cookie):
pass
class CreateSubpictureReply(xcb.Reply):
def __init__(self, parent, offset=0):
xcb.Reply.__init__(self, parent, offset)
(self.width_actual, self.height_actual, self.num_palette_entries, self.entry_bytes,) = unpack_from('xx2x4xHHHH', parent, offset)
offset += 16
self.component_order = xcb.List(parent, offset, 4, 'B', 1)
offset += len(self.component_order.buf())
offset += 12
offset += xcb.type_pad(4, offset)
self.priv_data = xcb.List(parent, offset, self.length, 'I', 4)
class ListSubpictureTypesCookie(xcb.Cookie):
pass
class ListSubpictureTypesReply(xcb.Reply):
def __init__(self, parent, offset=0):
xcb.Reply.__init__(self, parent, offset)
(self.num,) = unpack_from('xx2x4xI20x', parent, offset)
offset += 32
self.types = xcb.List(parent, offset, self.num, ImageFormatInfo, 128)
class xvmcExtension(xcb.Extension):
def QueryVersion(self, ):
buf = cStringIO.StringIO()
buf.write(pack('=xx2x', ))
return self.send_request(xcb.Request(buf.getvalue(), 0, False, True),
QueryVersionCookie(),
QueryVersionReply)
def QueryVersionUnchecked(self, ):
buf = cStringIO.StringIO()
buf.write(pack('=xx2x', ))
return self.send_request(xcb.Request(buf.getvalue(), 0, False, False),
QueryVersionCookie(),
QueryVersionReply)
def ListSurfaceTypes(self, port_id):
buf = cStringIO.StringIO()
buf.write(pack('=xx2xI', port_id))
return self.send_request(xcb.Request(buf.getvalue(), 1, False, True),
ListSurfaceTypesCookie(),
ListSurfaceTypesReply)
def ListSurfaceTypesUnchecked(self, port_id):
buf = cStringIO.StringIO()
buf.write(pack('=xx2xI', port_id))
return self.send_request(xcb.Request(buf.getvalue(), 1, False, False),
ListSurfaceTypesCookie(),
ListSurfaceTypesReply)
def CreateContext(self, context_id, port_id, surface_id, width, height, flags):
buf = cStringIO.StringIO()
buf.write(pack('=xx2xIIIHHI', context_id, port_id, surface_id, width, height, flags))
return self.send_request(xcb.Request(buf.getvalue(), 2, False, True),
CreateContextCookie(),
CreateContextReply)
def CreateContextUnchecked(self, context_id, port_id, surface_id, width, height, flags):
buf = cStringIO.StringIO()
buf.write(pack('=xx2xIIIHHI', context_id, port_id, surface_id, width, height, flags))
return self.send_request(xcb.Request(buf.getvalue(), 2, False, False),
CreateContextCookie(),
CreateContextReply)
def DestroyContextChecked(self, context_id):
buf = cStringIO.StringIO()
buf.write(pack('=xx2xI', context_id))
return self.send_request(xcb.Request(buf.getvalue(), 3, True, True),
xcb.VoidCookie())
def DestroyContext(self, context_id):
buf = cStringIO.StringIO()
buf.write(pack('=xx2xI', context_id))
return self.send_request(xcb.Request(buf.getvalue(), 3, True, False),
xcb.VoidCookie())
def CreateSurface(self, surface_id, context_id):
buf = cStringIO.StringIO()
buf.write(pack('=xx2xII', surface_id, context_id))
return self.send_request(xcb.Request(buf.getvalue(), 4, False, True),
CreateSurfaceCookie(),
CreateSurfaceReply)
def CreateSurfaceUnchecked(self, surface_id, context_id):
buf = cStringIO.StringIO()
buf.write(pack('=xx2xII', surface_id, context_id))
return self.send_request(xcb.Request(buf.getvalue(), 4, False, False),
CreateSurfaceCookie(),
CreateSurfaceReply)
def DestroySurfaceChecked(self, surface_id):
buf = cStringIO.StringIO()
buf.write(pack('=xx2xI', surface_id))
return self.send_request(xcb.Request(buf.getvalue(), 5, True, True),
xcb.VoidCookie())
def DestroySurface(self, surface_id):
buf = cStringIO.StringIO()
buf.write(pack('=xx2xI', surface_id))
return self.send_request(xcb.Request(buf.getvalue(), 5, True, False),
xcb.VoidCookie())
def CreateSubpicture(self, subpicture_id, context, xvimage_id, width, height):
buf = cStringIO.StringIO()
buf.write(pack('=xx2xIIIHH', subpicture_id, context, xvimage_id, width, height))
return self.send_request(xcb.Request(buf.getvalue(), 6, False, True),
CreateSubpictureCookie(),
CreateSubpictureReply)
def CreateSubpictureUnchecked(self, subpicture_id, context, xvimage_id, width, height):
buf = cStringIO.StringIO()
buf.write(pack('=xx2xIIIHH', subpicture_id, context, xvimage_id, width, height))
return self.send_request(xcb.Request(buf.getvalue(), 6, False, False),
CreateSubpictureCookie(),
CreateSubpictureReply)
def DestroySubpictureChecked(self, subpicture_id):
buf = cStringIO.StringIO()
buf.write(pack('=xx2xI', subpicture_id))
return self.send_request(xcb.Request(buf.getvalue(), 7, True, True),
xcb.VoidCookie())
def DestroySubpicture(self, subpicture_id):
buf = cStringIO.StringIO()
buf.write(pack('=xx2xI', subpicture_id))
return self.send_request(xcb.Request(buf.getvalue(), 7, True, False),
xcb.VoidCookie())
def ListSubpictureTypes(self, port_id, surface_id):
buf = cStringIO.StringIO()
buf.write(pack('=xx2xII', port_id, surface_id))
return self.send_request(xcb.Request(buf.getvalue(), 8, False, True),
ListSubpictureTypesCookie(),
ListSubpictureTypesReply)
def ListSubpictureTypesUnchecked(self, port_id, surface_id):
buf = cStringIO.StringIO()
buf.write(pack('=xx2xII', port_id, surface_id))
return self.send_request(xcb.Request(buf.getvalue(), 8, False, False),
ListSubpictureTypesCookie(),
ListSubpictureTypesReply)
_events = {
}
_errors = {
}
xcb._add_ext(key, xvmcExtension, _events, _errors)
|