mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-17 17:05:50 +00:00
Handle reuse of limelight-common for another stream
This commit is contained in:
parent
cff7ec1d10
commit
dc926946dd
@ -70,6 +70,7 @@ void destroyInputStream(void) {
|
||||
if (oaesContext != NULL)
|
||||
{
|
||||
oaes_free(oaesContext);
|
||||
oaesContext = NULL;
|
||||
}
|
||||
|
||||
entry = LbqDestroyLinkedBlockingQueue(&packetQueue);
|
||||
@ -80,6 +81,8 @@ void destroyInputStream(void) {
|
||||
free(entry);
|
||||
entry = nextEntry;
|
||||
}
|
||||
|
||||
initialized = 0;
|
||||
}
|
||||
|
||||
static void inputSendThreadProc(void* context) {
|
||||
|
@ -5,10 +5,10 @@
|
||||
|
||||
static SOCKET sock = INVALID_SOCKET;
|
||||
static IP_ADDRESS remoteAddr;
|
||||
static int currentSeqNumber = 1;
|
||||
static int currentSeqNumber;
|
||||
static char rtspTargetUrl[256];
|
||||
static char sessionIdString[16];
|
||||
static int hasSessionId = 0;
|
||||
static int hasSessionId;
|
||||
static char responseBuffer[RTSP_MAX_RESP_SIZE];
|
||||
|
||||
/* GFE 2.1.1 */
|
||||
@ -280,6 +280,8 @@ int performRtspHandshake(IP_ADDRESS addr, PSTREAM_CONFIGURATION streamConfigPtr)
|
||||
remoteAddr = addr;
|
||||
inaddr.S_un.S_addr = addr;
|
||||
sprintf(rtspTargetUrl, "rtsp://%s", inet_ntoa(inaddr));
|
||||
currentSeqNumber = 1;
|
||||
hasSessionId = 0;
|
||||
|
||||
{
|
||||
RTSP_MESSAGE response;
|
||||
|
@ -6,14 +6,14 @@
|
||||
static PLENTRY nalChainHead;
|
||||
static int nalChainDataLength;
|
||||
|
||||
static int nextFrameNumber = 1;
|
||||
static int nextFrameNumber;
|
||||
static int nextPacketNumber;
|
||||
static int startFrameNumber = 1;
|
||||
static int startFrameNumber;
|
||||
static int waitingForNextSuccessfulFrame;
|
||||
static int waitingForIdrFrame = 1;
|
||||
static int waitingForIdrFrame;
|
||||
static int gotNextFrameStart;
|
||||
static int lastPacketInStream = 0;
|
||||
static int decodingFrame = 0;
|
||||
static int lastPacketInStream;
|
||||
static int decodingFrame;
|
||||
|
||||
static LINKED_BLOCKING_QUEUE decodeUnitQueue;
|
||||
static unsigned int nominalPacketDataLength;
|
||||
@ -30,6 +30,15 @@ typedef struct _BUFFER_DESC {
|
||||
void initializeVideoDepacketizer(int pktSize) {
|
||||
LbqInitializeLinkedBlockingQueue(&decodeUnitQueue, 15);
|
||||
nominalPacketDataLength = pktSize - sizeof(NV_VIDEO_PACKET);
|
||||
|
||||
nextFrameNumber = 1;
|
||||
nextPacketNumber = 0;
|
||||
startFrameNumber = 1;
|
||||
waitingForNextSuccessfulFrame = 0;
|
||||
waitingForIdrFrame = 1;
|
||||
gotNextFrameStart = 0;
|
||||
lastPacketInStream = 0;
|
||||
decodingFrame = 0;
|
||||
}
|
||||
|
||||
/* Free malloced memory in AvcFrameState*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user