摘要 |
A method and a device for transmitting media data are provided, where a device sending the media data and a device receiving the media data are currently located in a same wireless network, and the method includes: acquiring, by the sending device, a frequency band of the wireless network; determining, by the sending device, whether the frequency band of the wireless network is a set frequency band; and if yes, setting a media data encoding mode of the sending device to non-compression, and sending, by the sending device, media data that is not compressed to the receiving device; or if the frequency band of the wireless network is not the set frequency band, setting a media data encoding mode of the sending device to compression, and sending, by the sending device, media data that is compressed to the receiving device. This solution reduces a delay caused by compression, reduces resources consumed by the sending device for data compression, and also reduces resources consumed by the receiving device for decompression. |