Use larger video packets to offset the higher packet reception overhead of NaCl

This commit is contained in:
Cameron Gutman 2016-05-08 11:48:18 -04:00
parent f0b8604147
commit fcc4edb556

View File

@ -181,10 +181,15 @@ void MoonlightInstance::HandleStartStream(int32_t callbackId, pp::VarArray args)
m_StreamConfig.height = stoi(height);
m_StreamConfig.fps = stoi(fps);
m_StreamConfig.bitrate = stoi(bitrate); // kilobits per second
m_StreamConfig.packetSize = 1024;
m_StreamConfig.streamingRemotely = 0;
m_StreamConfig.audioConfiguration = AUDIO_CONFIGURATION_STEREO;
// The overhead of receiving a packet is much higher in NaCl because we must
// pass through various layers of abstraction on each recv() call. We're using a
// higher than normal default video packet size here to reduce CPU cycles wasted
// receiving packets. The possible cost is greater network losses.
m_StreamConfig.packetSize = 1392;
m_ServerMajorVersion = stoi(serverMajorVersion);
// Initialize the rendering surface before starting the connection