亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? xlibvid.cxx

?? openh323_1.1.2.2.zip; 2. 把pwlib_1.52.zip 、openh323_1.1.2.2.zip分別展開到目錄e:h323sourcepwlib及e:h323sourc
?? CXX
?? 第 1 頁 / 共 3 頁
字號:
/*
 * xlibvid.cxx            
 *                           
 *This file contains the class heirachy for 1)creating windows under xlib.
 *                                          2)displaying data on those windows
 *                                          3)converting image formats.
 *
 * Copyright (c) 1999-2000 Indranet Technologies ltd
 * 
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.0 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 * 
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 * the License for the specific language governing rights and limitations
 * under the License.
 * 
 * The Original Code is Open H323
 * 
 * The Initial Developer of the Original Code is Equivalence Pty. Ltd. 
 * 
 * Contributor(s): Author Derek J Smithies (derek@indranet.co.nz)
 *
 * Note the license of this file was changed to the above with the full
 * permission of the authors.
 *
 * $Log: xlibvid.cxx,v $
 * Revision 1.20  2003/03/18 07:11:34  robertj
 * Removed openh323 versions of videoio.h classes as PVideoOutputDevice
 *   descendants for NULL and PPM files added to PWLib.
 *
 * Revision 1.19  2002/10/08 08:19:19  dereks
 * Fix so compiles with gcc 3.2 (Redhat 8.0)
 *
 * Revision 1.18  2002/06/27 02:17:40  robertj
 * Renamed video format 411 to the correct 420P, thanks Mark Cooke
 *
 * Revision 1.17  2001/05/25 01:14:44  dereks
 * Alter SetFrameSize & OpenWindo to use unsigned variables. Change type of
 * other variables to eliminate compiler warnings.
 *
 * Revision 1.16  2001/05/03 02:28:35  robertj
 * Fixed problem with KDE events, thanks Tom Dolsky
 *
 * Revision 1.15  2000/12/19 22:35:53  dereks
 * Install revised video handling code, so that a video channel is used.
 * Code now better handles the situation where the video grabber could not be opened.
 *
 * Revision 1.14  2000/09/27 03:06:13  dereks
 * Added lots of PTRACE statements to xlib code.
 * Removed X videoMutex from main.cxx & main.h
 * Removed some weird display issues from X code.
 *
 * Revision 1.13  2000/09/15 03:36:29  dereks
 * remove debug message
 *
 * Revision 1.12  2000/09/13 23:58:12  dereks
 * Corrected bug in video display. Now correctly handles 8, 16, 32 bit colour
 * Correctly handles 8 bit grayscale.
 *
 * Revision 1.11  2000/09/08 06:49:14  craigs
 * Removed extensive comment at end of file
 *
 * Revision 1.10  2000/09/08 03:43:00  dereks
 * Fix 8 and 16 bit display options.
 *
 * Revision 1.9  2000/08/21 04:41:58  dereks
 * Add parameter to set a)transmitted video quality and b)number of unchanged
 * blocks that are sent with every frame.
 * Fix some problems introduced with --videopip option.
 *
 * Revision 1.8  2000/08/07 03:47:42  dereks
 * Add picture in picture option (only for  X window display), better handling
 * of X windows. Handles situation where user selects cross on a X window.
 *
 * Revision 1.6  2000/07/03 06:35:20  craigs
 * Added ability for video to work on 24, 16 and 8 bit visuals
 *
 * Revision 1.5  2000/05/02 04:32:25  robertj
 * Fixed copyright notice comment.
 *
 */

#ifdef HAS_X11
#include <X11/Xatom.h>
#include <sys/time.h>
#include <unistd.h>
#include <ptlib.h>
#include <string.h>
#include "xlibvid.h"


int             GenericXlibVideoDevice::nWindowsOpen=0;
Window          GenericXlibVideoDevice::win[2];
Display        *GenericXlibVideoDevice::display;
GC              GenericXlibVideoDevice::gc;
Visual         *GenericXlibVideoDevice::visual; 
PMutex          GenericXlibVideoDevice::videoMutex;
Colormap        GenericXlibVideoDevice::colormap;

int             GenericXlibVideoDevice::pixelDepth;
int             GenericXlibVideoDevice::byteDepth;
BOOL            GenericXlibVideoDevice::useGrayScale;
int             GenericXlibVideoDevice::nGrayColors;
unsigned long   GenericXlibVideoDevice::grayColors[64  ];
float           GenericXlibVideoDevice::grayScaleFactor  ;

int             GenericXlibVideoDevice::redLoose;
int             GenericXlibVideoDevice::greenLoose;
int             GenericXlibVideoDevice::blueLoose;
int             GenericXlibVideoDevice::redPos;
int             GenericXlibVideoDevice::greenPos;
int             GenericXlibVideoDevice::bluePos;

