公司介绍 新闻动态 硬件产品 软件产品 解决方案 成功案例 政府部门
连锁商业 金融保险 远程教学 技术支持 网上演示 合作伙伴 技术论坛
“AcMeeting远程视频会议系统”独家通过“AVSCE电信级高清视频会议产品”标准体系认证。
远程多媒体高清软件视频会议系统
  首页 >> 新闻中心 >> 正文

点对点视频会议程序VideoNet开发例解
 

  该程序可以用于两个人在LAN/Intranet(或者Internet)上进行视频会议。现在有许多视频会议程序,每个都有各自的性能提升技术。主要的问题是视频会议视频帧的尺寸对于传输来说太大。因此,性能依赖于对帧的编解码。我使用快速h263编码库来达到更好的压缩率提高速度。该程序做些小改动也可以在Internet上使用。

音频的录制与播放

  我在以前的语音会议程序中使用了RecordSound和PlaySound类,这里我将提供摘要说明RecordSound和PlaySound类的使用。

// Create and Start Recorder Thread
record=new RecordSound(this);
record->CreateThread();


// Create and Start Player Thread
play=new PlaySound1(this);
play->CreateThread();


// Start Recording
record->PostThreadMessage(WM_RECORDSOUND_STARTRECORDING,0,0);


// Start Playing
play->PostThreadMessage(WM_PLAYSOUND_STARTPLAYING,0,0);


// During audio recording, data will be available in the OnSoundData
// callback function of the RecordSound class. Here, you can place
// your code to send the data to remote host...


// To play the data received from the remote host
play->PostThreadMessage(WM_PLAYSOUND_PLAYBLOCK,size,(LPARAM)data);


// Stop Recording
record->PostThreadMessage(WM_RECORDSOUND_STOPRECORDING,0,0);


// Stop Playing
play->PostThreadMessage(WM_PLAYSOUND_STOPPLAYING,0,0);


// At last, to Stop the Recording Thread
record->PostThreadMessage(WM_RECORDSOUND_ENDTHREAD,0,0);


// To stop playing thread...
play->PostThreadMessage(WM_PLAYSOUND_ENDTHREAD,0,0);

视频捕获

  使用VFW(Video For Windows)API进行视频捕获,它提供了通过webcam进行视频捕获。VideoCapture.h 和VideoCapture.cpp包含了处理视频捕获的代码。

  如下代码说明了如何使用该类:

// Create instance of Class vidcap=new VideoCapture();
// This is later used to call display function of the main// dialog class when the frame is captured... vidcap->SetDialog(this);
// This does lot of work, including connecting to the driver// and setting the desired video format. Returns TRUE if// successfully connected to videocapture device. vidcap->Initialize();
// If successfully connected, you can get the BITMAPINFO// structure associated with the video format. This is later// used to display the captured frame... this->m_bmpinfo=&vidcap->m_bmpinfo;
// Now you can start the capture.... vidcap->StartCapture();
// Once capture is started, frames will arrive in the "OnCaptureVideo"// callback function of the VideoCapture class. Here you call the// display function to display the frame.
// To stop the capture vidcap->StopCapture();
// If your job is over....just destroy it.. vidcap->Destroy();
  要使以上代码通过编译,你应该链接适当的库:

#pragma comment(lib,"vfw32")
#pragma comment(lib,"winmm")

显示捕获的视频帧

  有许多方法和API可以显示捕获的视频。你可以使用SetDIBitsToDevice()方法直接显示,但给予GDI的函数非常的慢。更好的方法是使用DrawDib API 显示。DrawDib函数为设备无关位图(DIBs)提供了高性能的图形绘制能力。DrawDib函数直接写入视频内存,因此性能更好。

  以下代码摘要演示了使用DrawDib API显示视频帧。

// Initialize DIB for drawing... HDRAWDIB hdib=::DrawDibOpen();

本新闻共2页,当前在第1页  1  2  


 
远程多媒体高清软件视频会议系统产品服务中心


  服务电话:8610 - 51662863

            8610 - 51658631

  电子信箱:kf@AcMeeting.com

  地    址:北京市西三环北路27号

            北科大厦 1207

 
 
·解决方案

·AcMeeting 视频会议 电信版
 
·AcMeeting 视频会议 企业版
 
·AcMeeting 视频会议 标准版
 
·AcMeeting 视频会议 小企业版

 

 
 
 
 

远程多媒体高清软件视频会议系统

 

服务电话:8610 - 51662863 、 51658631

北京移动视讯网络技术有限公司 京ICP备06032535号
北京市西三环北路27号 北科大厦

Copyright © 2006 iavs.cn All rights reserved