mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-06-17 22:31:21 +00:00
Add missing callbacks to Stop and Release for A/V
This commit is contained in:
@@ -26,6 +26,8 @@ void initializeAudioStream(IP_ADDRESS host, PAUDIO_RENDERER_CALLBACKS arCallback
|
|||||||
void destroyAudioStream(void) {
|
void destroyAudioStream(void) {
|
||||||
PLINKED_BLOCKING_QUEUE_ENTRY entry, nextEntry;
|
PLINKED_BLOCKING_QUEUE_ENTRY entry, nextEntry;
|
||||||
|
|
||||||
|
callbacks.release();
|
||||||
|
|
||||||
entry = LbqDestroyLinkedBlockingQueue(&packetQueue);
|
entry = LbqDestroyLinkedBlockingQueue(&packetQueue);
|
||||||
|
|
||||||
while (entry != NULL) {
|
while (entry != NULL) {
|
||||||
@@ -133,6 +135,8 @@ static void DecoderThreadProc(void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void stopAudioStream(void) {
|
void stopAudioStream(void) {
|
||||||
|
callbacks.stop();
|
||||||
|
|
||||||
PltInterruptThread(&udpPingThread);
|
PltInterruptThread(&udpPingThread);
|
||||||
PltInterruptThread(&receiveThread);
|
PltInterruptThread(&receiveThread);
|
||||||
PltInterruptThread(&decoderThread);
|
PltInterruptThread(&decoderThread);
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ void initializeVideoStream(IP_ADDRESS host, PSTREAM_CONFIGURATION streamConfig,
|
|||||||
void destroyVideoStream(void) {
|
void destroyVideoStream(void) {
|
||||||
PLINKED_BLOCKING_QUEUE_ENTRY entry, nextEntry;
|
PLINKED_BLOCKING_QUEUE_ENTRY entry, nextEntry;
|
||||||
|
|
||||||
|
callbacks.release();
|
||||||
|
|
||||||
destroyVideoDepacketizer();
|
destroyVideoDepacketizer();
|
||||||
|
|
||||||
entry = LbqDestroyLinkedBlockingQueue(&packetQueue);
|
entry = LbqDestroyLinkedBlockingQueue(&packetQueue);
|
||||||
@@ -167,6 +169,8 @@ int readFirstFrame(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void stopVideoStream(void) {
|
void stopVideoStream(void) {
|
||||||
|
callbacks.stop();
|
||||||
|
|
||||||
PltInterruptThread(&udpPingThread);
|
PltInterruptThread(&udpPingThread);
|
||||||
PltInterruptThread(&receiveThread);
|
PltInterruptThread(&receiveThread);
|
||||||
PltInterruptThread(&depacketizerThread);
|
PltInterruptThread(&depacketizerThread);
|
||||||
|
|||||||
Reference in New Issue
Block a user