pfVideoChannel(3pf) OpenGL Performer 3.2.2 libpr C++ Reference Pages
NAME
pfVideoChannel, pfGetCurVChan - Create, modify and query video channel
state
FUNCTION SPECIFICATION
#include <Performer/pr/pfVideoChannel.h>
pfVideoChannel::pfVideoChannel();
pfType * pfVideoChannel::getClassType(void);
void pfVideoChannel::apply(void);
void pfVideoChannel::setCallig(pfCalligraphic *callig);
void pfVideoChannel::setFullRect(void);
void pfVideoChannel::setId(int index);
pfWSVideoChannelInfo
pfVideoChannel::getInfo(void);
void pfVideoChannel::setOutputOrigin(int xo, int yo);
void pfVideoChannel::setOutputSize(int xs, int ys);
void pfVideoChannel::setScale(float xs, float ys);
void pfVideoChannel::setAreaScale(float s);
void pfVideoChannel::setWSWindow(pfWSWindow wsWin);
float pfVideoChannel::getAreaScale(void);
pfCalligraphic* pfVideoChannel::getCallig(void);
int pfVideoChannel::getId(void);
void pfVideoChannel::getOrigin(int *xo, int *yo);
void pfVideoChannel::getOutputOrigin(const int *xo,
int *yo);
void pfVideoChannel::getOutputSize(const int *xs, int *ys);
void pfVideoChannel::getMinScale(const float *xs,
float *ys);
void pfVideoChannel::getMaxScale(const float *xs,
float *ys);
Page 1
pfVideoChannel(3pf) OpenGL Performer 3.2.2 libpr C++ Reference Pages
void pfVideoChannel::getMinDeltas(int *_dx, int *_dy);
void pfVideoChannel::setMode(int _mode, int _val);
int pfVideoChannel::getMode(int _mode);
void pfVideoChannel::getScale(const float *xs, float *ys);
void pfVideoChannel::getSize(int *xs, int *ys);
void pfVideoChannel::setScreen(int screen);
int pfVideoChannel::getScreen(void);
pfWSWindow pfVideoChannel::getWSWindow(void);
void pfVideoChannel::applyVChan(void);
void pfVideoChannel::bindVChan(void);
void pfVideoChannel::select(vchan);
void pfVideoChannel::unbindVChan(void);
int pfVideoChannel::isBound(const void);
int pfVideoChannel::isActive(const void);
pfVideoChannel * pfGetCurVChan(void);
/* typedef of X-based Performer Types */
typedef XSGIvcChannelInfo *pfWSVideoChannelInfo;
PARENT CLASS FUNCTIONS
The OpenGL Performer class pfVideoChannel is derived from the parent
class pfObject, so each of these member functions of class pfObject are
also directly usable with objects of class pfVideoChannel. This is also
true for ancestor classes of class pfObject.
void* pfObject::operator new(size_t);
void* pfObject::operator new(size_t, void *arena);
void* pfObject::operator new(size_t, pfFluxMemory *fmem);
void pfObject::setUserData(void *data);
void pfObject::setUserData(int slot, void *data);
void* pfObject::getUserData(pfObject *obj);
void* pfObject::getUserData(pfObject *obj, int slot);
int pfObject::getNumUserData();
Page 2
pfVideoChannel(3pf) OpenGL Performer 3.2.2 libpr C++ Reference Pages
Since the class pfObject is itself derived from the parent class
pfMemory, objects of class pfVideoChannel can also be used with these
functions designed for objects of class pfMemory.
void* pfMemory::getData(const void *ptr);
pfType * pfMemory::getType();
int pfMemory::isOfType(pfType *type);
int pfMemory::isExactType(pfType *type);
const char * pfMemory::getTypeName();
int pfMemory::copy(pfMemory *src);
int pfMemory::compare(const pfMemory *mem);
void pfMemory::print(uint which, uint verbose, char *prefix,
FILE *file);
int pfMemory::getArena(void *ptr);
void* pfMemory::getArena();
int pfMemory::ref();
int pfMemory::unref();
int pfMemory::unrefDelete();
int pfMemory::unrefGetRef();
int pfMemory::getRef();
int pfMemory::checkDelete();
int pfMemory::isFluxed();
void * pfMemory::getArena();
int pfMemory::getSize();
DESCRIPTION
The pfVideoChannel capability is used to query and control the state and
output area of a hardware video channel. This support is done through
the XSGIvc video control X extension for SGI platforms. See the XSGIvc
man page for more information on this library. The pfVideoChannel only
accesses video hardware in the action routines of pfVideoChannel::apply,
pfVideoChannel::bind, and pfVideoChannel::unbind. All parameters set on
the pfVideoChannel take effect turning these actions. These actions
require that a pfWSWindow be set on the pfVideoChannel via
pfVideoChannel::setWSWindow.
new(arena) allocates a pfVideoChannel from the specified memory arena, or
from the heap if arena is NULL. new allocates a pfVideoChannel from the
default memory arena (see pfGetSharedArena). Like other pfObjects,
pfVideoChannel cannot be created statically, automatically on the stack
or in arrays. pfVideoChannel should be deleted with pfDelete rather than
the delete operator.
pfVideoChannel::setMode sets a given mode to val where mode may be one of
the following:
PFVCHAN_SYNC
sets the video boundary upon which changes to the video channel
origin and size should take effect: PFVCHAN_SYNC_SWAP for
swapbuffers (the default) and PFVCHAN_SYNC_FIELD for a field,
or vertical retrace, boundary. For resizing for load
management, the default swapbuffers boundary is usually
Page 3
pfVideoChannel(3pf) OpenGL Performer 3.2.2 libpr C++ Reference Pages
appropriate. Allowing changes to the origin and size take
effect on the following field boundary allows the panning of
video output from the visible color buffer asynchronous to
drawing and so should be used in conjunction with the
PFVCHAN_AUTO_APPLY mode and doing a select on the
pfVideoChannel.
PFVCHAN_AUTO_APPLY
accepts a boolean value indicating if changes to vchan should
be applied automatically, as opposed to waiting for an explicit
call to apply. This is done if vchan has been selected via
pfVideoChannel::select to be the current active pfVideoChannel.
The changes are not applied by the set routines because those
routines may be called from an asynchronous process. On
InfiniteReality changes to the video channel must be applied by
the draw process so these are applied internally by the
rendering portion of OpenGL Performer.
pfVideoChannel::getMode will return the value of the specified mode for
vchan.
pfVideoChannel::setFullRect will cause the output area of the video
channel to be reset to its full size.
pfVideoChannel::setId will cause the pfVideoChannel to refer to the
hardware video channel indicated by index. This is the same index used
by the XSGIvc routines.
pfVideoChannel::setOutputOrigin will set the origin of the output area of
the video channel to be the lower-left channel relative coordinates of
xo, yo. The actual screen origin of the video channel can be gotten with
pfVideoChannel::getOrigin.
pfVideoChannel::setOutputSize will set the size of the output area of the
video channel to be that specified by xs, ys. The size of the video
channel can not be set larger than its full size which can be queried
with pfVideoChannel::getSize.
pfVideoChannel::setAreaScale will scale the X and Y dimensions of the
output area of the video channel to achieve a scaling of the drawing area
by s. The implementation is to scale both X and Y by the square root of
s, so that compound effect on area is s. For example a 1000-pixel square
display area scaled by 0.5 would result in a 707-pixel square render
area, since 707*707 is 0.5*1000*1000 (the actual X and Y resolutions are
subject to hardware constrains as well). The maximum scale allowed is
1.0 which will reset the channel output area to its full size.
pfVideoChannel::setScale will scale the size of the X and Y dimensions
output area of the video channel by specified by xs, ys. The minimum and
and maximum scaling allowed is that set by pfVideoChannel::setMinScale
and pfVideoChannel::setMaxScale. The minimum and maximum scale bounds
default to 0.25 and 1.0, respectively.
Page 4
pfVideoChannel(3pf) OpenGL Performer 3.2.2 libpr C++ Reference Pages
pfVideoChannel::setMinScale will set the lower bound on the allowable
pixel scale values for the X and Y dimensions of the pfVideoChannel.
pfVideoChannel::setMaxScale will set the upper bound on the allowable
pixel scale values for the X and Y dimensions of the pfVideoChannel.
pfVideoChannel::setWSWindow sets the WSWindow for the pfVideoChannel to
be wsWin. This window should be the WSDrawable that is connected to the
main GL context being displayed into that video channel. This can be
gotten from a pfWindow or pfPipeWindow with pfWindow::getWSDrawable or
pfPipeWindow::getWSDrawable, respectively. Video channel resize
operations will be triggered by the swapping of the display buffers for
that GL context. If wsWin is NULL, it will cause an unbind of the video
channel from its current WSWindow upon the next call to
pfVideoChannel::apply. If wsWin is not null, the screen of the
pfVideoChannel will be set to that of wsWin.
pfVideoChannel::getId will return the video channel index of the
pfVideoChannel.
pfVideoChannel::getInfo will return the XSGIvcChannelInfo handle, useful
for doing XSGIvc queries directly.
pfVideoChannel::getMinDeltas will return the minimum resolution of resize
for X and Y that the video channel size can be changed in dx and dy,
respectively.
pfVideoChannel::getOutputOrigin will return the origin of the output area
of the video channel in xo, yo.
pfVideoChannel::getOutputSize will return the size of the output area of
the video channel in xs and ys.
pfVideoChannel::getAreaScale will return the area scale the video
channel. This value represents the ratio of drawn to displayed area in
pixels. For example a 1000-pixel square display scaled to 707-pixels
would return an area scale value of to 0.5, since 707*707 is
0.5*1000*1000.
pfVideoChannel::getScale will return the scale of the X and Y dimensions
output area of the video channel in xs and ys.
pfVideoChannel::getMinScale will return the lower bound on pixel scale of
the X and Y dimensions in xs and ys. The default pixel scale lower bound
is 0.25.
pfVideoChannel::getMaxScale will return the upper bound on pixel scale of
the X and Y dimensions in xs and ys. The default pixel scale upper bound
is 1.0.
pfVideoChannel::setScreen sets the screen number of the pfVideoChannel to
screen and pfVideoChannel::getScreen returns the screen number of the
Page 5
pfVideoChannel(3pf) OpenGL Performer 3.2.2 libpr C++ Reference Pages
pfVideoChannel.
pfVideoChannel::getSize will return the full size of the video channel in
xs and ys.
pfVideoChannel::bind forces a bind of the video channel to the WSWindow
set with pfVideoChannel::setWSWindow.
pfVideoChannel::unbind forces an unbind of the video from its current
WSWindow. This will also cause the video channel to reset its output
area to the configuration it had before the channel was bound.
pfVideoChannel::isBound returns a boolean value indicating whether or not
the the pfVideoChannel is currently bound to a window and able to be
resized.
pfVideoChannel::isActive returns a boolean value indicating whether or
not the the pfVideoChannel is currently active and able to produce video
output.
pfVideoChannel::select makes vchan the current pfVideoChannel in the
process. This should be done in a rendering process if the purpose is for
using the PFVCHAN_AUTO_APPLY mode.
pfGetCurVChan will return a pointer to the current pfVideoChannel.
pfVideoChannel::apply will apply the current origin and size parameters
to the currently selected video channel. A bind of the video channel to
the specified WSWindow will be automatically done if necessary.
pfVideoChannel::setCallig set the callig to use with this pfVideoChannel.
If a light-point board (see pfCalligraphic) has been initialized before
pfConfig, then each pfVideoChannel automatically create a pfCalligraphic
with its screen as the Light Point Board id, and its display id as the
channel to use on the Light Point Board.
pfVideoChannel::getCallig returns the pfCalligraphic in use with this
pfVideoChannel, or NULL if none are used (so only Raster Light Points are
available).
NOTESpfVideoChannel functionality is not currently supported under Linux.
An XSGIvc video channel may only be bound to a single window at a time on
the system. Only a single pfVideoChannel may bind a hardware video
channel.
On InfiniteReality, changes to video channel origin and size require an
active graphics context and so should be made in a rendering process to
avoid a graphics context change which can be expensive.
Page 6
pfVideoChannel(3pf) OpenGL Performer 3.2.2 libpr C++ Reference Pages
See the sample program
/usr/share/Performer/src/pguide/libpr/C/queryvchan.c for an example of
how to query general video channel attributes. See the sample program
/usr/share/Performer/src/pguide/libpr/C/vchan.c for a basic resizing
example using pfVideoChannels.
SEE ALSO
pfDelete, pfDispList, pfGetNumScreenVChans, pfState, pfWindow, XSGIvc,
glXSGIvcQueryChannelInfo, glXBindChannelToWindowSGIX.
Page 7