外文翻译 - 基于Qt设计和实现的跨平台视频会议远程控制_第1页
外文翻译 - 基于Qt设计和实现的跨平台视频会议远程控制_第2页
外文翻译 - 基于Qt设计和实现的跨平台视频会议远程控制_第3页
外文翻译 - 基于Qt设计和实现的跨平台视频会议远程控制_第4页
外文翻译 - 基于Qt设计和实现的跨平台视频会议远程控制_第5页
已阅读5页,还剩11页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

TheDesignandImplementationofQt-basedCross-platformVideoConferencingRemoteControlHuaYuan,HuixinDuSchoolofComputerScienceandEngineering,SouthChinaUniversityofTechnology,Guangzhou,ChinaEmail:,Received2012ABSTRACTInordertoovercomethedefectsofthededicatedvideoconferenceremotecontrol,thispaperdesignsandimplementsaQt-basedcross-platformvideoconferencingremotecontrol.Theremotecontrolnotonlyimplementsafullrangeofvideoconferencingcontrolfunctionswithaneasy-to-usevisualinterface;butalsoimplementcross-platformfeaturetoallowuserstouseremotecontrolsoftwareontheirownequipment.Itiseconomic,convenientandstylishforusers.Thispapermainlydescribesthedesignandimplementationofremotecontrolsystemframeworkandcross-platformfeatures.Finally,theresultinthepapershows:Thisremotecontrolisreliableandeasytouse.Keywords:VideoConferencingRemoteControl;Cross-platform;Visualization1.IntroductionAsthedirectdisplayinfrontofusers,videoconferencingremotecontrolisinclosecontactwiththeparticipants.Ithasadirectimpactontheuseofusers.Atpresent,mostofvideoconferencingremotecontrolsarededicatedin-fraredremotecontrols,suchasPolycom.Thiskindofremotecontrolsendsthecontrolinstructiontoterminalsviainfrared.Althoughthespeedofitscommunicationisfast,therearesomeshortcomings,suchaslessversa-tile,weakvideoconferencingsupportingfunction,dis-tancelimitationsandlackofvisualinterface.Inrecentyears,withthedevelopmentofsmartmobiledevices,therearemanyattemptsofdevelopingremotecontrolsoftwareonsmartmobiledevices1,2,suchasFLPRUniversalRemotemadebyAppCessory.AnIOSproductwithFLPRUniversalRemoteconnectstootherappliancesbyinfraredtransmitter,andthendownloadsremotecommandsfor46000differentappliances.SotheusercanusesuchanIOSproducttoremoteappliances.However,mostofthisremotecontrolsoftwareareplat-formdependenceanddedicated.Theylimituserschoic-esontheremotecontrolhardware.Ifwecangenerateremotecontrolsoftware,whichcanturnanysmartmobiledevicestoaremotecontrolbyinstallingit,itwillbringgreatconvenienceforuserstostarttheirvideoconferencingcontrol.Itwillbeeco-nomicalandfashiontousesucharemotecontrol.Therefore,thispaperpresentsaprogramaboutdesignandimplementationthecross-platformvideoconferenc-ingremotebasedonQt.Qtisacross-platformdevelop-mentframework.Toensuretherealizationofcross-platformremotecontrolsystem,weneedtodevelopre-motecontrolsystembasedonQtwithsomespecializeddesignandcodingwork.Themodulardesignisalsoneededforreducingthecouplingofthesystem,sothattheremotecontrolsystemwillhavegoodscalability.2.DesignofRemoteControlSystemAsanindependentsystem,remotecontrolisresponsibleforobtainingtherelevantmeetinginformationandcon-trollingvideoconferencingterminal.Soitneedstousemultipleprotocolstocommunicatewithmultipleobjects.Itmayleadtotheinformationhandlingconfusion.Duetothediversityoftheremotecontrolfunction,multi-interfaceisusedforuser-friendlyoperation.Andtheim-plementationofcross-platformandscalabilityalsoasksforamodularstructure.Therefore,thearchitecturede-signofremotecontrolsystemshouldbebasedonmodu-larasthestandard.TheremotecontrolsystemframeworkdesignisshownasFigure1.Theremotecontrolsystemframeworkisdividedintothreelayers:UIlayer,logiclayerandcom-municationlayer.TheUIlayerismainlyusedtoprovideuserswithafriendlyvisualinterface.Theinterfacemodulecontainsanumberofuserinterfaces,suchaslogininterface,con-ferencelistinterface,meeting-placeinterfaceandtermi-nalcontrolinterface.Logiclayerissimilartoadispatcher.Itisresponsibleforprocessingthesignalfromtheupperorlowerlayerandthensendingthedataofthesignaltothecorre-spondingmodule.ItmakestheUIlayerandcommunica-tionlayernotneedtoconsiderwhethertheirsignaliscorrectlypassedtothecorrespondingmoduleandhowtodealwith.Theyonlyneedtoconsidertheirownfunc-tions.Thelogiclayeritselfdoesnotdealwithdatabutonlydistributethedata.WhenthelogiclayerreceivescontrolsignalfromUIlayer,logiclayercallscorre-spondingslottotransferthedatatorelevantcommunica-tionmodule,sothatthedatatransferfromUIiscom-pleted.ThetransferfromcommunicationlayerissimilartothetransferfromUIlayer.Communicationlayerjustneedstosendoutasignalwhenitreceivesadatapacketfromtheserverorterminal.LogiclayerwillcatchthissignalbyrelevantslotandsendoutanupdateUIsignalautomaticallytotriggertheinterfaceupdate.Asakeypartofcommunicationwork,communicationlayerisresponsibleforestablishingaconnection,encap-sulatinganddecapsulatingdata,sendingandreceivingpackets.Thislayercontainstwomodules,servercom-municationmoduleandterminalcommunicationmodule.Theservercommunicationmoduleishandlingfortheserver-relatedcommunicationwork,suchasmeetinginformationacquisition,identityauthentication,confer-encesloginandlogout.Becauseofthecommunicationwithserverusingtwodifferentprotocols,thismodulealsoincludestwosub-modules,Sipsub-moduleandHttpsub-module.Sipprotocol3isthebasisofvideocon-ferencingsystems.AlltheconferencecontroldataistransmittedthroughSipprotocol.Httpprotocol4isusedtogetthosekindsofconferenceinformationwhosedataishuge.Sothateveninthefaceofbadhardwareconditions,remotecontrolcanstillgetintegratedandreliabledatainhighspeed.Figure1.Frameworkdesignofremotecontrolsystem.Terminalcommunicationmoduleisusedtohandleallthecommunicationsforcontrollingterminal,includingcontrolofterminalaudioandvideostream,volumecon-trol,terminalmousecontrolandstatesynchronization.SystemusesTcpsocketconnectionforthecommunica-tionbetweenremotecontrolandterminal.Jsonisusedtoencapsulatedata.TheMagicPacketmoduleisusedtosendthemagicpackettotheLAN,inordertoenablethewake-upfunction.Signalandslotmechanismisusedfortheinterfacebetweenlayers.ItisaQtuniquemechanism.Itisde-signedspecificallyforcommunicationbetweenobjects.Itsbigadvantageisthatbothsidesofcommunicationdontneedtoknowwhotheobjectcommunicateswith.Sousingsignalandslotmechanismastheinterfacein-creasescohesionandreducescoupling.Itsagreathelpthesystemtoimplementarchitecturemodular.3.ImplementofRemoteControlSystemTheremotecontrolinthispaperusesacross-platformdevelopmentframeworkQtandC+programminglan-guage.Qtprovidesdeveloperswiththegraphicrelatedclasslibrariesandtheconnectionmanagementclassli-brariessuchasQWidgetandQNetworkAccessManager5,usingQtcanbeeasilyimplementedmostofthefunctionalityoftheremotecontrol.TheSipmoduleofourremotecontrolisbasedontheOSIPclasslibraryandisprogramminginC+language.TheworkflowoftheremotecontrolisshowedasFig-ure2.Whentheuseroperatestheinterfaceoftheremotecontrol,theinterfacewillsendasignalfortriggeringtheslotfunctioninthelogiclayer.Theslotfunctiononlogiclayerwillanalyzethissignalandsendoutanewsignalwhichisboundwiththecorrespondingcommunicationmodule.Asthesignalandtheslotfunctionismutuallybound,theslotcorrespondingtothecommunicationmodulewillbeabletosuccessfullytrigger,thentheslotencapsulatesthedataandsendsthedatapackettothecorrespondingcommunicationobject.Incontrast,whenthecommunicationobjectsendsamessagetotheremotecontrol,thecorrespondingcom-municationmodulereceivesandparsesthepacket,thensendsoutthesignalwhichcontainstherelevantdata.Thelogiclayerreceivesthesignalandtriggerstheslotfunc-tion,andthenthesignalwillbesendtotheUIlayerbytheslotfunction.WhentheinterfacecomponentsoftheUIlayerdetectsthesignalwhichisboundtoitsownslotfunction,itwillbeupdatedautomaticallyaccordingtothesignaldata.4.ImplementofCross-platformFeatureToimplementationcross-platformfeature,thecross-platformideasshouldbeimplementedthroughoutthedevelopmentcycle.Inthispaper,werealizethecross-platformcharacteristicsbychoosingacross-platformlanguage,designing,codingandcompiling.Figure2.Workflowoftheremotecontrolsystem.4.1.Cross-platformLanguageThispaperchoosesQtasaprogramdevelopmentlan-guage.Qtisahigh-levelC+basedlanguage.Ithasagoodcross-platformfeature,supportingforembeddedLinux,Windows,Linux/X11,theWindowsCE,Symbian,MeeGoandotherembeddedandPCoperatingsystems5.Qthasasetofcorrespondingunderlyingclassli-brariesforeachsupportedoperatingsystemplatform,buttheinterfaceofeachisentirelyconsistent,sothepro-gramdevelopedbyQtcanbecompiledandusedunderdifferentoperations.Qtcandoasmuchaspossibletohelpdevelopertoimplementationcross-platformfeaturesatthebottom.4.2.CodeModificationforCross-platformFeatureModifytheframeworkandcodeaccordingtotheopera-tionofthedifferentplatforms.Asthepreviouslymen-tioned,theQtcross-platformframeworkhasbeenimplementthebasiccross-platformfunctionalityforthedevelopers,butItcanonlyguaranteetoproperlyruntheprogramondifferentplatforms,cannotguaranteethatnofunctionaldifferences.TheSipprotocolisspecificallydesignedforthemul-timediaconferencing;therefore,itcontainsallthebasicconferencecontrolfunction.However,itmaintainsasame“seqnum”ontheserverandtheremotecontrolforsynchronization.Whenreceivingalargeamountofcon-ferencingdataonaremotecontrolwhoseperformanceispoor,itmaycausetheserverandtheremoteoutofsync,resultinginthepacketlossandreturntheerrormassage“500RequestoutofOrder”.Toavoidthis,theHTTPmoduleisaddedinthecommunicationlayer,itsusedtoreceivethelargeamountofconferencingdatasuchasconferencelistandmemberlist.4.3.AdaptiveInterfaceDesignforDifferentDevicesTheQtprovidesdeveloperswithavarietyofplatform-style6:Windows,Motif,Macetc.Whendevelopersdonothaveacertainstylesettingsfortheinterface,theQtwillusethecorrespondingplatforminterfacestyle.However,differentinterfacestylesmaybringtheriskofcross-platforminterfacedifferences.Fortheaboverea-sons,mostofthecomponentsusecustomstylesorre-drewtheirappearance,inordertoavoiddifferentplat-formstoshowdifferently.QtprovidestheuserwithstyledescriptionsyntaxwhichissimilarwiththeCSSStyleSheet,sothatusercansetthecomponentstocustomstylebyusingthe“setStyleSheet”functioninthecodeandsetthestylesettingsbyusingthestyleeditingwin-dowwhichisprovidedbytheQtDesigner7.ThedifferencesbetweentheportabledevicesandPCequipmentalsocauseoperationaldifferences,soweaddthedragActiontoavoidthedouble-clickaction.Forexample,whenchoosingthereceiveusersvideostream,thedesignonPCisdouble-clicktheusertoreceivethevideo,however,ifthesystemisportedtoaportablede-vicetheusercannotoperate.Therefore,wechangethevideoreceiveoperationtodragtheusertothecorre-spondinginthepreviewbox.Inthis,regardlessoftheplatform,usercanveryeasyandintuitivetooperate.4.4.CompilerQtprovidesatoolQmake,whichisspecificallyfortransferringtheplatform-independentprojectcodetotheplatform-dependentMakefile.EfilefortellingQmaketocreatethedetailsoftheapplicationmakefile,suchasthelistofheaderfilesandsourcefilesoftheprogram,thespecificconfigurationoftheapplication,theadditionallibrariesoradditionalin-cludepaths,etc.Afterthedevelopercompletedthecod-ing,usingtheQmakecommandwillgeneratethecorre-spondingMakefile,makefile.release,makefile.debugandthedebug,releasedirectoryaccordingtothe.rofile.Makefileistheplatform-dependentfile,isusedtodefineaseriesofrulestotelltheplatformcompilerwhichfilesneedtocompile,evensomecomplexoperations.Make-filehastwoversions:debugandrelease.Thedebugver-sionwillbesomeadditionalprocessing,printingmorelogfordebugging.Thereleaseversionisgenerallyusedforthereleaseoftheprogram.Itwillturnoffunneces-sarylog.Butbothareabletogenerateanexecutableprogram.ThususingMakefileandthecorrespondingcompliercangeneratetheexecutableprogramofthecorrespondingplatforminthedebugandreleasedirec-tory.ThisprocessisshowninFigure3.QtprovidestheintegrateddevelopmentenvironmentQtCreatorwhichsupportsWindow,LinuxandMacop-eratingsystem.QtCreatorisnotonlytoprovideuserswiththecodeeditor,filebrowserandclassdiagramtool,butalsointegratesQmakebuildtoolandthecorrespond-ingplatformcompiler.So,usingQtCreatorwillbeabletocompleteallofthecompiledwork.Forembeddedplatforms,thecodecannotbecompiledontheembeddedplatform,therefore,cross-compilerisusedtocompletethegenerationoftheplatformexecutable.Cross-com-pileristogeneratetheexecutablecodeforthetargetplatformonanotherplatform.TheremotecontrolforembeddedLinuxplatformisusetheScratchboxcrosscompiler.5.TestingResultOurremotecontrolisacross-platformforthePCplat-formandembeddedplatforms.Theremotecontrolcansatisfyalltherequirementsforthevideoconferencing,andprovidesuserswitharichandintuitiveuserinterface,allowinguserstooperatesmoothlywithoutmouse,key-boardandotherperipherals.Themeeting-placeinterfaceisthemaincontrolinter-faceofthevideoconferencing,itcontainsthreeparts.Fromtoptobottom,thefirstoneisthepreviewwindowwhichisusedtoshowthescreenlayoutstateofthecur-rentcontrolledterminal;thesecondpartistheterminalmemberlistwhichisusedtoshowthestateofmemberandprovidesafreedraganddropfunctionalitybetweenthepreviewwindowandthelistofmembers;thelastoneisthecontrolbuttonbarprovidesthenecessaryoperationofvideoconferencing.Theterminalcontrolinterfaceisusedforconnecting,wakingupandclosingthetargetterminal.ItcanrunonthePCplatformandtheembeddedplat-forms,includingWinXP,Vista,Win7,Linuxandem-beddedLinuxoperatingsystem.Theexperimentsshowthattheremotecontrolcanbeinstalledandruninavari-etyofsmartmobiledevicessuchassmartphones,elec-tronictablet,laptopcomputers,etc.Figure3.Compileprocess.6.ConclusionsTheremotecontrolsystemdevelopedinthispaperhasimplementedthevideoconferencingfunctionsandcross-platformfeature.ItcanrunonWinXP,Vista,Win7,LinuxandembeddedLinuxwithnodifference.Nowithasbeenputintouseinvideoconferencingsystems.REFERENCES1Win8MetroTestbed./win82FLPR./FLPR/flpr.html3J.Rosenberg,“AFrameworkforConferencingwiththeSessionInitiationProtocol(SIP),”RFC4353,2006.4A.S.Tanenbaum,ComputerNetworks,4thed.,TsinghuaUniversity,2004,pp.651-6565Qt-Cross-platformApplicationandUIFramework./6H.D.Liu,J.W.Rui,Y.D.YaoandJ.Wu,“DesignandImplementationofInternationalizedGraphicalUserIn-terfaceBasedonQt,”JournalofChineseInformationProcessing,Vol.20,2006,pp.95-99.7J.BlanchetteandM.Summerfield,“C+GUIProgram-mingwithQt4,”2nd.,PublishingHouseofElectronicsIndustry,2008.基于Qt设计和实现的跨平台视频会议远程控制HuaYuan,HuixinDuSchoolofComputerScienceandEngineering,SouthChinaUniversityofTechnology,Guangzhou,ChinaEmail:,Received2012摘要为了克服缺陷的专用视频会议远程控制,本文设计和实现了一个Qt-based跨平台视频会议远程控制。远程控制不仅实现了全方位的视频会议与一个易于使用的可视化界面控制功能;而且实现跨平台特性允许用户自行使用远程控制软件设备。为用户提供经济、方便和时尚。本文主要描述了远程控制系统的设计和实现框架和跨平台特性。最后,文中的结果表明:这种远程控制是可靠和易于使用。关键词:视频会议远程控制;跨平台;可视化1介绍直接显示在用户面前,视频会议远程控制与参与者密切接触。它有一个直接影响用户的使用。目前,大多数视频会议远程控制专用in-frared远程控制,如宝利通。这种远程控制终端通过红外发送控制指令。虽然其通信的速度,有一些缺点,比如少versa-tile,弱视频会议支持功能,dis-tance限制和缺乏可视化界面。近年来,随着智能移动设备的发展,有很多尝试开发远程控制软件在智能移动设备1、2,如应用CessoryFLPR万能遥控器。IOS产品FLPR环球远程连接到其他设备的红外发射器,然后下载远程命令46000个不同的电器。所以用户可以使用这样一个IOS产品远程设备。然而,大多数的远程控制软件要求和专用的依赖。他们限制用户的choic-es远程控制硬件。如果我们可以生成远程控制软件,它可以将任何智能移动设备远程控制通过安装它,它将带来巨大方便用户视频会议控制开始。它将eco-nomical使用这样一个遥控器和时尚。因此,本文提出了程序设计和实现了基于Qt跨平台的视频conferenc-ing远程。Qt是一个跨平台的随着框架。确保跨平台远程控制系统的实现,我们需要开发re-mote控制系统基于Qt和一些专门的设计和编码工作。所需的模块化设计也减少了系统的耦合,使远程控制系统具有良好的可伸缩性。2远程控制系统的设计作为一个独立的系统,远程控制负责获取相关会议信息和con-trolling视频会议终端。所以需要使用多种协议与多个对象通信。它可能导致信息处理混乱。由于远程控制功能的多样性,多为用户友好的操作界面。和跨平台的和可伸缩性的im-plementation还要求一个模块化的结构。因此,远程控制系统的体系结构设计应该基于modu-lar作为标准。远程控制系统框架设计如图1所示。远程控制系统框架分为三层:用户界面层,逻辑层和com-munication层。UI层主要用于为用户提供一个友好的可视化界面。接口模块包含一个用户界面,如登录界面,con-ference列表界面,会场接口和termi-nal控制接口。图1所示。远程控制系统的框架设计。终端通信模块用于处理所有控制终端的通信,包括控制终端的音频和视频、音量控制、终端鼠标控制和状态同步。系统使用Tcp套接字连接的远程控制和终端之间的交流。Json是用于封装数据。魔术包模块用于将魔法包发送到局域网,为了使唤醒功能。信号和槽机制用于层之间的接口。这是一个Qt独特的机制。它是专为对象之间的通信的设计意图。的一大优势在于,双方沟通不需要知道对象与谁。所以使用信号和槽机制作为接口大幅提高凝聚力,降低耦合。这是一个伟大的帮助系统实现模块化的体系结构。3远程控制系统的实现本文中的远程控制使用Qt跨平台开发框架和c+编程对于。Qt为开发人员提供相关的图形类库和连接管理类li-brariesQWidget和QNetworkAccessManager等5,使用Qt可以轻松实现远程控制的功能。Sip模块的远程控制是基于OSIP类库,在c+语言编程。远程控制的工作流如图2显示。当用户运行远程控制的接口,接口将发出一个信号触发逻辑层的槽函数。槽函数逻辑层将分析这个信号并发送一个新的信号与相应的绑定通信模块。信号和槽函数相互绑定,相对应的插槽通信模块能够成功触发,然后槽封装了数据和发送数据包。4实现跨平台的特性实现跨平台特性,跨整个开发周期应该实现平台的想法。在这篇文章中,我们意识到跨平台特点,选择一个支持跨平台的语言、设计、编码和编译。图2工作流的远程控制系统。4.1跨平台语言本文选择Qt程序开发对于。基于Qt是一个高级c+语言。它具有良好的跨平台特性,支持嵌入式Linux、Windows、Linux/X11,WindowsCE、塞班,MeeGo和其他嵌入式PC操作系统5。Qt有一组对应的底层类li-braries对于每个受支持的操作系统平台,但每个完全一致的接口,所以Qt开发的计划可以在不同的编译和使用操作。Qt可以尽可能帮助开发者实现跨平台的特性在底部。4.2代码修改跨平台特性修改框架和代码根据opera-tion不同的平台。以前men-tioned,Qt跨平台的框架已经基本实现跨平台功能的开发人员,但是它只能保证正确运行的程序在不同的平台上,不能保证没有功能的差异。Sip协议是专门为mul-timedia会议;因此,它包含所有基本的会议控制功能。然而,它维护了一个相同的“seqnum”服务器和远程控制同步。当收到大量con-ferencing数据在远程控制的性能很差,这可能导致服务器和远程不同步,导致丢包和返回错误按摩“500请求秩序”。为了避免这种情况,HTTP模块添加通信层,用于接收大量的会议的会议列表、列表等数据。4.3自适应界面设计为不同的设备Qt为开发人员提供了各种各样的平台风格:Windows、主题,Mac等。当开发人员没有一定的风格设置界面,Qt将使用相应的平台界面风格。然而,不同的界面风格可能带来的风险,跨平台界面的差异。上述rea-sons,大多数组件使用自

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论