mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 09:25:49 +00:00
Don't start the decoder thread in pull-mode
This commit is contained in:
parent
68c784445c
commit
b58930c687
@ -197,7 +197,7 @@ void stopVideoStream(void) {
|
|||||||
|
|
||||||
PltInterruptThread(&udpPingThread);
|
PltInterruptThread(&udpPingThread);
|
||||||
PltInterruptThread(&receiveThread);
|
PltInterruptThread(&receiveThread);
|
||||||
if ((VideoCallbacks.capabilities & CAPABILITY_DIRECT_SUBMIT) == 0) {
|
if ((VideoCallbacks.capabilities & (CAPABILITY_DIRECT_SUBMIT | CAPABILITY_PULL_RENDERER)) == 0) {
|
||||||
PltInterruptThread(&decoderThread);
|
PltInterruptThread(&decoderThread);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,13 +207,13 @@ void stopVideoStream(void) {
|
|||||||
|
|
||||||
PltJoinThread(&udpPingThread);
|
PltJoinThread(&udpPingThread);
|
||||||
PltJoinThread(&receiveThread);
|
PltJoinThread(&receiveThread);
|
||||||
if ((VideoCallbacks.capabilities & CAPABILITY_DIRECT_SUBMIT) == 0) {
|
if ((VideoCallbacks.capabilities & (CAPABILITY_DIRECT_SUBMIT | CAPABILITY_PULL_RENDERER)) == 0) {
|
||||||
PltJoinThread(&decoderThread);
|
PltJoinThread(&decoderThread);
|
||||||
}
|
}
|
||||||
|
|
||||||
PltCloseThread(&udpPingThread);
|
PltCloseThread(&udpPingThread);
|
||||||
PltCloseThread(&receiveThread);
|
PltCloseThread(&receiveThread);
|
||||||
if ((VideoCallbacks.capabilities & CAPABILITY_DIRECT_SUBMIT) == 0) {
|
if ((VideoCallbacks.capabilities & (CAPABILITY_DIRECT_SUBMIT | CAPABILITY_PULL_RENDERER)) == 0) {
|
||||||
PltCloseThread(&decoderThread);
|
PltCloseThread(&decoderThread);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -260,7 +260,7 @@ int startVideoStream(void* rendererContext, int drFlags) {
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((VideoCallbacks.capabilities & CAPABILITY_DIRECT_SUBMIT) == 0) {
|
if ((VideoCallbacks.capabilities & (CAPABILITY_DIRECT_SUBMIT | CAPABILITY_PULL_RENDERER)) == 0) {
|
||||||
err = PltCreateThread("VideoDec", DecoderThreadProc, NULL, &decoderThread);
|
err = PltCreateThread("VideoDec", DecoderThreadProc, NULL, &decoderThread);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
VideoCallbacks.stop();
|
VideoCallbacks.stop();
|
||||||
@ -281,15 +281,15 @@ int startVideoStream(void* rendererContext, int drFlags) {
|
|||||||
VideoCallbacks.stop();
|
VideoCallbacks.stop();
|
||||||
stopVideoDepacketizer();
|
stopVideoDepacketizer();
|
||||||
PltInterruptThread(&receiveThread);
|
PltInterruptThread(&receiveThread);
|
||||||
if ((VideoCallbacks.capabilities & CAPABILITY_DIRECT_SUBMIT) == 0) {
|
if ((VideoCallbacks.capabilities & (CAPABILITY_DIRECT_SUBMIT | CAPABILITY_PULL_RENDERER)) == 0) {
|
||||||
PltInterruptThread(&decoderThread);
|
PltInterruptThread(&decoderThread);
|
||||||
}
|
}
|
||||||
PltJoinThread(&receiveThread);
|
PltJoinThread(&receiveThread);
|
||||||
if ((VideoCallbacks.capabilities & CAPABILITY_DIRECT_SUBMIT) == 0) {
|
if ((VideoCallbacks.capabilities & (CAPABILITY_DIRECT_SUBMIT | CAPABILITY_PULL_RENDERER)) == 0) {
|
||||||
PltJoinThread(&decoderThread);
|
PltJoinThread(&decoderThread);
|
||||||
}
|
}
|
||||||
PltCloseThread(&receiveThread);
|
PltCloseThread(&receiveThread);
|
||||||
if ((VideoCallbacks.capabilities & CAPABILITY_DIRECT_SUBMIT) == 0) {
|
if ((VideoCallbacks.capabilities & (CAPABILITY_DIRECT_SUBMIT | CAPABILITY_PULL_RENDERER)) == 0) {
|
||||||
PltCloseThread(&decoderThread);
|
PltCloseThread(&decoderThread);
|
||||||
}
|
}
|
||||||
closeSocket(rtpSocket);
|
closeSocket(rtpSocket);
|
||||||
@ -305,15 +305,15 @@ int startVideoStream(void* rendererContext, int drFlags) {
|
|||||||
VideoCallbacks.stop();
|
VideoCallbacks.stop();
|
||||||
stopVideoDepacketizer();
|
stopVideoDepacketizer();
|
||||||
PltInterruptThread(&receiveThread);
|
PltInterruptThread(&receiveThread);
|
||||||
if ((VideoCallbacks.capabilities & CAPABILITY_DIRECT_SUBMIT) == 0) {
|
if ((VideoCallbacks.capabilities & (CAPABILITY_DIRECT_SUBMIT | CAPABILITY_PULL_RENDERER)) == 0) {
|
||||||
PltInterruptThread(&decoderThread);
|
PltInterruptThread(&decoderThread);
|
||||||
}
|
}
|
||||||
PltJoinThread(&receiveThread);
|
PltJoinThread(&receiveThread);
|
||||||
if ((VideoCallbacks.capabilities & CAPABILITY_DIRECT_SUBMIT) == 0) {
|
if ((VideoCallbacks.capabilities & (CAPABILITY_DIRECT_SUBMIT | CAPABILITY_PULL_RENDERER)) == 0) {
|
||||||
PltJoinThread(&decoderThread);
|
PltJoinThread(&decoderThread);
|
||||||
}
|
}
|
||||||
PltCloseThread(&receiveThread);
|
PltCloseThread(&receiveThread);
|
||||||
if ((VideoCallbacks.capabilities & CAPABILITY_DIRECT_SUBMIT) == 0) {
|
if ((VideoCallbacks.capabilities & (CAPABILITY_DIRECT_SUBMIT | CAPABILITY_PULL_RENDERER)) == 0) {
|
||||||
PltCloseThread(&decoderThread);
|
PltCloseThread(&decoderThread);
|
||||||
}
|
}
|
||||||
closeSocket(rtpSocket);
|
closeSocket(rtpSocket);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user