/* * Copyright (c) 1993-7 by * PARALLAX GRAPHICS, INCORPORATED, Santa Clara, California. * All rights reserved * * This software is furnished on an as-is basis, and may be used and copied * only with the inclusion of the above copyright notice. * * The information in this software is subject to change without notice. * No committment is made as to the usability or reliability of this * software. * * Parallax Graphics, Inc. * 2500 Condensa Street * Santa Clara, California 95051 */ /* The purpose of this program is to show how to create a widget for producing * video output from your workstation display (that is, taking a portion of the * display and producing a video signal that can be viewed on a TV monitor, * VCR, or other such device). * The program creates a top-level shell and a VideoOut widget. A rectangle * is used for hard-coding the area of the screen to be captured. */ /* /* * Revision 1.12 1997/09/17 09:30 schmitz * Fixed this to run under Overlay libraries; Need to * Create In widget, and point out widget source window * to the input widget window * * Revision 1.11 1995/04/01 01:19:11 lovvik * Fixed the problem where xvOutTest does not turn on output * until the user resizes the window. It turns out that you * must perform the XtVaSetValues after entering XtMainLoop(). * This would not normally be an inconvenience because the * code that is now in VideoOutputOn() would appear in a * callback function for a button press. * * Revision 1.10 1993/09/10 12:37:39 drapeau * First public version of this test program. * */ static char xvOutTestRcsId[] = "$Header: /plx/source/Xclients/generic/RCS/xvOutTest.c,v 1.11 1995/04/01 01:19:11 lovvik Exp $"; #include #include #include #include #include #include #include #include Widget top, videoInWidget, videoOutWidget; static XrmOptionDescRec options[] = { {"-brightness", "*videoIn.brightness", XrmoptionSepArg, NULL, }, {"-contrast", "*videoIn.contrast", XrmoptionSepArg, NULL, }, {"-hue", "*videoIn.hue", XrmoptionSepArg, NULL, }, {"-saturation", "*videoIn.saturation", XrmoptionSepArg, NULL, }, }; Boolean VideoOutputOn(XtPointer client_data) { XtVaSetValues(videoOutWidget, XtNchannel, PLX_OUTPUT_0, NULL); return(True); } void main(int argc, char** argv) { top = XtInitialize("xvideoOut", "XVideoOut", options, XtNumber(options), &argc, argv); videoInWidget = XtVaCreateManagedWidget("videoIn", /* Create a widget for displaying video. */ xVideoInWidgetClass, top, NULL); XtRealizeWidget(top); videoOutWidget = XtVaCreateManagedWidget ("videoOut", xVideoOutWidgetClass, top, XtNsourceWin, XtWindow(videoInWidget), NULL); XtAddWorkProc(VideoOutputOn, (XtPointer)NULL); XtRealizeWidget(videoOutWidget); XtMainLoop(); }