grabber.cxx

来自「mgcp协议源代码。支持多种编码:g711」· CXX 代码 · 共 62 行

CXX
62
字号
/*grabber.cxx      Derek J Smithies (derek@indranet.co.nz) *                 Indranet Technologies ltd (lara@indranet.co.nz) * */#include "grabber.h"void Grabber::Start(){};void Grabber::Stop(){};Grabber::Grabber(){}Grabber::~Grabber(){}void Grabber::Grab(VideoFrame *vf){      int wi,hi,colour_index;         u_int i;      grab_count++;      colour_index = 3*time(NULL);//time in seconds since last epoch.      // Provides a difference if run on two voxilla sessions.      for(hi=0;hi<height;hi++)          for(wi=0;wi<width;wi++)           frame[(hi*width)+wi]= (u_char) ( ((((grab_count+hi)/20)+colour_index)%220)+15);      for(i=0;i<(framesize>>1);i++)         frame[i+framesize]=colour_index;      vf->frameptr= frame;      vf->crvec   = 0;};void Grabber::SetSize(int _width,int _height){      width = _width;      height= _height;      framesize= width*height;};#if P_LINUX#include "grabber-linux.cxx"#elif _WIN32#include "grabber-windows.cxx"#elif P_FREEBSD#include "grabber-bsd.cxx"#elif P_OPENBSD#include "grabber-bsd.cxx"#else#include "grabber-generic.cxx"#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?