XImage         *GenericXlibVideoDevice::images[4];
BYTE           *GenericXlibVideoDevice::pixels[4];

int             GenericXlibVideoDevice::displayWidth[2];
int             GenericXlibVideoDevice::displayHeight[2];

XShmSegmentInfo ShmXlibVideoDevice::shminfo[4];


//Error handler for messages from X. cannot be included in a class.
int  XLibErrorHandler(Display *dpy,XErrorEvent *ee)
{
#if 0
  cerr<< "Error handler called in "<<getpid()<<endl
      << " Error is "<<::hex<<(int)ee->error_code<<" "
      << (int)ee->request_code<<" "<<(int)ee->minor_code<<::dec<<endl;
  if(ee->error_code==BadDrawable)
    cerr <<"Internal error. Code attempted to manipulate non existant window"<<endl;
#endif
  return(00);
}

void segvhandler(int signo)
{

  cerr<<"##########################################"<<endl;
  cerr<<"##########################################"<<endl;
  cerr<<"SEGV error ("<<signo<<") in pid "<<getpid()<<endl;
  PTRACE(0,"XDisplay\t segvhandler called");
  usleep(1000);
  exit(0);
}



//////////////////////////////////////////////////////////////////////////
//
//  Generic Xlib functions
//
GenericXlibVideoDevice::GenericXlibVideoDevice(const PString & _remoteName,BOOL _isEncoding, 
                                                 BOOL _videoPIP)
{
       videoMutex.Wait();
       PTRACE(3,"Generic\t constructor start.");
       
       remoteName = _remoteName; n_bytes=0; forceDepth = 0;

       isEncoding= _isEncoding;
       videoPIP  = _videoPIP;

       width=0;
       height=0;

       pixels[xIndex(0)]=NULL; pixels[ xIndex(1) ]=NULL;
       images[xIndex(0)]=NULL; images[ xIndex(1) ]=NULL;

       //        XSetErrorHandler(XLibErrorHandler);
       // signal(SIGSEGV,segvhandler);
       videoMutex.Signal();
}

GenericXlibVideoDevice::~GenericXlibVideoDevice()
{ 
  Close();
}

BOOL GenericXlibVideoDevice::Open(const PString &, BOOL)
{
	return TRUE;
}

BOOL GenericXlibVideoDevice::Close()
{
       videoMutex.Wait();
       PTRACE(3,"Xdisplay\t Close Start");
       CloseWindow();
       PTRACE(3,"Xdisplay\tClose DONE");
       videoMutex.Signal();
       return TRUE;
}

PStringList GenericXlibVideoDevice::GetDeviceNames() const
{
	return PStringList();
}

PINDEX GenericXlibVideoDevice::GetMaxFrameBytes()
{
	return 0;
}

BOOL GenericXlibVideoDevice::SetFrameSize (unsigned _width, unsigned _height)
{
    videoMutex.Wait();
    PTRACE(3,"XDisplay\t SetFrameSize Start for the "<<DirectionStr()<<" window" );
     if ((width != _width) || (height != _height)) {
        PTRACE(3,"XDisplay\t Requested internal size of "<<_width<<"x"<<_height);
        PTRACE(3,"XDisplay\t did not match internal size of "<<width<<"x"<<height);
        CloseWindow();               //Close memory for images 
        OpenWindow(_width,_height);  //Allocate memory for images.
     }
     PTRACE(3,"XDisplay\tSetSize DONE for the "<<DirectionStr()<<" window" );
     videoMutex.Signal();

     return TRUE;
}

