...

Package xvmc

import "github.com/jezek/xgb/xvmc"
Overview
Index

Overview ▾

Package xvmc is the X client API for the XVideo-MotionCompensation extension.

Index ▾

func Init(c *xgb.Conn) error
func SurfaceInfoListBytes(buf []byte, list []SurfaceInfo) int
func SurfaceInfoRead(buf []byte, v *SurfaceInfo) int
func SurfaceInfoReadList(buf []byte, dest []SurfaceInfo) int
type Context
    func NewContextId(c *xgb.Conn) (Context, error)
type CreateContextCookie
    func CreateContext(c *xgb.Conn, ContextId Context, PortId xv.Port, SurfaceId Surface, Width uint16, Height uint16, Flags uint32) CreateContextCookie
    func CreateContextUnchecked(c *xgb.Conn, ContextId Context, PortId xv.Port, SurfaceId Surface, Width uint16, Height uint16, Flags uint32) CreateContextCookie
    func (cook CreateContextCookie) Reply() (*CreateContextReply, error)
type CreateContextReply
type CreateSubpictureCookie
    func CreateSubpicture(c *xgb.Conn, SubpictureId Subpicture, Context Context, XvimageId uint32, Width uint16, Height uint16) CreateSubpictureCookie
    func CreateSubpictureUnchecked(c *xgb.Conn, SubpictureId Subpicture, Context Context, XvimageId uint32, Width uint16, Height uint16) CreateSubpictureCookie
    func (cook CreateSubpictureCookie) Reply() (*CreateSubpictureReply, error)
type CreateSubpictureReply
type CreateSurfaceCookie
    func CreateSurface(c *xgb.Conn, SurfaceId Surface, ContextId Context) CreateSurfaceCookie
    func CreateSurfaceUnchecked(c *xgb.Conn, SurfaceId Surface, ContextId Context) CreateSurfaceCookie
    func (cook CreateSurfaceCookie) Reply() (*CreateSurfaceReply, error)
type CreateSurfaceReply
type DestroyContextCookie
    func DestroyContext(c *xgb.Conn, ContextId Context) DestroyContextCookie
    func DestroyContextChecked(c *xgb.Conn, ContextId Context) DestroyContextCookie
    func (cook DestroyContextCookie) Check() error
type DestroySubpictureCookie
    func DestroySubpicture(c *xgb.Conn, SubpictureId Subpicture) DestroySubpictureCookie
    func DestroySubpictureChecked(c *xgb.Conn, SubpictureId Subpicture) DestroySubpictureCookie
    func (cook DestroySubpictureCookie) Check() error
type DestroySurfaceCookie
    func DestroySurface(c *xgb.Conn, SurfaceId Surface) DestroySurfaceCookie
    func DestroySurfaceChecked(c *xgb.Conn, SurfaceId Surface) DestroySurfaceCookie
    func (cook DestroySurfaceCookie) Check() error
type ListSubpictureTypesCookie
    func ListSubpictureTypes(c *xgb.Conn, PortId xv.Port, SurfaceId Surface) ListSubpictureTypesCookie
    func ListSubpictureTypesUnchecked(c *xgb.Conn, PortId xv.Port, SurfaceId Surface) ListSubpictureTypesCookie
    func (cook ListSubpictureTypesCookie) Reply() (*ListSubpictureTypesReply, error)
type ListSubpictureTypesReply
type ListSurfaceTypesCookie
    func ListSurfaceTypes(c *xgb.Conn, PortId xv.Port) ListSurfaceTypesCookie
    func ListSurfaceTypesUnchecked(c *xgb.Conn, PortId xv.Port) ListSurfaceTypesCookie
    func (cook ListSurfaceTypesCookie) Reply() (*ListSurfaceTypesReply, error)
type ListSurfaceTypesReply
type QueryVersionCookie
    func QueryVersion(c *xgb.Conn) QueryVersionCookie
    func QueryVersionUnchecked(c *xgb.Conn) QueryVersionCookie
    func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error)
