{$cfg_webname}
主页 > 计算机 > C++ >

局域网聊天系统的设计与实现(文字和语音)(TCP+UDP)☆

来源:56doc.com  资料编号:5D962 资料等级:★★★★★ %E8%B5%84%E6%96%99%E7%BC%96%E5%8F%B7%EF%BC%9A5D962
资料以网页介绍的为准,下载后不会有水印.资料仅供学习参考之用. 帮助
资料介绍

摘  要:本文介绍了采用Microsoft Visual C++ 6.0编程开发视频聊天系统的一套比较常用的解决方案。文字聊天采用TCP模式;语音视频聊天采用UDP模式,在客户端之间点对点的进行。在该方案中,通过函数库VFW来实现视频捕获、影像压缩以及影像播放。微软公司提供的专门用于视频捕获开发的工具包VFW(Vedio For Windows),为在Windows操作系统中实现视频捕获提供了标准的接口,从而大大降低了程序的开发难度。在视频传输方面,则通过组建视频帧,将位图形式的视频帧压缩成帧格式的Mpeg4流,传输到客户端后,解压并显示影像。同时,在本方案中,采用了线程来实现语音录制和语音回放,最终实现了通过服务器中转的文字聊天、点对点的语音视频聊天。

关键词: 文字聊天;VFW;视频传输;语音回放
 
Design and Implementation of  LAN-Based Chat Room System

Abstract: As a new tool about communication, video chatting system has broken through geographical restrictions, has provides more convenient, flexible and complete transmission and service. Furthermore, it has a very bright future.
    The common solution about how to develop a video chatting system is introduced by the Microsoft Visual C + + 6.0 programming. TCP model is used in the text chatting and UDP for the point-to-point video chats between the Clients. In this plan, Video Capture, Video Compression Manager and DrawDib are realized by the functions of VFW(Vedio For Windows) Library. The special kit VFW (Video for Windows) in video capture offered by Microsoft Corporation, has provided a standard interface for video capture in Windows Operating System and thus greatly reduced the hardship of programming. In video transmission aspect, it requires a video frame which is compressed the video frame of bitmap into Mpeg4 steam of frame form. Then it will be decompressed into images since it has been arrived the Client. Meanwhile, the thread is used to achieve audio recording and replaying. Finally, it has realized the text chatting through a server to transit, the point-to-point audio and video chats.

Keywords: text chatting; VFW; video transmission; audio playing


















目  录
第1章  绪论 1
1.1 课题背景及意义 1
1.2 课题现状 1
第2章  开发技术的原理性说明 2
2.1 WIN32编程(即SDK程序设计原理) 2
2.2 MFC (MICROSOFT FOUNDATION CLASS) 3
2.2.1  简介 3
2.2.2  MFC与C 语言API 的关系 3
2.2.3  MFC类库 3
2.3 TCP/IP协议及WINDOWS SOCKETS 网络编程接口 4
2.3.1  TCP/IP协议简介 4
2.3.2  Windows Socket 网络编程简介 4
2.4 多线程技术 4
2.4.1 进程及线程概述 4
2.4.2  MFC对多线程编程的支持 5
(毕业设计)
2.5  VFW简介 5
2.6  VC++ 6.0 简介 8
第3章  需求分析及可行性研究 9
3.1系统功能模块图 9
3.2需求分析 9
3.2.1 功能需求分析 9
3.2.2 性能需求分析 10
3.2.3 运行需求分析 11
3.3可行性研究 11
3.3.1 成本可行性 11
3.3.2 技术可行性 11
3.4软硬件环境 11
3.5 界面的设计 11
3.5.1  登陆界面 11
3.5.2  服务端界面设计 12
3.5.3  客户端界面设计 12
第4章  详细设计及编码实现 14
4.1 文字聊天 14
4.1.1  TCP套接字的运用 14
4.1.2  文字聊天实现 14
4.2 语音视频聊天 17
4.2.1  UDP套接字的运用 17
4.2.2  视频的捕捉 18
4.2.4  视频捕获驱动 22
4.2.5  语音录制 22
4.2.6  语音回放 23
4.2.7  视音频的传输 24
第5章  测试 26
5.1 测试 26
5.2 测试结论 26
第6章 总结与展望 27
6.1 总结 27
6.2 展望 27
毕业设计体会 28
致谢 29
参考文献 30
英文翻译资料 31

推荐资料