mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-20 03:23:07 +00:00
Fix order of initialization of streams.
This commit is contained in:
parent
0a445b9add
commit
c631649867
@ -87,9 +87,9 @@ public class NvAudioStream {
|
||||
|
||||
startDepacketizerThread();
|
||||
|
||||
startUdpPingThread();
|
||||
|
||||
startDecoderThread();
|
||||
|
||||
startUdpPingThread();
|
||||
}
|
||||
|
||||
}).start();
|
||||
|
@ -76,6 +76,7 @@ public class NvConnection {
|
||||
|
||||
if (inputStream != null) {
|
||||
inputStream.close();
|
||||
inputStream = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@ import com.limelight.nvstream.av.AvByteBufferPool;
|
||||
import com.limelight.nvstream.av.AvDecodeUnit;
|
||||
import com.limelight.nvstream.av.AvRtpPacket;
|
||||
import com.limelight.nvstream.av.video.AvVideoDepacketizer;
|
||||
import com.limelight.nvstream.av.video.AvVideoPacket;
|
||||
|
||||
import jlibrtp.Participant;
|
||||
import jlibrtp.RTPSession;
|
||||
@ -153,19 +154,6 @@ public class NvVideoStream {
|
||||
return;
|
||||
}
|
||||
|
||||
// Start the receive thread early to avoid missing
|
||||
// early packets
|
||||
startReceiveThread();
|
||||
|
||||
// Start the keepalive ping to keep the stream going
|
||||
startUdpPingThread();
|
||||
|
||||
// Start the depacketizer thread to deal with the RTP data
|
||||
startDepacketizerThread();
|
||||
|
||||
// Start decoding the data we're receiving
|
||||
startDecoderThread();
|
||||
|
||||
// Read the first frame to start the UDP video stream
|
||||
try {
|
||||
readFirstFrame(host);
|
||||
@ -175,6 +163,19 @@ public class NvVideoStream {
|
||||
return;
|
||||
}
|
||||
|
||||
// Start the receive thread early to avoid missing
|
||||
// early packets
|
||||
startReceiveThread();
|
||||
|
||||
// Start the depacketizer thread to deal with the RTP data
|
||||
startDepacketizerThread();
|
||||
|
||||
// Start decoding the data we're receiving
|
||||
startDecoderThread();
|
||||
|
||||
// Start the keepalive ping to keep the stream going
|
||||
startUdpPingThread();
|
||||
|
||||
// Render the frames that are coming out of the decoder
|
||||
outputDisplayLoop(this);
|
||||
}
|
||||
|
@ -52,6 +52,9 @@ public class AvAudioDepacketizer {
|
||||
// Put it on the decoded queue
|
||||
decodedUnits.add(new AvShortBufferDescriptor(pcmData, 0, decodeLen));
|
||||
}
|
||||
else {
|
||||
pool.free(pcmData);
|
||||
}
|
||||
}
|
||||
|
||||
public void releaseBuffer(AvShortBufferDescriptor decodedData)
|
||||
|
Loading…
x
Reference in New Issue
Block a user