type QueryVersionReply
type Subpicture
    func NewSubpictureId(c *xgb.Conn) (Subpicture, error)
type Surface
    func NewSurfaceId(c *xgb.Conn) (Surface, error)
type SurfaceInfo
    func (v SurfaceInfo) Bytes() []byte

Package files

xvmc.go

func Init

func Init(c *xgb.Conn) error

Init must be called before using the XVideo-MotionCompensation extension.

func SurfaceInfoListBytes

func SurfaceInfoListBytes(buf []byte, list []SurfaceInfo) int

SurfaceInfoListBytes writes a list of SurfaceInfo values to a byte slice.

func SurfaceInfoRead

func SurfaceInfoRead(buf []byte, v *SurfaceInfo) int

SurfaceInfoRead reads a byte slice into a SurfaceInfo value.

func SurfaceInfoReadList

func SurfaceInfoReadList(buf []byte, dest []SurfaceInfo) int

SurfaceInfoReadList reads a byte slice into a list of SurfaceInfo values.

type Context

type Context uint32

func NewContextId

func NewContextId(c *xgb.Conn) (Context, error)

type CreateContextCookie

CreateContextCookie is a cookie used only for CreateContext requests.

type CreateContextCookie struct {
    *xgb.Cookie
}

func CreateContext

func CreateContext(c *xgb.Conn, ContextId Context, PortId xv.Port, SurfaceId Surface, Width uint16, Height uint16, Flags uint32) CreateContextCookie

CreateContext sends a checked request. If an error occurs, it will be returned with the reply by calling CreateContextCookie.Reply()

func CreateContextUnchecked

func CreateContextUnchecked(c *xgb.Conn, ContextId Context, PortId xv.Port, SurfaceId Surface, Width uint16, Height uint16, Flags uint32) CreateContextCookie

CreateContextUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (CreateContextCookie) Reply

func (cook CreateContextCookie) Reply() (*CreateContextReply, error)

Reply blocks and returns the reply data for a CreateContext request.

type CreateContextReply

CreateContextReply represents the data returned from a CreateContext request.

type CreateContextReply struct {
    Sequence uint16 // sequence number of the request for this reply
    Length   uint32 // number of bytes in this reply
    // padding: 1 bytes
    WidthActual  uint16
    HeightActual uint16
    FlagsReturn  uint32
    // padding: 20 bytes
    PrivData []uint32 // size: xgb.Pad((int(Length) * 4))
}

type CreateSubpictureCookie

CreateSubpictureCookie is a cookie used only for CreateSubpicture requests.

type CreateSubpictureCookie struct {
    *xgb.Cookie
}

func CreateSubpicture

func CreateSubpicture(c *xgb.Conn, SubpictureId Subpicture, Context Context, XvimageId uint32, Width uint16, Height uint16) CreateSubpictureCookie

CreateSubpicture sends a checked request. If an error occurs, it will be returned with the reply by calling CreateSubpictureCookie.Reply()

func CreateSubpictureUnchecked

func CreateSubpictureUnchecked(c *xgb.Conn, SubpictureId Subpicture, Context Context, XvimageId uint32, Width uint16, Height uint16) CreateSubpictureCookie

CreateSubpictureUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (CreateSubpictureCookie) Reply

func (cook CreateSubpictureCookie) Reply() (*CreateSubpictureReply, error)

Reply blocks and returns the reply data for a CreateSubpicture request.

type CreateSubpictureReply

CreateSubpictureReply represents the data returned from a CreateSubpicture request.

type CreateSubpictureReply struct {
    Sequence uint16 // sequence number of the request for this reply
    Length   uint32 // number of bytes in this reply
    // padding: 1 bytes
    WidthActual       uint16
    HeightActual      uint16
    NumPaletteEntries uint16
    EntryBytes        uint16
    ComponentOrder    []byte // size: 4
    // padding: 12 bytes
    PrivData []uint32 // size: xgb.Pad((int(Length) * 4))
}

