Audio and video communication two times data transmission in development

Source: Internet
Author: User
Communication between people is now mostly done through instant messaging, and these tools have the basic function of file transfer. Then use this function after two development by using Instant Messenger, the following is an example of the Anychat interactive development platform of the leading audio video technology in China, which realizes the file transfer function. Anychat supports the file transfer speed limit feature since the Anychat SDK version V4.1.0.1. By default, anychat file transfer and buffer transfer are automatically detected on the network available bandwidth, and according to the "shortest time, fastest speed transmission" principle of network transmission, this principle can adapt to most applications, but in some applications, the need to reserve some bandwidth to other modules, You do not want the Anychat file transfer to occupy all of the network bandwidth, in which case the speed limit function can be used. Anychat File transfer speed limit is set for local file upload, and is to control the total upload rate, such as the set speed limit is 500kbps, when the simultaneous transmission of 1 files, the maximum upload speed of 500kbps, if you upload 2 files at the same time, The maximum upload speed for each file is 250kbps, and so on.Brac_transfileBrac_transbufferexTwo APIs are controlled by the transfer speed limit function. The transmission speed limit interface is defined as follows: 1.//transmission buffer, file maximum bitrate control (parameter int, 0 unrestricted, the fastest rate of transmission [default], otherwise, the limit code rate, in bps) 2. #defineBRAC_SO_NETWORK_ Transbufmaxbitrate Anychat platform By default is to turn off the transfer speed limit function, the Open method can refer to the following code (initialization of the SDK after successful call valid, can be called where needed, dynamic adjustment): 1.//limit upload speed of 500kbps (62kBps ) 2.DWORD dwmaxuprate = * 1000;3.brac_setsdkoption (brac_so_network_transbufmaxbitrate, (constchar*) & Dwmaxuprate, sizeof (DWORD)); To cancel the transfer speed limit function, refer to the following code: 1.//Cancel Speed limit function 2. DWORD dwmaxuprate = 0;3.brac_setsdkoption (Brac_so_network_transbufmaxbitrate, (constchar*) &dwMaxUpRate, sizeof ( DWORD));

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.