BOOL GenericXlibVideoDevice::OpenWindow(unsigned _width, unsigned _height)
{
  PTRACE(3,"XDisplay\tOpenWindow of size "<<_width<<"x"<<_height<<
            " "<<DirectionStr()<<" window");
    if ((_width == 0) || (_height == 0))
       return FALSE;     //refuse to open a window containg 0 pixels.
   // save parameters
    width     = _width; 
    height    = _height;
    n_bytes   = width*height;
    useImage0 = 0;


   if(videoPIP && isEncoding) {
     //Need to do picture in picture. Check first if parent exists.
      if(nWindowsOpen==0)
	return FALSE;    //parent does not exist
    }

  // open display and screen
  if (nWindowsOpen==0) {
      display = XOpenDisplay(NULL);  
      if (display == NULL) {
          cerr << "Failed to open display in GenericXlibVideoDevice::OpenWindow"<<endl;
         PTRACE(0,"OpenWindow\t Failed to open display for XWindows");
         return FALSE;
      }
  }
  screen = DefaultScreen(display);


  if(( nWindowsOpen==0 ) && (!DetermineVisualInformation())) {
    XCloseDisplay(display);
    display=NULL;
    return FALSE;
  }

  XSetWindowAttributes attributes;
  int attributeMask = 0;


  attributeMask       |= CWColormap;
  attributes.colormap = colormap;

  attributeMask       |= CWBorderPixel;
  attributes.border_pixel = 0;

  Window   rootWindow;
  if(videoPIP&&isEncoding) {
      rootWindow= win[xReceiveIndex()];
      attributeMask |= CWOverrideRedirect;
      attributes.override_redirect= FALSE;   //Remove border for the inset picture.
   }  else
      rootWindow=RootWindow(display,screen);

  unsigned int xpos,ypos,border_width;

  displayWidth[xIndex()] =width; 
  displayHeight[xIndex()]=height;
  xpos=ypos= 10;
  border_width=5;
  if(videoPIP) {
     if(isEncoding) {
        displayWidth[xIndex()] =width/2; 
        displayHeight[xIndex()]=height/2;
        border_width=0; 
        xpos= displayWidth[xReceiveIndex()] -(width/2);
        ypos= displayHeight[xReceiveIndex()]-(height/2);;
     } else {
        displayWidth[xIndex()] =width*2; 
        displayHeight[xIndex()]=height*2;
      }
  } 

  win[xIndex()] = XCreateWindow(display,
                        rootWindow,
                        xpos,ypos,
                        displayWidth[xIndex()],
                        displayHeight[xIndex()],
                        border_width,
                        pixelDepth,
                        InputOutput,
                        visual,       
                        attributeMask, &attributes);
  if (win[xIndex()] == 0) {
    PTRACE(0,"XDisplay\t Failed to open "<<DirectionStr()<< "window. ");
    cerr << "Allocation of X window failed" << endl;
    if(nWindowsOpen)
       return FALSE;
    FreeColormapInformation();
    n_bytes=0;
    return FALSE;    
  } 

  nWindowsOpen++;
  XSizeHints size_hints;
  size_hints.flags = PSize | PMinSize | PMaxSize;  //Prevent resizing.
  size_hints.min_width =  displayWidth[xIndex()];
  size_hints.max_width =  displayWidth[xIndex()];
  size_hints.min_height = displayHeight[xIndex()];
  size_hints.max_height = displayHeight[xIndex()];

  // Set name of window, used to display receive or send images.
  PString str1;
  if (remoteName *= "Local")
    str1= remoteName;
  else
    str1= PString("From ") & remoteName;
  XSetStandardProperties(display,
                         win[xIndex()],
                         (const char *)str1,
			(const char *)str1, /*remoteName,*/
                         None,0,0,&size_hints); 

  XSelectInput(display, win[xIndex()], 0);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av资源站一区| 日韩精品一区二区三区在线| 欧美男生操女生| 国产亚洲欧美激情| 亚洲精品久久7777| 国内精品久久久久影院一蜜桃| 北条麻妃国产九九精品视频| 91精品国产aⅴ一区二区| 日韩理论在线观看| 狠狠色丁香久久婷婷综| 欧美色涩在线第一页| 欧美韩日一区二区三区| 日韩成人免费电影| 欧美在线一二三四区| 欧美激情在线看| 久久99国产精品尤物| 色嗨嗨av一区二区三区| 久久美女高清视频| 视频一区国产视频| 国产一区二区免费在线| 欧美一级搡bbbb搡bbbb| 亚洲国产精品一区二区www在线| 粉嫩蜜臀av国产精品网站| 精品欧美久久久| 日本亚洲欧美天堂免费| 欧美日韩国产另类不卡| 亚洲激情在线激情| 91丨九色丨尤物| 国产精品另类一区| 成人午夜看片网址| 国产欧美日韩中文久久| 激情五月播播久久久精品| 制服丝袜日韩国产| 视频一区二区三区中文字幕| 欧美中文字幕亚洲一区二区va在线| 国产精品久久久久久亚洲毛片| 国产一区二区在线观看免费| 精品国产电影一区二区| 国产中文字幕一区| 91精品国产91久久综合桃花| 日韩精品一级中文字幕精品视频免费观看| 色婷婷久久99综合精品jk白丝| 国产精品免费aⅴ片在线观看| 高清国产一区二区三区| 欧美韩国日本一区| 972aa.com艺术欧美| 亚洲同性同志一二三专区| 99久久免费视频.com| 亚洲精品va在线观看| 欧美男生操女生| 精品在线你懂的| 久久综合狠狠综合| 国产91丝袜在线播放| 亚洲欧洲美洲综合色网| 日本道色综合久久| 日日夜夜免费精品| 精品国免费一区二区三区| 国产成a人亚洲精品| 亚洲视频在线一区| 欧美少妇xxx| 精品一区免费av| 欧美激情一二三区| 欧美视频在线一区二区三区 | 久久国产精品第一页| 精品国产欧美一区二区| 国产精品原创巨作av| 国产精品福利影院| 欧美视频一区二区三区四区 | 综合av第一页| 欧美综合一区二区| 久久99久久99精品免视看婷婷 | 色婷婷综合久久久中文一区二区 | 成人一道本在线| 一区二区三区免费看视频| 91精品久久久久久久99蜜桃| 国产九色sp调教91| 一区二区三区在线免费播放| 精品久久久久久久人人人人传媒| 丁香婷婷综合色啪| 亚洲午夜国产一区99re久久| 日韩欧美高清一区| 91亚洲永久精品| 日av在线不卡| 亚洲人123区| 日韩精品一区二| 欧美性猛交xxxx乱大交退制版 | 蜜臀久久99精品久久久久久9 | 精品精品国产高清一毛片一天堂| av在线综合网| 狠狠色狠狠色合久久伊人| 亚洲精品少妇30p| 久久男人中文字幕资源站| 欧美性大战久久久久久久| 国产一区二区不卡老阿姨| 亚洲成人自拍偷拍| 国产精品久久久久久久岛一牛影视 | 91精品国产一区二区三区香蕉| 白白色 亚洲乱淫| 国产精品自在欧美一区| 天天操天天干天天综合网| 国产精品久久毛片av大全日韩| 日韩精品一区二区三区视频 | 99精品国产99久久久久久白柏| 免费成人你懂的| 亚洲午夜免费福利视频| 自拍偷拍欧美精品| 国产精品乱码久久久久久| 久久久久亚洲蜜桃| 日韩久久久精品| 日韩一区二区三区在线视频| 在线免费一区三区| 日本韩国欧美一区| 91视频xxxx| 99国产精品久久久久久久久久久| 国产美女av一区二区三区| 久久电影网站中文字幕| 三级在线观看一区二区| 天堂精品中文字幕在线| 五月综合激情网| 日韩高清不卡一区| 日韩专区在线视频| 奇米在线7777在线精品| 丝袜美腿亚洲色图| 日本不卡一区二区三区高清视频| 亚洲成人免费影院| 日韩国产欧美在线视频| 日韩激情在线观看| 久久国产精品一区二区| 激情综合五月天| 大尺度一区二区| 97久久超碰国产精品电影| 一本大道av伊人久久综合| 色婷婷综合久色| 这里只有精品免费| 欧美成人一区二区| 中文字幕乱码久久午夜不卡| 国产精品成人免费在线| 夜夜精品视频一区二区| 日韩精品视频网站| 国产一区二区三区综合| 成人精品一区二区三区中文字幕| 成人精品高清在线| 欧美在线一二三四区| 日韩欧美电影一区| 国产精品国模大尺度视频| 一区二区不卡在线视频 午夜欧美不卡在| 依依成人综合视频| 免费精品视频在线| 成人激情小说网站| 精品视频色一区| 欧美成人一区二区三区片免费 | 欧美日韩国产高清一区二区| 日韩亚洲欧美高清| 国产精品久久久久久户外露出| 一区二区三区日韩欧美| 另类小说色综合网站| 成人黄色国产精品网站大全在线免费观看| 91浏览器在线视频| 精品久久人人做人人爽| 亚洲日本韩国一区| 久久成人免费网站| 91老师国产黑色丝袜在线| 欧美一区二区三区啪啪| 国产精品国产三级国产a| 水野朝阳av一区二区三区| 成人激情小说网站| 日韩一区二区免费视频| 亚洲精品一二三区| 国内精品免费**视频| 欧美日韩久久不卡| 中文成人av在线| 久久电影网电视剧免费观看| 日本韩国欧美一区| 亚洲国产精品t66y| 九九精品视频在线看| 欧美日韩精品是欧美日韩精品| 国产欧美综合在线观看第十页| 天堂影院一区二区| 欧亚一区二区三区| 亚洲视频在线观看一区| 黄一区二区三区| 91精品国产综合久久福利| 亚洲精品日韩一| 不卡影院免费观看| 久久日一线二线三线suv| 肉丝袜脚交视频一区二区| 91丨国产丨九色丨pron| 国产日韩一级二级三级| 久久97超碰色| 欧美一区二区三区成人| 亚洲成人av在线电影| 91成人在线观看喷潮| 亚洲国产精品国自产拍av| 激情五月婷婷综合| 精品久久久久久久久久久院品网| 日本在线不卡一区| 欧美日韩激情在线| 亚洲二区在线观看| 精品少妇一区二区三区免费观看| 香蕉av福利精品导航|