type CreateSurfaceCookie

CreateSurfaceCookie is a cookie used only for CreateSurface requests.

type CreateSurfaceCookie struct {
    *xgb.Cookie
}

func CreateSurface

func CreateSurface(c *xgb.Conn, SurfaceId Surface, ContextId Context) CreateSurfaceCookie

CreateSurface sends a checked request. If an error occurs, it will be returned with the reply by calling CreateSurfaceCookie.Reply()

func CreateSurfaceUnchecked

func CreateSurfaceUnchecked(c *xgb.Conn, SurfaceId Surface, ContextId Context) CreateSurfaceCookie

CreateSurfaceUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (CreateSurfaceCookie) Reply

func (cook CreateSurfaceCookie) Reply() (*CreateSurfaceReply, error)

Reply blocks and returns the reply data for a CreateSurface request.

type CreateSurfaceReply

CreateSurfaceReply represents the data returned from a CreateSurface request.

type CreateSurfaceReply struct {
    Sequence uint16 // sequence number of the request for this reply
    Length   uint32 // number of bytes in this reply
    // padding: 1 bytes
    // padding: 24 bytes
    PrivData []uint32 // size: xgb.Pad((int(Length) * 4))
}

type DestroyContextCookie

DestroyContextCookie is a cookie used only for DestroyContext requests.

type DestroyContextCookie struct {
    *xgb.Cookie
}

func DestroyContext

func DestroyContext(c *xgb.Conn, ContextId Context) DestroyContextCookie

DestroyContext sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func DestroyContextChecked

func DestroyContextChecked(c *xgb.Conn, ContextId Context) DestroyContextCookie

DestroyContextChecked sends a checked request. If an error occurs, it can be retrieved using DestroyContextCookie.Check()

func (DestroyContextCookie) Check

func (cook DestroyContextCookie) Check() error

Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.

type DestroySubpictureCookie

DestroySubpictureCookie is a cookie used only for DestroySubpicture requests.

type DestroySubpictureCookie struct {
    *xgb.Cookie
}

func DestroySubpicture

func DestroySubpicture(c *xgb.Conn, SubpictureId Subpicture) DestroySubpictureCookie

DestroySubpicture sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func DestroySubpictureChecked

func DestroySubpictureChecked(c *xgb.Conn, SubpictureId Subpicture) DestroySubpictureCookie

DestroySubpictureChecked sends a checked request. If an error occurs, it can be retrieved using DestroySubpictureCookie.Check()

func (DestroySubpictureCookie) Check

func (cook DestroySubpictureCookie) Check() error

Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.

type DestroySurfaceCookie

DestroySurfaceCookie is a cookie used only for DestroySurface requests.

type DestroySurfaceCookie struct {
    *xgb.Cookie
}

func DestroySurface

func DestroySurface(c *xgb.Conn, SurfaceId Surface) DestroySurfaceCookie

DestroySurface sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func DestroySurfaceChecked

func DestroySurfaceChecked(c *xgb.Conn, SurfaceId Surface) DestroySurfaceCookie

DestroySurfaceChecked sends a checked request. If an error occurs, it can be retrieved using DestroySurfaceCookie.Check()

func (DestroySurfaceCookie) Check

func (cook DestroySurfaceCookie) Check() error

Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.

type ListSubpictureTypesCookie

ListSubpictureTypesCookie is a cookie used only for ListSubpictureTypes requests.

type ListSubpictureTypesCookie struct {
    *xgb.Cookie
}

func ListSubpictureTypes

func ListSubpictureTypes(c *xgb.Conn, PortId xv.Port, SurfaceId Surface) ListSubpictureTypesCookie

ListSubpictureTypes sends a checked request. If an error occurs, it will be returned with the reply by calling ListSubpictureTypesCookie.Reply()

