[Xcb-commit] xcb-proto/src/extensions xv.xml,NONE,1.1

Jeremy Kolb xcb-commit at lists.freedesktop.org
Sun Jun 5 19:38:51 PDT 2005


Update of /cvs/xcb/xcb-proto/src/extensions
In directory gabe:/tmp/cvs-serv12416

Added Files:
	xv.xml 
Log Message:

VERY preliminary support for the XVideo extension.  Should be okay up until 2.0 but so far untested.  Disabled by default.


--- NEW FILE: xv.xml ---
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2005 Jeremy Kolb.
All Rights Reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Except as contained in this notice, the names of the authors or their
institutions shall not be used in advertising or otherwise to promote the
sale, use or other dealings in this Software without prior written
authorization from the authors.
-->

<xcb header="xv" extension-xname="XVideo" extension-name="Xv">

    <!-- Probably doesn't work yet.  So far untested.  Target version is 2.2.  The docs suck. 6/5/2005 -->

    <!-- Implements version 2.0 of XV -->	

    <!-- XIDs -->
    <xidtype name="PORT" />
         

    <!-- Types/Structs (double check these) -->
    <struct name="Rational">
        <field type="INT32" name="numerator" />
        <field type="INT32" name="denominator" />
    </struct>

    <struct name="AdaptorInfo">
        <field type="CARD32" name="base" />
        <field type="CARD16" name="name_size" />
        <field type="CARD16" name="nports" />
        <field type="CARD16" name="nformats" />
        <field type="CARD8" name="type" />
        <field type="CARD8" name="pad" />
    </struct>

    <struct name="EncodingInfo">
        <field type="CARD32" name="encoding" />
        <field type="CARD16" name="name_size" />
        <field type="CARD16" name="width" />
        <field type="CARD16" name="height" />
        <field type="Rational" name="rate" />
        <field type="CARD16" name="pad" />
    </struct>

    <struct name="Format">
        <field type="VISUALID" name="visual" />
        <field type="CARD8" name="depth" />
    </struct>

    <!-- I think this goes with the "QueryPortAttributes" request.  But it's not in the docs. --> 
    <struct name="AttributeInfo">
        <field type="CARD32" name="flags" />
        <field type="INT32" name="min" />
        <field type="INT32" name="max" />
        <field type="CARD32" name="size" />
    </struct>

    <struct name="ImageFormatInfo">
        <field type="CARD32" name="id" />
        <field type="CARD8" name="type" />
        <field type="CARD8" name="byte_order" />
        <field type="CARD16" name="pad1" />
        <list type="CARD8" name="guid">
            <value>16</value>
        </list>
        <field type="CARD8" name="bpp" />
        <field type="CARD8" name="num_planes" />
        <field type="CARD16" name="pad2" />
        <field type="CARD8" name="depth" />
        <field type="CARD8" name="pad3" />
        <field type="CARD16" name="pad4" />
        <field type="CARD32" name="red_mask" />
        <field type="CARD32" name="green_mask" />
        <field type="CARD32" name="blue_mask" />
        <field type="CARD8" name="format" />
        <field type="CARD8" name="pad5" />
        <field type="CARD16" name="pad6" />
        <field type="CARD32" name="y_sample_bits" />
        <field type="CARD32" name="u_sample_bits" />
        <field type="CARD32" name="v_sample_bits" />
        <field type="CARD32" name="vhorz_y_period" />
        <field type="CARD32" name="vhorz_u_period" />
        <field type="CARD32" name="vhorz_v_period" />
        <field type="CARD32" name="vvert_y_period" />
        <field type="CARD32" name="vvert_u_period" />
        <field type="CARD32" name="vvert_v_period" />
        <list type="CARD8" name="vcomp_order">
            <value>32</value>
        </list>
        <field type="CARD8" name="vscanline_order" />
        <field type="CARD8" name="vpad7" />
        <field type="CARD16" name="vpad8" />
        <field type="CARD32" name="vpad9" />
        <field type="CARD32" name="vpad10" />
    </struct>


    <!-- Errors -->
    <error name="BadPort" number="0"/>
    <error name="BadEncoding" number="1"/>
    <error name="BadControl" number="2"/>

    <!-- Events -->
    <event name="VideoNotify" number="0">
        <field type="BYTE" name="reason" />
        <field type="TIMESTAMP" name="time" />
        <field type="DRAWABLE" name="drawable" />
        <field type="PORT" name="port" />
    </event>

    <event name="PortNotify" number="1">
        <pad bytes="1" />
        <field type="TIMESTAMP" name="time" />
        <field type="PORT" name="port" />
        <field type="ATOM" name="attribute" />
        <field type="INT32" name="value" />
    </event>
    
    
    <!-- Requests -->
    <request name="QueryExtension" opcode="0">
        <field type="CARD16" name="major" />
        <field type="CARD16" name="minor" />
        <reply>
            <pad bytes="1" />
            <field type="CARD16" name="major" />
            <field type="CARD16" name="minor" />
        </reply>
    </request>

    <request name="QueryAdaptors" opcode="1">
        <field type="WINDOW" name="window" />
        <reply>
            <pad bytes="1" />
            <field type="CARD16" name="num_adaptors" />
            <pad bytes="48" />
            <list type="AdaptorInfo" name="info">
                <fieldref>num_adaptors</fieldref>
            </list>
        </reply>
    </request>

    <request name="QueryEncodings" opcode="2">
        <field type="PORT" name="port" />
        <reply>
            <pad bytes="1" />
            <field type="CARD16" name="num_encodings" />
            <pad bytes="48" />
            <list type="EncodingInfo" name="info">
                <fieldref>num_encodings</fieldref>
            </list>
        </reply>
    </request>

    <request name="GrabPort" opcode="3">
        <field type="PORT" name="port" />
        <field type="TIMESTAMP" name="time" />
        <reply>
            <field type="BYTE" name="result" />
        </reply>
    </request>

    <request name="UngrabPort" opcode="4">
        <field type="PORT" name="port" />
        <field type="TIMESTAMP" name="time" />
    </request>

    <request name="PutVideo" opcode="5">
        <field type="PORT" name="port" />
        <field type="DRAWABLE" name="drawable" />
        <field type="GCONTEXT" name="gc" />
        <field type="INT16" name="vid_x" />
        <field type="INT16" name="vid_y" />
        <field type="CARD16" name="vid_w" />
        <field type="CARD16" name="vid_h" />
        <field type="INT16" name="drw_x" />
        <field type="INT16" name="drw_y" />
        <field type="CARD16" name="drw_w" />
        <field type="CARD16" name="drw_h" />
    </request>

    <request name="PutStill" opcode="6">
        <field type="PORT" name="port" />
        <field type="DRAWABLE" name="drawable" />
        <field type="GCONTEXT" name="gc" />
        <field type="INT16" name="vid_x" />
        <field type="INT16" name="vid_y" />
        <field type="CARD16" name="vid_w" />
        <field type="CARD16" name="vid_h" />
        <field type="INT16" name="drw_x" />
        <field type="INT16" name="drw_y" />
        <field type="CARD16" name="drw_w" />
        <field type="CARD16" name="drw_h" />
    </request>

    <request name="GetVideo" opcode="7">
        <field type="PORT" name="port" />
        <field type="DRAWABLE" name="drawable" />
        <field type="GCONTEXT" name="gc" />
        <field type="INT16" name="vid_x" />
        <field type="INT16" name="vid_y" />
        <field type="CARD16" name="vid_w" />
        <field type="CARD16" name="vid_h" />
        <field type="INT16" name="drw_x" />
        <field type="INT16" name="drw_y" />
        <field type="CARD16" name="drw_w" />
        <field type="CARD16" name="drw_h" />
    </request>

    <request name="GetStill" opcode="8">
        <field type="PORT" name="port" />
        <field type="DRAWABLE" name="drawable" />
        <field type="GCONTEXT" name="gc" />
        <field type="INT16" name="vid_x" />
        <field type="INT16" name="vid_y" />
        <field type="CARD16" name="vid_w" />
        <field type="CARD16" name="vid_h" />
        <field type="INT16" name="drw_x" />
        <field type="INT16" name="drw_y" />
        <field type="CARD16" name="drw_w" />
        <field type="CARD16" name="drw_h" />
    </request>

    <request name="StopVideo" opcode="9">
        <field type="PORT" name="port" />
        <field type="DRAWABLE" name="drawable" />
    </request>

    <request name="SelectVideoNotify" opcode="10">
        <field type="DRAWABLE" name="drawable" />
        <field type="BOOL" name="onoff" />
    </request>

    <request name="SelectPortNotify" opcode="11">
        <field type="DRAWABLE" name="drawable" />
        <field type="BOOL" name="onoff" />
    </request>

    <request name="QueryBestSize" opcode="12">
        <field type="PORT" name="port" />
        <field type="CARD16" name="vid_w" />
        <field type="CARD16" name="vid_h" />
        <field type="CARD16" name="drw_w" />
        <field type="CARD16" name="drw_h" />
        <field type="BOOL" name="motion" />
        <reply>
            <pad bytes="1" />
            <field type="CARD16" name="actual_width" />
            <field type="CARD16" name="actual_height" />
        </reply>
    </request>

    <request name="SetPortAttribute" opcode="13">
        <field type="PORT" name="port" />
        <field type="ATOM" name="attribute" />
        <field type="INT32" name="value" />
    </request>

    <request name="GetPortAttribute" opcode="14">
        <field type="PORT" name="port" />
        <field type="ATOM" name="attribute" />
        <field type="INT32" name="value" />
        <reply>
            <pad bytes="1" />
            <field type="INT32" name="value" />
        </reply>
    </request>

    <!-- Not in the docs beyond this point :( -->

    <request name="QueryPortAttributes" opcode="15">
        <field type="PORT" name="port" />
        <reply>
            <pad bytes="1" />
            <field type="CARD32" name="num_attributes" />
            <field type="CARD32" name="text_size" />
            <!-- TODO: Make sure this is correct. Is there padding? -->
            <list type="AttributeInfo" name="attributes" />
        </reply>
    </request>

    <request name="ListImageFormats" opcode="16">
        <field type="PORT" name="port" />
        <reply>
            <pad bytes="1" />
            <field type="CARD32" name="num_formats" />
            <pad bytes="20" />
            <!-- TODO: Make sure that this is correct. -->
            <list type="ImageFormatInfo" name="format">
                <fieldref>num_formats</fieldref>
            </list>
        </reply>
    </request>

    <request name="QueryImageAttributes" opcode="17">
        <field type="PORT" name="port" />
        <field type="CARD32" name="id" />
        <field type="CARD16" name="width" />
        <field type="CARD16" name="height" />
        <reply>
            <pad bytes="1" />
            <field type="CARD32" name="num_planes" />
            <field type="CARD32" name="data_size" />
            <field type="CARD16" name="width" />
            <field type="CARD16" name="height" />
            <pad bytes="12" />
            <!-- TODO: What comes after this? I know something does. -->
        </reply>
    </request>

    <!-- Next in Xvproto.h there is a PutImage and ShmPutImage request.
    are these the same as XCBPutImage/XCBShmPutImage? -->
    

</xcb>



More information about the xcb-commit mailing list