func ListSubpictureTypesUnchecked

func ListSubpictureTypesUnchecked(c *xgb.Conn, PortId xv.Port, SurfaceId Surface) ListSubpictureTypesCookie

ListSubpictureTypesUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (ListSubpictureTypesCookie) Reply

func (cook ListSubpictureTypesCookie) Reply() (*ListSubpictureTypesReply, error)

Reply blocks and returns the reply data for a ListSubpictureTypes request.

type ListSubpictureTypesReply

ListSubpictureTypesReply represents the data returned from a ListSubpictureTypes request.

type ListSubpictureTypesReply struct {
    Sequence uint16 // sequence number of the request for this reply
    Length   uint32 // number of bytes in this reply
    // padding: 1 bytes
    Num uint32
    // padding: 20 bytes
    Types []xv.ImageFormatInfo // size: xv.ImageFormatInfoListSize(Types)
}

type ListSurfaceTypesCookie

ListSurfaceTypesCookie is a cookie used only for ListSurfaceTypes requests.

type ListSurfaceTypesCookie struct {
    *xgb.Cookie
}

func ListSurfaceTypes

func ListSurfaceTypes(c *xgb.Conn, PortId xv.Port) ListSurfaceTypesCookie

ListSurfaceTypes sends a checked request. If an error occurs, it will be returned with the reply by calling ListSurfaceTypesCookie.Reply()

func ListSurfaceTypesUnchecked

func ListSurfaceTypesUnchecked(c *xgb.Conn, PortId xv.Port) ListSurfaceTypesCookie

ListSurfaceTypesUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (ListSurfaceTypesCookie) Reply

func (cook ListSurfaceTypesCookie) Reply() (*ListSurfaceTypesReply, error)

Reply blocks and returns the reply data for a ListSurfaceTypes request.

type ListSurfaceTypesReply

ListSurfaceTypesReply represents the data returned from a ListSurfaceTypes request.

type ListSurfaceTypesReply struct {
    Sequence uint16 // sequence number of the request for this reply
    Length   uint32 // number of bytes in this reply
    // padding: 1 bytes
    Num uint32
    // padding: 20 bytes
    Surfaces []SurfaceInfo // size: xgb.Pad((int(Num) * 24))
}

type QueryVersionCookie

QueryVersionCookie is a cookie used only for QueryVersion requests.

type QueryVersionCookie struct {
    *xgb.Cookie
}

func QueryVersion

func QueryVersion(c *xgb.Conn) QueryVersionCookie

QueryVersion sends a checked request. If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()

func QueryVersionUnchecked

func QueryVersionUnchecked(c *xgb.Conn) QueryVersionCookie

QueryVersionUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (QueryVersionCookie) Reply

func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error)

Reply blocks and returns the reply data for a QueryVersion request.

type QueryVersionReply

QueryVersionReply represents the data returned from a QueryVersion request.

type QueryVersionReply struct {
    Sequence uint16 // sequence number of the request for this reply
    Length   uint32 // number of bytes in this reply
    // padding: 1 bytes
    Major uint32
    Minor uint32
}

type Subpicture

type Subpicture uint32

func NewSubpictureId

func NewSubpictureId(c *xgb.Conn) (Subpicture, error)

type Surface

type Surface uint32

func NewSurfaceId

func NewSurfaceId(c *xgb.Conn) (Surface, error)

type SurfaceInfo

type SurfaceInfo struct {
    Id                  Surface
    ChromaFormat        uint16
    Pad0                uint16
    MaxWidth            uint16
    MaxHeight           uint16
    SubpictureMaxWidth  uint16
    SubpictureMaxHeight uint16
    McType              uint32
    Flags               uint32
}

func (SurfaceInfo) Bytes

func (v SurfaceInfo) Bytes() []byte

Bytes writes a SurfaceInfo value to a byte slice.